1 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
3 * lex.c (lang_init_options): Tweak.
5 * decl2.c: Remove #inclusion of diagnostic.h
6 (lang_decode_option): Move diagnostic formatting options to
9 * lang-options.h: Remove documentation for diagnostic options.
11 * Makefile.in (lex.o): Depends upon diagnostic.h
13 2000-06-06 Mark Mitchell <mark@codesourcery.com>
15 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
16 the same DECL_RESULT, it's not a redefinition.
17 * pt.c (tsubst_decl): Remove code to handle illegal
20 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
22 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
24 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
26 * search.c (maybe_suppress_debug_info): Don't check
27 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
29 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
32 Remember instantiation context in deferred instantiations.
33 * cp-tree.h (struct tinst_level): Remove.
34 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
35 * pt.c (current_tinst_level): Now a tree.
36 (print_template_context, push_tinst_level, pop_tinst_level,
37 tinst_for_decl): Adjust.
38 (reopen_tinst_level): New fn.
39 (init_pt): Register current_tinst_level as a root.
40 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
41 of the pending templates list.
42 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
43 * lex.c (extract_interface_info): Adjust.
44 * decl2.c (warn_if_unknown_interface): Adjust.
46 2000-06-05 Mark Mitchell <mark@codesourcery.com>
48 * class.c (indirect_primary_base_p): New function.
49 (determine_primary_base): Use it.
51 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
53 Update new-abi dynamic cast algorithm.
54 * tinfo.cc (__class_type_info::__dyncast_result): Add
55 whole_details. Adjust constructor.
56 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
57 Avoid unnecessary searching.
58 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
60 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
62 * decl.c (init_decl_processing): Don't call record_component_aliases.
63 * tree.c (build_cplus_array_type_1): Likewise.
65 2000-06-04 Mark Mitchell <mark@codesourcery.com>
67 * ir.texi: Correct typo.
68 * mangle.c (write_expression): Handle non-type template arguments
70 * method.c (build_overload_value): Likewise.
71 * pt.c (convert_nontype_argument): Explicitly represent conversion
72 to a reference with an ADDR_EXPR.
73 (unify): Always unify arguments in left-to-right order.
75 2000-06-03 Alex Samuel <samuel@codesourcery.com>
76 Mark Mitchell <mark@codesourcery.com>
78 * Make-lang.in (CXX_SRCS): Add mangle.c.
79 * Makefile.in (CXX_OBJS): Add mangle.o.
82 * class.c (local_classes): New variable.
83 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
84 (get_vtt_name): Use mangle_vtt_name for new ABI.
85 (init_class_processing): Initialize local_classes.
86 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
87 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
88 (std_identifier): New macro.
89 (DECL_VOLATILE_MEMFUNC_P): New macro.
90 (DECL_NAMESPACE_STD_P): Likewise.
91 (local_classes): Declare.
92 (get_mostly_instantiated_function_type): Declare.
93 (init_mangle): Declare.
94 (mangle_decl): Likewise.
95 (mangle_type_string): Likewise.
96 (mangle_type): Likewise.
97 (mangle_typeinfo_for_type): Likewise.
98 (mangle_typeinfo_string_for_type): Likewise.
99 (mangle_vtbl_for_type): Likewise.
100 (mangle_vtt_for_type): Likewise.
101 (mangle_ctor_vtbl_for_type): Likewise.
102 (mangle_thunk): Likewise.
103 (mangle_conv_op_name_for_type): Likewise.
104 (mangle_guard_variable): Likewise.
105 * decl.c (pushtag): Keep track of local classes.
106 (initialize_predefined_identifiers): Initialize std_identifier.
107 (init_decl_processing): Use std_identifier.
108 (start_decl): Don't treat instantiations as specializations.
109 (grokdeclarator): Likewise.
110 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
111 name for fully-instantiated templates.
112 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
113 destructors with the new ABI.
114 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
115 (grokfield): Use mangle_type for new ABI.
116 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
117 (get_sentry): Use mangle_guard_variable for new ABI.
118 (start_static_initialization_or_destruction): Likewise.
119 * expr.c (extract_aggr_init): Remove.
120 (extract_scalar_init): Likewise.
121 (extract_init): Remove #if 0'd code.
122 * mangle.c: New function.
123 * method.c (build_mangled_name): Assert not flag_new_abi.
124 (build_static_name): Likewise.
125 (build_decl_overload_real): Likewise.
126 (build_typename_overload): Likewise.
127 (build_overload_with_type): Likewise.
128 (build_overload_name): Likewise.
129 (get_ctor_vtbl_name): Likewise.
130 (start_squangling): Likewise.
131 (get_id_2): Likewise.
132 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
133 (init_method): Call init_mangle for new ABI.
134 (make_thunk): Call mangle_thunk for new ABI.
135 * operators.def: Correct new ABI manglings for the `%' operator.
137 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
138 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
139 (lookup_template_class): Call mangle_decl for new ABI.
140 (get_mostly_instantiated_function_type): New function.
141 (set_mangled_name_for_template_decl): Use it.
142 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
143 the new ABI. Use mangle_conv_op_name_for_type for instantiated
145 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
146 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
147 (tinfo_base_init): Likewise. Mangle typeinfo string name with
148 mangle_typeinfo_string_for_type.
150 2000-06-01 Richard Henderson <rth@cygnus.com>
152 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
154 2000-06-01 Richard Henderson <rth@cygnus.com>
156 * decl2.c (unsupported_options): Fix typo, make const.
157 (lang_decode_option): Fix bsearch argument order.
159 2000-06-01 Mark Mitchell <mark@codesourcery.com>
161 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
164 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
166 * cp-tree.h (c_get_alias_set): Deleted.
167 * Makefile.in (decl.o): Include ../expr.h.
168 * decl.c (expr.h): Include.
169 (init_decl_processing): Call record_component_aliases for arrays.
170 (grokdeclarator): Likewise.
171 Set TREE_ADDRESSABLE for fields that aren't bitfields.
172 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
174 2000-05-31 Mark Mitchell <mark@codesourcery.com>
176 Remove guiding declaration support.
177 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
178 (flag_guiding_decls): Remove.
179 * call.c (build_user_type_conversion_1): Remove support for
181 (build_new_function_call): Likewise.
182 (build_new_op): Likewise.
183 (build_new_method_call): Likewise.
184 * decl.c (start_function): Likewise.
185 * friend.c (is_friend): Likewise.
186 (do_friend): Likewise.
187 * decl2.c ((flag_dump_translation_unit): Make it const.
188 (flag_guiding_decls): Remove.
189 (unsupported_options): New variable
190 (compare_options): New function.
191 (lang_decode_option): Use them.
193 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
195 * method.c (mangle_expression): Adjust test for legal expression
198 * pt.c (instantiate_decl): Save and restore the local
199 specializations list.
201 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
203 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
205 2000-05-30 Mark Mitchell <mark@codesourcery.com>
207 * call.c (add_template_candidate_real): Handle member template
208 constructors for classes with virtual bases.
209 (build_user_type_conversion_1): Use in_charge_arg_for_name.
210 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
212 * ir.texi: Update thunk documentation.
214 * call.c (joust): Fix handling of overloaded builtin operators.
216 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
218 * cp-tree.h (DECL_ANTICIPATED): New macro.
219 Document new use of DECL_LANG_FLAG_7.
220 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
221 in the user namespace.
222 * lex.c (do_identifier): If the identifier's declaration has
223 DECL_ANTICIPATED on, it has not yet been declared. But do not
224 replace it with an ordinary implicit declaration.
226 * tinfo2.cc: Include stdlib.h.
228 2000-05-29 Mark Mitchell <mark@codesourcery.com>
230 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
231 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
234 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
236 * decl2.c (lang_decode_option): Use skip_leading_substring instead
239 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
241 * operators.def (<?): Duplicated, should have been...
244 2000-05-27 Alex Samuel <samuel@codesourcery.com>
245 Mark Mitchell <mark@codesourcery.com>
247 * cp-tree.h (ansi_opname): Make it a macro.
248 (ansi_assopname): Likewise.
249 (struct lang_decl_flags): Add assignment_operator_p.
250 (struct lang_decl): Add operator_code.
251 (DECL_VTT_PARM): Adjust.
252 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
254 (SET_OVERLOADED_OPERATOR_CODE): New macro.
255 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
256 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
257 (opname_tab): Remove.
258 (assignop_tab): Likewise.
259 (operator_name_info_t): New type.
260 (operator_name_info): New variable.
261 (assignment_operator_name_info): Likewise.
262 (build_cp_library_fn): Remove declaration.
263 (push_cp_library_fn): Likewise.
264 (operator_name_string): Likewise.
265 (build_decl_overload): Likewise.
266 * call.c (print_z_candidates): Simplify.
267 (build_object_call): Adjust usage of ansi_opname. Use
268 DECL_OVERLOADED_OPERATOR_P.
269 (op_error): Adjust operator name lookup.
270 (build_conditional_expr): Adjust usage of ansi_opname.
271 (build_new_op): Likewise.
272 (build_op_delete_call): Likewise.
273 (build_over_call): Likewise.
274 (joust): Use DECL_OVERLOADED_OPERATOR_P.
275 * decl.c (duplicate_decls): Copy operator_code.
276 (init_decl_processing): Adjust parameters to push_cp_library_fn.
277 (builtin_function): Adjust parameters to build_library_fn_1.
278 (build_library_fn_1): Accept an overloaded operator code.
279 (build_library_fn): Pass ERROR_MARK.
280 (build_cp_library_fn): Accept an overloaded operator code.
281 (push_cp_library_fn): Likewise.
283 (grokdeclarator): Simplify code to compute names of overloaded
284 operators. Adjust use of ansi_opname.
285 (ambi_op_p): Work on tree_codes, not identifiers.
286 (unary_op_p): Likewise.
287 (grok_op_properties): Likewise.
288 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
289 (lang_mark_tree): Don't try to mark the operator_code.
290 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
291 * error.c (dump_decl): Remove special handling for operator
293 (dump_function_name): Likewise.
294 (dump_expr): Adjust name lookup of operators.
295 (op_to_string): Simplify.
296 (assop_to_string): Likewise.
297 * init.c (build_new_1): Adjust use of ansi_opname.
298 * lex.c (opname_tab): Remove.
299 (assignop_tab): Likewise.
300 (ansi_opname): Likewise.
301 (ansi_assopname): Likewise.
302 (operator_name_string): Likewise.
303 (reinit_lang_specific): Likewise.
304 (operator_name_info): New variable.
305 (assignment_operator_name_info): Likewise.
306 (init_operators): New function.
307 (init_parse): Use it.
308 (do_identifier): Adjust use of ansi_opname.
309 * method.c (mangle_expression): Don't use ansi_opname for
311 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
312 (build_decl_overload): Remove.
313 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
314 (do_build_assign_ref): Adjust use of ansi_opname.
315 (synthesize_method): Likewise.
316 (implicitly_declare_fn): Likewise.
317 * operators.def: New file.
318 * parse.y (operator): Adjust use of ansi_opname.
319 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
320 (set_mangled_name_for_template_decl): Don't play games with
322 (special_function_p): Adjust use of ansi_opname.
323 * typeck.c (check_return_expr): Likewise.
324 * Make-lang.in (cc1plus): Depend on operators.def.
325 * Makefile.in (lex.o): Likewise.
328 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
330 * Make-lang.in (cplib2.ready): Eradicate.
332 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
334 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
335 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
336 (built_min, cp_tree_equal): Likewise.
338 2000-05-26 Mark Mitchell <mark@codesourcery.com>
340 * class.c (layout_nonempty_base_or_field): Replace
341 `record_layout_info' with `record_layout_info_s'.
343 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
346 * cp-tree.h (struct language_function): x_named_labels is now
347 a struct named_label_list*.
348 * decl.c (struct named_label_use_list): Renamed from...
349 (struct named_label_list): ...this. New struct.
350 (push_binding_level): Don't set eh_region.
351 (note_level_for_eh): New fn.
352 (pop_label): Take label and old value directly.
353 (pop_labels): Adjust for new named_labels format.
354 (lookup_label): Likewise.
355 (poplevel): Note characteristics of a binding level containing a
356 named label. Mess with named label lists earlier.
357 (mark_named_label_lists): New fn.
358 (mark_lang_function): Call it.
359 (use_label): New fn, split out from...
360 (make_label_decl): ...here. Don't call it.
361 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
362 check_previous_gotos): New fns, split out from...
363 (define_label): ...here.
364 (check_switch_goto): New fn.
365 (define_case_label): Call it.
366 (check_goto): New fn.
367 * semantics.c (finish_goto_stmt): Call it and use_label.
368 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
369 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
371 2000-05-26 Mark Mitchell <mark@codesourcery.com>
373 * class.c (build_vtable_entry_ref): Correct usage of
374 get_vtbl_decl_for_binfo.
376 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
377 * method.c (implicitly_declare_fn): Not here.
379 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
381 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
382 (CPTI_PTMD_DESC_TYPE): ... here.
383 (ptmd_desc_type_node): Rename to ...
384 (ptm_desc_type_node): ... here.
386 * rtti.c (ptmd_initializer): Rename to ...
387 (ptm_initializer): ... here.
388 (sythesize_tinfo_var): Adjust. Deal with pointer to member
390 (create_tinfo_types): Adjust.
392 2000-05-25 Mark Mitchell <mark@codesourcery.com>
394 Finish implementation of VTTs.
395 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
396 CPTI_VTT_PARM_IDENTIFIER.
397 (vtt_parm_identifier): New macro.
398 (vtt_parm_type): Likewise.
399 (BINFO_SUBVTT_INDEX): Likewise.
400 (BINFO_VPTR_INDEX): Likewise.
401 (struct lang_decl): Add vtt_parm.
402 (DECL_VTT_PARM): New macro.
403 (DECL_USE_VTT_PARM): Likewise.
404 (DECL_NEEDS_VTT_PARM_P): Likewise.
405 (get_vtt_name): Declare.
406 (build_artifical_parm): Likewise.
407 (fixup_all_virtual_upcast_offsets): Likewise.
408 (expand_indirect_vtbls_init): Remove.
409 * call.c (build_new_method_call): Pass the vtt to subobject
410 constructors and destructors.
411 * class.c (get_vtt_name): Give it external linkage.
412 (build_clone): Handle the magic VTT parameters for clones.
413 (clone_function_decl): Fix typo in comment.
414 (build_vtt): Keep track of the indices in the VTTs where various
416 (build_vtt_inits): Likewise.
417 (dfs_build_vtt_inits): Likewise.
418 (build_ctor_vtbl_group): Tweak type of construction vtables.
419 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
420 primary bases, when building construction vtables.
421 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
422 (initialize_predefined_identifiers): Add vtt_parm_identifier.
423 (init_decl_processing): Initialize vtt_parm_type.
424 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
425 (lang_mark_tree): Make vtt_parm.
426 * decl2.c (build_artificial_parm): New function.
427 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
428 (grokclassfn): Use build_artificial_parm.
429 * init.c (initialize_vtbl_ptrs): Call
430 fixup_all_virtual_upcast_offsets directly.
431 (perform_member_init): Use the complete subobject destructor for
433 (build_vtbl_address): New function.
434 (expand_virtual_init): Handle VTTs.
435 * optimize (maybe_clone_body): Likewise.
436 * search.c (fixup_all_virtual_upcast_offsets): Give it external
438 (expand_indirect_vtbls_init): Remove.
439 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
440 * tree.c (make_binfo): Make them bigger.
442 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
444 * inc/cxxabi.h (__pbase_type_info): Define, based on
446 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
447 (__pointer_to_member_type_info): Likewise.
448 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
449 (__pointer_to_member_type_info::__is_pointer_p): Remove.
450 (__pointer_type_info::__do_catch): Rename to ...
451 (__pbase_type_info::__do_catch): ... here. Adjust.
452 (__pbase_type_info::__pointer_catch): Implement.
453 (__pointer_type_info::__pointer_catch): Adjust.
454 (__pointer_to_member_type_info::__pointer_catch): Adjust.
456 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
458 * tinfo.h (__user_type_info::contained_virtual_p): New
460 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
462 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
463 diamond shaped heirarchy. Add early out for mixed diamond and
464 duplicate shaped heirarchy.
466 2000-05-24 Mark Mitchell <mark@codesourcery.com>
468 * cp-tree.h (build_delete): Change prototype.
469 (build_vec_delete): Likewise.
470 * call.c (build_scoped_method_call): Use special_function_kind
471 values to indicate the kind of destruction to be done.
472 (build_method_call): Likewise.
473 * decl.c (finish_destructor_body): Likewise.
474 (maybe_build_cleanup_1): Likewise. Rename to ...
475 (maybe_build_cleanup): ... this.
476 * decl2.c (delete_sanity): Use special_function_kind
477 values to indicate the kind of destruction to be done.
478 (build_cleanup): Likewise.
479 * init.c (perform_member_init): Likewise.
480 (build_vec_delete_1): Likewise.
481 (build_dtor_call): Simplify.
482 (build_delete): Use special_function_kind
483 values to indicate the kind of destruction to be done.
484 (build_vbase_delete): Likewise.
485 (build_vec_delete): Likewise.
487 * init.c (sort_member_init): Fix typo in error message generation
490 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
492 * semantics.c (begin_class_definition): make the packed
493 attribute be sensitive to the "-fpack-struct" command line flag
495 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
497 Update new-abi upcast algorithm.
498 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
499 prototype and meaning of return value.
500 (__si_class_type_info::__do_upcast): Likewise.
501 (__vmi_class_type_info::__do_upcast): Likewise.
502 * tinfo.cc (__class_type_info::__upcast_result): Replace
503 whole2dst with part2dst. Adjust ctor.
504 (__class_type_info::__do_upcast): Adjust call of worker function.
505 (__class_type_info::__do_upcast): Adjust.
506 (__si_class_type_info::__do_upcast): Adjust. Use parent's
508 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
509 virtual base in diamond heirarchy bug.
511 2000-05-23 Mark Mitchell <mark@codesourcery.com>
513 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
514 and bitfield to tinfo_fn_p.
515 (DECL_TINFO_FN_P): Adjust.
516 (SET_DECL_TINFO_FN_P): Likewise.
517 (DECL_MUTABLE_P): Likewise.
518 (DECL_C_BIT_FIELD): Likewise.
519 (SET_DECL_C_BIT_FIELD): Likewise.
520 (CLEAR_DECL_C_BIT_FIELD): Likewise.
521 (DECL_UNINLINABLE): Likewise.
522 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
523 (handle_using_decl): Remove assertion.
524 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
525 to build FIELD_DECLs.
526 (build_base_field): Likewise.
527 (layout_class_type): Likewise.
528 * decl.c (init_decl_processing): Likewise.
529 (build_ptrmemfunc_type): Likewise.
530 (grokdeclarator): Likewise.
531 * decl2.c (grok_x_components): Likewise.
532 * except.c (call_eh_info): Likewise.
533 * init.c (init_init_processing): Likewise.
534 * rtti.c (expand_class_desc): Likewise.
535 (create_pseudo_type_info): Likewise.
536 (get_vmi_pseudo_type_info): Likewise.
537 (create_tinfo_types): Likewise.
538 * ptree.c (print_lang_decl): Adjust.
539 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
540 before checking DECL_MUTABLE_P.
542 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
543 parameters for template functions.
544 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
545 destructors as well as constructors.
547 2000-05-22 Mark Mitchell <mark@codesourcery.com>
549 * class.c (build_ctor_vtbl_group): Set inits.
550 * optimize.c (maybe_clone_body): Set DECL_INLINE and
551 DECL_THIS_INLINE appropriately for clones.
553 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
554 (DECL_CONV_FN_P): Simplify.
555 (DECL_OPERATOR): Remove.
556 (language_to_string): Declare.
557 * decl.c (duplicate_decls): Fix typo in comment.
558 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
559 (grok_op_properties): Use DECL_CONV_FN_P instead of
560 IDENTIFIER_TYPENAME_P.
561 * dump.c (dequeue_and_dump): Dump the language linkage of
563 * error.c (language_to_string): Give it external linkage.
564 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
565 (implicitly_declare_fn): Set DECL_LANGUAGE.
566 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
567 IDENTIFIER_TYPENAME_P.
568 (tsubst_decl): Likewise.
569 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
570 * semantics.c (finish_member_declaration): Don't mark members of
571 classes declared in an extern "C" region as extern "C".
573 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
575 * decl2.c (qualified_lookup_using_namespace): Look through
578 * decl.c (push_using_decl): Return the old decl on namespace level.
580 2000-05-21 Mark Mitchell <mark@codesourcery.com>
582 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
583 (VTT_NAME_PREFIX): New macro.
584 (CTOR_VTBL_NAME_PREFIX): Likewise.
585 (get_ctor_vtbl_name): New function.
586 * class.c (get_vtable_name): Simplify.
587 (get_vtt_name): New function.
588 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
589 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
590 when a virtual base becomes primary.
591 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
593 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
594 additional parameters.
595 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
596 (initialize_array): New function.
597 (build_vtt): Likewise.
598 (build_vtt_inits): Likewise.
599 (dfs_build_vtt_inits): Likewise.
600 (dfs_fixup_binfo_vtbls): Likewise.
601 (build_ctor_vtbl_group): Likewise.
602 (initialize_vtable): Use initialize_array.
603 (accumulate_vtbl_inits): Reimplement to handle construction
605 (dfs_accumulate_vtbl_inits): Likewise.
606 (bulid_vtbl_initializer): Adjust parameter name.
607 * method.c (build_typename_overload): Remove #if 0'd code.
608 (get_ctor_vtbl_name): New function.
609 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
610 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
612 * cp-tree.h (struct lang_type): Remove search_slot.
613 (CLASSTYPE_SEARCH_SLOT): Remove.
614 (emit_base_init): Change prototype.
615 (initialize_vtbl_ptrs): Likewise.
616 (expand_indirect_vtbls_init): Likewise.
617 (clear_search_slots): Remove.
618 * decl.c (lang_mark_tree): Don't mark search_slot.
619 * init.c (initialize_vtbl_ptrs): Simplify.
620 (emit_base_init): Likewise.
621 * search.c (struct vbase_info): Document decl_ptr.
622 (convert_pointer_to_single_level): Remove.
623 (dfs_find_vbases): Remove.
624 (dfs_init_base_pointers): Simplify.
625 (dfs_clear_vbase_slots): Remove.
626 (dfs_vtable_path_unmark): New function.
627 (init_vbase_pointers): Simplify.
628 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
629 (expand_indirect_vtbls_init): Simplify. Don't call
631 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
632 initialize_vtbl_ptrs.
634 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
636 * except.c: Add static prototypes.
638 2000-05-20 H.J. Lu <hjl@gnu.org>
640 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
642 2000-05-19 Mark Mitchell <mark@codesourcery.com>
644 Don't create a separate copy of virtual bases for the
645 CLASSTYPE_VBASECLASSES list.
646 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
647 (BINFO_FOR_VBASE): Remove.
648 (CANONICAL_BINFO): Adjust.
649 (binfo_for_vbase): New function.
650 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
651 instead of BINFO_FOR_VBASE.
652 (build_vbase_pointer): Likewise.
653 (build_secondary_vtable): Likewise.
654 (dfs_mark_primary_bases): Likewise.
655 (mark_primary_bases): Likewise.
656 (layout_nonempty_base_or_field): Likewise.
657 (dfs_set_offset_for_shared_vbases): Likewise.
658 (dfs_set_offset_for_unshared_vbases): Likewise.
659 (layout_virtual_bases): Likewise. Adjust for changes to the
660 CLASSTYPE_VBASECLASSES list.
661 (dump_class_hierarchy_r): Use binfo_for_vbase
662 instead of BINFO_FOR_VBASE.
663 (dump_class_hierarchy): Likewise.
664 (finish_vtbls): Likewise.
665 (build_vtbl_initializer): Adjust for changes to the
666 CLASSTYPE_VBASECLASSES list.
667 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
668 * decl.c (finish_destructor_body): Adjust for changes to the
669 CLASSTYPE_VBASECLASSES list.
670 * init.c (sort_base_init): Use binfo_for_vbase.
671 (construct_virtual_bases): Adjust for changes to the
672 CLASSTYPE_VBASECLASSES list.
673 (expand_member_init): Use binfo_for_vbase.
674 (build_vbase_delete): Adjust for changes to the
675 CLASSTYPE_VBASECLASSES list.
676 * method.c (do_build_copy_constructor): Likewise.
677 * rtti.c (get_base_offset): Use binfo_for_vbase.
678 (expand_class_desc): Remove #if 0'd code.
679 * search.c (struct vbase_info): Remove vbase_types.
680 (get_base_distance): Use binfo_for_vbase.
681 (lookup_field_queue_p): Use CANONICAL_BINFO.
682 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
683 (get_pure_virtuals): Adjust for changes to the
684 CLASSTYPE_VBASECLASSES list.
685 (dfs_find_vbases): Use binfo_for_vbase.
686 (dfs_init_vbase_pointers): Likewise.
687 (init_vbase_pointers): Don't initialize vi.vbase_types.
688 (virtual_context): Use binfo_for_vbase.
689 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
690 CLASSTYPE_VBASECLASSES list.
691 (expand_indirect_vtbls_init): Simplify.
692 (dfs_get_vbase_types): Don't replicate virtual bases.
693 (find_vbase_instance): Use binfo_for_vbase.
694 (binfo_for_vbase): New function.
695 * typeck.c (get_delta_difference): Use binfo_for_vbase.
697 2000-05-17 Mark Mitchell <mark@codesourcery.com>
699 * decl2.c (finish_anon_union): Generalize error messages to handle
700 anonymous structures.
701 * init.c (perform_member_init): Remove `name' parameter.
702 (build_field_list): New function.
703 (sort_member_init): Handle anonymous union initialization order
704 correctly. Check for multiple initializations of the same union.
705 (emit_base_init): Don't look up fields by name here.
706 (expand_member_init): Record the result of name lookup for future
708 * typeck.c (build_component_ref): Fix formatting.
710 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
712 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
713 * typeck.c (build_x_compound_expr): Replace warn_unused with
716 * decl2.c (lang_decode_option): Update -Wall unused flags by
719 2000-05-16 Mark Mitchell <mark@codesourcery.com>
721 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
722 * init.c (dfs_vtable_path_unmark): Remove.
723 * search.c (marked_new_vtable_p): Likewise.
724 (unmarked_new_vtable_p): Likewise.
725 (dfs_search_slot_nonempty_p): Likewise.
726 (dfs_mark): Likewise.
727 (dfs_vtable_path_unmark): Likewise.
728 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
729 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
730 (dfs_init_vbase_pointers): Remove special-case new ABI code.
731 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
732 (init_vbase_pointers): Simplify.
733 (expand_indirect_vtbls_init): Likewise.
735 * class.c (copy_virtuals): New function.
736 (build_primary_table): Use it.
737 (build_secondary_vtable): Likewise.
738 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
739 indicate that no vcall offset is required.
740 (add_virtual_function): Likewise.
741 (modify_all_vtables): Likewise.
742 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
743 (dfs_accumulate_vtbl_inits): Likewise.
744 (build_vtbl_initializer): Make changes to handle construction
746 (dfs_build_vcall_offset_vtbl_entries): Likewise.
747 (build_rtti_vtbl_entries): Likewise.
748 (build_vtable_entries): Handle a NULL vcall_index.
750 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
752 * decl2.c (lang_decode_option): Fix thinko.
754 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
756 * except.c (check_handlers): New fn.
757 * cp-tree.h: Declare it.
758 * semantics.c (finish_handler_sequence): Call it.
759 (finish_function_handler_sequence): Likewise.
760 (finish_handler_parms): Set TREE_TYPE on the handler.
761 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
762 * search.c (get_base_distance_recursive): If protect>1, ignore
764 (get_base_distance): Don't reduce watch_access.
766 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
768 * lex.c: #include diagnostic.h.
769 (lang_init_options): Set default prefixing rules.
771 * lang-options.h: Add -fdiagnostics-show-location=.
773 * decl2.c: #include diagnostic.h.
774 (lang_decode_option): Handle -fdiagnostics-show-location=.
776 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
778 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
779 * vec.cc: Revert my 2000-05-07 change.
781 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
783 * class.c (check_field_decls): Complain about non-static data
784 members with same name as class in class with constructor.
786 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
788 * decl.c (grokdeclarator): Allow non-static data members with
791 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
793 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
794 and pending_inline.filename. Update prototypes.
795 * decl.c (define_label): Constify filename parameter.
796 * decl2.c (warn_if_unknown_interface): Constify local char *.
797 * input.c Constify input_source.filename. Don't declare
798 input_filename or lineno. Constify filename parameter to feed_input.
799 * lex.c (init_parse): Constify parameter and return value.
800 (cp_pragma_interface, cp_pragma_implementation): Constify
802 (reinit_parse_for_method, reinit_parse_for_block,
803 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
804 Constify local char *.
805 * pt.c: Don't declare lineno or input_filename.
806 (print_template_context, tsubst_friend_function, tsubst_decl,
807 tsubst, instantiate_decl): Constify local char *.
808 * semantics.c (expand_body): Constify local char *.
809 * tree.c (build_srcloc): Constify filename parameter.
810 * typeck.c (c_expand_asm_operands): Constify filename
813 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
815 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
818 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
820 * inc/cxxabi.h: Fix typos in comment.
821 (__base_class_info::__offset): Use a static_cast.
823 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
825 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
826 of std::size_t and std::ptrdiff_t respectively.
827 * tinfo.cc: Likewise.
830 2000-05-06 Richard Henderson <rth@cygnus.com>
832 * typeck.c (build_c_cast): Don't warn integer->pointer size
833 mismatch for constants.
835 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
837 * rtti.c (ptmd_initializer): Set non-public, if class is
840 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
841 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
842 __cxa_vec_delete): Likewise.
843 * tinfo.cc (__dynamic_cast): Likewise.
844 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
845 __cxa_vec_delete): Likewise.
847 2000-05-04 Mark Mitchell <mark@codesourcery.com>
849 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
850 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
851 (lang_decl_flags): Add vcall_offset.
852 (THUNK_VCALL_OFFSET): Use it.
853 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
854 * method.c (make_thunk): Create the lang_decl here, not in
856 (emit_thunk): Make generic thunks into ordinary functions once
857 they have been fed to expand_body.
858 * semantics.c (expand_body): Set current_function_is_thunk here.
860 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
862 * class.c (update_vtable_entry_for_fn): Prototype.
864 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
867 * search.c (dfs_build_inheritance_graph_order): Prototype.
869 2000-05-04 Mark Mitchell <mark@codesourcery.com>
871 * cp-tree.h (special_function_kind): Add various kinds of
873 (special_function_p): New function.
874 * class.c (overrides): Don't let one kind of destructor override
876 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
877 whether or not to instantiate a template.
878 * tree.c (special_function_p): Define.
880 2000-05-03 Mark Mitchell <mark@codesourcery.com>
882 * cp-tree.def (THUNK_DECL): Remove.
883 * cp-tree.h (DECL_THUNK_P): New macro.
884 (DECL_NON_THUNK_FUNCTION_P): Likewise.
885 (DECL_EXTERN_C_FUNCTION_P): Likewise.
886 (SET_DECL_THUNK_P): Likewise.
887 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
888 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
889 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
890 * decl.c (decls_match): Use DECL_EXTERN_C_P.
891 (duplicate_decls): Likewise.
892 (pushdecl): Likewise. Adjust thunk handling.
893 (grokfndecl): Use DECL_EXTERN_C_P.
894 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
895 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
896 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
897 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
898 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
899 DECL_NO_STATIC_CHAIN.
900 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
901 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
902 * search.c (covariant_return_p): Remove THUNK_DECL handling.
905 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
907 * tree.c (walk_tree): Set lineno.
909 2000-05-01 Mark Mitchell <mark@codesourcery.com>
911 * exception.cc: Update license notice.
915 * tinfo.cc: Likewise.
916 * tinfo2.cc: Likewise.
918 * inc/cxxabi.h: Likewise.
919 * inc/exception: Likewise.
921 * inc/new.h: Likewise.
922 * inc/typeinfo: Likewise.
924 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
926 * tree.c (build_target_expr_with_type): If we already have a
927 TARGET_EXPR, just return it.
929 * optimize.c (initialize_inlined_parameters): Don't generate an
930 EXPR_STMT if we can just use DECL_INITIAL.
931 * decl.c (emit_local_var): Only make the initialization a
932 full-expression if stmts_are_full_exprs_p.
934 2000-05-01 Mark Mitchell <mark@codesourcery.com>
936 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
938 * call.c (standard_conversion): Use it.
939 (direct_reference_binding): Likewise.
940 (build_over_call): Likewise.
941 (is_properly_derived_from): Likewise.
942 (compare_ics): Likewise.
943 * class.c (resolves_to_fixed_type_p): Likewise.
944 * optimize.c (declare_return_variable): Likewise.
945 * pt.c (is_specialization_of): Likewise.
947 * typeck.c (comp_target_parms): Likeiwse.
948 (build_static_cast): Likewise.
949 (build_reinterpret_cast): Likewise.
950 (build_const_cast): Likewise.
951 (comp_ptr_ttypes_real): Likewise.
952 (comp_ptr_ttypes_const): Likewise.
953 * typeck2.c (process_init_constructor): Likewise.
955 2000-04-30 Scott Snyder <snyder@fnal.gov>
957 * decl.c (finish_destructor_body): Use the base destructor when
958 destroying virtual bases.
960 2000-04-30 Mark Mitchell <mark@codesourcery.com>
962 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
964 * optimize.c (struct inline_data): Add target_exprs field.
965 (declare_return_variable): When a function returns an aggregate,
966 use the variable declared in the TARGET_EXPR as the remapped
968 (expand_call_inline): Update the pending target_exprs stack.
969 (optimize_function): Initialize the stack.
971 * decl2.c (finish_file): Fix typo in comment.
973 * method.c (emit_thunk): Don't try to return a `void' value.
975 * optimize.c (initialize_inlined_parameters): If the parameter is
976 addressable, we need to make a new VAR_DECL, even if the
977 initializer is constant.
979 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
981 * decl.c (grok_op_properties): Add an extra check of argtypes.
983 2000-04-27 Mark Mitchell <mark@codesourcery.com>
985 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
987 (initialize_inlined_parameters): Try to avoid creating new
990 2000-04-27 Alex Samuel <samuel@codesourcery.com>
992 * lex.c (my_get_run_time): Remove.
993 (init_filename_times): Use get_run_time instead of my_get_run_time.
994 (check_newline): Likewise.
995 (dump_time_statistics): Likewise.
996 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
997 of computing elapsed time explicitly.
999 2000-04-26 Mark Mitchell <mark@codesourcery.com>
1001 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
1002 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
1003 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
1004 before calling decl_constant_value.
1005 * class.c (check_bitfield_decl): Likewise.
1006 * cvt.c (ocp_convert): Likewise.
1007 (convert): Likewise.
1008 * decl.c (compute_array_index_type): Likewise.
1009 (build_enumerator): Likewise.
1010 * decl2.c (check_cp_case_value): Likewise.
1011 * pt.c (convert_nontype_argument): Likewise.
1013 * typeck.c (decay_conversion): Likewise.
1014 (build_compound_expr): Likewise.
1015 (build_reinterpret_cast): Likewise.
1016 (build_c_cast): Likewise.
1017 (convert_for_assignment): Likewise.
1019 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
1021 * decl.c (finish_function): Don't play games with DECL_INLINE.
1023 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
1025 * ir.texi: Correct typo.
1027 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1029 * decl.c (grokdeclarator): Reject VLAs as members.
1031 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
1033 * call.c (standard_conversion): Accept conversion between
1036 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
1038 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
1040 * decl2.c (finish_file): Remove double setup for accounting
1043 2000-04-24 Robert Lipe <robertlipe@usa.net>
1045 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
1047 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
1049 * new.cc (set_new_handler): Needs to be in std::.
1051 2000-04-23 Mark Mitchell <mark@codesourcery.com>
1053 * cp-tree.h (lang_decl): Remove pretty_function_p.
1054 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
1055 language-specific node.
1056 * decl.c (cp_make_fname_decl): Use build_decl, not
1057 build_lang_decl, to build the variables.
1058 (grokvardecl): Don't call build_lang_decl for local variables in
1060 (grokdeclarator): Don't call build_lang_decl for local type
1061 declarations in templates.
1062 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
1063 zero'd memory, rather than calling memset.
1064 * pt.c: Include hashtab.h.
1065 (local_specializations): New variable.
1066 (retrieve_local_specialization): Use it.
1067 (register_local_specialization): Likewise.
1068 (tsubst_decl): Don't assume local variables have
1070 (instantiate_decl): Set up local_specializations.
1071 * Makefile.in (HTAB_H): New variable.
1073 2000-04-23 Richard Henderson <rth@cygnus.com>
1075 * typeck.c (c_expand_asm_operands): Restore the original
1076 contents of the output list.
1078 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
1080 * ir.texi: Document complex number representation.
1082 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
1084 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
1085 (target_incomplete_p): New function.
1086 (tinfo_base_init): Create comdat NTBS name variable.
1087 (ptr_initializer): Add non_public parameter. Calculate it.
1088 (ptmd_initializer): Likewise.
1089 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
1090 (create_real_tinfo_var): Add non_public parameter. Use it.
1091 Push proxy into global namespace.
1092 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
1094 * inc/typeinfo (type_info::before, type_info::operator==):
1095 Compare __name addresses.
1097 * tinfo2.cc: Remove new-abi builtins comment.
1099 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
1101 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
1103 * call.c (joust): Exit early if we get the same function, too.
1105 * decl2.c (key_method): Return NULL_TREE for template classes.
1106 (import_export_class): Don't need to check for template classes.
1108 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
1110 * lex.c: Remove references to cccp.c.
1112 2000-04-18 Mark Mitchell <mark@codesourcery.com>
1114 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
1115 volatile_memfunc. Add destructor_attr. Adjust dummy.
1116 (DECL_DESTRUCTOR_P): Use destructor_attr.
1117 (DECL_CONST_MEMFUNC_P): Reimplement.
1118 (DECL_VOLATILE_MEMFUNC_P): Remove.
1119 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
1120 (overrides): Use DECL_DESTRUCTOR_P.
1121 (check_for_override): Likewise.
1122 * decl.c (start_function): Likewise.
1123 * decl2.c (grokfclassfn): Likewise.
1124 (check_classfn): Likewise.
1125 (grok_function_init): Likewise.
1127 2000-04-17 Mark Mitchell <mark@codesourcery.com>
1129 * decl2.c (grokfield): Issue error on illegal data member
1132 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
1134 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
1136 2000-04-16 Mark Mitchell <mark@codesourcery.com>
1138 * class.c (build_vtable_entry): Don't build thunks for type-info
1141 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
1143 * decl.c (decls_match): Allow a redeclaration of a builtin to
1144 specify args while the builtin did not.
1146 2000-04-15 Mark Mitchell <mark@codesourcery.com>
1148 * cp-tree.def (THUNK_DECL): Add to documentation.
1149 * cp-tree.h (flag_huge_objects): Declare.
1150 * class.c (modify_vtable_entry): Tidy.
1151 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
1152 Calculate delta appropriately for the new ABI.
1153 (dfs_modify_vtables): Use it.
1154 (modify_all_vtables): Fix thinko in code to add overriding copies
1155 of functions to primary vtables.
1156 (build_clone): Fix typo in comment.
1157 (clone_function_decl): Correct order of destructors in vtable.
1158 (build_vbase_offset_vtbl_entries): Adjust comment.
1159 (dfs_vcall_offset_queue_p): Remove.
1160 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
1161 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
1162 (build_vtable_entry): Correct check for pure virtual functions.
1163 Don't declare flag_huge_objects.
1164 * decl.c (flag_huge_objects): Remove declaration.
1165 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
1166 Use int_size_in_bytes.
1167 (emit_thunk): Handle vcall offset thunks.
1169 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1171 * decl2.c (parse_time, varconst_time): Delete declarations.
1172 (finish_file): Delete LINENO declaration.
1173 START_TIME and THIS_TIME now long.
1175 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
1177 * class.c (build_base_field): Reformat comment.
1179 * inc/cxxabi.h (stddef.h): Comment inclusion.
1180 (__base_class_info::__offset): Comment shift.
1182 2000-04-12 Mark Mitchell <mark@codesourcery.com>
1184 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
1185 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
1186 (cp_push_exception_identifier): New macro.
1187 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
1188 (DECL_BASE_DESTRUCTOR_P): Likewise.
1189 (DECL_DELETING_DESTRUCTOR_P): Likewise.
1190 (get_vtbl_decl_for_binfo): Fix formatting.
1191 (in_charge_arg_for_name): New macro.
1192 (maybe_build_cleanup_and_delete): Remove declaration.
1193 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
1194 (in_charge_arg_for_name): New function.
1195 (build_new_method_call): Use it. Handle cloned destructors.
1196 (build_clone): Don't make the base constructor virtual.
1197 Automatically defer generated functions.
1198 (clone_function_decl): Handle destructors, too.
1199 (clone_constructors_and_destructors): Likewise.
1200 (create_vtable_ptr): Don't create a vtable entry for a cloned
1202 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
1203 (initialize_predefined_identifiers): Update appropriately.
1204 (finish_destructor_body): Simplify.
1205 (maybe_build_cleanup_and_delete): Remove.
1206 * except.c (expand_throw): Handle new-ABI destructors.
1207 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
1208 (build_dtor_call): New function.
1209 (build_delete): Use it. Simplify.
1210 * optimize.c (maybe_clone_body): Handle destructors.
1211 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
1213 * exception.cc (cleanup_fn): New typedef.
1214 (CALL_CLEANUP): New macro.
1215 (cp_eh_info): Use them.
1216 (__cp_push_exception): Likewise.
1217 (__cp_pop_exception): Likewise.
1219 2000-04-11 Mark Mitchell <mark@codesourcery.com>
1221 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
1222 (complete_dtor_identifier): New macro.
1223 (CLASSTYPE_FIRST_CONVERSION): Remove.
1224 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
1225 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
1226 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
1227 (CLASSTYPE_CONSTRUCTORS): Likewise.
1228 (CLASSTYPE_DESTRUCTORS): Likewise.
1229 (lang_decl): Add cloned_function.
1230 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
1231 (DECL_BASE_CONSTRUCTOR_P): Likewise.
1232 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
1233 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
1234 (DECL_CLONED_FUNCTION_P): Likewise.
1235 (DECL_CLONED_FUNCTION): Likewise.
1236 (clone_function_decl): Declare.
1237 (maybe_clone_body): Likewise.
1238 * call.c (build_user_type_conversion_1): Call complete object
1239 constructors in the new ABI.
1240 (build_new_method_call): Don't add in-charge parameters under the
1242 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
1243 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
1244 CLASSTYPE_DESTRUCTOR_SLOT.
1245 (build_clone): New function.
1246 (clone_function_decl): Likewise.
1247 (clone_constructors_and_destructors): Likewise.
1248 (check_bases_and_members): Use it.
1249 * decl.c (iniitialize_predefined_identifiers): Initialize
1250 complete_dtor_identifier.
1251 (finish_function): Don't add extra code to a clone.
1252 (lang_mark_tree): Mark cloned_function.
1253 * decl2.c (mark_used): Don't bother trying to instantiate things
1255 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
1256 * method.c (set_mangled_name_for_decl): Don't treat clones as
1258 (synthesize_method): Sythesize cloned functions, not the clones.
1259 * optimize.c (inline_data): Update comment on ret_label.
1260 (remap_block): Don't assume DECL_INITIAL exists.
1261 (copy_body_r): Allow ret_label to be NULL.
1262 (maybe_clone_body): Define.
1263 * pt.c (tsubst_decl): Handle clones.
1264 (instantiate_clone): New function.
1265 (instantiate_template): Use it.
1266 (set_mangled_name_for_template_decl): Don't treat clones as
1268 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
1269 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
1270 * semantics.c (expand_body): Clone function bodies as necessary.
1272 * optimize.c (remap_decl): Avoid sharing structure for arrays
1273 whose size is only known at run-time.
1274 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
1276 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
1277 to has_in_charge_parm_p.
1278 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
1279 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
1280 (DECL_COPY_CONSTRUCTOR_P): New macro.
1281 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
1282 (build_user_type_conversion_1): Likewise.
1283 (convert_like_real): Likewise.
1284 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
1285 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
1286 (copy_args_p): Likewise.
1287 (grok_ctor_properties): Likewise.
1288 (start_function): Likewise.
1289 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
1290 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
1291 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
1292 * method.c (do_build_copy_constructor): Use
1293 DECL_HAS_IN_CHARGE_PARM_P.
1294 (synthesize_method): Likewise.
1295 * pt.c (instantiate_template): Remove goto.
1296 * tree.c (build_cplus_method_type): Remove mention of obstacks in
1299 * cp-tre.h (finish_function): Change prototype.
1300 * decl.c (end_cleanup_fn): Adjust caller.
1301 (finish_function): Take only one parameter.
1302 * decl2.c (finish_objects): Adjust caller.
1303 (finish_static_storage_duration_function): Likewise.
1304 * method.c (emit_thunk): Likewise.
1305 * parse.y: Likewise.
1306 * parse.c: Regenerated.
1307 * pt.c (instantiate_decl): Likewise.
1308 * rtti.c (synthesize_tinfo_fn): Likewise.
1309 * semantics.c (expand_body): Likewise.
1311 * cp-tree.h (copy_decl): New function.
1312 * class.c (finish_struct_1): Use it.
1313 * lex.c (copy_decl): Define it.
1314 * pt.c (tsubst_decl): Likewise.
1315 * tree.c (copy_template_template_parm): Likewise.
1317 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
1318 has_nonpublic_assign_ref.
1319 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
1320 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
1321 * class.c (finish_struct_methods): Don't set
1322 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
1323 (interface_only): Don't declare.
1324 (interface_unknown): Likewise.
1326 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1328 * tree.h (HAVE_TEMPLATES): Remove definition.
1329 * lang-options.h (-fthis-is-variable): Remove documentation.
1331 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
1333 * class.c (instantiate_type): Handle object-relative template-id.
1335 * semantics.c (finish_expr_stmt): Call convert_to_void here.
1336 * decl.c (cplus_expand_expr_stmt): Not here.
1338 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
1339 Initialize exprtype earlier.
1341 * parse.y (fn.def1): Check for defining types in return types.
1343 * decl.c (check_tag_decl): Notice extra fundamental types.
1344 Diagnose empty decls in classes, too.
1346 * decl.c (grokdeclarator): Don't override an anonymous name if no
1347 declarator was given.
1349 * cvt.c (convert_to_void): Call resolve_offset_ref.
1351 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
1353 * decl2.c (decl_namespace): Handle getting a type.
1355 * typeck.c (build_c_cast): Re-enable warning for cast between
1356 pointer and integer of different size.
1358 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
1360 * inc/cxxabi.h (__pointer_type_info): Add restrict and
1362 (__pointer_type_info::__pointer_catch): New virtual function.
1363 (__pointer_to_member_type_info): Derive from
1364 __pointer_type_info. Adjust.
1365 (__pointer_to_member_type_info::__do_catch): Remove.
1366 (__pointer_to_member_type_info::__is_pointer_p): Declare.
1367 (__pointer_to_member_type_info::__pointer_catch): Declare.
1368 * rtti.c (qualifier_flags): Add restrict flag.
1369 (ptmd_initializer): Reorder members.
1370 (create_tinfo_types): Expand comments. Reorder
1371 ptmd_desc_type_node members.
1372 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
1374 (__pointer_type_info::__do_catch): Move specific code into
1375 __pointer_catch. Call it.
1376 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
1377 specific catch checking. Fix void conversion check.
1378 (__pointer_to_member_type_info::__do_catch): Remove.
1379 (__pointer_to_member_type_info::__pointer_catch): Implement.
1381 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1383 * lex.c (init_parse): Remove traces of classof and headof.
1384 * decl2.c (flag_operator_names): Default to 1.
1385 (lang_decode_option): Do not set it for -ansi.
1387 2000-04-09 Mark Mitchell <mark@codesourcery.com>
1389 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
1390 (DECL_MAIN_VARIANT): Remove.
1391 * decl.c (duplicate_decls): Don't set it.
1392 (start_function): Likewise.
1393 (lang_mark_tree): Don't mark it.
1394 * decl2.c (defer_fn): Don't use it.
1395 * lex.c (retrofit_lang_decl): Don't set it.
1396 * pt.c (tsubst_decl): Likewise.
1397 * ptree.c (print_lang_decl): Don't print it.
1398 * typeck.c (mark_addressable): Don't use it.
1400 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
1402 * vec.cc: Include <new> and <exception>.
1403 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
1404 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
1406 (__cxa_vec_delete): Catch dtor exceptions.
1408 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
1410 Prepend __ to implementation defined names.
1411 * inc/typeinfo (type_info): Rename _name to __name.
1412 (type_info::type_info): Rename parameter.
1413 (type_info::operator==, type_info::operator!=,
1414 type_info::before): Likewise.
1415 (type_info::is_pointer_p, type_info::is_function_p,
1416 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
1419 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
1420 (__pointer_type_info::__pointer_type_info): Likewise.
1421 (__pointer_type_info::is_pointer_p,
1422 __pointer_type_info::do_catch): Prepend __. Rename parameters.
1423 (__array_type_info::__array_type_info): Rename parameters.
1424 (__function_type_info::__function_type_info): Likewise.
1425 (__function_type_info::is_function_p): Prepend __.
1426 (__enum_type_info::__enum_type_info): Rename parameters.
1427 (__pointer_to_member_type_info::__pointer_to_member_type_info):
1429 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
1431 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
1432 (__class_type_info::__class_type_info): Rename parameters.
1433 (__class_type_info::sub_kind): Prepend __. Adjust member names.
1434 (__class_type_info::upcast_result,
1435 __class_type_info::dyncast_result): Prepend __. Move definition
1437 (__class_type_info::do_upcast, __class_type_info::do_catch,
1438 __class_type_info::find_public_src,
1439 __class_type_info::do_dyncast,
1440 __class_type_info::do_find_public_src): Prepend __. Rename
1442 (__si_class_type_info::__si_class_type_info): Rename parameters.
1443 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
1444 __si_class_type_info::do_find_public_src): Prepent __. Rename
1446 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
1447 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
1448 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
1450 (__dynamic_cast): Rename parameters.
1451 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
1452 type_info::do_catch, type_info::do_upcast): Prepend __.
1453 (contained_p, public_p, virtual_p, contained_public_p,
1454 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
1455 (__class_type_info::do_catch,
1456 __class_type_info::do_upcast): Prepend __. Adjust.
1457 (__class_type_info::__upcast_result,
1458 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
1460 (__class_type_info::find_public_src): Prepend __. Adjust.
1461 (__class_type_info::do_find_public_src,
1462 __si_class_type_info::do_find_public_src,
1463 __vmi_class_type_info::do_find_public_src): Likewise.
1464 (__class_type_info::do_dyncast,
1465 __si_class_type_info::do_dyncast,
1466 __vmi_class_type_info::do_dyncast): Likewise.
1467 (__class_type_info::do_upcast,
1468 __si_class_type_info::do_upcast,
1469 __vmi_class_type_info::do_upcast): Likewise.
1470 (__dynamic_cast): Adjust.
1471 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
1472 (__function_type_info::is_function_p): Likewise.
1473 (__pointer_type_info::do_catch): Likewise. Adjust.
1474 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
1475 (__throw_type_match_rtti_2): Adjust.
1476 (__is_pointer): Adjust.
1478 2000-04-08 Mark Mitchell <mark@codesourcery.com>
1480 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
1481 (complete_ctor_identifier): New macro.
1482 (special_function_kind): Add sfk_copy_constructor and
1483 sfk_assignment_operator.
1484 (LOOKUP_HAS_IN_CHARGE): Remove.
1485 (cons_up_default_function): Rename to ...
1486 (implicitly_declare_fn): ... this.
1487 * call.c (build_new_method_call): Add in-charge parameters for
1489 * class.c (add_implicitly_declared_members): Change parameter name
1490 from cant_have_assignment to cant_have_const_assignment.
1491 Replace calls to cons_up_default_function to implicitly_declare_fn.
1492 * cvt.c (ocp_convert): Use complete_ctor_identifier.
1493 * decl.c (initialize_predefined_identifiers): Initialize it.
1494 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
1496 * init.c (expand_default_init): Don't calculate the in-charge
1498 (build_new_1): Likewise.
1499 * lex.c (cons_up_default_function): Move to method.c.
1500 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
1501 (implicitly_declare_fn): New function.
1502 * typeck.c (build_static_cast): Use complete_ctor_identifier.
1503 (build_modify_expr): Likewise.
1504 * typeck2.c (build_functional_cast): Likewise.
1506 Under the new ABI, constructors don't return `this'.
1507 * cp-tree.h (warn_reorder): Declare.
1508 (special_function_kind): New enum.
1509 (global_base_init_list): Remove declaration.
1510 (emit_base_init): Don't return a value.
1511 (check_base_init): Don't declare.
1512 (is_aggr_typedef): Likewise.
1513 * decl.c (check_special_function_return_type): New function.
1514 (return_types): Remove.
1515 (grokdeclarator): Use check_special_function_return_type.
1516 (start_function): Don't initialize ctor_label under the new ABI.
1517 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
1518 * init.c (begin_init_stmts): Move to top of file.
1519 (finish_init_stmts): Likewise.
1520 (warn_reorder): Don't declare.
1521 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
1523 (check_base_init): Remove.
1524 (is_aggr_typedef): Likewise.
1525 (build_new_1): Don't use the return value of a constructor.
1526 * semantics.c (setup_vtbl_ptr): Don't use the return value
1528 * typeck.c (check_return_expr): Don't magically convert return
1529 statements into `return this' in constructors under the new ABI.
1531 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
1532 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
1533 (base_ctor_identifier): New macro.
1534 (base_dtor_identifier): Likewise.
1535 (deleting_dtor_identifier): Likewise.
1536 * decl.c: Don't include obstack.h.
1537 (obstack_chunk_alloc): Don't define.
1538 (obstack_chunk_free): Likewise.
1539 (struct predefined_identifier): New type.
1540 (initialize_predefined_identifiers): New function.
1541 (init_decl_processing): Use it.
1542 (debug_temp_inits): Remove.
1543 (start_method): Don't call preserve_data.
1544 (hack_incomplete_structures): Update comment.
1545 * init.c (init_init_processing): Don't initialize
1547 (build_offset_rf): Remove dead code.
1548 (build_delete): Use CLASSTYPE_N_BASECLASSES.
1549 * search.c (init_search_processing): Don't initialize
1552 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1554 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
1555 some sign_compare warnings.
1557 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
1559 Rename abi::__vmi_class_type_info members.
1560 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
1561 base_list, detail_masks members to vmi_flags, vmi_base_count,
1562 vmi_bases and vmi_flags_masks respectively.
1563 (__vmi_class_type_info::vmi_flags_masks): Rename
1564 details_unknown_mask to flags_unknown_mask.
1565 * tinfo.cc (__class_type_info::do_upcast): Adjust.
1566 (__vmi_class_type_info::do_find_public_src): Adjust.
1567 (__vmi_class_type_info::do_dyncast): Adjust.
1568 (__vmi_class_type_info::do_upcast): Adjust.
1570 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
1572 * tinfo.cc (convert_to_base): New function.
1573 (get_vbase_offset): Remove. Move into convert_to_base.
1574 (__vmi_class_type_info::do_find_public_src): Adjust.
1575 (__vmi_class_type_info::do_dyncast): Adjust.
1576 (__vmi_class_type_info::do_upcast): Adjust.
1578 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
1580 * tinfo.cc (operator=): Use __builtin_strcmp.
1581 * tinfo2.cc (before): Likewise.
1583 2000-04-06 Mark Mitchell <mark@codesourcery.com>
1585 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
1586 (DECL_SAVED_INLINE): Rename to ...
1587 (DECL_DEFERRED_FN): ... this.
1588 (in_function_p): Remove declaration.
1589 (mark_inline_for_output): Rename to ...
1590 (defer_fn): ... this.
1591 * decl.c (finish_function): Adjust call to mark_inline_for_output.
1592 (in_function_p): Remove definition.
1593 * decl2.c (saved_inlines): Rename to ...
1594 (deferred_fns): ... this.
1595 (saved_inlines_used): Rename to ...
1596 (deferred_fns_used): ... this.
1597 (mark_inline_for_output): Rename to ...
1598 (defer_fn): ... this.
1599 (finish_file): Adjust accordingly.
1600 (init_decl2): Likewise.
1601 * lex.c (cons_up_default_function): Likewise.
1602 * pt.c (mark_decl_instantiated): Likewise.
1603 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
1605 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
1606 * semantics.c (expand_body): Defer more functions.
1608 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
1611 * Make-lang.in (CXX_LIB2FUNCS): Add it.
1613 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
1614 __cxa_vec_delete): Declare.
1616 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
1618 * rtti.c (dfs_class_hint_mark): New static function.
1619 (dfs_class_hint_unmark): New static function.
1620 (class_hint_flags): Use them.
1622 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
1624 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
1626 2000-04-05 Mark Mitchell <mark@codesourcery.com>
1628 * cp-tree.h (instantiate_decl): Change prototype.
1629 * decl2.c (mark_used): Adjust call.
1630 * optimize.c (inlinable_function_p): Adjust handling of templates.
1631 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
1632 (do_type_instantiation): Likewise.
1633 (instantiate_decl): Defer more templates.
1634 (instantiate_pending_templates): Adjust logic to handle inline
1637 * Makefile.in (GGC_H): New variable. Use it throughout in place
1640 * call.c: Don't include obstack.h. Include ggc.h.
1641 (obstack_chunk_alloc): Don't define.
1642 (obstack_chunk_free): Likewise.
1643 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
1644 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
1645 (pop_switch): Free it.
1647 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
1649 * dump.c (dequeue_and_dump): Don't try to print the bit_position
1650 if we don't have a DECL_FIELD_OFFSET.
1652 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
1654 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
1657 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1659 * cfns.gperf (hash, libc_name_p): Prototype.
1661 * rtti.c (build_dynamic_cast_1): Constification.
1663 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
1665 * semantics.c (deferred_type_access_control): Prototype.
1667 2000-04-04 Mark Mitchell <mark@codesourcery.com>
1669 Correct many new ABI issues regarding vbase and vcall offset
1671 * cp-tree.h (BINFO_VTABLE): Document.
1672 (struct lang_type): Tweak formatting.
1673 (BINFO_PRIMARY_BINFO): Add to documentation.
1674 (CLASSTYPE_VSIZE): Fix typo in comment.
1675 (CLASSTYPE_VBASECLASSES): Update documentation.
1676 (BINFO_VBASE_MARKED): Remove.
1677 (SET_BINFO_VBASE_MARKED): Likewise.
1678 (CLEAR_BINFO_VBASE_MARKED): Likewise.
1679 (BINFO_FIELDS_MARKED): Remove.
1680 (SET_BINFO_FIELDS_MARKED): Likewise.
1681 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
1682 (enum access_kind): New enumeration.
1683 (num_extra_vtbl_entries): Remove declaration.
1684 (size_extra_vtbl_entries): Likewise.
1685 (get_vtbl_decl_for_binfo): New function.
1686 (dfs_vbase_unmark): Remove declaration.
1687 (mark_primary_bases): Likewise.
1688 * class.c (SAME_FN): Remove.
1689 (struct vcall_offset_data_s): Move definition.
1690 (build_vbase_pointer): Use `build', not `build_binary_op', to
1691 access the vbase pointer under the new ABI.
1692 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
1693 (build_primary_vtable): Likewise.
1694 (dfs_mark_primary_bases): Move here from search.c.
1695 (mark_primary_bases): Likewise.
1696 (determine_primary_bases): Under the new ABI, don't make a base
1697 class a primary base just because we don't yet have any virtual
1699 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
1700 (num_vfun_entries): Remove.
1701 (dfs_count_virtuals): Likewise.
1702 (num_extra_vtbl_entries): Likewise.
1703 (size_extra_vtbl_entries): Likewise.
1704 (layout_virtual_bases): Iterate in inheritance graph order under
1706 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
1707 indicate that a vfield is present.
1708 (init_class_processing): Initialize access_public_node, etc., from
1710 (get_vtbl_decl_for_binfo): New function.
1711 (dump_class_hierarchy_r): Likewise.
1712 (dump_class_hierarchy): Use it.
1713 (finish_vtbls): Build the vtbls in inheritance graph order.
1714 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
1715 (initialize_vtable): Use get_vtbl_decl_for_binfo.
1716 (accumulate_vtbl_inits): Add comments explaining why a pre-order
1718 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
1719 where the vptr points, even for primary vtables.
1720 (build_vtbl_initializer): Adjust handling of vbase and vcall
1722 (build_vcall_and_vbase_vtable_entries): New function.
1723 (dfs_build_vbase_offset_vtbl_entries): Remove.
1724 (build_vbase_offset_vtbl_entries): Reimplement.
1725 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
1726 were already handled in a primary base class vtable.
1727 (build_vcall_offset_vtbl_entries): Adjust.
1728 (build_rtti_vtbl_entries): Adjust.
1729 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
1730 * init.c (expand_virtual_init): Simplify.
1731 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
1732 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
1733 * search.c (BINFO_ACCESS): New macro.
1734 (SET_BINFO_ACCESS): Likewise.
1735 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
1736 (access_in_type): Likewise.
1737 (dfs_accessible_p): Likewise.
1738 (protected_accessible_p): Likewise.
1739 (lookup_fnfields_1): Adjust documentation.
1740 (dfs_mark_primary_bases): Move to class.c
1741 (mark_primary_bases): Likewise.
1742 (dfs_vbase_unmark): Remove.
1743 (virtual_context): Use BINFO_FOR_VBASE.
1744 (dfs_get_vbase_types): Simplify.
1745 (dfs_build_inheritance_graph_order): New function.
1746 (get_vbase_types): Use it.
1747 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
1749 * tinfo.cc (get_vbase_offset): New function.
1750 (__vmi_class_type_info::do_find_public_src): Use it.
1751 (__vmi_class_type_info::do_dyncast): Likewise.
1752 (__vmi_class_type_info::do_upcast): Likewise.
1754 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
1756 * lang-specs.h: Pass -fno-show-column to the preprocessor.
1758 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
1760 * rtti.c (class_hint_flags): Rename flags.
1761 (class_initializer): Remove flags.
1762 (synthesize_tinfo_var): Combine offset and flags. Add flags
1763 for __vmi_class_type_info.
1764 (create_tinfo_types): Remove flags from __class_type_info and
1765 __si_class_type_info. Merge flags and offset from
1766 base_class_type_info.
1767 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
1768 (__base_class_info::is_virtual_p): Adjust.
1769 (__base_class_info::is_public_p): Adjust.
1770 (__base_class_info::offset): New accessor.
1771 (__class_type_info::details): Remove member.
1772 (__class_type_info::__class_type_info): Lose details.
1773 (__class_type_info::detail_masks): Remove.
1774 (__si_class_type_info::__si_class_type_info): Lose details.
1775 (__vmi_class_type_info::details): New member.
1776 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
1777 (__vmi_class_type_info::detail_masks): New member.
1778 * tinfo.cc (__class_type_info::do_upcast): Initialize result
1779 with unknown_details_mask.
1780 (__vmi_class_type_info::do_find_public_src): Adjust
1781 (__vmi_class_type_info::do_dyncast): Adjust.
1782 (__vmi_class_type_info::do_upcast): Set result details, if
1784 (__dynamic_cast): Temporarily #if out optimization.
1786 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
1788 * rtti.c (get_tinfo_decl): Mark used.
1789 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
1790 mark as dealt with, if we output it.
1792 2000-03-28 Mark Mitchell <mark@codesourcery.com>
1794 * class.c: Reorganize to put virtual function table initialization
1795 machinery at the end of the file.
1797 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
1799 * class.c (finish_struct): Use bitsize_zero_node.
1800 * pt.c (instantiate_class_template): Likewise.
1802 2000-03-28 Mark Mitchell <mark@codesourcery.com>
1804 Put RTTI entries at negative offsets in new ABI.
1805 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
1806 vbase offset at index -3, not -1.
1807 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
1808 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
1809 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
1810 (build_rtti_vtbl_entries): New function.
1811 (set_rtti_entry): Remove.
1812 (build_primary_vtable): Don't use it.
1813 (build_secondary_vtable): Likewise.
1814 (start_vtable): Remove.
1815 (first_vfun_index): New function.
1816 (set_vindex): Likewise.
1817 (add_virtual_function): Don't call start_vtable. Do call
1819 (set_primary_base): Rename parameter.
1820 (determine_primary_base): Likewise.
1821 (num_vfun_entries): Don't use skip_rtti_stuff.
1822 (num_extra_vtbl_entries): Include RTTI information.
1823 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
1824 (skip_rtti_stuff): Remove.
1825 (dfs_modify_vtables): Don't use it.
1826 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
1827 (layout_nonempty_base_or_field): Update size handling.
1828 (create_vtable_ptr): Tweak.
1829 (layout_class_type): Adjust parameter names.
1830 (finish_struct_1): Simplify.
1831 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
1832 (skip_rtti_stuff): Remove.
1833 (first_vfun_index): New function.
1834 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1835 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
1836 (marked_vtable_pathp): Declare.
1837 (unmarked_vtable_pathp): Likewise.
1838 * error.c (dump_expr): Use first_vfun_index to calculate vtable
1840 * rtti.c (build_headof): Look for RTTI at negative offsets.
1841 (get_tinfo_decl_dynamic): Likewise.
1842 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
1844 (create_pseudo_type_info): Do it here instead. Adjust so that
1845 vptr points at first virtual function.
1846 * search.c (marked_vtable_pathp): Make it global.
1847 (unmarked_vtable_pathp): Likewise.
1848 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1849 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1850 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
1851 (get_pure_virtuals): Likewise.
1852 (expand_upcast_fixups): Likewise.
1853 * tree.c (debug_binfo): Likewise.
1854 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
1857 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1859 * class.c (check_field_decl): Fix typo.
1860 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
1861 (check_methods): Likewise.
1862 (check_field_decls): Likewise.
1863 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
1864 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
1865 Use DECL_RESULT_FLD, not DECL_RESULT.
1866 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
1867 * lex.c (identifier_type): Likewise.
1868 * pt.c (determine_specialization, lookup_template_class): Likewise.
1869 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
1870 (resolve_overloaded_unification, more_specialized): Likewise.
1871 * semantics.c (finish_member_declaration): Likewise.
1872 * typeck.c (build_x_function_call): Likewise.
1874 2000-03-26 Mark Mitchell <mark@codesourcery.com>
1876 * class.c (layout_empty_base): Handle empty bases with non-byte
1878 (build_base_field): Likewise.
1879 (layout_virtual_bases): Likewise.
1881 * class.c (finish_struct_1): Fix typo in this change:
1883 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1885 2000-03-25 Mark Mitchell <mark@codesourcery.com>
1887 * decl.c (grokdeclarator): Count partial specializations when
1888 keeping track of how many template classes have been seen.
1890 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
1892 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1894 * class.c (build_vbase_pointer_fields): layout_field now place_field.
1895 (get_vfield_offset): Use byte_position.
1896 (set_rtti_entry): Set OFFSET to ssizetype zero.
1897 (get_binfo_offset_as_int): Deleted.
1898 (dfs_record_base_offsets): Use tree_low_cst.
1899 (dfs_search_base_offsets): Likewise.
1900 (layout_nonempty_base_or_field): Reflect changes in RLI format
1901 and call byte_position.
1902 (layout_empty_base): Convert offset to ssizetype.
1903 (build_base_field): use rli_size_unit_so_far.
1904 (dfs_propagate_binfo_offsets): Do computation in proper type.
1905 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
1906 (layout_class_type): Reflect changes in RLI names and fields.
1907 (finish_struct_1): Set DECL_FIELD_OFFSET.
1908 * dump.c (dequeue_and_dump): Call bit_position.
1909 * expr.c (cplus_expand_constant): Use byte_position.
1910 * rtti.c (expand_class_desc): Use bitsize_one_node.
1911 * typeck.c (build_component_addr): Use byte_position and don't
1912 special case for zero offset.
1914 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
1916 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
1918 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
1920 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
1923 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1925 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
1927 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
1928 make_typename_type, check_initializer, cp_finish_decl,
1929 xref_tag): Likewise.
1930 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
1931 decl_namespace, arg_assoc_template_arg, arg_assoc,
1932 validate_nonmember_using_decl, do_class_using_decl): Likewise.
1933 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
1934 args_to_string): Likewise.
1935 * friend.c (is_friend): Likewise.
1936 * lex.c (note_got_semicolon, note_list_got_semicolon,
1937 is_global): Likewise.
1938 * method.c (build_overload_nested_name, build_overload_value,
1939 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
1940 * parse.y (typename_sub, typename_sub1): Likewise.
1941 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
1942 process_partial_specialization, convert_template_argument,
1943 template_args_equal, add_pending_template, lookup_template_class,
1944 for_each_template_parm_r, maybe_fold_nontype_arg,
1945 tsubst, instantiate_template, type_unification_real, unify,
1946 instantiate_pending_templates, set_mangled_name_for_template_decl):
1948 * repo.c (repo_get_id, repo_template_used): Likewise.
1949 * search.c (lookup_field_1): Likewise.
1950 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
1951 * xref.c (classname): Likewise.
1953 2000-03-22 Mark Mitchell <mark@codesourcery.com>
1955 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
1956 (CANONICAL_BINFO): New macro.
1957 (BINFO_NEW_VTABLE_MARKED): Use it.
1958 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
1959 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
1960 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
1962 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1963 (build_secondary_vtable): Likewise.
1964 (dfs_finish_vtbls): Likewise.
1965 (dfs_accumulate_vtbl_inits): Likewise.
1966 (accumulate_vtbl_inits): New function.
1967 (finish_vtbls): Make sure that virtual bases come after
1968 non-virtual bases in the vtable group.
1969 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
1970 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1971 * search.c (struct vbase_info): Move definition.
1972 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1973 (unmarked_new_vtable_p): Likewise.
1974 (dfs_mark_vtable_path): Remove.
1975 (dfs_mark_new_vtable): Remove.
1976 (dfs_unmark_new_vtable): Likewise.
1977 (dfs_clear_search_slot): Likewise.
1978 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1979 (dfs_clear_vbase_slots): Likewise.
1980 (init_vbase_pointers): LIkewise.
1982 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
1984 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
1985 SIZETYPE to a non-SIZETYPE.
1987 2000-03-21 Mark Mitchell <mark@codesourcery.com>
1989 * class.c (layout_virtual_bases): Adjust names in conditionally
1992 * class.c (record_base_offsets): New function.
1993 (layout_conflict_p): Likewise.
1994 (layout_nonempty_base_or_field): Use it.
1995 (layout_empty_base): New function.
1996 (build_base_field): Use it.
1997 (build_base_fields): Update comment.
1998 (layout_virtual_bases): Fold in a little code form
1999 layout_basetypes. Use layout_empty_base.
2000 (layout_basetypes): Remove.
2001 (end_of_class): New function.
2002 (layout_class_type): Use it. Adjust.
2004 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
2006 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
2008 (dfs_skip_nonprimary_vbases_markedp): Likewise.
2009 * typeck.c (fntype_p): Remove.
2011 * cp-tree.h (TI_SPEC_INFO): Remove.
2012 (CLASSTYPE_TI_SPEC_INFO): Likewise.
2013 * pt.c (process_partial_specialization): Likewise.
2015 * class.c (build_base_field): Fix thinko in computation of binfo
2018 * tree.c (mark_local_for_remap_p): Mark variables declared in
2019 TARGET_EXPRs as well.
2021 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
2023 * typeck.c (require_complete_type, complete_type,
2024 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
2025 build_array_ref, convert_arguments, pointer_diff,
2026 build_x_unary_op, build_unary_op, build_c_cast,
2027 build_modify_expr): Use COMPLETE_TYPE_P etc.
2028 * call.c (is_complete, convert_like_real,
2029 build_new_method_call): Likewise.
2030 * class.c (build_vbase_pointer_fields, check_bases,
2031 build_base_field, finish_struct_1, pushclass): Likewise.
2032 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
2033 * decl.c (maybe_process_template_type_declaration, pushtag,
2034 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
2035 layout_var_decl, check_initializer, cp_finish_decl,
2036 grokdeclarator, require_complete_types_for_parms,
2037 grok_op_properties, xref_tag, xref_basetypes,
2038 check_function_type): Likewise.
2039 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
2040 * friend.c (do_friend): Likewise.
2041 * init.c (build_offset_ref): Likewise.
2042 * parse.y (structsp): Likewise.
2043 * pt.c (maybe_process_partial_specialization,
2044 tsubst_friend_function, instantiate_class_template, tsubst,
2045 do_type_instantiation, instantiate_pending_templates): Likewise.
2046 * repo.c (repo_get_id): Likewise.
2047 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
2048 synthesize_tinfo_var, emit_support_tinfos): Likewise.
2049 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
2050 * semantics.c (begin_class_definition): Likewise.
2051 * tree.c (build_cplus_method_type): Likewise.
2052 * typeck2.c (digest_init, build_functional_cast,
2053 add_exception_specifier): Likewise.
2054 * parse.h, parse.c: Regenerated.
2056 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
2058 * inc/cxxabi.h: New header file. Define new-abi entry points.
2059 (__pointer_type_info::target): Rename member to ...
2060 (__pointer_type_info::type): ... here.
2061 (__base_class_info::type): Rename member to ...
2062 (__base_class_info::base): ... here.
2063 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
2064 * cp-tree.h (CPTI_ABI): New global tree enumeration.
2065 (abi_node): New global tree node.
2066 * decl.c (abi_node): Document.
2067 (init_decl_processing): Initialize abi_node.
2068 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
2069 (get_vmi_pseudo_type_info): Likewise.
2070 (create_tinfo_types): Likewise.
2071 (emit_support_tinfos): Likewise.
2072 * tinfo.h (cxxabi.h): Include for new-abi.
2073 Move rtti class definitions to new header file.
2074 * tinfo.cc (abi): Use the namespace.
2075 (std): Move new abi rtti classes from here ...
2076 (__cxxabiv1): ... to here.
2077 * tinfo2.cc (cxxabi.h): Include for new-abi.
2078 Move rtti class definitions to new header file.
2079 (std): Move new abi rtti classes from here ...
2080 (__cxxabiv1): ... to here.
2081 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
2084 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
2085 Jason Merrill <jason@casey.cygnus.com>
2087 * method.c (build_overload_int): Use host_integerp.
2089 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2091 * init.c (build_offset_ref): Handle the case of a templated member
2094 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2096 * except.c (expand_exception_blocks): Clear catch_clauses_last.
2098 2000-03-18 Mark Mitchell <mark@codesourcery.com>
2100 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
2101 * class.c (check_bitfield_decl): Turn illegal bitfields into
2103 (dfs_propagate_binfo_offsets): Adjust for new size_binop
2105 (dfs_offset_for_unshared_vbases): Likewise.
2106 * cvt.c (cp_convert_to_pointer): Convert NULL to a
2107 pointer-to-member correctly under the new ABI.
2108 * expr.c (cplus_expand_constant): Don't use cp_convert when
2109 turning an offset into a pointer-to-member.
2110 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
2111 when dereferencing them under the new ABI.
2112 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
2113 of pointers-to-members under the new ABI.
2115 * class.c (check_bitfield_decl): Remove restriction on really long
2117 (layout_class_type): Implement new ABI handling of bitfields
2118 longer than their types.
2120 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2122 * parse.y (extdefs): Call ggc_collect.
2123 * parse.c: Regenerated.
2125 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
2127 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
2128 (note_name_declared_in_class): Use OVL_CURRENT to get at a
2131 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2133 * class.c (build_vbase_path): Use integer_zerop.
2134 (build_vtable_entry): Use tree_low_cst.
2135 (get_vfield_offset): Use bit_position.
2136 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
2138 (check_bitfield_decl): Set DECL_SIZE using convert.
2139 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
2140 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
2142 (finish_struct_1): Use bit_position.
2143 (dump_class_hierarchy): Use tree_low_cst.
2144 * cp-tree.h (min_precision): Add declaration.
2145 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
2146 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
2147 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
2148 * expr.c (cplus_expand_constant): Use bit_position.
2149 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
2150 * rtti.c (get_base_offset): Use bit_position.
2151 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
2152 host_integerp, and tree_low_cst.
2153 (pointer_int_sum): Use integer_zerop.
2154 (build_component_addr): Use bit_position.
2156 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
2158 * typeck.c (require_complete_type): Don't assume size_zero_node.
2159 (complete_type_or_else): Likewise.
2161 2000-03-16 Steven Grady <grady@digitaldeck.com>
2162 Jason Merrill <jason@casey.cygnus.com>
2164 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
2166 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
2168 * decl2.c (grokfield): Bail out if type is error_mark_node.
2170 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2172 * tinfo2.cc (__ptr_to_member_data): Rename to ...
2173 (__pointer_to_member_data): ... here. Adjust.
2174 * rtti.c (create_tinfo_types): Adjust.
2176 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2178 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
2179 * decl.c (ref_desc_type_node): Undocument.
2180 * rtti.c (ptr_ref_initializer): Rename to ...
2181 (ptr_initializer): ... here. Adjust comments.
2182 (ptmd_initializer): Fix comment thinko.
2183 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
2184 (create_tinfo_types): Remove ref_desc_type_node init.
2185 * tinfo2.cc (__reference_type_info): Remove.
2187 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
2189 * decl.c (cp_finish_decl): Remove obsolete comment.
2191 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
2193 2000-03-14 Mark Mitchell <mark@codesourcery.com>
2195 * cp-tree.h: Tweak documentation.
2196 * class.c (build_vbase_pointer_fields): Layout the fields, too.
2197 (avoid_overlap): Remove.
2198 (get_binfo_offset_as_int): New function.
2199 (dfs_serach_base_offsets): Likewise.
2200 (layout_nonempty_base_or_field): Likewise.
2201 (build_base_field): Layout fields here. Avoid placing two objects
2202 of the same type at the same address, under the new ABI.
2203 (build_base_fields): Adjust accordingly.
2204 (create_vtable_ptr): Return the new field, but don't attach it to
2206 (remove_base_field): Remove.
2207 (remove_base_fields): Remove.
2208 (layout_basetypes): Adjust accordingly.
2209 (layout_class_type): Call layout_field for each field, rather than
2210 just making a wholesale call to layout_type.
2212 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
2214 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
2216 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
2218 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
2220 * except.c (dtor_nothrow): New fn.
2221 (do_pop_exception): Use it. Take type parm.
2222 (push_eh_cleanup): Take type parm.
2223 (expand_start_catch_block): Pass it.
2224 (build_eh_type_type_ref): Accept null type.
2226 2000-03-12 Mark Mitchell <mark@codesourcery.com>
2228 * cp-tree.h (revert_static_member_fn): Change prototype.
2229 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
2230 (grok_op_properties): Likewise.
2231 (start_function): Likewise.
2232 (revert_static_member_fn): Simplify.
2233 * pt.c (check_explicit_specialization): Adjust call to
2234 revert_static_member_fn.
2236 2000-03-11 Mark Mitchell <mark@codesourcery.com>
2238 * cp-tree.h (scope_kind): New type.
2239 (tmpl_spec_kind): Likewise.
2240 (declare_pseudo_global_level): Remove.
2241 (pseudo_global_level_p): Rename to template_parm_scope_p.
2242 (pushlevel): Remove declaration.
2243 (begin_scope): New function.
2244 (finish_scope): Likewise.
2245 (current_tmpl_spec_kind): Likewise.
2246 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
2247 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
2248 Add template_spec_p.
2249 (toplevel_bindings_p): Adjust.
2250 (declare_pseudo_global_level): Remove.
2251 (pseudo_global_level_p): Rename to template_parm_scope_p.
2252 (current_tmpl_spec_kind): New function.
2253 (begin_scope): Likewise.
2254 (finish_scope): Likewise.
2255 (maybe_push_to_top_level): Adjust.
2256 (maybe_process_template_type_declaration): Likewise.
2257 (pushtag): Likewise.
2258 (pushdecl_nonclass_level): Likewise.
2259 (lookup_tag): Likewise.
2260 (grokfndecl): Handle member template specializations. Share
2261 constructor and non-constructor code.
2262 * decl2.c (check_classfn): Handle member template specializations.
2263 * pt.c (begin_template_parm_list): Use begin_scope.
2264 (begin_specialization): Likewise.
2265 (end_specialization): Likewise.
2266 (check_explicit_specialization): Use current_tmpl_spec_kind.
2267 Handle member template specializations.
2268 (end_template_decl): Use finish_scope. Remove call to
2270 (push_template_decl_real): Remove bogus error message.
2271 (tsubst_decl): Fix typo in code contained in comment.
2272 (instantiate_template): Handle member template specializations.
2273 (most_general_template): Likewise.
2275 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
2277 * lex.c (whitespace_cr): Compress consecutive calls to warning().
2278 (do_identifier): Ditto for error().
2280 * pt.c (convert_nontype_argument): Ditto for cp_error().
2281 (convert_template_argument): Ditto for cp_pedwarn().
2283 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
2285 * exception.cc (__check_null_eh_spec): New fn.
2286 * except.c (expand_end_eh_spec): Call it if the spec is throw().
2288 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2290 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
2291 * except.c (expand_end_eh_spec): Add the return type.
2292 * rtti.c (throw_bad_cast): Add the parmtypes.
2293 (throw_bad_typeid): Likewise.
2295 * semantics.c (expand_stmt): Only leave out rtl for unused
2296 artificials, and set DECL_IGNORED_P on them as well.
2297 * decl.c (wrapup_globals_for_namespace): Likewise.
2299 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
2301 * decl.c (maybe_commonize_var): Skip all artificial decls.
2302 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
2304 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
2306 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
2307 * cp-tree.h: Declare flag_enforce_eh_specs.
2308 * decl.c (store_parm_decls, finish_function): Check it.
2310 C library functions don't throw.
2311 * Makefile.in (cfns.h): New target.
2312 (except.o): Depend on it.
2313 * Make-lang.in (cc1plus): Depend on cfns.gperf.
2314 * cfns.gperf: New file.
2315 * cfns.h: Generated.
2316 * except.c: Include it.
2317 (nothrow_libfn_p): New fn.
2318 * decl.c (grokfndecl): Use it.
2319 * cp-tree.h: Declare it.
2321 * decl.c (push_overloaded_decl_1, auto_function,
2322 define_function): Lose.
2323 (build_library_fn_1): New static fn.
2324 (builtin_function): Use it.
2325 (get_atexit_node): Use build_library_fn_ptr.
2326 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
2327 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
2328 push_void_library_fn, push_throw_library_fn): New fns.
2329 * cp-tree.h: Declare them.
2330 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
2331 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
2332 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
2333 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
2334 * rtti.c (build_runtime_decl): Lose.
2335 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
2336 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
2337 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
2339 * call.c (build_call): Remove result_type parm.
2340 Call mark_used on unused artificial fns.
2341 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
2343 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
2345 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
2347 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
2348 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
2349 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
2350 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
2351 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
2352 expand_generic_desc): Likewise.
2354 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2356 * exception.cc (__cp_pop_exception): Cleanup the original object.
2358 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2360 * decl.c (grok_op_properties): Merge conversion to void warning
2361 with other silly op warnings.
2363 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
2365 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
2366 array CONSTRUCTOR elements. Don't use expr_tree_cons.
2368 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2370 * decl.c (cp_make_fname_decl): New function.
2371 (wrapup_globals_for_namespace): Don't emit unused static vars.
2372 (init_decl_processing): Remove comment about use of
2373 array_domain_type. Set make_fname_decl.
2374 (cp_finish_decl): Remove __FUNCTION__ nadgering.
2375 * semantics.c (begin_compound_stmt): Remove
2376 current_function_name_declared flagging.
2377 (expand_stmt): Don't emit unused local statics.
2378 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
2381 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
2383 * typeck.c (convert_for_assignment): Don't look at array
2385 * call.c (convert_like_real): Likewise.
2387 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
2389 Add initial support for '\uNNNN' specifier.
2390 * lex.c (read_ucs): New fn.
2391 (readescape, skip_white_space): Call it.
2392 (is_extended_char, is_extended_char_1): New fns.
2393 (utf8_extend_token): New fn, #if 0'd out.
2394 (real_yylex): Treat extended chars like letters.
2396 * search.c (note_debug_info_needed): Walk the bases even if we
2397 weren't deferring the type itself.
2399 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2401 * decl2.c (finish_objects): Constify a char*.
2403 * method.c (emit_thunk): Likewise.
2405 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
2407 * typeck.c (dubious_conversion_warnings): Look through
2410 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2412 * class.c (dfs_modify_vtables): I is now unsigned.
2413 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
2414 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
2415 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
2416 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
2417 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
2418 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
2419 Call integer_all_onesp.
2420 * typeck2.c (process_init_constructor): Use compare_tree_int.
2422 * lang-specs.h (as): Don't call if -syntax-only.
2424 2000-03-06 Mark Mitchell <mark@codesourcery.com>
2426 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
2427 RTL_EXPR_HAS_NO_SCOPE after all.
2429 2000-03-05 Mark Mitchell <mark@codesourcery.com>
2431 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
2432 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
2433 RTL_EXPR_HAS_NO_SCOPE.
2435 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
2438 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
2440 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
2442 * call.c (convert_like): Macrofy.
2443 (convert_like_with_context): New macro.
2444 (convert_like_real): Renamed from convert_like. Add calling
2445 context parameters, for diagnostics. Add recursive flag. Call
2446 dubious_conversion_warnings for outer conversion.
2447 (build_user_type_conversion): Use convert_like_with_context.
2448 (build_over_call): Likewise. Don't warn about dubious
2449 conversions here. Adjust convert_default_arg calls.
2450 (convert_default_arg): Add context parameters for diagnostics.
2451 Pass throught to convert_like_with_context.
2452 * cp-tree.h (convert_default_arg): Add context parameters.
2453 (dubious_conversion_warnings): Prototype new function.
2454 * typeck.c (convert_arguments): Adjust convert_default_arg call.
2455 (dubious_conversion_warnings): New function, broken
2456 out of convert_for_assignment.
2457 (convert_for_assignment): Adjust.
2459 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
2461 * decl2.c (key_method): Break out from...
2462 (import_export_vtable, import_export_class): ...here.
2464 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
2465 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
2467 * search.c (note_debug_info_needed, dfs_debug_mark,
2468 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
2469 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
2471 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
2473 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
2476 2000-03-02 Mark Mitchell <mark@codesourcery.com>
2478 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
2479 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
2480 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
2481 (lang_type): Split gets_new into has_new and has_array_new.
2482 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2483 (TYPE_GETS_NEW): Split into ...
2484 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
2485 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
2486 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
2487 (build_op_new_call): Don't declare.
2488 (build_new_1): Likewise.
2489 * call.c (build_op_new_call): Remove.
2490 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2491 instead of TYPE_NEEDS_DESTRUCTOR.
2492 (finish_struct_bits): Likewise.
2493 (add_implicitly_declared_members): Likewise.
2494 (check_field_decl): Likewise.
2495 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
2496 correctly under the new ABI.
2497 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
2498 instead of TYPE_NEEDS_DESTRUCTOR.
2499 (initialize_local_var): Likewise.
2500 (destroy_local_var): Likewise.
2501 (cp_finish_decl): Likewise.
2502 (register_dtor_fn): Likewise.
2503 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
2504 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
2505 TYPE_VEC_DELETE_TAKES_SIZE here.
2506 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
2507 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
2508 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2509 (finish_destructor_body): Likewise.
2510 (maybe_build_cleanup_1): Likewise.
2511 * decl2.c (do_static_destruction): Likewise.
2512 * init.c (build_new_1): Make it static.
2513 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2514 (expand_cleanup_for_base): Likewise.
2515 (get_cookie_size): New function.
2516 (build_new_1): Handle array-new cookies correctly under the new
2518 (build_vec_delete_1): Likewise.
2519 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2520 (build_delete): Likewise.
2521 (build_vec_delete): Handle array-new cookies correctly under the new
2523 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2524 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
2525 TYPE_HAS_ARRAY_NEW_OPERATOR.
2526 * ptree.c (print_lang_type): Check them.
2527 * search.c (context_for_name_lookup): Fix typo in comment.
2528 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
2529 * tree.c (break_out_cleanups): Likewise.
2530 (build_cplus_array_test_1): Likewise.
2531 (cp_build_qualified_type_real): Likewise.
2532 * typeck.c (complete_type): Likewise.
2534 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
2535 the command-line, not the end.
2537 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
2539 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
2541 2000-03-02 Tom Tromey <tromey@cygnus.com>
2543 * cp-tree.h (build_java_class_ref): Declare.
2544 * init.c (build_java_class_ref): No longer static.
2545 * except.c (expand_throw): Generate a Java-style `throw' if the
2546 thrown object is a "Java" object.
2547 (initialize_handler_parm): Generate a Java-style lookup of
2548 exception info if the caught object is a "Java" object.
2549 (catch_language, catch_language_init): New globals.
2550 (decl_is_java_type): New function.
2551 (expand_start_catch_block): Don't call push_eh_info() or
2552 push_eh_cleanup() when handling a Java-style "catch". Pass Java
2553 class reference to build_catch_block.
2555 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2557 * typeck.c (comptypes): Treat sizetype like its language equivalent.
2559 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
2561 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
2562 to merge reference/pointer code and fix incorrect warnings.
2564 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
2566 * search.c (protected_accessible_p): Use context_for_name_lookup.
2568 * init.c (construct_virtual_bases): Fix thinko.
2569 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
2571 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
2573 * decl.c (current_function_decl): Move to toplev.c.
2575 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
2577 * pt.c (fn_type_unification): Unify return type, whenever
2579 (get_bindings_real): Only pass return type when necessary.
2580 Remove explicit return type check.
2581 * class.c (resolve_address_of_overloaded_function): Pass desired
2582 return type to fn_type_unification.
2584 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2586 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
2588 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
2590 * rtti.c (expand_class_desc): Likewise.
2591 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
2592 (THUNK_VCALL_OFFSET): Likewise.
2593 (THUNK_DELTA): Reflect changes in ../tree.h.
2595 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
2597 * search.c (protected_accessible_p): Also allow the access if
2598 the member is public in DERIVED. Lose TYPE parm.
2599 (friend_accessible_p): Lose TYPE parm.
2600 (accessible_p): Adjust.
2602 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2604 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
2605 on things that are not sizes; ssize_binop deleted.
2606 Call size_diffop when appropriate.
2607 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2608 (build_primary_vtable, build_secondary_vtable): Likewise.
2609 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
2610 Variable I is HOST_WIDE_INT.
2611 (get_vfield_offset): Pass proper types to size_binop.
2612 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
2613 (finish_struct_1): Likewise.
2614 (skip_rtti_stuff): Arg N is now pointer to signed.
2615 (layout_class_type): Use size_zero_node.
2616 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
2617 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
2618 * decl.c (complete_arry_type): Pass proper types to size_binop.
2619 (xref_basetypes): BINFO_OFFSET is sizetype.
2620 * error.c (dump_expr): Don't use size_binop non-sizes.
2621 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
2622 * init.c (construct_virtual_bases): Fix type error.
2623 (build_vec_delete_1): Pass proper type to size_binop and don't
2625 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
2626 * rtti.c (get_base_offset): Pass proper type to size_binop.
2627 * search.c (dfs_find_vbases): Fix type error.
2628 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
2629 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
2630 * tree.c (debug_binfo): Variable N is signed.
2631 Use HOST_WIDE_INT_PRINT_DEC.
2632 * typeck.c (comptypes): sizetype is same as equivalent integer type.
2633 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
2634 size_one_node and size_zero_node.
2635 (c_alignof): Use size_one_node.
2636 (build_component_addr): Pass proper types to size_binop.
2637 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
2639 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
2641 Implement class scope using-declarations for functions.
2642 * class.c (handle_using_decl): Call add_method for used functions.
2643 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
2644 (add_method): Used functions are hidden by local functions.
2645 (check_bases_and_members): Handle using-decls before finalizing
2646 CLASSTYPE_METHOD_VEC.
2647 * call.c (add_function_candidate): Add ctype parm; if non-zero,
2648 override the type of 'this' accordingly.
2649 (add_template_candidate, add_template_candidate_real): Add ctype parm.
2650 (convert_class_to_reference, build_user_type_conversion_1,
2651 build_new_function_call, build_object_call, build_new_op,
2652 build_new_method_call): Pass ctype parm.
2654 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
2656 * call.c (convert_class_to_reference, build_user_type_conversion_1,
2657 build_new_function_call, build_object_call, build_new_op,
2658 build_new_method_call, build_op_delete_call): Don't get basetype_path
2660 * typeck.c (build_component_ref): Likewise.
2661 * init.c (build_offset_ref): Likewise.
2662 (resolve_offset_ref): Don't call enforce_access.
2663 Call build_scoped_ref.
2664 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
2665 would cause an error or if -pedantic.
2666 * class.c (alter_access): Lose binfo parm.
2668 2000-02-26 Mark Mitchell <mark@codesourcery.com>
2670 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
2673 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
2675 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
2676 pseudo_type_info creation into the std namespace
2678 2000-02-26 Mark Mitchell <mark@codesourcery.com>
2680 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
2681 (import_export_class): Remove declaration.
2682 * decl2.c (import_export_class): Make it static.
2683 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
2684 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
2685 EXPR_WITH_FILE_LOCATION.
2686 * lex.c (check_newline): Tweak filename/lineno setting.
2687 * semantics.c (begin_while_stmt): Fix typo in comment.
2689 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2691 * lang-options.h (-fmessage-length=): Add missing option.
2693 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
2695 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
2697 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
2699 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
2701 * optimize.c (expand_call_inline): Emit the return label before
2702 evaluating the return value.
2704 2000-02-24 Mark Mitchell <mark@codesourcery.com>
2706 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
2707 than duplicating functionality here.
2708 * optimize.c: Include input.h.
2709 (expand_call_inline): Use push_srcloc and pop_srcloc.
2710 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
2711 * parse.c: Regenerated.
2712 * Makefile.in (lex.o): Depend on input.h.
2713 (optimize.o): Likewise.
2715 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
2717 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
2718 function type, rather than ICE.
2720 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
2722 * decl.c (grokdeclarator): Call decl_type_access_control.
2723 * parse.y (parse_end_decl): Don't call decl_type_access_control if
2726 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
2728 * decl.c (decls_match): Remove obsolete static member nadgering.
2730 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2732 * decl.c (grokdeclarator): Change ANSI to ISO.
2733 * lex.c (consume_string, readescape, do_identifier): Likewise.
2734 (parse_float, real_yylex): Likewise.
2735 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
2736 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
2737 new_type_id, maybe_label_decls, simple_stmt,
2738 for.init.statement): Likewise.
2739 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
2740 * semantics.c (finish_named_return_value): Likewise.
2741 * parse.c: Regenerate.
2743 2000-02-21 Mark Mitchell <mark@codesourcery.com>
2745 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
2746 (CPTI_CLASS_STAR_TYPE): Remove.
2747 (vtable_index_type): Likewise.
2748 (class_star_type_node): Remove.
2749 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
2750 (build_binary_op_nodefault): Remove.
2751 * call.c (build_new_op): Use build_binary_op instead of
2752 build_binary_op_nodefault.
2753 * decl.c (init_decl_processing): Remove class_star_type_node
2754 initialization. Make delta_type_node ptrdiff_type_node under the
2755 new ABI. Initialize vtable_index_type.
2756 (build_ptrmemfunc_type): Build different structures for the new
2758 (build_enumerator): Use build_binary_op instead of
2759 build_binary_op_nodefault.
2760 * method.c (build_overload_value): Mangle pointers-to-members
2761 appropriately under the new ABI.
2762 * typeck.c (build_array_ref): Use build_binary_op instead of
2763 build_binary_op_nodefault.
2764 (get_member_function_from_ptrfunc): Adjust for the new ABI.
2765 (build_binary_op_nodefault): Rename to ...
2766 (build_binary_op): ... this. Remove old version. Adjust for
2767 pointer-to-member comparisons under the new ABI.
2768 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
2769 (build_ptrmemfunc): Adjust for the new ABI.
2770 (expand_ptrmemfunc_cst): Likewise.
2771 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
2772 (pfn_from_ptrmemfunc): Adjust for the new ABI.
2774 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
2776 * call.c (build_object_call): Compress consecutive calls to
2778 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
2779 (build_op_delete_call): Adjust message formatting.
2781 * class.c (check_bases): Compress consecutive calls to
2783 (finish_struct_anon): Say 'ISO C++'.
2785 * decl.c (start_decl): Same here.
2786 (grok_reference_init): Likewise.
2787 (grokfndecl): Correct message formatting.
2788 (grokfndecl): Improve diagnostic.
2789 (check_static_variable_definition): Likewise. Say 'ISO C++'
2790 (compute_array_index_type): Say 'ISO C++'
2791 (create_array_type_for_decl): Compress consecutive calls to
2793 (grokdeclarator): Say 'ISO C++'
2794 (grok_op_properties): Likewise.
2796 * decl2.c (delete_sanity): Clairify diagnostic.
2797 (check_member_template): Same here.
2798 (grok_function_init): Use consistent terminology.
2800 * expr.c (do_case): Say 'ISO C++'
2802 * friend.c (do_friend): Compress consecutive calls to warning.
2804 2000-02-20 Mark Mitchell <mark@codesourcery.com>
2806 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
2807 * class.c (build_secondary_vtable): Reorganize. Don't create a
2808 new vtable under the new ABI.
2809 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
2811 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
2812 the initializing elements.
2813 (initialize_vtable): New function.
2814 (dfs_finish_vtbls): Use it.
2815 (dfs_accumulate_vtbl_inits): New function.
2816 (finish_vtbls): Merge primary and secondary vtables under the new
2818 (finish_struct_1): Remove redundant call to layout_vtable_decl.
2819 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
2822 * class.c (build_vtable): New function, split out from ...
2823 (get_vtable_decl): ... here, and ...
2824 (build_secondary_vtable): ... here.
2826 * pt.c (tsubst_decl): Fix formatting.
2828 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2830 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
2831 (avoid_overlap, build_base_field): Likewise.
2832 (build_base_field, build_base_fields, is_empty_class):
2833 Test DECL_SIZE with integer_zero.
2834 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
2835 * cp-tree.h (struct lang_type): New field size_unit.
2836 (CLASSTYPE_SIZE_UNIT): New macro.
2837 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
2838 (cp_finish_decl): Delete -Wlarger-than processing.
2839 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
2840 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
2841 * tree.c (make_binfo): binfo vector is one entry longer.
2842 (walk_tree): Walk DECL_SIZE_UNIT.
2844 2000-02-19 Mark Mitchell <mark@codesourcery.com>
2846 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
2848 (build_vtable_entry): Don't assume all vtable entries are
2850 (build_vtbl_initializer): Adjust accordingly.
2851 (get_vtable_decl): Fix formatting.
2853 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
2855 * semantics.c (deferred_type_access_control): Walk the entire
2857 (save_type_access_control): Rename from
2858 initial_deferred_type_access_control. Just remember the value.
2859 (decl_type_access_control): New fn.
2860 (begin_function_definition): Use deferred_type_access_control, after
2861 we've started the function. Set type_lookups to error_mark_node.
2862 * parse.y (frob_specs, fn.def1): Adjust.
2863 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
2864 (parse_end_decl, parse_bitfield0, parse_method): New fns.
2865 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
2866 (after_type_component_declarator0): Likewise.
2867 (after_type_component_declarator): Likewise.
2868 (notype_component_declarator): Likewise.
2869 * cp-tree.h: Adjust.
2871 * decl.c (redeclaration_error_message): Allow redeclaration of
2872 namespace-scope decls.
2874 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
2876 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
2878 2000-02-17 Mark Mitchell <mark@codesourcery.com>
2880 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
2881 * decl2.c (grokclassfn): Likewise.
2883 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
2885 * decl2.c (lang_decode_option): Don't set default message length
2887 * lex.c (lang_init_options): Set it here.
2889 2000-02-16 Mark Mitchell <mark@codesourcery.com>
2891 Make DECL_CONTEXT mean the class in which a member function was
2892 declared, even for a virtual function.
2893 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
2894 (DECL_FRIEND_CONTEXT): New macro.
2895 (DECL_REAL_CONTEXT): Remove.
2896 (SET_DECL_FRIEND_CONTEXT): Likewise.
2897 (DECL_VIRTUAL_CONTEXT): Adjust.
2898 (DECL_CLASS_SCOPE_P): Use TYPE_P.
2899 (add_friends): Remove.
2900 (hack_decl_function_context): Likewise.
2901 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
2903 (build_over_call): Fix indentation. Use DECL_CONTEXT
2904 instead of DECL_CLASS_CONTEXT.
2905 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
2906 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2907 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2908 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
2909 (build_base_field): Likewise.
2910 (finish_struct_1): Likewise.
2911 (build_self_reference): Likewise.
2912 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
2914 (pushtag): Use decl_function_context, not
2915 hack_decl_function_context.
2916 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2917 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
2918 (pushdecl): Remove bogus code.
2919 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
2920 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2921 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2922 Use decl_function_context, nothack_decl_function_context.
2923 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
2924 (grokdeclarator): Likewise. Use decl_function_context, not
2925 hack_decl_function_context.
2926 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
2927 (start_function): Use DECL_FRIEND_CONTEXT, not
2928 DECL_CLASS_CONTEXT. Use decl_function_context, not
2929 hack_decl_function_context.
2930 (finish_function): Use decl_function_context, not
2931 hack_decl_function_context.
2932 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
2934 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
2935 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
2936 (grokfield): Likewise.
2937 (finish_builtin_type): Likewise.
2938 (finish_vtable_vardec): Use decl_function_context, not
2939 hack_decl_function_context.
2940 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2941 (start_static_initialization_or_destruction): Likewise.
2942 (finish_static_initialization_or_destruction): Likewise.
2943 (mark_used): Adjust logic for deciding when to synthesize methods.
2944 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
2946 * error.c (dump_function_decl): Use DECL_CONTEXT, not
2948 * friend.c (is_friend): Likewise.
2949 (add_friends): Remove.
2950 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
2951 * lex.c (begin_definition_of_inclass_inline): Use
2952 decl_function_context, not hack_decl_function_context.
2953 (process_next_inline): Likewise.
2954 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2955 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
2956 DECL_CLASSS_CONTEXT.
2957 (hack_identifier): Likewise.
2958 (synthesize_method): Use decl_function_context, not
2959 hack_decl_function_context.
2960 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
2962 (is_member_template): Use decl_function_context, not
2963 hack_decl_function_context. Use DECL_CONTEXT, not
2965 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
2967 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
2969 (push_template_decl_real): Likewise.
2970 (instantiate_class_template): Don't call add_friends.
2971 (tsubst_default_argument): Use DECL_CONTEXT, not
2973 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2974 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2975 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
2977 * repo.c (repo_inline_used): Likewise.
2978 * search.c (current_scope): Adjust for new _CONTEXT macros.
2979 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
2981 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2982 (lookup_fnfields_here):Likewise.
2983 (check_final_overrider): Likewise.
2984 (init_vbase_pointers): Likewise.
2985 (virtual_context): Likewise.
2986 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
2987 (expand_body): Use decl_function_context, not
2988 hack_decl_function_context.
2989 * tree.c (hack_decl_function_context): Remove.
2990 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
2992 * typeck2.c (error_not_base_type): Likewise.
2994 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
2996 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
2998 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3000 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
3002 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
3004 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
3006 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
3008 * decl2.c (lang_decode_option): Enable automatic line wrapping.
3010 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
3012 * parse.y (frob_specs): Split out...
3013 (parse_decl): From here.
3014 (fn.def2): Call initial_deferred_type_access_control.
3015 (after_type_component_declarator0): Call frob_specs.
3016 (notype_component_declarator0): Likewise.
3017 * search.c (friend_accessible_p): Nested classes are friends of their
3020 2000-02-10 Mark Mitchell <mark@codesourcery.com>
3022 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
3023 used to create an implicit temporary.
3025 * class.c (dfs_modify_vtables): Tweak calculation of functions to
3028 2000-02-08 Nathan Sidwell <nathan@acm.org>
3030 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
3031 strip array element qualifiers too.
3033 2000-02-07 Mark Mitchell <mark@codesourcery.com>
3035 * decl.c (store_parm_decls): Don't build cleanups for parameters
3036 while processing_template_decl.
3038 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
3040 * cp-tree.h (struct saved_scope): Add incomplete field.
3041 (namespace_scope_incomplete): New macro.
3042 * decl.c (pushdecl): Use it.
3043 (hack_incomplete_structures): Use it. See through artificial
3045 (mark_saved_scope): Mark it.
3047 Implement access control for nested types.
3048 * search.c (type_access_control): New fn.
3049 (accessible_p): Now we do perform access control for types.
3050 * semantics.c (deferred_type_access_control): New fn.
3051 (initial_deferred_type_access_control): New fn.
3052 (begin_function_definition): Call it. Add lookups parm.
3053 * decl.c (struct binding_level): Add this_class field.
3054 (pushlevel_class): Set it.
3055 (mark_binding_level): Mark it.
3056 (lookup_name_real): Use it. Call type_access_control.
3057 (mark_saved_scope): Mark lookups field.
3058 * cp-tree.h (flagged_type_tree): Add lookups field.
3059 (struct saved_scope): Add lookups field.
3060 (type_lookups): New macro.
3061 * parse.y (declmods): Now <ftype>.
3062 (parse_decl): Add lookups parm. Call
3063 initial_deferred_type_access_control.
3064 (lang_extdef): Clear type_lookups.
3065 (typed_declspecs, declmods, typespec): Set lookups field.
3066 (initdcl): Call deferred_type_access_control.
3067 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
3068 component_decl_1, named_parm): Adjust.
3069 * friend.c (is_friend): Nested classes are friends of their
3072 * class.c (currently_open_derived_class): New fn.
3073 * method.c (hack_identifier): Use it.
3075 * lex.c (do_identifier): Remove obsolete code.
3077 * parse.y (typed_typespecs): Propagate new_type_flag properly.
3079 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
3081 * tinfo.h: Remove apostrophes from C++ comment (xgettext
3082 thinks this file is plain C).
3084 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3086 * Makefile.in (call.o): Depend on $(EXPR_H).
3088 * call.c: Include "expr.h".
3090 * class.c (dump_class_hierarchy): Add prototype.
3092 * search.c (dfs_get_pure_virtuals): Likewise.
3094 2000-02-1 Ulrich Drepper <drepper@redhat.com>
3096 * parse.y (simple_stmt): Allow :: token in asm parameter list.
3099 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
3101 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
3102 Store it in DECL_FCONTEXT.
3103 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
3105 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
3107 * tinfo.h (old abi): #include "tconfig.h".
3108 * tinfo.cc (convert_to_base): Move into old abi section.
3110 2000-01-31 Mark Mitchell <mark@codesourcery.com>
3112 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
3113 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
3114 (BINFO_PRIMARY_BINFO): New macro.
3115 (BF_DELTA): Rename to ...
3116 (BV_DELTA): ... this.
3117 (BF_VCALL_INDEX): Rename to ...
3118 (BV_VCALL_INDEX): ... this.
3119 (BF_FN): Rename to ...
3121 * class.c (build_vbase_path): Adjust for changes to reverse_path.
3122 (set_rtti_entry): Rename BF_ macros to BV_ variants.
3123 (modify_vtable_entry): Simplify.
3124 (add_virtual_function): Rename BF_ macros to BV_ variants.
3125 (build_vtable_initializer): Likewise.
3126 (get_class_offset_1): Remove.
3127 (dfs_get_class_offset): Likewise.
3128 (get_class_offset): Likewise.
3129 (dfs_find_final_overrider): New function.
3130 (find_final_overrider): Likewise.
3131 (modify_one_vtable): Remove.
3132 (dfs_find_base): New function.
3133 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
3134 find_final_overrider.
3135 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
3137 (dfs_fixup_vtable_deltas): Remove.
3138 (override_one_vtable): Remove.
3139 (merge_overrides): Likewise.
3140 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
3141 unreal chilren of virtual bases.
3142 (finish_struct_1): Don't use merge_overrides. Don't use
3143 dfs_fixup_vtable_deltas.
3144 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
3147 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
3148 Jason Merrill <jason@yorick.cygnus.com>
3150 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
3152 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
3154 * exception.cc (__throw_bad_typeid): Add missing std::.
3156 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3158 * cp-tree.h (make_thunk): PROTO -> PARAMS.
3160 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
3162 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
3164 Runtime support for new-abi rtti.
3165 * inc/typeinfo (type_info::operator!=): Define in class.
3166 (type_info::before, type_info::name, type_info::operator==,
3167 type_info::operator!=): Define new ABI implementations.
3168 (type_info::is_pointer_p, type_info::is_function_p): Declare
3169 new virtual functions.
3170 (type_info::do_catch, type_info::do_upcast): Likewise.
3172 * tinfo.h (__base_class_info): Define new class.
3173 (__class_type_info): Likewise.
3174 (__si_class_type_info): Likewise.
3175 (__vmi_class_type_info): Likewise.
3176 (__dynamic_cast): Prototype.
3178 * tinfo.cc: Conditionalize old and new rtti mechanisms.
3179 (type_info::is_pointer_p): Define new function.
3180 (type_info::is_function_p): Likewise.
3181 (type_info::do_catch): Likewise.
3182 (type_info::do_upcast): Likewise.
3183 (vtable_prefix): New structure for vtable access.
3184 (adjust_pointer): Define new template function.
3185 (contained_p, public_p, virtual_p, contained_public_p,
3186 contained_nonpublic_p, contained_nonvirtual_p): Define new
3188 (nonvirtual_base_type): New local variable.
3189 (__class_type_info::~__class_type_info): Define.
3190 (__si_class_type_info::~__si_class_type_info): Likewise.
3191 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
3192 (__class_type_info::do_catch): Define new function.
3193 (__class_type_info::do_upcast): Likewise.
3194 (__class_type_info::find_public_src): Likewise.
3195 (__class_type_info::do_find_public_src): Likewise.
3196 (__si_class_type_info::do_find_public_src): Likewise.
3197 (__vmi_class_type_info::do_find_public_src): Likewise.
3198 (__class_type_info::do_dyncast): Likewise.
3199 (__si_class_type_info::do_dyncast): Likewise.
3200 (__vmi_class_type_info::do_dyncast): Likewise.
3201 (__class_type_info::do_upcast): Likewise.
3202 (__si_class_type_info::do_upcast): Likewise.
3203 (__vmi_class_type_info::do_upcast): Likewise.
3204 (__dynamic_cast): Likewise.
3206 * tinfo2.cc (__fundamental_type_info): Define new class.
3207 (__pointer_type_info): Likewise.
3208 (__reference_type_info): Likewise.
3209 (__array_type_info): Likewise.
3210 (__function_type_info): Likewise.
3211 (__enum_type_info): Likewise.
3212 (__ptr_to_member_type_info): Likewise.
3213 (__fundamental_type_info::~__fundamental_type_info): Define.
3214 (__pointer_type_info::~__pointer_type_info): Likewise.
3215 (__reference_type_info::~__reference_type_info): Likewise.
3216 (__array_type_info::~__array_type_info): Likewise.
3217 (__function_type_info::~__function_type_info): Likewise.
3218 (__enum_type_info::~__enum_type_info): Likewise.
3219 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
3220 (__pointer_type_info::do_catch): Define new function.
3221 (__ptr_to_member_type_info::do_catch): Define new function.
3223 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
3224 (__is_pointer): Likewise.
3226 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
3228 2000-01-30 Mark Mitchell <mark@codesourcery.com>
3230 * cp/class.c (build_vtable): Rename to build_primary_vtable.
3231 (prepare_fresh_vtable): Rename to build_secondary_vtable.
3232 (make_new_vtable): New function.
3233 (modify_vtable_entry): Handle generation of new vtables correctly.
3234 (modify_one_vtable): Remove unused parameter.
3235 (dfs_fixup_vtable_deltas): Likewise.
3236 (override_one_vtable): Use build_secondary_vtable.
3237 (finish_struct_1): Use build_primary_vtable and
3238 build_secondary_vtable.
3240 2000-01-28 Ulrich Drepper <drepper@redhat.com>
3242 * cp/decl.c: Adjust variable names, comments, help strings.
3244 2000-01-29 Nathan Sidwell <nathan@acm.org>
3246 * new2.cc (operator delete[]): Use operator delete, don't assume
3249 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
3251 * class.c (build_vtbl_initializer): Add argument to
3252 build_vtable_entry call.
3254 2000-01-27 Mark Mitchell <mark@codesourcery.com>
3256 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
3257 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
3258 (BF_DELTA): New macro.
3259 (BF_VCALL_INDEX): Likewise.
3261 (THUNK_VCALL_OFFSET): Likewise.
3262 (make_thunk): Change prototype.
3263 * class.c (build_vtable_entry): Integrate
3264 build_vtable_entry_for_fn. Handle vcall indices.
3265 (build_vtable_entry_for_fn): Remove.
3266 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
3267 BF_VCALL_INDEX, BF_FN.
3268 (modify_vtable_entry): Integrate common code from
3269 modify_one_vtable and dfs_fixup_vtable_deltas.
3270 (add_virtual_function): Set BF_VCALL_INDEX.
3271 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
3273 (modify_one_vtable): Simplify.
3274 (dfs_fixup_vtable_deltas): Likewise.
3275 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
3276 * method.c (make_thunk): Handle vcall indices.
3278 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
3280 Compiler side new abi rtti (not enabled).
3281 * cp-tree.h (new_abi_rtti_p): New macro.
3282 (emit_support_tinfos): Prototype new function.
3283 (tinfo_decl_p): Likewise.
3284 (emit_tinfo_decl): Likwise.
3285 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
3287 (doing_runtime): New local static.
3288 (init_rtti_processing): Add new-abi initializer.
3289 (get_tinfo_decl): Add new-abi logic.
3290 (tinfo_from_decl): Likewise.
3291 (build_dynamic_cast_1): Likewise.
3292 (qualifier_flags): New static function.
3293 (tinfo_base_init): Likewise.
3294 (generic_initializer): Likewise.
3295 (ptr_ref_initializer): Likewise.
3296 (ptmd_initializer): Likewise.
3297 (class_hint_flags): Likewise.
3298 (class_initializer): Likewise.
3299 (synthesize_tinfo_var): Likewise.
3300 (create_real_tinfo_var): Likewise.
3301 (create_pseudo_type_info): Likewise.
3302 (get_vmi_pseudo_type_info): Likewise.
3303 (create_tinfo_types): Likewise.
3304 (emit_support_tinfos): New global function.
3305 (tinfo_decl_p): New global predicate.
3306 (emit_tinfo_decl): New global function.
3307 * class.c (set_rtti_entry): Generalize for old and new rtti.
3308 (build_vtbl_initializer): Likewise.
3309 * decl2.c (finish_file): Likewise.
3311 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
3313 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
3314 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
3316 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
3318 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
3321 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
3323 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
3325 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
3327 * optimize.c (calls_setjmp_r): Supply new argument
3328 to special_function_p.
3330 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3332 * call.c: PROTO -> PARAMS.
3333 * class.c: Likewise.
3334 * cp-tree.h: Likewise.
3338 * decl2.c: Likewise.
3340 * errfn.c: Likewise.
3341 * error.c: Likewise.
3342 * except.c: Likewise.
3345 * input.c: Likewise.
3348 * method.c: Likewise.
3349 * optimize.c: Likewise.
3350 * parse.y: Likewise.
3354 * search.c: Likewise.
3355 * semantics.c: Likewise.
3358 * typeck.c: Likewise.
3359 * typeck2.c: Likewise.
3362 2000-01-25 Richard Henderson <rth@cygnus.com>
3364 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
3366 2000-01-25 Mark Mitchell <mark@codesourcery.com>
3368 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
3369 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
3370 (struct vcall_offset_data_s): New type.
3371 (dfs_vcall_offset_queue_p): New function.
3372 (dfs_build_vcall_offset_vtbl_entries): Likewise.
3373 (build_vcall_offset_vtbl_entries): Likewise.
3374 (layout_vtable_decl): Likewise.
3375 (num_vfun_entries): Likewise.
3376 (num_extra_vtbl_entries): Add the entries for vcall offsets.
3377 (build_vtbl_initializer): Likewise.
3378 (dfs_finish_vtabls): Use layout_vtable_decl.
3379 (modify_one_vtables): Always duplicate vtables under the new ABI.
3380 (finish_struct_1): Use layout_vtable_decl.
3382 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3384 * decl.c (member_function_or_else): Change third arg from a format
3385 specifier to an `enum overload_flags'. Callers changed.
3387 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
3389 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
3390 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
3391 build_const_cast, get_delta_difference, check_return_expr): Avoid
3392 ANSI string concatenation usage.
3394 2000-01-24 Mark Mitchell <mark@codesourcery.com>
3396 * class.c (layout_class_type): Put the fields required to make a
3397 class non-empty at the end, not the beginning, of the TYPE_FIELDs
3400 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
3402 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
3405 * decl2.c (mark_used): Do instantiate inlines that have been
3406 explicitly instantiated.
3408 2000-01-24 Richard Henderson <rth@cygnus.com>
3410 * call.c (build_over_call): Use expand_tree_builtin.
3411 * typeck.c (build_function_call_real): Likewise.
3412 (build_binary_op_nodefault): Handle unordered compares.
3414 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
3416 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
3417 cp_tree_index values.
3418 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
3419 New global node #defines for them.
3420 * rtti.c (call_void_fn): Replace with ...
3421 (build_runtime_decl): ... new static function.
3422 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
3423 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
3424 (build_dynamic_cast_1): Always produce correctly typed result.
3425 Explicitly produce type_info addresses. Use dynamic_cast_node.
3426 * exception.cc (__throw_bad_cast): Return `void *'.
3427 (__throw_bad_typeid): Return `const type_info &'.
3429 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
3431 * cp-tree.h (get_vtable_decl): Prototype new function.
3432 * class.c (get_vtable_decl): New function. Broken out from ...
3433 (build_vtable): ... here. Use it.
3434 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
3437 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
3439 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
3440 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
3441 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
3442 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
3443 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
3444 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
3445 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
3446 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
3447 (CPTI_TINFO_VAR_ID): New enumeration.
3448 (__tp_desc_type_node, __access_mode_type_node,
3449 __bltn_desc_type_node, __user_desc_type_node,
3450 __class_desc_type_node, __ptr_desc_type_node,
3451 __attr_desc_type_node, __func_desc_type_node,
3452 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
3453 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
3454 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
3455 enum_desc_type_node, class_desc_type_node,
3456 si_class_desc_type_node, vmi_class_desc_type_node,
3457 ptmd_desc_type_node, base_desc_type_node): New #defines.
3458 (tinfo_fn_id, tinfo_fn_type): Rename to ...
3459 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
3460 (tinfo_var_id): New enumeration.
3461 (DECL_TINFO_FN_P): Augment comment.
3462 * decl.c (cp_global_trees): Adjust documentation.
3463 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
3464 tinfo_decl_type and tinfo_var_id.
3465 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
3466 (build_typeid): Remove unused variable.
3467 (get_tinfo_var): Use tinfo_var_id.
3468 (tinfo_name): New static function.
3469 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
3470 (tinfo_from_decl): Likewise.
3471 (get_base_offset): New static function, broken out of
3473 (expand_si_desc): Use tinfo_name.
3474 (expand_class_desc): Likewise. Lose local static variable.
3475 Use base_desc_type_node. Use get_base_offset.
3476 (expand_ptr_desc): Use tinfo_name.
3477 (expand_attr_desc): Likewise.
3478 (expand_generic_desc): Likewise.
3480 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
3481 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
3483 2000-01-23 Mark Mitchell <mark@codesourcery.com>
3485 * cp-tree.h (__eprintf): Remove declaration.
3486 * tree.c (__eprintf): Remove definition.
3488 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
3489 Mark Mitchell <mark@codesourcery.com>
3491 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3492 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
3494 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
3496 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
3498 2000-01-23 Mark Mitchell <mark@codesourcery.com>
3500 * cp-tree.h (register_dtor_fn): New function.
3501 * decl.c (destroy_local_static): Rename to ...
3502 (register_dtor_fn): ... this. Give it external linkage.
3503 (expand_static_init): Use it.
3504 * decl2.c (do_static_initialization): Likewise, if using
3506 (do_static_destruction): Check that __cxa_atexit is not in use.
3507 (finish_file): Don't call do_static_destruction if using
3510 * typeck.c (convert_arguments): Restore two-message error
3513 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
3515 Remap dynamic cast hint values to be consistent across ABIs.
3516 * search.c (dynamic_cast_base_recurse): Remap generated value.
3517 (get_dynamic_cast_base_type): Adjust documentation.
3518 * tinfo.h (__user_type_info::dyncast): Likewise.
3519 (__user_type_info::find_public_subobj): Remap BOFF meaning.
3520 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
3521 (__class_type_info::do_dyncast): Likewise.
3522 (__class_type_info::do_find_public_subobj): Likewise.
3523 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
3525 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
3527 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
3529 * typeck2.c (incomplete_type_error): Restore previous
3530 cp_error and cp_error_at call sequence.
3532 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
3534 * class.c (dump_class_hierarchy): Make format agree with argument;
3535 cast pointer to unsigned long and print with %lx.
3537 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
3539 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
3541 * typeck.c (composite_pointer_type, common_type,
3542 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
3543 build_function_call_real, convert_arguments,
3544 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
3545 build_unary_op, mark_addressable, build_compound_expr,
3546 build_static_cast, build_reinterpret_cast, build_const_cast,
3547 build_c_cast, build_modify_expr, get_delta_difference,
3548 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
3549 'ISO C++'. Fusion consecutive calls to diagnotic message routines
3551 * typeck2.c (readonly_error, abstract_virtuals_error,
3552 process_init_constructor, check_for_new_type): Likewise.
3554 2000-01-19 Mark Mitchell <mark@codesourcery.com>
3556 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
3559 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
3561 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
3562 (build_x_typeid): Likewise.
3563 (get_tinfo_fn): Likewise.
3564 (get_tinfo_fn_unused): Rename to ...
3565 (get_tinfo_decl): ... here.
3566 * rtti.c (build_headof): Replace logic error with assertion.
3567 (get_tinfo_fn_dynamic): Rename to ...
3568 (get_tinfo_decl_dynamic): ... here. Make static. Use
3569 complete_type_or_else.
3570 (build_x_typeid): Move into ...
3571 (build_typeid): ... here. Adjust call to
3572 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
3573 throw_bad_typeid expression.
3574 (get_tinfo_fn_unused): Rename to ...
3575 (get_tinfo_decl): ... here. Adjust comment.
3576 (get_tinfo_fn): Delete.
3577 (tinfo_from_decl): New static function.
3578 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
3579 (get_typeid): Use complete_type_or_else.
3580 (build_dynamic_cast_1): Adjust calls to
3581 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
3582 * parse.y (primary): Adjust call to build_typeid.
3583 * except.c (build_eh_type_type_ref): Adjust call to
3584 get_tinfo_decl. Mark as used.
3585 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
3586 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
3587 * parse.c: Regenerated.
3589 2000-01-17 Mark Mitchell <mark@codesourcery.com>
3591 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
3593 (resolves_to_fixed_type_p): Document calling convention.
3594 * rtti.c (build_x_typeid): Initialize NONNULL.
3596 * cp-tree.h (build_shared_int_cst): New function.
3597 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
3598 * class.c (modify_vtable_entry): Likewise.
3599 (add_virtual_function): Split out code to generated shared
3600 INTEGER_CSTs to build_share_int_cst.
3601 (modify_all_vtables): Handle all the overridden functions here.
3602 Add overridden functions from non-primary virtual bases to the
3604 (finish_struct_1): Adjust call to modify_all_vtables. Add
3605 overridden functions from non-primary bases to the vtable.
3606 * tree.c (build_shared_int_cst): New function.
3608 * cp-tree.h (scratchalloc): Remove.
3609 (build_scratch_list): Likewise.
3610 * call.c (convert_class_to_reference): Replace build_scratch_list
3611 and build_expr_list with build_tree_list.
3612 (add_candidate): Replace scratchalloc with expralloc. Note memory
3614 (build_user_type_conversion_1): Replace build_scratch_list
3615 and build_expr_list with build_tree_list.
3616 (build_new_op): Likewise.
3617 (build_op_delete_call): Likewise.
3618 (convert_like): Likewise.
3619 * cvt.c (ocp_convert): Likewise.
3620 * decl.c (start_decl): Likewise.
3621 (start_function): Likewise.
3622 (finish_destructor_body): Likewise.
3623 (maybe_build_cleanup_1): Likewise.
3624 * decl2.c (reparse_decl_as_expr): Likewise.
3625 * init.c (perform_member_init): Likewise.
3626 (expand_cleanup_for_base): Likewise.
3627 (build_builtin_delete_call): Likewise.
3628 (build_new_1): Likewise.
3629 (build_delete): Likewise.
3630 * method.c (do_build_assign_ref): Likewise.
3631 * parse.y (already_scoped_stmt): Likewise.
3632 (nontrivial_exprlist): Likewise.
3633 (net_initializer): Likewise.
3634 (initlist): Likewise.
3635 * parse.c: Regenerated.
3636 * rtti.c (build_x_typeid): Likewise.
3637 (build_dynamic_cast_1): Likewise.
3638 * typeck.c (build_x_compound_expr): Likewise.
3639 (build_static_cast): Likewise.
3640 (build_modify_expr): Likewise.
3642 * cp-tree.h (DECL_VINDEX): Add documentation.
3643 * class.c (build_vtable_entry): Likewise.
3644 (start_vtable): Add comment.
3645 (add_virtual_function): Replace pending_hard_virtuals with
3646 overridden_virtuals and pending_virtuals with new_virtuals.
3647 Replace redundant assignments with assertions.
3648 (check_for_override): Add comment.
3649 (check_bases_and_members): Replace pending_hard_virtuals with
3650 overridden_virtuals and pending_virtuals with new_virtuals.
3651 (create_vtbl_ptr): Likewise.
3652 (layout_class_type): Likewise.
3653 (finish_struct_1): Likewise. Add comments.
3655 2000-01-16 Mark Mitchell <mark@codesourcery.com>
3657 * class.c (finish_struct_1): Replace redundant code with
3660 * cp-tree.h (flag_new_abi): Move.
3661 (flag_use_cxa_atexit): Likewise.
3662 (flag_honor_std): Likewise.
3663 (flag_rtti): Likewise.
3664 (vbase_offsets_in_vtable_p): Define.
3665 (vptrs_present_everywhere_p): Likewise.
3666 (TYPE_CONTAINS_VPTR_P): Likewise.
3667 (dfs_walk_real): Declare.
3668 * class.c (build_vbase_pointer_fields): Check
3669 vbase_offsets_in_vtable_p.
3670 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
3672 (build_vbase_offset_vtbl_entries): Simplify.
3673 (build_vbase_offset_vtbl_entries): Adjust.
3674 (build_vbase_pointer): Add ability to look up vbase offsets in
3676 (start_vtable): New function.
3677 (add_virtual_function): Use it.
3678 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
3679 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
3680 (build_vtbl_initializer): Take the type of the complete object as
3681 input. Use it to correctly calculate vbase offsets.
3682 (dfs_finish_vtbls): Pass the complete type to
3683 build_vtbl_initializer.
3684 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3685 (create_vtable_ptr): Create a vtable even if there are no
3686 new virtual functions, under the new ABI.
3687 (finish_struct_1): Likewise.
3688 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
3689 * decl.c (exapnd_static_init): Remove call to
3690 preserve_initializer.
3691 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
3693 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
3694 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
3695 (construct_virtual_bases): Don't initialize virtual base pointers
3697 (build_aggr_init): Clean up comment.
3698 (expand_aggr_init_1): Likewise.
3699 * rtti.c (expand_class_desc): Store the virtual function table
3700 index where the vbase offset lives in the offset field.
3701 * search.c (dfs_walk_real): Make it global.
3702 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
3703 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
3705 * tinfo.h (USItype): Make it signed under the new ABI.
3706 * tinfo.cc (convert_to_base): New function. Encapsulate base
3707 conversion logic here.
3708 (__class_type_info::do_upcast): Use it.
3709 (__class_type_info::do_dyncast): Likewise.
3710 (__class_type_info::do_find_public_subobj): Likewise.
3712 * init.c (construct_virtual_bases): Don't look up the addresses of
3713 virtual bases at run-time.
3715 * class.c (build_vbase_pointer): Relocate.
3716 (build_vbase_pointer_fields): Likewise.
3717 (dfs_build_vbase_offset_vtbl_entries): Likewise.
3718 (build_vbase_offset_vtbl_entries): Likewise.
3720 * decl.c (init_decl_processing): Complain if -fnew-abi
3721 -fno-vtable-thunks is used.
3723 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
3726 2000-01-15 Mark Mitchell <mark@codesourcery.com>
3728 * cp-tree.h (num_extra_vtbl_entries): New function.
3729 (size_extra_vtbl_entries): Likewise.
3730 (dfs_vtable_path_unmark): Likewise.
3731 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
3732 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3733 * class.c (num_extra_vtbl_entries): New function.
3734 (size_extra_vtbl_entries): Likewise.
3735 (dfs_build_vbase_offset_vtbl_entries): New function.
3736 (build_vbase_offset_vtbl_entries): Likewise.
3737 (build_vtbl_initializer): Use it.
3738 (finish_struct_1): Adjust vtable sizes (using
3739 num_extra_vtbl_entries).
3740 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
3741 THUNK_DECL is non-NULL before expanding it.
3742 * init.c (expand_virtual_init): Adjust the vtable pointer by
3743 size_extra_vtbl_entries before storing it.
3744 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
3745 Handle TREE_LIST parameters here, not in the dfs_* functions.
3746 (dfs_unmarked_real_bases_queue_p): Adjust.
3747 (dfs_marked_real_bases_queue_p): Likewise.
3748 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
3749 (dfs_vtable_path_marked_real_bases_queue_p): New function.
3750 (dfs_vtable_path_unmark): Likewise.
3752 2000-01-14 Mark Mitchell <mark@codesourcery.com>
3754 * optimize.c (copy_body_r): Clear the operand three of a
3755 TARGET_EXPR when copying it.
3757 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3759 * method.c (build_decl_overload_real): Check whether we are in ::
3760 before returning __builtin_new/delete.
3762 2000-01-13 Mark Mitchell <mark@codesourcery.com>
3764 * pt.c (tsubst_friend_function): Improve comment.
3765 (instantiate_decl): Avoid crashing when a "nested" function is
3766 instantiated from the top level.
3768 * dump.c (dqeueue_and_dump): Dump
3769 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
3771 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3773 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
3775 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
3777 * g++spec.c (lang_specific_driver): Add -fnew-abi if
3778 ENABLE_NEW_GXX_ABI defined.
3779 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
3780 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
3781 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
3783 2000-01-12 Mark Mitchell <mark@codesourcery.com>
3785 * decl.c (start_cleanup_fn): Call pushdecl.
3787 * call.c (convert_class_to_reference): Fix typos.
3788 (build_conditional_expr): Handle errors gracefully.
3789 * class.c (push_nested_class): Likewise.
3790 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
3791 (DECL_THIS_EXTERN): Use it.
3792 (DECL_THIS_STATIC): Likewise.
3793 * cvt.c (convert_to_void): Handle errors gracefully.
3794 (build_expr_type_conversion): Likewise.
3795 * decl.c (maybe_push_decl): Likewise.
3796 (start_decl_1): Likewise.
3797 (require_complete_types_for_parms): Likewise.
3798 * parse.y (structsp): Likewise.
3799 (base_class): Likewise.
3800 * parse.c: Regenerated.
3801 * pt.c (finish_member_template_decl): Likewise.
3802 * typeck.c (decay_conversion): Likewise.
3804 * cp-tree.h (dfs_skip_vbases): New function.
3805 (find_vbase_instance): Likewise.
3806 * class.c (determine_primary_base): Allow a nearly empty base to
3807 serve as a primary base class under the new ABI.
3808 (get_class_offset_1): Rename to ...
3809 (dfs_get_class_offset): ... this. Simplify. Don't issue error
3811 (get_class_offset): Use it. Issue error messages here.
3812 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
3813 find the right copies of virtual bases.
3814 (fixup_vtable_deltas1): Rename to ...
3815 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
3816 bases as primary bases.
3817 (fixup_vtable_deltas): Remove.
3818 (override_one_vtable): Handle virtual bases as primary bases.
3819 (merge_overrides): Likewise.
3820 (finish_struct_1): Likewise.
3821 (dump_class_hierarchy): Dump primary-ness of bases as well.
3822 * search.c (mark_primary_bases): Use a pre-order traversal to
3823 handle primary virtual bases.
3824 (dfs_skip_vbases): New fiunction.
3825 (expand_upcast_fixups): Adjust to handle primary virtual bases.
3826 (fixup_virtual_upcast_offsets): Likewise.
3827 (fixup_all_virtual_upcast_offsets): Likewise.
3828 (dfs_find_vbase_instances): New function.
3829 (find_vbase_instance): Likewise.
3831 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
3833 * lex.c (DIR_SEPARATOR): Delete macro.
3835 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
3837 * decl2.c (lang_decode_option): Handle automatic line wrapping
3840 2000-01-11 Mark Mitchell <mark@codesourcery.com>
3842 * friend.c (do_friend): Don't resolve scopes when processing
3843 template declarations, even if the qualifying scope doesn't
3844 involve template parameters.
3846 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
3848 * class.c (dfs_modify_vtables_queue_p): Remove.
3849 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
3850 and dfs_marked_real_bases_queue_p instead of
3851 dfs_modify_vtables_queue_p.
3853 * class.c (build_vbase_path): Simplify.
3854 (dfs_propagate_binfo_offsets): New function.
3855 (propagate_binfo_offsets): Use it.
3856 (remove_base_field): Simplify.
3857 (dfs_set_offset_for_vbases): Remove.
3858 (dfs_set_offset_for_shared_vbases): New function.
3859 (dfs_set_offset_for_unshared_vbases): Likewise.
3860 (layout_virtual_bases): Use them.
3861 (layout_basetypes): Don't call propagate_binfo_offsets.
3862 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
3865 * class.c (build_base_field): New function, split out from ...
3866 (build_base_fields): ... here. Use it. Allocate primary bases
3867 first, under the new ABI.
3868 (get_vtable_entry): Remove.
3869 (remove_base_field): New function, split out from ...
3870 (remove_base_fields): ... here. Adjust since primary bases come
3871 first under the new ABI.
3873 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
3874 (initialize_vtbl_ptrs): New function.
3875 (expand_indirect_vtbls_init): Change prototype.
3876 (convert_pointer_to_vbase): Declare.
3877 * init.c (expand_direct_vtbls_init): Remove.
3878 (dfs_initialize_vtbl_ptrs): New function.
3879 (initialize_vtbl_ptrs): Likewise.
3880 (emit_base_init): Use initialize_vtbl_ptrs.
3881 * search.c (convert_pointer_to_vbase): Make it global.
3882 (expand_indirect_vtbls_init): Remove vtable initialization code.
3883 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
3885 * class.c (dfs_finish_vtbls): New function.
3886 (finish_vtbls): Use it.
3887 (dump_class_hierarchy): New function.
3889 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
3890 (BINFO_VBASE_PRIMARY_P): New macro.
3891 (BINFO_VIRTUALS): Add to documentation.
3892 (SET_BINFO_PRIMARY_MARKED_P): Remove.
3893 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3894 (dfs_mark_primary_bases_queue_p): Likewise.
3895 (dfs_unmarked_real_bases_queue_p): New function.
3896 (dfs_marked_real_bases_queue_p): Likewise.
3897 * search.c (dfs_mark_primary_bases): Adjust.
3898 (mark_primary_bases): Likewise.
3899 (get_shared_vbase_if_not_primary): New function.
3900 (dfs_unmarked_real_bases_queue_p): Likewise.
3901 (dfs_marked_real_bases_queue_p): Likewise.
3902 (dfs_get_pure_virtuals): Simplify.
3903 (get_pure_virtuals): Likewise.
3905 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3907 * lex.c: Include tm_p.h.
3909 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
3911 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
3913 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
3915 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
3916 * pt.c (instantiate_decl): Defer comdat templates that might not be
3919 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
3920 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
3921 (finish_file): Likewise.
3923 * decl2.c (import_export_class): Undo 12/14 change.
3925 * error.c (dump_decl): operator new, not operatornew.
3927 * class.c (field_decl_cmp): A nontype is "greater" than a type.
3928 * search.c (lookup_field_1): Look for the last field with the
3931 2000-01-05 Nathan Sidwell <nathan@acm.org>
3933 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
3936 2000-01-05 Nathan Sidwell <nathan@acm.org>
3938 * typeck.c (build_static_cast): Don't strip target qualifiers
3939 when casting from a class.
3941 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3943 * class.c (warn_hidden): Initialize variable `fndecl'.
3945 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
3947 * decl.c (flag_isoc9x): New variable to be able to use code in
3948 c-common.c. For now always zero.
3950 2000-01-03 Mark Mitchell <mark@codesourcery.com>
3952 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
3953 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
3954 or unshare_base_binfos for virtual bases here.
3955 * search.c (dfs_get_vbase_types): Do it here.
3956 (get_vbase_types): Adjust.
3958 2000-01-02 Mark Mitchell <mark@codesourcery.com>
3960 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
3961 (BINFO_PRIMARY_MARKED_P): Use flag 5.
3962 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
3963 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3964 (unmark_primary_bases): Remove declaration.
3965 (unmarkedp): Declare.
3966 (dfs_vbase_unmark): Likewise.
3967 * class.c (determine_primary_base): Return immediately if there
3968 are no base classes. Call mark_primary_bases here.
3969 (modify_all_direct_vtables): Remove.
3970 (modify_all_indirect_vtables): Remove.
3971 (dfs_modify_vtables_queue_p): New function.
3972 (dfs_modify_vtables): New function.
3973 (modify_all_vtables): Use them.
3974 (build_base_fields): Build FIELD_DECLs for primary virtual base
3976 (create_vtable_ptr): Don't call determine_primary_base here.
3977 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
3978 (dfs_set_offset_for_vbases): ... this.
3979 (layout_virtual_bases): Use it.
3980 (layout_class_type): Call determine_primary_base here.
3981 * search.c (unmarkedp): Make it global.
3982 (shared_marked_p): Simplify.
3983 (shared_unmarked_p): Likewise.
3984 (dfs_primary_bases_queue_p): Remove.
3985 (dfs_unmark_primary_bases): Likewise.
3986 (unmark_primary_bases): Likewise.
3987 (mark_primary_bases): Simplify.
3988 (get_pure_virtuals): Don't call mark_primary_bases here.
3989 (dfs_vbase_unmark): New function.
3990 (get_vbase_types): Simplify.
3992 * class.c (struct base_info): Remove.
3993 (determine_primary_base): Take has_virtual_p rather than a
3994 base_info as input. Don't calculate max_has_virtual.
3995 (finish_struct_bits): Remove max_has_virtual argument.
3996 (create_vtable_ptr): Remove max_has_virtual_p argument.
3997 (layout_virtual_bases): Remove max argument.
3998 (layout_basetypes): Likewise.
3999 (layout_class_type): Remove max_has_virtual_p argument.
4000 (finish_struct_1): Remove max_has_virtual.
4002 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
4003 (layout_basetypes): Remove.
4004 * class.c (propagate_binfo_offsets): Moved here from tree.c.
4005 Update to handle primary virtual bases.
4006 (remove_base_fields): New function, split out from
4008 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
4009 (layout_virtual_bases): New function, split out from
4010 layout_basetypes. Update to handle primary virtual bases.
4011 (layout_basetypes): Moved here from tree.c. Use
4012 remove_base_fields and layout_virtual_bases.
4013 * search.c (dfs_mark_primary_bases_queue_p): New function.
4014 (mark_primary_bases): Use it.
4015 * tree.c (CEIL): Remove.
4016 (propagate_binfo_offsets): Remove.
4017 (layout_basetypes): Remove.
4019 2000-01-01 Mark Mitchell <mark@codesourcery.com>
4021 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
4022 (BINFO_PRIMARY_MARKED_P): New macro.
4023 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
4024 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
4025 (mark_primary_bases): New function.
4026 (unmark_primary_bases): Likewise.
4027 * search.c (get_abstract_virtuals_1): Remove.
4028 (dfs_mark_primary_bases): New function.
4029 (mark_primary_bases): Likewise.
4030 (dfs_unmark_primary_bases): Likewise.
4031 (unmark_primary_bases): Likewise.
4032 (dfs_get_pure_virtuals): Likewise.
4034 2000-01-01 Mark Mitchell <mark@codesourcery.com>
4036 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
4037 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
4038 (modify_one_vtable): Adjust.
4039 (fixup_vtable_deltas1): Likewise.
4040 (override_one_vtable): Likewise.
4041 * search.c (get_abstract_virtuals_1): Likewise.
4042 (get_pure_virtuals): Likewise.
4043 (expand_upcast_fixups): Likewise.
4044 * tree.c (debug_binfo): Likewise.
4046 * class.c (build_vtable): Don't return a value. Don't rebuild
4047 vtables for bases that have already been handled.
4048 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
4049 already been handled.
4050 (modify_one_vtable): Adjust accordingly.
4051 (fixup_vtable_deltas1): Likewise.
4052 (finish_struct_1): Likewise.
4054 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4056 * call.c (build_new_method_call): Also check destructors.
4058 1999-12-31 Mark Mitchell <mark@codesourcery.com>
4060 * cp-tree.h (VF_NORMAL_VALUE): Remove.
4061 * class.c (struct base_info): Remove vfield, vfields, and rtti.
4062 (set_primary_base): New function, split out from ...
4063 (finish_base_struct): ... here. Rename to ...
4064 (determine_primary_base): ... this. Simplify.
4065 (create_vtable_ptr): Tweak accordingly.
4066 (finish_struct_1): Simplify.
4068 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
4069 (CLASSTYPE_N_BASECLASSES): Likewise.
4070 (BINFO_FOR_VBASE): New macro.
4071 (get_vbase_types): Change prototype.
4072 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
4073 (prepare_fresh_vtable): Likewise.
4074 (finish_vtbls): Likewise.
4075 (get_class_offset_1): Likewise.
4076 (modify_all_indirect_vtables): Likewise.
4077 (build_vbase_pointer_fields): Likewise.
4078 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
4079 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
4080 (expand_member_init): Likewise.
4081 * search.c (get_base_distance): Likewise.
4082 (lookup_field_queue_p): Likewise.
4083 (virtual_context): Likewise.
4084 (get_vbase_types): Don't return a value. Set
4085 CLASSTYPE_VBASECLASSES here.
4086 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
4088 1999-12-30 Mark Mitchell <mark@codesourcery.com>
4090 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
4092 1999-12-29 Mark Mitchell <mark@codesourcery.com>
4094 * class.c (create_vtable_ptr): Put the vtable at the beginning of
4095 the class, not the end, in the new ABI.
4096 * tree.c (propagate_binfo_offsets): Do the right thing for the new
4099 1999-12-29 Mark Mitchell <mark@codesourcery.com>
4101 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
4102 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
4103 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
4104 (check_field_decls): Likewise.
4105 (check_bases_and_members): Likewise.
4107 1999-12-28 Mark Mitchell <mark@codesourcery.com>
4109 * cp-tree.h (do_inline_function_hair): Remove.
4110 * class.c (layout_class_type): New function, split out from
4112 (fixup_pending_inline): Likewise.
4113 (fixup_inline_methods): New function.
4114 * method.c (fixup_pending_inline): Remove.
4115 (do_inline_function_hair): Likewise.
4117 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
4120 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
4121 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
4122 (CLASSTYPE_PURE_VIRTUALS): ... this.
4123 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
4124 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
4125 (DECL_PURE_VIRTUAL_P): ... this.
4126 (get_abstract_virtuals): Rename to ...
4127 (get_pure_virtuals): ... this.
4128 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
4129 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
4130 CLASSTYPE_PURE_VIRTUALS.
4131 * class.c (build_vtable_entry): Likewise.
4132 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
4133 get_abstract_virtuals.
4134 (build_vtbl_initializer): Likewise.
4135 (override_one_vtable): Likewise.
4136 (check_methods): Likewise.
4137 * decl.c (duplicate_decls): Likewise.
4138 (redeclaration_error_message): Likewise.
4139 (lang_mark_tree): Likewise.
4140 * decl2.c (grok_function_init): Likewise.
4141 (import_export_vtable): Likewise.
4142 (import_expor_class): Likewise.
4143 * typeck2.c (abstract_virtuals_error): Likewise.
4144 * xref.c (GNU_xref_member): Likewise.
4145 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
4147 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
4149 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
4152 1999-12-26 Mark Mitchell <mark@codesourcery.com>
4154 * decl.c (store_return_init): Use mode of old RTL generated for
4155 DECL_RESULT, not the mode of DECL_RESULT itself.
4156 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
4157 for functions that used named return values.
4159 1999-12-24 Mark Mitchell <mark@codesourcery.com>
4161 * semantics.c (expand_body): Use
4162 note_deferral_of_defined_inline_function.
4164 1999-12-22 Mark Mitchell <mark@codesourcery.com>
4166 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
4168 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4170 * error.c (dump_decl): Support named return values.
4172 1999-12-20 Mark Mitchell <mark@codesourcery.com>
4174 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
4175 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
4176 (CLASSTYPE_PRIMARY_BINFO): Likewise.
4177 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
4178 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
4179 (check_bases_and_members): Set them here instead.
4180 (create_vtable_ptr): New function, split out from ...
4181 (finish_struct_1): ... here. Use it. Tidy. Use
4182 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
4183 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
4184 the first field in the class.
4185 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
4186 seeing TYPE_VFIELD as the first field in the class.
4188 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
4189 (TYPE_POLYMORPHIC_P): ... this.
4190 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
4191 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
4192 (TREE_CALLS_NEW): Remove.
4193 (TREE_MANGLED): Likewise.
4194 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
4195 and TYPE_POLYMORPHIC_P.
4196 * class.c (check_bases): Likewise.
4197 (finish_base_struct): Likewise.
4198 (finish_struct_bits): Likewise.
4199 (check_for_override): Likewise.
4200 (finish_struct_1): Likewise.
4201 (get_vfield_name): Likewise.
4202 * decl.c (xref_basetypes): Likewise.
4203 * decl2.c (import_export_class): Likewise.
4204 (import_export_decl): Likewise.
4205 * error.c (dump_function_decl): Likewise.
4206 * pt.c (instantiate_class_template): Likewise.
4207 * repo.c (repo_inline_used): Likewise.
4208 * rtti.c (build_headof): Likewise.
4209 (get_tinfo_fn_dynamic): Likewise.
4210 (build_x_typeid): Likewise.
4211 (get_tinfo_var): Likewise.
4212 (build_dynamic_cast_1): Likewise.
4213 (synthesize_tinfo_fn): Likewise.
4214 * search.c (lookup_field_1): Likewise.
4215 (dfs_debug_mark): Likewise.
4216 (maybe_suppress_debug_info): Likewise.
4217 * typeck.c (build_component_ref): Likewise.
4218 (build_component_addr): Likewise.
4219 * typeck2.c (process_init_constructor): Likewise.
4221 1999-12-20 Nathan Sidwell <nathan@acm.org>
4223 * typeck.c (strip_all_pointer_quals): New static function.
4224 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
4226 1999-12-16 Mark Mitchell <mark@codesourcery.com>
4228 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
4229 (dso_handle_node): New macro.
4230 (flag_use_cxa_atexit): New variable.
4231 (declare_global_var): New function.
4232 (start_anon_func): Remove declaration.
4233 (end_anon_func): Likewise.
4234 * decl.c (get_atexit_node): New function, split out from
4235 destroy_local_static. Handle flag_use_cxa_atexit.
4236 (get_dso_handle_node): Likewise.
4237 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
4238 except.c. Handle flag_use_cxa_atexit.
4239 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
4241 (declare_global_var): New variable.
4242 (destroy_local_static): Handle flag_use_cxa_atexit.
4243 * decl2.c (flag_use_cxa_atexit): New variable.
4244 (lang_f_options): Likewise.
4245 * except.c (start_anon_func): Remove.
4246 (end_anon_func): Liekwise.
4247 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
4248 * rtti.c (get_tinfo_var): Use declare_global_var.
4250 1999-12-16 Mark Mitchell <mark@codesourcery.com>
4252 * class.c (check_field_decls): Don't return a value.
4253 (avoid_overlap): Moved here from tree.c.
4254 (build_base_fields): Likewise.
4255 (check_bases): New function, split out from finish_base_struct.
4256 (check_bases_and_members): New function, split out from
4258 (struct base_info): Remove cant_have_default_ctor,
4259 cant_have_const_ctor, cant_have_asn_ref.
4260 (finish_base_struct): Split semantic analysis into check_bases.
4261 (finish_struct_methods): Fix bogus assertion.
4262 (check_field_decls): Call finish_struct_anon here.
4263 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
4264 (finish_struct_1): Use check_bases_and_members. Reorganize.
4265 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
4266 (build_base_fields): Don't declare.
4267 * tree.c (avoid_overlap): Remove.
4268 (build_base_fields): Likewise.
4270 * optimize.c (struct inline_data): Remove scope_stmt.
4271 (remap_block): Don't use insert_block_after_note. Don't update
4273 (expand_call_inline): Don't update scope_stmt.
4274 (optimize_function): Don't initialize scope_stmt.
4275 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
4276 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
4278 1999-12-15 Mark Mitchell <mark@codesourcery.com>
4280 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
4281 out of the class, rather than taking them as parameters.
4282 (build_vbase_pointer_fields): Move here from tree.c.
4283 (build_vtbl_or_vbase_field): New function.
4284 (check_methods): Likewise.
4285 (remove_zero_width_bitfields): Likewise.
4286 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
4287 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
4289 (finish_struct_methods): Handle the case where there are no
4291 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
4292 (check_field_decls): Call delete_duplicate_fields here.
4293 (finish_struct_1): Tidy. Use check_methods and
4294 remove_zero_width_bitfields.
4295 * cp-tree.h (build_vbase_pointer_fields): Remove.
4296 * decl.c (grokdeclarator): Use tree_cons instead of
4298 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
4299 instead of temp_tree_cons.
4300 * lex.c (cons_up_default_function): Remove dead code.
4301 * method.c (fixup_pending_inline): New function, split out from ...
4302 (do_inline_function_hair): ... here.
4303 * tree.c (build_vbase_pointer_fields): Remove.
4305 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
4307 * tree.c (walk_tree): Walk operand subtrees in forward order.
4308 * optimize.c (expand_call_inline): Likewise.
4309 (optimize_function): Initialize id->scope_stmt to something useful.
4310 (remap_block): Assume id->scope_stmt has a useful value.
4312 1999-12-15 Nathan Sidwell <nathan@acm.org>
4314 * typeck.c (build_c_cast): Expand warning message. Move pointer
4315 alignment warning to after the cast. Don't warn about pointer
4316 alignment when given a pointer to incomplete.
4318 1999-12-15 Richard Henderson <rth@cygnus.com>
4320 * cp-tree.h (make_aggr_type): Declare.
4321 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
4322 (make_aggr_type): New.
4324 * decl.c (build_typename_type, init_decl_processing): Use it.
4325 (build_ptrmemfunc_type, xref_tag): Likewise.
4326 * except.c (call_eh_info): Likewise.
4327 * init.c (init_init_processing): Likewise.
4328 * pt.c (process_template_parm, lookup_template_class): Likewise.
4329 * rtti.c (expand_class_desc): Likewise.
4330 * semantics.c (begin_class_definition, finish_typeof): Likewise.
4331 * tree.c (copy_template_template_parm): Likewise.
4333 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
4335 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
4336 sizeof (struct tree_common).
4338 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
4340 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
4341 outermost block to point to the inlined function decl.
4343 * error.c (dump_decl): operator==, not operator ==.
4344 (op_to_string): Likewise.
4346 * decl.c (compute_array_index_type): Handle null name.
4348 * decl2.c (ambiguous_decl): Fix to match comment.
4349 (lookup_using_namespace): Adjust.
4351 * decl2.c (import_export_class): Don't ignore dllimport.
4353 1999-12-14 Mark Mitchell <mark@codesourcery.com>
4355 * class.c (check_field_decls): Split out from ...
4356 (finish_struct_1): ... here. Use it. Tidy.
4358 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
4359 * optimize.c (copy_body_r): Pass it.
4360 * tree.c (remap_save_expr): Clear walk_subtrees for an
4361 already-handled SAVE_EXPR.
4362 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
4364 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
4365 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
4367 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
4369 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
4371 * class.c (finish_base_struct): Allow multiple COM base classes
4372 as well as non-COM bases as long as it's not the leftmost.
4374 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
4376 * lex.c (saving_parse_to_obstack): New global.
4377 (reinit_parse_for_block): Use.
4378 (reinit_parse_for_expr): Use.
4379 (check_newline): Use.
4381 1999-12-13 Mark Mitchell <mark@codesourcery.com>
4383 * optimize.c (initialize_inlined_parameters): Take FN to which the
4384 parameters belong as an argument.
4385 (expand_call_inline): Expand calls into the parameter
4386 initializations before pushing the function onto the list of
4387 functions we are presently expanding.
4389 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4391 * class.c (get_vtable_name): Use a literal format string and
4392 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
4393 (prepare_fresh_vtable): Likewise.
4395 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
4398 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
4400 * init.c (build_vec_init): Initialize variable `try_body'.
4402 * lex.c (yyerror): Don't call a variadic function with a
4403 non-literal format string.
4405 * optimize.c (optimize_function): Call memset, not bzero.
4407 * pt.c (for_each_template_parm_r): Add static prototype.
4409 1999-12-09 Andreas Jaeger <aj@suse.de>
4411 * except.c (expand_throw): Add static attribute to match
4414 * Makefile.in (semantics.o): Add dependency on output.h.
4415 * semantics.c: Include output.h for declaration of
4418 1999-12-09 Mark Mitchell <mark@codesourcery.com>
4420 * decl.c (init_decl_processing): Reenable inlining on trees.
4421 (finish_function): Likewise.
4422 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
4423 * semantics.c (simplify_aggr_init_exprs): New function.
4424 (expand_body): Use it.
4425 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
4426 sometimes present the same sub-tree twice.
4428 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
4431 * semantics.c (finish_switch_cond): Do conversions here, not ...
4432 * typeck.c (c_expand_start_case): Here.
4434 * semantics.c (do_poplevel): Remove unused variable.
4436 1999-12-06 Mark Mitchell <mark@codesourcery.com>
4438 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
4439 unless we're declaring the variable in question.
4441 1999-12-06 Mark Mitchell <mark@codesourcery.com>
4443 * decl.c (init_decl_processing): #if 0 last patch.
4444 (finish_function): Likewise.
4446 1999-12-05 Mark Mitchell <mark@codesourcery.com>
4448 * decl.c (init_decl_processing): Set flag_inline_trees if
4451 * cp-tree.h (calls_setjmp_p): Declare.
4452 * decl.c (finish_function): Mark functions that call setjmp as
4454 * optimize.c (calls_setjmp_r): New function.
4455 (calls_setjmp_p): Likewise.
4457 1999-12-04 Mark Mitchell <mark@codesourcery.com>
4459 * optimize.c (expand_call_inline): Wrap the expanded call in an
4460 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
4463 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
4464 in_target_cleanup_p.
4465 (remap_decl): New function.
4466 (remap_block): Likewise.
4467 (copy_scope_stmt): Likewise.
4468 (copy_body_r): Use remap_decl and copy_scope_stmt.
4469 (copy_body): Use VARRAY_TOP_TREE.
4470 (initialize_inlined_parameters): Likewise.
4471 (declare_return_variable): Likewise.
4472 (inlinable_function_p): Check flag_inline_trees.
4473 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
4474 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
4475 parameters of the inlined function.
4476 (optimize_function): Prevent recursion into partially complete
4479 * cp-tree.def (SCOPE_STMT): Take one operand.
4480 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
4481 (SCOPE_NULLIFIED_P): Redefine.
4482 (SCOPE_NO_CLEANUPS_P): New macro.
4483 (add_scope_stmt): Change prototype.
4484 * decl.c (poplevel): Tidy. Warn about unused variables here.
4485 Record SCOPE_STMT_BLOCKs.
4486 (finish_function): Keep DECL_INITIAL for functions that might be
4488 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
4489 * semantics.c: Include rtl.h.
4490 (add_scope_stmt): Return the new scope statement and, for an
4491 end-of-scope statement, its matching begin statement. Don't set
4493 (do_pushlevel): Simplify, now that we are always
4495 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
4496 (expand_stmt): Don't call expand_start_bindings or
4497 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
4498 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
4500 * Makefile.in (semantics.o): Depend on RTL_H.
4502 * decl2.c (pending_statics_used): Make it a macro.
4503 (saved_inlines_used): Likewise.
4504 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
4505 (mark_inline_for_output): Likewise.
4506 (ssdf_decls_used): Remove.
4507 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
4508 (generate_ctor_or_dtor_function): Adjust accordingly.
4510 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
4511 Greg McGary <gkm@gnu.org>
4513 * decl.c (duplicate_decls): Merge
4514 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
4515 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
4517 1999-12-02 Mike Stump <mrs@wrs.com>
4519 * init.c (perform_member_init): Handle parse errors better.
4521 1999-12-01 Mark Mitchell <mark@codesourcery.com>
4523 * cp-tree.h (min_tree_cons): Remove.
4524 (scratch_ovl_cons): Likewise.
4525 * decl.c (saveable_obstack): Don't declare.
4526 (duplicate_decls): Tweak error-message.
4527 (initialize_local_var): Explicitly mark the definition as static.
4528 (finish_function): Call permanent_allocation, just so
4529 that the middle-end sees the obstacks it expects.
4530 (mark_cp_function_context): Likewise.
4531 * init.c (build_new): Don't use min_tree_cons.
4532 * lex.c (permanent_obstack): Don't declare.
4533 (current_obstack, saveable_obstack): Likewise.
4534 * spew.c (current_obstack, saveable_obstack): Likewise.
4535 * tree.c (current_obstack, saveable_obstack): Likewise.
4536 (scratch_ovl_cons): Remove.
4537 (build_min_nt): Don't mess with obstacks.
4538 (build_min): Likewise.
4539 (min_tree_cons): Remove
4540 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
4541 (build_x_function_call): Likewise.
4542 (build_c_cast): Don't use min_tree_cons.
4544 1999-11-29 Mark Mitchell <mark@codesourcery.com>
4546 * pt.c (tsubst_decl): Robustify.
4548 1999-11-27 Mark Mitchell <mark@codesourcery.com>
4550 * decl2.c (finish_file): Call expand_body for inline functions
4551 that will be written out but that do not yet have RTL.
4552 * semantics.c (expand_body): Do not generate RTL For inline
4553 functions that do not yet need to be written out.
4555 1999-11-25 Mark Mitchell <mark@codesourcery.com>
4557 * Make-lang.in (CXX_SRCS): Add optimize.c.
4558 * Makefile.in (CXX_OBJS): Add optimize.o.
4559 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
4560 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
4561 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
4562 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
4563 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
4565 (optimize.o): New target.
4566 * class.c: Don't include splay-tree.h.
4567 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
4568 * cp-tree.h: Include splay-tree.h.
4569 (DECL_UNINLINABLE): New macro.
4570 (CTOR_BEGIN_P, CTOR_END_P): New macros.
4571 (flag_inline_trees): New variable.
4572 (local_variable_p): New function.
4573 (nonstatic_local_decl_p): Likewise.
4574 (optimize_function): Likewise.
4575 (cplus_unsave_expr_now): Remove.
4576 (copy_tree_r): Declare.
4577 (remap_save_expr): Likewise.
4578 * decl.c (local_variable_p): Don't
4580 (local_variable_p_walkfn): New function.
4581 (make_rtl_for_local_static): Remove code to try to avoid writing
4582 out static constants.
4583 (emit_local_var): Fix indentation.
4584 (nonstatic_local_decl_p): New function.
4585 (check_default_argument): Use local_variable_p_walkfn, not
4586 local_variable_p, when walking the tree.
4587 (start_function): Set the DECL_CONTEXT for automatically generated
4589 (finish_constructor_body): Use CTOR_STMT to mark the end of a
4591 * decl2.c: Don't include splay-tree.h.
4592 (flag_inline_trees): Define.
4593 * dump.c: Don't include
4595 * except.c (expand_end_catch_block): Fix comment formatting.
4596 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
4597 (expand_throw): Tidy comment.
4598 * init.c (build_vec_delete_1): Use create_temporary_var.
4599 * lex.c (cplus_tree_code_type): Make it static.
4600 (cplus_tree_code_length): Likewise.
4601 (cplus_tree_code_name): Likewise.
4602 * optimize.c: New file.
4603 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
4604 with computed gotos.
4605 (setup_vtbl_ptr): Mark the beginnings of constructors with
4607 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
4608 (expand_body): Call optimize_function. Save bodies if we're doing
4610 * tree.c: Don't include splay-tree.h. Include insn-config.h and
4612 (copy_tree_r): Make it public.
4613 (statement_code_p): New function.
4614 (mark_local_for_remap_r): Likewise.
4615 (cp_usave_r): Likewise.
4616 (cp_unsave): Likewise.
4617 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
4618 (walk_tree): Walk into `s' class nodes. Walk statement chains.
4619 (copy_tree_r): Handle 's' class nodes. Restore chains for
4620 statements. Nullify scopes. Don't copy types.
4621 (init_tree): Set lang_unsave to cp_unsave.
4622 (remap_save_expr): Define.
4623 * ir.texi: Document CTOR_STMT.
4625 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
4627 * search.c (note_debug_info_needed): Do perform this optimization
4629 (maybe_suppress_debug_info): Likewise. Start by clearing
4630 TYPE_DECL_SUPPRESS_DEBUG.
4632 1999-11-24 Mark Mitchell <mark@codesourcery.com>
4634 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
4636 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
4638 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4640 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
4641 function with a non-literal format string.
4643 * lex.c (do_identifier): Likewise.
4645 * typeck.c (build_unary_op): Likewise.
4647 1999-11-23 Mark Mitchell <mark@codesourcery.com>
4649 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
4651 1999-11-22 Mark Mitchell <mark@codesourcery.com>
4653 * cp-tree.def (CTOR_COMPLETE): New tree node.
4654 * decl.c (finish_constructor_body): Add it, to mark the end of the
4656 (finish_function): Don't call end_protect_partials here.
4657 * ir.texi (CTOR_COMPLETE): Document it.
4658 * semantics.c (expand_stmt): Handle it.
4660 * cp-tree.def (FUNCTION_NAME): New tree node.
4661 * cp-tree.h (current_function_name_declared): Tweak documentation.
4662 (lang_decl_flags): Add pretty_function_p, adjust dummy.
4663 (DECL_PRETTY_FUNCTION_P): New macro.
4664 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
4665 etc., in a template function. Use at_function_scope_p instead of
4666 expanding it inline.
4667 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
4669 (tsubst): Handle FUNCTION_NAME.
4670 (tsubst_copy): Likewise.
4671 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
4672 etc. in instantiation.
4673 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
4674 even in template functions.
4675 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
4676 conditional scope at the top of a destructor.
4678 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
4679 specializations too.
4681 1999-11-22 Nathan Sidwell <nathan@acm.org>
4683 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
4684 when actually negative.
4686 * typeck.c (convert_for_assignment): Expand comment about
4687 strange NULL check, moved from ...
4688 (convert_for_initialization): ... here. Remove unneeded
4691 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4693 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
4694 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
4695 Always destruct virtual bases of array components, but never
4697 (build_vec_init): Adjust invocations.
4698 (build_delete): Likewise.
4699 * decl2.c (delete_sanity): Likewise.
4701 1999-11-19 Nathan Sidwell <nathan@acm.org>
4703 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
4704 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
4705 * decl2.c (grok_method_quals): Accept `restrict' as applying to
4706 the object pointer. Return such qualifiers.
4707 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
4710 1999-11-18 Mark Mitchell <mark@codesourcery.com>
4712 * except.c (expand_end_catch_block): Fix typo.
4713 (expand_exception_blocks): Simplify. Don't call
4714 expand_leftover_cleanups.
4716 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
4718 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
4719 * pt.c (tsubst, case INTEGER_TYPE): Call it.
4720 Check uses_template_parms.
4722 * class.c (finish_struct): If we're a local class in a template
4723 function, add a TAG_DEFN.
4724 * pt.c (lookup_template_class): If this is a local class in a
4725 template function, call pushtag.
4726 (tsubst_expr, case TAG_DEFN): Handle classes, too.
4728 Emit debug info with the vtable.
4729 * search.c (maybe_suppress_debug_info): New function...
4730 * class.c (finish_struct_1): ...split out from here.
4731 * cp-tree.h: Declare it.
4732 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
4733 if we're writing out the vtable.
4734 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
4735 note_debug_info_needed): #if 0 out.
4737 1999-11-14 Mark Mitchell <mark@codesourcery.com>
4739 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
4740 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
4742 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
4743 * decl2.c (lookup_arg_dependent): Use it.
4745 * cp-tree.h (cp_finish_decl): Change prototype.
4746 (finish_static_data_member_decl): Likewise.
4747 (push_permanent_obstack): Remove declaration.
4748 (push_expression_obstack): Likewise.
4749 (push_scratch_obstack): Likewise.
4750 (DECL_TEMPLATE_PARM_P): Robustify.
4751 (SET_DECL_TEMPLATE_PARM_P): New macro.
4752 * class.c (add_method): Don't manipulate obstacks.
4753 (finish_vtbls): Likewise.
4754 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
4755 * decl.c (binding_for_name): Don't manipulate obstacks.
4756 (maybe_push_to_top_level): Likewise.
4757 (pop_from_top_level): Likewise.
4758 (duplicate_decls): Likewise.
4759 (pushdecl): Likewise.
4760 (implicitly_declare): Likewise.
4761 (build_typename_type): Likewise.
4762 (start_decl): Likewise.
4763 (cp_finish_decl): Likewise.
4764 (finish_decl): Likewise.
4765 (destroy_local_static): Likewise.
4766 (expand_static_init): Likewise.
4767 (complete_array_type): Likewise.
4768 (grokvardecl): Likewise.
4769 (build_ptrmemfnc_type): Likewise.
4770 (grokdeclarator): Likewise.
4771 (xref_tag): Likewise.
4772 (xref_basetypes): Likewise.
4773 (start_enum): Likewise.
4774 (finish_enum): Likewise.
4775 (start_function): Likewise.
4776 (finish_function): Likewise.
4777 (start_method): Adjust call to cp_finish_decl.
4778 * decl2.c (finish_static_data_member_decl): Don't manipulate
4780 (grokfield): Likewise.
4781 (grokbitfield): Likewise.
4782 (get_temp_name): Likewise.
4783 (get_sentry): Likewise.
4784 (fnish_file): Likewise.
4785 (lookup_arg_dependent): Likewise.
4786 * except.c (call_eh_info): Likewise.
4787 (push_eh_info): Likewise.
4788 (do_pop_exception): Likewise.
4789 (initialize_handler_parm): Likewise.
4790 (expand_end_eh_spec): Likewise.
4791 (alloc_eh_object): Likewise.
4792 (expand_throw): Likewise.
4793 * expr.c (extract_scalar_init): Likewise.
4794 * init.c (build_java_class_ref): Likewise.
4795 * lex.c (get_time_identifier): Likewise.
4796 (snarf_defarg): Likewise.
4797 (add_defarg_fn): Likewise.
4798 (is_global): Simplify.
4799 (do_identifier): Don't check TREE_PERMANENT.
4800 * method.c (emit_thunk): Don't manipulate obstacks.
4801 * parse.y (condition): Adjust call to cp_finish_decl.
4802 (primary): Likewise.
4803 (initdcl): Likewise.
4804 (initdcl0_innards): Likewise.
4805 (nomods_initdcl0): Likewise.
4806 * pt.c (push_inline_template_parms_recursive): Use
4807 SET_DECL_TEMPLATE_PARM_P.
4808 (process_template_parm): Likewise.
4809 (lookup_template_class): Don't manipulate obstacks.
4810 (instantiate_class_template): Adjust call to
4811 finish_static_data_member_decl.
4812 (tsubst_decl): Don't manipulate obstacks.
4813 (tsubst_expr): Likewise.
4814 (instantiate_template): Likewise.
4815 (instantiate_decl): Adjust calls to cp_finish_decl.
4816 * rtti.c (call_void_fn): Don't manipulate obstacks.
4817 (get_tinfo_var): Likewise.
4818 (get_tinfo_fn_unused): Likewise.
4819 (build_dynamic_cast_1): Likewise.
4820 (expand_si_desc): Likewise.
4821 (expand_class_desc): Likewise.
4822 (expand_ptr_desc): Likewise.
4823 (expand_attr_desc): Likewise.
4824 (expand_generic_desc): Likewise.
4825 (synthesize_tinfo_fn): Likewise.
4826 * search.c (expand_upcast_fixups): Likewise.
4827 * semantics.c (finish_asm_stmt): Likewise.
4828 (finish_named_return_value): Likewise.
4829 (begin_class_definition): Likewise.
4830 (finish_class_definition): Likewise.
4831 (finish_typeof): Likewise.
4832 * tree.c (build_cplus_method_type): Likewise.
4833 (reverse_path): Likewise.
4834 (copy_template_template_parm): Likewise.
4835 (build_expr_ptr_wrapper): Likewise.
4836 (push_expression_obstack): Remove.
4837 (push_permanent_obstack): Likewise.
4838 * typeck.c (mark_addressable): Likewise.
4840 1999-11-13 Mark Mitchell <mark@codesourcery.com>
4842 * call.c (build_conditional_expr): Use build_target_expr_with_type.
4843 (convert_like): Likewise.
4844 (build_over_call): Likewise.
4845 * cp-tree.h (build_target_expr): Remove.
4846 (build_target_expr_with_type): New function.
4847 * cvt.c (build_up_reference): Use get_target_expr.
4848 * decl.c (build_target_expr): Move to ...
4849 * tree.c (build_target_expr): Here. Make it static.
4850 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
4851 the temporary VAR_DECLs.
4852 (get_target_expr): Use it.
4854 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
4856 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
4857 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
4858 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
4859 * class.c (set_rtti_entry): Use it.
4861 1999-11-12 Mark Mitchell <mark@codesourcery.com>
4863 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
4865 * semantics.c (finish_expr_stmt): Call it here instead. Move
4866 default_conversion logic to semantic-analysis time.
4868 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
4870 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
4872 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4874 * init.c (init_init_processing): Re-instated Nov 11 patch after
4877 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4879 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
4880 Patch had not been approved yet.
4882 1999-11-12 Mark Mitchell <mark@codesourcery.com>
4884 * decl.c (compute_array_index_type): New function, split out from
4886 (create_array_type_for_decl): Likewise.
4887 (grokdeclarator): Use them.
4889 * semantics.c (expand_stmt): Don't suspend_momentary or
4892 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4894 * init.c (init_init_processing): Header information for
4895 arrays allocated via `new' should have the same alignment used by
4898 1999-11-10 Mark Mitchell <mark@codesourcery.com>
4900 * error.c (dump_function_name): Don't crash if given a friend
4901 pseudo-instantiation.
4903 * cp-tree.h (build_enumerator): Change prototype.
4904 * decl.c (enum_next_value): Remove.
4905 (enum_overflow): Likewise.
4906 (init_decl_processing): Don't register enum_next_value as a root.
4907 (start_enum): Clear TYPE_VALUES for a redefined enum.
4908 (finish_enum): Reset the type of enumeration constants.
4909 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
4910 we don't need to. Maintain the TYPE_VALUES list and look there
4911 for the previously defined enumeration constant. Let enumeration
4912 constants have the type of their values until the enumeration type
4914 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
4916 * parse.c: Regenerated.
4917 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
4919 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
4920 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4922 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
4924 1999-11-09 Mark Mitchell <mark@codesourcery.com>
4926 * cp-tree.h (language_function): Remove x_last_dtor_insn and
4927 x_last_parm_cleanup_insn.
4928 * decl.c (last_dtor_insn): Remove.
4929 (last_parm_cleanup_insn): Likewise.
4930 (expand_start_early_try_stmts): Don't set them.
4931 (store_parm_decls): Likewise.
4932 (save_function_data): Or save them.
4933 (mark_lang_function): Or mark them.
4935 1999-11-08 Mark Mitchell <mark@codesourcery.com>
4937 * decl.c (store_parm_decls): Generate cleanup code at
4938 semantic-analysis time. Destroy objects in the correct order.
4940 1999-11-07 Mark Mitchell <mark@codesourcery.com>
4942 * cp-tree.h (begin_new_placement): Remove.
4943 (finish_new_placement): Likewise.
4944 * class.c (finish_struct_1): Don't suspend_momentary or
4946 * decl.c (grokdeclarator): Likewise.
4947 (maybe_build_cleanup_1): Likewise.
4948 * except.c (push_eh_cleanup): Likewise.
4949 (build_terminate_handler): Likewise.
4950 * init.c (build_new_1): Likewise.
4951 * parse.y (parse_decl): Change prototype.
4952 (initdecls, notype_initdecls, initdcl): Don't return int.
4953 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
4954 (.begin_new_placement): Remove.
4955 (.finish_new_placement): Likewise.
4956 (nonmomentary_expr): Likewise.
4957 (suspend_mom): Likewise.
4958 (condition): Don't suspend_momentary, resume_momentary, or keep
4959 track of need to resume.
4960 (unary_expr): Likewise.
4961 (new_placement): Likewise.
4963 (structsp): Likewise.
4964 (new_type_id): Likewise.
4965 (maybe_parmlist): Likewise.
4966 (direct_after_type_declaration): Likewise.
4967 (direct_new_declarator): Likewise.
4968 (direct_abstract_declaration): Likewise.
4969 * parse.c: Regenerated.
4970 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
4971 * semantics.c (begin_new_placement): Remove.
4972 (finish_new_placement): Likewise.
4974 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4976 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
4977 (DECL_TEMPLATE_INFO): Use it.
4978 * decl.c (warn_extern_redeclared_static): Do nothing for
4980 * decl2.c (mark_used): Explicitly check for function or variable.
4981 * semantics.c (finish_unary_op_expr): Check whether result is also
4984 1999-11-05 Mark Mitchell <mark@codesourcery.com>
4986 * Makefile.in (typeck2.o): Depend on output.h.
4987 * typeck2.c: Include output.h.
4989 * decl.c (flag_ansi): Remove declaration.
4991 * pt.c (tinst_level_tick): Make it static.
4992 (last_template_error_tick): Likewise.
4994 * cp-tree.h (mapcar): Remove declaration.
4995 (search_tree): Likewise.
4996 (walk_tree_fn): New typedef.
4997 (walk_tree): New function.
4998 * tree.c (bot_manip): Change prototype. Adjust to be called via
5000 (bot_replace): Likewise.
5001 (no_linkage_helper): Likewise.
5002 (copy_tree_r): New function.
5003 (search_tree): Rename, and adjust, to become ...
5004 (walk_tree): New function.
5006 (target_remap): Remove.
5007 (target_remap_count): Likewise.
5008 (break_out_target_exprs): Use walk_tree.
5009 * decl.c (local_variable_p): Change prototype.
5010 (check_default_argument): Use walk_tree.
5011 * pt.c (for_each_template_parm_r): New function, split out from ...
5012 (for_each_template_parm): Here. Use it, via walk_tree.
5014 1999-11-03 Mark Mitchell <mark@codesourcery.com>
5016 * class.c (check_bitfield_decl): New function, split out from
5018 (check_field_decl): Likewise. Recursively examine members of
5020 (finish_struct_1): Use them.
5021 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
5023 1999-11-02 Mark Mitchell <mark@codesourcery.com>
5025 * decl.c (grokfndecl): Remove dead code.
5027 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
5029 1999-11-02 Scott Snyder <snyder@fnal.gov>
5031 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
5033 * pt.c (tsubst_copy): Likewise.
5035 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
5037 * decl2.c (maybe_make_one_only): Always make things comdat on
5040 1999-10-31 Mark Mitchell <mark@codesourcery.com>
5042 * decl.c (finish_function): Call free_after_parsing for functions
5043 we are not immediately turning into RTL.
5045 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
5047 * cp-tree.h (flag_dump_translation_unit): Add decl.
5049 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
5051 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
5053 1999-10-30 Mark Mitchell <mark@codesourcery.com>
5055 * decl.c (pop_cp_function_context): Don't call free on a NULL
5057 * semantics.c: Include ggc.h.
5058 (expand_body): Do garbage-collection after processing a template
5059 function. Clear DECL_SAVED_TREE after generating RTL for a
5061 * Makefile.in (semantics.o): Depend on ggc.h.
5063 1999-10-29 Mark Mitchell <mark@codesourcery.com>
5065 * cp-tree.h (make_typename_type): Change prototype.
5066 * decl.c (make_typename_type): Only complain if so requested.
5067 * parse.y (nested_name_specifier): Adjust calls.
5068 (typename_sub0): Likewise.
5069 (typename_sub1): Likewise.
5070 * parse.c: Regenerated.
5071 * pt.c (convert_template_argument): Pass complain to
5075 1999-10-28 Mark Mitchell <mark@codesourcery.com>
5077 * semantics.c (finish_handler): End the scope of the handler
5078 before attaching it to the statement-tree.
5080 1999-10-28 Ian Lance Taylor <ian@zembu.com>
5082 * rtti.c (build_dynamic_cast_1): Give a better error message for
5083 an attempt to dynamic_cast from a non-polymorphic type.
5085 1999-10-27 Mark Mitchell <mark@codesourcery.com>
5087 * cp-tree.h (make_temp_vec): Remove.
5088 (make_scratch_vec): Likewise.
5089 * call.c (add_function_candidate): Use make_tree_vec.
5090 (add_conv_candidate): Likewise.
5091 (build_builtin_candidate): Likewise.
5092 (add_template_candidate_real): Likewise.
5093 * class.c (resolve_address_of_overloaded_function): Likewise.
5094 * decl.c (start_function): Don't fool with the momentary obstack.
5095 (finish_function): Likewise.
5096 * init.c (expand_direct_vtbls_init): Likewise.
5097 (begin_init_stmts): Likewise.
5098 (finish_init_stmts): Likewise.
5099 * pt.c (add_to_template_args): Use make_tree_vec.
5100 (check_explicit_specialization): Likewise.
5101 (coerce_template_parms): Likewise.
5102 (lookup_template_class): Don't fool with the momentary obstack.
5103 (instantiate_class_template): Likewise.
5104 (tsubst_template_arg_vector): Use make_tree_vec.
5105 (tsubst_aggr_type): Don't fool with the momentary obstack.
5106 (tsubst_decl): Likewise. Use make_tree_vec.
5107 (try_one_overload): Likewise.
5108 (try_class_unification): Don't fool with the momentary obstack.
5109 (get_bindings_real): Use make_tree_vec.
5110 (set_mangled_name_for_template_decl): Likewise.
5111 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
5112 * semantics.c (finish_expr_stmt): Likewise.
5113 (finish_do_stmt): Likewise.
5114 (finish_for_expr): Likewise.
5115 (finish_switch_cond): Likewise.
5116 (do_pushlevel): Likewise.
5117 (do_poplevel): Likewise.
5118 * tree.c (make_temp_vec): Remove.
5120 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
5121 CLEANUP_P for a TRY_BLOCK.
5122 * ir.texi: Document SAVE_EXPR.
5124 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
5126 * call.c (build_over_call): Check that the built-in function is
5127 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
5128 * typeck.c (build_function_call_real): Similarly.
5130 1999-10-26 Mark Mitchell <mark@codesourcery.com>
5132 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
5135 1999-10-24 Mark Mitchell <mark@codesourcery.com>
5137 * decl.c (push_overloaded_decl_1): Use pushdecl.
5139 * decl.c (auto_function): Replace #ifdef'd __inline with just
5141 * lex.c (my_get_run_time): Likeise.
5142 (yyprint): Likewise.
5143 (identifier_type): Likewise.
5144 * method.c (start_squangling): Likewise.
5145 (end_squangling): Likewise.
5147 (old_backref_index): Likewise.
5148 (flush_repeats): Likewise.
5149 (issue_ktype): Likewise.
5150 * parse.y (empty_parms): Likewise.
5151 * parse.c: Regenerated.
5153 1999-10-21 Mark Mitchell <mark@codesourcery.com>
5155 * dump.c (dequeue_and_dump): Replace several uses of
5156 queue_and_dump_index with dump_child.
5158 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5160 * expr.c: Include tm_p.h.
5162 1999-10-21 Mark Mitchell <mark@codesourcery.com>
5164 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
5165 (pushlevel_temporary): Remove.
5166 (add_scope_stmt): New function.
5167 * decl.c (pushlevel_temporary): Remove.
5168 (poplevel): Use add_scope_stmt.
5169 (start_decl_1): Likewise.
5170 * semantics.c (add_scope_stmt): New function.
5171 (do_pushlevel): Use it.
5172 (do_poplevel): Use it.
5173 (expand_stmt): Check SCOPE_PARTIAL_P.
5175 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
5176 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
5177 * expr.c (cplus_expand_expr): Expand it.
5178 * ir.texi: Document EMPTY_CLASS_EXPR.
5180 1999-10-20 Mark Mitchell <mark@codesourcery.com>
5182 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
5183 parameters as having namespace scope.
5185 1999-10-19 Mark Mitchell <mark@codesourcery.com>
5187 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
5188 (mangling_flags): New type.
5189 (build_overload_int): Change prototype.
5190 (build_overload_value): Likewise.
5191 (numeric_output_need_bar): Improve comment.
5192 (mangle_expression): New function, broken out from ...
5193 (build_overload_int): Here.
5194 (build_overload_value): Adjust for use of mangling flags. Don't
5195 warn about real-valued template parameters here. Do handle
5196 complex expressions involving real-valued template parameters.
5197 (build_template_parm_names): Encase non-type template parameters
5198 in underscores, if necessary.
5199 (process_overload_item): Remove conditional on
5200 PARM_CAN_BE_ARRAY_TYPE.
5202 1999-10-17 Mark Mitchell <mark@codesourcery.com>
5204 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
5206 * ir.texi: Clean up documentation of RETURN_INIT.
5208 1999-10-15 Greg McGary <gkm@gnu.org>
5210 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
5211 (lang_init): Set default for flag_bounds_check if still "unspecified".
5213 1999-10-13 Andrew Haley <aph@cygnus.com>
5215 * class.c (finish_struct_1): Force alignment of non-bitfields to
5218 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
5220 * typeck2.c (process_init_constructor): Handle empty constructors.
5222 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
5224 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
5226 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
5229 1999-10-13 Mark Mitchell <mark@codesourcery.com>
5231 * decl.c (make_rtl_for_local_static): Don't create register RTL
5232 for addressable constants.
5234 1999-10-13 Nathan Sidwell <nathan@acm.org>
5236 * cp-tree.h (build_x_va_arg): Prototype new function.
5237 * call.c (build_x_va_arg): Define it.
5238 * parse.y (unary_expr): Call build_x_va_arg.
5240 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
5241 * call.c (convert_type_from_ellipsis): Define it.
5242 * decl.c (init_decl_processing): Set lang_type_promotes_to.
5244 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
5246 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
5248 * class.c (fixed_type_or_null): Always set *nonnull.
5250 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5252 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
5253 __GNUC__ and __GNUC_MINOR__.
5255 1999-10-09 Mark Mitchell <mark@codesourcery.com>
5257 * cp-tree.h (make_rtl_for_local_static): New function.
5258 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
5260 (make_rtl_for_local_static): Here.
5261 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
5263 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5265 * method.c: Include tm_p.h.
5267 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5269 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
5270 * lex.c (cp_make_lake_type): Likewise.
5271 * tree.c (init_tree): Init make_lang_type_fn.
5273 1999-10-07 Mark Mitchell <mark@codesourcery.com>
5275 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
5278 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
5279 local statics if we don't really have them.
5281 * ir.texi: Improve documentation for STMT_EXPR. Describe
5284 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
5286 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
5288 1999-10-07 Greg McGary <gkm@gnu.org>
5290 * class.c (finish_struct_1): Use simpler method of
5291 removing elements of a singly-linked list which doesn't
5292 lose for classes without data members.
5294 1999-10-07 Mark Mitchell <mark@codesourcery.com>
5296 * friend.c (make_friend_class): Robustify.
5298 * semantics.c (finish_object_call_expr): Reject calls to template
5301 1999-10-06 Mark Mitchell <mark@codesourcery.com>
5303 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
5305 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
5306 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
5308 * class.c (get_vfield_offset): Likewise.
5309 (finish_base_struct): Likewise.
5310 (modify_one_vtable): Likewise.
5311 (fixup_vtable_deltas): Likewise.
5312 (finish_struct_1): Likewise.
5313 * init.c (expand_virtual_init): Likewise.
5314 * search.c (lookup_field_1): Likewise.
5315 (expand_upcast_fixups): Likewise.
5316 * typeck.c (build_component_ref): Likewise.
5317 (build_binary_op_nodefault): Likewise.
5319 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
5320 * ir.texi: Document TYPE_VFIELD.
5322 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
5324 * decl.c (grokdeclarator): Only warn about non-zero arrays if
5325 !in_system_header (linux socketbits.h can give this for
5326 __cmsg_data, which is using a GNU extension).
5328 1999-10-05 Mark Mitchell <mark@codesourcery.com>
5330 * decl2.c (start_static_storage_duration_function): Push the
5331 function declaration so it ends up in namespace scope.
5333 * dump.c (DUMP_CHILDREN): Remove.
5334 (DUMP_BINFO): Adjust.
5335 (struct dump_node_info): Remove dump_children_p.
5336 (queue_and_dump_type): Remove dump_children_p parameter.
5337 (queue): Don't set dump_children_p.
5338 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
5339 queue_and_dump_index.
5340 (dequeue_and_dump): Unconditionally print children. Adjust calls
5341 to functions mentioned above.
5342 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
5344 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
5345 * dump.c (dequeue_and_dump): Dump them.
5347 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
5349 * decl.c (start_function): Set current_in_charge_parm for
5350 constructors, too, where appropriate.
5351 * search.c (fixup_all_virtual_upcast_offsets): New function.
5352 (expand_indirect_vtbls_init): Use it.
5354 1999-10-04 Nathan Sidwell <nathan@acm.org>
5356 * decl2.c (grok_alignof): Don't decay lvalues.
5358 * init.c (build_new): Remove unused variable.
5360 1999-10-04 Mark Mitchell <mark@codesourcery.com>
5362 * cp-tree.h (struct language_function): Remove static_labelno.
5363 (static_labelno): Remove macro.
5364 * method.c (build_overload_nested_name): Make static_labelno
5367 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
5368 to decide whether or not a function is defined.
5370 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
5371 situations where make_node will do it automatically.
5372 * decl.c (grok_reference_init): Likewise.
5373 (expand_static_init): Likewise.
5374 (do_static_initialization): Likewise.
5375 * init.c (perform_member_init): Likewise.
5376 (expand_aggr_init_1): Likewise.
5377 (build_new_1): Likewise.
5378 * method.c (do_build_copy_constructor): Likewise.
5379 (do_build_assign_ref): Likewise.
5380 * search.c (expand_upcast_fixups): Likewise.
5381 * semantics.c (finish_stmt_expr): Likewise.
5382 * typeck.c (build_unary_op): Likewise.
5383 (check_return_expr): Likewise.
5385 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
5387 * init.c (build_vec_delete_1): Fold COND_EXPRs.
5389 1999-10-03 Mark Mitchell <mark@codesourcery.com>
5391 * cp-tree.def (VEC_INIT_EXPR): Remove.
5392 * cp-tree.h (struct stmt_tree): New type.
5393 (struct saved_scope): Remove firstobj. Add x_saved_tree,
5395 (class_cache_firstobj): Remove.
5396 (struct language_function): Remove stmts_are_full_exprs_p,
5397 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
5398 (current_stmt_tree): New macro.
5399 (last_tree): Adjust.
5400 (last_expr_type): Likewise.
5401 (doing_semantic_analysis_p): Simplify.
5402 (stmts_are_full_exprs_p): Adjust.
5403 (begin_tree): Remove prototype.
5404 (end_tree): Likewise.
5405 (begin_stmt_tree): Change prototype.
5406 (finish_stmt_tree): Likewise.
5407 (building_stmt_tree): Simplify.
5408 * decl.c (mark_stmt_tree): New function.
5409 (mark_saved_scope): Use it.
5410 (start_function): Rearrange slightly to call begin_stmt_tree
5412 (save_function_data): Tweak.
5413 (finish_function): Adjust call to finish_stmt_tree.
5414 (mark_lang_function): Use mark_stmt_tree.
5415 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
5416 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
5417 (build_vec_init): Remove creation of stand-in intializer.
5418 * pt.c (begin_tree): Remove.
5419 (end_tree): Likewise.
5420 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
5421 (begin_compound_stmt): Handle a compound-statement outside of a
5423 (begin_stmt_expr): Handle a statement-expression outsidef of a
5425 (finish_stmt_expr): Likewise.
5426 (begin_class_definition): Don't call begin_tree.
5427 (finish_inline_definitions): Don't call end_tree.
5428 (begin_stmt_tree): Take a pointer to tree, not a function as input.
5429 (finish_stmt_tree): Likewise.
5430 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
5433 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
5434 * parse.c: Regenerated.
5436 * dump.c (dqueue_and_dump): Dump bitfieldness.
5438 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
5439 bitfields, rather than DECL_BIT_FIELD.
5440 * ir.texi: Document how to tell whether or not a field is a
5443 * lex.c (make_lang_type): Fix typo in comment.
5445 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
5447 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
5449 1999-10-01 Mark Mitchell <mark@codesourcery.com>
5451 * pt.c (tsubst_decl): If the type of a template instantiation is
5452 bogus, so is the whole instantiation.
5454 1999-09-30 Mark Mitchell <mark@codesourcery.com>
5456 * decl.c (initialize_local_var): Handle static variables here.
5457 (cp_finish_decl): Tweak handling of function-scope static
5459 * semantics.c (expand_stmt): Handle DECL_STMTs for static
5462 * method.c (emit_thunk): Don't crash when -fsyntax-only.
5464 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
5465 global_dtor_p. Add init_priority.
5466 (DECL_ACCESS): Adjust accordingly.
5467 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
5468 (GLOBAL_INIT_PRIORITY): Likewise.
5469 * decl.c (lang_mark_tree): Adjust accordingly.
5470 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
5471 and GLOBAL_INIT_PRIORITY.
5472 * dump.c (dequeue_and_dump): Print them.
5473 * ir.texi: Document them.
5475 * decl2.c (struct priority_info_s): Remove initialization_sequence
5476 and destruction_sequence.
5477 (start_static_storage_duration_function): Return the body of the
5478 function. Convert for function-at-a-time mode.
5479 (generate_inits_for_priority): Remove.
5480 (finish_static_storage_duration_function): Change prototype.
5481 Adjust for function-at-a-time mode.
5482 (do_static_initialization): Likewise.
5483 (do_static_destruction): Likewise.
5484 (do_static_initialization_and_destruction): Remove.
5485 (start_static_initialization_or_destruction): New function.
5486 (finish_static_initialization_or_destruction): Likewise.
5487 (get_priority_info): Don't manipulation initialization_sequence or
5488 destruction_sequence.
5489 (prune_vars_needing_no_initialization): New function.
5490 (write_out_vars): Likewise.
5491 (finish_file): Use the various new functions instead of the old.
5493 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
5495 * cp-tree.h (warn_float_equal): Declare.
5496 * decl2.c (warn_float_equal): Define.
5497 (lang_decode_option): Recognize -W[no-]float-equal.
5498 * typeck.c (build_binary_op_nodefault): Conditionally warn
5499 about equality tests of floating point types.
5501 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
5503 Support normal type_info-based EH mechanisms with -fno-rtti.
5504 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
5505 (build_eh_type_type_ref): Likewise.
5506 (build_eh_type): Remove.
5507 (expand_throw): Call build_eh_type_type, not build_eh_type.
5508 * decl2.c (import_export_decl): Don't associate the tinfo fn with
5509 the vtable if -fno-rtti.
5510 * decl.c (init_decl_processing): Always init_rtti_processing.
5512 * rtti.c (get_typeid): Don't complain about -fno-rtti.
5514 * class.c (class_cache_obstack, class_obstack): Remove.
5515 (init_class_processing): Don't initialize class_obstack.
5516 (push_cache_obstack): Remove.
5517 (pushclass): Don't call it.
5518 * cp-tree.h: Remove prototype for push_cache_obstack.
5519 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
5520 (pushlevel_class): Don't push_decl_level.
5521 (poplevel_class): Don't pop_stack_level.
5522 (push_class_level_binding): Don't push_cache_obstack.
5523 (init_decl_processing): Don't intialize decl_obstack.
5524 * search.c (push_class_decls): Don't push_cache_obstack.
5525 * tree.c (list_hash_add): Put hash node on permanent_obstack.
5526 (hash_tree_cons): Don't mess with obstacks.
5527 (print_lang_statistics): Don't print stats for class_obstack and
5530 1999-09-29 Mark Mitchell <mark@codesourcery.com>
5532 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
5533 * ir.texi: Document DECL_EXTERNAL.
5535 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
5536 * ir.texi: Document THUNK_DECLs.
5538 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
5539 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5540 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5541 * error.c (dump_template_bindings): Remove unused parameter.
5542 Handle multiple levels of template parameters.
5543 (dump_template_decl): Use `parms', not `args', for template
5544 parameters. Fix thinko.
5545 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
5546 flags to dump_template_bindings.
5547 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
5548 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
5549 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
5550 (tsubst_copy): Clarify variable name.
5551 (most_general_template): Robustify.
5553 1999-09-29 Nathan Sidwell <nathan@acm.org>
5555 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
5556 to change primary template rendering.
5558 1999-09-29 Mark Mitchell <mark@codesourcery.com>
5560 * cp-tree.h (UPT_TEMPLATE): Remove.
5561 (UPT_PARMS): Likewise.
5562 (DECL_NEEDED_P): New macro.
5563 * decl2.c (finish_vtable_vardecl): Use it.
5564 (finish_objects): Don't crash with -fsyntax-only.
5565 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
5567 * pt.c (tsubst_friend_function): Remove FIXME that talks about
5569 (tsubst_expr): Correct handling of function try-blocks.
5570 * semantics.c: Include flags.h.
5571 (expand_body): Don't do RTL generation if -fsyntax-only.
5572 * Makefile.in (semantics.o): Depends on flags.h.
5574 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
5576 * pt.c (most_general_template): Adjust declaration.
5578 * cp-tree.h: (most_general_template): Declare.
5580 * error.c (dump_template_value): Rename to ...
5581 (dump_template_argument): This.
5582 (dump_template_argument_list): New function.
5583 (dump_type): Use it.
5584 (dump_template_parameter): New function.
5585 (dump_template_decl): Use it.
5586 (dump_template_bindings): New function.
5587 (dump_function_decl): Use it. Pretty print function template
5590 1999-09-28 Nathan Sidwell <nathan@acm.org>
5592 * decl.c (grokdeclarator): Distinguish parameter context for
5593 diagnostics. Tidy up missing type diagnostic.
5594 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
5596 1999-09-28 Mark Mitchell <mark@codesourcery.com>
5598 * ir.texi: Improve documentation for TARGET_EXPR.
5600 1999-09-27 Nathan Sidwell <nathan@acm.org>
5602 Augment stringification of trees.
5603 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
5604 (fndecl_as_string, type_as_string_real, args_as_string,
5605 code_as_string, language_as_string, parm_as_string,
5606 op_as_string, assop_as_string, cv_as_string): Remove.
5607 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
5608 (context_as_string): Declare new function.
5609 * error.c (cp_printers): Move definition.
5611 (OB_END_TEMPLATE_ID): Adjust.
5612 (interesting_scope_p): Remove.
5613 (dump_scope): New static function.
5614 (dump_qualifiers): Adjust prototype, reimplement.
5615 (dump_template_value): Use tree_string_flags.
5616 (dump_type_real): Move back to dump_type.
5617 (dump_type): Adjust prototype. Use tree_string_flags.
5618 (dump_aggr_type): Likewise. Use dump_template_parms.
5619 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
5621 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
5622 (dump_simple_decl): Likewise.
5623 (dump_decl): Likewise. Use dump_template_decl.
5624 (dump_template_decl): New static function broken out of dump_decl.
5625 (dump_function_decl): Adjust prototype. Use tree_string_flags.
5626 (dump_parameters): Likewise. Prefix space.
5627 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
5628 (dump_function_name): Likewise. Use dump_template_parms.
5629 (dump_template_parms): New static function broken out of
5631 (dump_expr_list): Adjust prototype. Use tree_string_flags.
5632 (dump_expr): Likewise.
5633 (fndecl_as_string): Removed
5634 (type_as_string_real): Removed
5635 (dump_binary_op): Adjust prototype. Use tree_string_flags.
5636 (dump_unary_op): Likewise.
5637 (type_as_string): Likewise.
5638 (expr_as_string): Likewise.
5639 (decl_as_string): Likewise.
5640 (context_as_string): New function.
5641 (lang_decl_name): Adjust.
5642 (decl_to_string): New static print callback.
5643 (expr_to_string): Likewise.
5644 (fndecl_to_string): Likewise.
5645 (code_as_string): Renamed to ...
5646 (code_to_string): ... here. Adjust.
5647 (language_as_string): Renamed to ...
5648 (language_to_string): ... here. Adjust.
5649 (parm_as_string): Renamed to ...
5650 (parm_to_string): ... here.
5651 (op_as_string): Renamed to ...
5652 (op_to_string): ... here.
5653 (assop_as_string): Renamed to ...
5654 (assop_to_string): ... here.
5655 (type_to_string): New static print callback.
5656 (args_as_string): Renamed to ...
5657 (args_to_string): ... here. Adjust.
5658 (cv_as_string): Renamed to ...
5659 (cv_to_string): ... here. Adjust.
5660 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
5661 (print_template_context): Likewise.
5663 1999-09-26 Mark Mitchell <mark@codesourcery.com>
5665 * cp-tree.h (expand_throw): Remove prototype.
5666 * except.c (expand_throw): Make it static. Use tree-generation
5667 functions, rather than RTL-generation functions.
5668 (build_throw): Use it.
5669 * expr.c: Include except.h.
5670 (cplus_expand_expr): Don't call expand_throw here.
5671 * Makefile.in (expr.o): Depend on except.h.
5672 * ir.texi: Update documentation for THROW_EXPR.
5674 * decl.c (start_function): Set x_dont_save_pending_sizes rather
5675 than calling get_pending_sizes.
5676 * init.c (build_new): Don't save and restore
5677 immediate_size_expand; instead, assert that it has the expected
5680 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5682 * lex.c (compiler_error): Add missing call to va_end().
5684 1999-09-25 Mark Mitchell <mark@codesourcery.com>
5686 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
5687 * ir.texi: Document RESULT_DECL and DECL_RESULT.
5689 * cp-tree.h (check_return_expr): New function.
5690 * decl.c (finish_constructor_body): New function.
5691 (pushdecl): Put global friend functions in namespace binding
5692 level, not the class binding level.
5693 (finish_destructor_body): Make sure the dtor_label is always
5694 defined. Fix typo in comment.
5695 (finish_function): Move generation of constructor-termination code
5696 to semantic-analysis time. Move generation of implicit `main'
5697 return value to semantic-analysis time.
5698 * semantics.c (finish_return_stmt): Generate goto's to
5699 ctor_label/dtor_label here. Use check_return_expr to do semantic
5700 analysis on the returned expression.
5701 * typeck.c (maybe_warn_about_returning_address_of_local): New
5702 function split out from c_expand_return.
5703 (check_return_expr): Likewise.
5704 (c_expand_return): Just generate the RTL for the return.
5706 1999-09-24 Mark Mitchell <mark@codesourcery.com>
5708 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
5709 (cleanup_type): Likewise.
5710 (search_tree): Change prototype.
5711 * decl.c (local_variable_p): Adjust for new interface to
5713 (check_default_argument): Likewise.
5714 * error.c (dump_expr): Handle INIT_EXPR.
5715 * except.c (expand_throw): Don't make cleanup_type a local static.
5716 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
5717 * init.c (build_new): Call build_new_1 directly, rather than
5718 building a NEW_EXPR.
5719 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
5720 processing file-scope initializers.
5721 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
5722 * tree.c: Include splay-tree.h
5723 (no_linkage_helper): Adjust for new interface to search_tree.
5724 (search_tree): Pass around pointers to tree nodes, rather than the
5725 nodes themselves. Handle VEC_INIT_EXPR.
5726 (no_linkage_check): Adjust for new interface to search_tree.
5727 (mapcar): Handle VEC_INIT_EXPR.
5728 (target_remap): New variable.
5729 (bot_manip): Use it.
5730 (bot_replace): New function.
5731 (break_out_target_exprs): Use it to remap all variables used in a
5732 default argument expression.
5733 * typeck.c (build_modify_expr): Don't crash when outside a
5734 function and presented with an INIT_EXPR assignment
5735 * Makefile.in (tree.o): Depend on splay-tree.h.
5737 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5739 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
5741 (builtin_function): New arg CLASS. Arg CODE now of type int. All
5743 Set the builtin's DECL_BUILT_IN_CLASS.
5745 1999-09-24 Mark Mitchell <mark@codesourcery.com>
5747 * decl.c (pushdecl): Don't make local declarations of extern
5748 variables give the variable a DECL_CONTEXT for the function.
5749 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
5750 Don't accidentally make RTL for local declarations.
5751 (emit_local_var): Handle declarations with asm-specifiers here.
5753 1999-09-23 Mark Mitchell <mark@codesourcery.com>
5755 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
5756 STMT_IS_FULL_EXPR_P.
5758 * cp-tree.h (language_function): Add cannot_inline.
5759 * decl.c (start_function): Restore current_function_cannot_inline
5760 from the saved value.
5761 (save_function_data): Save current_function_cannot_inline.
5762 * decl2.c (start_objects): Change prototype. Build the function
5763 in function-at-a-time mode.
5764 (finish_objects): Likewise.
5765 (generate_ctor_or_dtor_function): Adjust accordingly.
5767 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
5768 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
5769 Don't call expand_anon_union_decl here
5770 * semantics.c (exapnd_stmt): Call it here, instead.
5771 * typeck.c (mark_addressable): Addressed variables are implicitly
5774 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5776 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
5777 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
5778 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
5779 * cp-tree.h: Add tree checking macros to various tree access
5781 * ptree.c (print_lang_decl): Test for function or variable
5782 before accessing template info.
5784 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
5786 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
5787 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
5788 * decl2.c (lang_f_options): Add -fshort-wchar.
5789 * cp-tree.h: Declare flag_short_wchar.
5790 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
5793 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5795 * ir.texi: Fix formatting errors and typos.
5797 1999-09-22 Mark Mitchell <mark@codesourcery.com>
5799 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
5801 * decl.c (pushdecl): Do create a binding for extern "C" functions,
5802 but not for their DECL_ASSEMBLER_NAMEs.
5803 (lookup_name_current_level): Fix formatting.
5804 (xref_tag): Likewise.
5805 * decl2.c (start_objects): Mark static constructors and
5806 destructors as used.
5808 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
5810 * decl.c (define_case_label): Don't crash if we're not in a switch.
5812 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
5813 * lang-options.h: Restore -fthis-is-variable. Remove help strings
5814 for unsupported flags.
5816 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
5818 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
5819 Accept and warn about -fthis-is-variable.
5821 1999-09-21 Mark Mitchell <mark@codesourcery.com>
5823 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
5824 CLEANUP_STMT, and SCOPE_STMT.
5826 * decl2.c (lang_decode_option): Adjust, in the wake of recent
5827 changes to option processing.
5829 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5831 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
5832 function pointer from pmfs with no object given.
5833 (convert_for_assignment): Do not return error when converting
5836 1999-09-21 Alex Samuel <samuel@codesourcery.com>
5838 * lex.c (internal_filename): New variable.
5839 (INTERNAL_FILENAME): New macro.
5840 (init_parse): Allocate internal_filename and mark as root. Use it
5841 instead of a string constant.
5843 1999-09-21 Nathan Sidwell <nathan@acm.org>
5845 Reimplement dynamic cast and catch matching.
5846 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
5847 * search.c (dynamic_cast_base_recurse): New function.
5848 (get_dynamic_cast_base_type): New function for dynamic cast.
5849 * rtti.c (build_dynamic_cast_1): Determine source and target
5850 class relationship. Call __dynamic_cast_2.
5851 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
5852 (__user_type_info::dyncast): New dynamic cast dispatcher.
5853 (__user_type_info::sub_kind): New nested enumeration.
5854 (__user_type_info::contained_p): sub_kind predicate.
5855 (__user_type_info::contained_public_p): Likewise.
5856 (__user_type_info::contained_nonpublic_p): Likewise.
5857 (__user_type_info::contained_nonvirtual_p: Likewise.
5858 (__user_type_info::upcast_result): New nested struct.
5859 (__user_type_info::dyncast_result): New nested struct.
5860 (*::do_upcast): New catch function.
5861 (*::do_dyncast): New dynamic cast function.
5862 (__user_type_info::find_public_subobj): New dynamic cast
5864 (*::do_find_public_subobj): New dynamic cast helper function.
5865 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
5866 (__user_type_info::dyncast): Define dynamic cast dispatcher.
5867 (*::do_upcast): Define catch function.
5868 (*::do_dyncast): Define dynamic cast function.
5869 (*::do_find_public_subobj): Define dynamic cast helper function.
5870 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
5871 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
5872 (__dynamic_cast_2): New dynamic cast runtime.
5874 1999-09-20 Mark Mitchell <mark@codesourcery.com>
5876 * cp-tree.h (finish_stmt_expr): Change prototype.
5877 * expr.c (cplus_expand_expr): Adjust call accordingly.
5878 * init.c (finish_init_stmts): Likewise.
5879 * parse.y (primary): Likewise.
5880 * pt.c (tsubst_copy): Likewise.
5881 * semantics.c (finish_stmt_expr): Don't take two parameters.
5882 Don't remove generated BLOCKs from the block-tree.
5884 Remove support for assigning to `this'.
5885 * NEWS: Note that fact.
5886 * class.c (build_vbase_path): Don't check flag_this_is_variable.
5887 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
5888 (language_function): Remove assigns_this, just_assigned_this, and
5889 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
5890 (base_init_expr): Remove.
5891 (current_vcalls_possible_p): New macro.
5892 (vtbls_set_up_p): Likewise.
5893 (emit_base_init): Change prototype.
5894 * decl.c (finish_destructor_body): New function, split out from
5896 (current_function_assigns_this): Remove.
5897 (current_function_just_assigned_this): Likewise.
5898 (start_function): Don't set them.
5899 (finish_function): Don't check them. Don't emit
5900 base-initialization code here. Generate code for destructors when
5901 doing semantic analysis.
5902 (finish_stmt): Don't check current_function_just_assigned_this.
5903 * decl2.c (lang_f_options): Remove this-is-variable.
5904 (lang_decode_option): Likewise.
5905 (grokclassfn): Don't check flag_this_is_variable.
5906 * init.c (emit_base_init): Return the expression generated.
5907 (construct_virtual_bases): Don't push/pop obstacks. Fix
5909 (build_new_1): Don't check flag_this_is_variable.
5910 (get_temp_regvar): Don't set DECL_REGISTER.
5911 (build_vec_init): Don't call use_variable.
5912 * lang-options.h: Remove "-fthis-is-variable" and
5913 "-fno-this-is-variable".
5914 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
5915 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
5917 * semantics.c (finish_expr_stmt_real): Rename to ...
5918 (finish_expr_stmt): This. Remove assigned_this parameter.
5919 (begin_if_stmt): Call do_pushlevel before starting the statement.
5920 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
5922 (setup_vtbl_ptr): Emit initialization code for bases and members
5923 at semantic-analysis time. Emit code to initialize vtables in
5925 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
5926 Don't handle CTOR_INITIALIZER any more.
5927 * typeck.c (build_modify_expr): Don't check for assignments to
5929 (c_expand_return): Don't suggest assigning to `this'.
5931 * Makefile.in (decl.o): Depend on RTL_H.
5932 (decl2.o): Likewise.
5933 (class.o): Likewise.
5935 (method.o): Likewise.
5936 (search.o): Likewise.
5940 * decl.c (duplicate_decls): When a builtin function is redeclared
5941 as static, make sure it is mangled correctly.
5943 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
5944 detail about the statement-tree.
5946 1999-09-20 Nathan Sidwell <nathan@acm.org>
5948 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
5950 1999-09-20 Nick Clifton <nickc@cygnus.com>
5952 * decl2.c (lang_decode_option): Extend comment.
5954 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5956 * typeck.c: Include "tm_p.h".
5958 1999-09-19 Mark Mitchell <mark@codesourcery.com>
5960 * ir.texi: New file.
5962 1999-09-19 Paul Burchard <burchard@pobox.com>
5964 * semantics.c (expand_stmt): Initialize return value.
5966 1999-09-18 Paul Burchard <burchard@pobox.com>
5968 * gxxint.texi: G++ now implements namespaces.
5970 1999-09-18 Mark Mitchell <mark@codesourcery.com>
5972 * decl.c (pop_label): Don't warn about unused labels more than
5974 * semantics.c (finish_goto_stmt): Always marked used labels as
5977 * decl.c (layout_var_decl): Change prototype. Call layout_decl
5978 even when the declaration is external.
5979 (cp_finish_decl): Adjust call to layout_var_decl.
5980 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
5982 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
5984 * typeck.c (get_member_function_from_ptrfunc): Always consider
5985 virtuality inside member pointer.
5987 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5989 Turn on function-at-a-time processing.
5990 * cp-tree.h (doing_semantic_analysis_p): New macro.
5991 (SF_DEFAULT): Define to zero, not SF_EXPAND.
5992 (start_handler_parms): Change prototype.
5993 (expand_start_catch_block): Likewise.
5994 (expand_end_catch_block): Likewise.
5995 (expand_start_eh_spec): Likewise.
5996 (expand_end_eh_spec): Declare.
5997 (finish_handler_parms): Change prototype.
5998 (begin_catch_block): Declare.
5999 (finish_handler): Change prototype.
6000 (do_pushlevel): Declare.
6001 (do_poplevel): Likewise.
6002 * decl.c (pushlevel): Don't create
6003 binding levels when not doing semantic analysis.
6004 (poplevel): Don't pop them.
6005 (pushdecl): Assert that we are never called when not doing
6007 (pushdecl_top_level): Use push_to_top_level.
6008 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
6009 label when expanding.
6010 (cp_finish_decl): Only inject for-scope variables when doing
6011 semantic analysis. Add comments.
6012 (start_handler_parms): Return the handler parm.
6013 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
6014 already set. Reinitialize from saved function data if available.
6015 Don't pushlevel when not doing semantic analysis.
6016 (store_parm_decls): Only generate RTL when expanding. Only
6017 pushdecl when doing semantic analysis. Set
6018 current_eh_spec_try_block if appropriate.
6019 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
6020 Combine common code. Don't poplevel when not doing semantic
6022 (push_cp_function_context): Don't expand functions without an
6023 explicit call to expand_body.
6024 (mark_lang_function): Make eh_spec_try_block and
6026 * except.c (expand_end_eh_spec): Don't
6028 (process_start_catch_block): Likewise.
6029 (push_eh_cleanup): Use finish_decl_cleanup.
6030 (initialize_handler_parm): New function.
6031 (expand_start_catch_block): Use it.
6032 (expand_end_catch_block): Use tree-generation functions, not
6033 RTL-generation functions.
6034 (expand_start_eh_spec): Likewise.
6035 (expand_end_eh_spec): Likewise.
6036 (expand_exception_blocks): Simplify.
6037 (start_anon_func): Use do_pushlevel.
6038 (end_anon_func): Use do_poplvel. Call expand_body for the
6040 * expr.c (do_case): Don't call define_case_label.
6041 * init.c (create_temporary_var): Set DECL_CONTEXT for local
6043 * method.c (emit_thunk): Call expand_body for the
6045 (sythesize_method): Likewise.
6046 * parse.y (handler_args): Give it ttype.
6047 (eat_saved_input): Call expand_body.
6048 (base_init): Use do_pushlevel.
6049 (pending_inline): Call expand_body.
6050 (handler): Adjust calls to finish_handler_parms and
6052 (handler_args): Don't call expand_start_catch_block. Return the
6053 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
6054 * parse.c: Regenerated.
6055 * rtti.c (synthesize_tinfo_fn): Call finish_function.
6056 * semantics.c (do_pushlevel): Give it external linkage. Build
6058 (do_poplevel): Likewise.
6059 (finish_case_label): Call define_case_label when doing semantic
6061 (finish_goto_stmt): Create RTL for labels.
6062 (finish_function_try_block): Set in_function_try_handler
6064 (finish_function_handler_sequence): Unset it.
6065 (finish_handler_parms): Use expand_start_catch_block even when
6066 building a statement-tree.
6067 (begin_catch_block): New function.
6068 (finish_handler): Move a little RTL-generation logic here.
6069 (finish_decl_cleanup): Allow cleanups for empty declarations.
6070 (finish_named_return_value): Don't pushdecl when not doing
6072 (expand_stmt): Don't do semantic analysis for variable
6073 declarations. Handle START_CATCH_STMT. Call expand_label
6074 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
6075 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
6076 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
6077 RETURN_INIT and function try blocks.
6079 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
6080 x_scope_stmt_stack. Add x_in_charge_parm.
6081 (current_eh_spec_try_block): New macro.
6082 (current_scope_stmt_stack): Likewise.
6083 (current_in_charge_parm): Likewise.
6084 * decl.c (start_function): Initialize current_in_charge_parm.
6085 (finish_function): Use current_in_charge_parm rather than looking
6087 * search.c (expand_indirect_vtbls_init): Likewise.
6089 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
6090 (TRY_BLOCK): Likewise.
6091 (HANDLER): Likewise.
6092 (START_CATCH_STMT): New tree node.
6093 (SCOPE_STMT): Likewise.
6094 * cp-tree.h (SCOPE_BEGIN_P): New macro.
6095 (SCOPE_NULLIFIED_P): Likewise.
6096 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
6097 (struct lang_decl): Add saved_language_function.
6098 (DECL_PENDING_INLINE_INFO): Adjust documentation.
6099 (DECL_PENDING_INLINE_P): New macro.
6100 (TYPE_TI_ARGS): Fix typo in comment.
6101 (DECL_SAVED_TREE): Add to documentation.
6102 (DECL_SAVED_FUNCTION_DATA): New macro.
6103 (START_CATCH_TYPE): Likewise.
6104 (SCOPE_END_P): New macro.
6105 (declare_parm_level): Don't declare.
6106 * decl.c (mark_lang_function): New function, split out from
6107 mark_cp_function_context.
6108 (save_function_data): New function.
6109 (declare_parm_level): Remove.
6110 (finish_function): Use save_function_data to squirrel away
6111 important stuff for later use.
6112 (mark_cp_function_context): Use mark_function_data.
6113 (lang_mark_tree): Likewise.
6114 * lex.c (begin_definition_of_inclass_inline): Set
6115 DECL_PENDING_INLINE_P.
6116 (store_pending_inline): Clear it.
6117 * pt.c (tsubst_decl): Likewise.
6119 1999-09-17 Nathan Sidwell <nathan@acm.org>
6121 * call.c (perform_implicit_conversion): Deal with error_mark_node.
6123 1999-09-17 Mark Mitchell <mark@codesourcery.com>
6125 * decl.c (warn_extern_redeclared_static): Don't get confused by
6126 static member functions.
6127 (duplicate_decls): Merge DECL_THIS_STATIC.
6129 * decl.c (expand_static_init): Make sure assignments to local
6130 statics actually occur.
6132 1999-09-17 Mark Mitchell <mark@codesourcery.com>
6134 * cp-tree.h (poplevel_class): Declare.
6135 * class.c (popclass): Use poplevel_class, not poplevel.
6136 * decl.c (poplevel_class): Don't make it static. Don't return a
6138 (poplevel): Don't call poplevel_class; abort in a class
6139 binding level is seen.
6140 * semantics.c (finish_translation_unit): Use pop_everything.
6141 * parse.y (member_init): Allow errors.
6142 (pending_inline): Call finish_function.
6143 * parse.c: Regenerated.
6144 * Makefile.in (CONFLICTS): Adjust.
6146 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
6148 * error.c: Reduce code duplication.
6149 (dump_template_value): New function.
6150 (dump_type_real): Use it.
6151 (dump_decl): Likewise.
6152 (dump_function_name): Likewise.
6153 (dump_function_decl): Don't be too talkative about function return
6156 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6158 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
6160 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
6162 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
6164 * decl2.c (finish_file): Also call check_global_declarations for
6165 the pending_statics list.
6167 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
6169 * lex.c (cp_pragma_implementation): Allow #pragma implementation
6172 1999-09-15 Richard Henderson <rth@cygnus.com>
6174 * lex.c (mark_impl_file_chain): Follow the next chain.
6176 1999-09-15 Mark Mitchell <mark@codesourcery.com>
6178 * decl.c (warn_extern_redeclared_static): Simplify. Catch
6179 problems with extern "C" functions redeclared as static.
6180 (duplicate_decls): When a builtin is redeclared static, make the
6181 new function have internal linkage.
6183 1999-09-15 Mark Mitchell <mark@codesourcery.com>
6185 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
6186 * pt.c (tsubst_copy): Likewise.
6187 * tree.c (search_tree): Likewise.
6190 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6192 * typeck2.c (ack): Don't declare progname.
6194 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
6196 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
6197 filenames with ggc_alloc_string.
6199 1999-09-14 Mark Mitchell <mark@codesourcery.com>
6201 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
6203 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
6205 * cvt.c (build_up_reference): Likewise.
6206 * tree.c (build_cplus_new): Likewise.
6207 (get_target_expr): Likewise.
6209 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
6211 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
6213 1999-09-13 Mark Mitchell <mark@codesourcery.com>
6215 * cp-tree.h (build_target_expr): New function.
6216 * call.c (build_conditional_expr): Use build_target_expr.
6217 (convert_like): Likewise.
6218 (build_over_call): Likewise.
6219 * cvt.c (build_up_reference): Likewise.
6220 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
6221 (destroy_local_var): Here.
6222 (build_target_expr): New function.
6223 * tree.c (build_cplus_new): Use it.
6224 (get_target_expr): Likewise.
6226 1999-09-13 Nathan Sidwell <nathan@acm.org>
6228 * typeck.c (expr_sizeof): Don't decay arrays and functions.
6229 Remove misleading comment.
6230 (build_compound_expr): Don't decay arrays.
6232 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
6234 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
6235 class rvalues again.
6237 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6239 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
6241 * g++spec.c: Include gcc.h.
6242 (lang_specific_driver): Constify a char*. Call xcalloc, not
6243 xmalloc/bzero. All calls to the function pointer parameter now
6244 explicitly call `fatal'.
6246 1999-09-12 Mark Mitchell <mark@codesourcery.com>
6248 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
6249 * cvt.c (ocp_convert): Complete the from and destination types.
6250 Adjust warning about functions always being `true' in conditionals.
6251 * decl.c (duplicate_decls): Don't play funny games with abort.
6252 * error.c (dump_expr): Handle OVERLOADs.
6253 * spew.c (probe_obstack): Remove.
6254 * typeck.c (condition_conversion): Use perform_implicit_conversion.
6256 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
6258 * cp-tree.h (auto_function, define_function): Adjust prototypes.
6259 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
6261 (auto_function): Likewise, for CODE arg.
6262 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
6263 (builtin_function): ... here.
6265 1999-09-11 Mark Mitchell <mark@codesourcery.com>
6267 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
6268 (init_decl_processing): Don't set TREE_PERMANENT for the
6270 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
6271 (grokdeclarator): Likewise.
6272 (grokparms): Don't check TREE_PERMANENT when building up lists.
6273 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
6274 (mark_inline_for_output): Likewise.
6275 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
6276 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
6277 * lex.c (check_newline): Don't check ggc_p; it is always one.
6278 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
6279 * spew.c (yylex): Don't copy_node or probe_obstacks for
6280 non-permanent CONSTANTs and STRINGs.
6281 * tree.c (build_cplus_array_type_1): Don't fuss with
6282 TREE_PERMANENT on ARRAY_TYPEs.
6284 * cp-tree.def (CLEANUP_STMT): New node.
6285 * cp-tree.h (language_function): Add name_declared.
6286 (current_function_name_declared): New macro.
6287 (CLEANUP_DECL): New macro.
6288 (CLEANUP_EXPR): Likewise.
6289 (emit_local_var): Likewise.
6290 (finish_decl_cleanup): New function.
6291 * cvt.c (build_up_reference): Simplify.
6292 (ocp_convert): Remove dead code.
6293 * decl.c (start_decl): Remove call to add_decl_stmt.
6294 (grok_reference_init): Adjust, to handle bindings temporaries to
6295 references. Remove dead code.
6296 (initialize_local_var): Don't generate RTL for
6297 declarations here, or build cleanups here. Don't fuss with
6298 obstacks. Replace expand_start_target_temps calls with explicit
6299 setting of stms_are_full_exprs_p.
6300 (destroy_local_var): New function.
6301 (emit_local_var): Likewise.
6302 (cp_finish_decl): Use them, as appropriate.
6303 (start_function): Announce template functions.
6304 (store_parm_decls): Don't call declare_function_name here.
6305 (finish_stmt): Don't start emit base-initialization code when just
6306 building the statement-tree.
6307 * init.c (create_temporary_var): Move add_decl_stmt call ...
6308 (get_temp_regvar): Here.
6309 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
6310 cp_finish_decl would expect. Don't call add_decl_stmt.
6311 * semantics.c (begin_compound_stmt): Call declare_function_name,
6313 (finish_decl_cleanup): New function.
6314 (expand_stmt): Use emit_local_var to output variables.
6315 (expand_body): Set current_funtion_name_declared.
6317 1999-09-10 Mark Mitchell <mark@codesourcery.com>
6319 * cp-tree.h (finish_cleanup_try_block): New function.
6320 * semantics.c (finish_cleanup_try_block): Add comment.
6322 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
6324 * cp-tree.h: Delete declarations for all tree nodes now moved to
6326 * decl.c: Delete their definitions.
6327 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
6328 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
6330 (init_decl_processing): Call build_common_tree_nodes and
6331 build_common_tree_nodes_2 instead of building their nodes here.
6332 Don't add gc roots for them.
6334 1999-09-10 Mark Mitchell <mark@codesourcery.com>
6336 * cp-tree.h (language_function): Rename expanding_p to
6337 x_expanding_p. Rename named_label_uses to x_named_label_uses.
6338 (expanding_p): Adjust accordingly.
6339 (TREE_VIA_PRIVATE): Fix typo in comment.
6340 (DECL_REFERENCE_SLOT): Remove.
6341 (SET_DECL_REFERENCE_SLOT): Likewise.
6342 * decl.c (named_label_uses): Adjust. Remove chicken comment.
6343 (push_overloaded_decl): Don't truncate the chain of bindings when
6344 adding an overloaded function.
6345 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
6346 (initialize_local_var): Fix typo in comment.
6347 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
6348 * decl2.c (start_objects): Make the fact that we are expanding
6349 the generated function right away explicit.
6350 (start_static_storage_duration_function): Likewise.
6351 (finish_file): Fix typo in comment.
6352 * init.c (build_vec_init): Correct bugs in handling cleanups.
6353 * semantics.c (maybe_convert_cond): New function.
6354 (FINISH_COND): Always store the condition, even if there's
6356 (finish_if_stmt_cond): Use maybe_convert_cond.
6357 (finish_while_stmt_cond): Likewise.
6358 (finish_do_stmt): Likewise.
6359 (finish_for_cond): Likewise.
6360 (expand_cond): Adjust.
6362 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
6363 * init.c (perform_member_init): Remove obstack machinations.
6364 (expand_cleanup_for_base): Likewise.
6365 (finish_init_stmts): Mark the statement-expression as used.
6366 * method.c (emit_thunk): Use tree-generating functions, not
6368 (do_build_copy_constructor): Likewise.
6369 (do_build_assign_ref): Likewise.
6370 (synthesize_method): Likewise. Keep track of line numbers.
6371 * pt.c (tsubst_expr): Handle various kinds of try blocks.
6372 * semantics.c (expand_stmts): Remove.
6373 (begin_function_try_block): Set FN_TRY_BLOCK_P.
6374 (finish_function_try_block): Be careful rechaining
6375 function try blocks.
6376 (expand_stmt): Loop through all the statements at a given level.
6377 (exapnd_body): Be careful with line-numbers here too. Prepare for
6378 being called directly from the parser.
6380 * cp-tree.h (finish_function): Adjust prototype.
6381 * decl.c (finish_function): Return the function compiled.
6382 * pt.c (instantiate_decl): Don't play games with obstacks.
6383 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
6384 (search_tree): Likewise.
6385 * typeck.c: Fix typo in comment.
6386 * typeck2.c (store_init_value): Add comment.
6388 * cp-tree.h (CPTI_ATEXIT): New macro.
6389 (atexit_node): Likewise.
6390 * decl.c (destroy_local_static): New function, broken out from ...
6391 (expand_static_init): Here.
6393 * rtti.c (get_tinfo_var): These should always be global
6394 (expand_si_desc): Use tree, not RTL, functions to generate code.
6395 (expand_class_desc): Likewise.
6396 (expand_ptr_desc): Likewise.
6397 (expand_attr_desc): Likewise.
6398 (expand_generic_desc): Likewise.
6399 (synthesize_tinfo_fn): Likewise.
6401 1999-09-09 Mark Mitchell <mark@codesourcery.com>
6403 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
6404 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
6406 (RECHAIN_STMST_FROM_CHAIN): Likewise.
6408 * parse.y (simple_stmt): Fix typo in last change.
6410 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
6411 (STMT_IS_FULL_EXPR_P): Likewise.
6412 (STMT_LINENO_FOR_FN_P): Likewise.
6413 (prep_stmt): New function.
6414 (building_stmt_tree): Tweak for safety.
6415 * pt.c (tsubst_expr): Use prep_stmt throughout.
6416 (add_tree): Move it to semantics.c
6417 * semantics.c (add_tree): Move it here.
6418 (finish_expr_stmt_real): New function.
6419 (finish_expr_stmt): Use it.
6420 (finish_if_stmt_cond): Use FINISH_COND.
6421 (finish_while_stmt_cond): Likewise.
6422 (finish_for_cond): Likewise.
6423 (finish_stmt_tree): Tweak line-number handling.
6424 (prep_stmt): New function.
6425 (expand_stmt): Use it.
6427 * cp-tree.h (begin_switch_stmt): Adjust prototype.
6428 (finish_switch_cond): Likewise.
6429 * parse.y (simple_stmt): Adjust accordingly.
6430 * parse.c: Regenerated.
6431 * pt.c (tsubst_expr): Adjust accordingly.
6432 * semantics.c (expand_cond): New function.
6433 (FINISH_COND): New macro.
6434 (begin_switch_stmt): Build the SWITCH_STMT here.
6435 (finish_switch_stmt_cond): Not here.
6436 (expand_stmt): Adjust calls to begin_switch_stmt and
6437 finish_switch_cond. Use expand_cond throughout.
6439 * dump.c (dequeue_and_dump): Dump types for constants.
6440 Describe DECL_ARG_TYPE more intuitively.
6443 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
6444 (lang_cleanup_tree): Remove.
6445 * lex.c (make_lang_type): Use ggc_alloc to allocate
6448 Reorganize per-function data.
6449 * cp-tree.h (saved_scope): Add function_decl, bindings.
6450 (language_function): Rename binding_level to bindings.
6451 (cp_function_chain): Use the current_function, not the
6452 outer_function_chain.
6453 (current_class_ptr): Make it work, even when there's no
6455 (current_class_ref): Likewise.
6456 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
6458 (clear_temp_name): Remove.
6459 * decl.c (check_function_type): New function, broken out from
6461 (current_binding_level): Adjust definition.
6462 (pushlevel): Simplify.
6463 (poplevel): Don't use named_label_uses when we're outside
6465 (mark_saved_scope): Mark function_decl and bindings.
6466 (maybe_push_to_top_level): Don't unconditionally push a new
6467 function context. Save bindings and the current_function_decl.
6468 Don't clear named_labels.
6469 (pop_from_top_level): Pop function context if appropriate.
6470 (init_decl_processing): Set init_lang_status and free_lang_status,
6471 rather than save_lang_status and restore_lang_status.
6472 (start_function): Take SF_* flags. Don't clear per-function data.
6473 Reorder and simplify to use new per-function data code. Add
6475 (store_parm_decls): Don't call init_function_start here.
6476 (finish_function): Adjust for new handling of per-function data.
6477 (push_cp_function_context): Simplify.
6478 (mark_cp_function_context): Change binding_level to bindings.
6479 * decl2.c (clear_temp_name): Remove.
6480 (start_objects): Use SF flags to start_function.
6481 (start_static_storage_duration_function): Likewise.
6482 * except.c (start_anon_func): Remove redundant calls to
6483 push_function_context_to. Use SF flags to start function.
6484 (end_anon_func): Remove redundant call to pop_function_context
6486 * lex.c (reinit_parse_for_function): Don't initialize per-function
6488 * method.c (emit_thunk): Clear current_function after calling
6489 assemble_end_function. Use SF flags for start_function.
6490 (synthesize_method): Use SF flags for start_function.
6491 * parse.c: Regenerated.
6492 * parse.y (fn.defpen): Likewise.
6493 (pending_inline): Clear current_function, even if something goes
6495 * pt.c (instantiate_decl): Use SF flags to start_function.
6496 Don't save and restore expanding_p.
6497 (add_tree): Handle the case where we are outside any function.
6498 (end_tree): Likewise.
6499 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
6500 * semantics.c (begin_function_definition): Likewise.
6501 (expand_body): Likewise.
6503 1999-09-09 Nathan Sidwell <nathan@acm.org>
6505 * cp-tree.h (convert_to_void): Prototype new function.
6506 (require_complete_type_in_void): Remove prototype.
6507 * cvt.c (convert_to_void): New function.
6508 (ocp_convert): Use convert_to_void.
6509 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
6511 * typeck.c (require_complete_type_in_void): Remove function.
6512 (build_compound_expr): Use convert_to_void.
6513 (build_static_cast): Likewise.
6514 (build_c_cast): Likewise.
6515 * semantics.c (finish_expr_stmt): Do not decay full expressions.
6517 * typeck.c (build_x_compound_expr): Add FIXME.
6519 1999-09-08 Mark Mitchell <mark@codesourcery.com>
6521 * cp-tree.h (scratch_tree_cons): Remove.
6522 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
6523 and perm_tree_cons with plain tree_cons.
6524 * class.c: Likewise.
6526 * decl2.c: Likewise.
6527 * except.c: Likewise.
6531 * method.c: Likewise.
6532 * parse.y: Likewise.
6536 * search.c: Likewise.
6537 * typeck.c: Likewise.
6538 * parse.c: Regenerated.
6539 * tree.c (build_srcloc): Simplify.
6541 1999-09-08 Bruce Korb autogen@linuxbox.com
6543 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
6545 1999-09-08 Mark Mitchell <mark@codesourcery.com>
6547 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
6549 (LANG_DECL_PERMANENT): Remove.
6550 * decl.c (duplicate_decls): Don't mess about with obstacks trying
6552 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
6553 * lex.c (free_lang_decl_chain): Remove.
6554 (build_lang_decl): Don't use obstacks.
6555 (retrofit_lang_decl): Likewise.
6556 (copy_lang_decl): Likewise.
6558 * cp-tree.h (saved_scope): Remove old_binding_level and
6559 function_decl. Tidy up.
6560 * decl.c (mark_saved_scope): Don't set them.
6561 (maybe_push_to_top_level): Clear memory.
6563 * decl.c (layout_var_decl): Change prototype. Don't complete
6564 types for external objects.
6565 (check_initializer): Likewise. Tidy.
6566 (initialize_local_var): Complete types here.
6567 (cp_finish_decl): Not here. Reorganize a little.
6568 (grokvardecl): Don't complete types here.
6570 * decl.c (start_function): Clear last_dtor_insn and
6571 last_parm_cleanup_insn.
6572 (push_cp_function_context): Just copy over a little of
6573 the old context, not all of it.
6575 * cp-tree.h (copy_to_permanent): Remove.
6576 (permanent_p): Likewise.
6577 * decl.c (building_typename_type): Don't use copy_to_permanent.
6578 (start_decl): Likewise.
6579 (grok_reference_init): Likewise.
6580 (cp_finish_decl): Likewise.
6581 * init.c (build_new_1): Don't use mapcar.
6582 (build_vec_delete_1): Don't use copy_to_permanent.
6583 (build_vec_init): Likewise.
6584 * parse.y (primary): Likewise.
6585 * parse.c: Regenerated.
6586 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
6587 (lookup_template_class): Likewise.
6588 (tsubst_friend_function): Likewise.
6589 (instantiate_class_template): Likewise.
6590 (tsubst_decl): Likewise.
6592 (instantiate_template): Likewise.
6594 * rtti.c (get_tinfo_fn): Likewise.
6595 (build_dynamic_cast): Likewise.
6596 * semantics.c (finish_if_stmt_cond): Likewise.
6597 (finish_while_stmt_cond): Likewise.
6598 (finish_do_stmt): Likewise.
6599 (finish_for_cond): Likewise.
6600 (finish_for_expr): Likewise.
6601 (finish_cleanup): Likewise.
6602 (add_decl_stmt): Likewise.
6603 (finish_named_return_value): Likewise.
6604 (finish_qualified_call_expr): Likewise.
6605 * tree.c (perm_manip): Remove.
6606 (build_exception_variant): Don't use copy_to_permanent.
6607 (permanent_p): Remove.
6608 (copy_to_permament): Remove.
6609 (build_min_nt): Don't use copy_to_permanent.
6610 (build_min): Likewise.
6611 (min_tree_cons): Likewise.
6612 * typeckc.c (build_static_cast): Likewise.
6613 (build_reinterpret_cast): Likewise.
6614 (build_const_cast): Likewise.
6616 1999-09-07 Mark Mitchell <mark@codesourcery.com>
6618 * decl.c (ggc_p): Set it to 1.
6619 (mark_saved_scope): Add prototype.
6621 1999-09-07 Richard Henderson <rth@cygnus.com>
6623 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
6624 * typeck.c (self_promoting_args_p): Delete.
6626 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
6628 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
6629 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
6631 1999-09-07 Mark Mitchell <mark@codesourcery.com>
6633 * Makefile.in (tree.o): Depend on ggc.h.
6634 * class.c (make_method_vec): Remove.
6635 (free_method_vec): Likewise.
6636 (free_method_vecs): Remove.
6637 (add_method): Don't use them.
6638 * cp-tree.def (PTRMEM_CST): Make it longer.
6639 (TEMPLATE_PARM_INDEX): Make it shorter.
6640 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
6641 (template_parm_index): Remove RTL field.
6642 (ptrmem_cst): Add RTL field.
6643 (finish_function): Removed parameter.
6644 (process_next_inline): Change prototype.
6645 (init_cplus_unsave): Rename to init_tree.
6646 (binding_init): Remove.
6647 * decl.c (free_binding_nodes): Remove.
6648 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
6649 (pop_binding): Don't use free_binding_nodes.
6650 (free_binding_vecs): Remove.
6651 (store_bindings): Don't use them.
6652 (pop_from_top_level): Likewise.
6653 (lookup_namespace_name): Simplify.
6654 (build_typename_type): Don't use obstack_free.
6655 (unqualified_namespace_lookup): Simplify.
6656 (lookup_name_real): Simplify.
6657 (start_function): Remove comment about leaks.
6658 (finish_function): Removed nested parameter. Call
6659 expand_end_bindings even when building_stmt_tree.
6660 Call ggc_push_context and ggc_pop_context around
6661 rest_of_compilation, if necessary.
6662 (mark_cp_function_context): Handle a NULL language-context.
6663 (lang_mark_false_label_stack): Fix typo.
6664 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
6665 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
6666 pointer to method types.
6667 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
6668 * decl2.c (finish_objects): Adjust call to finish_function.
6669 (finish_static_store_duration_function): Likewise.
6670 (do_nonmember_using_decl): Remove call to binding_init.
6671 * except.c (end_anon_func): Adjust call to finish_function.
6672 * lex.c (mark_impl_file_chain): New function.
6673 (init_parse): Call init_tree, not init_cplus_unsave.
6675 (cp_pramga_interface): Use xmalloc, not permalloc.
6676 (cp_pragma_implementation): Likewise.
6677 (begin_definition_of_inclass_inline): Simplify.
6678 (process_next_inline): Adjust prototype.
6679 (do_scoped_id): Don't call binding_init.
6680 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
6681 * method.c (emit_thunk): Adjust call to finish_function.
6682 (synthesize_method): Likewise.
6683 * parse.y (%union): Add a new `pi' variant.
6684 (PRE_PARSED_FUNCTION_DECL): Use it.
6685 (fn.defpen): Likewise.
6686 (fndef): Adjust call to finish_function.
6687 * pt.c (instantiate_decl): Likewise.
6688 * rtti.c (syntheisze_tinfo_fn): Likewise.
6689 * semantics.c (expand_body): Likewise.
6690 * tree.c: Include ggc.h.
6691 (mark_list_hash): New function.
6692 (binding_init): Remove.
6693 (init_cplus_unsave): Rename to ...
6694 (init_tree): This. Add GC roots.
6696 1999-09-05 Mark Mitchell <mark@codesourcery.com>
6698 Get ready for garbage collection.
6699 * Makefile.in (CXX_TREE_H): Add varray.h
6700 (lex.o): Depend on ggc.h.
6702 (decl2.o): Likewise.
6703 (method.o): Likewise.
6704 (search.o): Likewise.
6707 * class.c: Include ggc.h.
6708 (current_class_name): Remove.
6709 (current_class_type): Likewise.
6710 (current_access_specifier): Likewise.
6711 (previous_class_type): Likewise.
6712 (previous_class_values): Likewise.
6713 (class_cache_firstobj): Likewise.
6714 (current_lang_base): Likewise.
6715 (current_lang_stack): Likewise.
6716 (current_lang_stacksize): Likewise.
6717 (lang_name_c): Likewise.
6718 (lang_name_cplusplus): Likewise.
6719 (lang_name_java): Likewise.
6720 (current_lang_name): Likewise.
6721 (base_layout_decl): Likewise.
6722 (access_default_node): Likewise.
6723 (access_public_node): Likewise.
6724 (access_protected_node): Likewise.
6725 (access_private_node): Likewise.
6726 (access_default_virtual_node): Likewise.
6727 (access_public_virtual_node): Likewise.
6728 (access_protected_virtual_node): Likewise.
6729 (access_private_virtual_node): Likewise.
6730 (signed_zero_node): Likewise.
6731 (init_class_processing): Don't build base_layout_decl.
6732 (push_lang_context): Adjust now that current_lang_base is a varray.
6733 (pop_lang_context): Likewise.
6734 * cp-tree.h: Include varray.h.
6735 (cp_global_trees): Add access_default, access_public,
6736 access_protected, access_private, access_default_virtual,
6737 access_public_virtual, access_protected_virtual,
6738 access_private_virtual, ctor_identifier, delta2_identifier,
6739 delta_identifier, dtor_identifier, in_charge_identifier,
6740 index_identifier, nelts_identifier, this_identifier,
6741 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
6742 lang_name_c, lang_name_cplusplus, lang_name_java,
6743 empty_except_spec, null, jclass, minus_one, terminate.
6744 (saved_scope): Move here from decl.c. Define globals in terms of
6745 saved_scope: current_namespace, current_class_name,
6746 current_class_type, current_access_specifier, current_lang_stack,
6747 current_lang_base, current_lang_name, current_function_parms,
6748 current_template_parms, processing_template_decl,
6749 processing_specialization, processing_explicit_instantiation,
6750 previous_class_type, previous_class_values, class_cache_firstobj.
6751 (scope_chain): New variable.
6752 (init_pt): New function.
6753 * decl.c (current_namespace): Remove.
6754 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
6755 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
6756 (delta_identifier, delta2_identifier): Likewise.
6757 (pfn_or_delta2_identifier, tag_identifier): Likewise
6758 (vt_off_identifier, empty_except_spec, null_node): Likewise.
6759 (current_function_parms, current_lang_base): Remove.
6760 (current_lang_stack, previous_class_values): Remove.
6761 (class_binding_level): Macroize.
6762 (saved_scope): Remove.
6763 (current_saved_scope): Rename to scope_chain.
6764 (mark_saved_scope): Adjust for new scope structure.
6765 (maybe_push_to_top_level): Likewise.
6766 (pop_from_top_level): Likewise.
6767 (duplicate_decls): Adjust now that current_lang_base is a varray.
6768 (build_typename_type): Call ggc_add_tree_hash_table_root.
6769 (init_decl_processing): Call init_pt. Call push_to_top_level to
6770 set up globals. Add GC roots.
6771 (xref_basetypes): Adjust now that current_lang_base is a varray.
6772 * decl.h (this_identifier): Remove.
6773 (in_charge_identifier): Likewise.
6774 * decl2.c: Don't include varray.h.
6775 (current_namespace): Remove.
6776 (init_decl2): Add GC roots.
6777 * except.c (Terminate): Remove.
6778 (init_exception_processing): Use terminate_node instead.
6779 (build_terminate_handler): Likewise.
6780 * init.c (nc_nelts_field_id): Remove.
6781 (minus_one): Likewise.
6782 (init_init_processing): Use minus_one_node and nelts_identifier
6783 instead. Add GC roots.
6784 (jclass_node): Remove.
6785 (build_new_1): Use nelts_identifier.
6786 (build_vec_init): Likewise.
6787 (build_vec_delete): Likewise.
6788 * lex.c: Include ggc.h.
6789 (defarg_fn): Move declaration early.
6790 (defarg_parms): Likewise.
6791 (init_parse): Add GC roots.
6792 (handle_cp_pragma): Remove redundant declaration of
6794 * method.c: Include ggc.h.
6795 (btypelist): Make it a varray. All uses changed.
6796 (ktypelist): Likewise.
6797 (init_method): Add GC roots.
6798 * pt.c: Don't include varray.h. Include ggc.h.
6799 (current_template_parms): Remove.
6800 (processing_template_decl): Likewise.
6801 (processing_specialization): Likewise.
6802 (processing_explicit_instantiation): Likewise.
6803 (init_pt): New function.
6804 * repo.c: Include ggc.h.
6805 (init_repo): Add GC roots.
6806 * search.c: Don't include varray.h.
6807 (_vptr_name): Remove.
6808 (lookup_field_1): Use vtpr_identifier instead.
6809 (expand_indirect_vtbls_init): Remove redundant declaration of
6810 in_charge_identifier.
6811 (init_search_processing): Use vptr_identifier.
6813 1999-09-05 Richard Henderson <rth@cygnus.com>
6814 Bernd Schmidt <bernds@cygnus.co.uk>
6815 Mark Mitchell <mark@codesourcery.com>
6817 * Makefile.in (parse.o): Depend on ggc.h.
6818 (decl2.o): Depend on ggc.h.
6819 (init.o): Depend on ggc.h.
6820 * cp-tree.h (init_decl2): Declare.
6821 (cp_parse_init): Likewise.
6822 * decl.c (ggc_p): Define to zero.
6823 (mark_saved_scope): New function.
6824 (init_decl_processing): Call cp_parse_init, and cp_decl2.
6826 (expand_static_init): Add GC roots.
6827 * decl2.c: Include ggc.h.
6828 (init_decl2): New function.
6829 * init.c: Include ggc.h.
6830 (init_init_processing): Add GC roots.
6831 * parse.y: Include ggc.h.
6832 (cp_parse_init): New function.
6834 1999-09-04 Mark Mitchell <mark@codesourcery.com>
6836 * decl.c (init_decl_processing): Set mark_lang_status.
6837 (lang_mark_false_label_stack): Adjust prototype.
6838 * decl2.c (grok_function_init): Remove extraneous declaration of
6841 * Make-lang.in (cc1plus): Remove dependency on GGC.
6842 * Makefile.in (OBJS): Don't mention ggc-simple.o.
6843 (OBJDEPS): Don't mention ggc-simple.o.
6845 * Make-lang.in (cc1plus): Depend on $(GGC).
6846 * Makefile.in (OBJS): Add ggc-simple.o.
6847 (OBJDEPS): Likewise.
6848 * cp-tree.h (language_function): Rename members to `x_' versions;
6849 we now have x_named_labels, x_ctor_label, x_dtor_label,
6850 x_base_init_list, x_member_init_list, x_base_init_expr,
6851 x_current_class_ptr, x_current_class_ref, x_last_tree,
6852 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
6854 (dtor_label, ctor_label, current_base_init_list,
6855 current_member_init_list, base_init_expr, current_class_ptr,
6856 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
6857 * decl.c: Include ggc.h.
6858 (last_dtor_insn): Adjust to use x_ names.
6859 (last_parm_cleanup_insn): Likewise.
6860 (original_result_rtx): Likewise.
6861 (named_labels): Likewise.
6862 (mark_binding_level): New function.
6863 (mark_cp_function_context): Likewise.
6864 (mark_false_label_stack): Likewise.
6865 (lang_mark_tree): Likewise.
6866 (lang_cleanup_tree): Likewise.
6868 1999-09-03 Mark Mitchell <mark@codesourcery.com>
6870 * Makefile.in (CXX_TREE_H): Include function.h.
6871 (decl.o): Don't depend on function.h.
6872 (decl2.o): Likewise.
6873 (typeck.o): Likewise.
6875 (method.o): Likewise.
6876 * cp-tree.h: Include function.h.
6877 (cp_function): Rename to language_function. Remove next.
6878 (cp_function_chain): Make it a macro, not a variable.
6879 (push_cp_function_context): Don't declare.
6880 (pop_cp_function_context): Likewise.
6881 * decl.c: Don't include function.h.
6882 (push_cp_function_context): Make it static. Make it suitable for
6883 a save_lang_status callback.
6884 (pop_cp_function_context): Likewise.
6885 (maybe_push_to_top_level): Call push_function_context_to, not
6886 push_cp_function_context.
6887 (pop_from_top_level): Call pop_function_context_from, not
6888 pop_cp_function_context.
6889 (init_decl_processing): Set save_lang_status and
6890 restore_lang_status. Call push_function_context_to, not
6891 push_cp_function_context.
6892 (cp_function_chain): Remove.
6893 * decl2.c: Don't include function.h.
6894 * except.c: Don't include function.h.
6895 (start_anon_func): Call push_function_context_to, not
6896 push_cp_function_context.
6897 (end_anon_func): Call pop_function_context_from, not
6898 pop_cp_function_context.
6899 * init.c: Don't include function.h.
6900 * lex.c (begin_definition_of_inclass_inline): Call
6901 push_function_context_to, not push_cp_function_context.
6902 (process_next_inline): Call pop_function_context_from, not
6903 pop_cp_function_context.
6904 * method.c: Don't include function.h.
6905 (synthesize_method): Call push_function_context_to, not
6906 push_cp_function_context. Call pop_function_context_from, not
6907 pop_cp_function_context.
6908 * typeck.c: Don't include function.h.
6910 * decl.c (expand_static_init): Tweak handling of static
6911 initializations for objects without constructors.
6913 1999-09-03 Nathan Sidwell <nathan@acm.org>
6915 * typeck.c (build_indirect_ref): Reject dereference of pointer to
6918 1999-09-02 Mark Mitchell <mark@codesourcery.com>
6920 * cp-tree.h (cp_function): Move here, from decl.c.
6921 (cp_function_chain): Declare.
6922 (dtor_label): New macro, instead of variable.
6923 (ctor_label): Likewise.
6924 (current_base_init_list): Likewise.
6925 (current_member_init_list): Likewise.
6926 (base_init_expr): Likewise.
6927 (current_class_ptr): Likewise.
6928 (current_class_ref): Likewise.
6929 (last_tree): Likewise.
6930 (last_expr_type): Likewise.
6931 (current_function_returns_value): Likewise.
6932 (current_function_returns_null): Likewise.
6933 (current_function_just_assigned_this): Likewise.
6934 (current_function_parms_stored): Likewise.
6935 (temp_name_counter): Likewise.
6936 (static_labelno): Likewise.
6937 (expanding_p): Likewise.
6938 (stmts_are_full_exprs_p): Likewise.
6939 (in_function_try_handler): Likewise.
6940 (lang_type): Remove nested type_flags. All uses changed.
6941 * call.c (ctor_label): Remove.
6942 (dtor_label): Likewise.
6943 * class.c (current_class_ptr): Remove.
6944 (current_class_ref): Likewise.
6945 * decl.c (static_labelno): Remove.
6946 (dtor_label): Likewise.
6947 (last_dtor_insn): New macro, instead of variable.
6948 (last_parm_cleanup_insn): Likewise.
6949 (original_result_rtx): Likewise.
6950 (in_function_try_handler): Remove.
6951 (named_label_uses): New macro, instead of variable.
6952 (named_labels): Likewise.
6953 (current_function_returns_value): Remove.
6954 (current_function_returns_null): Likewise.
6955 (current_function_assigns_this): New macro, instead of variable.
6956 (current_function_just_assigned_this): Likewise.
6957 (current_binding_level): Likewise.
6958 (init_decl_processing): Call push_cp_function_context.
6959 (cp_function): Move to cp-tree.h
6960 (cp_function_chain): Make it global.
6961 (temp_name_counter): Remove.
6962 (push_cp_function_context): Simplify.
6963 (pop_cp_function_context): Likewise.
6964 * decl2.c (temp_name_counter): Remove.
6965 * init_c (current_base_init_list): Likewise.
6966 (current_member_init_list): Likewise.
6967 (base_init_expr): Likewise.
6968 * method.c (static_labelno): Likewise.
6969 * pt.c (last_tree): Likewise.
6970 * semantics.c (expanding_p): Likewise.
6971 (stmts_are_full_exprs_p): Likewise.
6972 (last_expr_type): Likewise.
6973 * typeck.c (dtor_label): Likewise.
6974 (ctor_label): Likewise.
6976 1999-09-01 Alex Samuel <samuel@codesourcery.com>
6978 * decl2.c (arg_assoc_template_arg): New prototype. New function.
6979 (arg_assoc_class): Use arg_assoc_template_arg for template
6981 (arg_assoc): Likewise.
6982 * pt.c (mangle_class_name_for_template): Allow member template
6985 1999-09-02 Nathan Sidwell <nathan@acm.org>
6987 * call.c (build_conditional_expr): Warn on enum mismatches.
6988 (convert_arg_to_ellipsis): Move non-pod check to after
6991 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6993 * gxx.gperf (hash, is_reserved_word): Add prototypes.
6995 * init.c (build_vec_init): Initialize variable `try_block'.
6997 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
6998 Likewise for bzero/memset.
6999 (token_getch, token_put_back): Add static prototypes. Remove
7000 `inline' from the definitions.
7001 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
7003 1999-09-01 Mark Mitchell <mark@codesourcery.com>
7005 * cp-tree.h (lang_type): Move align into type_flags.
7006 (CLASSTYPE_ALIGN): Adjust accordingly.
7007 * call.c (direct_reference_binding): Remove misleading comment.
7009 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7011 * parse.y (language_string): Constify.
7013 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7015 * repo.c (getpwd): Don't prototype.
7016 * xref.c (getpwd): Likewise
7018 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7020 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
7021 Remove hacks for stuff which now comes from libiberty.
7023 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
7025 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
7027 1999-08-30 Mark Mitchell <mark@codesourcery.com>
7029 * cp-tree.h (begin_init_stmts): Declare.
7030 (finish_init_stmts): Likewise.
7031 * cvt.c (build_up_reference): Wrap the declaration of a temporary
7032 in a statement-expression so that we will see it when expanding
7033 tree structure later.
7034 * init.c (begin_init_stmts): Don't make it static.
7035 (finish_init_stmts): Likewise.
7037 * cp-tree.h (start_handler_parms): New function.
7038 (expand_start_catch_block): Take only one parameter.
7039 (start_handler_parms): New function.
7040 * decl.c (start_handler_parms): Define it.
7041 * except.c (process_start_catch_block): Take only one parameter.
7042 Don't call grokdeclarator here.
7043 (expand_start_catch_block): Don't call grokdeclarator here,
7045 * parse.y (handler_args): Adjust call to
7046 expand_start_catch_block. Use start_handler_parms.
7047 * pt.c (push_template_decl_real): Make permanent lists have
7049 (tsubst_expr): Adjust calls to expand_start_catch_block
7051 * semantics.c (expand_stmt): Likewise.
7053 1999-08-29 Alex Samuel <samuel@codesourcery.com>
7055 * pt.c (push_template_decl_real): Use template declaration from
7056 class type if it exists.
7058 1999-08-29 Mark Mitchell <mark@codesourcery.com>
7060 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
7061 (maybe_inject_for_scope_var): Declare it.
7062 (initialize_local_var): Likewise.
7063 * decl.c (maybe_inject_for_scope_var): Make it global.
7064 (initialize_local_var): Likewise. Move cleanup handling here,
7065 from cp_finish_decl.
7066 (make_rtl_for_nonlocal_decl): Use
7067 push_obstacks_nochange/pop_obstacks, rather than
7068 end_temporary_allocation/resume_temporary_allocation.
7069 (cp_finish_decl): Try to complete the type of a variable when it
7070 is declared. Move cleanup-handling to initialize_local_var.
7071 (expand_static_init): Use tree-building code, rather than
7073 * decl2.c (get_temp_name): Assert non-initializedness of
7075 * init.c (create_temporary_var): Move RTL-assigning code to ...
7076 (get_temp_regvar): Here.
7077 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
7078 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
7079 call initialize_local_var to generate initialization code.
7081 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7083 * cp-tree.h (fndecl_as_string, type_as_string,
7084 type_as_string_real, args_as_string, decl_as_string,
7085 expr_as_string, code_as_string, language_as_string,
7086 parm_as_string, op_as_string, assop_as_string, cv_as_string,
7087 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
7089 * errfn.c (cp_printer): Likewise.
7091 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
7092 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
7093 cp_file_of, code_as_string, language_as_string, parm_as_string,
7094 op_as_string, assop_as_string, args_as_string, cv_as_string):
7097 * tree.c (lang_printable_name): Likewise.
7099 1999-08-28 Richard Henderson <rth@cygnus.com>
7101 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
7103 1999-08-28 Mark Mitchell <mark@codesourcery.com>
7105 * cp-tree.h (strip_array_types): New function.
7106 * decl.c (maybe_deduce_size_from_array_init): New function, split
7107 out from cp_finish_decl.
7108 (layout_var_decl): Likewise.
7109 (maybe_commonize_var): Likewise.
7110 (maybe_inject_for_scope_var): Likewise.
7111 (initialize_local_var): Likewise.
7112 (build_cleanup_on_safe_obstack): Likewise.
7113 (check_initializer): Likewise.
7114 (make_rtl_for_nonlocal_decl): Likewise.
7115 (cp_finish_decl): Use them.
7116 * typeck.c (strip_array_types): New function.
7118 * cp-tree.def (LABEL_STMT): New tree node.
7119 * cp-tree.h (LABEL_STMT_LABEL): New macro.
7120 (shadow_label): Remove.
7121 (declare_local_label): New function.
7122 (finish_label_decl): Likewise.
7123 * decl.c (make_label_decl): New function, split out from
7125 (shadowed_labels): Remove.
7126 (binding_level): Add shadowed_labels.
7127 (clear_binding_level): Remove.
7128 (push_binding_level): Just bzero the new binding level.
7129 (pushlevel): Fix indentation.
7130 (pop_label): New function.
7131 (pop_labels): Likewise, split out from poplevel.
7132 (poplevel): Pop local labels. Use pop_labels.
7133 (maybe_push_to_top_level): Don't clear shadowed_labels.
7134 (lookup_label): Use make_label_decl.
7135 (shadow_label): Remove.
7136 (declare_local_label): New function.
7137 (define_label): Simplify.
7138 (start_function): Don't clear shadowed_labels.
7139 (cp_function): Remove shadowed_labels.
7140 (push_cp_function_context): Don't save shadowed_labels.
7141 (pop_cp_function_context): Don't restore it.
7142 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
7143 * parse.y (label_decl): Use finish_label_decl.
7144 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
7146 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
7148 (finish_label_decl): New function.
7149 (expand_stmt): Handle LABEL_STMTs and local label declarations.
7151 1999-08-26 Mark Mitchell <mark@codesourcery.com>
7153 * decl.c (lookup_label): Build labels on the permanent obstack
7154 when building statement trees. Don't build RTL for labels when
7155 building statement trees.
7156 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
7157 building statement trees.
7158 (finish_label_stmt): Likewise.
7159 (expand_stmt): Adjust accordingly.
7160 * pt.c (tsubst_expr); Likewise.
7161 (do_decl_instantiation): Robustify.
7163 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
7164 * tree.c (build_cplus_new): Set it.
7165 * expr.c (cplus_expand_expr): Use it.
7166 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
7168 * decl.c (store_parm_decls): Reset immediate_size_expand.
7169 (finish_function): Likewise.
7171 * tree.c (cplus_unsave_expr_now): Don't return a value.
7173 * semantics.c (do_poplevel): Always initialize the return value.
7175 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
7177 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
7178 * tree.h (cplus_unsave_expr_now) : Same.
7180 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7182 * decl.c (grokdeclarator): Amend comment.
7183 * except.c (expand_start_catch_block): Call push_template_decl for
7184 catch-block parameters.
7185 * method.c (synthesize_method): Build an empty compound statement
7186 for the body of a constructor.
7188 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
7190 * tree.c (cp_build_qualified_type_real): If we're asking for the
7191 same quals we already have, just return.
7193 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7195 * cp-tree.def (SUBOBJECT): New tree node.
7196 * cp-tree.h (CLEANUP_P): New macro.
7197 (SUBOBJECT_CLEANUP): Likewise.
7198 (keep_next_level): Add parameter.
7199 (get_temp_regvar): Don't declare.
7200 (emit_base_init): Remove parameter.
7201 (expand_aggr_init): Rename to build_aggr_init.
7202 (expand_vec_init): Rename to build_vec_init.
7203 (do_pushlevel): Remove.
7204 (do_poplevel): Likewise.
7205 (finish_cleanup): New function.
7206 (finish_subobject): Likewise.
7207 (stmts_are_full_exprs_p): New variable.
7208 * decl.c (keep_next_level): Add parameter.
7209 (cp_finish_decl): Use build_aggr_init, not
7210 expand_aggr_init. Use finish_expr_stmt to expand the code.
7211 (expand_static_init): Use tree-generating, not RTL-generating,
7212 functions to handle the initialization.
7213 (start_function): Remove dead code. Always have a momentary
7214 obstack inside the function, even before hitting the first curly
7216 (cplus_expand_expr_stmt): Move calls to
7217 expand_{start,end}_target_temps into semantics.c.
7218 (cp_function): Add stmts_are_full_exprs_p.
7219 (push_cp_function_context): Save it.
7220 (pop_cp_function_context): Restore it.
7221 * decl2.c (get_temp_regvar): Move to init.c.
7222 (do_static_initialization): Use build_{aggr,vec}_init.
7223 (do_static_destruction): Fix typo in comment.
7224 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
7225 * except.c (expand_throw): Use create_temporary_var.
7226 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
7227 * init.c (expand_vec_init_try_block): Remove.
7228 (expand_vec_init_catch_clause): Likewise.
7229 (get_temp_regvar): New function.
7230 (begin_init_stmts): Likewise.
7231 (finish_init_stmts): Likewise.
7232 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
7234 (emit_base_init): Likewise. Remove unused parameter.
7235 (expand_virtual_init): Likewise.
7236 (expand_cleanup_for_base): Use finish_subobject.
7237 (expand_aggr_vbase_init_1): Simplify.
7238 (construct_virtual_bases): Use tree-generating functions to build
7240 (expand_aggr_init): Likewise. Rename to build_aggr_init.
7241 (expand_default_init): Likewise.
7242 (expand_aggr_init_1): Likewise.
7243 (expand_vec_init): Rename to build_vec_init.
7244 * method.c (do_build_copy_constructor): Use tree-generating
7245 functions. Don't call clear_last_expr.
7246 (do_build_assign_ref): Likewise.
7247 (synthesize_method): Call clear_last_expr here.
7248 * parse.y (base_init): Don't call clear_last_expr here.
7249 (nodecls): Likewise.
7250 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
7251 * semantics.c (do_pushlevel): Move to here.
7252 (do_poplevel): Likewise.
7253 (stmts_are_full_exprs_p): New variable.
7254 (finish_expr_stmt): Handle logic for temoprary cleanup here.
7255 (finish_for_stmt): Use finish_expr_stmt.
7256 (finish_cleanup): New function.
7257 (finish_function_try_block): Fix indentation.
7258 (finish_subobject): New function.
7259 (setup_vtbl_ptr): Call keep_next_level here.
7260 (finish_stmt_expr): Handle a block with no scope inside the
7261 statement-expression.
7262 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
7264 * tree.c (search_tree): Handle INIT_EXPR.
7266 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
7267 * typeck2.c (store_init_value): Change expand_aggr_init to
7268 build_aggr_init in comment.
7270 1999-08-25 Mark Mitchell <mark@codesourcery.com>
7272 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
7274 1999-08-25 Nathan Sidwell <nathan@acm.org>
7276 * decl2.c (handle_class_head): Be graceful about additional
7277 scope qualifiers. Adjust comments to reflect reality.
7279 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
7281 * call.c (build_conditional_expr): Fix typo.
7282 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
7283 lvalue before trying to mess with the sides.
7285 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
7287 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
7289 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
7291 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
7293 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
7294 Return arbitrary pointer or NULL.
7295 (check_eh_spec): Call __throw_type_match_rtti_2.
7296 * tinfo.h (*::dcast): Return int. Add valp parm.
7297 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
7298 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
7299 (__throw_type_match_rtti): Now just a wrapper.
7301 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
7302 (init_exception_processing): Don't initialize them.
7304 1999-08-23 Paul Burchard <burchard@pobox.com>
7306 * decl.c (check_default_argument): Fix typo.
7308 1999-08-22 Mark Mitchell <mark@codesourcery.com>
7310 * cp-tree.def (STMT_EXPR): Fix typo in node name.
7312 * dump.c (dump_next_stmt): New function.
7313 (dequeue_and_dump): Use it.
7315 * pt.c (tsubst_copy): Make sure to initialize return value for a
7316 STMT_EXPR, even when processing_template_decl.
7317 * semantics.c (finish_stmt_expr): A statement-expression whose
7318 last statement is not an expression-statement has type `void'.
7320 1999-08-20 Mark Mitchell <mark@codesourcery.com>
7322 * semantics.c (finish_stmt_expr): Fix typo in comment.
7323 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
7325 * init.c (build_vec_delete_1): Make the children of a permanent
7326 BIND_EXPR permanent.
7327 * pt.c (register_specialization): Don't register a specialization
7330 1999-08-18 Andrew Haley <aph@cygnus.com>
7332 * method.c (process_overload_item): Call build_mangled_C9x_name ()
7333 for all integer parameter types larger than long long.
7335 1999-08-19 Mark Mitchell <mark@codesourcery.com>
7337 * pt.c (redeclare_class_template): Merge default template
7338 arguments in both directions.
7340 * typeck.c (common_type): Undo 1999-08-18 change. Remove
7341 compiler_error message.
7343 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
7345 * cp-tree.h: Declare flag_use_repository.
7346 * pt.c (do_decl_instantiation): Don't complain about duplicate
7347 instantiation with -frepo.
7348 (do_type_instantiation): Likewise.
7350 * pt.c (push_template_decl_real): Complain about everything
7351 that isn't a valid template.
7353 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
7356 1999-08-19 Mark Mitchell <mark@codesourcery.com>
7358 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
7359 * decl2.c (build_expr_from_tree): Handle it.
7360 * error.c (dump_expr): Likewise.
7361 * pt.c (for_each_template_parm): Likewise.
7362 (tsubst_copy): Likewise.
7363 * tree.c (search_tree): Likewise.
7364 * semantics.c (finish_pseudo_destructor_call): Create it.
7366 1999-08-18 Mark Mitchell <mark@codesourcery.com>
7368 * search.c (setup_class_bindings): Robustify.
7369 * typeck.c (common_type): Use same_type_p, not pointer equality,
7372 * cp-tree.h (build_lang_field_decl): Remove.
7373 * class.c (build_vtable): Replace calls to build_lang_field_decl
7374 with build_lang_decl.
7375 (prepare_fresh_vtable): Likewise.
7376 (finish_struct_1): Likewise.
7377 (init_class_processing): Likewise.
7378 * decl.c (push_using_decl): Likewise.
7379 (init_decl_processsing): Likewise.
7380 (grokvardecl): Likewise.
7381 (build_ptrmemfunc_type): Likewise.
7382 (grokdeclarator): Likewise.
7383 (build_enumerator): Likewise.
7384 * decl2.c (grok_x_components): Likewise.
7385 (do_class_using_decl): Likewise.
7386 * except.c (call_eh_info): Likewise.
7387 * init.c (init_init_processing): Likewise.
7388 * rtti.c (expand_class_decl): Likewise.
7389 * tree.c (build_base_fields): Likewise.
7390 (build_vbase_pointer_fields): Likewise.
7391 * lex.c (build_lang_decl): Build declarations on the permanent
7392 obstack if we're building statmeent trees.
7393 (retrofit_lang_decl): Handle both the full lang_decl and also the
7394 smaller lang_decl_flags here.
7395 (build_lang_field_decl): Remove.
7396 * pt.c (push_template_decl_real): Issue errors for variable
7397 declarations that are not static members.
7399 1999-08-18 Richard Henderson <rth@cygnus.com>
7401 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
7404 1999-08-17 Mark Mitchell <mark@codesourcery.com>
7406 * cp-tree.h (back_end_hook): New variable.
7407 * decl2.c (back_end_hook): Define it.
7408 (finish_file): If it's non-NULL, call it.
7410 * decl.c (add_decl_to_level): New function.
7411 (push_local_binding): Use it.
7412 (find_binding): Fix typo in comment.
7413 (pushdecl): Use add_decl_to_level. Put templates on the
7414 corresponding namespace-scope binding levels.
7415 * dump.c (dequeue_and_dump): Print the specializations of a
7417 * pt.c (push_template_decl_real): Don't push a template multiple
7420 1999-08-17 Mark Mitchell <mark@codesourcery.com>
7422 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
7423 (CALL_DECLARATOR_QUALS): Likewise.
7424 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
7425 * decl.c (grokdeclarator): Adjust to use them.
7426 * decl2.c (grokfield): Likewise.
7427 (reparse_absdcl_as_casts): Likewise.
7428 * lex.c (make_call_declarator): Likewise.
7429 (set_quals_and_spec): Likewise.
7430 * pt.c (tsubst): Likewise.
7431 * tree.c (mapcar): Remove special hack to handle third operand of
7434 1999-08-16 Mark Mitchell <mark@codesourcery.com>
7436 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
7437 * class.c (build_vtable): Use build_lang_field_decl to build the
7438 VAR_DECLs for vtables.
7439 (prepare_fresh_vtable): Likewise.
7440 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
7441 CAN_HAVE_FULL_LANG_DECL_P.
7442 (push_using_decl): Use build_lang_decl to build USING_DECLs.
7443 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
7444 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
7445 (build_lang_field_decl): Likewise.
7446 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
7449 * cp-tree.def (STMT_EXPR): New tree node.
7450 * cp-tree.h (STMT_EXPR_STMT): New macro.
7451 (store_return_init): Change prototype.
7452 (finish_named_return_value): New function.
7453 (expand_stmt): Likewise.
7454 (expand_body): Likewise.
7455 (begin_stmt_tree): Likewise.
7456 (finish_stmt_tree): Likewise.
7457 (expanding_p): New variable.
7458 (last_expr_type): Likewise.
7459 (building_stmt_tree): New macro.
7460 * decl.c (start_function): Use building_stmt_tree, not
7461 processing_template_decl, where appropriate.
7462 (store_parm_decls): Likewise.
7463 (store_return_init): Move most of the body to semantics.c.
7464 (finish_function): Use building_stmt_tree.
7465 (finish_stmt): Clear last_expr_type here.
7466 (cp_function): Add expanding_p, last_tree, last_expr_type.
7467 (push_cp_function_context): Save them.
7468 (pop_cp_function_context): Restore them.
7469 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
7470 * error.c (dump_expr): Handle STMT_EXPR.
7471 * except.c (expand_start_catch_block): Use building_stmt_tree.
7473 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
7474 (do_case): Move add_tree call to semantics.c.
7475 * parse.y (return_init): Use finish_named_return_value.
7476 (for.init.statement): Use finish_expr_stmt.
7477 * parse.c: Regenerated.
7478 * pt.c (do_pushlevel): Move to semantics.c.
7479 (do_poplevel): Likewise.
7480 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
7481 (tsubst_expr): Don't expand all the way to RTL here. Handle
7482 RETURN_INIT and CTOR_INITIALIZER.
7483 (instantiate_decl): Call expand_body after tsubst'ing into
7485 * semantics.c (expand_stmts): New function.
7486 (expanding_p): New variable.
7487 (last_expr_type): Likewise.
7488 (finish_expr_stmt): Use building_stmt_tree.
7489 (begin_if_stmt): Likewise.
7490 (finish_if_stmt_cond): Likewise.
7491 (finish_then_clause): Likewise.
7492 (begin_else_clause): Likewise.
7493 (finish_else_clause): Likewise.
7494 (begin_while_stmt): Likewise.
7495 (finish_while_stmt_cond): Likewise.
7496 (finish_while_stmt): Likewise.
7497 (finish_do_body): Likewise.
7498 (finish_do_stmt): Likewise.
7499 (finish_return_stmt): Likewise.
7500 (begin_for_stmt): Likewise.
7501 (fnish_for_init_stmt): Likewise.
7502 (finish_for_cond): Likewise.
7503 (finish_for_expr): Likewise.
7504 (finish_for_stmt): Likewise.
7505 (finish_break_stmt): Likewise.
7506 (finish_continue_stmt): Likewise.
7507 (finish_switch_cond): Likewise.
7508 (finish_switch_stmt): Likewise.
7509 (finish_case_label): Call add_tree here if necessary.
7510 (finish_goto_statement): Use building_stmt_tree.
7511 (begin_try_block): Likewise.
7512 (begin_function_try_block): Likewise.
7513 (finish_try_block): Likewise.
7514 (finish_function_try_block): Likewise.
7515 (finish_handler_sequence): Likewise.
7516 (finish_function_handler_sequence): Likewise.
7517 (begin_handler): Likewise.
7518 (finish_handler_parms): Likewise.
7519 (finish_handler): Likewise.
7520 (begin_compound_stmt): Likewise.
7521 (finish_compound_stmt): Likewise.
7522 (finish_asm_stmt): Likewise.
7523 (finish_label_stmt): Likewise.
7524 (finish_named_return_value): New function.
7525 (setup_vtbl_ptr): Moved here from decl2.c.
7526 (do_pushlevel): Moved here from pt.c.
7527 (do_poplevel): Likewise.
7528 (begin_stmt_expr): Use building_stmt_tree.
7529 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
7530 when building_stmt_tree.
7531 (begin_stmt_tree): New function.
7532 (finish_stmt_tree): Likewise.
7533 (expand_stmt): Likewise.
7534 (expand_body): Likewise.
7535 * tree.c (build_cplus_method_type): Make sure the argument types
7536 end up on the same obstack as the METHOD_TYPE.
7537 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
7538 THROW_EXPR, STMT_EXPR.
7539 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
7540 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
7541 sorry, if an unsupported node is encountered.
7542 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
7543 (c_expand_return): Don't call add_tree here.
7545 1999-08-15 Mark Mitchell <mark@codesourcery.com>
7547 * pt.c (check_default_tmpl_args): Don't check in local scopes.
7548 (tsubst_decl): Make sure the declaration is on a saveable
7549 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
7551 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
7553 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
7555 Speed up Koenig lookup.
7556 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
7557 to return namespaces we've looked at.
7558 * decl2.c (lookup_using_namespace): Likewise.
7559 (add_function): Don't call ovl_member.
7560 (lookup_arg_dependent): Initialize k.namespaces to the list of
7561 namespaces seen in unqualified lookup.
7562 * call.c (equal_functions): Move here from tree.c.
7563 (joust): Use it to handle duplicate candidates.
7564 * tree.c (ovl_member): Use ==.
7566 1999-08-13 Mark Mitchell <mark@codesourcery.com>
7568 * cp-tree.def (DECL_STMT): Make it smaller.
7569 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
7570 (lang_decl): ... here. Add next.
7571 (DECL_SAVED_TREE): Adjust accordingly.
7572 (DECL_IMPLICIT_TYPEDEF_P): New macro.
7573 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
7574 (DECL_STMT_DECL): Likewise.
7575 (create_implicit_typedef): New function.
7576 (maybe_push_decl): Likewise.
7577 (tsubst_default_argument): New function.
7578 (at_function_scope_p): Likewise.
7579 (add_decl_stmt): Likewise.
7580 (push_permanent_obstack): Likewise.
7581 * call.c (convert_default_arg): Use tsubst_default_argument.
7582 * class.c (add_method): Use push_permanent_obstack.
7583 (build_self_reference): Create a TEMPLATE_DECL for the
7584 self-reference, if necessary.
7585 * decl.c (pseudo_global_level_p): Only look at the current binding
7587 (push_binding): Use push_permanent_obstack.
7588 (create_implicit_typedef): New function.
7590 (duplicate_decls): Use push_permanent_obstack.
7591 (maybe_push_decl): New function.
7592 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
7593 (start_decl_1): Remove dead code.
7594 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
7595 pseudo_global_level_p.
7596 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
7598 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
7599 pseudo_global_level_p.
7600 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
7602 (get_sentry): Use push_permanent_obstack.
7603 * dump.c (dequeue_and_dump): Enable DECL_STMT.
7604 * except.c (call_eh_info): Use push_permanent_obstack.
7605 (build_eh_type_ref): Likewise.
7606 (do_pop_exception): Likewise.
7607 (expand_eh_spec): Likewise.
7608 (alloc_eh_object): Likewise.
7609 (expand_throw): Likewise.
7610 * init.c (build_java_class_ref): Likewise.
7611 * lex.c (get_time_identifier): Likewise.
7612 (free_lang_decl_chain): Correct type.
7613 (retrofit_lang_decl): Adjust accordingly.
7614 (build_lang_field_decl): Likewise.
7615 * lex.h (free_lang_decl_chain): Likewise.
7616 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
7617 * parse.c: Regenerated.
7618 * pt.c (tsubst_default_arguments): New function.
7619 (retrieve_local_specialization): Likewise.
7620 (register_local_specialization): Likewise.
7621 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
7622 pseudo_global_level_p to determine whether or not a template is
7624 (lookup_template_class): Likewise. Use create_implicit_typedef.
7625 (instantiate_class_template): Call tsubst_default_arguments for
7626 member functions, if appropriate.
7627 (tsubst_default_argument): New function.
7628 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
7629 * search.c (at_function_scope_p): New function.
7630 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
7631 (finish_label_stmt): Likewise.
7632 (add_decl_stmt): New function.
7633 (begin_class_definition): Likewise.
7634 (finish_typeof): Likewise.
7635 * tree.c (copy_template_template_parm): Likewise.
7636 (copy_to_permanent): Likewise.
7637 (push_permanent_obstack): Define.
7638 (mark_addressable): Use it.
7639 * typeck.c (mark_addressable): Likewise.
7641 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
7643 * cp-tree.h (init_cplus_unsave): New.
7644 (cplus_unsave_expr_now): New.
7645 * lex.c (init_parse): Call init_cplus_unsave.
7646 * tree.c (init_cplus_unsave): New.
7647 (cplus_unsave_expr_now): New.
7649 1999-08-13 Mark Mitchell <mark@codesourcery.com>
7651 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
7652 decl_constant_value to simplify array bounds.
7654 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
7656 * lang-options.h: Add -fms-extensions.
7657 * cp-tree.h: Declare flag_ms_extensions.
7658 * decl2.c: Define it.
7659 * class.c (instantiate_type): Don't complain about taking the address
7660 of a bound member function if -fms-extensions.
7661 * typeck.c (build_unary_op): Likewise.
7662 * decl.c (grokdeclarator): Or about implicit int.
7663 * init.c (resolve_offset_ref): Or about implicit '&'.
7665 1999-08-11 Mark Mitchell <mark@codesourcery.com>
7667 * cp-tree.h (minimal_parse_mode): Remove.
7668 (finish_label_stmt): New function.
7669 * decl.c (saved_scope): Remove minimal parse mode.
7670 (maybe_push_to_top_level): Don't save it.
7671 (pop_from_top_level): Don't restore it.
7672 (define_label): Split out template-handling code to semantics.c.
7673 (start_decl): Don't use minimal_parse_mode.
7674 (cp_finish_decl): Likewise.
7675 (start_function): Don't increment it.
7676 (store_return_init): Don't use it.
7677 (finish_function): Don't decrement it.
7678 * parse.y (label_colon): Use finish_label_stmt throughout.
7679 * parse.c: Regenerated.
7680 * pt.c (minimal_parse_mode): Don't define it.
7681 (tsubst_expr): Use finish_label_stmt.
7682 * semantics.c (finish_label_stmt): New function.
7684 * dump.c (queue): Be careful when computing bitmasks.
7685 (dequeue_and_dump): Describe binfos as binfos, not as
7688 * parse.y (pedantic): Give it itype. Adjust usage accordingly
7690 * parse.c: Regenerated.
7692 * Make-lang.in (CXX_SRCS): Remove sig.c.
7693 * Makefile.in (CXX_OBJS): Remove sig.o.
7695 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
7696 (CPTI_SIGNATURE_TYPE): Likewise.
7697 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
7698 (opaque_type_node): Likewise.
7699 (signature_type_node): Likewise.
7700 (sigtable_entry_type): Likewise.
7701 (flag_handle_signatures): Likewise.
7702 (lang_type): Remove is_signature, is_signature_pointer,
7703 is_signature_reference, has_opaque_typedecls,
7704 sigtables_has_been_generated. Adjust dummy. Remove signature,
7705 signature_pointer_to, signature_reference_to.
7706 (IS_SIGNATURE): Remove.
7707 (SET_SIGNATURE): Remove.
7708 (CLEAR_SIGNATURE): Remove.
7709 (IS_SIGNATURE_POINTER): Remove.
7710 (IS_SIGNATURE_REFERENCE): Remove.
7711 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
7712 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
7713 (CLASSTYPE_SIGNATURE): Remove.
7714 (SIGNATURE_TYPE): Remove.
7715 (SIGNATURE_METHOD_VEC): Remove.
7716 (SIGNATURE_POINTER_TO): Remove.
7717 (SIGNATURE_REFERENCE_TO): Remove.
7718 (lang_decl_flags): Remove is_default_implementation. Rename
7719 memfunc_pointer_to to saved_tree.
7720 (IS_DEFAULT_IMPLEMENTATION): Remove.
7721 (DECL_MEMFUNC_POINTER_TO): Remove.
7722 (DECL_MEMFUNC_POINTING_TO): Remove.
7723 (DECL_SAVED_TREE): Adjust definition.
7724 (tag_types): Remove signature_type_node.
7725 (SIGNATURE_FIELD_NAME): Remove.
7726 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
7727 (SIGNATURE_OPTR_NAME): Likewise.
7728 (SIGNATURE_SPTR_NAME): Likewise.
7729 (SIGNATURE_POINTER_NAME): Likewise.
7730 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
7731 (SIGNATURE_REFERENCE_NAME): Likewise.
7732 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
7733 (SIGTABLE_PTR_TYPE): Likewise.
7734 (SIGTABLE_NAME_FORMAT): Likewise.
7735 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
7736 (SIGTABLE_TAG_NAME): Likewise.
7737 (SIGTABLE_VB_OFF_NAME): Likewise.
7738 (SIGTABLE_VT_OFF_NAME): Likewise.
7739 (finish_base_specifiers): Change prototype.
7740 (build_signature_pointer_type): Remove.
7741 (build_signature_reference_type): Remove.
7742 (build_signature_pointer_constructor): Remove.
7743 (build_signature_method_call): Remove.
7744 (build_optr_ref): Likewise.
7745 (append_signature_fields): Likewise.
7746 (signature_error): Likewise.
7747 * call.c (build_this): Remove signature support.
7748 (build_over_call): Likewise.
7749 (build_new_method_call): Likewise.
7750 * class.c (add_implicitly_declared_members): Likewise.
7751 (finish_struct_1): Likewise.
7752 (finish_struct): Likewise.
7753 * cvt.c (cp_convert_to_pointer): Likewise.
7754 (convert_to_pointer_force): Likewise.
7755 (ocp_convert): Likewise.
7756 * decl.c (sigtable_decl_p): Remove.
7757 (init_decl_processing): Remove support for signatures.
7758 (cp_finish_decl): Likewise.
7759 (grokdeclarator): Likewise.
7760 (grokparms): Likewise.
7761 (xref_tag): Likewise.
7762 (start_function): Likewise.
7763 (start_method): Likewise.
7764 * decl2.c (finish_sigtable_vardecl): Remove.
7765 (flag_handle_signatures): Remove.
7766 (lang_f_options): Remove handle-signatures.
7767 (grokfield): Remove support for signatures.
7768 (grokbitfield): Likewise.
7769 (finish_file): Likewise.
7770 (reparse_absdcl_as_casts): Likewise.
7771 * error.c (dump_type_real): Likewise.
7772 (dump_function_decl): Likewise.
7773 * friend.c (make_friend_class): Likewise.
7774 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
7775 * hash.h: Regenerated.
7776 * init.c (build_new_1): Remove support for signatures.
7777 * lang-options.h: Remove -fhandle-signatures,
7778 -fno-handle-signatures.
7779 * lex.c (init_parse): Remove support for signatures.
7780 (yyprint): Likewise.
7781 * lex.h (rid): Remove RID_SIGNATURE.
7782 * method.c (build_decl_overload_real): Remove support for
7784 (hack_identifier): Likewise.
7785 * parse.y (base_class): Likewise.
7786 (base_class.1): Likewise.
7787 (access_specifier): Likewise.
7788 * search.c (lookup_member): Likewise.
7789 * semantics.c (finish_qualified_object_call_expr): Likewise.
7790 (finish_template_type_parm): Likewise.
7791 (begin_class_definition): Likewise.
7792 (finish_base_specifier): Likewise.
7794 * tree.c (build_cplus_method_type): Remove support for signatures.
7795 * typeck.c (require_complete_type): Likewise.
7796 (c_sizeof): Likewise.
7797 (c_alignof): Likewise.
7798 (build_object_ref): Likewise.
7799 (build_component_ref): Likewise.
7800 (build_indirect_ref): Likewise.
7801 (build_c_cast): Likewise.
7802 (build_modify_expr): Likewise.
7803 (convert_for_initialization): Likewise.
7804 * typeck2.c (signature_error): Remove.
7805 (store_init_value): Remove support for signatures.
7806 (digest_init): Likewise.
7807 (build_x_arrow): Likewise.
7808 (build_functional_cast): Likewise.
7809 * xref.c (GNU_xref_decl): Likewise.
7811 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
7813 * lex.c (do_identifier): Remove unnecessary lookup of class field.
7815 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
7817 * decl2.c (set_decl_namespace): Do not complain about non-matching
7818 decls if processing a template.
7820 1999-08-09 Mark Mitchell <mark@codesourcery.com>
7822 * decl.c (build_ptrmemfunc_type): Handle qualified
7823 pointer-to-member types here.
7824 * tree.c (cp_build_qualified_type_real): Simplify handling here.
7826 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7828 * lex.c (lang_identify): Likewise.
7830 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
7832 * Makefile.in: Update dependencies.
7833 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
7835 * decl.c: Include "function.h"
7836 (cleanup_label, return_label): Delete declarations.
7837 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
7838 (finish_function): Rename last_parm_insn variable to
7839 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
7840 * decl2.c: Include "function.h".
7841 (rtl_expr_chain): Delete declaration.
7842 * method.c: Include "function.h"
7843 * tree.c (build_vbase_pointer_fields): Don't initialize
7844 DECL_SAVED_INSNS with NULL_RTX.
7845 * typeck.c: Include "function.h"
7847 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
7849 * semantics.c (begin_function_try_block, finish_function_try_block,
7850 finish_function_handler_sequence): New fns.
7851 * parse.y (function_try_block): Use them.
7852 * pt.c (instantiate_decl): Likewise.
7854 * cp-tree.h: Declare in_function_try_handler.
7855 * decl.c: Define it.
7856 (start_function): Clear it.
7857 (struct cp_function, push_cp_function_context): Save it.
7858 (pop_cp_function_context): Restore it.
7859 * parse.y (function_try_block): Set and clear it.
7860 * except.c (expand_end_catch_block): Rethrow if we reach the end
7861 of a function-try-block handler in a ctor or dtor.
7862 * typeck.c (c_expand_return): Complain about returning from a
7863 function-try-block handler of a ctor.
7865 * parse.y (function_try_block): Call end_protect_partials
7866 before expand_start_all_catch.
7868 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
7870 * decl.c (struct binding_level): Add eh_region field.
7871 (push_binding_level): Set it.
7872 (define_label): Complain about jumping into an EH block.
7874 * ptree.c (print_lang_type): Print the real type of a PMF.
7875 Print what exceptions a fn type throws.
7877 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7879 * class.c (count_fields, add_fields_to_vec): Add static prototype.
7881 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
7882 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
7885 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
7888 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
7891 * dump.c (queue_and_dump_index, dump_int, dump_string,
7892 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
7894 (dump_stmt): Add static prototype.
7896 * errfn.c (cp_thing): Constify a char*.
7898 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
7899 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
7900 dump_expr): Constify a char*.
7902 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
7903 read_line_number): Add static prototype.
7904 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
7905 (real_yylex): Move label `letter' into the scope where it is used.
7907 * method.c (build_mangled_template_parm_index, build_overload_int,
7908 build_decl_overload_real, get_id_2): Constify a char*.
7910 * search.c (check_final_overrider): Make static.
7912 * typeck.c (composite_pointer_type): Constify a char*.
7914 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
7916 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
7917 we're looking at a class.
7919 * decl.c (lookup_name_real): Set the complain flag if we're
7920 looking for a namespace member.
7922 * lex.c (real_yylex): We can have a number with no digits.
7924 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
7926 * search.c (binfo_from_vbase): New fn.
7927 * cp-tree.h: Declare it.
7928 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
7929 from pointer to member of virtual base.
7930 * typeck.c (get_delta_difference): Likewise.
7932 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
7934 * pt.c (tsubst): Use build_index_type to build in-template array
7935 index type. Fixes g++.oliva/dwarf1.C.
7936 * decl.c (grokdeclarator): Likewise, just for consistency, as it
7937 doesn't seem to trigger the bug without it.
7939 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
7941 * typeck2.c (add_exception_specifier): Use complete_type.
7943 1999-08-06 Mark Mitchell <mark@codesourcery.com>
7945 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
7946 (dump_binary_op): Bulletproof.
7947 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
7948 * tree.c (search_tree): Don't enumerate all the nodes of classes
7949 `1', `2', and `<'; handle them generically. Don't be sorry about
7950 "unrecognized tree codes"; just abort.
7951 (no_linkage_check): Don't do linkage checks for templates.
7953 * tree.c (cp_build_qualified_type_real): Handle
7954 pointer-to-member-function types correctly.
7956 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
7958 * decl.c (pushdecl): Only give an error for shadowing a parm
7959 from *this* function.
7961 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
7963 * typeck2.c: Update URLs and mail addresses.
7965 1999-08-04 Nathan Sidwell <nathan@acm.org>
7967 * cp-tree.h (empty_except_spec): New global var.
7968 (compexcepttypes): Remove prototype.
7969 (comp_except_specs): Prototype new global function.
7970 (add_exception_specifier): Prototype new global function.
7971 * decl.c (empty_except_spec): Define new global var.
7972 (duplicate_decls): Use comp_except_specs, reword error message.
7973 (init_decl_processing): Initialize empty_except_spec.
7974 Adjust build_exception_variant calls.
7975 * parse.y (exception_specification_opt): Use empty_except_spec.
7976 (ansi_raise_identifier): Call check_for_new_type.
7977 (ansi_raise_identifiers): Use add_exception_specifier.
7978 * pt.c (tsubst): Use add_exception_specifier to build exception
7980 * search.c (check_final_overrider): New static function, broken
7981 out of get_matching_virtual. Check throw specifiers, reword
7983 (get_matching_virtual): Use check_final_overrider.
7984 * tree.c (build_exception_variant): Use comp_except_specs.
7985 * typeck.c (compexcepttypes): Remove.
7986 (comp_except_types): New static function, helper for
7987 comp_except_specs. Compare two types as exception specifiers.
7988 (comp_except_specs): New global function, compare two exception
7990 (comptypes): Adjust for comp_except_specs.
7991 * typeck2.c (add_exception_specifier): New global function.
7993 * class.c (check_for_override): Reword error message.
7995 1999-08-03 Nathan Sidwell <nathan@acm.org>
7997 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
7998 * cp-tree.h (struct lang_type): Added non_pod_class flag.
7999 (CLASSTYPE_NON_POD_P): New macro to access it.
8000 * class.c (finish_struct_1): Determine non-PODness.
8001 Check for arrays of pointers (-Weffc++).
8002 Remove array inspection duplicated code.
8003 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
8004 Use CLASSTYPE_NON_POD_P.
8006 1999-08-03 Nathan Sidwell <nathan@acm.org>
8008 * class.c (duplicate_tag_error): Preserve template information.
8010 1999-08-03 Nathan Sidwell <nathan@acm.org>
8012 * decl.c (start_enum): Show location of previous definition.
8013 * parse.y (enumlist_opt): New reduction.
8014 (structsp): Simplify enum rules to use enumlist_opt.
8016 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
8018 * lex.c (yyprint): Handle PFUNCNAME.
8020 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
8021 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
8023 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
8025 * decl.c (start_decl): Set attributes before duplicate_decls call.
8027 1999-08-02 Mark Mitchell <mark@codesourcery.com>
8029 * Make-lang.in (CXX_SRCS): Add dump.c.
8030 * Makefile.in (CXX_OBJS): Add dump.o.
8031 (dump.o): New target.
8032 * cp-tree.h (DECL_CONV_FN_P): Document.
8033 (DECL_OVERLOADED_OPERATOR_P): New function.
8034 (TYPE_PTRMEM_CLASS_TYPE): New macro.
8035 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8036 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
8037 (ASM_VOLATILE_P): New macro.
8038 (STMT_LINENO): Likewise.
8039 (cp_namespace_decls): New function.
8040 (dump_node_to_file): New function.
8041 * decl.c (cp_namespace_decls): New function.
8042 (walk_namespaces_r): Use it.
8043 (wrapup_globals_for_namespace): Likewise.
8044 * decl2.c (flag_dump_translation_unit): New variable.
8045 (lang_decode_option): Handle -fdump-translation-unit.
8046 (finish_file): If flag_dump_translation_unit is set, dump the
8049 * lang-options.h: Add -fdump-translation-unit.
8050 * pt.c (tsubst_template_parms): Robustify.
8051 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
8052 (tsubst_expr): Use STMT_LINENO.
8053 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
8054 for invalid cv-qualifiers even while building templates.
8056 1999-08-02 Richard Henderson <rth@cygnus.com>
8058 * call.c: Include defaults.h instead of expr.h.
8061 * typeck.c: Include defaults.h.
8063 1999-08-02 Mark Mitchell <mark@codesourcery.com>
8065 * lex.c (errorcount, sorrycount): Don't declare.
8066 * repo.c (errorcount, sorrycount): Likewise.
8067 * typeck2.c (errorcount, sorrycount): Likewise.
8069 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
8071 * call.c (convert_default_arg, build_over_call): Change all uses of
8072 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
8073 Ensure expr.h is included.
8074 * decl.c (grokparams): Ditto.
8075 * pt.c (tsubst_decl): Ditto.
8076 * typeck.c (convert_arguments): Ditto.
8078 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
8080 * class.c (mark_overriders): Fix order of args to overrides.
8081 (warn_hidden): Likewise. Fix for having virtual and non-virtual
8082 functions with the same name.
8084 1999-08-02 Richard Henderson <rth@cygnus.com>
8086 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
8088 1999-08-01 Mark Mitchell <mark@codesourcery.com>
8090 * call.c (build_conditional_expr): Fix typo in comment.
8092 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
8094 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
8095 case_stack; use in_control_zone_p.
8096 * typeck.c (c_expand_return): Likewise.
8098 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
8100 * except.c (catch_clauses): Delete declaration.
8102 1999-07-30 Mark Mitchell <mark@codesourcery.com>
8104 * call.c (build_conditional_expr): Call convert_from_reference to
8105 avoid reference/non-reference type confusion. Fix typo.
8107 1999-07-30 Richard Henderson <rth@cygnus.com>
8109 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
8110 * cp-tree.h (initializer_constant_valid_p): Remove.
8112 1999-07-28 Mark Mitchell <mark@codesourcery.com>
8114 * call.c (conditional_conversion): Don't build BASE_CONVs for
8115 conversions between things that have the same type.
8116 (build_conditional_expr): Tweak.
8117 (convert_like): Some BASE_CONVs really do require the generation
8120 * init.c (perform_member_init): Don't go through build_modify_expr
8121 for simple initializations.
8123 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
8125 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
8126 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
8127 virtual functions and MI. Simplify.
8129 * method.c: Remove prototype for largest_union_member.
8130 * pt.c (determine_specialization): Fix uninitialized warning.
8131 * lex.c (real_yylex): Likewise.
8133 1999-07-27 Mark Mitchell <mark@codesourcery.com>
8135 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
8138 * cp-tree.h (BINFO_VIRTUALS): Document new format.
8139 * class.c (modify_one_vtable): Change prototype accordingly.
8140 (modify_all_vtables): Likewise.
8141 (modify_all_direct_vtables): Likewise.
8142 (modify_all_indirect_vtables): Likewise.
8143 (build_vtable_entry_for_fn): New function.
8144 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
8145 (modify_vtable_entry): Likewise.
8146 (add_virtual_function): Likewise.
8147 (build_vtbl_initializer): New function.
8148 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
8149 (fixup_vtable_deltas1): Likewise.
8150 (fixup_vtable_deltas): Likewise.
8151 (override_one_vtable): Likewise.
8152 (finish_struct_1): Likewise.
8154 * error.c (dump_expr): Likewise.
8155 * search.c (get_abstract_virtuals_1): Likewise.
8156 (get_abstract_virtuals): Likewise.
8157 (expand_upcast_fixups): Likewise.
8158 * tree.c (debug_binfo): Likewise.
8159 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
8160 __pure_virtual here.
8162 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8164 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
8165 as per 1999-07-26 change.
8167 * typeck.c (c_sizeof): Don't allow non-static data members.
8168 (expr_sizeof): Likewise.
8170 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
8172 * input.c (feed_input): Only touch lineno and input_filename
8173 if !USE_CPPLIB. Save the old values before setting the new ones.
8175 * input.c (feed_input): Add file, line parms.
8176 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
8177 (real_yylex): Check linemode before input_redirected().
8179 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
8180 from op new to warning.
8182 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8184 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
8185 * call.c: All uses changed.
8186 * typeck.c: Likewise.
8188 1999-07-26 Nathan Sidwell <nathan@acm.org>
8190 * exception.cc (__cplus_type_matcher): Match __eh_matcher
8193 1999-07-26 Mark Mitchell <mark@codesourcery.com>
8195 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
8196 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
8197 (strip_top_quals): Declare.
8198 (ncp_convert): Likewise.
8199 (type_after_usual_arithmetic_converions): Likewise.
8200 (composite_pointer_type): Likewise.
8201 * call.c (strip_top_quals): Don't make it static.
8202 (promoted_arithmetic_type_p): New function.
8203 (conditional_conversion): Likewise.
8204 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
8205 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
8206 for converting a type to itself.
8207 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
8208 (implicit_conversion): Make sure the from and to types are
8210 (add_builtin_candidate): Correct handling of ?: operator.
8211 (add_builtin_candidates): Improve documentation.
8212 (build_conditional_expr): New function.
8213 (can_convert): Implement in terms of can_convert_arg.
8214 (ncp_convert): New function.
8215 * typeck.c (type_after_usual_arithmetic_conversions): New
8216 function, split out from common_type.
8217 (composite_pointer_type): New function, split out from
8218 build_conditional_expr.
8219 (common_type): Use type_after_usual_arithmetic_conversions.
8220 Remove redundant attribute merging.
8221 (comptypes): Tidy. Handle COMPLEX_TYPE.
8222 (build_binary_op_nodefault): Use null_ptr_cst_p.
8223 (build_conditional_expr): Remove.
8224 (convert_for_assignment): Use new conversion functions.
8226 * cp-tree.h (abstract_virtuals_error): Change declaration.
8227 * typeck2.c (abstract_virtuals_error): Check to see if an error
8228 ocurred, and return a boolean value accordingly.
8229 (build_functional_cast): Adjust accordingly.
8230 * class.c (finish_struct_1): Likewise.
8231 * cvt.c (ocp_convert): Likewise.
8232 * decl.c (cp_finish_decl): Likewise.
8233 (grokparams): Likewise.
8234 (grok_op_properties): Likewise.
8235 (start_function): Likewise.
8236 * init.c (build_new_1): Likewise.
8238 * pt.c (unify): Don't get confused by pointers-to-member functions.
8240 * search.c (build_cplus_new): Robustify.
8242 1999-07-24 Richard Henderson <rth@cygnus.com>
8244 * gxx.gperf (__builtin_va_arg): New.
8245 * parse.y (VA_ARG): New token.
8246 (unary_expr): Recognize it.
8248 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
8250 * g++FAQ.texi: Deleted per Joe Buck's request.
8251 * Makefile.in: Corresponding changes.
8253 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
8255 * lex.c: Sync with C frontend.
8256 (whitespace_cr): New fn.
8257 (skip_white_space): Use it.
8258 (init_parse): Reorder.
8259 (yyprint): Support CONSTANT.
8260 (pragma_getc, pragma_ungetc): Bring back.
8261 (read_line_number): Change in_system_header directly.
8262 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
8263 (parse_float): Update to C version.
8264 (yylex): Handle '$' under the letter case.
8265 Remove looking_for_typename handling.
8266 Support hex floating point constants.
8267 Follow C's lead for choosing type of integer constants.
8268 Rearrange stuff to match C frontend.
8269 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
8270 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
8272 1999-07-23 Mark Mitchell <mark@codesourcery.com>
8274 * call.c (reference_binding): Tweak.
8275 (mayble_handle_implicit_object): Use direct_reference_binding to
8276 create the right implicit conversion sequence.
8278 1999-07-22 Mark Mitchell <mark@codesourcery.com>
8280 * pt.c (convert_nontype_argument): Don't call decl_constant_value
8281 if we're converting to a reference type.
8283 * call.c (NEED_TEMPORARY_P): New macro.
8284 (standard_conversion): Set it, for derived-to-base conversions.
8285 (reference_related_p): New function.
8286 (reference_compatible_p): Likewise.
8287 (convert_class_to_reference): Likewise.
8288 (direct_reference_binding): Likewise.
8289 (reference_binding): Rework for standards-compliance.
8290 (convert_like): Adjust accordingly.
8291 (maybe_handle_ref_bind): Simplify; the right conversion sequences
8292 are now built up in reference_binding.
8293 (initialize_reference): New function.
8294 * cp-tree.h (ICS_USER_FLAG): Document.
8295 (ICS_THIS_FLAG): Likewise.
8296 (ICS_BAD_FLAG): Likewise.
8297 (NEED_TEMPORARY_P): Likewise.
8298 (cp_lvalue_kind): New type.
8299 (real_lvalue_p): Return it.
8300 * error.c (dump_expr): Provide more accurate representation for
8302 * init.c (expand_default_init): Do not try to perform implicit
8303 conversions for a brace-enclosed initializer.
8304 * search.c (lookup_conversions): Document.
8305 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
8307 (real_lvalue_p): Adjust accordingly.
8308 (lvalue_p): Likewise.
8309 (build_cplus_new): Don't allow the creation of an abstract class.
8310 * typeck.c (convert_for_initialization): Use initialize_reference.
8312 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
8314 * lex.c (real_yylex) : Correct the test for overflow when lexing
8317 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
8319 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
8320 not DECL_BUILT_IN, to determine if a function is internally declared.
8321 (duplicate_decls): Likewise. Improve handling of builtins.
8322 (push_overloaded_decl): Remove special handling of builtins.
8324 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
8326 * decl.c (grokdeclarator): Pull out decl_constant_value in
8329 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
8330 * cp-tree.h, pt.c, semantics.c: Adjust.
8331 * method.c (largest_union_member): Remove.
8333 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
8335 * lex.c (token_getch, token_put_back): New fns.
8336 (real_yylex): Use them.
8338 * lex.c (lang_init): Generalize.
8339 (lang_init_options): Tell cpplib this is C++.
8340 (nextchar): Remove. Replace uses with put_back.
8341 (skip_white_space): Handle linemode here. Optimize for cpplib.
8342 (extend_token_buffer_to): New fn.
8343 (extend_token_buffer): Use it.
8344 (read_line_number, check_newline): Just deal with tokens.
8345 (real_yylex): More cpplib optimizations. Simplify. Don't produce
8346 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
8347 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
8348 * parse.y (PAREN_STAR_PAREN): Remove.
8349 * input.c: Don't use the putback machinery with cpplib.
8350 (sub_getch): Fold back into getch.
8351 (getch): Don't handle linemode here.
8352 (feed_input): Unget any text in the token buffer.
8354 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
8355 nextyychar, nextyylval): Remove.
8357 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
8358 Jason Merrill <jason@yorick.cygnus.com>
8360 * lex.c (indent_level): New variable.
8361 (init_parse): Set cpp_token to CPP_DIRECTIVE.
8362 (consume_string): Make this smart about USE_CPPLIB.
8363 (yyungetc): Use put_back function.
8364 (pragma_getc, pragma_ungetc): Functions deleted.
8365 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
8366 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
8368 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
8369 Also, clean up cases where we redundantly set token_buffer[0].
8370 (read_line_number): New fn.
8371 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
8372 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
8373 (sub_getch): Conditionalize out code that's not appropriate if
8375 (put_back): Rewrite in case USE_CPPLIB is defined.
8376 (input_redirected): Ditto.
8378 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
8380 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
8381 c_global_trees and accessor macros defined in c-common.h.
8382 (cp_tree_index): New enumeration.
8383 (cp_global_trees): Declare new array. Add accessor macros for it, and
8384 delete declarations of tree nodes replaced by it.
8385 (builtin_function): Delete macro, add declaration for new function.
8387 * decl.c: Delete definitions for tree nodes that were replaced by
8388 cp_global_trees and c_global_trees.
8389 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
8390 to generate the common builtins here.
8391 (builtin_function): New function.
8392 * decl2.c (abort_fndecl): Delete declaration.
8393 * except.c (expand_builtin_return_address): Delete declaration.
8394 (builtin_return_address_fndecl): Delete variable.
8395 (const_ptr_type_node): Delete declaration.
8396 * lex.c (cons_up_default_function): Delete declaration of
8398 * parse.y (void_list_node): Delete declaration.
8399 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
8401 (const_string_type_node): Delete declaration.
8402 * search.c (abort_fndecl): Delete declaration.
8403 * Makefile.in: Update dependencies.
8405 1999-07-19 Mark Mitchell <mark@codesourcery.com>
8407 * pt.c (check_default_tmpl_args): Move test for missing default
8408 arguments here, from ...
8409 (end_template_parm_list): Here.
8411 1999-07-18 Mark Mitchell <mark@codesourcery.com>
8413 * decl.c (lookup_nested_type): Remove.
8414 (pushtag): Don't call it.
8416 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
8418 * Makefile.in (INTERFACE): Bump to 2.
8420 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
8422 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
8423 instructions to gcc.gnu.org. Removed e-mail address.
8425 1999-07-17 Mark Mitchell <mark@codesourcery.com>
8427 * pt.c (determine_specialization): Tighten error-checking.
8428 (end_template_parm_list): Likewise.
8430 1999-07-14 Mark Mitchell <mark@codesourcery.com>
8432 * pt.c (check_default_tmpl_args): Handle friends defined in the
8433 class just like member functions defined in the class.
8435 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
8436 Jason Merrill <jason@yorick.cygnus.com>
8438 * cp-tree.h (struct lang_decl): Added field for storing sorted
8439 FIELD_DECLs (used in TYPE_DECLs).
8440 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
8441 (DECL_SORTED_FIELDS): New macro.
8442 * class.c (method_name_cmp): New function.
8443 (finish_struct_methods): Modified to support sorting and searching
8445 (finish_struct_anon): Changed code in inner loop to use ELT rather
8446 than UELT (which required an extra indirection for every reference).
8447 (field_decl_cmp): New function to support sorting FIELD_DECLs.
8448 (finish_struct_1): Sort fields.
8449 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
8450 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
8451 Also, switch to using array indexing rather than a changing pointer.
8452 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
8455 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
8457 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
8458 casts in system headers or extern "C" blocks.
8460 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
8463 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
8465 * decl2.c (write_virtuals): Deleted declaration.
8466 * cp-tree.h (write_virtuals): Deleted extern declaration.
8467 * class.c (finish_struct_1): Removed #if 0'd code that mentions
8469 * semantics.c (begin_class_definition): Rewrite code to not depend
8472 * lex.c (cp_pragma_interface): New function.
8473 (cp_pragma_implementation): Likewise.
8474 (handle_cp_pragma): Call them.
8476 * typeck.c (comptypes): Simplify C code in look_hard.
8478 * xref.c (PALLOC): Use xcalloc, not calloc.
8479 (SALLOC): Use xmalloc, not malloc.
8481 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
8483 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
8486 * decl.c (duplicate_decls): If a redeclaration doesn't match the
8487 initial declaration, then don't save the inline info and by all
8488 means don't mark the function as a builtin function.
8490 * decl.c (lookup_name_real): Set NONCLASS to 1 if
8491 CURRENT_CLASS_TYPE is 0.
8493 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
8496 * ptree.c (print_lang_type): Added vtable-needs-writing.
8498 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
8500 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
8502 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
8504 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8505 Merged into c-common.
8507 1999-07-05 Dave Brolley <brolley@cygnus.com>
8509 * lex.c (errorcount): Declare it.
8510 (finish_parse): Update errorcount for when using CPPLIB.
8512 1999-07-05 Mark Mitchell <mark@codesourcery.com>
8514 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
8516 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
8517 * decl.c (push_class_binding): Use it.
8518 (lookup_name_real): Likewise.
8520 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
8522 * cp-tree.h (widest_integer_literal_type_node,
8523 widest_unsigned_literal_type) : New.
8524 * decl.c (widest_integer_literal_type_node,
8525 widest_unsigned_literal_type) : New.
8526 (init_decl_processing): Handle/use the two new types.
8527 * lex.c (real_yylex): Same.
8528 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
8531 1999-07-01 Mark Mitchell <mark@codesourcery.com>
8533 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
8534 to anonymous cv-qualified types.
8536 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
8538 * lex.c (real_yylex) : Change integer literal overflow handling to
8541 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
8543 1999-06-28 Richard Henderson <rth@cygnus.com>
8545 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
8547 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
8549 * error.c (dump_type_real): Handle TREE_LIST again.
8551 * typeck.c (comp_target_parms): Don't complain about
8552 converting from () to (...) if !flag_strict_prototype.
8554 * decl.c (grokdeclarator): Update the names of all variants when
8557 1999-06-21 Mark Mitchell <mark@codesourcery.com>
8559 * init.c (expand_aggr_vbase_init): Rename to
8560 construct_virtual_bases. Conditionalize construction here,
8562 (emit_base_init): Here.
8564 1999-06-19 Mark Mitchell <mark@codesourcery.com>
8566 * semantics.c (finish_asm_stmt): Apply decay conversions to
8569 * decl.c (expand_static_init): When building an anonymous function
8570 for use with atexit, compute its body before and after entering
8573 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
8576 1999-06-18 Mark Mitchell <mark@codesourcery.com>
8578 * init.c (expand_aggr_vbase_init): Add flag parameter.
8579 (build_partial_cleanup_for): Remove, inlining into ..
8580 (expand_cleanup_for_base): ... here. Take flag parameter.
8581 (emit_base_init): Pass the in_chrg parameter to
8582 emit_aggr_vbase_init.
8583 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
8585 1999-06-16 Mark Mitchell <mark@codesourcery.com>
8587 * decl2.c (import_export_decl): Use same_type_p, rather than
8588 relying on pointer-equality for types.
8590 * method.c (do_build_copy_constructor): Simplify.
8592 * call.c (build_method_call): Remove bogus code for two-argument
8594 * init.c (build_new_1): Expand on comment, and remove dead code.
8596 * init.c (expand_cleanup_for_base): New function, split out
8598 (emit_base_init): Here.
8599 (expand_aggr_vbase_init): Use it.
8601 1999-06-15 Mark Mitchell <mark@codesourcery.com>
8603 * cp-tree.h (class_cache_firstobj): Declare.
8604 (maybe_push_cache_obstack): Rename to push_cache_obstack.
8605 * class.c (permanent_obstack): Remove declaration.
8606 (class_cache_firstobj): Make it global.
8607 (add_method): Don't use permanent_obstack directly.
8608 (pushclass): Only free the class_cache_obstack if we know how far
8610 (maybe_push_cache_obstack): Rename to push_cache_obstack.
8611 * decl.c: Remove dead comment.
8612 (saved_scope): Add class_cache_firstobj.
8613 (push_to_top_level): Save it.
8614 (pop_from_top_level): Restore it.
8615 (push_class_level_binding): Use push_cache_obstack, not
8616 maybe_push_cache_obstack.
8617 * search.c (push_class_decls): Likewise.
8619 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
8621 * pt.c (tsubst_friend_function): Push into namespace of friend
8622 function before pushdecl'ing it.
8624 1999-06-14 Nathan Sidwell <nathan@acm.org>
8626 * call.c (build_new_op): Remove REF_BIND from all operands.
8628 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
8630 * init.c (build_new_1): Look up operator delete even if there was
8631 no explicit new placement.
8633 1999-06-08 Nathan Sidwell <nathan@acm.org>
8635 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
8637 (build_throw): ... here. Call it.
8638 (process_start_catch_block): Call it.
8640 1999-06-07 Mark Mitchell <mark@codesourcery.com>
8642 * search.c (convert_pointer_to_single_level): Reimplement without
8645 1999-06-06 Mark Mitchell <mark@codesourcery.com>
8647 * method.c (is_back_referenceable_type): Back-reference bools when
8650 1999-06-07 Dave Brolley <brolley@cygnus.com>
8652 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
8653 * input.c (putback_buffer): New structure type.
8654 (putback): Replaces putback_char member.
8655 (putback): Replaces putback_char static variable.
8656 (feed_input): Use putback.
8657 (end_input): Use putback.
8658 (sub_getch): Use putback.
8659 (put_back): Use putback.
8661 1999-06-05 Mark Mitchell <mark@codesourcery.com>
8663 * decl.c (grokdeclarator): Fix typo in last change.
8665 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
8667 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
8668 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
8670 1999-06-04 Nathan Sidwell <nathan@acm.org>
8672 * except.c (build_throw): Check throw expression validity.
8674 1999-06-03 Mark Mitchell <mark@codesourcery.com>
8676 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
8677 just because flag_signed_bitfields is false.
8679 1999-06-03 Nathan Sidwell <nathan@acm.org>
8681 * semantics.c (begin_class_definition): Update the struct's
8683 * class.c (finish_struct): ... rather than here.
8685 * decl.c (make_typename_type): Don't rely on uninitialized
8688 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8690 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
8692 1999-05-31 Mark Mitchell <mark@codesourcery.com>
8694 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
8695 and friends rather than messing with current_obstack directly.
8696 (cp_build_qualified_type_real): Rework ARRAY_TYPE
8697 allocation to match practice throughout the rest of the
8700 1999-05-30 Mark Mitchell <mark@codesourcery.com>
8702 * lex.c (make_lang_type): Create TYPE_BINFO for
8703 TEMPLATE_TYPE_PARMs just like for non-template types.
8705 * decl.c (start_decl): Move checks on initialization to ...
8706 (cp_finish_decl): Here. Tidy formatting slightly.
8708 1999-05-28 Mark Mitchell <mark@codesourcery.com>
8710 * decl.c (add_binding): Don't complain about a redeclaration of a
8711 semantically identical typedef in a local scope.
8713 1999-05-28 Nathan Sidwell <nathan@acm.org>
8715 * decl.c (complete_array_type): Allocate off same obstack. Fix
8716 DO_DEFAULT comment to match reality.
8718 * friend.c (make_friend_class): Fix diagnostic typo.
8720 1999-05-28 Mark Mitchell <mark@codesourcery.com>
8722 * decl.c (lookup_namespace_name): Handle getting a
8724 (expand_static_init): Don't call pushdecl for implicitly declared
8725 `atexit' used to register destructors.
8727 1999-05-25 Mark Mitchell <mark@codesourcery.com>
8729 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
8732 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
8733 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
8734 by combining TEMPLATE_INFO and LEVEL into a single union.
8735 (DECL_TEMPLATE_INFO): Reformat.
8736 (DECL_SAVED_TREE): Document.
8737 (DECL_TEMPLATE_INJECT): Remove.
8738 * class.c (finish_struct): Remove code to deal with
8739 DECL_TEMPLATE_INJECT.
8741 * decl.c (maybe_process_template_type_declaration): Handle all new
8742 types in templates uniformly.
8743 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
8745 * pt.c (lookup_template_class): Inject template instantiations of
8746 forward-declarations.
8747 (instantiate_class_template): Remove code processing
8748 DECL_TEMPLATE_INJECT.
8750 * pt.c (lookup_template_class): Tweak lookup to find member
8753 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
8755 * semantics.c (finish_asm_stmt): Make strings permanent if they're
8758 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
8760 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
8761 parts of pointer to data member types.
8763 1999-05-24 Mark Mitchell <mark@codesourcery.com>
8765 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
8766 and then make it look like `abort'. Just use `abort' instead.
8768 * typeck.c (build_static_cast): Don't allow static_casts that cast
8770 (casts_away_constness_r): New function.
8771 (casts_away_constness): Likewise.
8773 * decl.c (lookup_tag): Remove code no longer needed after
8774 name-lookup improvements.
8775 * decl2.c (handle_class_head): Make error-recovery more robust.
8776 * friend.c (make_friend_class): Reject templated typename types.
8777 * lex.c (is_global): A template parameter isn't global.
8778 * parse.y (class_head): Robustify.
8779 * parse.c: Regenerated.
8781 1999-05-22 Mark Mitchell <mark@codesourcery.com>
8783 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
8784 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
8786 * cp-tree.h (push_nested_namespace): Declare.
8787 (pop_nested_namespace): Likewise.
8788 * decl.c (push_nested_namespace): New function.
8789 (pop_nested_namespace): Likewise.
8790 * pt.c (instantiate_class_template): Use them.
8792 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
8794 * cp-tree.h (cplus_expand_constant): Declare.
8795 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
8796 converted from one pointer-to-object type to another.
8797 * expr.c (cplus_expand_constant): Don't make it static.
8798 * typeck.c (build_component_ref): Don't crash when presented with
8799 a component which is a TEMPLATE_DECL.
8800 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
8801 cast from a pointer-to-member constant to its own type does not
8802 result in a valid non-type template argument.
8804 1999-05-21 Mark Mitchell <mark@codesourcery.com>
8805 Nathan Sidwell <nathan@acm.org>
8807 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
8808 * cp-tree.h: Fix typo in documentation on pointers-to-members.
8809 (cp_build_qualified_type): Make it a macro.
8810 (cp_build_qualified_type_real): Declare.
8811 * decl.c (grokdeclarator): Remove misleading comment. Avoid
8812 problem with template parameters and restrict-qualification.
8813 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
8814 * hash.h: Regenerated.
8815 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
8817 (NORID): Remove definition.
8818 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
8819 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
8820 (fn_type_unification): Check that the function type resulting from
8821 the deduction is legal.
8822 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
8823 (unify): Use cp_build_qualified_type_real.
8824 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
8825 (cp_build_qualified_type): Rename to ...
8826 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
8827 and modify appropriately.
8829 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
8830 reveal optimization opportunities.
8832 * pt.c (tsubst): Don't issue error messages when we're not
8833 complaining, even if we see a qualified function type.
8834 (check_cv_quals_for_unify): Don't allow a qualified function
8837 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
8839 * class.c (instantiate_type): Downgrade errors for object-dependent
8840 memfn refs to pedwarn.
8842 1999-05-20 Mark Mitchell <mark@codesourcery.com>
8844 * decl.c (grokdeclarator): Don't treat [] as indicating a
8845 zero-sized array in a typedef.
8847 * call.c (build_object_call): Don't look at DECL_NAME for a type.
8848 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
8849 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
8851 * pt.c (for_each_template_parm): Rework to match documentation.
8852 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
8854 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
8856 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
8858 * class.c (finish_base_struct): Allow non-COM bases for COM classes
8859 except at the leftmost position.
8860 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
8861 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
8862 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
8864 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
8865 (build_cplus_new): Make sure that what we return is of the right type.
8867 1999-05-20 Mark Mitchell <mark@codesourcery.com>
8869 * cp-tree.h (make_ptrmem_cst): New function.
8870 * expr.c (cplus_expand_constant): Split out from ...
8871 (cplus_expand_expr): Here. Use cplus_expand_constant.
8872 (init_cplus_expand): Set lang_expand_constant.
8873 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
8875 * tree.c (make_ptrmem_cst): Define.
8876 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
8877 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
8879 1999-05-19 Mark Mitchell <mark@codesourcery.com>
8881 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
8883 * decl2.c (start_static_storage_duration_function): Fix comment.
8884 (finish_file): Create static storage duration functions lazily.
8886 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
8888 Implement anonymous structs.
8889 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
8890 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
8891 * class.c (finish_struct_1): Remove redundant check for anon struct.
8892 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
8893 (check_tag_decl): Check for anonymous struct here.
8894 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
8895 * init.c (sort_member_init, emit_base_init): Handle getting fields
8896 as well as names in current_member_init_list.
8897 (perform_member_init): Handle getting an anon aggr.
8898 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
8899 (do_build_copy_constructor): Likewise.
8901 1999-05-19 Mark Mitchell <mark@codesourcery.com>
8903 * tree.c (cp_build_qualified_type): Don't allow qualified function
8906 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
8908 * gxxint.texi: Fix typo.
8910 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
8912 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
8913 * class.c (finish_struct_1): Use CLASS_TYPE_P.
8914 * ptree.c (print_lang_type): Likewise.
8915 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
8917 * typeck2.c (digest_init): Likewise.
8919 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
8921 * call.c (joust): Compare the types of the conv ops, not the
8922 target types of the conversions.
8924 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
8926 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
8929 1999-05-17 Mark Mitchell <mark@codesourcery.com>
8931 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
8932 * decl.c (grokfndecl): Don't allow inline declarations of friend
8933 template specializations, or friend template specializations with
8935 * pt.c (tsubst): Handle substitution into array types that does
8936 not yield a fixed upper bound, even when not processing a
8938 (tsubst_copy): Deal with the fact that the second operand to a
8939 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
8940 * search.c (marked_pushdecls_p): Don't descend into
8941 TEMPLATE_TYPE_PARMs and the like.
8942 (unmarked_pushdecls_p): Likewise.
8944 * call.c (build_over_call): Don't throw away
8945 initializations/copies of empty classes; use MODIFY_EXPR and
8946 INIT_EXPR as for non-empty classes.
8947 * class.c (finish_struct_1): Put the padding byte for an empty
8948 class on the TYPE_NONCOPIED_PARTS list for the class.
8950 1999-05-16 Mark Mitchell <mark@codesourcery.com>
8952 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
8953 indicate a reference to a field that is a qualified name.
8955 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
8957 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
8958 ASM_OUTPUT_CONSTRUCTOR.
8960 * friend.c (do_friend): Add attrlist arg. Remove support for
8961 getting a non-decl as 'decl'.
8962 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
8964 (grokdeclarator): Adjust.
8965 * cp-tree.h: Adjust.
8967 1999-05-16 Mark Mitchell <mark@codesourcery.com>
8969 * cp-tree.h (permanent_p): New function.
8970 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
8971 possibly complex tree node.
8972 * tree.c (mapcar): Adjust comments, and follow coding standards in
8974 (permanent_p): New function.
8976 1999-05-13 Per Bothner <bothner@cygnus.com>
8978 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
8979 primitive Java types, if we actually see `extern "Java"'.
8981 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
8983 * lang-specs.h: Pass -$ to the preprocessor.
8985 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
8987 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
8988 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
8989 (resolve_offset_ref): Don't handle a raw baselink.
8990 * cvt.c (build_expr_type_conversion): Likewise.
8991 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
8992 convert_for_initialization): Likewise.
8993 * class.c (instantiate_type): Handle seeing a baselink under an
8995 * error.c (dump_expr): Likewise.
8996 * pt.c (for_each_template_parm): Likewise.
8997 (resolve_overloaded_unification): Likewise.
8998 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
8999 * typeck.c (expr_sizeof): Also complain about other permutations
9000 of overloaded functions.
9002 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
9004 * init.c (resolve_offset_ref): Don't return a raw method.
9006 * typeck.c (decay_conversion): Don't handle a raw method.
9007 Resolve all OFFSET_REFs.
9008 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
9009 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
9010 same_type_p for pmf bits. Don't use build_binary_op to compare
9011 raw pointers to methods.
9012 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
9013 to decide when to call resolve_offset_ref.
9014 (build_c_cast, convert_for_initialization): Likewise.
9015 * cvt.c (build_expr_type_conversion): Likewise.
9017 1999-05-06 Nathan Sidwell <nathan@acm.org>
9019 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
9021 1999-05-05 Mark Mitchell <mark@codesourcery.com>
9023 * decl2.c (start_objects): Don't let static constructors and
9024 destructors get inlined.
9026 * parse.y (nested_name_specifier): Make sure ordinary types are
9027 complete, just like template types.
9028 * parse.c: Regenerated.
9030 * pt.c (check_explicit_specialization): Improve error messages.
9032 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
9034 * typeck.c (string_conv_p): Use same_type_p to check whether we
9035 try to convert between char and wchar_t.
9037 1999-05-03 Mark Mitchell <mark@codesourcery.com>
9039 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
9040 lookup to error_mark_node here.
9041 (lookup_member): Revise documentation. Add comments. Don't set
9042 the TREE_TYPE to error_mark_node here, and don't build up an extra
9043 TREE_LIST for ambiguous lookups.
9044 (setup_class_bindings): Adjust accordingly.
9045 (push_class_decls): Revise out-of-date comments.
9047 * typeck.c (build_const_cast): Tighten checks for legality.
9049 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
9051 * init.c (build_member_call): Lookup names coming from
9052 namespace-scoped LOOKUP_EXPR.
9054 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
9056 * gxxint.texi: Add documentation for 'I'.
9058 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
9060 * tinfo.cc (operator==): Qualify type_info with std::.
9062 1999-05-02 Mark Mitchell <mark@codesourcery.com>
9064 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
9065 (DECL_COMDAT): Remove definition.
9067 1999-05-01 Mark Mitchell <mark@codesourcery.com>
9069 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
9072 1999-04-30 Mark Mitchell <mark@codesourcery.com>
9074 * class.c (build_vtable): Use build_lang_decl when building
9075 vtables, not just build_decl.
9076 (prepare_fresh_vtable): Likewise.
9077 * decl.c (wrapup_globals_for_namespace): Mark vtables as
9078 DECL_EXTERNAL when calling wrapup_global_declarations.
9079 * decl2.c (priority_info_s): Add initializations_p and
9080 destructions_p members.
9081 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
9082 when deciding what vtables to write out.
9083 (ssdf_decls): New variable.
9084 (ssdf_decls_used): Likewise.
9085 (start_static_storage_duration_function): Deal with being called
9086 multiple times. Avoid inlining this function.
9087 (generate_inits_for_priority): Deal with reuse of priority map.
9088 (get_priority_info): Clear initializations_p and destructions_p.
9089 (do_static_initialization): Tweak comment.
9090 (do_static_destruction): Likewise. Fix condition on sentries for
9092 (generate_ctor_or_dtor_function): Call all of the static storage
9094 (generate_ctor_or_dtor_function_for_priority): Check
9095 initializations_p and destructions_p to see what priorities need
9096 initialization functions.
9097 (finish_file): Rework to generate multiple static storage duration
9098 functions, rather than just one.
9100 * typeck.c (build_const_cast): Tweak last change to handle
9101 templates correctly.
9103 * typeck.c (build_const_cast): Disallow use of const_cast to
9104 anything but a pointer or reference type.
9106 1999-04-30 Nathan Sidwell <nathan@acm.org>
9108 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
9111 1999-04-29 Mark Mitchell <mark@codesourcery.com>
9113 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
9114 (finish_file): Indent comments properly.
9116 1999-04-29 Richard Henderson <rth@cygnus.com>
9118 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
9119 (do_static_destruction): Likewise.
9121 1999-04-29 Nathan Sidwell <nathan@acm.org>
9123 * cp-tree.h (TYPE_NOTHROW_P): New macro.
9124 * decl2.c (delete_sanity): Warn on deleting void *.
9125 * init.c (build_new_1): Use TYPE_NOTHROW_P.
9126 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
9127 throwing operator new.
9129 1999-04-28 Nathan Sidwell <nathan@acm.org>
9131 * cp-tree.h (build_component_addr): Remove prototype.
9132 * typeck.c (build_component_addr): Make static. Remove MSG
9134 (build_component_addr): Remove MSG parameter, clean up
9136 (build_x_function_call): Use cp_error.
9137 (build_unary_op): Adjust call of build_component_addr.
9139 1999-04-28 Mark Mitchell <mark@codesourcery.com>
9141 * pt.c (tsubst_friend_class): Check for NULL.
9143 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
9145 * search.c (binfo_for_vtable): Initialize bfvi.var.
9147 1999-04-27 Nathan Sidwell <nathan@acm.org>
9149 * rtti.c (build_x_typeid): Check rtti is enabled.
9151 1999-04-26 Mark Mitchell <mark@codesourcery.com>
9153 * search.c (is_subobject_of_p): Make sure we're looking at the
9156 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
9158 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
9160 1999-04-23 Mark Mitchell <mark@codesourcery.com>
9162 * decl2.c (finish_file): Tweak handling of extern inlines so that
9163 they are not unnecessarily put out.
9165 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
9166 such as base classes.
9168 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
9170 * tree.c (build_exception_variant): Fix typo: use the chain of U,
9171 not trying V, while cycling through U.
9173 1999-04-22 Mark Mitchell <mark@codesourcery.com>
9175 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
9176 preserves_first_arg. Enlarge dummy accordingly.
9177 (DECL_TINFO_FN_P): New macro.
9178 (SET_DECL_TINFO_FN_P): Likeiwse.
9179 (DECL_RETURNS_FIRST_ARG): Remove.
9180 (DECL_PRESERVES_THIS): Likewise.
9181 (DECL_INIT_PRIORITY): New macro.
9182 (finish_struct_1): Change prototype.
9183 (cat_namespace_levels): Remove prototype.
9184 (vtable_decl_p): New prototype.
9185 (vtype_decl_p): Likewise.
9186 (sigtable_decl_p): Likewise.
9187 (walk_globals_pred): New typedef.
9188 (walk_globals_fn): Likewise.
9189 (walk_globals): New prototype.
9190 (walk_namespaces_fn): New typedef.
9191 (walk_namespaces): New prototype.
9192 (wrapup_globals_for_namespace): Likewise.
9193 (walk_vtables): Remove prototype.
9194 (walk_sigtables): Likewise.
9195 (instantiate_pending_templates): New prototype.
9196 * class.c (finish_struct_1): Don't return a value.
9197 * decl.h (pending_statics): Remove declaration.
9198 * decl.c (walk_namespaces_r): New function.
9199 (walk_globals_r): Likewise.
9200 (vtable_decl_p): Likewise.
9201 (vtype_decl_p): Likewise.
9202 (sigtable_decl_p): Likewise.
9203 (walk_namespaces): Likewise.
9204 (walk_globals_data): New type.
9205 (walk_globals): New function.
9206 (wrapup_globals_for_namespace): Likewise.
9207 (expand_static_init): Remove assertion. Remove redundancy in
9208 conditional. Don't put static data members in static_aggregates
9210 (finish_function): Remove redundancy in conditional. Don't set
9211 DECL_RETURNS_FIRST_ARG.
9212 (cat_namespace_levels): Remove.
9213 * decl2.c: Include splay-tree.h and varray.h.
9214 (priority_info_s): New structure.
9215 (finish_vtable_vardecl): Change prototype. Adjust for new calling
9217 (prune_vtable_vardecl): Likewise.
9218 (finish_sigtable_vardecl): Likewise.
9219 (setup_initp): Remove.
9222 (start_static_storage_duration_function): New function.
9223 (generate_inits_for_priority): Likewise.
9224 (finish_static_storage_duration_function): Likewise.
9225 (get_priority_info): Likewise.
9226 (do_static_initialization): Likewise.
9227 (do_static_destruction): Likewise.
9228 (do_static_initialization_and_destruction): Likewise.
9229 (generate_ctor_or_dtor_function): Likewise.
9230 (generate_ctor_and_dtor_functions_for_priority): Likewise.
9231 (pending_statics): Make it a varray.
9232 (pending_statics_used): New variable.
9233 (saved_inlines): Make it a varray.
9234 (saved_inlines_used): New variable.
9235 (finish_static_data_member): Change method of updating
9237 (mark_inline_for_output): Remove #if 0'd code. Change method of
9238 updating saved_inlines.
9239 (walk_vtables): Remove.
9240 (walk_sigtables): Likewise.
9241 (import_export_decl): Use DECL_TINFO_FN_P.
9242 (pending_templates): Remove declaration.
9243 (maybe_templates): Likewise.
9244 (static_aggregates_initp): Likewise.
9245 (setup_initp): Likewise.
9246 (finish_objects): Simplify.
9247 (INITIALIZE_P_IDENTIFIER): New macro.
9248 (PRIORITY_IDENTIFIER): New macro.
9249 (SSDF_IDENTIFIER): New macro.
9250 (initialize_p_decl): New variable.
9251 (priority_decl): Likewise.
9252 (ssdf_decl): Likewise.
9253 (priority_info_map): Likewise.
9254 (finish_file): Recode output of static intializers and other
9255 file-scope finalization tasks.
9256 * error.c (OB_END_TEMPLATE_ID): New macro.
9257 (dump_type_real): Use it.
9258 (dump_decl): Likewise.
9259 (dump_function_name): Likewise.
9260 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
9262 (check_newline): Use walk_globals, not walk_vtables.
9263 * pt.c (pending_tempalte_expansions): Remove.
9264 (set_vardecl_interface_info): Likewise.
9265 (pending_templates): Make static.
9266 (maybe_templates): Likewise.
9267 (instantiate_class_template): Adjust call to finish_struct_1.
9268 (instantiate_pending_templates): New function.
9269 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
9270 * tree.c (static_aggregates_initp): Remove.
9271 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
9273 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
9275 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
9276 with the RTL code RETURN.
9277 * hash.h: Regenerated.
9278 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
9279 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
9280 * parse.c: Regenerated.
9281 * pt.c: Include varray.h. Include rtl.h since varray.h requires
9283 (inline_parm_levels): New variable.
9284 (inline_parm_levels_used): Likewise.
9285 (maybe_begin_member_template_processing): Update them.
9286 (maybe_end_member_template_processing): Use them, rather than
9287 guessing how many levels to pop.
9289 * decl.c (make_typename_type): Tighten error-checking.
9291 1999-04-20 Mark Mitchell <mark@codesourcery.com>
9293 * cp-tree.h (build_binary_op): Remove unneeded parameter.
9294 * class.c (build_vrable_entry_ref): Adjust call to
9296 * decl.c (expand_static_init): Likewise.
9297 (grokdeclarator): Likewise.
9298 (finish_function): Likewise.
9299 * decl2.c (delete_sanity): Likewise.
9300 (do_dtors): Likewise.
9301 (do_ctors): Likewise.
9302 * error.c (dump_type_suffix): Likewise.
9303 * expr.c (cplus_expand_expr): Likewise.
9304 * init.c (resolve_offset_ref): Likewise.
9305 (build_new): Likewise.
9306 (build_new_1): Likewise.
9307 (build_vec_delete_1): Likewise.
9308 (expand_vec_init_catch_clause): Likewise.
9309 (build_delete): Likewise.
9310 * pt.c (tsubst): Likewise.
9311 * rtti.c (synthesize_tinfo_fn): Likewise.
9312 * search.c (expand_upcast_fixups): Likewise.
9313 (expand_direct_vtbls_init): Likewise.
9314 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9315 (build_binary_op_nodefault): Likewise.
9316 (point_int_sum): Likewise.
9317 (pointer_diff): Likewise.
9318 (build_unary_op): Likewise.
9319 (build_modify_expr): Likewise.
9320 (get_delta_difference): Likewise.
9321 (build_ptrmemfunc): Likewise.
9322 (expand_ptrmemfunc_cst): Likewise.
9324 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
9326 * decl.c (grokfndecl): Always call cplus_decl_attributes.
9327 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
9329 1999-04-19 Mark Mitchell <mark@codesourcery.com>
9331 * cp-tree.h (finish_static_data_member_decl): New function.
9332 * decl2.c (finish_static_data_member_decl): Split out from ...
9334 * pt.c (instantiate_class_template): Use it here instead of
9336 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
9337 finish_static_data_member_decl will do that. Explicit set
9338 DECL_EXTERNAL to match non-template processing.
9340 1999-04-18 Mark Mitchell <mark@codesourcery.com>
9342 * cp-tree.h (finish_class_definition): Add parameter.
9343 * parse.y (structsp): Use it. Don't call pop_scope here.
9344 * parse.c: Regenerated.
9345 * semantics.c (finish_class_definition): Pop it here.
9347 1999-04-17 Mark Mitchell <mark@codesourcery.com>
9349 * decl.c (xref_tag): Revise handling of nested template
9351 * pt.c (check_explicit_specialization): Tweak handling of friend
9352 templates in template classes.
9353 (tsubst_friend_class): Handle friend declarations for nested
9354 member template classes.
9356 1999-04-16 Mark Mitchell <mark@codesourcery.com>
9358 * class.c (finish_struct): Remove unused variable.
9359 (pushclass): Likewise.
9360 (invalidate_class_lookup_cache): Likewise.
9361 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
9362 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
9363 doesn't get obliterated.
9364 (make_typename_type): Handle template classes correctly.
9366 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
9367 (storetags): Declare.
9368 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
9369 (pushclass): Likewise. Use storetags to install tag declarations,
9371 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
9372 * decl.c (storetags): Make it global.
9373 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
9374 implicit typename declaration.
9375 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
9376 * method.c (hack_identifier): Likewise.
9377 * search.c (lookup_member): Likewise.
9379 * decl.c (warn_about_implicit_typename_lookup): New function.
9380 (lookup_name_real): Use it. Rework handling of implicit typename
9383 1999-04-15 Mark Mitchell <mark@codesourcery.com>
9385 * cp-tree.h (lookup_nested_field): Remove.
9386 * class.c (push_nested_class): Handle UNION_TYPEs.
9387 (pop_nested_class): Likewise.
9388 * decl.c (lookup_name_real): Don't call lookup_nested_field.
9389 (start_decl): Use push_nested_class, not just pushclass.
9390 (cp_finish_decl): Use pop_nested_class, not just popclass.
9391 * search.c (lookup_nested_field): Remove.
9393 * cp-tree.h (lang_type): Add documentation.
9394 * decl2.c (handle_class_head): Create template declarations here,
9396 * parse.y (class_head): Return whether or not we entered a new
9397 scope, as well as the type named.
9398 (named_class_head): Likewise.
9399 (named_complex_class_head_sans_basetype): Likewise.
9400 (structsp): Adjust accordingly. Pop scope when required.
9401 * parse.c: Regenerated.
9402 * pt.c (check_default_tmpl_args): Robustify.
9403 (redeclare_class_template): Likewise.
9404 (instantiate_class_template): An instantiation of an
9405 anonymous union is itself an anonymous union.
9406 * semantics.c (begin_class_definition): Don't create template
9409 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
9411 * parse.y (after_type_declarator_intern): New nonterminal.
9412 (after_type_declarator): Use it.
9413 (direct_after_type_declarator): Likewise. Move above
9414 nonnested_type to fix reduce/reduce conflict resolution.
9415 (declmods): Reducing from just 'attributes' has EMPTY precedence.
9416 * Makefile.in (CONFLICTS): Update.
9418 * decl.c (define_label): Downgrade error for jumping over a
9419 non-POD decl to pedwarn.
9421 1999-04-14 Mark Mitchell <mark@codesourcery.com>
9423 * cp-tree.h (popclass): Change declaration.
9424 (pop_nested_class): Likewise.
9425 (poplevel_class): Remove declaration.
9426 * call.c (convert_default_argument): Pass no arguments to
9428 * class.c (finish_struct_1): Likewise.
9429 (finish_struct): Likewise.
9430 (popclass): Remove argument. Simplify code accordingly.
9431 (pop_nested_class): Likewise.
9432 * decl.c (poplevel_class): Declare it here, and make it static.
9433 (poplevel): Handle class scopes.
9434 (poplevel_class): Don't take an rgument. Simplify.
9435 (pop_everything): Pass no arguments to pop_nested_class.
9436 (cp_finish_decl): Pass no arguments to popclass.
9437 (grokdeclarator): Pass no arguments to pop_nested_class.
9438 (finish_function): Likewise.
9439 * decl2.c (grokfield): Likewise.
9440 (pop_scope): Pass no arguments to popclass.
9441 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
9442 * pt.c (instantiate_class_template): Move call to pushclass, and
9443 document. Pass no arguments to popclass.
9444 (regenerate_decl_from_template): Likewise.
9446 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
9448 * typeck.c (build_unary_op): Handle taking the address of a unique
9449 bound non-static member function.
9451 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
9453 * lang-options.h (-Wdeprecated): New flag.
9454 * decl2.c (warn_deprecated): New flag.
9455 (lang_decode_option): Deprecated this-is-variable,
9456 external-templates, alt-external-templates.
9457 Support -Wdeprecated.
9458 * errfn.c (cp_deprecated): New function.
9460 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
9462 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
9463 of the decls themselves.
9465 * pt.c (tsubst_function_type): Copy attributes over.
9467 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
9469 * cp-tree.h: Add prototype.
9470 * decl.c (init_decl_processing): Set valid_lang_attribute.
9472 1999-04-13 Mark Mitchell <mark@codesourcery.com>
9474 * class.c (finish_struct_1): Look at the const-ness of the field's
9475 type, not the TREE_READONLY-ness of the declaration.
9476 * method.c (synthesize_method): Likewise.
9477 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
9478 creating new declarations.
9480 1999-04-13 Mike Stump <mrs@wrs.com>
9482 * decl2.c (import_export_decl): Because vtables always reference
9483 virtual functions, even if they are inlined, don't allow
9484 -fno-implement-inlines to not emit them, instead, emit them with
9486 * decl.c (start_function): Likewise.
9488 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
9490 * cp-tree.h (struct lang_type): Add com_interface.
9491 (CLASSTYPE_COM_INTERFACE): New macro.
9492 * class.c (set_rtti_entry): COM interface classes have no RTTI
9493 entries in their vtables; adjust.
9494 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
9495 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
9496 finish_struct_1): Likewise.
9497 * decl2.c (mark_vtable_entries): Likewise.
9498 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
9499 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
9500 expand_upcast_fixups): Likewise.
9501 * tree.c (debug_binfo): Likewise.
9503 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
9504 * typeck.c (comptypes): If we get it, ignore attributes.
9505 * class.c (instantiate_type): Use BASELINK_P. Change complain
9506 parameter to flags; 2 means ignore attributes.
9507 * call.c (build_op_delete_call): Pass it.
9509 * decl.c (xref_tag): Only complain once about using a typedef-name
9510 with 'struct'. Downgrade to pedwarn.
9512 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
9514 * parse.y (absdcl_intern): New nonterminal.
9515 (absdcl, direct_abstract_declarator): Use it.
9517 * pt.c (lookup_template_class): Look through implict typename.
9519 1999-04-11 Mark Mitchell <mark@codesourcery.com>
9521 * friend.c (add_friend): Deal gracefully with error_mark_node.
9522 * method.c (build_overload_value): Handle pointers-to-members as
9523 template parameters.
9525 * decl.c (push_binding): Fix typo in comment.
9527 1999-04-10 Mark Mitchell <mark@codesourcery.com>
9529 * error.c (dump_type_real): If a typename is a template-id, put
9530 out the template arguments.
9531 (dump_expr): Handle TEMPLATE_ID_EXPR.
9532 * pt.c (lookup_template_class): Now that full arguments are
9533 available everywhere, remove code that tried to guess them.
9535 1999-04-09 Mark Mitchell <mark@codesourcery.com>
9537 * decl.c (make_typename_type): Complain if we don't find a type
9538 when trying to make a typename type for a non-template type.
9540 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
9542 * decl.c (start_decl): Pass attributes to grokdeclarator.
9543 (grokdeclarator): Handle attributes on constructor-syntax
9546 1999-04-08 Mark Mitchell <mark@codesourcery.com>
9548 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
9551 * search.c (template_self_reference_p): Tweak.
9553 1999-04-07 Mark Mitchell <mark@codesourcery.com>
9555 * init.c (build_offset_ref): Don't build yet another weird data
9556 structure to describe overloaded functions.
9558 1999-04-06 Mark Mitchell <mark@codesourcery.com>
9560 * cp-tree.h (BASELINK_P): New macro.
9561 (SET_BASELINK_P): Likewise.
9562 * init.c (build_member_call): Remove needless assignment in if
9564 * search.c (lookup_field_r): Fix handling when we are looking
9565 specifically for a type; these are not hidden by functions and
9567 (lookup_member): Use SET_BASELINK_P.
9568 * tree.c (is_overloaded_fn): Use BASELINK_P.
9569 (really_overloaed_fn): Likewise.
9570 (get_first_fn): Likewise.
9572 1999-04-05 Mark Mitchell <mark@codesourcery.com>
9574 * decl.c (lookup_name_current_level): Tweak, and improve
9577 * class.c (maybe_fixup_vptrs): Remove declaration.
9578 (build_class_init_list): Likewise.
9579 * decl.c (pushdecl_class_level): Call check_template_shadow here
9581 (push_class_level_binding): ... not here.
9582 * search.c (dfs_push_type_decls): Only avoid
9583 template-self-reference TYPE_DECLs if they are from base classes.
9585 1999-04-04 Mark Mitchell <mark@codesourcery.com>
9587 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
9590 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
9592 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
9593 (finish_struct_1): Don't call build_class_init_list.
9595 1999-04-02 Mark Mitchell <mark@codesourcery.com>
9597 * tinfo.h (__class_type_info): Fix illegal declaration.
9599 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
9600 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
9601 (IDENTIFIER_CLASS_VALUE): Improve documentation.
9602 (is_properly_derived_from): Declare.
9603 (invalidate_class_lookup_cache): Likewise.
9604 (maybe_maybe_note_name_used_in_class): Likewise.
9605 (note_name_declared_in_class): Likewise.
9606 (push_using_decl): Remove duplicate declaration.
9607 (id_in_current_class): Remove declaration.
9608 (push_class_binding): Change prototype.
9609 (clear_identitifer_class_values): Declare.
9610 * call.c (is_properly_derived_from): Make it global.
9611 (build_new_function_call): Be careful about updating candidates.
9612 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
9613 asked to make illegal calls.
9614 * class.c: Include splay-tree.h.
9615 (class_stack_node): Add names_used slot.
9616 (check_member_decl_is_same_in_complete_scope): Remove.
9617 (add_method): Fix comment. Push the declaration into class
9619 (finish_struct_1): When popping the class, pop the bindings too.
9620 Remove check for data member/function member conflict.
9621 (finish_struct): Remove calls to
9622 check_member_decl_is_same_in_complete_scope. Change calls to
9624 (pushclass): Clear names_used in the class stack entry.
9625 Use invalidate_class_lookup_cache to remove cached entries, rather
9626 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
9627 before entering a new class. Remove dead code. Don't mess with
9628 current_function_decl when pushing declarations.
9629 (invalidate_class_lookup_cache): New function, split out from ...
9630 (popclass): Here. Clean up names_used on our way out.
9631 (instantiate_type): Adjust.
9632 (build_self_reference): Don't push the declaration here.
9633 (maybe_note_name_used_in_class): New function.
9634 (note_name_declared_in_class): Likewise.
9635 * decl.c (add_binding): Change prototype.
9636 (find_class_binding_level): New function.
9637 (innermost_nonclass_level): Likewise.
9638 (current_binding_level): Update documentation.
9639 (inner_binding_level): Remove. Replace with current_binding_level
9641 (push_binding_level): Remove special handling of
9642 class_binding_level.
9643 (pop_binding_level): Likewise. Use find_class_binding_level.
9644 (suspend_binding_level): Likewise.
9645 (global_bindings_p): Use innermost_nonclass_level.
9646 (toplevel_bindings_p): Likewise.
9647 (namespace_bindings_p): Likewise.
9648 (pseudo_global_level_p): Likewise.
9649 (push_binding): Clear INHERITED_VALUE_BINDING_P.
9650 (add_binding): Check for illegal multiple declarations. Return a
9651 value indicating whether or not the new binding was legal.
9652 (push_local_binding): Skip over class binding levels. Check
9653 return value from add_binding.
9654 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
9655 note_name_declared_in_class.
9656 (pushlevel_class): Remove "fake out the rest of the compiler"
9658 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
9659 (clear_identifier_class_values): New function.
9660 (pop_from_top_level): Use it.
9661 (pop_everything): Tweak.
9662 (maybe_process_template_type_declaration): Don't push the
9663 declaration for the template here.
9664 (pushtag): Don't push tag declarations into class scope here.
9665 (pushdecl): Apply DeMorgan's law for readability.
9666 (pushdecl_class_level): Remove special-case code for
9667 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
9668 (push_class_level_bindng): Deal with inherited bindings.
9669 (lookup_name_real): Remove special-case code for
9670 TYPE_BEING_DEFINED, and some implicit typename magic.
9671 (grokdeclarator): Handle COMPONENT_REF for a template function.
9672 (build_enumerator): Don't call pushdecl_class_level here.
9673 (id_in_current_class): Remove.
9674 * decl2.c (grokfield): Don't call pushdecl_class_level or
9675 check_template_shadow.
9676 * errfn.c (cp_file_of): Don't declare.
9677 (cp_line_of): Likewise.
9678 * error.c (dump_decl): Handle an OVERLOAD.
9679 (cp_file_of): Likewise.
9680 (cp_line_of): Likewise.
9681 * init.c (build_member_call): Handle a COMPONENT_REF.
9682 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
9683 pushdecl_class_level.
9684 * method.c (hack_identifier): Build COMPONENT_REFs for references
9685 to member templates as well as member functions. Remove dead
9687 * parse.y (left_curly): Remove.
9688 (nonnested_type): Call maybe_note_name_used_in_class, not
9689 pushdecl_class_level.
9690 * parse.c: Regenerated.
9691 (nested_name_specifier_1): Likewise.
9692 * pt.c (check_explicit_specialization): Adjust, for robustness.
9693 (check_template_shadow): Handle OVERLOADs.
9694 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
9695 TEMPLATE_DECL, if appropriate.
9696 * search.c (envelope_add_decl): Remove.
9697 (dfs_pushdecls): Likewise.
9698 (dfs_compress_decls): Likewise.
9699 (dfs_push_decls): New function.
9700 (dfs_push_type_decls): Likewise.
9701 (setup_class_bindings): Likewise.
9702 (template_self_reference_p): Likewise.
9703 (lookup_field_r): Use it.
9704 (looup_member): Remove old comment. Deal with ambiguity.
9705 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
9706 and remove envelope processing.
9707 * semantics.c (begin_class_definition): Let pushclass push
9708 declarations for base classes.
9709 (finish_member_declaration): Push declarations into class scope.
9710 * typeck.c (build_component_ref): Just put an OVERLOAD into the
9711 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
9712 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
9713 * Makefile.in (class.o): Depend on splay-tree.h.
9715 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
9717 * cvt.c (convert_pointer_to_real): Use same_type_p.
9718 * typeck.c (comp_target_types): Use same_type_p.
9720 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
9722 * semantics.c (begin_inline_definitions,
9723 finish_inline_definitions): Rename from finish_default_args and
9724 begin_inline_definitions, respectively, to something that isn't a
9726 * parse.y (structsp): Adjust.
9728 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
9729 (list_hash_lookup): Likewise.
9730 (hash_tree_chain): Adjust.
9731 * pt.c (tsubst): Adjust.
9732 (tsubst_arg_types): Use plain hash_tree_cons.
9733 * cp-tree.h (hash_tree_cons_simple): Lose.
9734 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
9736 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9738 * Makefile.in (hash.h): Generate using gperf language 'C', not
9739 'KR-C', so gperf uses the `const' keyword on strings.
9741 * gxx.gperf (resword): Const-ify a char*.
9743 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
9745 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
9746 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
9747 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
9748 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
9749 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
9750 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
9753 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
9755 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
9757 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
9759 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
9761 1999-03-27 Mark Mitchell <mark@codesourcery.com>
9763 * cp-tree.h (add_friend): Declare.
9764 (add_friends): Likewise.
9765 * friend.c (add_friend): Make it global. Don't add to
9766 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
9767 (add_friends): Make it global.
9768 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
9769 befriending class is a template.
9770 * parse.y (component_decl_1): Fix typo in comment.
9771 * parse.c: Regenerated.
9772 * pt.c (instantiate_class_template): Use add_friend and
9773 add_friends rather that duplicating some of their functionality
9776 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
9778 * call.c (build_field_call): Unify 'this' and non-'this' cases.
9780 * typeck.c (build_indirect_ref): Check for 'this' sooner.
9782 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9784 * call.c (op_error): Const-ify a char*.
9785 (add_candidate, source_type, add_warning): Add static prototype.
9786 (print_z_candidates): Const-ify a char*.
9788 * class.c (resolve_address_of_overloaded_function,
9789 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
9790 (get_vtable_name, finish_struct_1): Const-ify a char*.
9792 * cvt.c (convert_to_reference): Likewise.
9794 * decl.c (redeclaration_error_message, record_builtin_type,
9795 record_unknown_type, member_function_or_else, bad_specifiers):
9797 (find_binding, select_decl, unqualified_namespace_lookup,
9798 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
9799 Add static prototype.
9800 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
9801 implicitly_declare, record_builtin_java_type, define_function,
9802 grok_op_properties, tag_name): Const-ify a char*.
9804 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
9805 (define_function, finish_builtin_type): Const-ify a char*.
9806 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
9807 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
9808 (file_name_nondirectory): Const-ify a char*.
9809 (init_filename_times): Don't prototype.
9810 (compiler_error): Prototype.
9811 (yyerror, init_repo): Const-ify a char*.
9812 (build_srcloc): Don't prototype.
9813 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
9815 (warn_for_assignment): Don't prototype.
9816 (convert_for_initialization, readonly_error, check_for_new_type,
9817 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
9820 * decl2.c (acceptable_java_type, output_vtable_inherit,
9821 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
9822 merge_functions, decl_namespace, validate_nonmember_using_decl,
9823 do_nonmember_using_decl): Add static prototype.
9824 (lang_f_options): Const-ify a char*.
9825 (finish_builtin_type): Likewise.
9826 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
9829 * errfn.c: Include cp-tree.h.
9830 (cp_thing): Add static prototype.
9831 (compiler_error): Don't protoptype.
9832 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
9833 passing it to `cp_thing'.
9835 * error.c (interesting_scope_p): Add static prototype.
9837 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
9840 * init.c (compiler_error): Don't prototype.
9841 (member_init_ok_or_else): Const-ify a char*.
9842 (build_java_class_ref): Add static prototype.
9844 * lex.c (compiler_error): Don't prototype.
9845 (get_time_identifier, interface_strcmp, extend_token_buffer,
9846 handle_cp_pragma): Const-ify a char*.
9847 (is_global, init_filename_times): Add static prototype.
9848 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
9849 (compiler_error): Change from fixed args to variable args.
9850 (yyerror): Const-ify a char*.
9852 * parse.y (cond_stmt_keyword): Const-ify a char*.
9853 (parse_decl): Add static prototype.
9855 * pt.c (template_args_equal, print_template_context): Likewise.
9856 (print_candidates, check_default_tmpl_args): Const-ify a char*.
9857 (instantiate_class_template): Likewise.
9859 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
9861 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
9862 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
9864 * search.c (lookup_field_info, lookup_member): Likewise.
9865 (lookup_member): Cast the first argument of `bzero' to a PTR.
9867 * sig.c (compiler_error): Don't prototype.
9868 (build_signature_pointer_or_reference_nam): Const-ify a char*.
9869 (get_sigtable_name, build_member_function_pointer): Likewise.
9871 * tree.c (compiler_error): Don't prototype.
9872 (no_linkage_helper, build_srcloc): Add static prototype.
9873 (build_vbase_pointer_fields): Const-ify a char*.
9874 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
9876 * typeck.c (compiler_error): Don't prototype.
9877 (convert_for_assignment): Const-ify a char*.
9878 (comp_cv_target_types): Add static prototype.
9879 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
9880 build_component_addr, build_unary_op, convert_for_initialization):
9883 * typeck2.c (ack): Add static prototype and change from fixed args
9885 (readonly_error, check_for_new_type): Const-ify a char*.
9887 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
9888 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
9889 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
9890 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
9891 gen_assign, GNU_xref_member): Const-ify a char*.
9893 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
9895 * gxxint.texi: Remove old discussion on copying virtual bases.
9897 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
9899 * Make-lang.in: Remove all references to g++.o/g++.c.
9900 Link g++ from gcc.o.
9902 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
9904 * decl2.c (comdat_linkage): Treat vtables like functions.
9906 1999-03-25 Mark Mitchell <mark@codesourcery.com>
9908 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
9910 1999-03-25 Nathan Sidwell <nathan@acm.org>
9912 * decl.c (init_decl_processing): Add `signed' type as a synonym
9915 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
9917 * typeck.c (common_type): Handle cv-qual unification for pointers
9920 * decl.c (unqualified_namespace_lookup): Return error_mark_node
9922 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
9923 * lex.c (do_identifier): If we got error_mark_node, call
9926 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9928 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
9931 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
9933 * decl.c (lookup_name_real): Do nested field lookup regardless of
9936 1999-03-24 Mark Mitchell <mark@codesourcery.com>
9938 * cp-tree.h (lang_type): Remove has_assignment and
9939 has_real_assignment. Add befriending_classes.
9940 (TYPE_HAS_ASSIGNMENT): Remove.
9941 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
9942 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
9943 (lang_decl): Document.
9944 (DECL_BEFRIENDING_CLASSES): New macro.
9945 (FRIEND_NAME): Move declaration to more obvious location.
9946 (FRIEND_DECLS): Likewise.
9947 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
9948 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
9949 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
9950 (grok_op_properties): Likewise.
9951 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
9952 (add_friend): Likewise. Don't do weird things with assignment
9953 operators. Update DECL_BEFRIENDING_CLASSES.
9954 (add_friends): Don't do weird things with assignment operators.
9955 (make_friend_class): Likewise. Update
9956 CLASSTYPE_BEFRIENDING_CLASSES.
9957 * pt.c (instantiate_class_template): Don't set
9958 TYPE_HAS_ASSIGNMENT.
9959 (tsubst_copy): Substitute the TREE_TYPE for more unary
9961 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
9962 * search.c (protected_accessible_p): New function.
9963 (friend_accessible_p): Likewise.
9964 (accessible_p): Use them.
9966 1999-03-23 Mark Mitchell <mark@codesourcery.com>
9968 * pt.c (convert_nontype_argument): Don't create things that aren't
9969 PTRMEM_CSTs when applying a qualification conversion to a
9972 1999-03-23 Mark Mitchell <mark@codesourcery.com>
9974 * Makefile.in (OBJS): Don't mention hash.o.
9975 (OBJDEPS): Likewise.
9977 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
9979 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
9980 * decl.c (expand_static_init): Make sure we don't add any after
9983 * decl.c (cp_finish_decl): Move intelligence about handling
9984 DECL_COMDAT for variables from here...
9985 * decl2.c (comdat_linkage): ...to here.
9986 (maybe_make_one_only): Tweak.
9987 (import_export_decl): Call comdat_linkage for variables, too.
9988 (finish_file): Handle template statics properly.
9990 1999-03-22 Mark Mitchell <mark@codesourcery.com>
9992 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
9993 Document internals of pointer-to-member-functions.
9994 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
9995 (PFN_FROM_PTRMEMFUNC): Likewise.
9996 (build_type_conversion): Remove unused parameter.
9997 (build_ptrmemfunc1): Declare.
9998 (expand_ptrmemfunc_cst): New function.
9999 (delta2_from_ptrmemfunc): Likewise.
10000 (pfn_from_ptrmemfunc): Likewise.
10001 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
10002 build_type_conversion. Use TYPE_PTRMEM_P for readability.
10003 (convert_to_reference): Remove unused parameter to
10004 build_type_conversion.
10005 (ocp_convert): Likewise.
10006 (build_user_type_conversion): Likewise.
10007 * error.c (dump_expr): Handle NULL pointer-to-member functions.
10008 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
10009 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
10010 open when handling pointer-to-member functions.
10011 * pt.c (convert_nontype_argument): Clean up error messages. Be
10012 more stringent with pointers-to-members.
10013 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
10014 (build_unary_op): Tidy ever-so-slightly.
10015 (build_conditional_expr): Remove extra parameter to
10016 build_type_conversion.
10017 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
10019 (expand_ptrmemfunc_cst): Define.
10020 (delta2_from_ptrmemfunc): Likewise.
10021 (pfn_from_ptrmemfunc): Likewise.
10023 1999-03-19 Mark Mitchell <mark@codesourcery.com>
10025 * init.c (build_member_call): Handle template-id expressions
10027 * typeck.c (build_x_function_call): Likewise.
10029 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
10031 * friend.c (make_friend_class): Avoid core dump when
10032 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
10034 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
10036 * decl.c (start_function): Suppress normal linkage heuristics
10037 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
10039 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
10041 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
10042 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
10044 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
10046 * parse.y (named_complex_class_head_sans_basetype):
10047 Do not push a scope for error_mark_node.
10048 (maybe_base_class_list): Likewise.
10050 * decl.c (start_decl): Check for error_mark_node as a type.
10051 Detected by g++.brendan/array-refs.C.
10052 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
10053 (maybe_build_cleanup_1): Likewise. Detected by
10054 g++.jason/incomplete1.C.
10056 * tree.c (build_dummy_object): Use void_zero_node instead of the
10058 (is_dummy_object): Check for such a node.
10059 Detected by g++.bob/inherit1.C
10061 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
10063 * method.c (old_backref_index): Split out...
10064 (flush_repeats): From here. Rename back from try_old_backref.
10065 (build_mangled_name): Put back some old-style repeat handling.
10067 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10069 * lex.c: Don't include setjmp.h.
10070 (parse_float): New static function.
10071 (pf_args): New struct.
10072 (real_yylex): Use them in call to `do_float_handler'.
10074 1999-03-15 Mark Mitchell <mark@markmitchell.com>
10076 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
10077 * tree.c (layout_basetypes): Not here.
10078 * search.c (dfs_search): Remove; no longer used.
10080 1999-03-12 Mark Mitchell <mark@markmitchell.com>
10082 * decl2.c (validate_nonmember_using_decl): Issue sensible
10083 error-messages on bogus qualifiers.
10085 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
10087 * call.c (add_function_candidate): Fix uninitialized variable.
10089 * Makefile.in (search.o): Add dependency on varray.h.
10091 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
10093 * decl.c (duplicate_decls): Use same_type_p.
10094 * method.c (try_old_backref): Renamed from flush_repeats. Use
10095 same_type_p. Don't try to handle repeats. Return success.
10096 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
10097 calls from old-style code, too.
10098 (check_ktype): Use same_type_p.
10099 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
10100 (build_qualified_name): Simplify logic.
10101 (process_overload_item): Strip typedefs and quals at the top.
10102 (build_mangled_name_for_type_with_Gcode): Remove call to
10103 type_canonical_variant.
10104 (build_mangled_name): Likewise. Remove support for old-style
10105 repeats, which have been disabled since 2.7.2. Don't mess with
10107 (build_decl_overload_real): Don't mess with TREE_USED.
10109 1999-03-13 Nathan Sidwell <nathan@acm.org>
10111 * error.c (cp_printers): Add 'F' escape character.
10112 (dump_type_real): Remove TREE_LIST (fnargs) printing.
10113 Functionality moved to dump_parameters.
10114 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
10115 (dump_function_decl): Extend meaning of V parameter. Use
10116 dump_parameters and dump_exception_spec.
10117 (dump_parameters): New static function.
10118 (dump_exception_spec): New static function.
10119 (fndecl_as_string): Change argument semantics. Use
10120 dump_function_decl directly.
10122 * sig.c (build_signature_table_constructor): Use cp_error.
10124 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
10126 * semantics.c (finish_switch_cond): Handle error cases gracefully.
10127 Detected by g++.law/enum5.C.
10129 * typeck.c (build_modify_expr): Check for errors after resolving
10130 offsets. Detected by g++.brendan/static1.C.
10132 * decl.c (complete_array_type): Ignore initial_value if it is an
10133 error. Detected by g++.benjamin/17930.C.
10135 * typeck2.c (process_init_constructor): Return error if one argument
10136 is in error. Detected by g++.benjamin/13478.C.
10138 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
10140 * decl.c (select_decl): Allow class templates when we need types.
10141 * decl2.c (ambiguous_decl): Likewise.
10143 1999-03-12 Mark Mitchell <mark@markmitchell.com>
10145 * lex.c (do_identifier): Correct call to enforce_access.
10146 * search.c (accessible_p): Tweak comment.
10148 1999-03-10 Mark Mitchell <mark@markmitchell.com>
10150 * semantics.c (begin_class_definition): Call build_self_reference.
10151 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
10153 * search.c (assert_canonical_unmarked): Fix typo in prototype.
10155 * search.c (dfs_canonical_queue): New function.
10156 (dfs_assert_unmarked_p): Likewise.
10157 (assert_canonical_unmarked): Likewise.
10158 (access_in_type): Use it.
10159 (accessible_p): Likewise. Walk the whole tree when umarking.
10161 * sig.c (build_signature_table_constructor): Use accessible_p
10162 instead of compute_access.
10164 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
10166 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
10168 1999-03-09 Mark Mitchell <mark@markmitchell.com>
10170 * cp-tree.h (flag_access_control): Declare.
10171 (TREE_VIA_PPUBLIC): Document.
10172 (DECL_NONSTATIC_MEMBER_P): New macro.
10173 (enforce_access): Return an indication of whether or not access
10175 (build_self_reference): Change prototype.
10176 (compute_access): Replace with ...
10177 (accessible_p): New function.
10178 (dfs_walk): Change prototype.
10179 (dfs_unmark): Likewise.
10180 (markedp): Likewise.
10181 * call.c (enforce_access): Use accessible_p.
10182 * class.c (build_self_reference): Insert the declaration into the
10183 list of members for this type, and make it public.
10184 * decl.c (xref_basetypes): Avoid ill-timed recursion.
10185 * init.c (build_offset_ref): Use lookup_member, not three separate
10186 name-lookups. Call enforce_access rather than checking for
10187 illegal accesses here.
10188 (resolve_offset_ref): Likewise.
10189 * lex.c (do_identifier): Likewise.
10190 * method.c (hack_identifier): Likewise.
10191 * parse.y (self_reference): Remove.
10192 (opt_component_decl_list): Don't use it.
10193 * parse.c: Regenerated.
10194 * pt.c (print_candidates): Generalize to handle lists of
10195 overloaded functions.
10196 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
10198 (get_template_base): Use new calling convention for dfs_walk.
10199 * search.c: Include varray.h. Add prototypes.
10200 (dfs_walk): Accept a data pointer to pass to the work functions.
10201 All callers changed. All work functions changed.
10202 (breadth_first_search): Rename to bfs_walk, and make consistent
10204 (dfs_walk_real): New function.
10205 (canonical_binfo): New function.
10206 (context_for_name_lookup): Likewise.
10207 (shared_marked_p): Likewise.
10208 (shared_unmarked_p): Likewise.
10209 (lokup_field_queue_p): Likewise.
10210 (lookup_field_r): Generalize to handle both functions and fields.
10211 (lookup_field): Just call lookup_member.
10212 (lookup_fnfields): Likewise.
10213 (lookup_member): Move body of lookup_field here and generalize.
10214 (dfs_accessible_queue_p): Likewise.
10215 (dfs_accessible_p): Likewise.
10216 (dfs_access_in_type): Likewise.
10217 (access_in_type): Likewise.
10218 (compute_access): Remove, and replace with ...
10219 (accessible_p): New function.
10220 (vbase_types): Remove.
10221 (vbase_decl_ptr_intermediate): Likewise.
10222 (vbase_decl_ptr): Likewise.
10223 (vbase_init_result): Likewise.
10224 (closed_envelopes): Likewise.
10225 (bvtable): Likewise.
10227 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
10229 * call.c (add_function_candidate): Check for proper number of args
10230 before checking the validity of those args.
10232 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
10234 * cp-tree.h (struct lang_type): Add anon_union field.
10235 (ANON_UNION_TYPE_P): Use it instead of examining type.
10236 (SET_ANON_UNION_TYPE_P): New macro.
10237 * decl.c (check_tag_decl): Use it.
10239 * search.c (compute_access): Handle non-type contexts earlier, and
10242 * tree.c (build_exception_variant): Use copy_to_permanent.
10244 * decl2.c (setup_initp): Give statics with no priority the default
10246 (do_dtors, do_ctors, finish_file): Remove special handling of
10247 non-prioritized statics.
10249 1999-03-05 Mark Mitchell <mark@markmitchell.com>
10251 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
10252 * decl.c (make_typename_type): Don't issue an error if an
10253 immediate lookup fails; it migt be resolved later.
10254 * friend.c (is_friend): Add comment.
10255 * search.c (breadth_first_search): Add POSTFN and DATA
10256 parameters. Tidy. All callers changed.
10257 (lookup_field_queue_p): New function.
10258 (lookup_field_r): Likewise.
10259 (lookup_field_post): Likewise.
10260 (lookup_field): Use them, via breadth_first_search, instead of
10262 (compute_access): Robustify.
10263 (lookup_fnfield_info): New structure.
10265 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
10267 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
10269 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
10271 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
10274 * decl2.c (import_export_class): Also return if
10275 CLASSTYPE_INTERFACE_ONLY is set.
10277 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
10279 * decl.c (push_overloaded_decl): Only overwrite the old binding if
10281 * decl2.c (do_local_using_decl): Fix loop termination.
10283 1999-03-02 Mark Mitchell <mark@markmitchell.com>
10285 * cp-tree.h (determine_specialization): Don't declare.
10286 * pt.c (determine_specialization): Make it static. Eliminate
10287 complain parameter. Note that decl is always non-NULL now, and
10288 simplify accordingly.
10290 * decl.c (maybe_push_to_top_level): Always call
10291 push_cp_function_context.
10292 (pop_from_top_level): Always call pop_cp_function_context.
10294 1999-02-26 Nathan Sidwell <nathan@acm.org>
10296 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
10298 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
10299 * init.c (build_new_1): Extra arg to complete_type_or_else.
10300 (build_delete): Likewise.
10301 * typeck.c (require_complete_type): Likewise.
10302 (pointer_int_sum): Likewise.
10303 (pointer_diff): Likewise.
10304 (build_component_ref): Likewise.
10306 * typeck2.c (incomplete_type_error): Always use cp_error.
10307 Show declaration of undefined type, if appropriate.
10308 Deal with UNKNOWN_TYPE nodes.
10310 * typeck.c (require_complete_type): Use TYPE_SIZE as
10311 size_zero_node to mean incomplete type.
10312 (require_complete_type_in_void): New function.
10313 (build_compound_expr): Call complete_type_in_void for LHS.
10314 (build_c_cast): Call complete_type_in_void for void cast.
10315 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
10316 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
10317 require_complete_type_in_void. Call it.
10318 * cp-tree.h (require_complete_type_in_void): Prototype new function.
10320 * typeck.c (convert_arguments): Use alternative format for
10321 function decls. Don't require_complete_type here. Simplify
10322 diagnostic printing.
10323 (convert_for_initialization): Don't require_complete_type on RHS yet.
10324 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
10326 * call.c (build_over_call): Cope with qualified void return type.
10327 * semantics.c (finish_call_expr): Likewise.
10328 * typeck.c (build_function_call_real): Likewise.
10329 (c_expand_return): Likewise.
10330 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
10332 * call.c (print_z_candidates): Use alternate print format, to be
10333 consistent with (pt.c) print_candidates.
10334 * method.c (hack_identifier): List candidate members.
10335 * search.c (lookup_field): Build ambiguous list, and show it, if
10338 1999-02-26 Mark Mitchell <mark@markmitchell.com>
10340 * typeck.c (decay_conversion): Don't confuse constant array
10341 variables with their initializers.
10343 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
10345 * pt.c (regenerate_decl_from_template): Tweak for clarity.
10346 (instantiate_decl): Mark a decl instantiated before regenerating
10347 it to avoid recursion.
10348 * tree.c (mapcar): Don't call decl_constant_value unless we know
10349 something is TREE_READONLY_DECL_P.
10351 * class.c (check_for_override): Don't stop checking when we find
10352 the first overridden function. Delete #if 0'd code.
10353 * search.c (get_matching_virtual): Likewise.
10355 1999-02-25 Richard Henderson <rth@cygnus.com>
10357 * lang-specs.h: Define __FAST_MATH__ when appropriate.
10359 1999-02-24 Mike Stump <mrs@wrs.com>
10361 * typeck.c (convert_for_assignment): Allow boolean integral constant
10362 expressions to convert to null pointer.
10364 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
10366 * decl.c (lookup_namespace_name): Resolve namespace aliases.
10368 * class.c (push_nested_class): Allow namespaces.
10370 * decl2.c (set_decl_namespace): Add friendp parameter.
10371 * decl.c (grokfndecl): Pass it.
10372 (grokvardecl): Likewise.
10373 * cp-tree.h: Change declaration.
10375 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
10377 * pt.c (tsubst): Allow an array of explicit size zero.
10379 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
10381 * errfn.c: Change varargs code to look like toplev.c.
10383 * method.c (process_modifiers): Don't prepend 'U' for char or
10386 1999-02-20 Craig Burley <craig@jcb-sc.com>
10388 * Make-lang.in (cplib2.ready): Don't consider updating
10389 cplib2 stuff if the current directory isn't writable, as
10390 it won't work (such as during a `make install').
10392 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
10394 * decl2.c (start_objects): Make file scope constructors and
10395 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
10396 ASM_OUTPUT_DESTRUCTOR are defined.
10398 1999-02-19 Mark Mitchell <mark@markmitchell.com>
10400 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
10401 (fn_type_unification): Adjust prototype.
10402 (lookup_fnfields_1): Declare.
10403 * call.c (add_template_candidate_real): Adjust call to
10404 fn_type_unification.
10405 * class.c (add_method): Don't allow duplicate declarations of
10406 constructors or destructors.
10407 (resolve_address_of_overloaded_function): Remove unused variable.
10408 Adjust call to fn_type_unification.
10409 * decl.c (grokfndecl): Be more robust in the face of illegal
10411 * decl2.c (check_classfn): Remove hokey handling of member
10413 * pt.c (determine_specialization): Improve comments. Adjust to
10414 handle template argument deduction as per the standard.
10415 (check_explicit_specialization): Fix comment spacing. Handle
10416 type-conversion operators correctly. Improve error-recovery.
10417 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
10418 (get_bindings_real): Simplify handling of static members.
10419 * search.c (lookup_fnfields_1): Make it have external linkage.
10420 * typeck.c (compparms): Fix comment.
10421 (build_unary_op): Don't try to figure out which template
10422 specialization is being referred to when when the address-of
10423 operator is used with a template function.
10425 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10427 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
10428 keyword to match an analogous change at the top level.
10430 * tree.c (lvalue_or_else): Likewise.
10432 1999-02-17 Mark Mitchell <mark@markmitchell.com>
10434 * decl.c (xref_basetypes): Comment.
10435 * pt.c (instantiate_class_template): Use xref_basetypes.
10437 1999-02-16 Mark Mitchell <mark@markmitchell.com>
10439 * cp-tree.h (tsubst): Change prototype.
10440 (tsubst_expr): Likewise.
10441 (tsubst_copy): Likewise.
10442 (type_unification): Remove prototype.
10443 * call.c (convert_default_arg): Adjust call to tsubst_expr.
10444 * class.c (resolve_address_of_overloaded_function): Just use
10445 fn_type_unification.
10446 * decl.c (grokdeclarator): Adjust call to tsubst.
10447 * method.c (build_template_parm_names): Likewise.
10448 * pt.c (GTB_VIA_VIRTUAL): New macro.
10449 (GTB_IGNORE_TYPE): Likewise.
10450 (resolve_overloaded_unification): Add `complain' parameter.
10451 (try_one_overload): Likewise.
10452 (tsubst_template_arg_vector): Likewise.
10453 (tsubst_template_parms): Likewise.
10454 (tsubst_aggr_type): Likewise.
10455 (tsubst_arg_types): Likewise.
10456 (tsubst_call_declarator_parms): Likewise.
10457 (unify): Remove explicit_mask.
10458 (type_unification_real): Likewise.
10459 (get_template_base_recursive): Likewise.
10460 (coerce_template_template_parms): Provide prototype.
10461 (tsubst_function_type): Likewise.
10462 (try_class_unification): New function.
10463 All callers changed to use new complain parameter.
10464 (get_template_base): Use try_class_unification.
10465 (unify): Adjust handling of classes derived from template types.
10466 (fn_type_unification): Substitute explicit arguments before
10469 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10471 * decl.c (pushdecl): Remove dead code.
10473 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
10475 * decl2.c (finish_objects): Fix code I missed in previous change.
10477 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
10479 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
10480 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
10482 * pt.c (maybe_process_partial_specialization): Complain about
10483 'template <>' on non-specialization.
10485 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
10487 * decl.c (grokdeclarator): Catch wierd declarators.
10488 * decl2.c (finish_file): Don't abort because of namespace parsing
10490 (check_decl_namespace): Remove.
10492 1999-02-09 Mark Mitchell <mark@markmitchell.com>
10494 * cp-tree.h (get_template_base): Don't declare.
10495 (dfs_walk): Declare.
10496 (dfs_unmark): Likewise.
10497 (markedp): Likewise.
10498 * pt.c (unify): Remove duplicate declaration. Pass tparms and
10499 targs to get_template_base.
10500 (get_template_base_recursive): Move here from search.c. Check to
10501 see that the base found can be instantiated to form the desired
10503 (get_template_base): Likewise.
10504 (get_class_bindings): Simplify.
10505 * search.c (get_template_base_recursive): Move to pt.c.
10506 (get_template_base): Likewise.
10507 (markedp): Make it global.
10508 (dfs_walk): Likewise.
10509 (dfs_unmark): Likewise.
10511 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
10513 * pt.c (maybe_process_partial_specialization): Complain about
10514 specialization in wrong namespace.
10515 * tree.c (decl_namespace_context): New fn.
10517 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10519 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
10520 * pt.c (coerce_template_template_parms): Handle nested
10521 template template parameters.
10523 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
10525 * typeck2.c: Update email addresses.
10527 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10529 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
10532 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
10534 * lex.c (retrofit_lang_decl): Split out...
10535 (build_lang_decl): From here.
10536 * decl.c (pushdecl): Call it for functions generated by the middle
10537 end that don't have DECL_LANG_SPECIFIC.
10538 * cp-tree.h: Declare it.
10540 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
10541 (start_objects, finish_objects): Only use special
10542 init_priority code if the user specified a priority.
10543 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
10546 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
10548 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
10549 mkstemp.o. Get them from libiberty now.
10550 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
10552 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10554 * decl2.c (lang_decode_option): Use read_integral_parameter.
10556 1999-02-01 Mark Mitchell <mark@markmitchell.com>
10558 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
10559 before calling complete_type_or_else.
10561 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10563 * input.c (inline): Don't define, its handled by system.h.
10565 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
10567 * decl2.c: Don't define flag_no_ident here. Don't process
10569 * cp-tree.h: Don't declare flag_no_ident here.
10570 * lang-specs.h: Map -Qn to -fno-ident.
10572 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
10574 * cp-tree.h (struct tree_binding): Replace scope field with a union.
10575 (BINDING_SCOPE): Adjust.
10576 * decl.c (BINDING_LEVEL): Adjust.
10578 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
10580 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
10583 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
10584 a ctor initializer.
10586 * tree.c (equal_functions): Fix name in prototype.
10588 * decl.c (push_local_binding): Add FLAGS argument.
10589 (pushdecl, push_overloaded_decl): Pass it.
10590 * decl2.c (do_local_using_decl): Likewise.
10591 * cp-tree.h: Adjust prototype.
10592 * decl.c (poplevel): Fix logic.
10594 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
10595 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
10596 (cat_namespace_levels): Don't loop forever.
10598 1999-01-25 Richard Henderson <rth@cygnus.com>
10600 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
10602 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
10604 * class.c (resolve_address_of_overloaded_function): Mark the
10605 chosen function used.
10607 * call.c (build_call): Make sure that a function coming in has
10608 been marked used already.
10609 * decl.c (expand_static_init): Call mark_used instead of
10611 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
10612 alloc_eh_object, expand_throw): Likewise.
10613 * init.c (build_builtin_delete_call): Likewise.
10614 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
10615 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10616 expand_generic_desc): Likewise.
10618 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
10620 * tree.c (equal_functions): New function.
10621 (ovl_member): Call it.
10623 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
10625 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
10627 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
10629 * decl.c (decls_match): Return 1 if old and new are identical.
10630 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
10632 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
10634 * decl.c (start_function): Make member functions one_only on windows.
10635 * decl2.c (import_export_decl): Likewise.
10637 * decl.c (grokdeclarator): Don't complain about implicit int in
10638 a system header. Change same-name field check to not complain in
10639 a system header instead of within extern "C".
10641 1999-01-21 Mark Mitchell <mark@markmitchell.com>
10643 * cp-tree.h (PUSH_GLOBAL): New macro.
10644 (PUSH_LOCAL): Likewise.
10645 (PUSH_USING): Likewise.
10646 (namespace_bindings_p): Declare.
10647 (push_overloaded_decl): Likewise.
10648 * decl.c (push_overloaded_decl): Don't make it static. Check for
10649 illegal declarations after using declarations here.
10650 (namespace_bindings_p): Likewise.
10651 (duplicate_decls): Don't consider declarations from different
10652 namespaces to be the same.
10653 (pushdecl): Use symbolic PUSH_ constants in calls to
10654 push_overloaded_decl.
10655 (push_overloaded_decl_1): Likewise.
10656 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
10657 (do_nonmember_using_decl): Check for illegal using declarations
10658 after ordinary declarations here.
10659 (do_local_using_decl): Call pushdecl to insert declarations.
10661 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
10663 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
10665 1999-01-21 Mark Mitchell <mark@markmitchell.com>
10667 * tree.c (build_cplus_array_type_1): Don't call build_array_type
10668 for types involving template parameters.
10670 * cp-tree.h (PARM_DECL_EXPR): Delete.
10671 (convert_default_arg): Change prototype.
10672 (check_default_argument): Declare.
10673 (search_tree): Likewise.
10674 * call.c (convert_default_arg): Take the function to which the
10675 default argument belongs as a parameter, and do any necessary
10676 instantiation here, instead of ...
10677 (build_over_call): Here.
10678 * decl.c (local_variable_p): New function.
10679 (check_default_argument): Likewise, split out and tidied from ...
10681 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
10682 * pt.c (tsubst_call_declarator_parms): New function.
10683 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
10684 with CALL_EXPRs, rather than trying to be clever.
10685 (tsubst): Use tsubst_call_declarator_parms.
10686 * tree.c (search_tree): Don't make it static.
10687 * typeck.c (convert_arguments): Use new interface to
10688 convert_default_arg.
10690 1999-01-20 Mark Mitchell <mark@markmitchell.com>
10692 * error.c (dump_function_decl): Don't print the argument types for
10693 a function when the verbosity level is negative.
10695 * call.c (build_over_call): Check format attributes at call-time.
10697 * pt.c (tsubst_copy): Fix comment.
10698 (unify): Don't allow unification with variable-sized arrays.
10700 * semantics.c (finish_stmt_expr): When processing a template make
10701 the BIND_EXPR long-lived.
10703 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
10705 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
10706 (import_export_vtable): Not here.
10708 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
10710 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
10711 non-static member function.
10713 1999-01-18 Nathan Sidwell <nathan@acm.org>
10715 * class.c (instantiate_type): Only diagnose illegal address of member
10716 function if complaining.
10718 * decl.c (lookup_name_real): Remove duplicate code.
10720 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
10722 * tree.c (copy_template_template_parm): Use permanent_obstack.
10724 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10726 * pt.c (unify): Remove restrictions on deduction of argument
10727 of template template parameters.
10729 1999-01-18 Nathan Sidwell <nathan@acm.org>
10731 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
10733 * class.c (resolve_address_of_overloaded_function): Show list of
10734 all candidates, when none of them match.
10736 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
10738 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
10739 definition of 'casting away const' in reinterpret_cast<>.
10741 1999-01-18 Graham <grahams@rcp.co.uk>
10743 * cvt.c: Add include for decl.h, remove extern for
10744 static_aggregates which is now provided by decl.h.
10746 * Makefile.in (cvt.o): Add dependency for decl.h and missing
10747 dependencies for convert.h and flags.h.
10749 1999-01-18 Nathan Sidwell <nathan@acm.org>
10751 * decl2.c (do_dtors): Set current location to that of the
10752 decl, for sensible diagnostics and debugging.
10753 (check_classfn): Issue `incomplete type' error, if
10754 class is not defined.
10756 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
10758 * cp-tree.h: Add prototype for bound_pmf_p.
10760 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
10761 Manfred Hollstein <manfred@s-direktnet.de>
10763 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
10766 1999-01-16 Nathan Sidwell <nathan@acm.org>
10768 * cp-tree.h (struct lang_type): Added has_mutable flag.
10769 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
10770 (TYPE_HAS_MUTABLE_P): New macro to read it.
10771 (cp_has_mutable_p): Prototype for new function.
10772 * class.c (finish_struct_1): Set has_mutable from members.
10773 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
10774 it contains a mutable.
10775 * typeck.c (cp_has_mutable_p): New function.
10777 1999-01-15 Mark Mitchell <mark@markmitchell.com>
10779 * pt.c (process_template_parm): Ignore top-level qualifiers on
10780 non-type parameters.
10782 * decl.c (start_function): Use current_function_parms in the call
10783 to require_complete_type_for_parms, not the probably empty
10786 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
10788 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
10790 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
10791 that we don't suppress the other copies.
10792 * lex.c (handle_cp_pragma): Likewise.
10794 1999-01-13 Mark Mitchell <mark@markmitchell.com>
10796 * decl.c (grokdeclarator): Undo 1998-12-14 change.
10797 * tree.c (build_cplus_array_type_1): Likewise.
10798 * pt.c (instantiate_class_template): Remove misleading comment.
10799 (tsubst_aggr_type): Substitute if there are template parameters,
10800 regardless of whether or not they use template arguments.
10801 (unify): Likewise, but for unification.
10803 1999-01-12 Richard Henderson <rth@cygnus.com>
10805 * cp-tree.h (flag_permissive): Declare extern.
10807 1999-01-06 Mark Mitchell <mark@markmitchell.com>
10809 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
10811 (lang_type): Add is_partial_instantiation. Decrease width of
10813 (PARTIAL_INSTANTIATION_P): New macro.
10814 (OPERATOR_TYPENAME_P): Remove.
10815 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
10816 OPERATOR_TYPENAME_P.
10817 (grok_op_properties): Likewise.
10818 * friend.c (do_friend): Handle friends that are member functions
10820 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
10821 * pt.c (instantiate_class_template): Rework for clarity. Avoid
10822 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
10823 any more partial instantiation than is absolutely necessary for
10824 implicit typename. Set PARTIAL_INSTANTIATION_P.
10825 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
10826 * semantics.c (begin_class_definition): Handle partial
10827 specializations of a type that was previously partially
10830 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
10832 * g++spec.c (LIBSTDCXX): Provide default definition.
10833 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
10835 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10837 * Make-lang.in (g++.o): Depend on prefix.h.
10839 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
10841 * tree.c (bound_pmf_p): New fn.
10842 * typeck.c (build_c_cast): Use it.
10844 * decl.c (grok_op_properties): Use same_type_p.
10846 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10848 * Makefile.in (cvt.o): Depend on toplev.h.
10850 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
10852 * cvt.c: Include toplev.h.
10854 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
10857 * init.c (expand_vec_init): Initialize variable `itype'.
10859 * lex.c (yyerror): Cast the argument passed to a ctype function to
10862 * method.c (build_mangled_C9x_name): Wrap prototype and definition
10863 in "HOST_BITS_PER_WIDE_INT >= 64".
10865 * typeck.c (build_binary_op): Mark parameter `convert_p' with
10868 1998-12-22 Mark Mitchell <mark@markmitchell.com>
10870 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
10871 * tree.c (build_exception_variant): Don't crash on empty throw
10874 1998-12-18 DJ Delorie <dj@cygnus.com>
10876 * cvt.c (convert_to_reference): Check for both error_mark_node
10877 and NULL_NODE after call to convert_for_initialization.
10879 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
10881 * error.c (interesting_scope_p): New fn.
10882 (dump_simple_decl): Use it.
10883 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
10884 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
10886 1998-12-16 Mark Mitchell <mark@markmitchell.com>
10888 * class.c (resolve_address_of_overloaded_function): Do conversion
10889 to correct type here, rather than ...
10890 (instantiate_type): Here.
10892 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
10893 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
10894 (decl_template_parm_p): Remove.
10895 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
10897 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
10898 * pt.c (push_inline_template_parms_recursive): Set it.
10899 (decl_template_parm_p): Remove.
10900 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
10901 (process_template_parm): Set it.
10903 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
10905 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
10906 if configured with cpplib.
10908 1998-12-15 Mark Mitchell <mark@markmitchell.com>
10910 * decl.c (poplevel): Make sure ns_binding is initialized.
10912 * decl.c (finish_function): Undo inadvertent change in previous
10915 1998-12-14 Mark Mitchell <mark@markmitchell.com>
10917 * class.c (pushclass): Tweak handling of class-level bindings.
10918 (resolve_address_of_overloaded_function): Update pointer-to-member
10920 (instantiate_type): Likewise.
10921 * cvt.c (cp_convert_to_pointer): Likewise.
10922 * decl.c (pop_binding): Take the DECL to pop, not just the name.
10923 Deal with `struct stat' hack.
10924 (binding_level): Add to documentation.
10925 (push_binding): Clear BINDING_TYPE.
10926 (add_binding): New function.
10927 (push_local_binding): Use it.
10928 (push_class_binding): Likewise.
10929 (poplevel): Adjust calls to pop_binding.
10930 (poplevel_class): Likewise.
10931 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
10932 declarations to current binding level.
10933 (push_class_level_binding): Likewise.
10934 (push_overloaded_decl): Adjust handling of OVERLOADs in local
10936 (lookup_namespace_name): Don't crash when confronted with a
10938 (lookup_name_real): Do `struct stat' hack in local binding
10940 (build_ptrmemfunc_type): Adjust documentation.
10941 (grokdeclarator): Don't avoid building real array types when
10942 processing templates unless really necessary.
10943 (finish_method): Adjust calls to pop_binding.
10944 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
10945 not reparse_decl_as_expr.
10946 (build_expr_from_tree): Deal with a template-id as the function to
10947 call in a METHOD_CALL_EXPR.
10948 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
10949 (maybe_adjust_types_For_deduction): Don't do peculiar things with
10951 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
10952 pointer-to-member types where necessary.
10953 * tree.c (build_cplus_array_type_1): Don't avoid building real
10954 array types when processing templates unless really necessary.
10955 (build_exception_variant): Compare the exception lists correctly.
10957 1998-12-13 Mark Mitchell <mark@markmitchell.com>
10959 * cp-tree.def (CPLUS_BINDING): Update documentation.
10960 * cp-tree.h (LOCAL_BINDING_P): New macro.
10961 (lang_identifier): Rename local_value to bindings.
10962 (tree_binding): Make `scope' of type `void*', not `tree'.
10963 (BINDING_SCOPE): Update documentation.
10964 (IDENTIFIER_LOCAL_VALUE): Remove.
10965 (IDENTIFIER_CLASS_VALUE): Document.
10966 (IDENTIFIER_BINDING): New macro.
10967 (IDENTIFIER_VALUE): Likewise.
10968 (TIME_IDENTIFIER_TIME): Likewise.
10969 (TIME_IDENTIFIER_FILEINFO): Likewise.
10970 (IMPLICIT_TYPENAME_P): Likewise.
10971 (set_identifier_local_value): Remove.
10972 (push_local_binding): New function.
10973 (push_class_binding): Likewise.
10974 * class.c (pushclass): Update comments; use push_class_binding.
10975 * decl.c (set_identifier_local_value_with_scope): Remove.
10976 (set_identifier_local_value): Likewise.
10977 (push_binding): New function.
10978 (pop_binding): Likewise.
10979 (binding_level): Update documentation. Remove shadowed.
10980 (BINDING_LEVEL): New macro.
10981 (free_binding_nodes): New variable.
10982 (poplevel): Adjust for new name-lookup scheme. Don't mess up
10983 BLOCK_VARs when doing for-scope extension. Remove effectively
10985 (pushlevel_class): Tweak formatting.
10986 (poplevel_class): Adjust for new name-lookup scheme.
10987 (print_binding_level): Likewise.
10988 (store_bindings): Likewise.
10989 (pushdecl): Likewise.
10990 (pushdecl_class_level): Likewise.
10991 (push_class_level_binding): Likewise.
10992 (push_overloaded_decl): Update comments. Adjust for new
10993 name-lookup scheme.
10994 (lookup_name_real): Likewise.
10995 (lookup_name_current_level): Likewise.
10996 (cp_finish_decl): Likewise.
10997 (require_complete_types_for_parms): Likewise. Remove misleading
10999 (grok_parms): Likewise. Don't call
11000 require_complete_types_for_parms here.
11001 (grok_ctor_properties): Don't treat templates as copy
11003 (grop_op_properties): Or as assignment operators.
11004 (start_function): Document. Adjust for new name-lookup scheme.
11005 (finish_function): Likewise.
11006 * decl2.c (do_local_using_decl): Use push_local_binding.
11007 * lex.c (begin_definition_of_inclass_inline): New function, split
11009 (do_pending_inlines): Here, and ...
11010 (process_next_inline): Here.
11011 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
11012 (init_filename_times): Likewise.
11013 (extract_interface_info): Likewise.
11014 (ste_typedecl_interface_info): Likewise.
11015 (check_newline): Likewise.
11016 (dump_time_statistics): Likewise.
11017 (handle_cp_pragma): Likewise.
11018 (do_identifier): Adjust for new name-lookup scheme.
11019 * parse.y (function_try_block): Return ctor_initializer_opt value.
11021 (fn.defpen): Pass appropriate values to start_function.
11022 (pending_inline): Use functor_try_block value, and pass
11023 appropriate values to finish_function.
11024 * pt.c (is_member_template): Update documentation; remove handling
11025 of FUNCTION_DECLs. As per name, this function should deal only in
11027 (decl_template_parm_p): Change name of olddecl parameter to decl.
11028 (check_template_shadow): Adjust for new name-lookup scheme.
11029 (lookup_template_class): Likewise.
11030 (tsubst_decl): Tweak so as not to confuse member templates with
11031 copy constructors and assignment operators.
11032 (unify): Handle UNION_TYPEs.
11033 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
11034 (lang_print_xnode): Adjust for new name-lookup scheme.
11035 * typeck.c (mark_addressable): Likewise.
11036 (c_expand_return): Likewise.
11038 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
11040 * decl.c (grokdeclarator): Allow field with same name as class
11043 * decl.c (lookup_name_real): Don't limit field lookup to types.
11044 * class.c (check_member_decl_is_same_in_complete_scope): No error
11045 if icv and x are the same.
11046 * lex.c (do_identifier): Tweak error message.
11048 1998-12-10 Mark Mitchell <mark@markmitchell.com>
11050 * decl.c (start_enum): Use push_obstacks, not
11051 end_temporary_allocation.
11052 (finish_enum): Call pop_obstacks.
11054 1998-12-10 Mark Mitchell <mark@markmitchell.com>
11056 * class.c (instantiate_type): Return error_mark_node rather than
11059 1998-12-09 Mark Mitchell <mark@markmitchell.com>
11061 * cp-tree.h (most_specialized_instantiation): New function.
11062 (print_candidates): Likewise.
11063 * class.c (validate_lhs): Remove.
11064 (resolve_address_of_overloaded_function): New function, split out
11065 and then substantially reworked, from ...
11066 (instantiate_type): Use it. Simplify.
11067 * cvt.c (convert_to_reference): Complain when caller has indicated
11068 that's the right thing to do. Don't crash if instantiate_type
11070 * pt.c: Substitute `parameters' for `paramters' throughout.
11071 (print_candidates): Don't make it static.
11072 (most_specialized_instantiation): Split out from ...
11073 (most_specialized): Here.
11075 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
11077 * lex.c (lang_init_options): Initialize cpplib.
11078 * decl2.c (parse_options,cpp_initialized): Removed.
11079 (lang_decode_option): Move initialization of cpplib to
11082 1998-12-09 Mark Mitchell <mark@markmitchell.com>
11084 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
11085 well as the TYPE_DECL, when a typedef name is assigned to a
11086 previously anonymous type.
11088 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
11090 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
11091 __cp_eh_info for getting the eh info pointer. Add table_index to
11093 (push_eh_cleanup): Don't increment 'handlers' data field.
11094 (process_start_catch_block): Don't set the 'caught' field.
11096 * cp/exception.cc (CP_EH_INFO): New macro for getting the
11097 exception info pointer within library routines.
11098 (__cp_eh_info): Use CP_EH_INFO.
11099 (__start_cp_handler): Get exception info pointer, set caught field,
11100 and increment the handlers field. Avoids this being done by handlers.
11101 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
11102 (uncaught_exception): Use CP_EH_INFO macro.
11104 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
11106 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
11108 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
11110 * lex.c (check_newline): Add support for \ as `natural'
11111 characters in file names in #line to be consistent with #include
11112 handling. We support escape processing in the # 1 "..." version of
11113 the command. See also support in cp/lex.c.
11115 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
11117 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
11120 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
11122 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
11124 * error.c (dump_simple_decl): Also print namespace context.
11125 (dump_function_decl): Likewise.
11127 * decl2.c (ambiguous_decl): Don't print old value if it's
11130 * decl.c (lookup_name_real): Fix handling of local types shadowed
11131 by a non-type decl. Remove obsolete code.
11132 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
11134 * lang-options.h: Add -fpermissive.
11135 * decl2.c: Likewise.
11136 * cp-tree.h: Add flag_permissive.
11137 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
11138 were specified, set flag_pedantic_errors.
11139 * call.c (build_over_call): Turn dropped qualifier messages
11140 back into pedwarns.
11141 * cvt.c (convert_to_reference): Likewise.
11142 * typeck.c (convert_for_assignment): Likewise.
11144 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
11146 * decl2.c (coerce_new_type): Use same_type_p.
11147 (coerce_delete_type): Likewise.
11149 * call.c (check_dtor_name): Return 1, not error_mark_node.
11151 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
11153 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
11154 if MULTIPLE_SYMBOL_SPACES.
11156 * pt.c (check_template_shadow): New fn.
11157 * decl2.c (grokfield): Use it.
11158 * decl.c (pushdecl): Likewise.
11159 (pushdecl_class_level): Likewise.
11160 (start_method): Likewise.
11161 (xref_tag): Don't try to use 't' if we're defining.
11163 * call.c (check_dtor_name): Just return an error_mark_node.
11164 * pt.c (lookup_template_class): Complain about using non-template here.
11165 * parse.y (apparent_template_type): Not here.
11167 * pt.c (check_explicit_specialization): Complain about specialization
11170 * lang-options.h: Add -f{no-,}implicit-inline-templates.
11172 * pt.c (convert_nontype_argument): Don't assume that any integer
11173 argument is intended to be a constant-expression.
11175 1998-12-03 Mark Mitchell <mark@markmitchell.com>
11177 * class.c (handle_using_decl): Fix comment. Don't lookup
11178 constructors in base classes.
11179 (validate_lhs): Fix typo in comment.
11180 * search.c (lookup_field_1): Don't return a USING_DECL.
11182 * cp-tree.h (DECL_ACCESS): Improve documentation.
11184 * decl.c (expand_static_init): Don't set the initialization-done
11185 flag until the initialization is done.
11187 1998-12-02 Mark Mitchell <mark@markmitchell.com>
11189 * decl2.c (validate_nonmember_using_decl): Complain about using
11190 declarations for class members.
11192 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
11194 * typeck2.c (process_init_constructor): Use same_type_p.
11196 * decl.c (check_tag_decl): Don't warn about null decl inside a
11199 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
11201 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
11202 (resolve_overloaded_unification): Strip baselinks.
11204 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11206 * g++spec.c: Don't prototype xmalloc.
11208 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
11210 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
11212 * decl.c (check_tag_decl): Do complain about null friend decl at
11215 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
11217 * lex.c (make_lang_type): Clear the whole struct lang_type, not
11218 only the first multiple of sizeof (int).
11220 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
11222 * decl.c (start_decl): An explicit specialization of a static data
11223 member is only a definition if it has an initializer.
11225 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
11226 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
11228 * init.c (expand_default_init): Check for DIRECT_BIND instead of
11231 * call.c (build_over_call): Use build_decl.
11233 * except.c (expand_throw): Just use convert, not
11234 build_reinterpret_cast.
11236 * lex.c (handle_generic_pragma): Use token_buffer.
11238 * decl.c (check_tag_decl): Don't complain about null friend decl.
11240 1998-11-24 Dave Pitts <dpitts@cozx.com>
11242 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
11244 * lex.c (check_newline): Use ISALPHA.
11245 (readescape): Use ISGRAPH.
11246 (yyerror): Use ISGRAPH.
11248 1998-11-24 Nathan Sidwell <nathan@acm.org>
11250 * search.c (get_abstract_virtuals): Do not use initial
11251 CLASSTYPE_ABSTRACT_VIRTUALS.
11252 * typeck2.c (abstract_virtuals_error): Show location of abstract
11254 * call.c (build_new_method_call): Use
11255 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
11256 * class.c (finish_struct_bits): Don't bother working out whether
11257 get_abstract_virtuals will do anything, just do it.
11259 1998-11-24 Graham <grahams@rcp.co.uk>
11261 * typeck.c (build_component_ref): Remove unused statement.
11263 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
11265 * class.c (add_method): Catch invalid overloads.
11267 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
11268 * search.c (lookup_conversions): Handle getting real OVERLOADs.
11269 (add_conversions): Likewise. Revert last change.
11270 * call.c (add_conv_candidate): Pass totype to add_candidate instead
11271 of fn. Don't add a new candidate if the last one was for the same
11273 (print_z_candidates): Handle getting a type as a function.
11274 (joust): If we got two conversion candidates to the same type,
11276 (build_object_call): Lose 'templates'.
11277 (build_user_type_conversion_1): Handle getting real OVERLOADs.
11279 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
11281 * typeck2.c (process_init_constructor): If there are elements
11282 that don't have initializers and they need to have constructors
11283 run, supply them with initializers.
11285 * class.c (finish_struct_1): A class with a 0-width bitfield is
11288 1998-11-23 Mark Mitchell <mark@markmitchell.com>
11290 * pt.c (instantiate_class_template): Don't try to figure out what
11291 specialization to use for a partial instantiation. Correct
11292 typos in a couple of comments. Avoid calling uses_template_parms
11295 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
11297 * method.c (process_overload_item): Add call to
11298 build_mangled_C9x_name for intTI_type_nodes.
11299 (build_mangled_C9x_name): Add prototype, define.
11300 * decl.c (init_decl_processing): Add names for
11303 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
11305 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
11307 * class.c (finish_struct_1): Set things up for 0-width bitfields
11308 like we do for others.
11310 * decl.c (check_tag_decl): New fn.
11311 (shadow_tag): Split out from here.
11312 * decl2.c (grok_x_components): Call it.
11314 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
11316 * decl.c: Lose warn_about_return_type.
11317 (grokdeclarator): Always complain about implicit int, except for
11320 * decl.c (tag_name): New fn.
11321 (xref_tag): Complain about using typedef-name after class-key.
11323 * init.c (expand_vec_init): Also keep going if from_array.
11325 * tree.c (is_overloaded_fn): Also handle the output of
11328 * decl.c (grokdeclarator): Use constructor_name when comparing
11329 field name against enclosing class.
11330 * class.c (finish_struct_anon): Likewise.
11332 1998-11-22 Mark Mitchell <mark@markmitchell.com>
11334 * decl.c (poplevel): Remove code to handle KEEP == 2.
11335 (finish_function): Don't confuse BLOCK-order when
11336 processing a destructor.
11338 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
11340 * decl.c (require_complete_types_for_parms): Call layout_decl
11341 after we've completed the type.
11343 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
11345 * decl2.c (validate_nonmember_using_decl): Allow using templates
11346 from the global namespace.
11348 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
11350 Handle specifying template args to member function templates.
11351 * tree.c (build_overload): Always create an OVERLOAD for a template.
11352 * search.c (add_conversions): Handle finding an OVERLOAD.
11353 * decl2.c (check_classfn): Likewise.
11354 * lex.c (identifier_type): See through a baselink.
11355 * parse.y (do_id): Don't call do_identifier if we got a baselink.
11356 * class.c (instantiate_type, case TREE_LIST): Recurse.
11358 * decl.c (grokdeclarator): Allow a boolean constant for array
11359 bounds, odd as that sounds.
11361 * pt.c (unify): Be more strict about non-type parms, except for
11363 (UNIFY_ALLOW_INTEGER): New macro.
11365 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
11367 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
11369 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
11371 * semantics.c (begin_class_definition): Call
11372 maybe_process_partial_specialization before push_template_decl.
11373 Don't call push_template_decl for a specialization.
11374 * search.c (lookup_field): Do return a member template class.
11375 * decl2.c (handle_class_head): Handle member template classes.
11377 * decl.c (grokdeclarator): A parm type need not be complete.
11379 * pt.c (convert_nontype_argument): Fix thinko.
11381 1998-11-18 Mark Mitchell <mark@markmitchell.com>
11383 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
11384 (global_delete_fndecl): New variable.
11385 * decl.c (global_delete_fndecl): Define it.
11386 (init_decl_processing): Set it.
11387 * init.c (build_builtin_delete_call): Use it.
11388 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
11391 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
11393 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
11396 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
11397 * call.c (build_object_call): Also support references to functions.
11398 * typeck.c (convert_for_initialization): Don't decay a function
11399 if the target is a reference to function.
11401 * search.c (add_conversions): Get all the overloads from a class.
11403 * decl.c (grok_ctor_properties): Complain about any constructor
11404 that will take a single arg of the class type by value.
11406 * typeck2.c (build_functional_cast): Can't create objects of
11407 abstract classes this way.
11408 * cvt.c (ocp_convert): Likewise.
11410 * decl.c (grokfndecl): Member functions of local classes are not
11413 1998-11-18 Mark Mitchell <mark@markmitchell.com>
11415 * Make-lang.in (cc1plus): Add dependency on hash.o.
11417 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
11419 * search.c (get_abstract_virtuals): Complain about virtuals with
11420 no final overrider.
11421 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
11422 with no final overrider.
11423 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
11424 on virtuals with no final overrider.
11426 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
11428 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
11431 * friend.c (do_friend): Don't set_mangled_name_for_decl.
11433 * class.c (finish_struct_anon): Complain about non-fields.
11434 * decl2.c (build_anon_union_vars): Likewise.
11436 * decl.c (grokdeclarator): Normal data members can't have the same
11437 name as the class, either.
11438 * class.c (finish_struct_anon): Neither can members of an
11441 1998-11-17 Mark Mitchell <mark@markmitchell.com>
11443 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
11444 (TYPE_BINFO): Likewise.
11445 (IS_AGGR_TYPE): Tweak.
11446 (SET_IS_AGGR_TYPE): New macro.
11447 (CLASS_TYPE_P): Tweak.
11448 (lang_type): Group mark bitfields together. Remove linenum.
11449 (CLASSTYPE_SOURCE_LINE): Remove macro.
11450 (CLASSTYPE_MARKED_N): New macro.
11451 (SET_CLASSTYPE_MARKED_N): Likewise.
11452 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
11453 (CLASS_TYPE_MARKED_*): Use them.
11454 (SET_CLASSTYPE_MARKED_*): Likewise.
11455 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
11456 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11457 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
11458 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
11459 * class.c (class_cache_obstack): New variable.
11460 (class_cache_firstobj): Likewise.
11461 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
11462 (pushclass): Free the cache, when appropriate.
11464 (maybe_push_cache_obstack): Use class_cache_obstack.
11465 * decl.c (include hash.h).
11466 (typename_hash): New function.
11467 (typename_compare): Likewise.
11468 (build_typename_type): Check the hash table to avoid creating
11470 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
11471 (grokdeclarator): Use CLASS_TYPE_P.
11472 (xref_basetypes): Likewise.
11473 (start_function): Likewise. Don't put current_class_ref on the
11475 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
11477 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
11478 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
11479 fields for types other than class types. Do clear TYPE_ALIAS_SET
11480 for types other than class types, though.
11481 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
11482 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11483 * pt.c (process_template_parm): Don't set
11484 CLASSTYPE_GOT_SEMICOLON.
11485 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11486 Coerce arguments on the momentary obstack.
11487 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11488 (instantiate_class_template): Calculate template arguments on the
11489 momentary obstack. Tidy.
11490 (tsubst_template_arg_vector): Use make_temp_vec.
11491 (tsubst_aggr_type): Put template arguments on the momentary
11493 (tsubst_decl): Likewise.
11494 (tsubst): Copy the array bounds index to the permanent obstack
11495 before building index types. Use new macros.
11496 (unify): Use new macros.
11497 (do_type_instantiation): Likewise.
11498 * search.c (lookup_fnfields_1): Use new macros.
11499 (dfs_pushdecls): Build envelopes on the cache obstack.
11500 (dfs_compress_decls): Use new macros.
11501 (push_class_decls): Build on the cache obstack.
11502 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
11503 * sign.c (build_signature_pointer_or_reference_type): Use
11505 * tree.c (make_binfo): Check CLASS_TYPE_P.
11506 (copy_template_template_parm): Adjust.
11507 (make_temp_vec): Use push_expression_obstack.
11508 * typeck.c (complete_type): Use new macros.
11509 (comptypes): Likewise.
11511 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
11513 * pt.c (tsubst): Add diagnostics for invalid array, reference
11514 and pointer to member types.
11516 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
11518 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
11520 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
11523 * parse.y (structsp): Fix cut-and-paste error.
11525 * init.c (build_new): Complain about non-integral size.
11527 * parse.y (unary_expr): Complain about defining types in sizeof.
11529 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
11531 * rtti.c (build_x_typeid): Complain about typeid without
11532 including <typeinfo>.
11533 (get_typeid): Likewise. Complain about typeid of incomplete type.
11534 (get_tinfo_fn_dynamic): Likewise.
11535 (get_typeid_1): Not static anymore.
11536 * except.c (build_eh_type_type): Use get_typeid_1.
11538 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
11539 ambiguous or private bases. Fix warning for reference cast.
11541 1998-11-16 Mark Mitchell <mark@markmitchell.com>
11543 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
11544 * decl.c (duplicate_decls): Remove special-case code to deal with
11545 template friends, and just do the obvious thing.
11546 * pt.c (register_specialization): Tweak for clarity, and also to
11547 clear DECL_INITIAL for an instantiation before it is merged with a
11549 (check_explicit_specialization): Fix indentation.
11550 (tsubst_friend_function): Handle both definitions in friend
11551 declaration and outside friend declarations.
11552 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
11553 (regenerate_decl_from_template): Tweak accordingly.
11554 (instantiate_decl): Likewise.
11556 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
11558 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
11559 member function reference to error.
11560 * cvt.c (ocp_convert): Complain about converting an overloaded
11563 * init.c (build_offset_ref): Just return a lone static member
11566 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
11569 * typeck.c (build_binary_op_nodefault): Improve error handling.
11571 * decl.c (grokfndecl): Complain about making 'main' a template.
11573 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
11575 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
11576 TYPE_DECL in a template.
11578 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
11580 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
11582 * decl.c (struct cp_function): Add named_label_uses.
11583 (push_cp_function_context): Save it.
11584 (pop_cp_function_context): Restore it.
11585 (define_label): Also complain about jumping into the scope of
11586 non-POD objects that don't have constructors.
11587 * tree.c (pod_type_p): New fn.
11589 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
11590 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
11591 (get_tinfo_fn): Not here.
11592 * repo.c (repo_get_id): Abort if we get called for an incomplete
11595 1998-11-13 Mark Mitchell <mark@markmitchell.com>
11597 * except.c (expand_throw): Make sure first argument to
11598 __cp_push_exception is of type `void*' to avoid spurious error
11601 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
11603 * pt.c (try_one_overload): Take orig_targs again. Only check for
11604 mismatches against them; we don't care what a previous call found.
11605 (resolve_overloaded_unification): Adjust.
11607 * search.c (lookup_field): Don't return anything for a non-type
11608 field from a dependent type.
11609 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
11610 in an array declarator.
11611 (start_decl): Push into the class before looking for the field.
11613 1998-11-08 Mark Mitchell <mark@markmitchell.com>
11615 * method.c (build_overload_value): Handle REFERENCE_TYPE.
11617 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
11619 * decl.c (grokdeclarator): Allow namespace-scoped members if they
11622 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
11624 * pt.c (tsubst_decl): Don't mess with the global value of an
11625 un-mangled DECL_ASSEMBLER_NAME.
11627 1998-11-03 Christopher Faylor <cgf@cygnus.com>
11629 * decl.c (init_decl_processing): Remove CYGWIN conditional
11630 since CYGWIN is now able to deal with trapping signals.
11632 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11634 * cp-tree.h: Don't include gansidecl.h.
11635 * exception.cc: Include gansidecl.h (since we don't include config.h)
11636 * g++spec.c: Don't include gansidecl.h.
11638 1998-11-06 Mark Mitchell <mark@markmitchell.com>
11640 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
11642 (DECL_DEFINED_IN_CLASS_P): New macro.
11643 (TEMPLATE_PARMS_FOR_INLINE): Document.
11644 (check_static_variable_definition): New function.
11645 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
11647 (check_static_variable_definition): Split out from ...
11648 (grokdeclarator): Here.
11649 * pt.c (check_default_tmpl_args): New function, split out from ...
11650 (push_template_decl_real): Here.
11651 (instantiate_template): Fix comment.
11653 1998-11-04 Mark Mitchell <mark@markmitchell.com>
11655 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
11656 (CP_TYPE_VOLATILE_P): Likewise.
11657 (CP_TYPE_RESTRICT_P): Likewise.
11659 1998-11-03 Mark Mitchell <mark@markmitchell.com>
11661 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
11663 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
11665 * class.c (instantiate_type): Be more helpful.
11667 * decl2.c (import_export_decl): Call import_export_class.
11669 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
11670 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
11671 * pt.c (tsubst_copy): Likewise.
11673 1998-11-02 Mark Mitchell <mark@markmitchell.com>
11675 * init.c (expand_vec_init): Fix off-by-one error.
11677 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
11679 * parse.y (apparent_template_type): New type.
11680 (named_complex_class_head_sans_basetype): Use it.
11681 * Makefile.in (CONFLICTS): One new conflict.
11682 * parse.c: Regenerated.
11684 1998-11-01 Mark Mitchell <mark@markmitchell.com>
11686 * cp-tree.h (COMPARE_STRICT): New macro.
11687 (COMPARE_BASE): Likewise.
11688 (COMPARE_RELAXED): Likewise.
11689 (COMPARE_REDECLARATION): Likewise.
11690 (same_type_p): Likewise.
11691 (same_or_base_type_p): Likewise.
11692 * call.c (standard_conversion): Use them, in place of comptypes
11693 with numeric arguments.
11694 (reference_binding): Likewise.
11695 (convert_like): Likewise.
11696 (build_over_call): Likewise.
11697 (is_subseq): Likewise.
11698 (is_properly_derived_from): Likewise.
11699 (compare_ics): Likewise.
11701 * class.c (delete_duplicate_fields_1): Likewise.
11702 (resolves_to_fixed_type_p): Likewise.
11703 (instantiate_type): Likewise. Remove #if 0'd code.
11704 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
11705 (pushdecl): Likewise.
11706 (lookup_name_real): Likewise.
11707 (grokdeclarator): Likewise. Check for illegal array declarations.
11708 (grokparms): Likewise.
11709 (grok_op_properties): Likewise.
11710 * decl2.c (check_classfn): Likewise.
11711 * friend.c (is_friend): Likewise.
11712 (make_friend_class): Likewise.
11713 * init.c (expand_aggr_init): Likewise.
11714 (expand_vec_init): Likewise.
11715 * pt.c (is_member_template_class): Remove declaration.
11716 (is_specialization_of): Use COMPARE_* and new macros.
11717 (comp_template_parms): Likewise.
11718 (convert_nontype_argument): Likewise.
11719 (coerce_template_template_parms): Likewise.
11720 (template_args_equal): Likewise.
11721 (lookup_template_class): Likewise.
11722 (type_unification_real): Likewise.
11724 (get_bindings_real): Likewise.
11725 * search.c (covariant_return_p): Likewise.
11726 (get_matching_virtual): Likewise.
11727 * sig.c (match_method_types): Likewise.
11728 * tree.c (vec_binfo_member): Likewise.
11729 (cp_tree_equal): Likewise.
11730 * typeck.c (common_type): Likewise.
11731 (comp_array_types): Likewise. Get issues involving unknown array
11733 (comptypes): Update comments. Use new flags.
11734 (comp_target_types): Use new macros.
11735 (compparms): Likewise.
11736 (comp_target_parms): Likewise.
11737 (string_conv_p): Likewise.
11738 (build_component_ref): Likewise.
11739 (build_indirect_ref): Likewise.
11740 (build_conditional_expr): Likewise.
11741 (build_static_cast): Likewise.
11742 (build_reinterpret_cast): Likewise.
11743 (build_const_cast): Likewise.
11744 (build_modify_expr): Likewise.
11745 (convert_for_assignment): Likewise.
11746 (comp_ptr_ttypes_real): Likewise.
11747 (ptr_reasonably_similar): Likewise.
11748 (comp_ptr_ttypes_const): Likewise.
11750 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
11752 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
11754 1998-10-30 Mark Mitchell <mark@markmitchell.com>
11756 * decl2.c (delete_sanity): Pass integer_zero_node, not
11757 integer_two_node, to build_vec_delete.
11758 * init.c (build_array_eh_cleanup): Remove.
11759 (expand_vec_init_try_block): New function.
11760 (expand_vec_init_catch_clause): Likewise.
11761 (build_vec_delete_1): Don't deal with case that auto_delete_vec
11762 might be integer_two_node anymore.
11763 (expand_vec_init): Rework for initialization-correctness and
11764 exception-correctness.
11765 * typeck2.c (process_init_constructor): Make mutual exclusivity
11766 of cases more obvious.
11768 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
11770 * decl.c (lookup_name_real): OK, only warn if not lexing.
11771 Simplify suggested fix.
11773 * cp-tree.h (IDENTIFIER_MARKED): New macro.
11774 * search.c (lookup_conversions): Use breadth_first_search.
11775 (add_conversions): Avoid adding two conversions to the same type.
11776 (breadth_first_search): Work with base binfos, rather
11777 than binfos and base indices.
11778 (get_virtual_destructor): Adjust.
11779 (tree_has_any_destructor_p): Adjust.
11780 (get_matching_virtual): Adjust.
11782 * pt.c (push_template_decl_real): Generalize check for incorrect
11783 number of template parms.
11784 (is_member_template_class): #if 0.
11786 1998-10-29 Richard Henderson <rth@cygnus.com>
11788 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
11791 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
11793 * lex.c: Call check_newline from lang_init always. After
11794 calling cpp_start_read, set yy_cur and yy_lim to read from the
11795 cpplib token buffer.
11797 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
11799 * class.c (instantiate_type): Don't consider templates for a normal
11802 * class.c (finish_struct_1): Don't complain about non-copy
11803 assignment ops in union members.
11805 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
11806 (prepare_fresh_vtable): Likewise.
11807 (finish_struct_1): Don't call import_export_class.
11808 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
11809 (finish_prevtable_vardecl): Lose.
11810 (finish_file): Don't call it.
11811 * pt.c (instantiate_class_template): Likewise.
11812 * cp-tree.h: Remove it.
11814 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
11815 * decl.c (finish_function): Not here.
11816 (start_function): Do set DECL_INITIAL.
11818 * pt.c (push_template_decl_real): Complain about default template
11819 args for enclosing classes.
11821 * call.c (add_function_candidate): Treat conversion functions
11822 as coming from the argument's class.
11823 * cp-tree.h (DECL_CONV_FN_P): New fn.
11824 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
11825 * class.c (add_method): Use DECL_CONV_FN_P.
11826 * decl2.c (check_classfn): Likewise.
11827 * error.c (dump_function_name): Likewise.
11828 (dump_function_decl): Likewise.
11829 * pt.c (fn_type_unification): Likewise.
11830 * search.c (add_conversions): Likewise.
11832 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
11834 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
11835 * method.c (hack_identifier): Also check for using RESULT_DECL
11836 from outer context.
11838 1998-10-27 Mark Mitchell <mark@markmitchell.com>
11840 * decl.c (grokdeclarator): Use type_quals, rather than constp,
11843 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
11845 * call.c (standard_conversion): instantiate_type here.
11846 (reference_binding): And here.
11847 (implicit_conversion): Not here.
11848 (build_op_delete_call): No need to cons up an OVERLOAD.
11849 * cvt.c (cp_convert_to_pointer): instantiate_type here.
11850 (convert_to_reference): And here.
11851 * decl.c (grok_reference_init): Not here.
11852 (grokparms): Or here.
11853 * typeck2.c (digest_init): Or here.
11854 * typeck.c (decay_conversion): Take the address of overloaded
11856 (require_instantiated_type): Lose.
11857 (convert_arguments): Don't handle unknown types here.
11858 (build_c_cast): Likewise.
11859 (build_binary_op): Gut.
11860 (build_conditional_expr): Don't require_instantiated_type.
11861 (build_modify_expr): Likewise.
11862 (build_static_cast): Don't instantiate_type.
11863 (build_reinterpret_cast): Likewise.
11864 (build_const_cast): Likewise.
11865 (convert_for_initialization): Likewise.
11866 (build_ptrmemfunc): Use type_unknown_p.
11867 (convert_for_assignment): Also do default_conversion on overloaded
11868 functions. Hand them off to ocp_convert.
11870 1998-10-26 Mark Mitchell <mark@markmitchell.com>
11872 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
11873 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
11875 * class.c (finish_struct_1): Use build_cplus_array_type to build
11877 * decl.c (init_decl_processing): Likewise.
11878 * except.c (expand_end_eh_spec): Likewise.
11879 * search.c (expand_upcast_fixups): Simplify very slightly.
11881 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11883 * decl.c (grokdeclarator): Complain about a variable using
11884 constructor syntax coming back null from start_decl.
11886 * friend.c (make_friend_class): Complain about trying to make
11887 a non-class type a friend.
11889 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
11890 (start_function): Not here.
11892 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
11894 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
11896 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11898 * typeck2.c (process_init_constructor): Only skip anonymous fields
11899 if they are bitfields.
11901 * cp-tree.def (TYPEOF_TYPE): New code.
11902 * error.c (dump_type_real): Handle it.
11903 * pt.c (tsubst): Likewise.
11904 * tree.c (search_tree): Likewise.
11905 * semantics.c (finish_typeof): New fn.
11906 * parse.y (typespec): Use it.
11907 * cp-tree.h: Declare it.
11909 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
11911 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
11913 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11915 * typeck.c (convert_arguments): Don't handle pmf references
11918 * init.c (build_member_call): Don't try to convert to the base type
11919 if it's ambiguous or pedantic.
11921 * typeck2.c (check_for_new_type): Only depend on pedantic for
11924 1998-10-25 Mark Mitchell <mark@markmitchell.com>
11926 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
11927 non-converting constructors.
11929 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
11931 * gxxint.texi: Correct documentation for n, N, Q, and B.
11933 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
11935 * parse.y (condition): Convert VAR_DECL from reference to indirect
11938 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
11940 * exception.cc (__cp_pop_exception): Free the original exception
11941 value, not the potentially coerced one.
11943 1998-10-23 Mark Mitchell <mark@markmitchell.com>
11945 * Makefile.in (hash.h): Run gperf when necessary.
11947 * cp-tree.h (CP_TYPE_READONLY): Remove.
11948 (CP_TYPE_VOLATILE): Likewise.
11949 (CP_TYPE_QUALS): New macro.
11950 (CP_TYPE_CONST_P): Likewise.
11951 (CP_TYPE_VOLATILE_P): Likewise.
11952 (CP_TYPE_RESTRICT_P): Likewise.
11953 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
11954 (cp_build_type_variant): Rename to ...
11955 (cp_build_qualified_type): New function.
11956 (c_apply_type_quals_to_decl): Declare.
11957 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
11958 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
11959 (cp_type_qual_from_rid): New function.
11960 (compparms): Remove unused parameter. All callers changed.
11961 (cp_type_quals): New function.
11962 (at_least_as_qualified_p): Likewise.
11963 (more_qualified_p): Likewise.
11965 * call.c (standard_conversion): Replace calls to
11966 cp_build_type_variant with cp_build_qualified_type. Use
11967 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
11968 compare them. Use CP_TYPE_* macros to check qualifiers.
11969 (reference_binding): Likewise.
11970 (implicit_conversion): Likewise.
11971 (add_builtin_candidates): Likewise.
11972 (build_over_call): Likewise.
11973 * class.c (overrides): Compare all qualifiers, not just `const',
11974 on method declarations.
11975 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
11976 (convert_pointer_to_real): Likewise.
11977 (type_promotes_to): Likewise.
11978 * decl.c (check_for_uninitialized_const_var): New function.
11979 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
11980 (cp_finish_decl): Use check_for_uninitialized_const_var.
11981 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
11983 (grok_ctor_properties): Likewise.
11984 (grok_op_properties): Likewise.
11985 (start_function): Likewise.
11986 (rever_static_member_fn): Likewise.
11987 * decl2.c (grok_method_quals): Likewise.
11988 (grokfield): Likewise.
11989 * error.c (dump_readonly_or_volatile): Rename to ...
11990 (dump_qualifiers): New function. Handle `restrict'.
11991 (dump_type_real): Use it.
11992 (dump_aggr_type): Likewise.
11993 (dump_type_prefix): Likewise.
11994 (dump_type_suffix): Likewise.
11995 (dump_function_decl): Likewise.
11996 (cv_as_string): Likewise.
11997 * gxx.gperf: Add __restrict and __restrict__.
11998 * gxxint.texi: Document `u' as used for `__restrict', and a few
11999 other previously undocumented codes.
12000 * hash.h: Regenerated.
12001 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
12002 (build_member_call): Likewise.
12003 (build_new_1): Likewise.
12004 * lex.c (init_parse): Add entry for RID_RESTRICT.
12005 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
12006 (cp_type_qual_from_rid): Define.
12007 * lex.h (enum rid): Add RID_RESTRICT.
12008 * method.c (process_modifiers): Deal with `restrict'.
12009 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
12010 * parse.c: Regenerated.
12011 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
12012 (tsubst_aggr_type): Likewise.
12013 (tsubst): Likewise.
12014 (check_cv_quals_for_unify): Likewise.
12016 * rtti.c (init_rtti_processing): Likewise.
12017 (build_headof): Likewise.
12018 (get_tinfo_var): Likewise.
12019 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
12020 (expand_class_desc): Likewise.
12021 (expand_attr_desc): Likewise.
12022 (synthesize_tinfo_fn): Likewise.
12023 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
12024 (get_matching_virtual): Likewise.
12025 (expand_upcast_fixups): Likewise.
12026 * sig.c (build_signature_pointer_or_reference_name): Take
12027 type_quals, not constp and volatilep.
12028 (build_signature_pointer_or_reference_type): Likewise.
12029 (match_method_types): More CP_TYPE_QUALS conversion, etc.
12030 (build_signature_pointer_constructor): Likewise.
12031 (build_signature_method_call): Likewise.
12032 * tree.c (build_cplus_array_type): Likewise.
12033 (cp_build_type_variant): Rename to ...
12034 (cp_build_qualified_type): New function. Deal with `__restrict'.
12035 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
12036 (build_exception_variant): Likewise.
12037 (mapcar): Likewise.
12038 * typeck.c (qualif_type): Likewise.
12039 (common_type): Likewise.
12040 (comptypes): Likewise.
12041 (comp_cv_target_types): Likewise.
12042 (at_least_as_qualified_p): Define.
12043 (more_qualified_p): Likewise.
12044 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
12045 (compparms): Likewise.
12046 (inline_conversion): Likewise.
12047 (string_conv_p): Likewise.
12048 (build_component_ref): Likewise.
12049 (build_indirect_ref): Likewise.
12050 (build_array_ref): Likewise.
12051 (build_unary_op): Likewise.
12052 (build_conditional_expr): Likewise.
12053 (build_static_cast): Likewise.
12054 (build_c_cast): Likewise.
12055 (build_modify_expr): Likewise.
12056 (convert_For_assignment): Likewise.
12057 (comp_ptr_ttypes_real): Likewise.
12058 (cp_type_quals): New function.
12060 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
12062 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
12063 (CP_TYPE_VOLATILE): Likewise.
12064 * decl.c (grokdeclarator): Use them.
12065 * tree.c (canonical_type_variant): Likewise.
12067 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
12069 * parse.y (named_class_head): Push into class while parsing the
12071 * decl2.c (push_scope, pop_scope): New functions.
12072 * cp-tree.h: Declare them.
12073 * init.c (build_new_1): Delay cleanup until end of full expression.
12075 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
12077 * typeck.c (build_component_ref): Use of a type here is an error.
12079 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
12081 Revamp references to member functions.
12082 * method.c (hack_identifier): Call build_component_ref for a
12083 reference to a member function.
12084 * typeck.c (build_component_ref): Only return a single function
12085 if it's static. Otherwise, return a COMPONENT_REF.
12086 (build_x_function_call): Handle a COMPONENT_REF.
12087 (build_unary_op): Handle all unknown-type things.
12088 * decl2.c (arg_assoc): Handle COMPONENT_REF.
12089 * class.c (instantiate_type): Complain if the function we get is a
12090 nonstatic member function. Remove code for finding "compatible"
12092 * pt.c (tsubst_copy): Handle NOP_EXPR.
12093 * tree.c (build_dummy_object): New fn.
12094 (maybe_dummy_object): New fn.
12095 (is_dummy_object): New fn.
12096 * cp-tree.h: Declare them.
12097 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
12098 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
12099 * init.c (build_member_call): Use maybe_dummy_object and
12101 (build_offset_ref): Use maybe_dummy_object.
12102 (resolve_offset_ref): Use is_dummy_object.
12103 * typeck.c (build_x_function_call): Call build_dummy_object.
12104 (unary_complex_lvalue): Call is_dummy_object.
12106 * typeck.c (build_component_addr): Make sure field is a field.
12108 * call.c (build_new_op): Delete obsolete code.
12110 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
12112 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
12114 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
12115 std if std is ignored.
12117 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
12119 * decl.c (grokvardecl): Fix thinko.
12121 * decl.c (grokdeclarator): Embedded attrs bind to the right,
12124 * parse.y (fn.def2): Fix 'attrs' format.
12126 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
12128 * Makefile.in (CONFLICTS): Update.
12129 * parse.y (expr_or_declarator_intern): New rule.
12130 (expr_or_declarator, direct_notype_declarator, primary,
12131 functional_cast): Use it.
12132 (notype_declarator_intern): New rule.
12133 (notype_declarator, complex_notype_declarator): Use it.
12135 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
12137 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
12138 (grokvardecl): Likewise.
12140 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12142 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
12143 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
12145 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
12147 * pt.c (process_partial_specialization): Cast 1st argument of
12150 * tree.c (build_base_fields): Cast `base_align' to (int) when
12151 comparing against one.
12153 1998-10-16 Mark Mitchell <mark@markmitchell.com>
12155 * decl.c (lookup_name_real): Handle template parameters for member
12156 templates where said parameters have the same name as the
12159 * decl.c (expand_static_init): Build cleanups before entering the
12160 anonymous function used to do them to avoid access-checking
12163 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
12164 accidentally removed by previous change, and make DECL_RTL here.
12165 * class.c (add_method): Don't make DECL_RTL here.
12167 * pt.c (for_each_template_parm): Don't examine uninstantiated
12170 1998-10-16 Dave Brolley <brolley@cygnus.com>
12172 * lex.c (real_yylex): Fix unaligned access of wchar_t.
12174 1998-10-16 Mark Mitchell <mark@markmitchell.com>
12176 * class.c (add_method): Fix documentation to reflect previous
12177 changes. Check for duplicate method declarations here.
12178 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
12179 correctly; such things never match.
12180 (grokfndecl): Don't look for duplicate methods here.
12181 * decl2.c (check_classfn): Don't assume names are mangled.
12182 Don't add bogus member function declarations to a class before the
12183 class type is complete.
12184 (grokfield): Reformat error message.
12185 * method.c (set_mangled_name_for_decl): Don't mangle names while
12186 processing_template_decl.
12188 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
12190 * typeck.c (build_indirect_ref): Complain about a pointer to data
12192 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
12194 * init.c (resolve_offset_ref): Don't undo the above.
12196 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
12197 (struct lang_decl_flags): Add `bitfield'.
12198 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
12200 * decl2.c (grokbitfield, grok_alignof): Likewise.
12201 * init.c (build_offset_ref): Likewise.
12202 * typeck.c (build_component_addr, expr_sizeof): Likewise.
12203 * cvt.c (build_up_reference): Don't crash if taking the address
12204 returns error_mark_node.
12206 * decl.c (grokfndecl): Also check ctype when checking for ::main().
12208 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
12210 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
12212 (grokdeclarator): Instead of here.
12213 * friend.c (do_friend): Lose special handling of ::main and
12215 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
12217 * spew.c (yylex): Clear looking_for_typename if we got
12220 1998-10-15 Mark Mitchell <mark@markmitchell.com>
12222 * class.c (maybe_warn_about_overly_private_class): Improve error
12223 messages for class with only private constructors.
12225 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
12226 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
12227 (build_typename_type): New function.
12228 * decl.c (build_typename_type): Broken out from ...
12229 (make_typename_type): Use it.
12230 * search.c (lookup_field): Likewise.
12232 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12234 * pt.c (convert_nontype_argument): Check against type_referred_to.
12235 * decl.c (grokvardecl): Check for declarator name before building
12236 DECL_ASSEMBLER_NAME.
12238 1998-10-14 Mark Mitchell <mark@markmitchell.com>
12240 * pt.c (lookup_template_class): Add comment.
12241 (instantiate_class_template): Don't mark the _TYPE node for
12242 member class templates as an instantiation.
12244 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
12246 * decl.c (grokfndecl): Fix my thinko.
12248 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
12250 * tinfo2.cc (fast_compare): Remove.
12251 (before): Just use strcmp.
12252 * tinfo.cc (operator==): Just use strcmp.
12254 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
12256 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
12259 1998-10-13 Mark Mitchell <mark@markmitchell.com>
12261 * cp-tree.h (specializations_of_same_template_p): Remove.
12262 * search.c (get_template_base): Don't use it.
12263 (get_template_base_recursive): Likewise.
12264 * pt.c (specializations_of_same_template_p): Remove.
12265 (unify): Don't use it.
12266 (lookup_template_class): Find the correct parent when setting
12267 CLASSTYPE_TI_TEMPLATE.
12269 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
12271 * tinfo.cc (operator==): Always compare names.
12273 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
12275 * decl.c (start_function): Fix cut-and-paste error.
12277 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
12279 * inc/typeinfo: Add #pragma interface.
12280 (operator!=): Just call operator==.
12281 * tinfo.cc: Add #pragma implementation.
12282 (operator==): Move from inc/typeinfo and tinfo2.cc.
12283 Check __COMMON_UNRELIABLE instead of _WIN32.
12285 * typeck2.c (my_friendly_abort): Add URL.
12287 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
12289 * decl.c (start_method): Added extra parameter for attributes.
12290 * cp-tree.h (start_method): Update prototype.
12291 * parse.y (fn.def2): Update start_method parameter list.
12293 1998-10-11 Mark Mitchell <mark@markmitchell.com>
12295 * cp-tree.h (specializations_of_same_template_p): Declare.
12296 * pt.c (specializations_of_same_template_p): New function.
12298 * search.c (get_template_base): Use it.
12299 (get_template_base_recursive): Likewise.
12301 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
12303 * decl2.c (start_objects): Add new variable `joiner' and
12304 initialize it properly.
12306 1998-10-09 Mark Mitchell <mark@markmitchell.com>
12308 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
12309 change to vtable types.
12311 * cvt.c (ocp_convert): Avoid infinite recursion caused by
12314 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
12316 * pt.c (resolve_overloaded_unification): New fn.
12317 (try_one_overload): Likewise.
12318 (unify): Don't fail on unknown type.
12319 (type_unification_real): Likewise. Use resolve_overloaded_unification
12320 to handle an overloaded argument.
12321 (template_args_equal): Split out...
12322 (comp_template_args): From here.
12323 (determine_specialization): Also allow a template with more
12324 parms than were explicitly specified.
12325 * cp-tree.h: Add template_args_equal.
12326 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
12328 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
12330 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
12333 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
12335 * typeck.c (unsigned_type): Only return TItype nodes when
12336 HOST_BITS_PER_WIDE_INT is >= 64 bits.
12337 (signed_type): Likewise.
12338 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
12339 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12340 (init_decl_processing): Only create TItype nodes when
12341 HOST_BITS_PER_WIDE_INT is >= 64 bits.
12342 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
12343 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
12345 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12347 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
12348 (gxx.gperf): Update comments describing invocation flags.
12349 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
12351 1998-10-07 Mark Mitchell <mark@markmitchell.com>
12353 * class.c (finish_struct_1): Add commentary on previous change.
12355 * cp-tree.h (vtbl_ptr_type_node): New variable.
12356 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
12357 already of the right type.
12358 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
12359 Simplify code to grow vtable.
12360 * decl.c (vtbl_ptr_type_node): Define.
12361 (init_decl_processing): Initialize it.
12363 1998-10-06 Mark Mitchell <mark@markmitchell.com>
12365 * cp-tree.def (PTRMEM_CST): New tree node.
12366 * cp-tree.h (ptrmem_cst): New type.
12367 (lang_type): Remove local_typedecls.
12368 (dummy): Increase to 12 bits from 11.
12369 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
12370 (PTRMEM_CST_CLASS): New macro.
12371 (PTRMEM_CST_MEMBER): Likewise.
12372 (current_access_specifier): New variable.
12373 (current_class_type): Remove duplicate declaration.
12374 (finish_struct): Change prototype.
12375 (unreverse_member_declarations): New function.
12376 (pushdecl_class_level): Change prototype.
12377 (grok_enum_decls): Remove.
12378 (fixup_anonymous_union): New function.
12379 (grok_x_components): Change prototype.
12380 (tsubst_chain): Remove.
12381 (finish_member_template_decl): Likewise.
12382 (check_explicit_specialization): Fix indentation.
12383 (finish_class_definition): Change prototype.
12384 (finish_member_class_template): Likewise.
12385 (finish_member_declaration): New function.
12386 (check_multiple_declarators): Likewise.
12387 * class.c (class_stack_node_t): New type.
12388 (current_class_base): Remove.
12389 (current_class_stack): Change type.
12390 (current_access_specifier): New variable.
12391 (grow_method): Remove.
12392 (check_member_decl_is_same_in_complete_scope): Break out from
12394 (make_method_vec): New function.
12395 (free_method_vec): Likewise.
12396 (add_implicitly_declared_members): Break out from finish_struct_1.
12397 (free_method_vecs): New variable.
12398 (add_method): Rework for direct use from parser.
12399 (handle_using_decl): Watch for NULL_TREE while iterating through
12400 CLASSTYPE_METHOD_VEC.
12401 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
12402 just do some error-checking.
12403 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
12404 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
12405 (finish_struct): Change prototype. Simplify; fields and methods
12406 are already set up at this point.
12407 (init_class_processing): Set up current_class_stack.
12408 (pushclass): Save current_access_specifier.
12409 (popclass): Restore it.
12410 (currently_open_class): Simplify.
12411 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
12412 * decl.c (saved_scope): Add access_specifier.
12413 (maybe_push_to_top_level): Save it.
12414 (pop_from_top_level): Restore it.
12415 (maybe_process_template_type_declaration): Use
12416 finish_member_declaration.
12417 (pushtag): Likewise.
12418 (pushdecl_class_level): Don't return a value.
12419 (fixup_anonymous_union): Break out from grok_x_components.
12420 (shadow_tag): Use it.
12421 (xref_tag): Complain about using an elaborated type specifier to
12422 reference a template type parameter or typedef name.
12423 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12424 (current_local_enum): Remove.
12425 (build_enumerator): Call finish_member_declaration.
12426 (grok_enum_decls): Remove.
12427 * decl2.c (grok_x_components): Simplify.
12428 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
12429 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
12430 (merge_functions): Add to comment.
12431 (arg_assoc_type): Prototype.
12432 (arg_assoc): Pass as many arguments as there are parameters.
12433 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
12435 * expr.c (cpls_expand_expr): Remove dead code. Handle
12437 * friend.c (do_friend): Lookup friends when in nested classes.
12439 * init.c (build_offset_ref): Do lookup even for classes that are
12440 only partially defined.
12441 (decl_constant_value): Remove dead code.
12442 * method.c (build_overload_value): Remove hack where by TYPE was
12443 not a TYPE. Handle PTRMEM_CST.
12444 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
12446 * parse.y (components, notype_components, component_decl,
12447 component_decl_1, component_declarator, component_declarator0):
12448 Now all are itype rather than ttype. Rework to add members to
12449 classes on the fly.
12450 (typesqpecqual_reserved): Use check_multiple_declarators.
12451 (structsp): Update class to finish_class_definition.
12452 (do_xref_defn): Unsplit into named_class_head.
12453 (access_specifier): Set current_access_specifier.
12454 * pt.c (set_current_access_from_decl): New function.
12455 (finish_member_template_decl): Don't take the parameters.
12456 (comp_template_args): Make more robust.
12457 (lookup_template_class): Don't use current_local_enum.
12458 (for_each_template_parm): Handle PTRMEM_CST.
12459 (instantiate_class_template): Use set_current_access_from_decl,
12460 finish_member_declaration and unreverse_member_declarations. Set
12461 lineno/input_filename before generating implicit member functions.
12462 (type_unification_real): Don't assume back-unification happens
12463 only for the last argument.
12464 (regenerate_decl_from_template): Call pushclass a bit earlier.
12465 (tsubst_chain): Remove.
12466 (tsubst_enum): Use set_current_access_from_decl.
12467 (set_mangled_name_for_template_decl): Fix indentation.
12468 * search.c (lookup_fnfields_1): Change iteration through
12469 CLASSTYPE_METHOD_VEC.
12470 (dfs_pushdecls): Likewise.
12471 (dfs_compress_decls): Likewise.
12472 (add_conversions): Likewise.
12473 * semantics.c (finish_class_definition): Don't take components.
12474 Change call to finish_struct.
12475 (finish_member_declaration): New function.
12476 (finish_member_class_template): Don't take template parameters.
12477 Change call to grok_x_components. Call finish_member_template_decl.
12478 (check_multiple_declarators): New function.
12479 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
12480 a passed in fieldlist.
12481 * tree.c (search_tree): Handle PTRMEM_CST.
12482 (mapcar): Likewise.
12483 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
12484 INTEGER_CSTs, for pointer-to-data members.
12486 * call.c (resolve_args): Resolve template specializations, if
12489 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12491 * Makefile.in (spew.o): Depend on toplev.h.
12493 * call.c (compare_ics): Initialize variables `deref_from_type2',
12494 `deref_to_type1' and `deref_to_type2'.
12496 * except.c (get_eh_type): Hide prototype and definition.
12497 (process_start_catch_block_old): Remove unused static prototype.
12499 * pt.c (tsubst_decl): Initialize variable `argvec'.
12501 * spew.c: Include toplev.h.
12503 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
12505 * pt.c (instantiate_decl): Do save and restore file position.
12507 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
12509 * method.c (build_decl_overload_real): Clear
12510 numeric_output_need_bar after __.
12512 1998-10-05 Nathan Sidwell <nathan@acm.org>
12514 * call.c (build_new_method_call): Issue 'incomplete type' error,
12515 if class is not defined.
12517 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12519 * call.c (build_object_call): Move declaration of variable
12520 `fn' into the scope where it is used. Don't access variable
12521 `fn' when it is uninitialized, instead use `fns'.
12523 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12525 * errfn.c (cp_thing): Print buf as a string not as a printf format
12526 to avoid problems with the operator%. Consequently, `%%' sequences
12527 in format are copied as `%' in buf.
12529 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
12531 * pt.c (pop_tinst_level): Call extract_interface_info.
12532 (instantiate_decl): Don't save and restore file position.
12534 * decl.c (cp_finish_decl): Make statics in extern inlines and
12535 templates common, if possible and the target doesn't support weak
12538 * decl.c (grokdeclarator): Remove redundant calls to
12539 build_type_variant and some duplicated code.
12540 * sig.c (build_signature_reference_type): Only take the type parm.
12541 (build_signature_pointer_type): Likewise.
12542 * tree.c (build_cplus_method_type): Adjust.
12543 * cp-tree.h: Update.
12545 1998-10-04 Mark Mitchell <mark@markmitchell.com>
12547 * call.c (build_over_call): Make pedwarns about dropped qualifiers
12548 into full-fledged errors.
12549 * cvt.c (convert_to_reference): Likewise.
12550 * typeck.c (convert_for_assignment): Likewise.
12552 * search.c (expand_upcast_vtables): In addition to unsetting
12553 TREE_READONLY, remove top-level const type qualifier.
12555 1998-10-03 Mark Mitchell <mark@markmitchell.com>
12557 * class.c (current_class_ptr, current_class_ref): Clarify
12559 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
12560 NOP type conversions.
12561 * decl.c (decls_match): Use comptypes directly; ignore
12562 qualifiers on the DECL.
12563 (duplicate_decls): Remove qualifier checks on DECL.
12564 (grokdeclarator): Make the type built up include top-level
12566 * decl2.c (do_dtors): Fix spelling error.
12567 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
12568 when printing type information.
12569 * init.c (build_new_1): Add documentation. Deal with the fact
12570 that type of allocated memory now contains qualifiers.
12571 * lex.c (is_global): Improve error-recovery.
12572 * sig.c (build_member_function_pointer): Don't cast away const
12573 on fields of sigtable_entry_type.
12574 * tree.c (lvalue_type): Don't look at top-level qualifiers on
12576 * typeck.c (decay_conversion): Likewise.
12577 (build_component_ref): Make sure the type of the COMPONENT_REF
12578 contains top-level qualifiers, as appropriate. Improve
12580 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
12581 (build_array_ref): Likewise.
12582 (build_unary_op): Improve error-recovery.
12583 (unary_complex_lvalue): Make taking the address a bound member
12584 function an error, not a sorry.
12585 (build_conditional_expr): Look at the type qualifiers, not the
12586 qualifiers on the expression itself.
12588 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
12590 * decl2.c (merge_functions): Remove duplicates.
12592 * decl2.c: Add -f{no-,}implicit-inline-templates.
12593 (import_export_decl): Check it.
12595 * decl.c (lookup_name_real): Template parms also take precedence
12596 over implicit typename. Only warn if yylex.
12598 * typeck.c (build_conditional_expr): Only fold if ifexp is an
12601 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
12602 instead of linkage.
12604 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
12606 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
12607 * class.c (build_vbase_pointer): Use it.
12608 * rtti.c (expand_class_desc): Likewise.
12609 * tree.c (build_vbase_pointer_fields): Likewise.
12611 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
12613 * decl.c (start_decl): Add invocation of
12614 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
12615 (start_function): Add invocation of
12616 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
12618 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
12619 HANDLE_GENERIC_PRAGMAS.
12621 1998-09-28 Anthony Green <green@cygnus.com>
12623 * semantics.c (finish_asm_stmt): Always permit volatile asms.
12625 1998-09-28 Mark Mitchell <mark@markmitchell.com>
12627 * decl.c (grokdeclarator): Tighten checks for invalid
12628 destructors. Improve error-messages and error-recovery.
12629 * decl2.c (check_classfn): Don't assume that mangled destructor
12630 names contain type information.
12632 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
12634 * search.c (get_base_distance): Remove assert.
12636 * decl2.c (build_anon_union_vars): Don't process a field with no
12638 (finish_anon_union): Also complain about local anon unions with no
12641 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
12643 * decl.c (lookup_namespace_name): If the name is a namespace,
12644 return it immediately.
12646 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12648 * cp-tree.h (define_case_label): Remove unused parameter.
12649 (check_java_method): Likewise.
12650 (grokclassfn): Likewise.
12651 (expand_aggr_init): Likewise.
12652 (build_x_delete): Likewise.
12653 (maybe_end_member_template_processing): Likewise.
12654 (unshare_base_binfos): Add prototype.
12655 (string_conv_p): Likewise.
12656 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
12658 * cvt.c (build_up_reference): Remove unused parameter
12659 `checkconst', all callers changed.
12660 (build_type_conversion): Mark parameter `code' with
12662 (build_expr_type_conversion): Initialize variable `conv'.
12664 * decl.c (push_namespace): Initialize variable `d'.
12665 (define_case_label): Remove unused parameter `decl', all callers
12668 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
12669 `argc' with ATTRIBUTE_UNUSED.
12670 (grokclassfn): Remove unused parameter `cname', all callers
12672 (check_java_method): Likewise for parameter `ctype'.
12673 (copy_assignment_arg_p): Mark parameter `virtualp' with
12675 (finish_prevtable_vardecl): Likewise for parameter `prev'.
12677 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
12679 * init.c (expand_aggr_init_1): Remove unused parameter
12680 `alias_this', all callers changed.
12681 (expand_aggr_init): Likewise.
12682 (expand_default_init): Likewise.
12683 (build_new_1): Initialize variable `susp'.
12684 (build_x_delete): Remove unused parameter `type', all callers
12687 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
12689 (readescape): Use (unsigned) value in shift.
12690 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
12691 comparing to a signed quantity.
12693 * pt.c (maybe_end_member_template_processing): Remove unused
12694 parameter `decl', all callers changed.
12695 (check_explicit_specialization): Add braces around empty body in
12697 (current_template_args): Initialize variable `args'.
12698 (lookup_template_class): Likewise for variable `prev_local_enum'.
12699 (tsubst_decl): Likewise for variable `r'.
12700 (set_mangled_name_for_template_decl): Initialize variable
12703 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
12704 Likewise for variable `i'.
12705 (yylex): Initialize variable `trrr'.
12707 * typeck.c (compparms): Mark variable `strict' with
12710 * xref.c (simplify_type): Cast argument of ctype function to
12713 1998-09-24 Mark Mitchell <mark@markmitchell.com>
12715 * cp-tree.h (language_lvalue_valid): Remove.
12716 * decl.c (grokdeclarator): Don't disallow references to functions.
12717 * tree.c (lvalue_p_1): New function, combining duplicated
12719 (lvalue_p): Use it.
12720 (real_lvalue_p): Likewise.
12721 * typeck.c (language_lvalue_valid): Remove.
12722 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
12723 they don't have TREE_READONLY set.
12724 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
12726 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
12728 * spew.c (yylex): Give diagnostic.
12729 * hash.h (is_reserved_word): Add export.
12730 * gxx.gperf: Likewise.
12731 * lex.h (rid): Add RID_EXPORT.
12732 * lex.c (init_parse): Likewise.
12734 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12736 * friend.c (do_friend): Make warning a full sentence.
12738 1998-09-22 Mark Mitchell <mark@markmitchell.com>
12740 * parse.y (component_decl_list): Improve error-recovery.
12742 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
12744 * decl.c (make_typename_type): Move error to point where name
12745 variable can be used by dump_type.
12747 1998-09-22 Mark Mitchell <mark@markmitchell.com>
12749 * decl.c (grokfndecl): Improve error-recovery.
12750 * decl2.c (grokfield): Likewise.
12751 * pt.c (finish_member_template_decl): Likewise.
12753 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
12755 * method.c (hack_identifier): Finding multiple members is always
12758 1998-09-21 Per Bothner <bothner@cygnus.com>
12760 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
12762 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
12764 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
12766 1998-09-20 Mark Mitchell <mark@markmitchell.com>
12768 * class.c (maybe_warn_about_overly_private_class): Reformat.
12770 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
12772 * exception.cc (__cplus_type_matcher): Realign some code.
12774 1998-09-16 Mark Mitchell <mark@markmitchell.com>
12776 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
12777 (tinfo2.o): Likewise.
12778 (exception.o): Likewise.
12780 (opnew.o): Likewise.
12781 (opnewnt.o): Likewise.
12782 (opvnew.o): Likewise.
12783 (opvnewnt.o): Likewise.
12784 (opdel.o): Likewise.
12785 (opdelnt.o): Likewise.
12786 (opvdel.o): Likewise.
12787 (opvdelnt.o): Likewise.
12789 1998-09-16 Richard Henderson <rth@cygnus.com>
12791 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
12793 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
12795 * call.c (build_field_call): Handle static data members too.
12797 * typeck.c (comptypes): When comparing pointer types, check
12798 whether referred types match even in strictest modes.
12800 1998-09-15 Mark Mitchell <mark@markmitchell.com>
12802 * cp-tree.h: Revert previous change.
12803 (finish_struct_methods): Remove declaration.
12804 * class.c: Revert previous change.
12805 (maybe_warn_about_overly_private_class): New function.
12806 (finish_struct_methods): Declare here, and make static. Remove
12807 unnecessary parameters. Tidy slightly. Use
12808 maybe_warn_about_overly_private_class.
12809 (finish_struct_1): Adjust. Remove check for private constructors,
12810 now done elsewhere.
12811 (finish_struct): Adjust.
12813 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
12815 * except.c (expand_start_catch_block): No need to check for new
12817 (process_start_catch_block_old): Deleted.
12818 (process_start_catch_block): Add call to start_decl_1().
12819 (expand_end_catch_block): Add call to end_catch_handler().
12820 * exception.cc (__cplus_type_matcher): Only check the exception
12821 language if there is an exception table.
12823 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
12825 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
12826 as used to prevent conflicts with virtual function tables.
12828 1998-09-14 Mark Mitchell <mark@markmitchell.com>
12830 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
12831 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
12832 * class.c (maybe_class_too_private_p): New function.
12833 (finish_struct_methods): Use it.
12834 (finish_struct_1): Likewise.
12835 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
12838 * pt.c (check_specialization_scope): Fix spelling error.
12839 (check_explicit_specialization): Remove code to handle explicit
12840 specializations in class scope; they are now correctly diagnosed
12843 1998-09-10 Mark Mitchell <mark@markmitchell.com>
12845 * decl.c (pushdecl): Don't copy types if the
12846 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
12849 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12851 * class.c (get_enclosing_class): New function.
12852 (is_base_of_enclosing_class): Likewise.
12853 * cp-tree.h (get_enclosing_class): Declare.
12854 (is_base_of_enclosing_class): Likewise.
12855 * pt.c (coerce_template_parms): Use them.
12857 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
12859 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
12860 null to decide whether to use it.
12862 * error.c (dump_type_real): Handle NAMESPACE_DECL.
12863 * parse.y (base_class.1): Avoid crash on error.
12865 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
12867 * decl.c (make_typename_type): If context is a namespace, the code
12870 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
12872 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
12874 1998-09-08 Mark Mitchell <mark@markmitchell.com>
12876 * cp-tree.h (anonymous_namespace_name): Declare.
12877 * decl.c: Define it.
12878 (push_namespace): Use anonymous_namespace_name, rather than local
12880 * error.c (dump_decl): If a namespace is named
12881 anonymous_namespace_name, call it {anonymous}.
12883 * decl.c (grokparms): Distinguish between references and pointers
12886 1998-09-08 Richard Henderson <rth@cygnus.com>
12887 Mark Mitchell <mark@markmitchell.com>
12889 * pt.c (process_partial_specialization): Consistently allocate
12890 and zero tpd.parms based on ntparms. Use tpd2.parms, not
12891 tpd.parms, where appropriate.
12893 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
12895 * Makefile.in (INCLUDES): Update after recent toplevel gcc
12898 1998-09-05 Mark Mitchell <mark@markmitchell.com>
12900 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
12901 * class.c (finish_struct): Remove hackery to deal with explicit
12902 specializations in class scope.
12903 * decl.c (grokfndecl): Improve error-recovery.
12904 * decl2.c (grokfield): Likewise.
12905 * pt.c (check_specialization_scope): New function.
12906 (begin_specialization): Call it.
12907 (process_partial_specialization): New function, split out from
12908 push_template_decl. Check partial specializations more
12910 (push_template_decl): Call it.
12911 (check_explicit_specialization): Don't attempt to handle explicit
12912 specializations in class scope.
12913 (template_parm_data): Document. Add current_arg and
12914 arg_uses_template_parms.
12915 (mark_template_parm): Set it.
12916 (tsubst_arg_types): Remove unused variable.
12917 * semantics.c (begin_class_definition): Tweak.
12919 1998-09-04 Mark Mitchell <mark@markmitchell.com>
12921 * inc/typeinfo (type_info::type_info(const char*)): Make
12924 * cp-tree.h (hash_tree_cons_simple): New macro.
12925 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
12926 (coerce_template_parms): Use make_temp_vec, instead of
12927 make_tree_vec. Document this behavior.
12928 (lookup_template_class): Likewise.
12929 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
12930 Remove dead code (and add assertion to check its deadness). Fix
12931 bug w.r.t. exception specifications.
12933 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
12935 * decl2.c (import_export_vtable): Always make artificials comdat.
12936 (import_export_decl): Likewise.
12937 * pt.c (mark_decl_instantiated): Likewise.
12939 1998-09-03 Mark Mitchell <mark@markmitchell.com>
12941 * cp-tree.h (finish_globally_qualified_member_call_expr):
12943 (finish_qualified_call_expr).
12944 * semantics.c: Likewise.
12945 * parse.y (primary): Use it.
12946 * method.c (hack_identifier): Remove redundant code.
12948 * init.c (resolve_offset_ref): Call convert_from_reference to
12949 handle members of reference type. Improve error recovery.
12951 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
12953 * cp-tree.h: Declare warn_nontemplate_friend.
12954 * decl2.c (lang_decode_option): Set.
12955 * lang-options.h: Add -Wnon-template-friend.
12956 * friend.c (do_friend): Use to toggle non-template function warning.
12958 1998-09-03 Mark Mitchell <mark@markmitchell.com>
12960 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
12961 corresponding INTEGER_CSTs when processing_template_decl.
12962 * pt.c (tsubst_enum): Tweak accordingly.
12964 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12966 * decl.c (pushdecl_class_level): Add warning here.
12969 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
12971 * cvt.c (convert_pointer_to_real): Tidy.
12972 * search.c (get_base_distance_recursive): Simplify.
12973 (get_base_distance): Likewise.
12975 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
12978 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
12980 * lex.c (check_newline): Call HANDLE_PRAGMA before
12981 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
12982 if unknown pragmas are encountered.
12983 (handle_sysv_pragma): Interpret return code from
12984 handle_pragma_token (). Return success/failure indication rather
12985 than next unprocessed character.
12986 (pragma_getc): New function: retrieves characters from the
12987 input stream. Defined when HANDLE_PRAGMA is defined.
12988 (pragma_ungetc): New function: replaces characters back into the
12989 input stream. Defined when HANDLE_PRAGMA is defined.
12991 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
12993 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
12994 * class.c (build_vtable_entry_ref): Likewise.
12996 1998-09-01 Mark Mitchell <mark@markmitchell.com>
12998 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
12999 * decl2.c (import_export_decl): Likewise.
13000 * pt.c (instantiate_decl): Use it.
13002 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
13004 * decl.c (lookup_name_real): Also do implicit typename thing for
13005 artificial TYPE_DECLs.
13006 * search.c (lookup_field): Likewise.
13007 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
13008 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
13009 (enter_scope_of): Extract type from implicit typename.
13010 (begin_class_definition): Likewise.
13011 * lex.c (identifier_type): Handle implicit typename when checking
13014 * cp-tree.h: Declare flag_strict_prototype.
13015 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
13016 -fstrict-prototype.
13017 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
13018 specified, set it to the value of pedantic.
13020 1998-09-01 Mark Mitchell <mark@markmitchell.com>
13022 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
13024 1998-08-31 Mark Mitchell <mark@markmitchell.com>
13026 * decl.c (finish_enum): Handle member enums of classes declared in
13027 template functions.
13029 * decl2.c (grok_x_components): Strip attributes before calling
13032 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
13034 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
13035 -fenum-int-equivalence and -fno-nonnull-objects.
13036 * class.c (check_for_override): Remove support for -fall-virtual.
13037 (finish_struct_1): Likewise.
13038 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
13039 * typeck.c (build_binary_op_nodefault): Likewise.
13040 * cvt.c (ocp_convert): Likewise.
13041 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
13042 * class.c (build_vbase_path): Likewise.
13044 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
13046 * Makefile.in (INTERFACE): New, set to 1.
13048 1998-08-30 Mark Mitchell <mark@markmitchell.com>
13050 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
13051 comparing with global_namespace.
13052 (dump_aggr_type): Likewise.
13054 * decl.c (grokfndecl): Issue error on declaration of friend
13055 templates with explicit template arguments.
13057 * pt.c (convert_template_argument): New function, split out
13059 (coerce_template_parms): Here.
13060 (tsubst): Attempt better error-recovery.
13062 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
13064 * pt.c (decl_template_parm_p): Add checks for
13065 TEMPLATE_TEMPLATE_PARM.
13067 1998-08-28 Mark Mitchell <mark@markmitchell.com>
13069 * lex.c (do_identifier): Fix thinko in previous change.
13071 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
13073 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
13074 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
13076 1998-08-28 Richard Henderson <rth@cygnus.com>
13078 Add support for discarding unused virtual functions.
13079 * lang-options.h: Add -fvtable-gc.
13080 * cp-tree.h: Add flag_vtable_gc.
13081 * decl2.c (output_vtable_inherit): New fn.
13082 (finish_vtable_vardecl): Call it.
13083 * class.c (build_vtable_entry_ref): New fn.
13084 (build_vtbl_ref): Call it.
13086 1998-08-28 Mark Mitchell <mark@markmitchell.com>
13088 * cp-tree.h (build_enumerator): Take the enumeration type as a
13090 * decl.c (finish_enum): Don't set the TREE_TYPE for the
13091 enumeration constant values if we're processing_template_decls.
13092 Don't set the type for the CONST_DECLs either; that's done in
13094 (build_enumerator): Take the enumeration type as a
13096 * lex.c (do_identifier): Don't resolve enumeration constants while
13097 processing template declarations, even if they happen to be
13098 TEMPLATE_PARM_INDEXs.
13100 * parse.y (current_enum_type): New variable.
13101 (primary): Don't allow statement-expression in local classes just
13102 as we don't in global classes.
13103 (structsp): Use current_enum_type.
13104 (enum_list): Likewise.
13105 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
13106 finish_enum; they no longer occur.
13108 * cp-tree.h (finish_base_specifier): New function.
13109 * parse.y (base_class): Use it.
13110 * semantics.c (finish_base_specifier): Define it.
13112 * parse.y (structsp): Warn on use of typename outside of template
13115 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
13117 * lex.c (handle_cp_pragma): Remove #pragma vtable.
13118 * lang-options.h: Remove +e options.
13119 * decl2.c (lang_decode_option): Likewise.
13120 (import_export_vtable): Don't check write_virtuals.
13121 (finish_vtable_vardecl, finish_file): Likewise.
13122 * search.c (dfs_debug_mark): Likewise.
13123 * semantics.c (begin_class_definition): Likewise.
13124 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
13126 * call.c (build_over_call): Check flag_elide_constructors.
13127 * decl2.c: flag_elide_constructors defaults to 1.
13128 * typeck.c (convert_arguments): Remove return_loc parm.
13129 (build_function_call_real): Adjust.
13131 * search.c: Tear out all mi_matrix and memoize code.
13132 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
13133 * lang-options.h: Remove documentation for -fhandle-exceptions,
13134 -fmemoize-lookups and -fsave-memoized.
13135 * cp-tree.h: Lose mi_matrix and memoize support.
13136 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
13137 * class.c: Lose struct class_level.
13138 (pushclass, popclass): Lose memoize support.
13139 * init.c (build_offset_ref): Likewise.
13141 Never change BINFO_INHERITANCE_CHAIN.
13142 * init.c (emit_base_init): Change modification of
13143 BINFO_INHERITANCE_CHAIN to an assert.
13144 * search.c (get_base_distance_recursive): Likewise.
13145 (get_base_distance): Likewise.
13146 (lookup_member): Likewise.
13147 (convert_pointer_to_single_level): Likewise.
13148 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
13149 (lookup_fnfields): Likewise.
13150 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
13151 (unshare_base_binfos): Don't call propagate_binfo_offsets.
13152 (layout_basetypes): Call propagate_binfo_offsets instead of
13153 unshare_base_binfos.
13154 * decl.c (xref_basetypes): Call unshare_base_binfos.
13155 * pt.c (instantiate_class_template): Likewise.
13156 * tree.c (reverse_path): Remove 'copy' parm; always make a
13158 * class.c (build_vbase_path): Just call it.
13159 * search.c (compute_access): Likewise. Don't re-reverse.
13161 1998-08-27 Mark Mitchell <mark@markmitchell.com>
13163 * class.c (build_vbase_path): Use reverse_path.
13164 (finish_base_struct): Move warnings for inaccessible bases to
13166 (modify_one_vtable): Remove check of TREE_USED (binfo).
13167 (fixup_vtable_deltas1): Likewise.
13168 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
13169 (xref_tag): Remove binfos parameter.
13170 (make_binfo): Remove chain parameter.
13171 (reverse_path): Add copy parameter.
13172 * decl.c (init_decl_processing): Change calls to xref_tag.
13173 (xref_tag): Remove binfos parameter.
13174 (xref_basetypes): Change calls to make_binfo.
13175 * decl2.c (grok_x_components): Change calls to xref_tag.
13176 (handle_class_head): Likewise.
13177 * friend.c (do_friend): Likewise.
13178 * lex.c (make_lang_type): Change calls to make_binfo.
13179 * parse.y (structsp): Change calls to xref_tag.
13180 (named_complex_class_head_sans_basetype): Likewise.
13181 (named_class_head): Likewise.
13182 * rtti.c (init_rtti_processing): Likewise.
13183 * search.c (compute_access): Change calls to reverse_path.
13184 (dfs_get_vbase_types): Change calls to make_binfo.
13185 (get_vbase_types): Remove dead code.
13186 * tree.c (unshare_base_binfos): Change calls to make_binfo.
13187 (layout_basetypes): Warn here about inaccessible bases.
13188 (make_binfo): Remove chain parameter.
13189 (reverse_path): Add copy parameter.
13191 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
13193 * class.c: #if 0 complete_type_p.
13194 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
13195 * method.c (process_overload_item): Likewise.
13196 * typeck.c (comp_target_types): Likewise.
13198 Stop sharing binfos for indirect virtual bases.
13199 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
13200 (layout_basetypes): Likewise.
13201 (unshare_base_binfos): Copy vbases, too.
13202 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
13203 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
13204 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
13205 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
13206 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
13207 reference to BINFO_VIA_PUBLIC.
13208 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
13209 (push_class_decls): Use them.
13210 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
13211 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
13213 1998-08-27 Mark Mitchell <mark@markmitchell.com>
13215 * decl.c (build_enumerator): Set DECL_CONTEXT for the
13218 1998-08-26 Mark Mitchell <mark@markmitchell.com>
13220 * cp-tree.h (finish_enum): Change prototype.
13221 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
13222 VALUES parameter. Don't try to compute mins/maxs if
13223 processing_template_decl.
13224 * parse.y (structsp): Use new calling sequence for finish_enum.
13225 * pt.c (tsubst_enum): Likewise. Take the new type as input.
13226 (lookup_template_class): Remove unused variables. Tweak.
13227 Register enums on instantiation list before substituting
13228 enumeration constants.
13229 (tsubst_decl): Remove unused variables.
13230 (regenerate_decl_from_template): Likewise.
13232 * decl.c (duplicate_decls): Don't obliterate the
13233 DECL_TEMPLATE_INFO for a template if we're not replacing it with
13236 * lex.c (do_identifier): Fix typo in comment.
13238 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13240 * errfn.c: Remove stdarg.h/varargs.h.
13241 * tree.c: Likewise.
13243 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
13245 * pt.c (tsubst_copy): Only do typename overloading on an
13246 IDENTIFIER_NODE that happens to look like a typename if it actually
13247 has a type for us to use.
13249 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
13251 * typeck.c (comp_cv_target_types): Split out...
13252 (comp_target_types): From here. Don't allow cv-qual changes under
13253 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
13254 (build_ptrmemfunc): Pass 1 to nptrs.
13255 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13257 1998-08-25 Mark Mitchell <mark@markmitchell.com>
13259 * search.c (dependent_base_p): Don't compare a binfo to
13260 current_class_type; use the TREE_TYPE of the binfo instead.
13262 * cp-tree.h (CLASS_TYPE_P): Revise definition.
13264 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
13266 * decl.c (duplicate_decls): Don't complain about different
13267 exceptions from an internal decl even if pedantic.
13269 * typeck.c (convert_for_assignment): Converting from pm of vbase
13270 to derived is an error, not a sorry.
13272 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
13273 * class.c (fixed_type_or_null): Rename from
13274 resolves_to_fixed_type_p. Return the dynamic type of the
13275 expression, if fixed, or null.
13276 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
13277 does not match the static type.
13278 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
13279 resolves_to_fixed_type_p again.
13281 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13283 * pt.c (tsubst_decl): Move special case code for dealing with
13284 tricky friend templates here from ...
13285 (regenerate_decl_from_template): Here.
13287 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13289 * decl.c (start_decl): Remove redundant linkage check.
13291 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
13293 * typeck.c (c_expand_return): Handle the case that valtype
13294 is wider than the functions return type.
13296 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13298 * cp-tree.h (CLASS_TYPE_P): New macro.
13299 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
13300 * pt.c (process_template_parm): Undo previous change.
13302 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
13304 * cp-tree.h: Declare.
13305 * pt.c (decl_template_parm_p): New function.
13306 * decl.c (pushdecl): Check decls for redeclaring template parms.
13307 (xref_tag): Make redeclaration an error, print decl.
13308 * decl2.c (grokfield): Check field_decls for redeclaration as well.
13310 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13312 * parse.y (primary): Fix up the type of string constants.
13314 1998-08-24 Mark Mitchell <mark@markmitchell.com>
13316 * typeck.c (convert_for_initialization): Move check for odd uses
13317 of NULL to avoid duplicate warnings.
13319 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
13321 * tree.c (lvalue_type): Fix for arrays.
13322 * typeck.c (string_conv_p): New fn.
13323 (convert_for_assignment): Use it.
13324 (build_unary_op): Use lvalue_type.
13325 * call.c (standard_conversion, convert_like): Use string_conv_p.
13326 (add_function_candidate): Use lvalue_type.
13327 * cvt.c (convert_to_reference): Likewise.
13328 * decl2.c (lang_decode_option): Ignore -traditional.
13329 * decl.c (init_decl_processing): flag_writable_strings inhibits
13330 flag_const_strings.
13332 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
13334 * lang-options.h (lang_options): Add fconst-strings to the list
13336 * decl2.c (lang_f_options, lang_decode_option): Likewise.
13338 1998-08-24 Nathan Sidwell <nathan@acm.org>
13340 * lex.c (real_yylex): Don't warn about long long constants if
13341 we're allowing long long.
13343 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
13345 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
13346 accessing bindings directly.
13348 * search.c (my_tree_cons): Reimplement.
13350 * lang-specs.h: Remove __HONOR_STD.
13351 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
13353 1998-08-23 Mark Mitchell <mark@markmitchell.com>
13355 * decl.c (grokdeclarator): Complain about in-class initialization
13356 of aggregates and/or references.
13357 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
13358 TEMPLATE_TYPE_PARMs.
13360 * decl2.c (grok_array_decl): Add comment.
13361 (mark_used): Don't instantiate an explicit instantiation.
13362 * friend.c (make_friend_class): Remove bogus comment. Fix check
13363 for partial specializations.
13364 * pt.c (check_explicit_specialization): Don't
13365 SET_DECL_EXPLICIT_INSTANTIATION here.
13366 (mark_decl_instantiated): Or here.
13367 (do_decl_instantiation): Do it here, instead. Add checks for
13368 duplicate explicit instantiations, etc. Tidy.
13369 (do_type_instantiation): Likewise.
13370 (instantiate_decl): Improve comments. Complain about explicit
13371 instantiations where no definition is available.
13373 * cp-tree.h (ansi_null_node): Remove.
13374 * call.c (build_over_call): Warn about converting NULL to an
13376 * cvt.c (build_expr_type_conversion): Likewise. Use
13377 null_ptr_cst_p instead of expanding it inline.
13378 * decl.c (ansi_null_node): Remove.
13379 (init_decl_processing): Make null_node always have integral type.
13380 * except.c (build_throw): Warn about converting NULL to an
13382 * lex.c (init_parse): Remove handling of ansi_null_node.
13383 * pt.c (type_unification_real): Don't convert NULL to void* type.
13384 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
13385 (convert_for_assignment): Warn about converting NULL to an
13387 (convert_for_initialization): Likewise.
13389 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
13391 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
13392 * pt.c (coerce_template_parms): Use no_linkage_check.
13393 * decl.c (grokvardecl): Likewise.
13394 (grokfndecl): Likewise. Members of anonymous types have no linkage.
13396 * method.c (process_overload_item): Remove useless code.
13398 1998-08-20 Per Bothner <bothner@cygnus.com>
13400 Handle new'ing of Java classes.
13401 * init.c (build_class_classref): New function.
13402 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
13403 constructor does not return this; don't need to exception-protect.
13405 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
13406 * decl2.c (acceptable_java_type): Handle template-derived types.
13408 1998-08-20 Per Bothner <bothner@cygnus.com>
13410 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
13412 1998-08-20 Mark Mitchell <mark@markmitchell.com>
13414 * decl.c (duplicate_decls): Always merge the old and new patterns
13415 for templates, regardless of whether or not the new one has
13416 DECL_INITIAL. Don't throw away specializations. Merge
13418 * pt.c (tsubst_decl): Use the right pattern when calculating the
13419 complete args for a new template instance.
13420 (do_decl_instantiation): Fix typo in comment.
13421 (regenerate_decl_from_template): Deal with tricky friend template
13423 (instantiate_decl): Likewise.
13425 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
13427 * init.c (build_builtin_delete_call): Add missing assemble_external
13430 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
13432 * parse.y (notype_unqualified_id): Also accept ~A<int>.
13434 1998-08-19 Mark Mitchell <mark@markmitchell.com>
13436 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
13438 * except.c (build_throw): Warn when NULL is thrown, even with
13439 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
13442 * cp-tree.h (ansi_null_node): New variable.
13443 * decl.c (ansi_null_node): New variable.
13444 (init_decl_processing): Initialize its type.
13445 * lex.c (init_parse): Initialize its value. Use ansi_null_node
13446 for null_node in non-ANSI mode.
13447 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
13448 place of null_node to avoid spurious errors.
13450 1998-08-17 Mark Mitchell <mark@markmitchell.com>
13452 * cp-tree.h (enter_scope_of): New function.
13453 * parse.y (complex_direct_notype_declarator): Use it.
13454 * semantics.c (enter_scope_of): New function.
13456 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
13458 * decl.c (grokparms): No, here.
13460 * decl.c (grokdeclarator): Catch parm with pointer to array of
13461 unknown bound here...
13462 * method.c (process_overload_item): ...not here.
13464 * gxxint.texi: Remove obsolete documentation of overloading code.
13466 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
13467 * class.c (finish_struct_bits): Likewise.
13469 * tree.c (lvalue_type): Fix for arrays.
13470 * typeck.c (build_unary_op): Use lvalue_type.
13471 * call.c (add_function_candidate): Likewise.
13472 * cvt.c (convert_to_reference): Likewise.
13474 * decl2.c (lang_decode_option): Ignore -traditional.
13476 * init.c (build_offset_ref): Don't mess with error_mark_node.
13477 * lex.c (do_scoped_id): Use cp_error.
13479 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
13481 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
13483 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
13485 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
13487 * cp-tree.h (set_identifier_local_value): Provide prototype.
13489 * decl2.c (do_namespace_alias): Remove unused variables `binding'
13492 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
13494 * Makefile.in: Rename BBISON to BISON so that it can be properly
13495 inherited from the parent makefile.
13497 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
13499 * lang-options.h: Add -finit-priority.
13500 * decl2.c: Likewise. Check flag_init_priority instead of
13503 * decl2.c (setup_initp): New fn.
13504 (start_objects, finish_objects, do_ctors): Handle init_priority.
13505 (do_dtors, finish_file): Likewise.
13507 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
13509 * pt.c (tsubst_copy): Hush warning.
13511 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
13513 1998-08-12 Mark Mitchell <mark@markmitchell.com>
13515 * pt.c (print_template_context): Don't abort when instantiating a
13516 synthesized method.
13518 * decl.c (grokdeclarator): Issue errors on namespace qualified
13519 declarators in parameter lists or in class scope.
13521 1998-08-09 Mark Mitchell <mark@markmitchell.com>
13523 * pt.c (check_explicit_specialization): Don't abort on bogus
13524 explicit instantiations.
13526 1998-08-07 Mark Mitchell <mark@markmitchell.com>
13528 * typeck.c (require_complete_type): Use complete_type_or_else.
13529 (complete_type_or_else): Always return NULL_TREE on failure, as
13532 * pt.c (tsubst_aggr_type): Prototype.
13533 (tsubst_decl): New function, split out from tsubst. Set
13534 input_filename and lineno as appropriate.
13535 (pop_tinst_level): Restore the file and line number saved in
13537 (instantiate_class_template): Set input_filename and lineno as
13539 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
13540 context for a TYPENAME_TYPE is complete.
13542 * decl2.c (grokbitfield): Issue errors on bitfields declared with
13544 (do_dtors): As in do_ctors, pretend to be a member of the same
13545 class as a static data member while generating a call to its
13548 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
13549 conversions, even in complex virtual base class hierarchies.
13551 1998-08-06 Mark Mitchell <mark@markmitchell.com>
13553 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
13554 (TYPE_TEMPLATE_INFO): Likewise.
13555 (SET_TYPE_TEMPLATE_INFO): Likewise.
13556 (ENUM_TI_TEMPLATE): Likewise.
13557 (ENUM_TI_ARGS): Likewise.
13558 (lookup_nested_type_by_name): Remove.
13559 * decl.c (maybe_process_template_type_declaration): Handle enums.
13560 (start_enum): Don't check for primary-template enum declarations
13562 (finish_enum): Clean up, document. Make sure template enum
13563 constants get the correct type.
13564 (build_enumerator): Copy initializers for template enumerations,
13566 (grok_enum_decls): Document.
13567 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
13568 better. Build LOOKUP_EXPRs for local variables, even if they are
13570 * pt.c (tsubst_enum): Remove field_chain parameter.
13571 (template_class_depth): Include the depth of surrounding function
13573 (push_template_decl): Check for primary-template enum declarations
13574 here. Deal with enumeration templates.
13575 (lookup_template_class): Likewise.
13576 (for_each_template_parm): Likewise.
13577 (instantiate_class_template): Don't call tsubst_enum directly,
13578 call tsubst instead, to instantiate enums. Deal with all
13579 field_chain issues here, not in tsubst_enum.
13580 (lookup_nested_type_by_name): Remove.
13581 (tsubst_aggr_type): Revise handling of enumeration types.
13582 (tsubst): Likewise.
13583 (tsubst_copy): Likewise.
13584 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
13586 1998-08-04 Mark Mitchell <mark@markmitchell.com>
13588 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
13589 uses template parameters.
13590 * method.c (build_template_parm_names): Use the full set of
13591 template arguments for tsubst'ing.
13592 (build_overload_identifier): Pass the full set of template
13593 arguments to build_template_parm_names, not just the
13595 * pt.c (TMPL_ARGS_DEPTH): Define using
13596 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
13597 (NUM_TMPL_ARGS): New macro.
13598 (add_outermost_template_args): Deal with the case where the outer
13599 args will be completely discarded.
13600 (coerce_template_parms): Use the full set of template arguments
13601 for tsubst'ing. Simplify. Add some asserts. Improve
13603 (lookup_template_class): Pass the full set of template arguments
13604 to coerce_template_parms.
13605 (tsubst): Add assertion.
13606 (do_type_instantiation): Don't instantiate member template
13609 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
13610 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
13612 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
13614 * method.c (set_mangled_name_for_decl): Change return type to void.
13616 * decl.c (lookup_name_real): A namespace-level decl takes priority
13617 over implicit typename. Avoid doing the same lookup twice.
13619 * search.c (dependent_base_p): New fn.
13620 (dfs_pushdecls, dfs_compress_decls): Use it.
13622 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
13623 virtual functions if the type doesn't have any.
13625 1998-08-03 Mark Mitchell <mark@markmitchell.com>
13627 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
13628 uses template parameters.
13630 1998-08-02 Mark Mitchell <mark@markmitchell.com>
13632 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
13633 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
13634 * lex.c (do_identifier): Don't use a second argument, or a type,
13635 when building LOOKUP_EXPRs.
13636 (do_identifier): Likewise.
13637 (do_scoped_id): Likewise.
13638 * method.c (hack_identifier): Improve error message.
13639 * pt.c (lookup_template_function): Don't needlessly call
13640 copy_to_permanent or build_min.
13641 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
13643 (do_decl_instantiation): Improve error message.
13644 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
13645 (build_min): Copy the type to the permanent obstack, too.
13647 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
13649 * init.c (init_init_processing): Remove BI* handling.
13650 (build_builtin_call): Remove.
13651 (build_builtin_delete_call): New fn.
13652 (build_delete): Use it.
13654 1998-07-31 Mark Mitchell <mark@markmitchell.com>
13656 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
13657 (maybe_check_template_type): New function.
13658 * decl.c (maybe_process_template_type_declaration): New function,
13659 split out from pushtag Call maybe_check_template_type.
13660 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
13661 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13662 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13663 * pt.c (template_class_depth_real): Generalization of ...
13664 (template_class_depth): Use it.
13665 (register_specialization): Use duplicate_decls for duplicate
13666 declarations of specializations.
13667 (maybe_check_template_type): New function.
13668 (push_template_decl_real): Fix comment.
13669 (convert_nontype_argument): Likewise.
13670 (lookup_template_class): Likewise. Avoid an infinite loop on
13672 (tsubst_friend_function): Fix comment.
13673 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
13674 an IDENTIFIER_NODE.
13675 * semantics.c (begin_function_definition): Use
13676 reset_specialization to note that template headers don't apply
13677 directly to declarations after the opening curly for a function.
13679 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
13681 * decl.c (push_overloaded_decl): Use current_namespace instead of
13682 DECL_CONTEXT (decl) to determine where we go.
13684 * decl.c (lookup_name_real): Fix typo.
13686 1998-07-28 Mark Mitchell <mark@markmitchell.com>
13688 * friend.c (is_friend): Be lenient with member functions to deal
13689 with nested friends.
13691 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
13693 * class.c (finish_struct_1): Convert integer_zero_node to
13694 ssizetype before passing it to set_rtti_entry.
13695 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
13696 of any size to a pointer.
13698 1998-07-27 Mark Mitchell <mark@markmitchell.com>
13700 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
13701 (build_template_decl_overload): Remove.
13702 (set_mangled_name_for_decl): New function.
13703 (innermost_args): Remove is_spec parameter.
13704 (most_specialized, most_specialized_class): Remove declarations.
13705 (lookup_template_class): Add entering_scope parameter.
13706 (maybe_process_partial_specialization): New function.
13707 (finish_template_decl): Likewise.
13708 (finish_template_type): Likewise.
13709 * class.c (finish_struct): Clean up processing of member template
13711 * decl.c (pushtag): Fix formatting.
13712 (lookup_tag): Improve handling of pseudo-global levels.
13713 (make_typename_type): Adjust call to lookup_template_class.
13714 (shadow_tag): Use maybe_process_partial_specialization.
13715 (xref_tag): Improve handling of member friends.
13716 (start_function): Call push_nested_class before
13717 push_template_decl. Don't call push_template_decl for
13719 * decl2.c (grok_x_components): Don't call xref_tag for
13720 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
13721 (grokclassfn): Use set_mangled_name_for_decl.
13722 (arg_assoc_class): Adjust call to innermost_args.
13723 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
13724 * error.c (dump_function_name): Improve printing of template
13726 * friend.c (is_friend): Don't compare types of decls to determine
13727 friendship, unless flag_guiding_decls.
13728 (make_friend_class): Partial specializations cannot be friends.
13729 (do_friend): Use set_mangled_name_for_decl. Call
13730 push_template_decl_real instead of push_template_decl.
13731 * method.c (build_decl_overload_real): Remove prototype. Give it
13733 (build_overload_identififer): Adjust call to innermost_args.
13734 (build_template_decl_overload): Remove.
13735 (set_mangled_name_for_decl): New function.
13736 * parse.y (.finish_template_type): New non-terminal.
13737 (template_def): Use finish_template_decl. Use template_extdef
13739 (template_extdef, template_datadef): New non-terminals, containing
13740 only those rules for things which can be templates.
13742 (template_type, self_template_type): Use .finish_template_type.
13743 (named_class_head): Use maybe_process_partial_specialization.
13744 * pt.c (mangle_class_name_for_template): Remove context parameter.
13745 (get_class_bindings): Remove outer_args parameter.
13746 (complete_template_args): Remove.
13747 (add_outermost_template_args): New function.
13748 (register_specialization): Return the specialization.
13749 (unregister_specialization): New function.
13750 (tsubst_template_parms): Likewise.
13751 (most_specialized, most_specialized_class): Prototype here as
13753 (original_template): Rename to most_general_template.
13754 (tsubst_template_parms): New function.
13755 (set_mangled_name_for_template_decl): Likewise.
13756 (TMPL_ARGS_DEPTH): New macro.
13757 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
13758 (TMPL_ARGS_LEVEL): New macro.
13759 (SET_TMPL_ARGS_LEVEL): Likewise.
13760 (TMPL_ARG): Likewise.
13761 (SET_TMPL_ARG): Likewise.
13762 (TMPL_ARGS_DEPTH): Likewise.
13763 (finish_member_template_decl): Use finish_template_decl.
13764 (maybe_process_partial_specialization): New function, split out
13766 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
13767 (maybe_begin_member_template_processing): Use new macros.
13768 (is_member_template): Likewise.
13769 (is_member_template_class): Likewise.
13770 (add_to_template_args): Likewise. Deal with multiple levels of
13772 (maybe_process_partial_specialization): New function.
13773 (retrieve_specialization): Add consistency check.
13774 (determine_specialization): Return full argument list.
13775 (check_explicit_specialization): Tweak friend handling. Use full
13776 argument lists. Simplify.
13777 (current_template_args): Use new macros.
13778 (push_template_decl_real): Change ill-named mainargs to specargs.
13779 Check that a partial specialization actually specializes at least
13780 one parameter. Improve friend handling. Modify for full
13781 template arguments.
13782 (classtype_mangled_name): Don't mangle the names of
13784 (lookup_template_class): Add entering_scope parameter. Use it to
13785 avoid finding a template type when an instantiation is required.
13786 Simplify. Use full template arguments.
13787 (tsubst_friend_function): Use unregister_specialization. Use new
13788 macros. Use full template arguments.
13789 (tsubst_friend_class): Substitute, using tsubst_template_parms,
13790 into the template parameters before passing them to
13791 redeclare_class_template.
13792 (instantiate_class_template): Simplify. Use full template
13793 arguments. Adjust calls to get_class_bindings. Use
13794 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
13795 (innermost_args): Use new macros.
13796 (tsubst_aggr_type): New function, split out from tsubst.
13797 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
13798 conventions for lookup_template_class. Refine handling of partial
13799 instantiations. Remove calls to complete_template_args.
13800 Simplify. Add consistency checks. Use set_mangled_name_for_decl
13801 and set_mangled_name_for_template_decl.
13802 (tsubst_copy): Use tsubst_aggr_type.
13803 (instantiate_template): Use full template arguments.
13804 (more_specialized): Improve formatting.
13805 (more_specialized_class): Adjust calls to get_class_bindings.
13806 (get_bindings_real): Don't call complete_template_args.
13807 (most_specialized): Don't overwrite input; create a new list.
13808 (most_specialized_class): Use most_general_template.
13809 (regenerate_decl_from_template): Use unregister_specialization.
13810 Use full template arguments.
13811 (instantiate_decl): Use full template arguments.
13812 (set_mangled_name_for_template_decl): New function.
13813 * semantics.c (begin_class_definition): Use
13814 maybe_process_partial_specialization.
13815 (finish_member_class_template): New function.
13816 (finish_template_decl): Likewise.
13817 (finish_template_type): Likewise.
13818 (typeck.c): Don't crash after issuing a compiler_error.
13819 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
13821 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
13823 * typeck2.c (build_functional_cast): Handle default-initialization.
13825 * call.c (build_over_call): Pass 1 to popclass.
13827 * parse.y (direct_notype_declarator): Add precedence declaration
13828 to notype_unqualified_id case.
13829 * Makefile.in (EXPECT): Adjust.
13831 * tree.c (ovl_member): Fix for single function in OVL.
13833 1998-07-27 Dave Brolley <brolley@cygnus.com>
13835 * c-lex.c (yylex): Fix boundary conditions in character literal and
13836 string literal loops.
13838 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
13840 * decl.c (lookup_name_real): OK, do return the from_obj value
13841 unless got_object depends on template parms.
13843 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
13845 * pt.c (coerce_template_parms): Also complain about local enums.
13847 * cp-tree.h: Add prototype for set_identifier_local_value.
13848 * decl.c (set_identifier_local_value_with_scope): Make static,
13850 * search.c (covariant_return_p): Likewise.
13851 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
13853 * call.c (build_method_call): Only pull out the type of a destructor
13854 if it's a template type parm.
13855 * decl.c (lookup_name_real): Never return the from_obj value.
13857 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
13859 * except.c (process_start_catch_block_old): Call start_decl_1 for
13861 * decl.c (start_decl_1): Avoid duplicate error.
13863 * init.c (expand_default_init): Only perform the initialization if
13864 it will do something.
13866 1998-07-23 H.J. Lu (hjl@gnu.org)
13868 * parse.y (base_class): Check for invalid base class.
13870 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
13872 * decl2.c (import_export_template): Fold in...
13873 (import_export_class): ...to here. Handle dllimport/export.
13875 * class.c (build_vtable): Pass at_eof to import_export_vtable.
13876 (prepare_fresh_vtable): Likewise.
13877 * decl2.c (import_export_class): Split out...
13878 (finish_prevtable_vardecl): From here.
13879 * class.c (finish_struct_1): Call import_export_class if at_eof.
13881 * decl.c (start_function): #if 0 mysterious code I wrote and have
13883 * rtti.c (get_tinfo_fn): If this is for a class type, set
13886 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
13888 * inc/exception: Change terminate and unexpected to ().
13890 * parse.y (named_class_head_sans_basetype_defn): A
13891 named_class_head_sans_basetype followed by '{' or ':' is a defn.
13893 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
13895 * tree.c (canonical_type_variant): New fn to handle arrays.
13896 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
13897 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
13898 * method.c (process_overload_item): Use build_overload_value for
13901 1998-07-20 Dave Brolley <brolley@cygnus.com>
13903 * lex.c (mbchar.h): #include it.
13904 (GET_ENVIRONMENT): New macro.
13905 (init_parse): Set character set based on LANG environment variable.
13906 (real_yylex): Handle multibyte characters in character literals.
13907 (real_yylex): Handle multibyte characters in string literals.
13909 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
13911 * lex.c (do_identifier): Look for class value even if we don't
13912 have a global value. Do implicit declaration if parsing is 2.
13913 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
13916 1998-07-19 Mark Mitchell <mark@markmitchell.com>
13918 * decl.c (pushtag): Revert previous change.
13919 * pt.c (lookup_template_class): Don't put out debugging
13920 information for types that use template parameters.
13922 * decl.c (pushtag): Don't put out debugging information for
13923 compiler-generated typedefs.
13925 * error.c (dump_type_real): Don't crash when presented with
13926 intQI_type_node or the like.
13928 * semantics.c (finish_translation_unit): Fix spelling error in
13931 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
13933 * decl.c (lookup_name_real): Pull out single function here.
13934 (select_decl): Not here.
13935 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
13937 * decl.c (qualify_lookup): Tweak again.
13939 * pt.c (lookup_template_class): Don't mess with the context of the
13941 * decl2.c (current_decl_namespace): Remove special handling for
13944 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
13945 a member template specialization.
13947 * tree.c (ovl_member): Use decls_match to compare functions.
13948 * decl.c (decls_match): Check the context of a function.
13950 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
13951 in Koenig lookup support rules.
13952 * semantics.c (finish_call_expr): Handle the new cases.
13954 * typeck.c (build_x_function_call): Handle overloaded methods.
13956 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
13958 1998-07-16 Mark Mitchell <mark@markmitchell.com>
13960 * semantics.c (finish_object_call_expr): Revert previous change.
13961 * call.c (build_new_method_call): Likewise. Instead, convert
13962 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
13964 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
13966 * decl.c (qualify_lookup): Handle templates.
13968 * decl2.c (do_using_directive): Don't pass ancestor.
13969 * decl.c (push_using_directive): Calculate ancestor.
13971 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
13972 * decl.c (pushdecl): Move type shadowing handling from here...
13973 (duplicate_decls): ...to here.
13974 * decl.c (set_identifier_local_value_with_scope): New fn.
13975 (pushdecl): Use it.
13976 (set_identifier_local_value, lookup_type_current_level): New fns.
13977 * decl2.c (do_local_using_decl): Handle types and binding level
13980 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
13981 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
13982 (lookup_namespace_name): Likewise.
13983 * typeck.c (build_unary_op): Not here anymore.
13985 * decl2.c (do_class_using_decl): Make sure we get an identifier.
13986 * class.c (handle_using_decl): Ignore TYPE_DECLs.
13988 * decl.c (qualify_lookup): New fn.
13989 (lookup_name_real): Use it.
13991 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
13993 * decl2.c (add_using_namespace): When directly using a namespace
13994 that was indirect before, promote it.
13996 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
13997 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
13998 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
13999 * decl.c (select_decl): Replace two flag parameters by one.
14000 (unqualified_namespace_lookup): Likewise, pass flag.
14001 (lookup_flags): New function.
14002 (lookup_name_real): Compute flags, pass them.
14003 (lookup_namespace_name): Call with zero-flag.
14004 * decl2.c (ambiguous_decl): Add flag parameter, complain only
14005 according to flags.
14006 (lookup_using_namespace, qualified_lookup_using_namespace):
14007 Add flag parameter, pass them through.
14008 * lex.c (do_scoped_id): Call with zero-flag.
14010 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
14012 * typeck.c (convert_for_assignment): Use comptypes.
14014 1998-07-16 Mark Mitchell <mark@markmitchell.com>
14016 * semantics.c (finish_object_call_expr): Move test for the
14017 function called being a TYPE_DECL to ...
14018 * call.c (build_new_method_call): Here.
14020 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
14022 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
14023 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
14025 * lex.c (looking_for_typename): Don't initialize.
14027 * decl2.c (ambiguous_decl): Clarify error message.
14029 * decl.c (push_using_directive): Iterate over namespaces used
14032 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14034 * decl2.c (add_using_namespace): Iterate over namespaces used
14037 * decl.c (lookup_name_real): Accept namespace aliases as locals.
14038 (cat_namespace_levels): Ignore aliases.
14039 (duplicate_decls): Ignore duplicate aliases.
14040 * decl2.c (do_namespace_alias): Process block level namespace
14041 aliases. Store alias with pushdecl. Remove odr errors.
14042 * parse.y (namespace_alias): New non-terminal.
14045 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
14047 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
14048 Handle TEMPLATE_TYPE_PARM.
14049 (arg_assoc): Rewrite.
14051 * pt.c (complete_template_args): Don't look at the context unless
14054 * method.c (build_decl_overload_real): Fix namespace handling.
14056 * typeck.c (build_unary_op): Extract a lone function from an
14059 * call.c (build_scoped_method_call): Handle getting a namespace
14060 for basetype in a destructor call.
14061 (check_dtor_name): Handle enums.
14063 * parse.y (using_directive): New nonterminal.
14064 (extdef, simple_stmt): Use it.
14066 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
14068 * decl2.c (add_function): Move error message ...
14069 (arg_assoc_namespace): ... from here.
14071 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
14073 * parse.y (namespace_qualifier): Fix multiple level handling.
14074 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
14075 (arg_assoc): Don't skip the first argument of a function.
14077 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
14079 * search.c (my_tree_cons): Clean up.
14081 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
14083 * call.c (joust): Don't warn about "confusing" conversions to the
14086 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
14088 * class.c (push_nested_class): Complain about namespaces.
14089 * decl.c (start_decl): Enter the object's namespace.
14090 (cp_finish_decl): Leave it.
14091 (grokdeclarator): Likewise.
14092 * decl2.c (check_decl_namespace): New function.
14093 (finish_file): Call it.
14094 * parse.y (complex_direct_notype_declarator): Set complexity
14095 of namespace-qualified ids to -1, enter the namespace.
14097 * method.c (build_template_decl_overload): Expect _DECL as first
14098 parameter. Put context temporarily into current_namespace.
14099 * pt.c (check_explicit_specialization): Change caller.
14100 (tsubst): Likewise.
14102 * init.c (build_offset_ref): Call mark_used and
14103 convert_from_reference for namespace members.
14105 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
14107 * search.c (my_tree_cons): The bitfield is at index 2.
14109 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
14111 * lang-options.h: Format changed to work with new --help support
14114 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
14116 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
14117 Do Koenig lookup in CALL_EXPR.
14118 (arg_assoc): Handle error_mark.
14119 * lex.c (is_global): New function.
14120 (do_identifier): Expect arguments for Koenig lookup.
14121 * parse.y (primary): Add rules for calls of unqualified function calls.
14122 (do_id): Change call of do_identifier.
14123 * pt.c (finish_stmt_expr): Likewise.
14124 * semantics.c (finish_id_expr): Likewise.
14125 (finish_call_expr): Add integer parameter to indicate
14126 argument-dependent lookup.
14128 * decl.c (struct binding_level): New field using_directives.
14129 (push_using_decl): Not sorry anymore.
14130 (push_using_directive): New function.
14131 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
14132 (unqualified_namespace_lookup): New function, code from ...
14133 (lookup_name_real): ... here.
14134 * decl2.c (lookup_using_namespace): Pass using list instead of
14136 (validate_nonmember_using_decl): New function.
14137 (do_nonmember_using_decl): New function.
14138 (do_toplevel_using_decl): Use them.
14139 (do_local_using_decl): New function.
14140 (do_using_directive): Support block-level directives.
14141 * parse.y (simple_stmt): Support using declarations and
14143 (namespace_qualifier, namespace_using_decl): New non-terminals.
14145 * xref.c (classname): New function.
14146 (GNU_xref_hier): Change class and base parameters to tree.
14147 * decl.c (xref_baseypes): Change caller.
14148 * friend.c (make_friend_class): Likewise.
14150 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14152 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
14155 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
14156 template template parameter, record its use.
14157 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
14158 its template arguments if exists.
14160 * pt.c (coerce_template_template_parms): New function equivalent
14161 to coerce_template_parms when IS_TMPL_PARM is true.
14162 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
14163 all callers changed.
14165 (coerce_template_parms): Access ARGLIST properly when creating a
14166 new vector. Only accept implicit TYPE_DECL as valid argument for
14167 a template template parameter when it is a base class of
14168 current_class_type. Don't display error message when COMPLAIN is
14171 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
14173 * repo.c (get_base_filename): Use file_name_nondirectory.
14174 (open_repo_file): Likewise.
14175 * cp-tree.h (file_name_nondirectory): Add prototype.
14177 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
14179 * friend.c (do_friend): Pull the identifier out of declarator.
14180 Use cp_error and friends.
14181 * decl2.c (qualified_lookup_using_namespace): Fix call to
14183 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
14184 (grokvardecl): Use DECL_CLASS_SCOPE_P.
14185 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
14186 * class.c (warn_hidden): Fix for OVERLOAD.
14187 From grahams@rcp.co.uk:
14188 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
14189 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
14191 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
14193 * g++.1 (-traditional): Remove duplicated documentation.
14195 1998-07-11 Mark Mitchell <mark@markmitchell.com>
14197 * method.c (flush_repeats): Add nrepeats parameter.
14198 (issue_nrepeats): Likewise.
14199 (is_back_referenceable_type): New function. Don't back-reference
14200 TEMPLATE_TYPE_PARMs as well as simple types like integers.
14201 (build_mangled_name_for_type): Likewise.
14202 (build_mangled_name_for_type_with_Gcode): Likewise.
14203 (lasttype): Remove.
14204 (nrepeats): Likewise.
14205 (Nrepeats): Likewise.
14206 (start_squangling): Don't clear the variables removed above.
14207 (end_squangling): Likewise.
14208 (flush_repeats): Tidy. Use nrepeats parameter rather than
14210 (issue_nrepeats): Likewise, but with nrepeats global. Use
14211 is_backreferenceable_type.
14212 (build_overload_nested_name): Tidy. Add comment. Use
14213 build_mangled_name_for_type.
14214 (build_underscore_int): Comment.
14215 (build_overload_scope_ref): Use build_mangled_name_for_type.
14216 (build_overload_int): Likewise.
14217 (build_template_template_parm_names): Tidy.
14218 (build_template_parm_names): Use build_mangled_name_for_type.
14219 (build_overload_identifier): Add comments.
14220 (build_mangled_name_for_type_with_Gcode): Split out from
14221 build_mangled_name.
14222 (build_mangled_name_for_type): Use it.
14223 (build_mangled_name): Rework to use build_mangled_name_for_type
14224 and to not use global nrepeats/Nrepeats. Tidy.
14225 (process_modifiers): Tidy.
14226 (check_btype): Use is_backreferenceable_type. Add comment.
14227 Rename `node' to `type'.
14228 (process_overload_item): Set numeric_output_need_bar here.
14229 Use build_mangled_name_for_type. Tidy.
14230 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
14231 build_mangled_name_for_type.
14233 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
14236 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
14238 * cp-tree.h (warn_long_long): Define.
14239 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
14240 warning "ANSI C++ does not support `long long'".
14241 * decl2.c (warn_long_long): Define.
14242 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
14244 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
14246 * decl.c (xref_tag): Handle attributes between 'class' and name.
14247 * parse.y (aggr): Likewise.
14248 * semantics.c (finish_class_definition): Likewise.
14249 * Makefile.in (EXPECTED): Adjust.
14251 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
14252 * decl2.c: Define them.
14253 (lang_decode_option): Handle them.
14254 * lang-options.h: Add -foptional-diags.
14255 * class.c (finish_struct): Don't complain about multiple meanings of
14256 name if -fno-optional-diags.
14257 * decl.c (pushdecl_class_level): Likewise.
14258 * lex.c (real_yylex): Check warn_multichar.
14260 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
14262 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
14264 * tree.c (make_binfo): Fix length.
14266 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
14268 * decl2.c (lang_decode_option): Remove warn_template_debugging.
14269 * lang-options.h: Likewise.
14271 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14273 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
14274 (process_start_catch_block): Likewise for variables
14275 `false_label_rtx', `call_rtx' and `return_value_rtx'.
14277 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
14279 * tree.c (build_srcloc): Make sure we allocate this node on the
14282 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
14284 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
14285 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
14286 (lang_specific_driver): Only add -lm automatically if need_math is
14289 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
14291 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
14293 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14295 * Makefile.in (EXPR_H): New dependency variable.
14296 (decl2.o): Depend on $(EXPR_H).
14297 (typeck.o): Likewise.
14298 (init.o): Likewise.
14299 (expr.o): Likewise.
14301 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
14303 * decl.c (start_enum): Put local enums on permanent_obstack.
14305 1998-06-25 Mark Mitchell <mark@markmitchell.com>
14307 * cp-tree.h (c_get_alias_set): Declare.
14308 * decl.c (init_decl_processing): Set lang_get_alias_set.
14310 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
14312 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
14313 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
14314 flag for all function decls which are in the exception table.
14315 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
14316 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
14317 code is emitted for any referenced rtti function.
14319 1998-06-25 Dave Brolley <brolley@cygnus.com>
14321 * lang-specs.h: Use new | syntax to eliminate
14322 string concatenation.
14324 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
14326 * cp-tree.h (CP_DECL_CONTEXT): New macro.
14327 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
14328 * method.c (build_overload_nested_name): Likewise.
14329 * sig.c (build_signature_pointer_or_reference_type): Don't set
14332 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14334 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
14335 * cp-tree.h (FROB_CONTEXT): New macro.
14336 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
14337 * decl.c (namespace_binding): Replace NULL_TREE with
14339 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
14340 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
14342 * decl.c (pushtag): Use FROB_CONTEXT.
14343 (pushdecl, make_typename_type, define_function, grokdeclarator):
14345 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
14346 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
14348 * decl2.c (decl_namespace): Return global_namespace if no context.
14349 * method.c (build_overload_nested_name): Expect null as context.
14350 * pt.c (mangle_class_name_for_template): Do nothing for null
14352 (lookup_template_class): Allow for null id_context.
14354 1998-06-25 Richard Henderson <rth@cygnus.com>
14356 * method.c (emit_thunk): Set current_function_is_thunk for the
14357 ASM_OUTPUT_MI_THUNK case as well.
14359 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
14361 * exception.cc (__cplus_type_matcher): Get a match_info pointer
14362 instead of an exception table entry as a parameter.
14364 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
14366 * parse.y (function_try_block): Don't call start_catch_handler.
14367 * except.c (call_eh_info): Remove coerced field from declaration.
14368 (build_eh_type_type_ref): New function to create an address of a
14369 rtti function for the new style exception tables.
14370 (expand_start_catch_block): Split function, this contains the
14372 (process_start_catch_block_old): New function to perform the rest
14373 of expand_start_catch_block under old style exceptions.
14374 (process_start_catch_block_old): New function to perform the rest
14375 of expand_start_catch_block under new style exceptions.
14376 (expand_end_catch_block): Only pop the false label off the stack under
14377 the old style of exceptions.
14378 * semantics.c (finish_try_block): Don't call start_catch_handler.
14379 * exception.cc (struct cp_eh_info): Add original_value field.
14380 (__cplus_type_matcher): Perform type matching on the original exception
14381 value, and if we have a match, set the current value.
14382 (__cp_push_exception): Set the original exception value.
14384 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
14386 * call.c (joust): Fix confusing conversion warning.
14388 * call.c (build_op_delete_call): Add placement parm. Check
14389 LOOKUP_SPECULATIVELY.
14390 * cp-tree.h, decl2.c, init.c: Adjust.
14391 * decl.c (finish_function): Use it.
14393 * pt.c (tsubst): Diagnose creating void fields or variables.
14395 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14397 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
14399 * cp-tree.h (check_dtor_name): Add prototype.
14401 * init.c (expand_member_init): Remove unused variables
14402 `ptr_type_node', `parm' and `rval'.
14404 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
14405 in call to fprintf.
14406 (lang_print_xnode): Likewise.
14408 * typeck2.c (enum_name_string): Cast argument to sprintf to long
14409 and use %ld specifier.
14411 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
14412 specifier in call to fprintf.
14413 (GNU_xref_member): Cast argument to sprintf to int.
14415 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14417 * typeck2.c (pop_init_level): Warn about implicit zero initialization
14420 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14422 * cp-tree.h: Prototype function `check_java_method'.
14424 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
14426 * class.c (finish_struct): Make conflicting use of id a pedwarn.
14427 * decl.c (pushdecl_class_level): Likewise.
14429 1998-06-17 Mark Mitchell <mark@markmitchell.com>
14431 * pt.c (convert_nontype_argument): Issue an error when presented
14432 with an integer (real) constant that cannot be simplified to an
14433 INT_CST (REAL_CST).
14435 * cp-tree.h (c_get_alias_set): Remove declaration added in
14436 1998-06-13 change that should never have been checked in.
14438 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
14440 * typeck.c (build_binary_op_nodefault): Change % in format strings
14443 * decl.c (grokvardecl): Don't build_static_name for decls that
14444 aren't at namespace scope.
14446 * init.c (perform_member_init): Catch default-initialization of
14449 1998-06-17 Mark Mitchell <mark@markmitchell.com>
14451 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
14453 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
14455 * method.c (hack_identifier): Complain about getting a namespace
14457 * typeck.c (decay_conversion): Remove check for namespaces.
14458 * typeck2.c (incomplete_type_error): Likewise.
14459 * parse.y (template_arg): Add PTYPENAME expansion.
14461 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
14463 * decl.c (grokvardecl): Don't build external assembler names for
14464 TYPENAMEs in other namespaces as there is no declarator.
14465 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
14466 info from DECL_CONTEXT if it is NULL.
14468 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
14470 * call.c (check_dtor_name): Split out.
14471 (build_scoped_method_call): Use it.
14472 (build_method_call): Use it.
14473 * init.c (build_offset_ref): Use it.
14475 * typeck.c (build_static_cast): Fix handling of pointers to members.
14477 * decl.c (finish_function): Just return nothing from a constructor.
14478 * typeck.c (c_expand_return): Complain about returning a void
14479 expression from a destructor.
14481 1998-06-13 Mark Mitchell <mark@markmitchell.com>
14483 * class.c (alter_access): Accept a BINFO explaining how to get
14484 from the entity whose accessed is being altered to the type doing
14486 (handle_using_decl): New function containing code split out from ...
14487 (finish_struct_1): Here.
14489 * cp-tree.h (complete_type_or_else): Declare.
14490 * init.c (build_new_1, build_delete): Use it.
14491 * typeck.c (require_complete_type): Use complete_type, rather than
14492 expanding it inline.
14493 (complete_type_or_else): New function.
14494 (build_component_ref): Use it.
14495 (pointer_int_sum): Make sure the type pointed to is complete.
14496 (pointer_diff): Likewise.
14498 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
14501 * search.c (get_matching_virtual): Note that member templates
14502 cannot override virtual functions.
14504 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
14506 * pt.c (check_explicit_specialization): If DECLARATOR turned into
14507 an error_mark_node from lookup_template_function, return the same.
14508 (determine_specialization): Also make sure TEMPLATE_ID isn't an
14509 error_mark_node, before we try to read its operands.
14510 * decl.c (grokdeclarator): If we got an error_mark_node from
14511 check_explicit_specialization, just return it right back.
14513 1998-06-12 Mark Mitchell <mark@markmitchell.com>
14515 * class.c (instantiate_type): Don't treat template-ids that don't
14516 specify any template arguments as equivalent to ordinary
14517 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
14518 pointer-to-members for member templates. Tidy slightly.
14519 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
14520 * init.c (build_offset_ref): Handle template-ids like ordinary
14521 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
14522 offset part of the OFFSET_REF.
14523 * typeck.c (build_unary_op): Change check for unknown types to
14524 look for OFFSET_REFs, not SCOPE_REFs.
14526 1998-06-11 Mark Mitchell <mark@markmitchell.com>
14528 * pt.c (is_member_template_class): New function.
14529 (push_template_decl_real): Use it.
14531 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
14533 * friend.c (do_friend): Add support for nested classes using
14534 member functions of the enclosing class as friends.
14536 1998-06-10 Mark Mitchell <mark@markmitchell.com>
14538 * call.c (convert_default_arg): Make global, not static.
14539 (convert_arg_for_ellipsis): Split out from ...
14540 (build_over_call): Here.
14541 * cp-tree.h (convert_default_arg); Declare.
14542 (convert_arg_to_ellipsis): Likewise.
14543 (do_member_init): Remove.
14544 * init.c (do_member_init): Remove; this code is dead.
14545 (expand_member_init): Remove much of this code; it is dead.
14546 * typeck.c (convert_arguments): Use convert_default_arg and
14547 convert_arg_for_ellipsis, rather than duplicating here.
14549 * call.c (convert_like): Don't fail silently if
14550 build_user_type_conversion fails. Always return error_mark_node
14553 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14555 * search.c (covariant_return_p): Complain about ambiguous base.
14557 * typeck.c (build_component_ref): Diagnose ref to nested type.
14559 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
14561 * decl.c (grokparms): Check that INIT isn't an error_mark_node
14562 before giving error about invalid type for default arg.
14564 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14566 * call.c (build_method_call): Fix thinko.
14568 1998-06-10 Dave Brolley <brolley@cygnus.com>
14570 * decl2.c (lang_decode_option): New argc/argv interface.
14571 * cp-tree.h (lang_decode_option): New argc/argv interface.
14572 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
14573 specified for cpplib-enabled compilers.
14574 * lex.c (lang_init): Don't check_newline for cpplib.
14575 (init_parse): Don't initialize cpplib here.
14577 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
14579 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
14580 piece before checking DECL_MUTABLE_P.
14582 1998-06-10 John Carr <jfc@mit.edu>
14584 * tree.c (debug_binfo): Make printf format match arguments.
14586 * error.c (OB_PUTI): Make printf format match arguments.
14588 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
14590 * init.c (perform_member_init): Handle default-initialization.
14592 * except.c (build_throw): Handle throwing NULL.
14594 * typeck.c (build_x_function_call): Use resolve_offset_ref.
14596 * search.c (compute_access): Only strip an anonymous union
14599 * call.c (add_builtin_candidates): Tweak.
14601 * cvt.c (build_expr_type_conversion): Restore code for conversion
14603 * decl2.c (delete_sanity): Use it. Clean up.
14605 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
14607 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
14609 * typeck.c (c_expand_return): Don't warn about void expressions on
14610 return statements in functions returning void.
14612 1998-06-09 Mark Mitchell <mark@markmitchell.com>
14614 * pt.c (fn_type_unification): Revise documentation. Tidy.
14615 (type_unification): Likewise.
14617 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
14619 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
14621 * parse.y (function_try_block): Rename expand_start_catch, and delete
14623 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
14626 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
14628 * search.c (lookup_member): New fn.
14629 * class.c (finish_struct_1): Use it.
14630 * decl.c (lookup_name_real): Use it.
14632 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14634 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
14636 * cp-tree.h: Add prototype for `maybe_print_template_context' and
14637 `maybe_make_one_only'.
14639 * decl.c (auto_function): Remove unused variable `decl'.
14641 * decl2.c: Include dwarf2out.h and dwarfout.h.
14643 * lex.c: Remove redundant declarations of `set_float_handler' and
14646 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
14648 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
14649 time flag. Call __cp_eh_info instead of __cp_exception_info.
14650 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
14651 (__cp_exception_info): Return offset into cp_eh_info structure to
14652 match what use to be the start of this structure.
14653 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
14654 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
14656 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
14657 __cp_eh_info instead of __cp_exception_info.
14659 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
14661 * decl.c (cp_finish_decl): Disable inlining of extern inlines
14662 with static variables.
14664 1998-06-08 Mark Mitchell <mark@markmitchell.com>
14666 * init.c (build_offset_ref): Correct previous change to use build,
14669 1998-06-07 Mark Mitchell <mark@markmitchell.com>
14671 * class.c (instantiate_type): Handle pointer-to-members where the
14672 member is a template.
14673 * init.c (build_offset_ref): Likewise.
14674 * typeck.c (build_unary_op): Likewise.
14676 1998-06-07 Richard Henderson <rth@cygnus.com>
14678 * lex.c (lang_init_options): New function.
14679 (lang_init): Remove flag_exceptions == 2 hack.
14681 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
14683 * search.c (envelope_add_decl): Tweak for implicit typename.
14685 * call.c (joust): Also warn about confusing conversion op/constructor
14686 overload resolution.
14688 * spew.c (yylex): Also return the TYPE_DECL if got_object.
14689 Don't clear got_object after '~'.
14690 * call.c (build_scoped_method_call): Tweak destructor handling.
14691 (build_method_call): Likewise.
14692 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
14693 TYPE_MAIN_VARIANT for destructors.
14694 * semantics.c (finish_object_call_expr): Complain about calling a
14697 1998-06-05 Per Bothner <bothner@cygnus.com>
14699 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
14700 Define - update needed by gcc.c change.
14702 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
14704 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
14706 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14708 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
14709 * decl.c (lookup_name_real): Add namespaces_only parameter.
14710 If set, return only NAMESPACE_DECLs.
14711 (select_decl): Likewise.
14712 (identifier_type_value): Give additional parameter.
14713 (lookup_name_nonclass): Likewise.
14714 (lookup_name): Likewise.
14715 (find_binding): Skip namespace aliases.
14716 (binding_for_name): Likewise.
14717 (push_namespace): Check for namespace aliases.
14718 (lookup_name_namespace_only): New function.
14719 (begin_only_namespace_names, end_only_namespace_names): New functions.
14720 * decl2.c (set_decl_namespace): Skip namespace aliases.
14721 (do_using_directive): Likewise.
14722 (do_namespace_alias): Produce namespace aliases, fix alias
14724 * error.c (dump_decl): Support SCOPE_REF.
14725 * parse.y (extdef): Wrap lookup with namespace_only for namespace
14726 aliases and using declarations.
14728 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
14730 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
14732 * error.c (dump_expr): Clean up NEW_EXPR case.
14734 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
14736 Suggested by Brendan Kehoe
14737 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
14738 treat it as using ::decl.
14740 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
14742 * tree.c (mapcar): Support NEW_EXPR.
14744 * error.c (dump_expr): Support NEW_EXPR.
14746 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
14748 * method.c (make_thunk): Use overload machinery to make name.
14749 * search.c (covariant_return_p): New fn.
14750 (get_matching_virtual): Use it.
14752 * init.c (build_new_1): Fix check for void.
14754 1998-06-01 Per Bothner <bothner@cygnus.com>
14756 * cp-tree.h (TYPE_FOR_JAVA): New macro.
14757 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
14758 java_int_type_node, java_long_type_node, java_float_type_node,
14759 java_double_type_node, java_char_type_node, java_boolean_type_node):
14760 New "primitive" types, with predefined names __java_byte etc.
14761 (record_builtin_java_type): New function.
14762 (init_decl_processing): Make Java types with record_builtin_java_type.
14763 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
14764 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
14765 (grokfndecl): Call check_java_method for Java classes.
14766 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
14767 (process_overload_item): Match types against specific
14768 java_XX_type_node types, rather than using is_java_type.
14769 * class.c (finish_struct_1): Don't add default copy constructor
14770 or operator= if TYPE_FOR_JAVA.
14771 (pop_lang_conext): Restore strict_prototyp proper if Java.
14772 * decl2.c (acceptable_java_type, check_java_method): New functions.
14773 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
14774 (tsubst): Move common statement after if statement.
14775 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
14777 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
14779 * pt.c (for_each_template_parm): Use first_rtl_op.
14781 * tree.c (build_cplus_array_type_1): Also check index_type for
14784 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
14786 * pt.c (tsubst): Always copy BINFO_BASETYPES.
14788 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
14790 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
14791 TYPE_SIZE_UNIT too.
14793 1998-05-29 Mark Mitchell <mark@markmitchell.com>
14795 * decl.c (grokdeclarator): Don't complain about in-class
14796 initialization of static consts if we don't really know the type
14799 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
14801 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
14802 * method.c (build_destructor_name): New fn.
14803 * decl2.c (maybe_retrofit_in_chrg): Split out...
14804 (grokclassfn): From here. Reorganize.
14805 * decl.c (grok_ctor_properties): Make sure ctors for types with
14806 vbases have the in_chrg parm.
14807 * pt.c (instantiate_class_template): Update
14808 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
14810 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
14812 1998-05-28 Mark Mitchell <mark@markmitchell.com>
14814 * pt.c (instantiate_decl): Make test for whether or not static
14815 variables should be instantiated early match its comment.
14817 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
14819 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
14821 (start_function): Call check_default_args.
14822 * decl2.c (grokfield): Don't call check_default_args.
14823 (check_default_args): Use cp_error_at.
14824 * lex.c (do_pending_defargs): Call check_default_args.
14826 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
14828 * call.c (build_method_call): Make sure get_type_value returns
14829 something before we try to use its TYPE_MAIN_VARIANT.
14830 (build_scoped_method_call): Likewise.
14832 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
14834 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
14835 initialize an array.
14837 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
14840 * friend.c (do_friend): Clarify template warning.
14842 1998-05-27 Mark Mitchell <mark@markmitchell.com>
14844 * decl.c (shadow_label): Don't treat decls as identifiers.
14845 (maybe_push_to_top_level): Clear shadowed_labels.
14847 * pt.c (instantiate_decl): Reset lineno and filename after calling
14848 regenerate_decl_from_template.
14850 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
14853 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
14855 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
14857 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14859 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
14860 (convert_nontype_argument): Handle cases when nontype template
14861 parameters become classes after substitution.
14863 1998-05-26 Mark Mitchell <mark@markmitchell.com>
14865 * friend.c (is_friend): Use comptypes, rather than == to compare
14866 types. Modify for new representation of template friends.
14867 (make_friend_class): Likewise.
14868 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
14869 (instantiate_class_template): Deal with template friends.
14871 * decl.c (store_parm_decls): Remove redundant call to
14872 expand_main_function.
14874 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
14876 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
14879 1998-05-26 Per Bothner <bothner@cygnus.com>
14881 * language_as_string: Handle lang_java.
14883 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
14885 * decl.c (pushdecl): Don't copy the type_decl.
14887 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14889 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
14890 current_class_type.
14891 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
14893 * parse.y (complex_direct_notype_declarator): Use $1 to access
14894 scope of notype_qualified_id.
14896 1998-05-26 Dave Brolley <brolley@cygnus.com>
14898 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
14899 (init_parse): Initialize cpplib interface.
14901 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
14902 empty continuation.
14904 1998-05-26 Mark Mitchell <mark@markmitchell.com>
14906 * decl.c (pushtag): Avoid crashing on erroneous input.
14908 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14910 * decl.c (push_namespace): Only produce one unique name for
14911 anonymous namespaces.
14912 (get_unique_name): Remove.
14914 1998-05-25 Mark Mitchell <mark@markmitchell.com>
14916 * call.c (tourney): Don't do any extra comparisons.
14918 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
14920 * cp-tree.h (processing_template_parmlist): Declare.
14921 * decl.c (pushtag): Don't call push_template_decl when we
14923 * pt.c (processing_template_parmlist): New variable.
14924 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
14925 (complete_template_args): Use it.
14926 (add_to_template_args): Likewise.
14927 (innermost_args): Likewise.
14928 (tsubst): Likewise.
14929 (begin_template_parm_list): Use processing_template_parmlist.
14930 (end_template_parm_list): Likewise.
14932 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
14933 * decl.c (grokdeclarator): Use it.
14934 * decl2.c (grok_x_components): Likewise.
14935 * init.c (initializing_context): Likewise.
14936 * method.c (do_build_copy_constructor): Likewise.
14937 (do_build_assign_ref): Likewise.
14938 * search.c (compute_access): Likewise.
14939 * typeck.c (build_component_ref): Likewise.
14941 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
14942 unnamed type a typedef name "for linkage purposes".
14944 * pt.c (lookup_template_class): Don't look at
14945 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
14947 * method.c (build_overload_int): Handle error cases gracefully.
14949 * pt.c (instantiate_decl): Handle static member variables
14952 * pt.c (tsubst): Use the tsubst'd type when producing new
14953 TEMPLATE_PARM_INDEX nodes.
14955 1998-05-24 Mark Mitchell <mark@markmitchell.com>
14957 * tree.c (cp_tree_equal): Handle pointers to member functions.
14959 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
14960 sure the type of the REF_BIND is a reference type.
14961 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
14962 target_type for clarity.
14964 * parse.y (xcond): Move call to condition_conversion ...
14965 * semantics.c (finish_for_cond): Here.
14966 * parse.c: Regenerated.
14968 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
14970 * decl.c (push_namespace): Namespaces have type void.
14971 * typeck2.c (incomplete_type_error): Complain about namespace
14972 used as expression.
14973 * typeck.c (decay_conversion): Likewise.
14975 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
14977 * error.c (dump_expr): Support namespaces.
14979 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
14981 * cp-tree.def: Add SRCLOC.
14982 * cp-tree.h: Add struct tree_srcloc and accessor macros.
14983 * tree.c (build_srcloc, build_srcloc_here): New fns.
14984 * pt.c (add_pending_template): Use build_srcloc_here.
14985 (push_tinst_level): Update last_template_error_tick before erroring.
14986 (instantiate_decl): Restore lineno and input_filename before
14987 calling add_pending_template.
14988 * decl2.c (finish_file): Set up lineno and input_filename for
14991 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
14993 * decl.c (lang_print_error_function): New fn.
14994 (init_decl_processing): Set print_error_function to use it.
14995 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
14997 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
15000 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
15001 copy-initialization.
15003 * class.c (build_vtable_entry): Use int_fits_type_p.
15004 (build_vtable): Pass a signed offset to build_vtable_entry.
15005 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
15006 set_rtti_entry): Likewise.
15008 1998-05-22 Per Bothner <bothner@cygnus.com>
15010 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
15011 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
15013 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
15015 * pt.c (print_template_context): Use fprintf instead of cp_error.
15017 * pt.c (determine_specialization): Just return an error_mark_node.
15018 Also print the decl we want in error messages. If we complain,
15019 return error_mark_node.
15020 (tsubst_friend_function): Set lineno and input_filename so
15021 error messages will be useful.
15022 (instantiate_template): Just return an error_mark_node.
15023 (check_explicit_specialization): Don't mess with a returned
15026 * pt.c (print_template_context): Add new argument.
15027 (maybe_print_template_context): New fn.
15028 (push_tinst_level): Increment tinst_level_tick.
15029 (pop_tinst_level): Likewise.
15030 * errfn.c (cp_thing): Call maybe_print_template_context. Use
15031 xrealloc instead of xmalloc.
15033 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
15035 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
15037 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
15038 if the template we looked up is the same as the one we already
15041 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
15043 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
15044 (cpp_reader,parse_in): Add for cpplib.
15045 (check_newline): Call handle_sysv_pragma with new interface.
15046 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
15048 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
15049 (sub_getch): Call GETC for cpplib.
15051 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
15052 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
15054 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
15056 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
15058 * decl2.c (maybe_make_one_only): New fn.
15059 (import_export_vtable): Use it.
15060 (import_export_decl): Likewise.
15061 * pt.c (mark_decl_instantiated): Likewise.
15063 1998-05-21 Mark Mitchell <mmitchell@usa.net>
15065 * decl2.c (find_representative_member): Rename to ...
15066 (build_anon_union_vars): New function.
15067 (finish_anon_union): Fix stupidity of previous change.
15069 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
15071 * decl.c (grokfndecl): Handle definition of specialization in
15072 friend declaration.
15074 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
15076 1998-05-20 Mark Mitchell <mmitchell@usa.net>
15078 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
15079 to look for type declarations.
15080 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
15081 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
15082 (finish_member_class_template): Declare.
15083 * decl.c (pushtag): Put member class templates on the
15084 CLASSTYPE_TAGS list, just as for ordinary member classes.
15085 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
15086 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
15087 IDENTIFIER_NAMESPACE_VALUEs.
15088 * parse.y (component_decl): Move code to ...
15089 * semantics.c (finish_member_class_template): New function.
15090 Don't put member class templates on the list of components for a
15092 * parse.c: Regenerated.
15093 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
15094 In fact, don't use DECL_CONTEXT at all here.
15096 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
15098 * decl.c (record_unknown_type): New function.
15099 (init_decl_processing): Call it for the unknown and global type
15102 1998-05-20 Mark Mitchell <mmitchell@usa.net>
15104 * decl2.c (find_representative_member): New function.
15105 (finish_anon_union): Use it.
15107 * cp-tree.h (MAIN_NAME_P): New macro.
15108 (DECL_MAIN_P): Likwise.
15109 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
15110 (grokfndecl): Use the new macros.
15111 (grokdeclarator): Likewise.
15112 (start_function): Likewise.
15113 (store_parm_decls): Likewise.
15114 (finsh_function): Likewise.
15115 * friend.c (do_friend): Likewise.
15116 * typeck.c (build_function_call_real): Likewise.
15117 (build_unary_op): Likewise.
15119 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
15121 * decl2.c (start_objects, finish_objects, do_dtors,
15122 do_ctors): Split out from...
15123 (finish_file): ...here.
15125 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
15127 * tree.c (is_overloaded_fn): Don't abort on placeholders from
15130 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
15132 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
15134 * error.c (dump_expr): Handle an ARROW_EXPR.
15136 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
15138 * decl.c (saveable_obstack): Declare.
15139 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
15140 declare, if necessary.
15142 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
15144 * call.c (compare_qual): Remove.
15145 (is_subseq): Tweak.
15146 (is_properly_derived_from): New function.
15147 (maybe_handle_ref_bind): Likewise.
15148 (maybe_handle_implicit_object): Likewise.
15149 (compare_ics): Modify substantially to bring into conformance with
15151 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
15152 (comp_cv_qualification): Declare.
15153 (comp_cv_qual_signature): Likewise.
15154 * typeck.c (comp_cv_qualification): Likewise.
15155 (comp_cv_qual_signature): Likewise.
15157 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15159 * Makefile.in (parse.o): Depend on toplev.h.
15161 * class.c (typecode_p): Remove prototype and definition.
15163 * cp-tree.h (currently_open_class, is_empty_class, member_p):
15166 * decl.c (push_overloaded_decl_top_level): Remove prototype and
15169 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
15170 in call to `cp_thing'.
15171 (cp_warning): Likewise for function pointer `warning'.
15173 * except.c (do_function_call): Remove prototype and definition.
15174 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
15176 * method.c (is_java_type): Add prototype and make it static.
15178 * parse.y: Include toplev.h.
15180 * pt.c (type_unification): Remove unused variable `arg'.
15181 (instantiate_decl): Likewise for `save_ti'.
15183 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
15185 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
15187 * init.c (build_member_call): Handle template_ids.
15188 * parse.y (primary): Add global_scope template_id.
15190 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
15192 * decl2.c (get_sentry): Use end_temporary_allocation.
15193 Don't declare permanent_obstack.
15195 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
15197 * parse.y (.finish_new_placement): New non-terminal.
15198 (unary_expr, new_type_id): Use it.
15199 * parse.c: Regenerated.
15201 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
15203 * pt.c (redeclare_class_template): Say where the original definition
15204 of the template-parameter's default argument appeared.
15206 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
15208 * call.c (build_over_call): Tweak empty class handling.
15210 * decl.c (make_typename_type): Use currently_open_class.
15212 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
15214 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15216 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
15217 for a type unless it is one.
15219 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
15221 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
15223 * Makefile.in (program_transform_name, objdir): Define.
15225 * Makefile.in (BISON): Use bison from the build tree if it exists.
15228 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
15230 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
15232 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
15234 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
15236 * call.c (build_scoped_method_call): Likewise.
15238 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
15240 * init.c (build_new_1): Call suspend_momentary around the creation
15241 of values that must be saved for exception handling.
15242 * parse.y (.build_new_placement): New non-terminal.
15243 (unary_expr, new_placement): Use it.
15244 * parse.c: Regenerated.
15246 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
15248 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
15251 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
15254 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
15256 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
15258 * decl.c (start_decl): Revert problem change.
15260 * Makefile.in (CONFLICTS): Fix.
15262 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15264 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
15266 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
15268 * class.c (finish_struct_1): Use BINFO_SIZE.
15270 * decl.c (start_decl): Use 'tem'.
15272 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
15274 * exception.cc: Include eh-common.h.
15275 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
15276 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
15277 (__cp_push_exception): Initialize eh_info struct as well.
15278 * except.c: Remove local structs and include eh-common.h.
15279 (init_exception_processing): Set language and version codes.
15280 (call_eh_info): Add presence of eh_info to runtime description of
15282 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
15283 * semantics.c (finish_try_block): Call start_catch_block() and
15285 * parse.y (function_try_block): Call start_catch_block() and
15288 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
15290 * typeck.c (original_type): New function.
15291 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
15292 to see if they're actually the same.
15293 * cp-tree.h (original_type): Declare.
15295 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15297 * Makefile.in (lex.o): Depend on output.h.
15299 * call.c (add_function_candidate): Remove unused variable `cand'.
15300 (add_conv_candidate): Likewise.
15301 (build_builtin_candidate): Likewise.
15303 * cp-tree.h: Add prototype for `types_overlap_p'.
15305 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
15307 * decl2.c (merge_functions): Remove unused variables `tmp' and
15310 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
15311 (code_as_string): Likewise.
15312 (language_as_string): Likewise.
15313 (parm_as_string): Likewise.
15314 (op_as_string): Likewise.
15315 (assop_as_string): Likewise.
15316 (cv_as_string): Likewise.
15318 * lex.c: Include output.h.
15320 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
15322 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
15325 * tinfo.cc (__class_type_info::dcast): Change the type of variable
15326 `i' from int to size_t.
15328 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
15331 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
15333 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
15334 DECL_NAMESPACE_SCOPE_P.
15335 (lang_decl_name): Likewise.
15336 * pt.c (tsubst_friend_function, tsubst): Likewise.
15337 * decl.c (pushdecl, redeclaration_error_message, start_decl,
15338 cp_finish_decl, start_function): Likewise.
15339 * class.c (finish_struct_1): Likewise.
15340 * call.c (build_over_call): Likewise.
15341 (compare_ics): Use DERIVED_FROM_P.
15343 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
15345 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
15346 * method.c (build_mangled_name): Use it.
15347 (build_decl_overload_real): Likewise.
15349 * error.c (dump_simple_decl): New function, broken out from ...
15350 (dump_decl): Use it.
15352 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
15354 * ptree.c (lang_print_xnode): Add missing `break'.
15356 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
15358 * call.c (add_template_candidate): Adjust for changes to
15359 fn_type_unification.
15360 (add_template_candidate_real): Likewise.
15361 (add_template_conv_candidate): Likewise.
15362 (build_user_type_conversion_1): Likewise.
15363 (build_new_function_call): Likewise.
15364 (build_object_call): Likewise.
15365 (build_new_op): Likewise.
15366 (build_new_method_call): Likewise.
15367 * class.c (instantiate_type): Likewise.
15368 * cp-tree.h (unification_kind_t): New type.
15369 (fn_type_unification): Adjust prototype.
15370 (type_unificaiton): Likewise.
15371 * pt.c (UNIFY_ALLOW_NONE): New macro.
15372 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
15373 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
15374 (UNIFY_ALLOW_DERIVED): Likewise.
15375 (unify): Change prototype.
15376 (maybe_adjust_types_for_deduction): New function.
15377 (check_cv_quals_for_unify): Likewise.
15378 (determine_specialization): Adjust.
15379 (fn_type_unification): Likewise.
15380 (type_unification): Likewise.
15381 (type_unification_real): Likewise. Use
15382 maybe_adjust_types_for_deduction. Fix mishandling of
15383 back-unification of template functions passed as arguments. Pass
15384 appropriate combination of UNIFY_ALLOW_* to unify.
15385 (unify): Remove unused NTPARMS parameter. Use
15386 check_cv_quals_for_unify. Remove bogus code that allowed
15387 too-generous unification in order to adhere more closely to standard.
15388 (get_bindings_real): Adjust.
15389 (get_class_bindings): Likewise.
15391 * method.c (build_overload_identifier): Only use the innermost
15392 template arguments when mangling.
15393 * pt.c (tsubst_template_argument_vector): New function.
15394 (complete_template_args): Deal with the situation where the
15395 extra_args contain more than one level of arguments.
15396 (lookup_template_class): Deal with member template classes, which
15397 may have more than one level of arguments.
15398 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
15399 Improve handling of member template classes. Use
15400 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
15401 tsubst_template_argument_vector where appropriate.
15402 (regenerate_decl_from_template): Break out from ...
15403 (instantiate_decl): Here.
15405 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
15406 * parse.h: Regenerated.
15407 * parse.c: Really regenerated.
15409 * cp-tree.h (finish_unary_op_expr): New function.
15410 (finish_id_expr): Likewise.
15411 (begin_new_placement): Likewise.
15412 (finish_new_placement): Likewise.
15413 (finish_declarator): Likewise.
15414 (finish_translation_unit): Likewise.
15415 (finish_parmlist): Likewise.
15416 (begin_class_definition): Likewise.
15417 (finish_class_definition): Likewise.
15418 (finish_default_args): Likewise.
15419 (finish_inline_definitions): Likewise.
15420 * parse.y (GCC_ASM_KEYWORD): Remove.
15421 (TYPENAME_ELLIPSIS): Likewise.
15422 * parse.c: Regenerated.
15423 Use new functions in semantics.c in the actions for many rules.
15424 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
15425 * hash.h: Regenerated.
15426 * semantics.c (finish_expr_stmt): Allow NULL expr.
15427 (finish_unary_op_expr): New function, containing
15428 code previously in parse.y.
15429 (finish_id_expr): Likewise.
15430 (begin_new_placement): Likewise.
15431 (finish_new_placement): Likewise.
15432 (finish_declarator): Likewise.
15433 (finish_translation_unit): Likewise.
15434 (finish_parmlist): Likewise.
15435 (begin_class_definition): Likewise.
15436 (finish_class_definition): Likewise.
15437 (finish_default_args): Likewise.
15438 (finish_inline_definitions): Likewise.
15440 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
15442 * typeck.c (build_c_cast): Don't decay arrays and functions to
15443 pointer type when converting to a class type.
15445 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
15447 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
15448 (DECL_CLASS_SCOPE_P): Likewise.
15450 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
15452 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
15453 * decl2.c (constructor_name_full): Likewise.
15455 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
15457 * tree.c (mapcar): Add OVERLOAD support.
15459 * init.c (resolve_offset_ref): We must use basetype_path before we
15460 destroy it with a call to convert_pointer_to.
15462 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
15464 * class.c (currently_open_class): New fn.
15465 * decl.c (lookup_name_real): Use it.
15466 * search.c (lookup_field): Likewise.
15468 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
15470 * cp-tree.def (OVERLOAD): New node.
15471 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
15472 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
15473 (NAMESPACE_BINDING): Remove.
15474 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
15476 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
15478 (tree_overload): New struct.
15479 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
15480 (REAL_IDENTIFIER_TYPE_VALUE): Define.
15481 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
15482 (lang_decl_flags): Remove in_namespace.
15483 (lang_decl): Remove chain.
15484 (DECL_CHAIN, DECL_NAMESPACE): Remove.
15485 (flag_honor_std): Declare extern.
15486 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
15487 namespace_binding, set_namespace_binding,
15488 lookup_function_nonclass, cat_namespace_levels,
15489 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
15490 scratch_ovl_cons, ovl_member, build_overload): Declare.
15491 (decl_list_length, get_namespace_id, current_namespace_id,
15492 overloaded_globals_p): Remove.
15493 (lookup_using_namespace, qualified_lookup_using_namespace): Change
15495 (push_scratch_obstack): New macro.
15496 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
15497 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
15499 (build_new_function_call): Iterate using OVL_CHAIN.
15500 Print DECL_NAME in when reporting ambiguities.
15501 (build_object_call): Iterate using OVL_NEXT for fns, convs.
15502 (build_new_op): Call lookup_function_nonclass.
15503 Iterate using OVL_NEXT.
15504 (build_op_delete_call): Change detection of members.
15505 Do not wrap TREE_LIST around fields and single global functions.
15506 (build_over_call): Don't push a class level if the context is a
15508 (build_new_method_call): Iterate using OVL_NEXT.
15509 * class.c (add_method): Chain overloaded members using
15510 build_overload. Remove copying of method.
15511 (grow_method): When iterating through the obstack, expect OVERLOAD
15512 nodes. Chain overload members.
15513 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
15514 nodes in call to get_baselinks.
15515 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
15516 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
15517 fdecls that are OVERLOAD nodes.
15518 (validate_lhs): New function.
15519 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
15520 code. Use DECL_NAME in error messages. Split code between global
15521 and member function processing.
15522 * decl.c (global_type_node): New static variable.
15523 (in_std): New global.
15524 (struct binding_level): New field usings.
15525 (resume_binding_level): Assert that we are not in a class.
15526 (toplevel_bindings_p): Just check for namespace_p or
15528 (resume_level): Remove.
15529 (find_binding): New function.
15530 (binding_for_name): Call it.
15531 (namespace_binding, set_namespace_binding): New functions.
15532 (push_namespace): Associate binding level with new namespace,
15533 resume_binding_level for existing namespace. Remove old code.
15534 Fake std by counting.
15535 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
15536 (maybe_push_to_top_level): Save current namespace.
15537 (pop_from_top_level): Restore saved namespace.
15538 (pop_namespace): Call suspend_binding_level. Remove old code.
15539 (cat_namespace_levels): New function.
15540 (set_identifier_type_value_with_scope): For namespace bindings,
15541 set BINDING_TYPE, and use global_type_node.
15542 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
15543 (identifier_type_value): New function.
15544 (pushtag): If no context, use current_namespace.
15545 (duplicate_decls): Don't process DECL_CHAIN.
15546 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
15547 already set. Never reset it to NULL_TREE. Lookup global variables
15548 in their namespace. Push overloaded templates if they are on
15550 (pushdecl_namespace_level): New function.
15551 (pushdecl_top_level): Implement using pushdecl_namespace_level.
15552 (pushdecl_using_decl): New function.
15553 (overloaded_globals_p): Remove.
15554 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
15555 them. Use namespace_binding and set_namespace_value.
15556 (redeclaration_error_message): Complain if the declarations come
15557 from different namespaces.
15558 (lookup_tag): On namespace level, look in the BINDING_TYPE.
15559 (lookup_namespace_name): Pass tree_bindings from stack. Remove
15561 (select_decl): New function.
15562 (lookup_name_real): Call it for qualified and unqualified lookup.
15563 Pass tree_bindings from the stack.
15564 If prefer_type is 1, also accept namespaces.
15565 (lookup_function_nonclass): New function.
15566 (init_decl_processing): Set the binding level of the global
15567 namespace to global_binding_level.
15568 Build a proper type list for __builtin_apply.
15569 Initialize std_node to "fake std" if flag_honor_std is set.
15570 Initialize global_type_node.
15571 Allocated bad_alloc in namespace std if flag_honor_std.
15572 (define_function): Set the DECL_CONTEXT to the current_namespace.
15573 (start_decl): A namespace is not considered as a context here. If
15574 the DECL_CONTEXT is a namespace, push the decl.
15575 (cp_finish_decl): Check for namespaces used as initializers.
15576 (grokfndecl): Add namespace parameter. Remove processing of
15578 (grokvardecl): Add namespace parameter.
15579 (grokdeclarator): Process SCOPEs that are namespaces. For
15580 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
15581 (start_function): Check for contexts that are namespaces.
15582 Set context for declarations that have not been pushed.
15583 (store_parm_decls): Check for ::main only.
15584 (finish_function): Likewise.
15585 (start_method): Check for contexts that are namespaces.
15586 (start_method): Remove DECL_CHAIN processing.
15587 * decl2.c (flag_honor_std): Declare.
15588 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
15589 (decl_namespace_list): New static global.
15590 (grok_x_components): Ignore namespaces as type contexts.
15591 (check_classfn): Expect OVERLOAD nodes.
15592 (grokfield): Remove DECL_CHAIN processing.
15593 (finish_file): Call cat_namespace_levels.
15594 (merge_functions): New function.
15595 (ambiguous_decl): Rewrite.
15596 (lookup_using_namespace): Produce tree_bindings.
15597 (qualified_lookup_using_namespace): Likewise.
15598 (set_decl_namespace, decl_namespace, current_decl_namespace,
15599 push_decl_namespace, pop_decl_namespace): New functions.
15600 (arg_lookup): New struct.
15601 (add_function, arg_assoc_namespace, arg_assoc_class,
15602 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
15604 (get_namespace_id, current_namespace_id): Remove.
15605 (do_toplevel_using_decl): Rewrite.
15606 (do_class_using_decl): Complain about namespace qualifiers.
15607 (do_using_directive): Sorry if not on namespace level. Complain
15608 about unknown namespaces.
15609 * error.c (dump_aggr_type): Check for namespace contexts.
15610 * except.c (init_exception_processing): Push terminate into std.
15611 * friend.c (is_friend): A namespace is not a context, here.
15612 * init.c (expand_member_init): Remove DECL_CHAIN processing.
15613 (build_offset_ref): Process OVERLOAD nodes.
15614 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
15615 * lex.c (identifier_type): Loop using OVL_CHAIN.
15616 (see_typename): Set looking_for_typename to 2.
15617 (real_yylex): Likewise.
15618 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
15619 (do_scoped_id): Expect OVERLOAD nodes.
15620 Change calling convention for qualified_lookup_using_namespace.
15621 (build_lang_decl): Don't set in_namespace anymore.
15622 * method.c (typevec_size): New global.
15623 (build_overload_nested_name): Return if global_namespace.
15624 Otherwise, always expect a declaration context.
15625 (build_qualified_name): Likewise.
15626 Make sure we don't write beyond typevec_size.
15627 (build_decl_overload_real): Likewise.
15628 Allocate one extra slot for the namespace.
15629 (hack_identifier): Mark code dead.
15630 Process OVERLOAD and NAMESPACE_DECL nodes.
15631 * parse.y (program): Pop namespaces until in global namespace.
15632 (extdef): In a using-declaration, don't discard the identifier if
15633 there is no declaration.
15634 (left_curly): Ignore type contexts which are namespaces.
15635 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
15637 * pt.c (template_class_depth): Expect types to be namespaces.
15638 (determine_specialization): Simplify by expecting OVERLOAD nodes.
15639 (push_template_decl): Push into namespace level.
15640 Reset ctx if it is a namespace.
15641 Set DECL_CONTEXT to current_namespace if not set already.
15642 Ignore real contexts that are namespaces.
15643 (mangle_class_name_for_template): Skip global_namespace.
15644 Mangle other namespaces as declarations.
15645 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
15646 (lookup_template_class): Push into namespace of context.
15647 If the context is a namespace, set it to global_namespace.
15648 Use id_context for mangling.
15649 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
15650 (tsubst_friend_function): Ignore namespace contexts.
15651 Push into namespace level.
15652 (tsubst): Handle NAMESPACE_DECL nodes.
15653 Remove DECL_CHAIN processing.
15654 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
15655 * ptree.c (print_lang_identifier): Print bindings.
15656 (lang_print_xnode): Print OVERLOAD nodes.
15657 * rtti.c (init_rtti_processing): Push type_info into std.
15658 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
15659 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
15660 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
15661 lookup_fnfields_here): Likewise.
15662 Process all nodes, instead of going through TREE_CHAIN.
15663 * sig.c (build_signature_pointer_or_reference_type): Set context
15664 to global_namespace.
15665 (build_signature_table_constructor): Expect OVERLOAD nodes.
15666 * spew.c (yylex): Save old setting of looking_for_typename.
15667 * tree.c (decl_list_length): Remove.
15668 (binding_init): New function.
15669 (count_functions): Rewrite.
15670 (is_overloaded_fn): Expect OVERLOAD nodes.
15671 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
15672 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
15673 ovl_member): New functions.
15674 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
15675 (type_unknown_p): Likewise.
15676 (require_instantiated_type): Likewise.
15677 (build_component_ref): Declare code dead.
15678 (build_x_function_call): Create and expect OVERLOAD nodes.
15679 (build_function_call_real): Check for ::main only.
15680 (build_unary_op): Likewise. Expect OVERLOAD nodes.
15681 (convert_for_assignment): Check for TREE_LIST before accessing
15683 * decl.c (duplicate_decls): Check for namespace bindings instead
15684 of global bindings.
15685 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
15686 lookup_name_current_level, start_decl, xref_tag,
15687 finish_enum): Likewise.
15688 * init.c (build_offset_ref): Likewise.
15689 * search.c (lookup_field): Likewise.
15690 (lookup_fnfields): Likewise.
15691 (dfs_debug_mark): Likewise.
15692 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
15693 (poplevel_class, pop_from_top_level): Likewise.
15694 * decl2.c (finish_method): Likewise.
15695 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
15696 * decl.c (record_builtin_type): Likewise.
15697 (init_decl_processing, grokfndecl): Likewise.
15698 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
15699 (make_lang_type): Likewise.
15700 * parse.y (make_thunk): Likewise.
15701 * pt.c (tsubst): Likewise.
15702 * tree.c (debug_binfo): Likewise.
15703 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
15704 tinfo2.cc, inc/new.h: Add std qualifications.
15705 * inc/new: Wrap with namespace std if __HONOR_STD.
15706 * inc/typeinfo: Likewise.
15708 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
15710 * call.c (build_user_type_conversion_1): Handle second_conv
15711 properly for templates.
15713 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
15715 * method.c (build_decl_overload_real): Set TREE_USED flag to
15716 zero for build_type_variants nodes as well.
15718 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
15720 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
15722 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
15724 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
15725 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
15726 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
15727 xref.o): Add toplev.h dependencies.
15729 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
15731 * errfn.c (cp_error, cp_warning): Remove declarations for
15732 error and warning respectively.
15734 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15736 * error.c: Convert to using ctype macros defined in system.h.
15737 * method.c: Likewise.
15738 * xref.c: Likewise.
15739 * lex.c: Likewise. Also remove redundant system header stuff.
15741 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
15743 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
15744 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
15745 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
15746 xref.c: Add include of toplev.h.
15748 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
15750 * tree.c (perm_manip): Also regenerate the RTL of an extern.
15751 (copy_to_permanent): Use end_temporary_allocation.
15753 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
15755 * init.c (expand_vec_init): The initialization of each array
15756 element is a full-expression.
15758 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
15760 * method.c (build_mangled_name): Add a call to build_type_variant
15761 to get the right type.
15763 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
15765 * Makefile.in: Add .SUFFIXES.
15767 * cp-tree.def: Remove NAMESPACE_DECL.
15769 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
15771 * call.c (build_over_call): Do evaluate arg even if it has empty
15773 * decl.c (start_function): Don't push a member function.
15775 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
15777 * Makefile.in (g++FAQ.info): Put -o option before input file.
15779 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
15781 * gxxint.texi: Add info for squangling codes K and B.
15783 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
15785 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
15786 the expression in templates.
15787 (finish_stmt_expr): Likewise.
15789 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
15791 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
15793 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
15795 * decl.c (maybe_push_to_top_level): Always clear
15796 current_template_parms and processing_template_decl.
15797 (pushtag): Remove check of current_class_type and some comments,
15798 since maybe_push_to_top_level no longer creates confusion.
15800 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
15802 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
15803 (DECL_CLASS_TEMPLATE_P): Likewise.
15804 (DECL_PRIMARY_TEMPLATE): Likewise.
15805 (PRIMARY_TEMPLATE_P): Use it.
15806 (push_template_decl_real): New function.
15807 (redeclare_class_template): Take new template parameters as
15809 (is_specialization_of): New function.
15810 (comp_template_args): Declare.
15811 * decl.c (pushtag): Handle friend template classes.
15812 (xref_tag): Likewise. Use new calling convention for
15813 redeclare_class_template.
15814 * decl2.c (grok_x_components): Handle friend templates.
15815 * friend.c (is_friend): Use is_specialization_of where
15816 appropriate. Deal with friend class templates.
15817 (make_friend_class): Let a class template be friends with itself.
15818 * pt.c (comp_template_args): Remove declaration.
15819 (tsubst_friend_class): New function.
15820 (push_template_decl_real): New function.
15821 (push_template_decl): Use it.
15822 (redeclare_class_template): Adjust for new calling convention.
15823 (comp_template_args): Give it external linkage.
15824 (instantiate_class_type): Use tsubst_friend_class to deal
15825 with friend templates.
15826 * typeck.c (comptypes): Use comp_template_args, rather than
15827 expanding it inline.
15828 * parse.y (component_decl): Handle a nested template type
15829 like other component type declarations.
15831 * pt.c (check_explicit_specialization): Handle overloaded
15832 constructors correctly.
15834 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
15835 (lookup_template_class): Use it.
15837 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
15839 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
15840 * cp-tree.h: Add WRAPPER support.
15841 * call.c (add_candidate): Split out from add_*_candidate fns.
15842 (build_over_call): Take the candidate instead of function and args.
15843 Enforce access control here. Emit overload warnings here.
15844 (add_warning): New fn.
15845 (joust): Add WARN parm. If not set, call add_warning instead of
15846 printing a warning. Re-enable some warnings.
15847 (tourney): Pass it.
15848 (convert_like): Adjust.
15849 (build_new_op): Adjust.
15850 (build_new_function_call): Adjust.
15851 (build_user_type_conversion_1): Adjust.
15852 (USER_CONV_FN): Adjust.
15853 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
15854 build_int_wrapper): New fns.
15856 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
15858 * pt.c (unify): Fix typo in previous change.
15860 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
15862 * error.c (dump_type_real): Declare canonical_name.
15864 * typeck.c (comp_target_types): Fix PMFs.
15866 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
15868 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
15869 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
15872 * pt.c (tsubst): Decrease the template-level of
15873 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
15874 TEMPLATE_PARM_INDEX.
15875 (template_decl_level): New function.
15876 (unify): Make sure to record unifications for template
15877 parameters, even when the parameters exactly match the arguments.
15878 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
15879 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
15880 aren't from the level we're currently working on.
15882 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
15884 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
15886 * decl2.c (check_member_template): Set DECL_IGNORED for member
15887 class templates, too.
15889 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
15891 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15893 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
15895 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
15897 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
15898 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
15899 (init_decl_processing): Handle TI types.
15900 * typeck.c (unsigned_type, signed_type): Handle TI types.
15902 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
15904 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
15905 New local added_libraries. Increment count when add library to
15908 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
15910 * cp-tree.h (type_as_string_real): New function.
15911 * pt.c (mangle_class_name_for_template): Use it.
15912 * error.c (dump_aggr_type): Change prototype.
15913 (dump_type_prefix): Likewise.
15914 (dump_type_suffix): Likewise.
15915 (dump_type_real): Convert from dump_type. If desired, the
15916 "canonica" name of a typedef, i.e., the name of the underlying
15917 type, can be printed.
15918 (dump_type): Call dump_type_real.
15920 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
15922 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
15924 * typeck.c (comp_target_types): Tweak pedantic case.
15925 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
15926 Return -1 or 1 instead of 1 or 2.
15927 (compparms): Remove STRICT handling.
15928 (convert_for_assignment): Fix handling of pmfs.
15930 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
15932 * typeck.c (comp_target_types): Handle references like pointers.
15933 (comp_target_parms): Note that return code from comp_target_types
15934 can be negative to indicate failure.
15936 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15938 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
15939 which requires a working target compiler to build.
15941 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
15943 * tree.c (avoid_overlap): Add prototype.
15945 * spew.c (num_tokens): Add prototype.
15946 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
15948 * search.c (dfs_check_overlap): Add prototype.
15949 (dfs_no_overlap_yet): Likewise.
15951 * pt.c (original_template): Add prototype.
15952 (inline_needs_template_parms): Likewise.
15953 (push_inline_template_parms_recursive): Likewise.
15954 (retrieve_specialization, register_specialization): Likewise.
15955 (print_candidates, reduce_template_parm_level): Likewise.
15956 (build_template_decl, mark_template_parm): Likewise.
15957 (tsubst_friend_function, get_bindings_real): Likewise.
15959 * method.c (start_squangling): Add prototype.
15960 (end_squangling, check_ktype, issue_ktype): Likewise.
15961 (build_overloaded_scope_ref, check_btype): Likewise.
15962 (build_mangled_template_parm_index): Likewise.
15964 * lex.c (init_cpp_parse): Add prototype.
15965 (handle_cp_pragma, handle_sysv_pragma): Likewise.
15966 (reduce_cmp, token_cmp): Likewise.
15968 * except.c (call_eh_info): Add prototype.
15969 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
15970 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
15972 * decl2.c (is_namespace_ancestor): Add prototype.
15973 (namespace_ancestor, add_using_namespace): Likewise.
15974 (ambiguous_decl): Likewise.
15976 * decl.c (indent): Add prototype.
15978 * call.c (add_template_candidate_real): Add prototype.
15980 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
15982 * decl2.c (build_expr_from_tree): Just return a PMF.
15984 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
15986 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
15987 when doing initializations.
15989 * pt.c (unify): Use comptypes to compare type args.
15991 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
15993 * decl.c (duplicate_decls): Fix check for when it's safe to free
15996 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
15999 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
16001 * pt.c (build_template_parm_index): Add prototype.
16003 * search.c (my_tree_cons): Don't clear words outside the
16004 newly allocated node.
16006 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
16008 * lex.c (init_parse): Now returns char* containing the filename.
16010 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
16011 Jeff Law <law@cygnus.com>
16013 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
16016 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16018 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
16020 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
16022 * decl.c (duplicate_decls): Don't warn for redundant decls if
16023 friend: let add_friend take care of it.
16025 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16027 * sig.c (build_signature_pointer_constructor): Don't set
16028 TREE_HAS_CONSTRUCTOR for a signature pointer.
16029 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
16030 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
16032 * typeck.c (build_unary_op): Only allow taking the address of a
16034 * typeck2.c (digest_init): Simplify.
16035 (store_init_value): Don't pedwarn about using { } for pmfs.
16037 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
16039 * cp-tree.h (start_decl): Update prototype.
16040 * decl.c (start_decl): Like the C version, new parameters
16041 for the attributes. Call cplus_decl_attributes here,
16042 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
16043 (grokdeclarator): Pass NULL for new start_decl arguments.
16044 * pt.c (tsubst_expr): Likewise.
16045 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
16046 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
16047 * lex.c (build_lang_decl): Add lang_name_java.
16048 * class.c (push_lang_context): Add lang_name_java.
16049 * method.c (build_mangled_name): Check for is_java_type.
16051 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
16053 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
16054 * call.c (build_scoped_method_call): Check for TREE_CODE for
16055 VOID_TYPE instead of type == void_type_node.
16056 (build_method_call): Likewise.
16057 * decl.c (lookup_name_real): Likewise.
16058 (grokdeclarator): Likewise.
16059 (start_decl): Likewise.
16060 (grokparms): Likewise.
16061 (start_function): Likewise.
16062 (finish_function): Likewise.
16063 (start_method): Likewise.
16065 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
16067 * lex.c (finput): New variable.
16068 (init_cpp_parse): Renamed from init_parse.
16069 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
16070 (finish_parse): New function.
16071 * cp-tree.h (init_lex, init_parse): Remove declarations.
16073 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
16075 * call.c (build_call): Still evaluate the actual argument.
16076 * class.c (is_empty_class): Update for -fnew-abi.
16078 * decl2.c: -fnew-abi implies -fsquangle.
16080 * method.c (do_build_assign_ref): Don't do anything to copy
16082 (do_build_copy_constructor): Likewise.
16083 * call.c (build_over_call): Likewise.
16085 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
16087 * tree.c (avoid_overlap): Return a value.
16089 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
16091 * method.c (check_btype): Add missing argument to xrealloc.
16092 (check_ktype): Likewise.
16094 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16096 Implement empty base optimization.
16097 * class.c (finish_struct_1): Add vbase fields earlier. Set
16098 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
16099 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
16100 (types_overlap_p): New fn.
16101 * tree.c (avoid_overlap): New fn.
16102 (build_base_fields): Use it to avoid overlapping empty bases.
16103 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
16105 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
16107 Re-implement allocation of base class subobjects.
16108 * tree.c (unshare_base_binfos): New fn.
16109 (layout_basetypes): Use it. Now handles offsets of both virtual and
16110 non-virtual bases, after layout_type.
16111 (layout_vbasetypes): Remove.
16112 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
16113 (build_vbase_pointer_fields): Split out from old layout_basetypes.
16114 * class.c (finish_base_struct): Lose offset handling code.
16115 Move nonvdtor warning here. Don't mess with t_binfo anymore.
16116 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
16117 * cp-tree.h: Adjust.
16119 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
16121 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
16122 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
16123 * class.c (duplicate_tag_error): Likewise.
16124 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
16125 * tree.c (layout_vbasetypes): Update from layout_record, remove
16126 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
16127 (layout_basetypes): Likewise.
16129 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
16131 * class.c, Make sure system.h is included just after config.h.
16132 Delete lingering stdio and errno references too.
16133 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
16135 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
16137 * friend.c (is_friend): Fix access control for local classes.
16139 * class.c (is_empty_class): New fn.
16140 * call.c (build_call): Don't pass empty class objects to a function.
16142 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
16144 * call.c (build_over_call): Do name resolution for default
16145 arguments of function templates in the scope of the templates.
16147 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
16149 * call.c: Include system.h. Remove includes, declarations and
16150 defines provided by system.h.
16151 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
16152 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
16153 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
16154 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
16155 * typeck2.c, xref.c: Likewise.
16156 * Makefile.in: Dependencies updated as appropriate.
16157 * Make-lang.in: Likewise.
16159 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
16161 * pt.c (fn_type_unification): Allow incomplete unification without
16162 an immediate error message.
16164 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
16166 * tree.c (member_p): New fn.
16167 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
16168 initializing class members.
16170 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
16171 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
16173 * call.c (build_method_call): Handle non-scoped destructors, too.
16174 * pt.c (tsubst_copy): Likewise.
16176 * pt.c (print_template_context): Split out...
16177 (push_tinst_level): ...from here.
16179 * friend.c (is_friend): Don't pass a type to decl_function_context.
16181 * typeck.c (convert_for_initialization): Always hand off
16182 conversions to class type.
16184 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16186 * friend.c (is_friend): Local classes have the same access as the
16187 enclosing function.
16189 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
16191 * typeck.c (expand_target_expr): Delete dead function.
16193 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
16195 * repo.c (save_string): Delete dead function.
16197 * method.c (thunk_printable_name): Delete dead function.
16199 * lex.c (yynextch): Delete dead function.
16201 * expr.c (tree_extract_aggr_init): #if 0 out.
16203 * except.c (do_unwind): Delete dead function.
16204 (easy_expand_asm): Likewise.
16206 * cvt.c (build_conversion_type_1): Delete dead function.
16208 * cp-tree.h (push_expression_obstack): Declare.
16210 * call.c (source_type): #if 0 out.
16212 * class.c (alter_access): Remove unused label. Add braces
16213 around empty else clause.
16215 * lex.c (yyprint): Fix argument to printf.
16217 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
16219 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
16221 * pt.c (instantiate_class_template): Make sure template
16222 arguments are permanent.
16223 * init.c (resolve_offset_ref): Don't go looking around in
16226 * semantics.c: Add routines to handle expressions, and some
16227 declaration processing.
16228 * parse.y: Use them.
16229 (current_class_depth): Move declaration to cp-tree.h.
16230 * parse.c: Regenerated.
16231 * cp-tree.h: Use them.
16232 (current_class_depth): Declare.
16233 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
16235 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
16237 * error.c (dump_decl): Be a bit more explicit with template
16238 type arguments, when verbose.
16240 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
16242 * inc/exception: Reorder closing braces.
16244 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
16246 * pt.c (redeclare_class_template): New function.
16247 * cp_tree.h (redeclare_class_template): Declare it.
16248 * decl.c (xref_tag): Use it.
16250 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
16252 * call.c (build_over_call): Check IS_AGGR_TYPE, not
16253 TYPE_LANG_SPECIFIC.
16254 * typeck.c (convert_arguments): Likewise.
16256 * decl.c (grokdeclarator): Remove const and volatile from type after
16257 setting constp and volatilep.
16259 * class.c (finish_struct_1): Don't warn about bool bitfield larger
16262 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
16264 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
16266 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
16268 * call.c (build_object_call): Complain about ambiguous operator(),
16269 rather that crashing.
16270 (build_new_op): Likewise.
16271 (build_op_delete_call): Likewise.
16273 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
16275 * cvt.c (perform_qualification_conversions): Use comp_target_types
16276 instead of comp_ptr_ttypes.
16278 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
16280 * cp-tree.h (enforce_access): Declare.
16281 * call.c (enforce_access): Make it extern, not static.
16282 * class.c (alter_access): Use enforce_access; modify code for ISO
16283 compliance, rather than ARM rules.
16285 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16287 * cp-tree.h: Fix typo.
16289 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
16291 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
16292 if (aggregate_value_p (type)).
16294 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
16296 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
16298 * tree.c (mapcar): When dealing with a DECL, use it's constant
16300 * pt.c (lookup_template_class): Don't mangle the names of template
16301 classes whose arguments are unknown.
16303 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
16305 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
16307 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
16309 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
16311 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
16312 boolean_type_node to 1.
16314 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
16316 * error.c (dump_expr): Remove unused variable `l'.
16318 * pt.c (for_each_template_parm): New function, created by
16319 converting uses_template_parms.
16320 (tree_fn_t): New typedef.
16321 (uses_template_parms): Use it.
16322 (mark_template_parm): New function.
16323 (push_template_decl): Check that the argument list of a partial
16324 specialization uses all the template parameters.
16326 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
16327 with it; we might want it for debugging.
16328 * cp-tree.h (type_unification): Change interface.
16329 * class.c (finish_struct_1): Skip nested template types, just like
16330 ordinary nested types.
16331 (instantiate_type): Use new interface to type_unification.
16332 * lex.c (init_lex): Add __sz as opname for sizeof.
16333 * method.c (build_overload_scope_ref): New function.
16334 (build_overload_int): Handle complex expressions. Set
16335 numeric_output_need_bar if necessary.
16336 (build_overload_value): Handle non-PARM_DECL nodes; this
16337 routine is now used by build_overload_int. Remove some
16338 assignments to numeric_output_need_bar. Use
16339 build_overload_scope_ref.
16340 (build_qualified_name): Note that some template mangled names end
16341 with digits, and set numeric_output_need_bar appropriately. Use
16342 build_underscore_int.
16343 * pt.c (unify): Change interface.
16344 (type_unification_real): Likewise.
16345 (determine_specialization): Use new interfaces.
16346 (tsubst): Deal gracefully with situations in which the argument
16347 vector is not fully filled.
16348 (fn_type_unification): Use new interfaces.
16349 (type_unification): Likewise. Remove NOP_EXPR hack.
16350 (type_unification_real): Likewise.
16351 (unify): Likewise. Deal with unification of complex expressions.
16353 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16355 * pt.c (complete_template_args): Initialize skip properly.
16357 * decl.c (make_typename_type): Revert.
16358 (make_implicit_typename): Remove.
16359 (lookup_name_real): Don't call it. Call lookup_field if we see a
16360 TYPE_DECL from a template base.
16361 * search.c (lookup_field): Do implicit typename stuff.
16363 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
16364 Geoff Noer <noer@cygnus.com>
16366 * Makefile.in: Various fixes for building cygwin32 native toolchains.
16367 * Make-lang.in: Likewise.
16369 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16371 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
16373 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
16375 * decl.c (make_implicit_typename): Rewrite removed code.
16376 (make_typename_type): Call it if the type we look up comes from
16377 a base that uses template parms.
16379 * pt.c (complete_template_args): Rewrite.
16380 (tsubst, FUNCTION_DECL): Use it.
16382 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
16384 * semantics.c (finish_asm_stmt): Fix combine strings. Call
16385 c_expand_asm_operands () if output_operands, input_operands or
16386 clobbers is not NULL_TREE.
16388 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16390 * pt.c (complete_template_args): New function.
16391 (get_bindings): Deal with specializations of function templates
16392 with return type containing parameters from outer class
16394 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
16395 substitute arguments and compose a new type.
16397 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
16399 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
16402 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
16404 * decl.c (make_implicit_typename): Lose useless code.
16406 * call.c (standard_conversion): Handle A* -> const A* properly.
16408 * pt.c (get_bindings_real): Rename from get_bindings. Add
16409 check_rettype parm.
16410 (get_bindings): Pass 1.
16411 (get_bindings_overload): Pass 0.
16413 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
16415 * pt.c (check_explicit_specialization): When reverting a static
16416 member function, also remove the `this' parameter from
16417 last_function_parms.
16419 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16421 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
16422 a function context.
16424 * decl.c (store_bindings): Use free_binding_vecs.
16425 (pop_from_top_level): Likewise.
16427 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
16429 * decl.c (make_implicit_typename): Only change the type of a
16432 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
16434 * semantics.c: New file, containing routines to perform the
16435 semantic phase of parsing.
16437 * pt.c (tsubst_expr): Likewise.
16438 * cp-tree.h: Declare the various functions in semantics.c.
16439 Provide macros to access _STMT tree nodes.
16440 * cp-tree.def: Add ASM_STMT tree node.
16441 * Makefile.in, Make-lang.in: Add dependencies on and for
16444 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
16446 * pt.c (push_template_decl): Only check primary templates.
16448 * pt.c (check_explicit_specialization): Complain about default args
16449 in explicit specialization.
16451 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
16452 constructor_declarator.
16454 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
16456 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
16457 has no overloaded operator ->.
16459 * call.c (build_field_call): Don't crash when presented with a
16460 field that is actually a nested type.
16462 * decl.c (pushtag): Deal with friend class injection in local
16465 * call.c (build_object_call): Don't crash if OBJ is a
16466 pointer-to-member-function.
16468 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
16470 * pt.c (push_template_decl): Complain about template with C linkage,
16471 anonymous template class.
16473 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
16475 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
16476 * search.c: Likewise.
16478 * lex.c (do_pending_defargs): Only call
16479 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
16481 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
16483 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
16485 * parse.y: Deal with CONSTRUCTORS in new_initializers.
16487 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
16489 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
16490 closely mimics the behavior in parse.y.
16491 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
16492 into a compound statement.
16494 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
16496 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
16497 * pt.c (inline_needs_template_parms): New fn.
16498 (original_template): New fn.
16499 (push_inline_template_parms_recursive): New fn.
16500 (maybe_begin_member_template_processing): Use them.
16501 (maybe_end_member_template_processing): Likewise.
16502 (is_member_or_friend_template): Rename to is_member_template.
16503 Member functions of local classes are never member templates.
16505 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16507 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
16508 added in the class scope to catch redefinition error.
16510 * pt.c (reduce_template_parm_level): Also copy
16511 the DECL_TEMPLATE_PARMS field.
16513 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
16515 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
16516 reduced-level template type parameter.
16518 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
16520 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
16521 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
16522 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
16523 * decl.c (duplicate_decls): Propagate it.
16524 * typeck2.c (abstract_virtuals_error): Use two loops to emit
16525 abstract virtual functions and virtual functions which need a
16526 final overrider separately.
16528 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
16530 * lang-specs.h: Properly put brackets around array elements in
16533 * typeck.c (build_binary_op_nodefault): Correctly place parens around
16534 && and || in expression.
16536 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
16538 * call.c (default_parm_conversions): Remove prototype definition.
16539 (build_method_call): Remove unused variable result.
16541 * cvt.c (ocp_convert): Remove unused variable conversion.
16543 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
16545 * except.c (do_unwind): #if 0 definition of unused variables fcall
16548 * expr.c (extract_scalar_init): #if 0 prototype and function
16551 * init.c (expand_aggr_init_1): Remove unused variable init_type.
16552 (build_new_1): Remove unused variable t.
16554 * pt.c (instantiate_class_template): Remove unused variable newtag;
16555 cast called function return value to void.
16556 (do_decl_instantiation): Remove unused variables name and fn.
16558 * tree.c (get_type_decl): Add default return to shut up compiler from
16559 complaining control reaches end of non-void function.
16561 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
16563 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
16565 * call.c (default_parm_conversions): Remove prototype definition.
16566 (build_method_call): Remove unused variable result.
16567 (build_over_call): Add default case in enumeration switch.
16569 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
16571 * decl2.c (lang_decode_option): Change j's type to size_t.
16573 * tree.c (layout_vbasetypes): record_align and desired_align are of
16574 type unsigned int; const_size and nonvirtual_const_size likewise.
16576 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
16578 * parse.y (new_initializer): Make sure all initializers are
16581 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
16583 * decl2.c (import_export_decl): Mark tinfo functions for
16584 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
16586 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
16588 * method.c: Fix typo.
16590 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16592 * method.c: Include "system.h" to get stdlib.h, stdio.h,
16593 ctype.h, string.h, etc.
16594 (issue_nrepeats): Add default case in enumeration switch.
16595 (check_btype): Likewise.
16596 (process_overload_item): Likewise.
16598 * Makefile.in (method.o): Depend on system.h.
16600 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16602 * lex.c (do_scoped_id): Fix parenthesizing.
16604 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
16606 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
16607 FLAG_RTTI is unset, initialize type info machinery and continue
16608 with FLAG_RTTI enabled.
16609 (get_typeid): Likewise.
16611 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
16613 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
16616 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
16618 * pt.c (finish_member_template_decl): Deal more gracefully with
16619 invalid declarations.
16621 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
16623 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
16624 cp-tree.h: Clean up more old overloading code, old RTTI code, and
16625 some formatting quirks.
16627 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
16628 method.c, pt.c, ptree.c, typeck.c: Remove support for
16629 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
16631 * Makefile.in: Adjust.
16633 * pt.c (unify): Don't allow reduced cv-quals when strict.
16635 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
16636 *type_unification* and unify.
16638 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
16640 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
16641 (nested_name_specifier): And add it before this use.
16642 (typename_sub0): And this use. Also add use without the keyword.
16643 (typename_sub1): Likewise.
16644 * pt.c (instantiate_class_template): Don't actually instantiate
16645 anything if our type uses template parms.
16647 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
16649 * decl.c (start_function): Don't call temporary_allocation for a
16652 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16654 * pt.c (instantiate_class_template): Don't mess with friends if
16655 our type uses template parms.
16657 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
16659 * parse.y (nested_name_specifier): Use explicit_template_type.
16660 (typename_sub): Allow a template_type, an explicit_template_type,
16661 or an implicit template type at the end.
16662 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
16663 * decl.c (make_typename_type): Handle template-id where the name
16664 is a TEMPLATE_DECL.
16665 * call.c (build_scoped_method_call): Handle member template
16667 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
16668 destructor is represented by the type.
16670 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
16671 * parse.y (nested_name_specifier): Add 'template' case.
16672 (explicit_template_type): New rule.
16673 (typename_sub): Use it.
16674 * decl.c (make_typename_type): Handle getting a template-id for NAME.
16675 * pt.c (tsubst): Likewise.
16677 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
16679 * pt.c (add_to_template_args): Fix thinko.
16680 (instantiate_class_template): Call it later.
16682 * pt.c (get_class_bindings): Add outer_args parm.
16683 (most_specialized_class): Likewise.
16684 (instantiate_class_template): Pass it.
16685 (more_specialized_class): Likewise.
16686 (lookup_template_class): Get context from template if none
16688 (finish_member_template_decl): Don't do anything with a
16689 partial specialization.
16690 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
16692 * class.c (finish_struct): Member class templates have already been
16693 checked for name clashes.
16694 * decl.c (pushdecl_with_scope): Handle pushing at class level.
16696 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
16698 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
16699 (tsubst, *_PARM): Support multiple levels of template classes.
16700 (instantiate_class_template): Look up the pattern from the
16702 (lookup_template_class): Handle getting a template for d1.
16703 (push_template_decl): Correct setting of 'primary'.
16704 (reduce_template_parm_level): Add 'levels' parm.
16705 (finish_member_template_decl): Support member class templates.
16706 (template_class_depth): Handle multiple levels.
16707 * parse.y (component_decl_1, fn.def2): Remove member template case.
16708 (component_decl): Add member template cases.
16709 * decl2.c (check_member_template): We now handle member template
16711 * decl.c (pushtag): Handle member templates.
16712 * method.c (do_inline_function_hair): Don't touch
16713 IDENTIFIER_GLOBAL_VALUE.
16714 * init.c (build_offset_ref): If name isn't an identifier, just
16716 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
16718 * typeck.c (get_delta_difference): Do adjust for conversions to
16719 and from virtual base.
16721 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
16723 * typeck.c (get_delta_difference): Give hard error for conversion
16726 * cp-tree.h: Tweak formatting.
16728 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
16730 * decl.c (push_namespace): Handle redeclaration error.
16732 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
16733 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
16734 (NAMESPACE_BINDING): New macro.
16735 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
16738 * pt.c (push_template_decl): Use innermost_args.
16740 * decl.c (get_unique_name): Tweak from earlier in the name.
16742 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
16744 * cp-tree.def: Add CPLUS_BINDING node.
16745 * cp-tree.h (tree_binding): New struct.
16746 (BINDING_SCOPE, BINDING_VALUE): New macros.
16747 (current_namespace, global_namespace): Declare extern.
16748 (struct lang_decl_flags): New field in_namespace.
16749 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
16750 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
16751 (TREE_INDIRECT_USING): New macro.
16752 * decl2.c (current_namespace, global_namespace): Declare. The
16753 value is a NAMESPACE_DECL now, not a TREE_LIST.
16754 (is_namespace_ancestor, namespace_ancestor): New static functions.
16755 (add_using_namespace, ambiguous_decl): Likewise.
16756 (lookup_using_namespace): New support function for lookup_name.
16757 (qualified_lookup_using_namespace): New support function for
16758 do_scoped_id and lookup_namespace_name.
16759 (get_namespace_id): Mark as obsolete.
16760 (current_namespace_id): Likewise.
16761 (do_namespace_alias): Implement.
16762 (do_using_directive): Implement as call to add_using_namespace.
16763 * decl.c (binding_for_name): New function.
16764 (push_namespace, pop_namespace): Implement.
16765 (push_decl): Don't install a FUNCTION_DECL in the global branch.
16766 (lookup_namespace_name): Implement using qualified lookup.
16767 (lookup_name_real): For global scoping, lookup in
16768 global_namespace. For namespace scoping, lookup in given
16769 namespace. For unscoped lookup, iterate over namespace,
16770 considering using directives.
16771 (init_decl_processing): Initialize global_namespace.
16772 (grokvardecl): Build assembler name as static name for globals.
16773 (grokdeclarator): Remove old namespace mangling.
16774 (xref_tag): When installing a global binding for the
16775 tag, make sure we have an identifier.
16776 * method.c (build_overload_nested_name): Mangle namespaces.
16777 (build_qualified_name): Likewise.
16778 (build_decl_overload_real): Likewise.
16779 * lex.c (build_lang_decl): Set namespace for new declaration to
16781 (do_scoped_id): Find global names in global or current
16782 namespace, or using qualified namespace lookup, depending on
16784 * init.c (build_member_call): When scope is namespace, use
16785 build_x_function_call instead.
16786 (build_offset_ref): When scope is namespace, collapse processing
16787 to lookup_namespace_name instead.
16788 * error.c (dump_decl): Support NAMESPACE_DECL.
16789 * decl.c (pushdecl): Bind globals to current namespace.
16790 (push_overloaded_decl): Likewise.
16791 (lookup_tag): Likewise.
16792 (lookup_name_current_level): Likewise.
16793 (xref_tag): Likewise.
16794 (start_function): Likewise.
16795 * lex.c (do_identifier): Likewise.
16796 (identifier_typedecl_value): Likewise.
16797 (real_yylex): Likewise.
16798 * method.c (do_inline_function_hair): Likewise.
16799 * parse.y (unscoped): Likewise.
16800 * pt.c (check_explicit_specialization): Likewise.
16801 (lookup_template_class): Likewise.
16802 * rtti.c (call_void_fn): Likewise.
16803 * sig.c (build_sigtable): Likewise.
16804 * ptree.c (lang_print_xnode): New function.
16806 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
16808 * pt.c (instantiate_class_template): Don't instantiate if pedantic
16809 and the args use template parms.
16811 * pt.c (push_tinst_level): If the instantiation uses template parms,
16813 * decl.c (xref_basetypes): Do call complete_type for basetypes
16814 that involve template parameters.
16816 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
16818 * typeck2.c (process_init_constructor): Fix labeled init check.
16820 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
16822 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
16823 argument to tsubst and friends.
16825 * pt.c (tsubst, FUNCTION_DECL): Tidy.
16827 * typeck.c (build_x_function_call): Handle static member function
16828 templates like non-templates. Handle friend templates like normal
16829 function templates.
16830 * pt.c (tsubst, *_PARM): Don't use orig_level.
16831 (get_bindings): Don't call add_to_template_args.
16832 (instantiate_template): Likewise.
16833 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
16834 * ptree.c (print_lang_type): Print index/level for template parms.
16836 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
16838 * Make-lang.in (cc1plus): Note that cc1plus depends on
16839 cp/cp-tree.h and cp/cp-tree.def.
16841 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
16842 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
16843 position in a template parameter list.
16844 * cp-tree.h (template_parm_index): New structure, used as the tree
16845 structure for a TEMPLATE_PARM_INDEX.
16846 (TEMPLATE_PARM_IDX): New macro.
16847 (TEMPLATE_PARM_LEVEL): Likewise.
16848 (TEMPLATE_PARM_DESCENDANTS): Likewise.
16849 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
16850 (TEMPLATE_PARM_DECL): Likewise.
16851 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16852 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
16853 (TEMPLATE_TYPE_DECL): Likewise.
16854 (TEMPLATE_CONST_IDX): Remove.
16855 (TEMPLATE_CONST_LEVEL): Likewise.
16856 (TEMPLATE_CONST_SET_INFO): Likewise.
16857 (TEMPLATE_TYPE_SET_INFO): Likewise.
16858 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
16860 (TEMPLATE_TYPE_LEVEL): Likewise.
16861 * decl.c (decls_match): Call comp_template_parms, rather than
16862 expanding it inline.
16863 (duplicate_decls): If two template declarations are being merged,
16864 then their TEMPLATE_INFOs should be merged as well.
16865 (grokfndecl): Save template-id information when declaring a friend
16866 with explicit template arguments. Pass arguments to
16867 check_explicit_specialization via correct convention; at some
16868 point check_explicit_specialization changed, but these call-sites
16870 (grokdeclarator): Tidy up slightly.
16871 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
16872 two template functions with the same DECL_ASSEMBLER_NAME the same,
16873 since the names are not yet mangled.
16874 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
16875 TEMPLATE_CONST_PARM.
16876 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
16877 decl for a non-type parameter, rather than printing `<tparm ...>'.
16878 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
16879 (do_friend): Deal with template friends.
16880 * lex.c (do_pending_inlines): Call
16881 maybe_begin_member_template_processing, rather than
16882 conditionally calling begin_member_template_processing.
16883 (process_next_inline): Likewise. Call
16884 maybe_end_member_template_processing, rather than
16885 conditionally calling end_member_template_processing.
16886 (do_pending_defargs): Likewise.
16887 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
16888 TEMPLATE_CONST_PARM.
16889 * method.c (build_mangled_template_parm_index): New function.
16890 (build_overload_value): Use it.
16891 (build_overload_name): Likewise.
16892 * pt.c (finish_member_template_decl): Allow friend declarations.
16893 (template_class_depth): New function.
16894 (is_member_template): Rename, and modify, to become...
16895 (is_member_or_friend_template): New function.
16896 (end_member_template_processing): Rename, and modify, to become...
16897 (maybe_end_member_template_processing).
16898 (build_template_parm_index): New function.
16899 (reduce_template_parm_level): New function.
16900 (process_template_parm): Modify to use build_template_parm_index.
16901 (push_template_decl): Deal with friend templates.
16902 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
16903 TEMPLATE_CONST_PARM.
16904 (tsubst_friend_function): New function.
16905 (instantiate_class_template): Generate the DECL_FRIENDLIST
16906 for a new instantiation by using tsubst_friend_function rather
16908 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
16909 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
16910 appropriate new macros. Use reduce_template_parm_level to
16911 generate lower-level template parameters. Handle tsubst'ing into
16912 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
16913 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
16914 templates. Similarly for the template parameters for a new
16916 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
16917 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
16918 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
16919 (get_bindings): Call add_to_template_args if necessary.
16920 (instantiate_decl): Handle instantiations of friend templates.
16921 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
16922 TEMPLATE_TYPE_PARM as a list of fields; it's not!
16923 * spew.c (yylex): Do a little manual constant propagation to
16926 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
16928 * error.c: Include sys/types.h.
16930 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
16932 * method.c (build_mangled_name): Start CPP directives in column zero.
16934 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16936 * typeck2.c (process_init_constructor): Sorry about non-trivial
16937 labeled initializers.
16938 * parse.y (initlist): Re-enable labeled initializers.
16940 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16942 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
16943 all callers changed. Rely on the new parameter instead of arg
16944 being a TREE_LIST when determine whether we are working inside
16945 template template parameter. Clean up is_type test.
16947 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
16949 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
16950 * typeck2.c (initializer_constant_valid_p): Allow conversions
16951 between pointers and references.
16953 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
16955 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
16956 if pedantic || warn_pointer_arith.
16958 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16960 * pt.c (unify): Handle TEMPLATE_DECL.
16962 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
16964 * cp-tree.h (strip_attrs): Remove decl.
16966 1998-02-18 Doug Evans <devans@cygnus.com>
16968 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
16969 Update olddecl's attributes too.
16970 (strip_attrs): Remove function.
16971 * typeck.c (common_type): Call merge_machine_type_attributes.
16973 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
16975 * parse.y (initdcl0_innards): New grammar symbol.
16976 (nomods_initdecls, nomods_initdcl0): Change type from itype to
16977 none, since the resulting value is never used.
16978 (parse_decl): New function.
16979 (datadef): Remove redundant actions.
16980 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
16981 * parse.c: Regenerated.
16983 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
16985 * parse.y (simple_stmt): Use getdecls() to check for decl.
16987 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
16989 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
16991 (c++.install-common): Install c++filt properly as native or as cross
16993 (c++.uninstall): Add c++filt.
16995 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16997 * call.c (standard_conversion): Fix multi-level ptr conversions.
16999 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
17001 * init.c (build_new): Propagate error_mark_node up.
17003 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
17005 * parse.y (simple_stmt): If the condition isn't a declaration,
17006 start the controlled block after the test.
17008 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
17010 * call.c (build_over_call): Convert builtin abs, labs and fabs to
17012 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
17015 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
17017 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
17019 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
17021 * cp-tree.h: Add access_protected_virtual_node.
17022 * class.c (init_class_processing): Initialize it.
17023 * decl.c (xref_basetypes): Use it.
17024 * parse.y (base_class_access_list): Likewise.
17026 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
17027 (c++.install-common): Install c++filt.
17029 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17031 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
17033 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
17035 * call.c (reference_binding): Use comptypes when comparing
17036 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
17038 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
17040 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
17041 (really_overloaded_fn): Move check here from is_overloaded_fn.
17042 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
17044 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
17046 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
17049 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
17051 * cp-tree.h (push_template_decl): Return the decl passed in, or an
17052 equivalent duplicate.
17053 * decl.c (pushtag): Use the return value from push_template_decl.
17054 (duplicate_decls): When duplicating a template declaration, merge
17055 the DECL_TEMPLATE_RESULTs as well.
17056 (make_implicit_typename): Don't try to dive into typename types to
17057 find a context for making a new implicit typename.
17058 (start_decl): Use the return value from push_template_decl.
17059 (grokdeclarator): Complain about declarations list `const operator
17060 int'. Since we don't correctly handle in-class initializations of
17061 non-static data members, complain about this (now illegal)
17062 practice. Issue an error for initializations of non-const statics
17063 since that is illegal as well, and since we don't handle that case
17065 (start_function): Use the return value from push_template_decl.
17066 (start_method): Likewise.
17067 * decl2.c (grokfield): Likewise. Since the change to
17068 grokdeclarator ensures that all initialized fields are in fact
17069 static, remove a redundant test for TREE_PUBLIC.
17070 * parse.y (initlist): Disable labeled initializers since they do
17071 not work as per the documentation, and since they do not use the
17072 same syntax as the C front end.
17073 * pt.c (push_template_decl): Return the decl passed in, or an
17074 equivalent duplicate.
17075 (lookup_template_class): When searching in a nested context,
17076 use the right arguments.
17077 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
17078 * typeck.c (build_component_ref): Assign the correct type to the
17079 result of build_vfn_ref.
17081 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
17083 * pt.c (convert_nontype_argument): Fix typo.
17084 (check_explicit_specialization): Allow old-style specialization
17085 of class template members.
17087 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
17088 Manfred Hollstein <manfred@s-direktnet.de>
17090 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
17091 when deciding to override DECL_ASSEMBLER_NAME.
17093 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
17095 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
17096 * cp-tree.h (flag_do_squangling): Add declaration.
17097 * lang-options.h: Add -fsquangle and -fno-squangle.
17098 * method.c: Add macros and static variables for squangling.
17099 (build_overload_name): Rename to build_mangled_name, add logic for B
17100 compression, and split into process_modifiers and
17101 process_overload_item.
17102 (process_modifiers): New function, to handle constant, reference,
17104 (process_overload_item): New function, handles issue of type codes.
17105 (build_overload_name): New function, start squangling and call
17106 build_mangled_name.
17107 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
17108 (start_squangling): New function to initialize squangling structs.
17109 (end_squangling): New function to destroy squangling structs.
17110 (nrepeats): Rename variable to Nrepeats.
17111 (issue_nrepeats): New function for issuing 'n' type repeats.
17112 (check_ktype): New function to check for type K name compression.
17113 (build_overload_nested_name): Add a check for K name compression.
17114 (build_qualified_name): Add a check for K name compression and don't
17115 use DECL_ASSEMBLER_NAME when squangling is on.
17116 (check_btype): New function, checks for B type compression.
17117 (build_static_name, build_decl_overload_real): Initiate squangling.
17118 (build_typename_overload, build_overload_with_type): Initiate
17121 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
17123 * method.c (make_thunk): Avoid name buffer overflow.
17125 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
17127 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
17128 don't define them yet.
17130 * parse.y (nomods_initdcl0): Add constructor_declarator case.
17132 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17134 * config-lang.in (diff_excludes): Use basename only.
17136 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
17138 * tinfo2.cc: Add tinfo for signed char.
17140 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
17142 * search.c (compute_access): Handle protected constructors in derived
17143 classes as accessible.
17145 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
17147 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
17148 Call convert_from_reference sooner.
17150 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
17152 * cvt.c (ocp_convert): Obtain the constant values from constant
17153 decls even if the destination type is the same as the type of the
17156 * decl2.c (finish_file): Make sure that static inlines with
17157 definitions are not marked DECL_EXTERNAL before returning.
17159 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
17161 * decl.c: Lose arg_looking_for_template.
17162 (lookup_name_real): Likewise.
17163 * parse.y: Lose processing_template_arg, template_arg1.
17164 (primary): Likewise.
17165 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
17167 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17169 * error.c (dump_decl): Fix type of default arguments for template
17170 template parameters and nontype template parameters.
17171 * parse.y (template_parm): Handle invalid default template
17172 template arguments here.
17174 * parse.y (template_parm): Use template_arg instead of PTYPENAME
17175 for default template template argument.
17176 * pt.c (coerce_template_parms): Merge default template argument
17177 codes. Can treat RECORD_TYPE as template name if it is implicitly
17178 created. Fix argument index in error message.
17179 * typeck.c (comptypes): Merge template argument comparison codes in
17180 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
17182 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
17184 * lex.c (file_name_nondirectory): Also check for '/'.
17186 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
17188 * parse.y (primary): Deal with statement-expressions in
17190 * pt.c (tsubst_copy): Handle BIND_EXPR.
17191 * tree.c (mapcar): Likewise.
17193 * call.c (add_template_candidate_real): Pass extra parameter to
17194 fn_type_unification.
17195 * cp-tree.h (fn_type_unification): Add parameter.
17196 * pt.c (fn_type_unification): Add additional parameter to deal with
17197 static member functions.
17198 (get_bindings): Deal with static member functions.
17200 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
17201 (revert_static_member_fn): Declare.
17202 * decl.c (revert_static_member_fn): Remove declaration. Change
17203 linkage from internal to external.
17204 (cp_finish_decl): Deal with virtual functions in classes local to
17205 template functions.
17206 * decl2.c (finish_file): Don't forget to emit increment/decrement
17207 expressions in initializers for file-scope variables.
17208 * parse.y (typename_sub2): If the typename doesn't names a
17209 template, rather than a type, issue an error message.
17210 * pt.c (check_explicit_specialization): Handle specializations of
17211 static member functions.
17212 (coerce_template_parms): Handle offset references to lists of
17214 * search.c (note_debug_info_needed): Don't crash when handed a
17215 type which is being defined.
17216 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
17217 that can happen with some illegal code.
17219 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17221 * call.c (user_harshness): Initialize `code' to 0.
17222 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
17223 (null_ptr_cst_p): Add parentheses around && within ||.
17224 (standard_conversion): Likewise.
17225 (z_candidate): Likewise.
17226 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
17227 (build_object_call): Likewise for `mem_args'.
17228 (build_new_op): Likewise for `mem_arglist'. Add `return' from
17229 default case in enumeration switch.
17231 * class.c (build_vtable_entry): Add explicit braces to avoid
17233 (build_class_init_list): Likewise.
17234 (finish_struct_1): Initialize `width' to 0.
17235 (instantiate_type): Initialize `name' to NULL_TREE. Add
17236 explicit braces to avoid ambiguous `else'.
17238 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
17241 * decl.c (grok_reference_init): Eliminate unused parameter, all
17243 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
17244 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
17245 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
17246 (grokdeclarator): Add parentheses around && within ||. Add
17247 explicit braces to avoid ambiguous `else'.
17248 (grokparms): Initialize `type' to NULL_TREE.
17249 (xref_tag): Remove unused label `just_return'.
17250 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
17251 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
17252 (hack_incomplete_structures): Add parentheses around assignment
17253 used as truth value.
17255 * decl2.c (coerce_delete_type): Hide definition of `e3'.
17257 * error.c: Include <stdlib.h>.
17258 (dump_expr): Change the type of `i' to size_t. Remove unused
17261 * except.c (init_exception_processing): Remove unused variable `d'.
17262 (expand_throw): Likewise for `label'.
17264 * friend.c (add_friends): Add explicit braces to avoid ambiguous
17267 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
17268 (sort_base_init): Likewise for `binfo'.
17269 (expand_member_init): Likewise for `rval'.
17270 (build_member_call): Add parentheses around assignment used as
17272 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
17273 (build_new): Initialize `nelts' to NULL_TREE. Initialize
17274 `old_immediate_size_expand' to 0.
17275 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
17276 (build_vec_delete_1): Remove unused variable `block'.
17277 (expand_vec_init): Initialize `itype' to NULL_TREE.
17279 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
17280 declaration of `index' and `rindex' with autoconf macros.
17281 (reinit_parse_for_expr): Remove unused variables
17282 `look_for_semicolon' and `look_for_lbrac'.
17283 (cons_up_default_function): Initialize `args' to NULL_TREE.
17284 (readescape): Initialize `firstdig' to 0.
17285 (real_yylex): Add parentheses around assignment used as truth value.
17287 * method.c: Include <strings.h> if we don't have <string.h>.
17288 Protect declaration of `index' with autoconf macro.
17290 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
17291 Initialize `type' to NULL_TREE.
17292 (structsp): Remove unused variable `id'.
17294 * pt.c (coerce_template_parms): Add explicit braces to avoid
17296 (lookup_template_class): Initialize `template' to NULL_TREE.
17297 (instantiate_class_template): Remove unused variable `name' and `e'.
17298 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
17299 (do_poplevel): Initialize `saved_warn_unused' to 0.
17300 (type_unification): Remove unused varable `parm'.
17301 (unify): Likewise for `j'.
17303 * repo.c (init_repo): Add parentheses around assignment used as
17305 (finish_repo): Remove unused varable `p'.
17307 * search.c (get_binfo): Initialize `type' to NULL_TREE.
17308 (get_base_distance): Likewise.
17309 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
17310 and `new_v' to NULL_TREE.
17311 (lookup_fnfields): Likewise for `rval_binfo_h'.
17312 (breadth_first_search): Add parentheses around assignment used as
17314 (get_template_base): Initialize `type' to NULL_TREE.
17316 * sig.c (append_signature_fields): Initialize `last_mfptr' to
17318 (build_signature_table_constructor): Likewise for
17319 `last_rhs_field', `pfn' and `vt_off'.
17320 (build_sigtable): Likewise for `init'.
17322 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
17323 (propagate_binfo_offsets): Likewise for `delta'.
17324 (hash_tree_cons): Initialize hashcode to 0.
17325 (can_free): Likewise for `size'.
17326 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
17328 * typeck.c (convert_sequence): Hide prototype.
17329 (common_type): Add explicit braces to avoid ambiguous `else'.
17330 (comp_target_types): Likewise.
17331 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
17332 (build_function_call_real): Add explicit braces to avoid ambiguous
17334 (convert_arguments): Initialize `called_thing' to 0.
17335 (convert_for_initialization): Initialize `savew' and `savee' to 0.
17337 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
17338 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
17339 (build_x_arrow): Likewise for `last_rval'.
17341 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
17343 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
17345 * decl.c (init_decl_processing): Use set_sizetype.
17346 * decl2.c (sizetype): Don't declare.
17347 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
17348 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
17349 (build_component_addr, unary_complex_lvalue): Likewise.
17350 * rtti.c (expand_class_desc): Likewise.
17351 * class.c (get_vfield_offset): Likewise.
17353 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
17355 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
17356 early to avoid bogus error. Handle overloaded function
17357 names provided as template arguments correctly.
17358 (coerce_template_parms): Don't mishandle overloaded functions when
17359 dealing with template template parameters.
17360 (lookup_template_class): Issue an error message, rather than
17361 crashing, when the TYPE_DECL provided is not a template type.
17363 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
17365 * class.c (instantiate_type): Don't just return a known type if
17368 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
17370 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
17371 since that code could never be reached.
17373 * error.c (dump_decl): Avoid aborting in the midst of printing an
17374 error message about an illegal template declaration.
17376 * parse.y (structsp): Print an error message, rather than crashing,
17377 when a class-head does not name a class.
17379 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
17380 template arguments as a g++ extension.
17382 * cp-tree.def (ALIGNOF_EXPR): New tree code.
17383 * decl2.c (grok_alignof): If processing_template_decl, just store
17385 * typeck.c (c_alignof): Likewise.
17386 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
17387 * error.c (dump_expr): Likewise.
17388 * pt.c (tsubst_copy): Likewise.
17389 * tree.c (cp_tree_equal): Likewise.
17390 * pt.c (uses_template_parms): Correctly determine whether or not a
17391 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
17392 folding can be done.
17394 * cp-tree.h (grok_enum_decls): Remove type parameter.
17395 * decl.c (grok_enum_decls): Likewise.
17396 * decl2.c (grok_x_components): Call grok_enum_decls
17397 unconditionally, since it will do nothing if there is no
17398 current_local_enum. Use the new calling sequence.
17399 * pt.c (tsubst_enum): Use the new calling sequence for
17402 * decl.c (start_function): Make member functions of local classes
17403 in extern inline functions have comdat linkage here...
17404 (grokdeclarator): Rather than here.
17406 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
17408 * pt.c (convert_nontype_argument): Use decl_constant_value.
17410 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
17412 * call.c (add_template_candidate_real): New function.
17413 (add_template_candidate): Use it.
17414 (add_template_conv_candidate): Likewise.
17415 (joust): Pass extra argument to more_specialized.
17416 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
17417 (is_local_class): Remove.
17418 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
17419 * cp-tree.h (is_local_class): Remove.
17420 (perform_array_to_pointer_conversion): Likewise.
17421 (finish_member_template_decl): Add.
17422 (check_explicit_specialization): Return a tree, not an int.
17423 (more_specialized): Take additional argument.
17424 (get_bindings): Likewise.
17425 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
17426 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
17427 (perform_array_to_pointer_conversion): Remove.
17428 * decl.c (saved_scope): Add processing_specialization,
17429 processing_explicit_instantiation fields.
17430 (maybe_push_to_top_level): Save them.
17431 (pop_from_top_level): Restore them.
17432 (grokfndecl): Use new return value from
17433 check_explicit_specialization.
17434 (start_decl): Don't check flag_guiding_decls before pushing
17436 (cp_finish_decl): Remove previous (bogus) change.
17437 (grok_declarator): Use decl_function_context rather than
17439 * decl2.c (finish_file): Pass extra argument to get_bindings.
17440 (build_expr_from_tree): Let build_x_component_ref check
17441 validity of arguments rather than doing it here.
17442 * lex.c (cons_up_default_function): Remove code fooling with
17443 processing_specialization, processing_explicit_instantiation
17444 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
17445 * method.c (build_overload_identifier): Mangle local classes in
17446 template functions correctly.
17447 * parse.y (finish_member_template_decl): Move to pt.c.
17448 * pt.c (finish_member_template_decl): Moved here from parse.y.
17449 (print_candidates): New function.
17450 (determine_specialization): Change interface. Properly look for
17451 most specialized versions of template candidates.
17452 (check_explicit_specialization): Fully process explicit
17454 (push_template_decl): Avoid looking at CLASSTYPE fields in
17456 (determine_overloaded_function): Remove.
17457 (convert_nontype_argument): Change name from
17458 convert_nontype_parameter. Use determine_overloaded_function
17459 instead of instantiate_type.
17460 (mangle_class_name_for_template): Handle type contexts as well as
17462 (classtype_mangled_name): Likewise.
17463 (lookup_template_class): Likewise.
17464 (tsubst): Likewise.
17465 (more_specialized): Take explict template arguments as a
17467 (most_specialized): Likewise.
17468 (get_bindings): Likewise. Check that return types match before
17469 proclaiming a function a match.
17470 (do_decl_instantiation): Remove code searching for function to
17471 instantiate; that is now done in check_explicit_specialization.
17472 (add_maybe_template): Pass extra argument to get_bindings.
17473 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
17475 * typeck.c (build_component_ref): Check for invalid arguments.
17477 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
17479 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
17480 return_target and call_target are equivalent.
17482 * pt.c (type_unification_real): Just accept function parms that
17483 don't use any template parms.
17485 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
17487 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
17488 unset DECL_NOT_REALLY_EXTERN.
17490 * parse.y (typename_sub*): Fix std::.
17492 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
17494 * error.c (dump_decl): Fix type default template args.
17495 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
17497 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
17499 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
17500 (file_name_nondirectory): Use.
17502 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17504 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
17505 that are not really present. Substitute default arguments in
17506 template template arguments. Correctly convert TEMPLATE_DECL to
17507 TEMPLATE_TEMPLATE_PARM.
17508 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
17509 are no longer treated specially here.
17510 * parse.y (template_template_parm): Fix copy error.
17511 * decl.c (grokdeclarator): Warn about missing `typename' for nested
17512 type created from template template parameters.
17513 * parse.y (bad_parm): Likewise
17515 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
17516 (push_nested_class): Likewise.
17517 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
17518 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
17519 (copy_template_template_parm): Declare.
17520 * decl.c (arg_looking_for_template): New variable.
17521 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
17522 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
17523 node if arg_looking_for_template is nonzero.
17524 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
17525 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
17526 (grokdeclarator): Handle TEMPLATE_DECL.
17527 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
17528 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
17529 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
17530 (dump_decl): Handle unnamed template type parameters.
17531 Handle template template parameters.
17532 (dump_function_name): Handle template template parameters.
17533 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
17534 Handle TEMPLATE_TEMPLATE_PARM.
17535 * method.c (build_template_template_parm_names): New function.
17536 (build_template_parm_names): Handle TEMPLATE_DECL.
17537 (build_overload_nested_name, build_overload_name):
17538 Handle TEMPLATE_TEMPLATE_PARM.
17539 * parse.y (maybe_identifier): New nonterminal.
17540 (template_type_parm): Use it.
17541 (template_template_parm, template_arg1): New nonterminal.
17542 (template_parm): Add template_template_parm rules.
17543 (template_arg): Set processing_template_arg.
17544 (template_arg1): Rules moved from template_arg.
17545 (primary, nonnested_type): Set arg_looking_for_template if we are
17546 processing template arguments.
17547 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
17548 (process_template_parm): Handle template template parameters.
17549 (coerce_template_parms, comp_template_args): Likewise.
17550 (mangle_class_name_for_template, lookup_template_class): Likewise.
17551 (uses_template_parms): Handle TEMPLATE_DECL and
17552 TEMPLATE_TEMPLATE_PARM.
17553 (current_template_args): Handle TEMPLATE_DECL.
17554 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
17555 * search.c (dfs_walk, dfs_record_inheritance):
17556 Handle TEMPLATE_TEMPLATE_PARM.
17557 * tree.c (copy_template_template_parm): New function.
17558 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
17559 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
17561 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
17563 * decl.c (start_decl): Don't allow duplicate definitions of static
17566 * call.c (build_user_type_conversion_1): Handle user-defined
17567 template conversion operators correctly.
17569 * decl2.c (build_expr_from_tree): Issue an error message if the
17570 object in a COMPONENT_REF is a TEMPLATE_DECL.
17572 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
17574 * class.c (is_local_class): New function.
17575 * cp-tree.h (is_local_class): Declare it.
17576 (last_tree): Likewise.
17577 (begin_tree): Likewise.
17578 (end_tree): Likewise.
17579 (lookup_template_class): Change prototype.
17580 * decl.c (cp_finish_decl): Check for NULL where necessary.
17581 Consider FUNCTION_DECLS to declare objects with top-level binding,
17582 when calling make_decl_rtl.
17583 (grokdeclarator): Give members of local classes internal linkage.
17584 (start_function): Remove declaration of last_tree.
17585 (finish_function): Set flag_keep_inline_functions around call to
17586 rest_of_compilation if we are processing a member function in a
17588 (start_method): Call push_template_decl for member functions of
17589 local classes in template functions.
17590 * decl2.c (import_export_decl): Don't give external linkage to
17591 instantiations of templates with internal linkage.
17592 * parse.y (last_tree): Remove declaration.
17593 (template_type): Pass extra parameter to lookup_template_class.
17594 (self_template_type): Likewise.
17595 (structsp): Move call to reset_specialization into left_curly.
17596 (left_curly): Call reset_specialization, and begin_tree.
17597 * pt.c (saved_trees): New variable.
17598 (mangle_class_name_for_template): Change prototype. Use
17599 additional function context to name local classes in templates
17601 (classtype_mangled_name): Pass the context.
17602 (push_template_decl): Handle local classes and templates, and
17603 member functions for such classes.
17604 (convert_nontype_parameter): Fix handling of pointer-to-member
17606 (lookup_template_class): Handle local classes in templates.
17607 (tsubst): Likewise. Don't assume that template instantiations
17608 have external linkage; pay attention to the template declaration.
17609 (mark_decl_instantiated): Likewise.
17610 (begin_tree): New function.
17611 (end_tree): Likewise.
17613 * decl.c (xref_basetypes): Don't call complete_type for basetypes
17614 that involve template parameters; that can lead to infinite
17615 recursion unnecessarily.
17617 * pt.c (register_specialization): Do not register specializations
17618 that aren't ready to be registered yet.
17619 (check_explicit_specialization): Handle explicit specialization of
17620 constructors and destructors.
17621 (build_template_decl): New function.
17622 (push_template_delc): Handle out-of-class specializations of
17625 * pt.c (check_explicit_specialization): Set up the template
17626 information before registering the specialization.
17627 (coerce_template_parms): Fix thinko.
17628 (tsubst): Handle specializations of member templates correctly.
17630 * class.c (finish_struct_methods): Remove calls to
17631 check_explicit_specialization from here.
17632 (finish_struct): And insert them here.
17633 * cp-tree.h (perform_qualification_conversions): New function.
17634 (perform_array_to_pointer_conversion): Likewise.
17635 (begin_explicit_instantiation): Likewise.
17636 (end_explicit_instantiation): Likewise.
17637 (determine_specialization): Renamed from
17638 determine_explicit_specialization.
17639 (comp_template_parms): New function.
17640 (processing_explicit_instantiation): New variable.
17641 * cvt.c (perform_qualification_conversions): New function.
17642 (perform_array_to_pointer_conversion): Likewise.
17643 * decl.c (duplicate_decls): Don't consider template functions
17644 alike unless they have the same parameters. Refine handling of
17645 instantiation/specialization mismatches.
17646 (start_decl): Don't call pushdecl for template specializations,
17647 since they don't affect overloading.
17648 (start_function): Likewise.
17649 (grokfndecl): Call check_explicit_specialization a little later.
17650 Don't call duplicate_decls for memberm template specializations.
17651 (grokdeclarator): Don't update template_count for classes that are
17652 themselves specializations. Remove use of `2' as parameter to
17653 grokfndecl since that value isn't used.
17654 * lex.c (cons_up_default_function): Save and restore
17655 processing_explicit_instantiation around calls to grokfield.
17656 * parse.y (finish_member_template_decl): New function.
17657 (component_decl_1): Use it.
17658 (fn.def2): Likewise.
17659 (template_arg_list_opt): New nonterminal.
17660 (template_type): Use it.
17661 (self_template_type): Likewise.
17662 (template_id): Likewise.
17663 (object_template_id): Likewise.
17664 (notype_template_declarator): Likwise.
17665 (begin_explicit_instantiation): Likewise.
17666 (end_explicit_instantiation): Likewise.
17667 (explicit_instantiation): Use them.
17668 * pt.c (coerce_template_parms): Add parameters.
17669 (processing_explicit_instantiation): New variable.
17670 (convert_nontype_parameter): New function.
17671 (determine_overloaded_function): Likewise.
17672 (begin_explicit_instantiation): Likewise.
17673 (end_explicit_instantiation): Likewise.
17674 (retrieve_specialization): Likewise.
17675 (register_specialization): Likewise.
17676 (processing_explicit_specialization): Removed.
17677 (determine_specialization): Handle specializations of member
17678 functions of template class instantiations.
17679 (check_explicit_specialization): Refine to conform to standard.
17680 (comp_template_parms): New function.
17681 (coerce_template_parms): Call convert_nontype_parameter.
17682 (tsubst): Refine handling of member templates. Use
17683 register_specialization.
17684 (instantiate_template): Use retrieve_specialization.
17685 (do_decl_instantiation): Likewise.
17686 (instantiate_decl): Likewise.
17687 (type_unification): Improve handling of explict template
17689 * tree.c (mapcar): Return error_mark_node, rather than aborting,
17690 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
17691 * typeck.c (build_unary_op): Call determine_specialization, rather
17692 than determine_explicit_specialization.
17694 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
17696 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
17698 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17700 * error.c (dump_decl): For enum tags, output the tag, not its value.
17702 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
17704 * decl.c (init_decl_processing): Only call init_rtti_processing
17707 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
17709 * init.c (build_new_1): Split out from build_new.
17710 (build_new): Just return a NEW_EXPR.
17711 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
17713 * decl2.c (get_temp_regvar): Tweak.
17715 * cp-tree.h (TREE_CALLS_NEW): Comment out.
17716 * class.c (resolves_to_fixed_type_p): Remove use.
17717 * method.c (build_opfncall): Likewise.
17718 * call.c (build_new_op): Likewise.
17720 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
17722 * exception.cc (__eh_alloc, __eh_free): New fns.
17723 (__cp_push_exception, __cp_pop_exception): Use them.
17724 (__uncatch_exception): Call terminate here if no exception.
17725 * except.c (build_terminate_handler): New fn.
17726 (expand_start_catch_block): Use it.
17727 (expand_exception_blocks): Likewise.
17728 (alloc_eh_object): New fn.
17729 (expand_throw): Use it. Protect exception init with terminate.
17730 * typeck.c (build_modify_expr): Remove code that ignores trivial
17733 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17735 * call.c (add_builtin_candidate): Add default case in enumeration
17737 (build_new_op): Likewise.
17738 (convert_like): Likewise.
17739 * cvt.c (build_expr_type_conversion): Likewise.
17740 * tree.c (real_lvalue_p): Likewise.
17741 (lvalue_p): Likewise.
17742 (cp_tree_equal): Likewise.
17743 * typeck.c (comptypes): Likewise.
17744 (build_component_ref): Likewise.
17745 (build_function_call_real): Likewise.
17746 (build_binary_op_nodefault): Likewise.
17747 (build_unary_op): Likewise.
17748 (build_modify_expr): Likewise.
17749 * typeck2.c (initializer_constant_valid_p): Likewise.
17751 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
17753 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
17755 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
17757 * pt.c (coerce_template_parms): Make sure to digest_init if
17760 * decl.c (duplicate_decls): Make the newdecl virtual if the
17761 olddecl was, just as is done with other attributes of olddecl.
17763 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17765 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
17766 address of an OFFSET_REF.
17768 * cp-tree.def: Add AGGR_INIT_EXPR.
17769 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
17770 AGGR_INIT_EXPR where appropriate.
17771 * expr.c (cplus_expand_expr): Likewise. Simplify.
17773 * decl2.c (finish_file): Remove call to register_exception_table.
17775 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17777 * pt.c (instantiate_class_template): Don't do injection when
17778 processing_template_decl is true, as pollutes current_binding_level
17781 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
17783 * pt.c (maybe_fold_nontype_arg): Add prototype.
17785 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17787 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
17788 * error.c (dump_expr): Likewise.
17790 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
17792 * typeck.c (build_function_call_real): Remove "inline called before
17793 definition" pedwarn.
17795 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
17797 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17799 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
17801 * pt.c (type_unification_real): Change __null to type void* with
17804 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
17806 * call.c (implicit_conversion): Don't call
17807 build_user_type_conversion_1 with a NULL expr, since it will
17810 * pt.c (unify): Don't try to unify array bounds if either array is
17813 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17815 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
17816 Replace extern decls with casts.
17818 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
17819 Update last_parm_cleanup_insn.
17820 (store_after_parms): Remove.
17821 * cp-tree.h: Adjust.
17823 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17825 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
17826 (finish_file): Check DECL_COMDAT instead of weak|one_only.
17827 (import_export_vtable): Use make_decl_one_only instead of
17828 comdat_linkage for win32 tweak.
17829 (import_export_decl): Likewise.
17830 * pt.c (mark_decl_instantiated): Likewise.
17832 * decl2.c (finish_file): Lose handling of templates in pending_statics.
17834 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
17836 * decl2.c (finish_file): Lose call to expand_builtin_throw.
17837 * except.c (expand_builtin_throw): Remove.
17838 * cp-tree.h: Remove ptr_ptr_type_node.
17839 * decl.c: Likewise.
17841 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
17843 * decl.c (ptr_ptr_type_node): Define.
17844 (init_decl_processing): Initialize it.
17845 * cp-tree.h: Declare it.
17846 * exception.cc (__cp_exception_info): Use __get_eh_info.
17847 (__cp_push_exception): Likewise.
17848 (__cp_pop_exception): Likewise.
17850 From Scott Snyder <snyder@d0sgif.fnal.gov>:
17851 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
17853 (init_exception_processing): Removed saved_pc initialization.
17855 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
17857 * pt.c (instantiate_decl): Defer all templates but inline functions.
17859 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
17861 * init.c (expand_vec_init): Don't fold a list of parameters.
17863 * decl.c (copy_args_p): Handle copy elision for types with virtual
17865 * call.c (build_over_call): Likewise.
17867 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
17869 * pt.c (lookup_template_function): Copy the template arguments,
17870 not just the list containing them, to the permanent obstack.
17872 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17874 * except.c (expand_start_catch_block): suspend_momentary for the
17877 * error.c (dump_decl): Handle LOOKUP_EXPR.
17879 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
17881 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
17882 permanent obstack if we are processing a template decl.
17883 * typeck.c (build_static_cast): Likewise.
17884 (build_const_cast): Likewise.
17885 (build_reinterpret_cast): Likewise.
17887 * pt.c (coerce_template_parms): Coerce some expressions, even
17888 when processing_template_decl.
17890 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17892 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
17893 handling of pointer difference expressions.
17895 * typeck.c (comp_target_types): Comparison of function/method types
17896 is independent of nptrs.
17898 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
17900 * pt.c (tsubst): Avoid creating pointer to reference and
17901 reference to reference types.
17903 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17905 * parse.y (do_id): New nonterminal.
17906 (template_id): Use it.
17908 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17910 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
17911 * spew.c (yylex): Don't do_identifier here.
17912 * decl2.c (build_expr_from_tree): Revert last change.
17914 * decl2.c (build_expr_from_tree): Expand the name for a method call.
17915 * parse.y (object_template_id): Don't try to take the DECL_NAME.
17917 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
17919 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
17921 * call.c (build_op_delete_call): Adjust.
17923 * except.c (expand_end_catch_block): Lose rethrow region.
17924 (expand_start_catch_block): Likewise.
17925 (expand_end_catch_block): Don't expand_leftover_cleanups.
17927 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17929 * pt.c (tsubst): Remove tree_cons call (places redundant info into
17930 DECL_TEMPLATE_INSTANTIATION).
17932 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
17934 * tree.c (is_overloaded_fn): Handle getting a fn template.
17935 (really_overloaded_fn): Likewise.
17936 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
17937 * pt.c (check_explicit_specialization): Tweak.
17938 (determine_explicit_specialization): Tweak.
17940 * tree.c, cp-tree.h (get_target_expr): New fn.
17942 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
17944 * pt.c (check_explicit_specialization): Fix misspelling in
17945 diagnostic: `preceeded'.
17946 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
17949 1997-12-02 Mark Mitchell <mmitchell@usa.net>
17951 * pt.c (determine_explicit_specialization): Avoid an internal
17952 error for bad specializations.
17954 * method.c (build_overload_value): Handle SCOPE_REF.
17956 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
17958 * class.c (prepare_fresh_vtable): Enable even more complex MI
17961 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17963 * exception.cc (__check_eh_spec): Optimize a bit.
17965 * exception.cc (__cp_pop_exception): Lose handler arg.
17966 * except.c (do_pop_exception): Likewise.
17967 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
17968 (expand_end_catch_block): Likewise.
17970 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17972 * pt.c (check_explicit_specialization): Complain about using a
17973 template-id for a non-specialization.
17975 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
17977 * repo.c: Prototype rindex only if needed.
17978 * xref.c: Likewise.
17980 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17982 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
17984 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
17986 * typeck.c (build_const_cast): Handle references here instead of
17987 handing off to convert_to_reference.
17989 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
17990 TerminateFunctionCall.
17991 (init_exception_processing): Likewise. Terminate et al are now
17992 the fns, not ADDR_EXPRs.
17993 (various): Lose redundant assemble_external calls.
17994 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
17996 * cp-tree.h (struct lang_decl_flags): Add comdat.
17997 (DECL_COMDAT): New macro.
17998 * decl.c (duplicate_decls): Propagate it.
17999 (cp_finish_decl): Handle it.
18000 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
18002 * class.c: Remove static pending_hard_virtuals.
18003 (add_virtual_function): Take pointers to pending_virtuals
18004 and pending_hard_virtuals.
18005 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
18007 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
18009 * decl2.c (import_export_vtable): If we support one_only but not
18010 weak symbols, mark instantiated template vtables one_only.
18011 (import_export_decl): Likewise for tinfo functions.
18012 (finish_vtable_vardecl): Also write out vtables from explicitly
18013 instantiated template classes.
18014 * pt.c (mark_class_instantiated): Revert last change.
18016 * except.c (expand_throw): Call mark_used on the destructor.
18018 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
18020 * lex.c (lang_init): Enable flag_exceptions by default if no
18021 command line switch was specified.
18023 1997-11-26 Mark Mitchell <mmitchell@usa.net>
18025 * pt.c (unify): Handle `void' template parameters in
18028 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
18030 * rtti.c (build_dynamic_cast): Handle template case here.
18031 (build_dynamic_cast_1): Not here.
18033 * typeck2.c (digest_init): Make copies where appropriate.
18035 * decl2.c (delete_sanity): resolve_offset_ref.
18037 * except.c: Call terminate without caching so many bits.
18039 * except.c (expand_start_catch_block): Fix catching a reference
18042 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
18044 * init.c (build_new): Copy size to the saveable obstack.
18046 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
18047 TRY_CATCH_EXPR for now.
18049 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18051 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
18052 has DECL_LANG_SPECIFIC.
18054 * exception.cc (struct cp_eh_info): Add handlers field.
18055 (__cp_push_exception): Initialize it.
18056 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
18057 (__throw_bad_exception): Remove.
18058 * except.c (call_eh_info): Add handlers field.
18059 (get_eh_handlers): New fn.
18060 (push_eh_cleanup): Increment handlers.
18062 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
18064 * except.c (expand_start_eh_spec): Use the try/catch code.
18065 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
18066 doing everything inline.
18067 (init_exception_processing): throw_type_match now takes
18068 const void pointers.
18069 * exception.cc (__check_eh_spec): New fn.
18070 * inc/exception: Neither terminate nor unexpected return.
18071 * decl.c: Make const_ptr_type_node public.
18072 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
18074 * except.c (expand_start_catch_block): We only need the rethrow
18075 region for non-sjlj exceptions.
18076 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
18078 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
18080 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
18081 (various.o): Likewise.
18082 * inc/new: Add placement deletes. Add throw specs for default new.
18083 * new.cc (set_new_handler): Move here from libgcc2.
18084 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
18085 (new): Move from libgcc2. Throw bad_alloc.
18086 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
18087 * decl.c (init_decl_processing): Update exception specs on new and
18090 * method.c (build_decl_overload_real): Don't mess with global
18093 * init.c (build_new): Check for null throw spec, not nothrow_t.
18095 * decl.c (duplicate_decls): Don't complain about different exceptions
18096 from an internal declaration.
18098 * call.c (build_op_delete_call): Fix check for member fns again.
18100 * decl2.c (import_export_decl): Interface hackery affects
18101 virtual synthesized methods.
18103 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18105 * decl.c (start_decl): Don't just complain about a mismatched
18108 * decl.c (make_implicit_typename): Handle case where t is not
18109 actually from context.
18110 * tree.c (get_type_decl): Lose identifier case.
18111 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
18112 * parse.y (nonnested_type): Just use lookup_name.
18113 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
18115 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
18117 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
18118 T was built in C language context (for example, by
18119 output_func_start_profiler).
18121 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
18123 * decl.c (make_implicit_typename): New fn.
18124 (lookup_name_real): Use it. Use current_class_type as the context.
18126 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
18128 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
18130 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18132 * friend.c (do_friend): Warn about non-template friends in templates.
18134 * call.c (build_op_delete_call): Fix handling of inherited delete.
18136 * search.c (dfs_record_inheritance): Ignore template type parms.
18138 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
18140 * call.c (build_new_op): Fix copy error.
18141 (build_op_new_call): New fn.
18142 (build_op_delete_call): New fn.
18143 * cp-tree.h: Declare them.
18144 * init.c (build_new): Use them. Support placement delete.
18145 (build_x_delete): Use build_op_delete_call.
18146 (build_delete): Likewise.
18147 * decl2.c (delete_sanity): Likewise.
18148 (coerce_delete_type): Don't complain about placement delete.
18150 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18152 * call.c (build_new_function_call): Remove unused 'obj' parm.
18153 * cp-tree.h, typeck.c: Adjust.
18155 * init.c (build_new): Make the cleanup last longer.
18156 (expand_vec_init): Call do_pending_stack_adjust.
18158 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
18160 * pt.c (do_type_instantiation): Fix typo.
18161 (mark_class_instantiated): If we support one_only but not weak
18162 symbols, don't mark this as known.
18164 * init.c (build_new): Handle vec delete in EH cleanup.
18166 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18168 * call.c (build_method_call): Call complete_type before checking
18171 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
18173 * decl.c (add_block_current_level): Delete.
18174 * init.c (build_vec_delete_1): Delete build_block and
18175 add_block_current_level calls.
18177 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
18179 * init.c (build_new): Handle freeing allocated memory when the
18180 constructor throws.
18182 * call.c (build_new_method_call): Fix flags arg.
18184 * pt.c (do_type_instantiation): Don't try to instantiate
18186 (mark_decl_instantiated): If we support one_only but not
18187 weak symbols, mark this one_only.
18188 * decl2.c (import_export_vtable): Don't defer handling of vtables
18189 if MULTIPLE_SYMBOL_SPACES.
18191 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18193 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
18195 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
18197 * except.c (do_pop_exception): Return a value.
18199 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
18201 * call.c (build_new_method_call): Handle getting a
18202 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
18203 if we got template parms.
18204 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
18206 * decl2.c (build_expr_from_tree): Tweak last change.
18207 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
18208 (maybe_fold_nontype_arg): Split out from tsubst_copy.
18209 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
18211 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
18213 * pt.c (tsubst_copy): Handle explicit template arguments in
18215 * typeck.c (build_x_function_call): Likewise.
18216 * decl2.c (build_expr_from_tree): Lookup function name if it
18219 * pt.c (tsubst): Instantiate template functions properly when
18220 template parameter does not appear in function arguments and return
18222 (comp_template_args): Handle member templates required by tsubst.
18224 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18226 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
18229 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18231 * pt.c (coerce_template_parms): Tweak error message.
18233 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
18234 return type defaults to `int', even if there are storage-class
18237 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18239 Complete nested exception support.
18240 * except.c (do_pop_exception): Split out...
18241 (push_eh_cleanup): From here. Handle the EH region by hand.
18242 (expand_start_catch_block): Add a new level for the catch parm.
18243 Move the rethrow region outside the two cleanup regions.
18244 Protect the initializer for the catch parm with terminate.
18245 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
18246 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
18247 popping off the middle of the stack.
18248 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
18249 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
18250 (build_cplus_new): Only wrap CALL_EXPRs.
18251 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
18252 the constructor call.
18254 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18256 * Make-lang.in (c++.distdir): Make inc subdirectory.
18258 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18260 * decl2.c (finish_file): Put back some code.
18262 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18264 * decl2.c (finish_file): Remove redundant code.
18265 * method.c (emit_thunk): Don't let the backend defer generic thunks.
18267 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
18269 * except.c (call_eh_info): Split out...
18270 (push_eh_info): From here.
18271 (expand_builtin_throw): Use it.
18272 (expand_start_catch_block): Move region start back.
18274 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
18276 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
18277 (real_yylex): Record wide strings using target endianness, not host.
18279 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
18281 * repo.c (rindex): Add decl unconditionally.
18282 (get_base_filename, open_repo_file): Don't cast rindex.
18283 * xref.c (rindex): Add decl unconditionally.
18284 (index): Remove unused decl.
18285 (open_xref_file): Don't cast rindex.
18287 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18289 * class.c (build_vbase_path): Propagate the result type properly.
18291 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
18293 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
18294 remaining use of saved_throw_type with a call to get_eh_type.
18296 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
18298 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
18299 (file_name_nondirectory): New function, doing the same as the macro.
18300 (set_typedecl_interface_info): Use it instead of the macro.
18301 (check_newline): Likewise.
18302 (handle_cp_pragma): Likewise.
18304 * repo.c (get_base_filename): Cast result of rindex to char*.
18305 (open_repo_file): Likewise.
18306 * xref.c (open_xref_file): Likewise.
18307 * error.c (dump_char): Make its arg int, not char.
18309 * except.c (push_eh_info): Pass the number of fields - 1 down, not
18310 the exact number of fields.
18312 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
18314 Support for nested exceptions.
18315 * tinfo2.cc (__is_pointer): New fn.
18316 * exception.cc (struct cp_eh_info): Define.
18317 (__cp_exception_info, __uncatch_exception): New fns.
18318 (__cp_push_exception, __cp_pop_exception): New fns.
18319 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
18321 (init_exception_processing): Likewise. __eh_pc is now external.
18322 (push_eh_info): New fn.
18323 (get_eh_{info,value,type,caught}): New fns.
18324 (push_eh_cleanup): Just call __cp_pop_exception.
18325 (expand_start_catch_block): Use push_eh_info. Start the eh region
18327 (expand_end_eh_spec): Use push_eh_info.
18328 (expand_throw): Call __cp_push_exception to set up the exception info.
18329 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
18331 (expand_builtin_throw): Don't refer to empty_fndecl.
18333 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
18335 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
18337 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
18339 * method.c (build_template_parm_names, build_decl_overload_real):
18340 Add static to definitions.
18341 * pt.c (add_to_template_args, note_template_header,
18342 processing_explicit_specialization, type_unification_real): Likewise.
18343 ({determine,check}_explicit_specialization): Use a single string for
18346 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
18348 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
18349 (expand_end_catch_block): Likewise.
18350 (expand_end_eh_spec): Likewise.
18352 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
18354 * decl.c (duplicate_decls): Handle template specializations
18356 * error.c (dump_function_name): Fix printing of specializations of
18357 member functions that are not member templates.
18358 * cp-tree.h (processing_specialization): Make global.
18359 * pt.c (processing_specialization): Likewise.
18360 * lex.c (cons_up_default_function): Save and restore
18361 processing_specialization to avoid confusion.
18363 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
18365 * decl.c (init_decl_processing): Give null_node unknown* type.
18366 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
18367 (common_type): Likewise.
18368 * error.c (args_as_string): Recognize null_node.
18370 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18372 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
18373 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
18375 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
18377 * Make-lang.in (g++): Include prefix.o.
18379 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
18381 * pt.c (determine_explicit_specialization): Initialize "dummy"
18382 to keep Purify quiet.
18384 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
18386 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
18387 (build_overload_int): Not here.
18389 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
18391 * class.c (build_type_pathname): Remove.
18392 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
18394 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
18396 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
18397 &&label GNU extension.
18399 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
18401 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
18402 so as to avoid incorrect manglings.
18403 * method.c (build_decl_overload_real): Don't mangle return types
18406 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
18408 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
18409 scratch_tree_cons): Define as macros for now.
18410 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
18411 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
18412 typeck2.c: Use them and the expression_obstack variants.
18414 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18416 * decl.c (store_return_init): Allow classes with explicit ctors to
18417 be used with the named return values extension.
18419 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
18421 * pt.c (instantiate_decl): Fix previous change.
18423 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
18425 * pt.c (tsubst): Fix thinko.
18426 (instantiate_decl): Really use the original template.
18428 * call.c (build_new_method_call): Use simple constructor_name for
18431 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
18433 * method.c (build_underscore_int): Don't use ANSI specific
18436 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
18438 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
18439 for our key method; it might have been inlined by -O3.
18441 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
18443 * decl.c (make_typename_type): Do not try to call lookup_field for
18444 non-aggregate types.
18446 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
18448 * typeck.c (build_reinterpret_cast): Tweak.
18450 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
18452 * typeck.c (build_reinterpret_cast): Converting a void pointer
18453 to function pointer with a reinterpret_cast produces a warning
18454 if -pedantic is issued.
18456 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
18458 * typeck.c (c_expand_return): Don't warn about returning a
18459 reference-type variable as a reference.
18461 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
18463 * method.c (build_static_name): Fix typo.
18465 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
18467 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
18468 OLDDECL before we try to do DECL_USE_TEMPLATE.
18470 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18472 * decl.c (duplicate_decls): Don't warn about template instances.
18474 * typeck.c (mark_addressable): Lose ancient code that unsets
18477 * pt.c (do_decl_instantiation): Lose support for instantiating
18480 * call.c (build_new_function_call): Fix handling of null explicit
18482 (build_new_method_call): Likewise.
18484 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
18486 * method.c (build_underscore_int): Fix typo.
18488 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
18490 * tree.c (print_lang_statistics): #if 0 call to
18491 print_inline_obstack_statistics until its definition is checked in.
18493 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
18495 * decl2.c (finish_file): Move dump_tree_statistics to end.
18497 * pt.c (instantiate_decl): Look for the original template.
18498 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
18499 of member templates.
18501 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18503 * Makefile.in (g++FAQ.*): New rules.
18504 (CONFLICTS): Update.
18505 * g++FAQ.texi: Moved from libg++.
18507 * parse.y (PFUNCNAME): Only specify the type once.
18509 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
18511 * lex.c (real_yylex): Clean up the code to fully behave the way
18512 the c-lex.c parser does for complex and real numbers.
18514 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18516 * method.c (build_decl_overload_real): Reformat.
18518 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
18520 * method.c (synthesize_method): If at_eof, determine our linkage.
18522 1997-09-29 Paul Eggert <eggert@twinsun.com>
18524 * lex.c (real_yylex): Treat `$' just like `_', except issue a
18525 diagnostic if !dollars_in_ident or if pedantic.
18527 * lang-specs.h (@c++): -ansi no longer implies -$.
18529 * decl2.c (lang_decode_option):
18530 -traditional and -ansi now do not mess with
18533 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
18535 * Makefile.in (parse.o, decl.o): Also depend on
18536 $(srcdir)/../except.h $(srcdir)/../output.h.
18537 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
18538 $(srcdir)/../except.h $(srcdir)/../output.h.
18539 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
18542 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
18544 * expr.c (cplus_expand_expr): Make it static.
18546 * decl2.c, init.c, typeck.c: Include "expr.h".
18547 (expand_expr): Use proper values when calling the function.
18549 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
18551 * lang-options.h: New -Wold-style-cast flag.
18552 * cp-tree.h (warn_old_style_cast): New variable.
18553 * decl2.c (warn_old_style_cast): Likewise.
18554 (lang_decode_option): Support -Wold-style-cast.
18555 (reparse_absdcl_as_casts): Produce old-style-cast warning.
18557 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18559 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
18560 TREE_USED, reset value based on already_used.
18562 * init.c (expand_member_init): Revert change.
18564 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
18566 * cp-tree.h, decl.c, decl2.c, pt.c:
18567 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
18569 * decl2.c (lang_decode_option): Add missing ;.
18571 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
18573 * friend.c (do_friend): Disable injection for all template-derived
18575 * decl2.c (lang_decode_option): Handle -fguiding-decls.
18576 * parse.y (notype_template_declarator): New nonterminal.
18577 (direct_notype_declarator): Use it.
18578 (complex_direct_notype_declarator): Likewise.
18579 (object_template_id): Accept any kind of identifier after TEMPLATE.
18580 (notype_qualified_id): Don't add template declarators here.
18582 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
18584 * call.c (add_template_candidate): Add explicit_targs parameter.
18585 (build_scoped_method_call): Use it.
18586 (build_overload_call_real): Likewise.
18587 (build_user_type_conversion_1): Likewise.
18588 (build_new_function_call): Likewise.
18589 (build_object_call): Likewise.
18590 (build_new_op): Likewise.
18591 (build_new_method_call): Likewise.
18592 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
18593 (build_new_method_call): Likewise.
18595 * class.c (finish_struct_methods): Add specialization pass to
18596 determine which methods were specializing which other methods.
18597 (instantiate_type): Handle TEMPLATE_ID_EXPR.
18599 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
18601 * cp-tree.h (name_mangling_version): New variable.
18602 (flag_guiding_decls): Likewise.
18603 (build_template_decl_overload): New function.
18604 (begin_specialization): Likewise.
18605 (reset_specialization): Likewise.
18606 (end_specialization): Likewise.
18607 (determine_explicit_specialization): Likewise.
18608 (check_explicit_specialization): Likewise.
18609 (lookup_template_function): Likewise.
18610 (fn_type_unification): Add explicit_targs parameter.
18611 (type_unification): Likewise.
18613 * decl.c (duplicate_decls): Add smarts for explicit
18615 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
18617 (grokfndecl): Call check_explicit_specialization.
18619 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
18620 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
18621 (check_classfn): Handle specializations.
18623 * error.c (dump_function_name): Print specialization arguments.
18625 * friend.c (do_friend): Don't call pushdecl for template
18628 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
18630 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
18631 and -fno-guiding-decls.
18633 * lex.c (identifier_type): Return PFUNCNAME for template function
18636 * method.c (build_decl_overload_real): New function.
18637 (build_template_parm_names): New function.
18638 (build_overload_identifier): Use it.
18639 (build_underscore_int): New function.
18640 (build_overload_int): Use it. Add levels for template
18642 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
18643 (build_overload_nested_names): Handle template type parameters.
18644 (build_template_decl_overload): New function.
18646 * parse.y (YYSTYPE): New ntype member.
18647 (nested_name_specifier): Use it.
18648 (nested_name_specifier_1): Likewise.
18649 (PFUNCNAME): New token.
18650 (template_id, object_template_id): New non-terminals.
18651 (template_parm_list): Note specializations.
18652 (template_def): Likewise.
18653 (structsp): Likewise.
18654 (fn.def2): Handle member template specializations.
18655 (component_decl_1): Likewise.
18656 (direct_notype_declarator): Handle template-ids.
18657 (component_decl_1): Likewise.
18658 (direct_notype_declarator): Handle template-ids.
18659 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
18661 * pt.c (processing_specializations): New variable.
18662 (template_header_count): Likewise.
18663 (type_unification_real): New function.
18664 (processing_explicit_specialization): Likewise.
18665 (note_template_header): Likewise.
18666 (is_member_template): Handle specializations.
18667 (end_template_decl): Call reset_specialization.
18668 (push_template_decl): Handle member template specializations.
18669 (tsubst): Likewise.
18670 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
18671 (instantiate_template): Handle specializations.
18672 (instantiate_decl): Likewise.
18673 (fn_type_unification): Handle explicit_targs.
18674 (type_unification): Likewise. Allow incomplete unification
18675 without an error message, if allow_incomplete.
18676 (get_bindings): Use new calling sequence for fn_type_unification.
18678 * spew.c (yylex): Handle PFUNCNAME.
18680 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
18681 (really_overloaded_fn): Likewise.
18682 (get_first_fn): Handle function templates.
18684 * typeck.c (build_x_function_call): Use really_overloaded_fn.
18685 Handle TEMPLATE_ID_EXPR.
18686 (build_x_unary_op): Likewise.
18687 (build_unary_op): Likewise.
18688 (mark_addressable): Templates whose address is taken are marked
18691 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
18693 * decl.c (init_decl_processing): Declare __builtin_constant_p as
18694 accepting any kind of type, not only int.
18696 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18698 * search.c (get_matching_virtual): Notice virtual bases when sorrying
18699 about covariant returns.
18701 * parse.y (member_init): Also imply typename here. Remove ancient
18702 extension for initializing base members.
18704 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18706 Handle multi-level typenames and implicit typename in base list.
18707 * parse.y (typename_sub{,[0-2]}): New rules.
18708 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
18709 (nonnested_type): New rule.
18710 (complete_type_name): Use it.
18711 (base_class.1): Use typename_sub and nonnested_type.
18712 (nested_name_specifier): Don't elide std:: here.
18713 * decl.c (make_typename_type): Handle getting a type for NAME.
18714 (lookup_name_real): Turn std:: into :: here.
18716 Rvalue conversions were removed in London.
18717 * call.c (is_subseq): Don't consider lvalue transformations.
18718 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
18719 (joust): Re-enable ?: kludge.
18721 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
18723 * decl.c (start_function): Up warning of no return type to be a
18726 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18728 * init.c (expand_member_init): Don't set TREE_USED.
18729 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
18730 set,don't clear TREE_USED wholesale.
18732 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
18734 * call.c (build_over_call): Do require_complete_type before
18737 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
18739 * search.c (lookup_field): Call complete_type in all cases.
18741 * decl.c (finish_function): Just warn about flowing off the end.
18743 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18745 * decl.c (grokparms): Don't bash a permanent list node if we're
18748 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
18750 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
18752 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18754 * call.c (build_new_op): Give better error for syntactically
18755 correct, but semantically invalid, use of undeclared template.
18757 * call.c (compare_qual): Handle pmfs.
18759 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
18760 after the exception spec.
18762 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18764 * call.c (null_ptr_cst_p): Integer type, not integral type.
18766 * call.c (joust): Disable warnings until they can be moved to the
18769 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
18771 * Makefile.in, config-lang.in: Convert to autoconf.
18773 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18775 * decl.c (lookup_name_real): Add implicit 'typename' to types from
18778 * pt.c (most_specialized_class): Fix typo.
18779 (tsubst): Move constant folding to TREE_VEC case.
18781 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
18783 * pt.c (do_poplevel): Don't warn about unused local variables
18784 while processing_template_decl since we don't always know whether
18785 or not they will need constructing/destructing.
18787 * pt.c (uses_template_parms): Check the values of an enumeration
18788 type to make sure they don't depend on template parms.
18790 * decl.c (make_typename_type): Don't lookup the field if the
18791 context uses template parms, even if we're not
18792 processing_template_decl at the moment.
18794 * pt.c (coerce_template_parms): Avoid looking at the
18795 TYPE_LANG_DECL portion of a typename type, since there won't be
18797 (tsubst): Do constant folding as necessary to make sure that
18798 arguments passed to lookup_template_class really are constants.
18800 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18802 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
18803 * decl2.c (finish_file): Only register exception tables if we
18806 * decl.c (init_decl_processing): Add __builtin_[fs]p.
18808 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18810 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
18812 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
18814 * error.c (dump_decl): Avoid crashing when presented with a
18815 uninitialized constant, as can occur with a template parameter.
18816 (dump_expr): Make sure that there are enough levels of
18817 current_template_parms before we start diving through them.
18819 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
18821 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
18824 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18826 * except.c (expand_throw): Call build_delete for all
18827 exception types, not just objects with destructors.
18829 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
18831 * decl.c (current_local_enum): Remove static.
18832 * pt.c (tsubst_enum): Save and restore value of current_local_enum
18833 in case template is expanded in enum decl.
18834 (instantiate_class_template): Use new tsubst_enum signature.
18835 (tsubst_expr): Likewise.
18837 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
18839 * pt.c (begin_member_template_processing): Take a function as
18840 argument, not a set of template arguments. Use the template
18841 parameters, rather than the arguments. Handle non-type parameters
18842 correctly. Push a binding level for the parameters so that multiple
18843 member templates using the same parameter names can be declared.
18844 (end_member_template_processing): Pop the binding level.
18845 (push_template_decl): Mark member templates as static when
18848 * lex.c (do_pending_inlines): Pass the function, not its template
18849 arguments, to begin_member_template_processing.
18850 (process_next_inline): Likewise.
18851 (do_pending_defargs): Likewise.
18853 * error.c (dump_expr): Obtain the correct declaration for a
18854 TEMPLATE_CONST_PARM.
18856 * call.c (add_template_conv_candidate): New function.
18857 (build_object_call): Handle member templates, as done in the other
18860 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
18862 * decl.c (replace_defag): Undo previous change.
18863 * lex.c (do_pending_defargs): Deal with member templates.
18865 * pt.c (is_member_template): Avoid crashing when passed a
18866 non-function argument.
18868 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18870 * class.c (grow_method): Remove check for redeclaration.
18872 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
18874 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
18875 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
18876 (PRIMARY_TEMPLATE_P): Use it.
18877 * call.c (build_overload_call_real): Use it.
18878 * class.c (instantiate_type): Likewise.
18879 * decl.c (decls_match): Likewise.
18880 * method.c (build_overload_identifier): Likewise.
18881 * pt.c (push_template_decl): Likewise.
18882 (classtype_mangled_name): Likewise.
18883 (lookup_template_class): Likewise.
18885 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
18886 DECL_NTPARMS to conform to usage elsewhere.
18887 * call.c (add_template_candidate): Likewise.
18888 * class.c (instantiate_type): Likewise.
18889 * pt.c (instantiate_template): Likewise.
18890 (get_bindings): Likewise.
18892 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
18893 is_member_template.
18895 * pt.c (unify): Undo changes to allow multiple levels of template
18897 (type_unification): Likewise.
18898 (fn_type_unification): Likewise.
18899 (get_class_bindings): Likewise.
18900 * cp-tree.h (Likewise).
18902 * decl.c (replace_defarg): Check that the type of the default
18903 parameter does not invlove a template type before complaining
18904 about the initialization.
18906 * error.c (dump_expr): Deal with template constant parameters in
18907 member templates correctly.
18909 * pt.c (is_member_template): Deal with class specializations
18911 (tsubst): Handle "partial instantiation" of member templates
18914 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
18916 * pt.c (type_unification): Change calling sequence to allow for
18917 multiple levels of template parameters.
18918 (tsubst_expr): Likewise.
18919 (tsubst): Likewise.
18920 (tsubst_copy): Likewise.
18921 (instantiate_template): Likewise.
18923 * call.c (build_overload_call_real): Use it.
18924 (add_builtin_candidate): Use it.
18925 (build_new_method_call): Use it.
18926 * class.c (instantiate_type): Use it.
18927 * decl.c (grokdeclarator): Use it.
18928 * decl2.c (finish_file): Use it.
18929 * method.c (build_overload_identifier): Use it.
18931 * call.c (add_template_candidate): Add additional parameter for
18932 the function return type. Call fn_type_unification istead of
18934 (build_user_type_conversion_1): Handle member templates.
18935 (build_new_function_call): Likewise.
18936 (build_new_op): Likewise.
18937 (build_new_method_call): Likewise.
18939 * class.c (grow_method): Don't give an error message indicating
18940 that two member templates with the same name are ambiguous.
18941 (finish_struct): Treat member template functions just like member
18944 * cp-tree.h (check_member_template): Add declaration.
18945 (begin_member_template_processing): Likewise.
18946 (end_member_template_processing): Likewise.
18947 (fn_type_unification): Likewise.
18948 (is_member_template): Likewise.
18949 (tsubst): Change prototype.
18950 (tsubst_expr): Likewise.
18951 (tsubst_copy): Likewise.
18952 (instantiate_template): Likewise.
18953 (get_bindings): Likewise.
18955 * decl.c (decls_match): Handle multiple levels of template
18957 (pushdecl): Handle template type params just like other type
18959 (push_class_level_binding): Return immediately if the
18960 class_binding_level is NULL.
18961 (grokfndecl): If check_classfn() returns a member_template, use
18962 the result of the template, not the template itself.
18964 * decl2.c (check_member_template): New function. Check to see
18965 that the entity declared to be a member template can be one.
18966 (check_classfn): Allow redeclaration of member template functions
18967 with different types; the new functions can be specializations or
18968 explicit instantiations.
18970 * error.c (dump_decl): Handle multiple levels of template
18972 (dump_function_decl): Update to handle function templates.
18974 * lex.c (do_pending_inlines): Set up template parameter context
18975 for member templates.
18976 (process_next_inline): Likewise.
18978 * method.c (build_overload_identifier): Adjust for multiple levels
18979 of template parameters.
18981 * parse.y (fn.def2): Add member templates.
18982 (component_decl_1): Likewise.
18984 * pt.c (begin_member_template_processing): New function.
18985 (end_member_template_processing): Likewise.
18986 (is_member_template): Likewise.
18987 (fn_type_unification): Likewise.
18988 (current_template_parms): Return a vector of all the template
18989 parms, not just the innermost level of parms.
18990 (push_template_decl): Deal with the possibility of member
18992 (lookup_template_class): Likewise.
18993 (uses_template_parms): Likewise.
18994 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
18995 TEMPLATE_CONST_PARM to deal with multiple levels of template
18996 arguments. Add processing of TEMPLATE_DECL to produce new
18997 TEMPLATE_DECLs from old ones.
18998 (do_decl_instantiation): Handle member templates.
19000 * search.c (lookup_fnfields_1): Handle member template conversion
19003 * tree.c (cp_tree_equal): Check the levels, as well as the
19004 indices, of TEMPLATE_CONST_PARMs.
19006 * typeck.c (comptypes): Check the levels, as well as the indices,
19007 fo TEMPLATE_TYPE_PARMs.
19008 (build_x_function_call): Treat member templates like member
19011 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19013 * typeck.c (c_expand_return): Always convert_for_initialization
19014 before checking for returning a pointer to local.
19016 * pt.c (type_unification): If strict and the function parm doesn't
19017 use template parms, just compare types.
19019 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
19021 * method.c (build_overloaded_value): Replace direct call
19022 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
19024 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19026 * typeck.c (convert_arguments): Don't arbitrarily choose the first
19027 of a set of overloaded functions.
19029 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
19031 * lex.c (real_yylex): Don't elide __FUNCTION__.
19033 * method.c (build_overload_value): Add in_template parm.
19034 (build_overload_int): Likewise.
19035 (build_overload_identifier): Pass it.
19037 * decl.c (duplicate_decls): Don't bash a previous template
19038 definition with a redeclaration.
19040 * pt.c (unify): float doesn't match double.
19042 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
19043 TYPE_DECL. Handle getting non-template types.
19044 * parse.y (explicit_instantiation): Use typespec instead of
19045 aggr template_type.
19047 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
19049 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
19051 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
19053 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
19054 (compare_ics): Likewise.
19056 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
19058 * call.c (joust): Warn about choosing one conversion op over
19059 another because of 'this' argument when the other return type is
19061 (source_type): New fn.
19063 * call.c (build_new_op): Strip leading REF_BIND from first operand
19064 to builtin operator.
19066 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
19069 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19071 * call.c (null_ptr_cst_p): Remove support for (void*)0.
19073 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
19075 * typeck.c (expand_target_expr): Make definition match declaration.
19077 * class.c (get_basefndecls): Make definition match declaration.
19079 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
19081 * input.c (sub_getch): Eventually give up and release the input file.
19083 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
19086 * call.c (joust): Tweak message.
19088 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
19090 * error.c (type_as_string): Put const/volatile on template type
19091 parameters where appropriate.
19093 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
19095 * call.c (strictly_better): Make arguments unsigned ints.
19097 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
19099 * lex.c (real_yylex): Refer to __complex instead of complex.
19101 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
19103 * lex.c (real_yylex): Don't use getc directly.
19105 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19107 * call.c (is_subseq): Don't try to be clever.
19109 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
19111 * parse.y, pt.c: Include "except.h".
19112 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
19113 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
19114 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
19115 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
19118 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
19120 * decl2.c (mark_vtable_entries): Instead of replacing pure
19121 virtuals with a reference to __pure_virtual, copy the decl and
19124 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
19126 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
19128 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
19130 * pt.c (instantiate_class_template): Call repo_template_used
19131 before finish_prevtable_vardecl.
19133 * call.c (is_subseq): New fn.
19134 (compare_ics): Use it.
19136 * repo.c (finish_repo): Don't crash on no args.
19138 * parse.y (named_complex_class_head_sans_basetype): Handle
19139 explicit global scope.
19140 * decl2.c (handle_class_head): New fn.
19142 * pt.c (unify): Add CONST_DECL case.
19144 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19146 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
19148 * cp-tree.h (report_type_mismatch): Add prototype.
19149 * call.c (build_overload_call_real): Remove erroneous fourth
19150 argument to report_type_mismatch.
19151 (build_user_type_conversion_1): Remove erroneous second arg to
19153 (build_new_function_call): Likewise.
19154 (build_object_call): Likewise.
19155 (build_new_op): Likewise.
19156 (build_new_method_call): Likewise.
19158 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19160 * error.c (dump_decl): Don't bother processing a function with no
19161 DECL_LANG_SPECIFIC.
19163 * method.c (emit_thunk): Call init_function_start in the macro case.
19165 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
19167 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
19168 defined and used to set flag_vtable_thunks.
19170 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19172 * parse.y: Don't clear the inlines from their obstack until they've
19173 all been processed.
19175 * decl.c (duplicate_decls): Don't complain about exception
19176 specification mismatch if flag_exceptions is off.
19178 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
19180 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
19182 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
19184 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
19185 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
19186 Include <stdio.h> before include files that formerly used STDIO_PROTO.
19188 * decl.c, g++spec.c, lex.c, method.c, repo.c:
19189 Include "config.h" first, as per autoconf manual.
19191 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19193 * decl.c (duplicate_decls): Tweak wording.
19194 * lex.c (do_pending_defargs): Don't die if we see a default arg
19195 that isn't a DEFAULT_ARG.
19196 * error.c (dump_expr): Handle DEFAULT_ARG.
19198 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
19199 * lang-options.h: Add -fhandle-exceptions.
19201 * class.c (build_vtable): Vtables are artificial.
19202 (prepare_fresh_vtable): Likewise.
19204 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19206 * cvt.c (ocp_convert): After converting to the target type, set
19207 LOOKUP_NO_CONVERSION.
19209 * call.c (joust): Warn about potentially confusing promotion rules
19211 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
19213 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
19215 * exception.cc: Declare __terminate_func with noreturn attribute.
19217 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
19219 * parse.y: Break out eat_saved_input, handle errors.
19220 (function_try_block): Use compstmt instead of compstmt_or_error.
19222 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
19224 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
19226 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19228 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
19229 existence of cc1plus check whether $(LANGUAGES) contains C++.
19231 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
19233 * method.c (do_build_copy_constructor): When copying an anonymous
19234 union member loop around to handle nested anonymous unions. Use
19235 the offset of the member relative to the outer structure, not the
19238 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19240 * call.c (resolve_args): New fn.
19241 (build_new_function_call): Use it.
19242 (build_object_call): Likewise.
19243 (build_new_method_call): Likewise.
19245 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
19247 * call.c (build_over_call): tsubst all default parms from templates.
19249 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
19251 * decl.c (struct cp_function): Add static_labelno.
19252 (push_cp_function_context): Save it.
19253 (pop_cp_function_context): Restore it.
19255 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19257 * typeck.c (build_component_ref_1): Convert from reference.
19259 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19261 * parse.y (current_declspecs, prefix_attributes): Initialize to
19264 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
19265 before we try to force it to be a TREE_LIST.
19266 (decl): Make sure $1.t is non-nil.
19268 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
19270 * pt.c (uses_template_parms): Handle template first-parse codes.
19272 * decl.c (cp_finish_decl): Only warn about user-defined statics.
19274 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19276 * pt.c (unify): Handle BOOLEAN_TYPE.
19278 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
19279 * pt.c (tsubst): Don't set it.
19280 * call.c (build_over_call): Use uses_template_parms.
19282 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
19284 * method.c (build_overload_nested_name): Use static_labelno
19285 instead of var_labelno.
19286 (build_qualified_name): New fn.
19287 (build_overload_name): Split out from here.
19288 (build_static_name): Use build_qualified_name.
19289 * decl.c (cp_finish_decl): Statics in extern inline functions
19290 have comdat linkage.
19291 (start_function): Initialize static_labelno.
19293 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
19295 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
19296 before "all member functions in class [] are private".
19298 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
19300 * lex.c (do_scoped_id): convert_from_reference.
19301 * init.c (build_offset_ref): Likewise.
19303 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
19305 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
19307 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
19309 * typeck.c (get_member_function_from_ptrfunc): Promote index
19312 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
19314 * tree.c (layout_basetypes): Move non-virtual destructor warning.
19315 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
19317 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19319 * decl.c (grokdeclarator): Call add_defarg_fn for the function
19321 * lex.c (add_defarg_fn): Adjust.
19322 (do_pending_defargs): Adjust. Don't skip the first parm.
19324 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
19326 * decl.c (build_enumerator): Global enumerators are also readonly.
19328 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
19329 (build_dynamic_cast): Call it and convert_from_reference.
19331 * lex.c (add_defarg_fn): New fn.
19332 (snarf_defarg): Don't add to defarg_types.
19333 (do_pending_defargs): Lose defarg_types. All fns we process now
19335 * decl.c (grokfndecl): Call add_defarg_fn.
19337 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
19338 * cp-tree.def: Add DEFAULT_ARG.
19339 * spew.c (yylex): Call snarf_defarg as appropriate.
19340 * parse.y: New tokens DEFARG and DEFARG_MARKER.
19341 (defarg_again, pending_defargs, defarg, defarg1): New rules.
19342 (structsp): Use pending_defargs.
19343 (parms, full_parm): Use defarg.
19344 * lex.c (init_lex): Initialize inline_text_firstobj.
19345 (do_pending_inlines): Never pass the obstack to feed_input.
19346 (process_next_inline): Call end_input instead of restore_pending_input.
19347 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
19348 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
19349 * input.c (end_input): New fn.
19350 (sub_getch): At the end of some fed input, just keep returning EOF
19351 until someone calls end_input.
19352 Remove 'obstack' field from struct input_source.
19353 * decl.c (grokparms): Handle DEFAULT_ARG.
19354 (replace_defarg): New fn.
19355 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
19357 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19359 * call.c (implicit_conversion): If nothing else works, try binding
19360 an rvalue to a reference.
19362 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
19364 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
19365 ifndef for Cygwin32 to include SIGSEGV.
19367 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19369 * class.c (finish_struct_1): Only complain about pointers without
19370 copy stuff if there are any constructors.
19372 * rtti.c (build_dynamic_cast): Call complete_type on the types.
19374 * decl.c (grokfndecl): If the function we chose doesn't actually
19377 * decl2.c (grokclassfn): Don't specify 'const int' for the
19378 artificial destructor parm.
19380 * pt.c (type_unification): If we are called recursively, nothing
19383 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
19385 * decl.c (init_decl_processing): Stop trying to catch signals
19386 other than SIGABRT since the Cygwin32 library doesn't support
19387 them correctly yet. This fixes a situation in which g++ causes
19388 a hang on SIGSEGVs and other such signals in our Win32-hosted
19391 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
19393 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
19395 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
19397 * typeck2.c (store_init_value): Always return the value if our
19398 type needs constructing.
19400 * method.c (hack_identifier): Convert class statics from
19403 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
19405 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
19407 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
19409 * typeck.c (c_expand_return): Make sure we clean up temporaries at
19410 the end of return x;
19412 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19414 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
19416 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
19418 * except.c (expand_builtin_throw): Add support
19419 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
19421 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
19423 * repo.c (extract_string): Null-terminate.
19425 * cp-tree.h (TI_SPEC_INFO): New macro.
19426 (CLASSTYPE_TI_SPEC_INFO): New macro.
19427 * pt.c (push_template_decl): Correctly determine # of template parms
19430 * call.c (compare_ics): Really fix 'this' conversions.
19432 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
19435 * pt.c (push_template_decl): Complain about mismatch in # of
19436 template parms between a class template and a member template.
19438 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
19440 * method.c (synthesize_method): You can't call
19441 function_cannot_inline_p after finish_function.
19442 * decl.c (finish_function): Turn on flag_inline_functions and turn
19443 off DECL_INLINE before handing a synthesized method to the
19446 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19448 * method.c (synthesize_method): Remove July 30 change to never set
19449 DECL_INLINE if at_eof.
19451 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
19453 * xref.c (GNU_xref_member): Ensure that the node has a
19454 decl_lang_specific part before checking DECL_FRIEND_P.
19456 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19458 * pt.c (instantiate_class_template): Diagnose non-class types used
19461 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
19463 * typeck.c (build_conditional_expr): Use convert_for_initialization
19464 instead of convert_and_check.
19466 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19468 * parse.y (typespec): Don't pedwarn for typeof.
19470 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
19472 * repo.c (finish_repo): Only check changes if we would write a
19475 * call.c (compare_ics): Fix handling of 'this' conversions.
19477 * pt.c (do_decl_instantiation): Support static data too. Rename
19478 from do_function_instantiation.
19479 * cp-tree.h: Adjust.
19482 * repo.c (extract_string): New fn.
19483 (get_base_filename): Use it.
19484 (init_repo): Compare old args with current args.
19486 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
19488 * Makefile.in, Make-lang.in: Protect C-ls with a comment
19489 character, idea from Paul Eggert <eggert@twinsun.com>.
19491 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
19493 * typeck.c (c_expand_return): Be more persistent in looking for
19496 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
19497 pointer to reference.
19499 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
19501 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19503 * init.c (build_member_call, build_offset_ref):
19504 Use do_scoped_id instead of do_identifier.
19506 * cvt.c (convert): Remove bogosity.
19508 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19510 * cvt.c (build_up_reference): Do checks of ARGTYPE and
19511 TARGET_TYPE before trying to use get_binfo.
19513 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
19515 * cvt.c (build_up_reference): Call get_binfo to get access control.
19517 * decl2.c (import_export_decl): If we don't support weaks, leave
19520 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
19522 * except.c (expand_builtin_throw): Add support for machines that
19523 cannot access globals after throw's epilogue when
19524 -fno-sjlj-exceptions is used.
19526 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
19528 * parse.y: 'std::' becomes '::'.
19529 * lex.c (real_yylex): Remove 'namespace' warning.
19530 * init.c (build_member_call): Ignore 'std::'.
19531 (build_offset_ref): Likewise.
19532 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
19533 (do_toplevel_using_decl): Ignore 'using std::whatever'.
19534 * decl.c (push_namespace): Just sorry.
19535 (pop_namespace): Nop.
19536 (init_decl_processing): Declare std namespace.
19538 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19540 * search.c (push_class_decls): A name which ambiguously refers to
19541 several instantiations of the same template just refers to the
19544 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
19546 * decl.c (build_enumerator): Fix problem with unsigned long
19547 enumerated values being smashed to ints, causing overflow
19548 when computing next enumerated value (for enum values around
19551 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
19553 * typeck.c (build_component_ref): Only call mark_used on a decl.
19555 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19557 * typeck.c (build_c_cast): Make the check for a ptr to function
19558 more specific before possible default_conversion call.
19560 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
19562 * except.c (expand_exception_blocks): Simplify and fix and make
19563 sure we don't end a region in a sequence, as expand_end_bindings
19566 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
19568 * except.c (init_exception_processing): Mark terminate as not
19569 returning so that the optimizer can optimize better.
19571 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
19573 * cvt.c (convert): Don't do any extra work, if we can avoid it
19576 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
19578 * *.[chy]: Change cp_convert to ocp_convert, change convert to
19579 cp_convert. convert is now reserved for the backend, and doesn't
19580 have the semantics a frontend person should ever want.
19582 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
19584 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
19585 Lose -traditional support.
19587 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19589 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
19591 * parse.y (self_reference): Do it for templates, too.
19592 * class.c (pushclass): Don't overload_template_name; the alias
19593 generated by build_self_reference serves the same purpose.
19595 * tree.c (list_hash): Make static, take more args.
19596 (list_hash_lookup): Likewise.
19597 (list_hash_add): Make static.
19598 (list_hash_canon): Lose.
19599 (hash_tree_cons): Only build a new node if one isn't already in the
19601 (hash_tree_chain): Use hash_tree_cons.
19602 * cp-tree.h: Adjust.
19603 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
19604 of calling lookup_name.
19606 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
19608 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
19609 doesn't refer to the CONST_DECLs.
19611 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
19613 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
19615 (expand_class_desc): Convert the last argument to a sizetype.
19617 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19619 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
19620 __real__): Add reswords.
19621 * hash.h: Regenerate.
19622 * lex.h (rid): Add RID_COMPLEX.
19623 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
19624 * lex.c (init_lex): Add building of RID_COMPLEX.
19625 (real_yylex): General cleanup in line with what c-lex.c also has,
19626 sans the cruft for traditional; add handling of SPEC_IMAG, complex
19627 types, and imaginary numeric constants.
19628 * parse.y (REALPART, IMAGPART): Add tokens.
19629 (unary_expr): Add REALPART and IMAGPART rules.
19630 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
19631 * decl.c (complex_{integer,float,double,long}_type_node): Define
19633 (init_decl_processing): Set up the types.
19634 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
19635 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
19636 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19637 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
19638 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
19640 * method.c (build_overload_name): Add handling of the different
19641 COMPLEX_TYPEs, prefixing them with `J'.
19642 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
19643 as a template parm.
19644 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
19645 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
19646 (mapcar): Handle COMPLEX_CST.
19647 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
19648 (common_type): Add code for complex types.
19649 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19650 (convert_for_assignment): Likewise.
19651 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
19653 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
19655 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
19656 tsubst_expr, as it might try to do overload resolution.
19658 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
19660 * pt.c (instantiate_class_template): Oops.
19662 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19664 * cp-tree.def: Add TAG_DEFN.
19665 * pt.c (tsubst_enum): New fn.
19666 (instantiate_class_template): Use it.
19667 (tsubst_expr): Support TAG_DEFN.
19668 (tsubst): Support local enums.
19669 (tsubst_copy): Likewise.
19670 * decl.c (finish_enum): Likewise.
19671 (start_enum): If this is a local enum, switch to permanent_obstack.
19673 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
19675 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
19676 (finish_function): Put the base init code for constructors just
19677 after the parm cleanup insns.
19678 (struct cp_function): Add last_parm_cleanup_insn.
19679 (push_cp_function_context): Likewise.
19680 (pop_cp_function_context): Likewise.
19682 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
19684 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
19686 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19688 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
19689 for THUNK_FNDECL before we switch to temporary allocation.
19691 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19693 * call.c (build_new_op): Handle null arg2 for ?:.
19695 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
19697 * except.c (expand_exception_blocks): Ensure that we flow through
19698 the end of the exception region for the exception specification.
19699 Move exception region for the exception specification in, so that
19700 it doesn't protect the parm cleanup. Remove some obsolete code.
19701 * decl.c (store_parm_decls): Likewise.
19702 (finish_function): Likewise.
19704 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
19706 * init.c (build_new): Fix nothrow handling.
19708 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19710 * init.c (emit_base_init): Don't warn about the initialization
19711 list for an artificial member.
19713 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19715 * expr.c (do_case): Handle !START case for the error msg.
19717 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19719 * decl2.c, lang-options.h: New option -Weffc++.
19720 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
19723 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
19724 to MULTIPLE_SYMBOL_SPACES.
19726 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
19728 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
19730 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
19732 * typeck.c (c_expand_return): Don't complain about returning void
19733 to void in an artificial function.
19734 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
19735 don't set DECL_RESULT, set DECL_ARTIFICIAL.
19736 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
19738 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
19740 * init.c (init_decl_processing): Add support for setjmp/longjmp based
19741 exception handling.
19742 * except.c (init_exception_processing): Likewise.
19743 (expand_end_catch_block): Likewise.
19744 (expand_exception_blocks): Likewise.
19745 (expand_throw): Likewise.
19746 * exception.cc (__default_terminate): Likewise.
19748 * init.c (perform_member_init): Use new method of expr level
19749 cleanups, instead of cleanups_this_call and friends.
19750 (emit_base_init): Likewise.
19751 (expand_aggr_vbase_init_1): Likewise.
19752 (expand_vec_init): Likewise.
19753 * decl.c (cp_finish_decl): Likewise.
19754 (expand_static_init): Likewise.
19755 (store_parm_decls): Likewise.
19756 (cplus_expand_expr_stmt): Likewise.
19757 * decl2.c (finish_file): Likewise.
19759 * Make-lang.in (exception.o): Ok to compile with -O now.
19761 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
19762 we know it will be done later by the backend.
19764 * decl2.c (lang_f_options): Remove support for short temps.
19765 * lang-options.h: Likewise.
19767 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19769 * tree.c (varargs_function_p): New fn.
19770 * method.c (emit_thunk): Replace broken generic code with code to
19771 generate a heavyweight thunk function.
19773 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
19775 * pt.c (process_template_parm): pedwarn about floating-point parms.
19777 * decl.c (grokdeclarator): inline no longer implies static.
19779 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
19781 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
19783 * class.c (check_for_override): The signature of an overriding
19784 function is not changed.
19786 * call.c (build_over_call): Move setting of conv into the loop.
19787 Note: this change, along with the related changes of the 18th thru
19788 the 20th of April, fix an infinite loop problem in conversions.
19790 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19792 * call.c (build_user_type_conversion_1): Really ignore rvalue
19793 conversions when looking for a REFERENCE_TYPE.
19795 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
19796 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
19797 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
19798 (build_unary_op): Likewise.
19799 * call.c (build_over_call): See through a CONVERT_EXPR around the
19800 ADDR_EXPR for on a temporary.
19801 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
19802 the ADDR_EXPR for a local variable.
19804 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
19806 * call.c (build_user_type_conversion_1): If we're trying to
19807 convert to a REFERENCE_TYPE, only consider lvalue conversions.
19808 (build_new_function_call): Print candidates.
19809 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
19810 (reference_binding): Binding a temporary of a reference-related type
19813 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19815 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
19816 * tinfo2.cc (type_info::before): Likewise.
19818 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
19820 * call.c (implicit_conversion): Oops.
19822 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
19824 * call.c (implicit_conversion): Try to find a reference conversion
19825 before binding a const reference to a temporary.
19827 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
19829 * exception.cc (__default_unexpected): Call terminate by default,
19830 so that if the user overrides terminate, the correct function will
19833 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
19835 * parse.y (left_curly): Avoid trying to use any fields of
19836 error_mark_node, as there aren't any.
19838 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
19840 * lex.c (do_identifier): Avoid breaking on overloaded methods
19841 as default arguments.
19843 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
19845 * call.c (add_template_candidate): Initialize the variable "dummy".
19847 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
19849 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
19850 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
19852 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19854 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
19855 (debug_binfo): Delete decl, not needed.
19857 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
19858 promotes_to_aggr_type): Delete fns.
19859 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
19860 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
19861 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
19863 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
19865 * friend.c (is_friend_type): Delete fn.
19866 * cp-tree.h (is_friend_type): Delete decl.
19868 * decl.c (original_result_rtx, double_ftype_double,
19869 double_ftype_double_double, int_ftype_int, long_ftype_long,
19870 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
19871 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
19873 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
19875 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
19877 * decl.c (pushdecl_nonclass_level): #if 0, unused.
19878 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
19880 * lex.c (reinit_lang_specific): #if 0, unused.
19881 * cp-tree.h (reinit_lang_specific): #if 0 decl.
19883 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
19884 * cp-tree.h (revert_static_member_fn): Delete decl.
19886 * class.c (root_lang_context_p): Delete fn.
19887 * cp-tree.h (root_lang_context_p): Delete decl.
19889 * decl.c (set_current_level_tags_transparency): #if 0, unused.
19890 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
19892 * lex.c (set_vardecl_interface_info): Make static.
19893 * cp-tree.h (set_vardecl_interface_info): Delete decl.
19895 * call.c (find_scoped_type): Make static.
19896 * cp-tree.h (find_scoped_type): Delete decl.
19898 * search.c (convert_pointer_to_vbase): Make static.
19899 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
19901 * decl.c (const_ptr_type_node): Likewise.
19902 * cp-tree.h (const_ptr_type_node): Delete decl.
19904 * typeck.c (common_base_type): Make static.
19905 * cp-tree.h (common_base_types): Delete erroneous decl.
19907 * pt.c (classtype_mangled_name): Make static.
19908 * cp-tree.h (classtype_mangled_name): Delete decl.
19910 * lex.c (check_newline): Make static.
19911 * cp-tree.h (check_newline): Delete decl.
19913 * typeck.c (build_x_array_ref): Delete fn, same idea as
19915 * cp-tree.h (build_x_array_ref): Delete decl.
19917 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
19919 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
19921 * class.c (build_vtable_entry): Make static.
19922 * cp-tree.h (build_vtable_entry): Delete decl.
19924 * class.c (build_vbase_pointer): Make static.
19925 * cp-tree.h (build_vbase_pointer): Delete decl.
19927 * sig.c (build_sptr_ref): Add forward decl and make static.
19928 * cp-tree.h (build_sptr_ref): Delete decl.
19930 * call.c (build_new_method_call): Add forward decl and make static.
19931 * cp-tree.h (build_new_method_call): Delete decl.
19933 * call.c (build_object_call): Make static.
19934 * class.c (check_for_override, complete_type_p, mark_overriders):
19936 * decl.c (cp_function_chain): Likewise.
19937 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
19939 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
19941 * tree.c (build_cplus_array_type_1): Likewise.
19942 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
19943 (comp_target_parms): Likewise.
19945 * init.c (build_builtin_call): Make static.
19946 * cp-tree.h (build_builtin_call): Delete decl.
19948 * typeck.c (binary_op_error): Delete decl.
19949 * cp-tree.h (binary_op_error): Likewise.
19951 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19953 * call.c (build_method_call): Compare against error_mark_node
19954 directly, rather than the ERROR_MARK tree code.
19955 * cvt.c (cp_convert): Likewise.
19956 * decl.c (print_binding_level): Likewise.
19957 (duplicate_decls): Likewise.
19958 (grokdeclarator): Likewise.
19959 (grokdeclarator): Likewise.
19960 * init.c (expand_aggr_init_1): Likewise.
19961 (decl_constant_value): Likewise.
19962 * method.c (build_opfncall): Likewise.
19963 (hack_identifier): Likewise.
19964 * typeck.c (build_modify_expr): Likewise.
19966 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
19968 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
19970 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
19972 * pt.c (coerce_template_parms): Add new error message.
19974 * method.c (build_overload_value): Implement name mangling for
19975 floating-point template arguments.
19977 * method.c (build_overload_int, icat, dicat): Fix mangling of template
19978 arguments whose absolute value doesn't fit in a signed word.
19980 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19982 * friend.c: New file; put all of the friend stuff in here.
19983 * init.c: Instead of here.
19984 * Makefile.in (CXX_OBJS): Add friend.o.
19985 (friend.o): Add dependencies.
19986 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
19988 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
19990 * call.c (build_scoped_method_call): Complain if the scope isn't a
19993 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19995 * parse.y (left_curly): Don't crash on erroneous type.
19997 * init.c (build_delete): Fix type of ref.
19999 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
20001 * search.c (get_vbase_1): Renamed from get_vbase.
20002 (get_vbase): Wrapper, now non-static.
20003 (convert_pointer_to_vbase): Now static.
20005 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
20006 * init.c (build_delete): Pass one.
20007 (build_partial_cleanup_for): Use build_scoped_method_call.
20008 * decl.c (finish_function): Pass a binfo.
20010 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
20012 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
20014 * typeck.c (build_c_cast): Lose other reference to flag.
20016 * call.c (build_field_call): Don't look for [cd]tor_identifier.
20017 * decl2.c (delete_sanity): Remove meaningless use of
20018 LOOKUP_HAS_IN_CHARGE.
20019 * decl.c (finish_function): Use build_scoped_method_call instead
20020 of build_delete for running vbase dtors.
20021 * init.c (build_delete): Call overload resolution code instead of
20022 duplicating it badly.
20024 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
20026 * call.c (build_over_call): Call mark_used before trying to elide
20029 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
20031 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20033 * typeck.c (build_modify_expr): Always pedwarn for a cast to
20034 non-reference used as an lvalue.
20036 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
20038 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
20040 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
20042 * parse.y (handler): Fix template typo.
20044 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20046 * error.c (lang_decl_name): New fn.
20047 * tree.c (lang_printable_name): Use it.
20049 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
20051 * g++spec.c: Include config.h so that we can catch bzero #defines
20052 from the config file.
20054 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
20056 * new1.cc: Include a declaration for malloc, to avoid warning, and
20057 avoid lossing on systems that require one (ones that define malloc
20060 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
20062 * decl2.c (max_tinst_depth): New variable.
20063 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
20065 * pt.c (max_tinst_depth): Variable moved.
20066 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
20069 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
20071 * decl.c (xref_basetypes): Allow a base class that depends on
20072 template parms to be incomplete.
20074 * decl2.c (build_expr_from_tree): Support typeid(type).
20075 * rtti.c (get_typeid): Support templates.
20076 (expand_si_desc, expand_class_desc): Fix string length.
20077 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
20079 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
20081 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
20083 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
20085 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
20087 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
20088 smashes together template and non-template decls of the same
20091 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
20093 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
20095 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20097 * decl.c (duplicate_decls): Next route, pedwarn about different
20098 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
20100 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20102 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
20103 (struct lang_type): Delete has_default_implementation member.
20104 Increase dummy to 21.
20105 * decl.c (start_method): Delete usage.
20107 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
20108 store_after_parms, start_decl_1, auto_function): Add decls.
20109 (get_arglist_len_in_bytes, declare_implicit_exception,
20110 have_exceptions_p, make_type_decl, typedecl_for_tag,
20111 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
20112 build_component_type_expr, cplus_exception_name,
20113 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
20114 * call.c (build_this): Make static.
20115 (is_complete): Likewise.
20116 (implicit_conversion): Likewise.
20117 (reference_binding): Likewise.
20118 (standard_conversion): Likewise.
20119 (strip_top_quals): Likewise.
20120 (non_reference): Likewise.
20121 (build_conv): Likewise.
20122 (user_harshness): Likewise.
20123 (rank_for_ideal): Likewise.
20124 * decl.c (start_decl_1): Delete forward decl.
20125 (push_decl_level): Make static.
20126 (resume_binding_level): Make static.
20127 (namespace_bindings_p): Make static.
20128 (declare_namespace_level): Make static.
20129 (lookup_name_real): Make static.
20130 (duplicate_decls): Make static. Take register off NEWDECL and
20131 OLDDECL parm decls.
20132 * decl2.c (get_sentry): Make static.
20133 (temp_name_p): Delete fn.
20134 * except.c (auto_function): Delete decl.
20135 * lex.c (handle_{cp,sysv}_pragma): Make static.
20136 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
20137 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
20138 * pt.c (tsubst_expr_values): Make static.
20139 * rtti.c (combine_strings): Delete decl.
20141 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
20143 * pt.c (push_template_decl): Handle getting a typedef.
20145 * call.c (build_new_function_call): Complain about void arg.
20147 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20149 * decl.c (duplicate_decls): Give pedwarn of different exceptions
20150 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
20152 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
20154 * except.c (expand_throw): Don't expand the cleanup tree here,
20155 since we are not going to write the rtl out. Fixes problem with
20158 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
20160 * Make-lang.in: Add $(exeext) as necessary.
20162 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
20164 * parse.y (handler_seq): Must have at least one catch clause.
20166 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
20168 * call.c (add_builtin_candidate): Restore ?: hack.
20170 * decl.c (grok_op_properties): More warnings.
20172 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20174 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
20175 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
20177 * decl.c (duplicate_decls): Scale back to a warning, and only do
20180 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
20182 * decl.c (duplicate_decls): pedwarn mismatched exception
20185 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
20187 * call.c (build_new_method_call): Don't display the invisible
20188 argument for controlling virtual bases.
20190 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
20192 * new: Add nothrow new and delete, bad_alloc and throw specifications
20194 * decl.c (init_decl_processing): Add throw specification for delete.
20195 * new.cc (nothrow): Define.
20196 * lex.c (real_yylex): Removing warning that throw and friends are
20198 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
20199 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
20200 * Make-lang.in: Add new{1,2}.{cc,o}.
20202 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
20204 * lex.c (cons_up_default_function): Fix return type of synth op=.
20206 * init.c (emit_base_init): Add warnings for uninitialized members
20209 * decl.c (xref_basetypes): Add warning for non-polymorphic type
20210 with destructor used as base type.
20212 * decl.c (grok_op_properties): Add warning for op= returning void.
20213 * typeck.c (c_expand_return): Add warning for op= returning anything
20216 * class.c (finish_struct_1): Add warning for class with pointers
20217 but not copy ctor or copy op=.
20219 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
20220 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
20221 (instantiate_template): If -fexternal-templates, add this
20222 instantiation to pending_templates.
20224 * decl2.c (copy_assignment_arg_p): Disable old hack to support
20227 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
20229 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
20231 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
20233 * call.c (standard_conversion): Handle getting references. Tack
20234 on RVALUE_CONV here. Do it for non-class types, too.
20235 (reference_binding): Pass references to standard_conversion.
20236 (implicit_conversion): Likewise.
20237 (add_builtin_candidate): Disable one ?: kludge.
20238 (convert_like): Handle RVALUE_CONVs for non-class types.
20239 (joust): Disable the other ?: kludge.
20241 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20243 * decl.c (init_decl_processing): Add code to build up common
20244 function types beforehand, to avoid creation then removal of
20245 things already in the hash table.
20247 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
20249 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
20252 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
20253 current_template_parms.
20255 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
20257 * search.c (lookup_field): Don't return a function, check want_type.
20259 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20261 * init.c (build_new): Make sure PLACEMENT has a type.
20263 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
20265 * init.c (build_new): Support new (nothrow).
20267 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
20269 * pt.c (instantiate_decl): Also do push_to_top_level before setting
20272 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
20273 * pt.c (tsubst): Defer instantiation of default args.
20274 * call.c (build_over_call): Until here.
20276 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20278 * search.c (lookup_field): Make sure we have an
20279 IDENTIFIER_CLASS_VALUE before we try to return it.
20281 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
20283 * call.c (build_method_call): Delete unused var PARM.
20284 (build_overload_call_real): Likewise.
20285 (build_object_call): Delete unused var P.
20286 (build_new_op): Likewise.
20287 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
20288 var definitions, which are never used.
20289 (shadow_tag): Delete unused var FN.
20290 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
20291 * init.c (build_new): Delete unused var ALLOC_TEMP.
20292 * method.c (hack_identifier): Delete unused var CONTEXT.
20293 (do_build_copy_constructor): Delete unused var NAME.
20294 (synthesize_method): Delete unused var BASE.
20295 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
20296 * rtti.c (build_headof): Delete unused var VPTR.
20297 (get_typeid): Delete unused var T.
20298 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
20300 (build_ptrmemfunc): Delete unused vars U and NINDEX.
20301 * typeck2.c (build_functional_cast): Delete unused var BINFO.
20303 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
20305 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
20306 things in a type being defined.
20307 * decl.c (finish_enum): Reverse the values so that they are in
20310 * pt.c (instantiate_class_template): Don't initialize
20311 BINFO_BASETYPES until the vector is filled out.
20312 (unify): Don't abort on conflicting bindings, just fail.
20313 (instantiate_decl): Do push_tinst_level before any tsubsting.
20315 * method.c (build_overload_value): Handle getting a
20316 TEMPLATE_CONST_PARM for a pointer.
20318 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
20320 * init.c (expand_member_init): Don't give 'not a base' error for
20323 * pt.c (instantiate_decl): Call import_export_decl later.
20325 * pt.c (instantiate_class_template): Return a value.
20327 * parse.y (extension): New rule for __extension__.
20328 (extdef, unary_expr, decl, component_decl): Use it.
20330 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
20332 * class.c (base_binfo): Remove unused base_has_virtual member.
20333 (finish_base_struct): Likewise.
20334 (finish_struct_1): Likewise.
20336 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
20338 * search.c (expand_upcast_fixups): Fix bogus code generation
20339 problem where the generated code uses the wrong index into the
20340 runtime built vtable on the stack. Old code could clobber random
20343 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
20345 * init.c (perform_member_init): Make sure the partial EH cleanups
20346 live on the function_obstack.
20348 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
20350 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
20351 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
20353 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
20355 * decl.c (grokvardecl): Avoid ANSI style initialization.
20357 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
20359 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
20361 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
20363 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
20365 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20367 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
20368 arguments we compare against. Start the count of I at 1, not 0,
20369 since argv[0] is still the command.
20371 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
20373 * lang-specs.h: Accept .cp as an C++ extension.
20375 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20377 * cp-tree.h (ptr_reasonably_similar): Add decl.
20379 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20381 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
20382 pointer. New local SPECBITS with the parm's value.
20383 (grokdeclarator): Pass &specbits down.
20385 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
20386 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
20388 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
20389 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
20391 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
20392 not an error_mark_node.
20394 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20396 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
20397 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
20399 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20401 * decl.c (grokdeclarator): When giving an anonymous struct a name,
20402 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
20405 * typeck2.c (build_m_component_ref): If component is a pointer
20406 to data member, resolve the OFFSET_REF now.
20408 * call.c (convert_like): Don't go into infinite recursion.
20410 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
20412 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
20413 * tree.c (layout_basetypes): And on the vbase ptr.
20415 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20417 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
20418 CHAR_TYPE_SIZE so bool is always the same size as another type.
20420 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
20422 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
20424 * decl2.c (grok_x_components): Remove synthesized methods from
20425 TYPE_METHODS of an anonymous union, complain about member
20427 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
20429 (finish_function): Just clear the DECL_RTL of our arguments.
20431 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20433 * decl2.c (finish_file): Emit DWARF debugging info for static data
20436 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
20438 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
20440 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
20443 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20445 * Make-lang.in (g++-cross$(exeext)): Fix typo.
20447 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20449 Make the g++ driver now be a standalone program, rather than one
20450 that tries to run the gcc driver after munging up the options.
20451 * Make-lang.in (g++.c, g++spec.o): New rules.
20452 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
20454 (g++$(exeext)): New rule, based on xgcc rule.
20455 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
20456 * g++spec.c: New file.
20457 * g++.c: Removed file.
20459 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
20461 * cvt.c (build_up_reference): Arrange for any temporary values
20462 that have been keep in registers until now to be put into memory.
20464 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20466 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
20467 that make -j3 bootstrap works better.
20469 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
20471 * decl.c (pushtag): Do pushdecl for anon tags.
20473 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
20475 * typeck.c (c_expand_return): Fix logic.
20476 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
20478 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
20480 * g++.c (main): Make sure arglist has a final NULL entry. Add
20481 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
20482 stdin/stdout of the invoked program are redirected to
20485 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20487 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
20489 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
20491 * init.c (resolve_offset_ref): Handle obj.vfn better.
20492 * typeck.c (build_component_ref): Set TREE_TYPE on result from
20495 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
20497 * typeck.c (convert_for_assignment): Also handle anachronistic
20498 implicit conversions from (::*)() to cv void*.
20499 * cvt.c (cp_convert_to_pointer): Likewise.
20501 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20503 * lex.c (handle_cp_pragma): Fix bogus warning.
20505 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
20507 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
20508 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
20510 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20512 * class.c (finish_struct_1): Support DWARF2_DEBUG.
20513 * search.c (dfs_debug_mark): Likewise.
20514 * decl2.c (finish_vtable_vardecl): Likewise.
20515 * decl.c (pushtag, finish_enum): Likewise.
20516 * lex.c (check_newline): Use debug_* instead of calling *out
20517 functions directly.
20519 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20521 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
20522 on some picky hosts.
20524 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20526 * class.c (finish_struct_1): A class has a non-trivial copy
20527 constructor if it has virtual functions.
20529 * cvt.c (cp_convert): Always call a constructor.
20531 * call.c (reference_binding): Still tack on a REF_BIND
20532 for bad conversions.
20533 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
20535 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
20536 (c_expand_return): Likewise.
20537 * typeck2.c (digest_init): Likewise for { }.
20538 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
20539 * cvt.c (cp_convert): Handle failure better.
20541 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20543 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
20544 of GCC be path-relative.
20546 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20548 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
20549 it does need choose-temp.o and pexecute.o.
20551 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20553 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
20554 that we still use it.
20555 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
20557 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
20559 * init.c (expand_default_init): Avoid calling constructors to
20560 initialize reference temps.
20562 * cvt.c (convert_to_reference): Fix.
20564 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20566 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
20567 (convert_to_reference): Likewise.
20568 * typeck.c (convert_for_initialization): Likewise.
20569 * init.c (expand_default_init): Likewise.
20570 (expand_aggr_init_1): Likewise.
20571 * cp-tree.h (CONV_NONCONVERTING): Lose.
20572 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
20574 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
20576 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
20578 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
20580 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20582 * init.c (expand_aggr_init_1): Don't crash on non-constructor
20585 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20587 * g++.c: Include gansidecl.h.
20588 (VPROTO, PVPROTO, VA_START): Delete.
20589 (choose_temp_base_try, choose_temp_base, perror_exec,
20590 run_dos) [__MSDOS__]: Delete fns.
20591 (pfatal_with_name): Delete fn.
20592 (temp_filename): Declare like in gcc.c.
20593 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
20594 (error_count, signal_count): Define.
20595 (error): Delete both definitions.
20596 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
20597 (pfatal_pexecute): Add fn from gcc.c.
20598 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
20599 code to use the pexecute stuff also used by gcc.c.
20600 (MIN_FATAL_STATUS): Define.
20601 * Make-lang.in (g++): Add dependency on and linking with
20602 choose-temp.o and pexecute.o.
20604 * cp-tree.h: Include gansidecl.h.
20605 (STDIO_PROTO): Delete #undef/#define.
20606 * cvt.c (NULL): Delete #undef/#define.
20607 * expr.c (NULL): Likewise.
20608 * init.c (NULL): Likewise.
20609 * rtti.c (NULL): Likewise.
20610 * xref.c (NULL): Likewise.
20612 * cp-tree.h (build_user_type_conversion): Add prototype.
20613 * call.c (build_user_type_conversion): Delete prototype. Correct
20614 decl of FLAGS arg to be an int.
20615 * cvt.c (build_user_type_conversion): Likewise.
20617 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
20619 * cp-tree.def: Add TRY_BLOCK and HANDLER.
20620 * except.c (expand_start_catch_block): Support templates.
20621 * parse.y (try_block, handler_seq): Likewise.
20622 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
20624 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
20626 * pt.c (current_template_args): New fn.
20627 (push_template_decl): Use it.
20628 * decl.c (grokdeclarator): Use it.
20630 * decl2.c (build_expr_from_tree): Dereference ref vars.
20632 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
20633 the decl-specifier-seq.
20635 * decl.c (grok_op_properties): Don't force the type of a conversion
20636 op to be complete. Don't warn about converting to the same type
20637 for template instantiations.
20639 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
20642 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
20644 * typeck.c (get_delta_difference): Remove previous bogusness.
20645 Don't give errors if force is set.
20647 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20649 * decl2.c (finish_file): Don't emit debug info.
20650 * decl.c (pushdecl): Lose obsolete code.
20651 (grokdeclarator): Still do the long long thing after complaining.
20652 * search.c (note_debug_info_needed): Don't do anything if we're in a
20654 * method.c (synthesize_method): For non-local classes,
20655 push_to_top_level first.
20657 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
20659 * typeck.c (get_delta_difference): Add no_error parameter.
20660 (build_ptrmemfunc): Call get_delta_difference with no_error set;
20661 we don't want error messages when converting unrelated
20662 pointer-to-member functions.
20664 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
20666 * error.c (dump_expr): Improve the wording on error messages that
20667 involve pointer to member functions.
20669 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
20671 * cvt.c (cp_convert_to_pointer): Move code for conversions from
20672 (::*)() to void* or (*)() up a bit, so that we can convert from
20673 METHOD_TYPEs as well.
20675 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20677 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
20678 There are no 'member' types.
20679 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
20680 (build_x_typeid): Handle errors.
20682 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
20684 * typeck.c (convert_for_assignment): Handle anachronistic implicit
20685 conversions from (::*)() to void* or (*)().
20686 * cvt.c (cp_convert_to_pointer): Likewise.
20687 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
20688 conversions from here.
20689 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
20690 * lang-options.h: Likewise.
20691 * decl2.c (warn_pmf2ptr): Define.
20692 * cp-tree.h: Declare it.
20693 * typeck2.c (digest_init): Allow pmfs down into
20694 convert_for_initialization.
20696 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20698 * typeck.c (c_expand_return): Fix for returning overloaded fn.
20700 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20702 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
20703 * decl.c (grok_reference_init): Pass DIRECT_BIND.
20704 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
20706 * call.c (convert_like): Don't pass INDIRECT_BIND.
20707 * typeck.c (convert_arguments): Likewise.
20708 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
20710 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20712 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
20713 similar code in build_up_ref.
20714 * cvt.c (build_up_reference): Drastically simplify.
20716 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
20718 * typeck.c (signed_or_unsigned_type): If the given type already
20719 as the correct signedness, then just return it.
20721 * typeck.c ({un,}signed_type): If can't do anything, call
20722 signed_or_unsigned_type.
20724 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
20726 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
20727 current_class_type is NULL.
20729 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
20731 * class.c (finish_struct_1): Avoid empty structs by adding a field
20732 so layout_type gets the mode right.
20734 * typeck.c (c_expand_return): Drastically simplify.
20736 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20738 * typeck.c (decay_conversion): Handle overloaded methods.
20740 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
20742 * call.c (build_over_call): A TARGET_EXPR has side-effects.
20744 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
20746 * cvt.c (convert_to_pointer_force): Add code to support pointer to
20747 member function to pointer to function conversions.
20748 * init.c (resolve_offset_ref): Add code to allow faked up objects,
20749 ignoring them if they are not used, and giving an error, if they
20751 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
20752 code, and so that we can give an error, if we needed an object,
20753 and one was not provided.
20754 (build_c_cast): Don't call default_conversion when we want to
20755 convert to pointer to function from a METHOD_TYPE.
20757 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
20759 * Make-lang.in (cplib2.ready): Fix logic.
20761 * decl.c (shadow_tag): Only complain about non-artificial function
20764 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
20766 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
20768 * expr.c (cplus_expand_expr): Pre-tweak call_target like
20769 expand_inline_function would.
20771 * pt.c (mark_decl_instantiated): If extern_p, call
20772 mark_inline_for_output.
20774 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
20776 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
20779 * typeck.c (get_delta_difference): Fix wording, as we can be used
20780 for pointer to data members.
20782 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
20784 * pt.c (tsubst): If the function decl isn't a member of this
20785 template, return a copy of the decl (including copying the
20786 lang-specific part) so we don't hose ourselves later.
20788 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20790 * class.c (finish_struct): Remove DWARF-specific tag handling.
20791 * decl.c (pushtag): Likewise.
20792 (finish_function): Always clear DECL_ARGUMENTS on function decls with
20794 * decl2.c (finish_file): Emit DWARF debugging info for static data
20797 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
20799 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
20800 isn't the same as the new one before we whack it.
20802 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
20804 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
20805 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
20806 warn_traditional and warn_strict_prototypes; remove ancient
20807 'overload' code; remove references to flag_traditional.
20809 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
20811 * input.c (sub_getch): Handle 8-bit characters in string literals.
20813 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
20815 * tree.c (mapcar): Handle CONSTRUCTORs.
20816 (copy_to_permanent): Handle expression_obstack properly.
20818 * Make-lang.in (cplib2.txt): Also depend on the headers.
20820 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
20822 (expand_class_desc): Use USItype for offset field.
20823 * tinfo.h (struct __class_type_info): Likewise.
20825 * method.c (build_overload_int): TYPE_PRECISION should be applied
20828 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
20830 * call.c (build_new_op): A COND_EXPR involving void must be a
20833 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20835 * typeck.c (build_x_component_ref): New fn.
20836 (build_object_ref): Use it.
20837 * parse.y (primary): Use it.
20838 * decl2.c (build_expr_from_tree): Use it.
20839 * cp-tree.h: Declare it.
20841 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
20842 * error.c (dump_type_suffix): Handle variable arrays.
20844 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20846 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
20848 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20850 * decl.c (lookup_name_real): Don't try to look up anything in a
20853 * tinfo2.cc (__throw_type_match_rtti): Oops.
20855 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20857 * Make-lang.in (exception.o): Use -fno-PIC for now.
20859 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20861 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
20863 (get_tinfo_fn_dynamic): Extracted from build_typeid.
20864 * tinfo2.cc (__dynamic_cast): Adjust.
20866 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
20867 (build_x_typeid): Likewise.
20869 * parse.y: Call build_x_typeid instead of build_typeid.
20870 * cp-tree.def: Add TYPEID_EXPR.
20871 * pt.c (tsubst_copy): Handle typeid.
20872 * decl2.c (build_expr_from_tree): Likewise.
20873 * rtti.c (build_x_typeid): Throw bad_typeid from here.
20874 (build_typeid): Not here.
20875 * cp-tree.h: Declare build_x_typeid.
20877 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
20879 * call.c (convert_like): Pull out constant values.
20881 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
20883 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20885 * decl.c (init_decl_processing): Create short int types before
20886 creating size_t in case a machine description needs to use
20887 unsigned short for size_t.
20889 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20891 * Make-lang.in (exception.o): Turn off pic.
20893 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
20894 type, multi-level ptr conversions.
20896 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
20897 (throw_bad_cast): Use it.
20898 (throw_bad_typeid): New fn.
20899 (build_typeid): Throw bad_typeid as needed.
20901 (synthesize_tinfo_fn): Handle functions and arrays before checking
20904 * Remove .h from standard C++ headers, add new.h, move into inc
20907 * exception*: Remove pointer from object, constructors. Add
20908 default exception::what that uses type_info::name. Add
20909 __throw_bad_typeid.
20911 * init.c (build_new): Don't add a cookie to new (void *) T[2].
20913 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
20915 * Make-lang.in: Building C++ code depends on cc1plus.
20917 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20919 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
20920 a HOST_WIDE_INT, not a tree.
20922 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20924 * exception.cc: Don't include <stdlib.h>.
20926 * Make-lang.in (c++.clean): Remove cplib2.*.
20928 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
20930 * parse.y (component_decl_1, component_costructor_declarator case):
20931 Pass attributes/prefix_attributes in tree list.
20933 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
20935 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
20937 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20939 * lex.c (do_identifier): Don't do deferred lookup in a template
20942 * typeck2.c (store_init_value): Oops.
20944 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
20945 New files for C++ lang-support library.
20946 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
20947 (CXX_LIB2FUNCS): Define.
20948 And rules for building the C++ lang-support code.
20949 * config-lang.in (headers): Define.
20950 (lib2funcs): Define.
20952 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20954 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
20956 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
20957 * typeck2.c (store_init_value): Check for initializing pmf with { }
20959 (process_init_constructor): Not here.
20961 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20963 * pt.c (begin_template_parm_list): Increment
20964 processing_template_decl here.
20965 (end_template_parm_list): Not here.
20966 (process_template_parm): No need to add 1 to it now.
20967 * *.c: Use processing_template_decl instead of current_template_parms
20968 to check for being in a template.
20970 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
20971 (tsubst_copy): Handle CONSTRUCTOR.
20972 (instantiate_decl): Set up context properly for variables.
20973 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
20974 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
20976 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20978 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
20980 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20982 * method.c (make_thunk): Call comdat_linkage before setting the
20985 * decl2.c (comdat_linkage): Use make_decl_one_only.
20986 (import_export_decl): Likewise.
20987 * decl.c (init_decl_processing): Check supports_one_only instead of
20990 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
20992 * decl2.c (grokfield): Tighten checking for access decls.
20994 * decl.c (make_typename_type): Resolve references to
20995 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
20996 (lookup_name_real): Types that depend on a template parameter get
20997 an implicit 'typename' unless they're in the current scope.
20998 (start_decl_1): We don't care about incomplete types that depend
20999 on a template parm.
21000 (grokdeclarator): Resolve 'typename's in the type specifier that
21001 refer to members of the current scope.
21003 * call.c (build_over_call): Remove 'inline called before
21004 definition' diagnostic.
21005 (build_method_call): Likewise.
21006 * decl.c (duplicate_decls): Downgrade 'used before declared
21007 inline' to a warning, only with -Winline.
21009 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
21011 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
21013 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21015 * call.c (build_method_call): When calling a signature
21016 default implementation, as in other cases, let instance_ptr simply
21019 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
21021 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
21023 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
21025 * except.c (expand_start_catch_block): Add a pushlevel so that -g
21026 works on hppa and SPARC.
21028 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21030 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
21032 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21034 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
21035 before testing whether it's a signature.
21037 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
21039 * call.c (build_new_method_call): Don't complain about signature
21040 pointers and references not being an aggr type.
21041 (build_this): If a signature pointer or reference was passed in,
21043 (build_new_method_call): If instance is a signature pointer, set
21044 basetype to the signature type of instance.
21045 * sig.c (build_signature_method_call): Deleted basetype and
21046 instance parameters, they can be found as the DECL_CONTEXT of
21047 function and as the first argument passed in.
21048 * cp-tree.h: Changed declaration of build_signature_method_call.
21049 * call.c (build_method_call): Deleted first two arguments in call
21050 of build_signature_method_call.
21051 (build_over_call): Added call to build_signature_method_call.
21053 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21055 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
21058 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21060 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
21062 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
21064 * except.c (expand_start_try_stmts): Move to except.c in the backend.
21065 (expand_end_try_stmts): Remove.
21067 * init.c (perform_member_init): Use add_partial_entry () instead
21068 of directly manipulating lists.
21069 (emit_base_init): Likewise.
21071 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
21073 * except.c (expand_exception_blocks): Always make sure USE and
21074 CLOBBER insns that came at the end still do, the backend relies
21077 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
21079 * call.c (build_over_call): We can only use a TARGET_EXPR of the
21082 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
21084 * cvt.c (convert_to_reference): Revert last change, don't complain
21085 about temp without target decl.
21087 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
21089 * decl.c (grokdeclarator): Don't core dump when void() is given.
21091 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
21093 * decl.c (copy_args_p): Don't crash.
21095 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
21097 * pt.c (tsubst): And support template args inside the exception
21100 * pt.c (tsubst): Add support for exception specifications in
21101 template functions.
21103 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
21105 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
21107 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
21108 (start_function): Likewise.
21109 (start_method): Likewise.
21110 (grokfield): Likewise.
21111 (make_call_declarator): Add throw spec parameter.
21112 (set_quals_and_spec): Add routine.
21113 * lex.c (set_quals_and_spec): Likewise.
21114 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
21115 * decl.c (shadow_tag): Eliminate the throw spec parameter to
21117 (groktypename): Likewise.
21118 (start_decl): Eliminate the throw spec parameter. Eliminate the
21119 throw spec parameter to grokdeclarator. Eliminate the throw spec
21120 field in DECL_STMT.
21121 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
21122 (grokfndecl): Remove useless set of raises.
21123 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
21124 the throw spec parameter to start_decl. Pull the throw spec out
21125 of the call declarator.
21126 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
21127 (start_function): Eliminate the throw spec parameter. Eliminate
21128 the throw spec parameter to grokdeclarator.
21129 (start_method): Likewise.
21130 * decl2.c (grokfield): Likewise.
21131 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
21132 (grokoptypename): Likewise.
21133 (finish_file): Eliminate the throw spec parameter to
21134 start_function. Add throw spec to make_call_declarator.
21135 * except.c (init_exception_processing): Add throw spec to
21136 make_call_declarator. Eliminate the throw spec parameter to
21138 (expand_start_catch_block): Eliminate the throw spec parameter to
21140 (expand_builtin_throw): Add throw spec to make_call_declarator.
21141 Eliminate the throw spec parameter to start_function.
21142 (start_anon_func): Likewise.
21143 * lex.c (make_call_declarator): Add throw spec parameter.
21144 (set_quals_and_spec): New routine.
21145 (cons_up_default_function): Add throw spec to make_call_declarator.
21146 Eliminate the throw spec parameter to grokfield.
21147 * method.c (synthesize_method): Eliminate the throw spec parameter
21149 * pt.c (process_template_parm): Eliminate the throw spec parameter
21151 (tsubst): Add throw spec to make_call_declarator.
21152 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
21153 (do_function_instantiation): Eliminate the throw spec parameter to
21154 grokdeclarator. Eliminate the throw spec parameter to
21156 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
21158 * parse.y (datadef): Remove non-winning optimization.
21160 (fndef): Remove ambiguous error productions uncovered by grammar
21162 (constructor_declarator): Add exception_specification_opt here.
21163 (component_constructor_declarator): Likewise.
21164 (direct_after_type_declarator): Likewise.
21165 (complex_direct_notype_declarator): Likewise.
21166 (direct_abstract_declarator): Likewise.
21167 (fn.def1): Remove exception_specification_opt.
21168 (fn.def2): Likewise.
21169 (condition): Likewise.
21170 (initdcl0): Likewise.
21171 (initdcl): Likewise.
21172 (notype_initdcl0): Likewise.
21173 (nomods_initdcl0): Likewise.
21174 (component_decl_1): Likewise.
21175 (component_declarator): Likewise.
21176 (after_type_component_declarator0): Likewise.
21177 (after_type_component_declarator): Likewise.
21178 (notype_component_declarator): Likewise.
21180 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21182 * call.c (build_over_call): Also use an INIT_EXPR when
21183 initializing anything from an rvalue.
21185 * call.c (build_over_call): Call stabilize_reference when building
21186 an INIT_EXPR instead of calling the copy ctor.
21188 * call.c (joust): Extend the previous change to all comparisons.
21190 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
21191 NO_LINKAGE_HEURISTICS.
21193 * decl2.c (finish_file): Emit any statics that weren't already.
21195 * typeck.c (build_static_cast): Implement.
21196 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
21197 * decl.c (grokparms): Use can_convert_arg instead of
21198 implicit_conversion directly.
21199 (copy_args_p): New fn.
21200 * cvt.c (convert_to_reference): Don't complain about temp with
21202 (build_up_reference): Handle TARGET_EXPRs.
21203 * call.c (build_over_call): Elide unnecessary temps.
21204 (can_convert*): Use new overloading code.
21206 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21208 * call.c: Move TYPE_PTR*_MACROS ...
21209 * cp-tree.h: To here.
21210 * typeck.c (build_reinterpret_cast): Implement.
21212 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
21214 (joust): If we're comparing a function to a builtin and the worst
21215 conversion for the builtin is worse than the worst conversion for the
21216 function, take the function.
21218 * typeck.c (build_const_cast): Implement.
21219 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
21220 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
21222 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
21224 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
21225 too early. Make sure we explode if exprtype turns out to be a
21226 NULL_TREE when it shouldn't be.
21228 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
21230 * cp-tree.h: New routine make_call_declarator.
21231 * lex.c (make_call_declarator): Define it.
21232 * except.c (init_exception_processing): Use it.
21233 (expand_builtin_throw): Likewise.
21234 (start_anon_func): Likewise.
21235 * decl2.c (finish_file): Likewise.
21236 * lex.c (cons_up_default_function): Likewise.
21237 * parse.y: Likewise.
21238 * pt.c (tsubst): Likewise.
21240 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
21242 * decl2.c (groktypefield): Remove unused code.
21244 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
21246 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
21247 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
21248 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
21249 nonempty_cv_qualifiers.
21252 * lex.c (make_pointer_declarator): Change type_quals into
21254 (make_reference_declarator): Likewise.
21256 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21258 * decl.c (start_function): Only check interface_* for templates
21259 with flag_alt_external_templates.
21261 * call.c (build_new_op): Check for comparison of different enum types.
21262 (build_over_call): Fix arg # output.
21264 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
21266 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21268 * call.c (build_new_op): Check for erroneous args.
21270 * call.c (build_new_method_call): Add missing args to cp_error.
21272 * tree.c (error_type): Don't print reference-to-array.
21274 * typeck.c (convert_for_assignment): Don't say contravariance for
21277 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
21279 * call.c (build_over_call): Diagnose bad convs for `this'.
21281 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
21284 * call.c (convert_like): Handle bad convs.
21285 (build_over_call): Handle bad convs better.
21287 * decl2.c: -fansi-overloading is now the default.
21289 * call.c (build_new_method_call): Check for erroneous args.
21291 * pt.c (instantiate_class_template): Propagate
21292 TYPE_USES_MULTIPLE_INHERITANCE.
21294 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
21296 * call.c (enforce_access): Add static to routine.
21298 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21300 * call.c (build_user_type_conversion_1): Fix bad handling.
21301 (compare_ics): Likewise.
21303 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21305 * call.c (standard_conversion): Oops.
21307 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
21309 * g++.c: Update test for win32 (&& ! cygwin32).
21311 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21313 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
21314 (ptr_reasonably_similar): New fn.
21315 * call.c (BAD_RANK): New rank.
21316 (ICS_BAD_FLAG): New macro.
21317 (standard_conversion): Handle almost-right pointer conversions.
21318 (reference_binding): Handle bad rvalue bindings.
21319 (add_*_candidate): Stuff.
21320 (build_over_call): Pass bad conversions to convert_for_initialization.
21321 (compare_ics): Handle bad convs.
21324 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
21326 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
21327 integer_type_node when computing pointer offsets.
21329 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21331 * tree.c (lvalue_type): New fn.
21332 (error_type): New fn.
21333 * call.c (op_error): Use error_type.
21334 (add_conv_candidate): Use lvalue_type.
21335 (add_builtin_candidates): Likewise.
21336 * error.c (args_as_string): Use error_type.
21338 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21340 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
21341 (tsubst): Not here.
21343 * decl.c (init_decl_processing): With -ansi, __null's type is the
21344 signed integral type with the same number of bits as a pointer.
21345 Introduce a new variable null_node for it.
21346 * cp-tree.h: Adjust.
21347 * call.c (null_ptr_cst_p): Adjust.
21349 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
21351 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
21354 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
21356 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
21357 fns of classes without virtual functions.
21359 * call.c (add_function_candidate): Handle `this' specially.
21360 (compare_ics): Likewise.
21362 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
21364 * typeck.c (build_conditional_expr): Fix handling of __null.
21366 * decl2.c (comdat_linkage): New fn.
21367 (import_export_vtable): Use it.
21368 (import_export_decl): Use it.
21369 * method.c (make_thunk): Use it.
21371 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21373 * pt.c (end_template_decl): If we don't actually have parms, return.
21374 * parse.y (template_header): Accept 'template <>'.
21376 * errfn.c: Allow 5 args.
21378 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21380 * tree.c (make_temp_vec): New fn.
21381 * pt.c (push_template_decl): Handle partial specs.
21382 (instantiate_class_template): Likewise.
21383 (more_specialized): Use get_bindings.
21384 (more_specialized_class): New fn.
21385 (get_class_bindings): New fn.
21386 (most_specialized_class): New fn.
21387 (do_function_instantiation): List candidates for ambiguous case.
21388 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
21389 (shadow_tag): Call push_template_decl for partial specializations.
21390 * parse.y: Likewise.
21391 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
21392 DECL_TEMPLATE_MEMBERS.
21393 * call.c (print_z_candidates): Reduce duplication.
21395 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21397 * decl2.c (lang_decode_option): Allow -fansi-overloading.
21399 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
21401 * pt.c (get_bindings): New fn.
21402 (most_specialized): Likewise.
21403 (do_function_instantiation): Use them.
21404 (add_maybe_template): New fn.
21405 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
21406 * call.c (build_new_op): Handle guiding decls.
21407 (build_new_function_call): Likewise.
21408 * decl2.c (finish_file): Likewise.
21410 * decl2.c (mark_used): Do synthesis here.
21411 * call.c (build_method_call): Not here.
21412 (build_over_call): Or here.
21413 * typeck.c (build_function_call_real): Or here.
21414 * tree.c (bot_manip): Call mark_used on functions used in default
21417 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
21419 * decl2.c (import_export_vtable): Delete code that disabled vtable
21420 heuristic on systems with ASM_OUTPUT_EXTERNAL.
21422 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21424 * typeck.c (build_x_function_call): Handle static call context
21427 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
21428 the function, not its outer block.
21430 * call.c (build_field_call): Pass fields on to build_opfncall
21431 regardless of TYPE_OVERLOADS_CALL_EXPR.
21432 (build_method_call): Pass on to build_new_method_call sooner.
21434 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
21436 * class.c (instantiate_type): Don't put a POINTER_TYPE to
21437 METHOD_TYPE on an expression. Also make a copy of rhs instead of
21440 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
21442 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
21443 (add_builtin_candidate): Don't take enums for ++.
21444 (build_new_method_call): Handle non-aggregates and field calls.
21445 Move new overloading code from...
21448 * decl.c (grokparms): Don't check default args in templates.
21450 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
21452 * cvt.c (build_new_op): Fix args to build_unary_op.
21453 (add_builtin_candidates): Don't call type_promotes_to on float.
21455 * decl.c (grokparms): Check the type of the default arg.
21457 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
21458 returning NULL_TREE.
21460 * typeck.c (build_x_binary_op): Avoid doing extra work.
21461 (build_x_unary_op): Likewise.
21462 (build_x_conditional_expr): Likewise.
21463 * cvt.c (build_over_call): Return.
21464 (add_builtin_candidate): Fix MEMBER_REF.
21465 (build_new_op): Likewise.
21467 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
21469 * method.c (build_overload_name): Put bug fix into code but leave
21470 disabled for now so we can be bug compatible with older releases
21471 that do repeats incorrectly. In the future, we can enable it.
21473 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
21475 * cvt.c (convert_like): Don't call build_cplus_new twice.
21477 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
21478 Control new overloading code with -fansi-overloading.
21480 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
21482 * cvt.c (build_over_call): Call build_cplus_new.
21483 * call.c (build_method_call): Likewise.
21484 * typeck.c (build_function_call_real): Likewise.
21485 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
21486 the COND_EXPR in a TARGET_EXPR so they use the same slot.
21488 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
21490 * typeck.c (complete_type): Propagate
21491 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
21493 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
21495 * cvt.c (joust): More ?: kludging. Sigh.
21496 (build_over_call): Don't try to synthesize global fns.
21498 * search.c (lookup_conversions): Use binfo marking.
21500 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
21502 * search.c (build_mi_matrix): Use the correct value of cid
21503 when determining the new mi_size.
21505 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
21507 * cvt.c (add_builtin_candidates): Do consider type conversion ops
21508 for the first parms of += et al.
21509 (strip_top_quals): New fn.
21510 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
21511 (implicit_conversion): Likewise.
21512 (add_builtin_candidates): Be careful about arrays.
21513 (build_new_method_call): Handle vtable optimization.
21515 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
21517 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
21518 * cvt.c (reference_binding): Use it.
21519 (implicit_conversion): Use it.
21520 (add_builtin_candidate, COND_EXPR): Use it.
21522 * cvt.c (build_new_function_call): Check for error args.
21524 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
21526 * gxx.gperf: Add __null.
21527 * hash.h: Regenerate.
21528 * lex.h: Add RID_NULL.
21529 * lex.c (init_lex): Create null_pointer_node here, stick it in
21531 * decl.c (init_decl_processing): Still set its type here.
21532 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
21533 (convert_to_pointer_force): Likewise.
21534 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
21536 * call.c (convert_harshness): Use null_ptr_cst_p.
21537 * typeck.c (convert_for_assignment): Likewise. Don't produce
21540 * error.c (args_as_string): Handle lists of actual args, too.
21541 * cvt.c (null_ptr_cst): Support (void*)0 for now.
21542 (build_user_type_conversion_1): Improve diagnostics.
21543 (build_new_function_call): Likewise.
21544 (build_object_call): Likewise.
21545 (build_new_method_call): Likewise. Move call before def diagnostic...
21546 (build_over_call): Here.
21548 * cvt.c (build_new_method_call): Don't complain about no match if
21549 LOOKUP_SPECULATIVELY.
21550 (build_over_call): Fix 'this' for virtual fn.
21551 (build_new_method_call): Add diagnostic.
21553 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21555 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
21556 constructors to be passed in.
21557 (build_over_call): Likewise.
21558 (build_user_type_conversion_1): Pass them in.
21559 (convert_like): Likewise.
21560 (build_object_call): Handle overloaded conversions.
21561 (build_over_call): Pass the right args to build_vfn_ref.
21562 (standard_conversion): Fix pmf convs.
21563 (joust): Handle comparing statics and non-statics.
21564 (build_new_method_call): New fn.
21565 * call.c (build_method_call): Call it if NEW_OVER.
21567 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
21569 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
21572 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
21574 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
21575 instead of just maybe_build_cleanup so that we deallocate the
21578 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21580 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
21581 * cp-tree.h (finish_prevtable_vardecl): Add decl.
21583 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
21585 * pt.c (instantiate_class_template): Call complete_type. Also, if
21586 we're at the end of the file and we just instantiated a template
21587 class with a vtable, call finish_prevtable_vardecl.
21589 * error.c (dump_decl): Don't explode (or explode more gracefully
21590 as appropriate) if the object being dumped has a null type.
21591 (dump_expr): Likewise.
21593 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
21594 by counting the number of nodes that we'll need before allocating
21596 (lookup_fnfields): Fix comment.
21597 (breadth_first_search): Fix comment.
21599 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
21601 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
21603 * class.c (finish_struct): Call cplus_decl_attributes here.
21604 (finish_struct_1): Not here.
21605 * cp-tree.h: Adjust.
21607 * pt.c (type_unification): New parameter STRICT.
21608 (unify): If STRICT, don't allow cv addition or base deduction.
21609 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
21611 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21613 * search.c (get_template_base{_recursive}): New fns.
21614 * pt.c (more_specialized): New fn.
21615 (do_function_instantiation): Use it.
21616 (unify): Handle base deduction.
21617 * cvt.c (joust): Use more_specialized.
21618 Don't arbitrarily choose between non-builtin candidates.
21619 (build_over_call): Call require_complete_type.
21621 * decl.c (start_function): Statics are static even in a #pragma
21624 * decl2.c (import_export_vtable): Disable vtable heuristic on
21625 systems with ASM_OUTPUT_EXTERNAL.
21627 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
21628 (standard_conversion): No std conv to enum type.
21630 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
21633 * cvt.c (reference_binding): Bind directly to a base subobject of
21636 * cvt.c (build_new_op): Enforce access control.
21638 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
21640 * typeck2.c (process_init_constructor): When scanning the
21641 union for a named field, skip things that aren't FIELD_DECLs.
21643 * method.c (synthesize_method): Don't scan fndecl's rtl if
21644 we're at the end of the file; just assume the function can't
21647 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21649 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
21652 * cvt.c (build_user_type_conversion_1): Handle overloaded
21655 * cvt.c (add_builtin_candidates): Don't consider type conversion
21656 operators for the first parameter of operator=.
21658 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
21660 * typeck.c (complete_type): Only call layout_type if we're not
21661 expanding a template.
21663 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21665 * cvt.c (compare_ics): Oops.
21667 * cvt.c (op_error): Oops.
21669 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
21670 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
21671 (build_conv): Use them.
21672 (implicit_conversion): Use them.
21673 (convert_like): Handle them.
21674 (build_new_op): Handle builtin COND_EXPR again.
21675 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
21676 in lists of types for COND_EXPR.
21677 (add_builtin_candidate): Add enum candidates for COND_EXPR.
21679 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
21681 * typeck.c (build_modify_expr): Always attempt to build a call to
21682 the assignment operator, even if we're using a default one.
21683 (convert_for_initialization): Call complete_type.
21685 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21687 * cvt.c (reference_binding): A REF_BIND gets the reference type.
21688 (implicit_conversion): Likewise.
21689 (convert_like): Likewise.
21690 (compare_ics): Likewise.
21691 (compare_qual): Likewise.
21692 (print_z_candidates): Handle no candidates.
21693 (build_new_op): Don't handle builtin COND_EXPR for now.
21695 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
21697 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
21699 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21701 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
21703 * cvt.c (build_builtin_candidate): Oops.
21704 (build_new_op): Oops.
21706 * method.c (build_opfncall): Pass COND_EXPR on.
21707 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
21708 (add_builtin_candidate{,s}): Likewise.
21709 (add_builtin_candidates): Likewise.
21710 (print_z_candidates, op_error, build_new_op): Likewise.
21711 (type_decays_to): New fn.
21712 * lex.c (init_lex): Just say ?: for COND_EXPR.
21714 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21716 * typeck.c (complete_type): Call layout_type rather than building
21719 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
21720 only use ptrdiff_t.
21722 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21724 * cvt.c: Always compile the new overloading code (but don't use it).
21725 (implicit_conversion): Add a BASE_CONV when converting to
21726 the same class type.
21727 (convert_like): Handle BASE_CONV.
21729 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21731 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
21732 (add_builtin_candidate): Likewise.
21735 * typeck.c (build_x_function_call): Try an operator function
21736 whenever we call an object of class type.
21737 * method.c (build_opfncall): Pass CALL_EXPRs through.
21738 * cvt.c (implicit_conversion): Do const-ref case first.
21739 (add_conv_candidate, build_object_call, op_error): New fns.
21740 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
21741 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
21742 builtin candidates.
21743 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
21744 Fall back on preincrement handling. Use op_error.
21746 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
21747 an error_mark_node.
21748 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
21751 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
21753 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
21755 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
21757 * typeck.c (build_component_ref_1): Use build_component_ref
21758 instead of open coding it here.
21760 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21762 * g++.c (main): Don't link with -lg++.
21765 * cvt.c (convert_to_reference): Don't use convert_from_reference on
21766 result of build_type_conversion.
21767 (cp_convert): Only call build_method_call for ctors if
21768 build_type_conversion failed.
21769 (ptr_complete_ob): New function.
21770 (TYPE_PTR{,OB,MEM}_P): New macros.
21771 ({add,build}_builtin_candidate{,s}): New functions.
21772 (print_z_candidates): Handle builtins.
21773 (build_user_type_conversion_1): Don't use conversion fns for
21774 converting to a base type.
21775 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
21776 (build_user_type_conversion): Use convert_from_reference.
21777 (build_new_op): New function.
21778 (build_over_call): Fix handling of methods.
21779 (compare_ics): Handle AMBIG_CONV properly.
21780 * typeck2.c: Increment abort count.
21781 * method.c (build_opfncall): Forward most requests to build_new_op.
21782 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
21784 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21786 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
21787 invalid second argument to dump_expr_list.
21789 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
21791 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
21793 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
21795 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
21798 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
21800 * typeck2.c (process_init_constructor): New pedwarn for using { }
21801 to initialize a pointer to member function.
21802 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
21803 we can avoid the new error.
21805 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
21807 * typeck.c (build_ptrmemfunc1): New function to hide details of
21808 pointer to member functions better.
21810 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
21812 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
21813 methods into the actual method, as we know the implied object is
21816 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21818 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
21819 inside a system header.
21821 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
21823 * call.c (build_method_call): Call complete_type on the
21826 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
21828 * typeck.c (build_component_ref): Always build up an OFFSET_REF
21829 for obj_ptr->func so that we can know which object to use in a
21832 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
21834 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
21835 around things. Also improve maintainability.
21837 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
21839 * decl.c (grokdeclarator): Check for overflow when evaluating an
21842 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
21844 * cvt.c (cp_convert): Don't check for ambiguity with constructor
21847 * typeck.c (build_x_function_call): Pass function overload
21848 questions to new overloading code if NEW_OVER.
21849 * init.c (expand_aggr_init_1): Only check for type conversion ops
21850 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
21851 Don't check for ambiguity with constructor if NEW_OVER.
21852 * cvt.c (convert_to_reference): Dereference the result of a type
21853 conversion operator.
21854 (build_conv): Propagate ICS_USER_FLAG.
21855 (implicit_conversion): Call instantiate_type.
21856 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
21857 (add_function_candidate): Fix cv-quals on argtype.
21858 (print_z_candidates): New function.
21859 (build_new_function_call): Call it.
21860 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
21861 consider non-converting constructors.
21862 Call print_z_candidates.
21863 Return an AMBIG_CONV for an ambiguous conversion.
21864 (build_user_type_conversion): Handle AMBIG_CONV.
21865 (convert_like): Fix test for building TARGET_EXPR.
21866 Call instantiate_type.
21867 Handle AMBIG_CONV and LVALUE_CONV.
21868 (build_over_call): Handle 0 args and ellipsis.
21869 * cp-tree.def: Add AMBIG_CONV.
21871 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
21873 * decl.c (lookup_name_real): If we find mem in obj when parsing
21874 `obj->mem', make sure we return the right value.
21876 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
21878 * search.c (get_base_distance): Call complete_type.
21880 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
21882 * decl.c (store_bindings): Make static.
21884 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21886 * init.c (expand_aggr_init_1): Don't check type conversions if
21889 * cvt.c (z_candidate): Put back template field.
21890 (add_function_candidate): Set it.
21891 (add_template_candidate): Likewise.
21893 (compare_qual): Handle references and pointers to members.
21894 (compare_ics): Handle reference bindings.
21896 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
21898 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
21900 * call.c (compute_conversion_costs): Call complete_type.
21902 * tree.c (vec_binfo_member): Use comptypes instead of comparing
21903 pointers, so we can handle template parameters.
21905 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
21907 * cvt.c (cp_convert_to_pointer): We have to call complete_type
21908 here; let's make it explicit instead of a side effect of an
21911 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21913 * cvt.c (z_candidate): Remove template field.
21914 (reference_binding): Handle binding to temporary.
21915 (implicit_conversion): Likewise.
21916 (add_function_candidate): Handle artificial constructor parms.
21917 Handle functions with too few parms.
21918 (add_template_candidate): New function.
21919 (build_user_type_conversion_1): Handle constructors.
21920 (convert_like): Likewise.
21921 (build_over_call): Likewise.
21922 (build_new_function_call): Support templates.
21923 (compare_ics): Fix reference, inheritance handling.
21925 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
21927 * decl.c: Add signed_size_zero_node.
21928 (init_decl_processing): Build it.
21929 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
21930 when we're trying to make a negative delta.
21932 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21934 Stop doing this damn index==strchr variable name confusion.
21935 * class.c (add_virtual_function): Change local var INDEX to be
21937 (add_method): Likewise.
21938 * lex.c (print_parse_statistics): Likewise.
21939 * search.c (make_memoized_table_entry): Likewise.
21940 (lookup_fnfields_here): Likewise.
21941 (lookup_field): Likewise.
21942 (lookup_fnfields): Likewise.
21943 (get_baselinks): Likewise.
21944 * sig.c (build_signature_table_constructor): Likewise.
21945 (build_signature_method_call): Likewise.
21946 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
21947 (get_member_function_from_ptrfunc): Likewise.
21948 (build_ptrmemfunc): Change local var INDEX to be IDX.
21949 (c_expand_start_case): Likewise.
21951 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
21953 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
21954 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
21955 (convert_to_reference): Use build_type_conversion to convert to
21956 the reference type directly.
21957 (standard_conversion): Fix void* case, non-conversions.
21958 (reference_binding): Fix expr == 0 case, non-conversions.
21959 (convert_like): Support REF_BIND.
21960 (compare_qual): Split out from compare_ics.
21961 (compare_ics): Use it, handle icses with only a qual_conv.
21963 * init.c (expand_vec_init): Don't crash if decl is NULL.
21965 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
21967 * mpw-config.in: New file, configury for Mac MPW.
21968 * mpw-make.sed: New file, makefile editing for MPW.
21970 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21972 * pt.c (instantiate_class_template): Call repo_template_used.
21974 * search.c (lookup_conversions): Only lookup conversions in
21977 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21979 * cp-tree.def: Renamed from tree.def, to avoid confusion with
21981 * cp-tree.h, lex.c: Include cp-tree.def.
21982 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
21984 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
21986 * init.c (build_vec_delete_1): Call complete_type.
21988 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
21990 * except.c (start_anon_func): Make sure anonymous functions are
21993 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21995 * decl.c (finish_function): If function_depth > 1, set nested.
21997 * decl2.c (grokbitfield): Revert Bob's change.
21998 * class.c (finish_struct_1): Fix handling of named bitfield widths.
22000 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
22002 * pt.c (add_pending_template): Handle types.
22003 (lookup_template_class): With -fexternal-templates, just add the class
22004 to pending_templates instead of instantiating it now.
22005 * decl2.c (finish_file): Handle types in pending_templates.
22007 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
22009 * decl2.c (grokbitfield): Handle constant decls appropriately.
22010 Give an appropriate error message now instead of spewing core
22013 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
22015 * decl2.c: Don't turn on thunks by default for now.
22017 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
22019 * typeck.c (complete_type): Handle error_mark_node.
22020 (common_type, OFFSET_TYPE): Handle template_type_parms.
22022 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
22024 * pt.c (instantiate_decl): If at_eof, call import_export_decl
22025 regardless of DECL_INLINE.
22027 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
22029 * class.c (finish_struct_bits): Copy TYPE_SIZE.
22031 * rtti.c (build_dynamic_cast): Support templates.
22032 * tree.def: Support DYNAMIC_CAST_EXPR.
22033 * pt.c (tsubst_copy): Likewise.
22034 * decl2.c (build_expr_from_tree): Likewise.
22036 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22038 * typeck.c (build_static_cast): Support templates.
22039 (build_const_cast): Likewise.
22040 * tree.def: Support CONST/STATIC_CAST_EXPR.
22041 * pt.c (tsubst_copy): Likewise.
22042 * decl2.c (build_expr_from_tree): Likewise.
22044 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22046 * decl2.c (finish_vtable_vardecl): Don't trust
22047 TREE_SYMBOL_REFERENCED for vtables of local classes.
22049 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22051 * pt.c (tsubst_copy): Handle operator T.
22053 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22055 * init.c (build_delete): Move creation of PARMS inside test of
22056 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
22058 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
22060 * typeck.c (build_conditional_expr): Don't assume that
22061 the arguments to ?: are always pointers or records.
22063 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22065 * decl2.c (import_export_decl): Still emit static/weak/comdat
22066 copies of inline template functions with -fno-implicit-templates.
22068 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
22070 * init.c (build_delete): Determine the complete basetype
22071 path to the destructor we're calling.
22073 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
22075 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
22076 initialize the enum, because we really and truly don't know where
22078 (start_enum): Don't copy integer_zero_node because
22079 build_enumerator will do it.
22081 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22083 * decl.c (finish_function): Do access control on base destructors.
22085 * pt.c (tsubst, case FUNCTION_DECL): Set up
22086 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
22089 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
22091 * cvt.c (build_up_reference): If we have already extended the
22092 lifetime of the temporary, don't try it again.
22093 * typeck.c (c_expand_return): Don't try and convert the return
22094 value twice when we want a reference, once is enough.
22096 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
22098 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
22099 LOOKUP_ONLYCONVERTING at all for now.
22101 * search.c (add_conversions): Put the conversion function in
22102 TREE_VALUE, the basetype in TREE_PURPOSE.
22103 * cvt.c (build_type_conversion): Adjust.
22104 * cvt.c (build_expr_type_conversion): Adjust.
22105 * call.c (user_harshness): Adjust.
22107 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
22109 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
22112 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
22114 * except.c (expand_start_catch_block): Add a dummy region, if we
22115 get an error, so that we can avoid core dumping later.
22117 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
22119 * cp-tree.h (OFFSET_REF): Remove.
22120 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
22121 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
22122 * init.c (expand_aggr_init_1): Likewise.
22123 (build_new): Likewise.
22124 * typeck.c (expand_target_expr): Likewise.
22126 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22128 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
22131 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
22133 * cvt.c (build_up_reference): Redo how and when temporaries are
22135 * decl.c (grok_reference_init): Don't try and be smart about
22138 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
22140 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
22141 (TARGET_EXPR...), now that it has 4 arguments.
22142 * tree.c (build_cplus_new): Likewise.
22144 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22146 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
22148 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
22149 * decl.c (struct saved_scope): Remove named_labels,
22150 {base,member}_init_list.
22151 (maybe_push_to_top_level): Don't set them. Call
22152 push_cp_function_context if appropriate.
22153 (pop_from_top_level): Likewise.
22155 * method.c (do_build_assign_ref): Remove obsolete check of
22156 TYPE_HAS_ASSIGN_REF (basetype).
22158 * decl.c (grokfndecl): Diagnose user definition of
22159 implicitly-declared methods.
22161 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
22163 * method.c (do_build_copy_constructor): Add code to give
22164 meaningful error messages instead of crashing.
22165 (do_build_assign_ref): Don't synthesize assignment operators for
22166 classes containing reference or const members.
22168 * class.c (struct base_info): Remove cant_synth_copy_ctor
22169 and cant_synth_asn_ref.
22170 (finish_base_struct): Remove the code that tries to conditionalize
22171 synthesis of copy constructors & assignment operators based on
22172 access permissions. Instead, let it fail when it tries to
22173 synthesize the copy constructor. This will give meaningful error
22174 messages instead of silently generating code to perform a bitcopy.
22176 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
22178 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
22179 determining types for constant values.
22181 * decl.c (struct named_label_list): Use instead of stuffing
22182 random items into a TREE_LIST node.
22183 (named_label_uses): Use the new struct.
22184 (poplevel): Likewise.
22185 (lookup_label): Likewise.
22186 (define_label): Add an error message to tell the user the line
22187 where the goto is located in addition to the destination of the
22189 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
22191 (finish_function): Likewise.
22193 (start_decl): Complain about defining a static data member
22194 in a different type from which it was declared.
22196 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22198 * cvt.c (build_expr_type_conversion): Adjust.
22200 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
22202 * call.c (build_method_call): Always convert 'this' to the
22205 * search.c (add_conversions): Put the conversion function in
22206 TREE_VALUE, the type in TREE_PURPOSE.
22207 * cvt.c (build_type_conversion): Adjust.
22208 * call.c (user_harshness): Adjust.
22210 * method.c (emit_thunk): Call temporary_allocation and
22211 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
22213 * tree.c (build_cplus_array_type): Handle tweaking of
22214 TYPE_MAIN_VARIANT here.
22215 * typeck.c (common_type): Not here.
22217 * typeck.c (complete_type): Only try to complete an array type if
22220 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
22222 * decl.c (grokvardecl): Call complete_type.
22223 (grokdeclarator): Call complete_type for PARM_DECLs.
22225 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
22227 * pt.c (instantiate_class_template): Re-set
22228 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
22230 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
22232 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
22233 smart enough to do it right.
22234 * tree.c (cp_expand_decl_cleanup): Likewise.
22235 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
22236 cp_expand_decl_cleanup.
22237 (store_parm_decls): Likewise.
22238 (hack_incomplete_structures): Likewise.
22239 * except.c (push_eh_cleanup): Likewise.
22241 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
22243 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
22244 frontend to the backend where it belongs.
22245 * tree.c (unsave_expr): Likewise.
22246 (unsave_expr_now): Likewise.
22247 * tree.def (UNSAVE_EXPR): Likewise.
22248 * cp-tree.h (unsave_expr): Likewise.
22249 (unsave_expr_now): Likewise.
22251 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
22253 * init.c (emit_base_init): Make sure the partial EH cleanups live
22254 on the function_obstack.
22256 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
22258 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
22259 when checking for pointer types.
22261 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22263 * pt.c (instantiate_class_template): Remove obsolete check for
22264 access declarations.
22266 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
22268 * call.c (build_overload_call): Simplify calls to
22269 build_overload_call by removing last parameter.
22270 (build_method_call): Likewise.
22271 * cp-tree.h: Likewise.
22272 * method.c (build_opfncall): Likewise.
22273 * typeck.c (build_x_function_call): Likewise.
22275 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
22277 * call.c (default_parm_conversions): Factor out common code.
22278 (build_method_call): Use it.
22279 (build_overload_call_real): Use it.
22281 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
22283 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
22284 but pedwarn as the code is bogus.
22285 * typeck.c (decay_conversion): Likewise.
22286 (build_function_call_real): Use build_addr_func instead of
22287 default_conversion. Don't allow pointer-to-method functions down
22289 (build_unary_op): Use real pointer-to-member functions instead of
22291 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
22292 (convert_for_assignment): Removed some obsolete code.
22293 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
22294 build_x_function_call instead of current_class_ptr. Only call
22295 digest_init once on an initializer, we do this just checking
22297 (build_expr_from_tree): Pass current_class_ref to
22298 build_x_function_call instead of current_class_ptr.
22299 * init.c (build_member_call): Likewise.
22300 * pase.y: Likewise.
22301 * error.c (dump_expr): Handle OFFSET_REFs better.
22302 * pt.c (unify): Handle pointer-to-member functions better.
22303 * decl.c (finish_function): Clear out current_class_ref just like
22304 we do for current_class_ptr.
22306 * typeck.c (get_delta_difference): Handle virtual bases better.
22308 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
22310 * sig.c (build_signature_table_constructor): Use the delta for
22311 the original basetype for this virtual function with thunks.
22312 (build_signature_method_call): We still need to adjust 'this'
22315 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
22317 * call.c (build_addr_func): New routine. Used to get the `real'
22318 address of a function or a method. Needed to avoid getting a
22319 pointer-to-member function.
22320 (build_call): New routine to build CALL_EXPRs.
22321 (build_method_call): Use it.
22322 * cvt.c (convert_to_aggr): Likewise.
22323 * typeck.c (build_function_call_real): Likewise.
22324 * sig.c (build_signature_table_constructor): Use build_addr_func.
22325 * cp-tree.h (build_call, build_addr_func): Declare them.
22327 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
22329 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
22330 * parse.y: Remove uses of LOOKUP_AGGR.
22332 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
22334 * *.[chy]: Rename current_class_decl to current_class_ptr, and
22335 C_C_D to current_class_ref.
22337 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22339 * call.c (convert_harshness): Tighten up pointer conversions.
22341 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
22343 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
22344 (finish_file): Likewise.
22346 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22348 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
22350 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
22353 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22355 * decl2.c: Turn on thunks by default where supported.
22357 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
22359 * cp-tree.h (build_overload_call_maybe): Removed.
22360 * call.c (build_overload_call_real): Invert meaning of last arg to
22361 be require_complete.
22362 (build_overload_call): Likewise.
22363 * typeck.c (build_x_function_call): Use build_overload_call_real
22364 instead of build_overload_call_maybe.
22366 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
22368 * decl2.c (finish_file): Don't try to emit functions that haven't
22371 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
22373 * decl2.c (finish_vtable_vardecl): Oops.
22375 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
22376 Also store the bindings from previous_class_values.
22377 (pop_from_top_level): Restore them.
22379 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
22381 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
22382 symbol has been referenced.
22383 (finish_file): Re-join synthesis/vtable loop with inline emission
22384 loop, disable inlining when an inline is output.
22386 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
22388 * except.c (init_exception_processing): Setup saved_in_catch.
22389 (push_eh_cleanup): Reset __eh_in_catch.
22390 (expand_start_catch_block): Set __eh_in_catch.
22392 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
22394 * except.c (push_eh_cleanup): Add tracking for whether or not we
22395 have an active exception object.
22396 (expand_builtin_throw): Use it to make sure a rethrow without an
22397 exception object is caught.
22399 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
22401 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
22404 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
22406 * decl2.c (finish_file): Also use sentries for vars with
22407 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
22410 * lex.c (handle_cp_pragma): Disable #pragma
22411 interface/implementation if SUPPORTS_ONE_ONLY > 1.
22413 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
22415 * method.c (emit_thunk): Wrap default case in
22416 temporary/permanent_allocation.
22418 * method.c (make_thunk): Use DECL_ONE_ONLY.
22419 (emit_thunk): Call assemble_end_function.
22421 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22423 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
22424 (import_export_decl): Likewise.
22425 (finish_prevtable_vardecl): Disable vtable hack if
22426 SUPPORTS_ONE_ONLY > 1.
22428 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
22430 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
22431 PREDECREMENT_EXPRs take two arguments, not one.
22433 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
22435 * class.c (build_vtable_entry): Don't build thunks for abstract
22438 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
22441 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
22443 * class.c (set_rtti_entry): Use size_zero_node.
22444 (build_vtable): Likewise.
22446 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
22448 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
22449 (prepare_fresh_vtable): Likewise.
22451 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
22453 * method.c (emit_thunk): Call mark_used on the target function.
22455 * call.c (build_method_call): Don't warn about pending templates.
22457 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
22459 * decl2.c (finish_file): Fix list walking logic.
22461 * typeck2.c (check_for_new_type): Only warn if -pedantic.
22463 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
22465 * class.c (finish_struct_1): Remove old code for
22466 dont_allow_type_definitions.
22467 * cp-tree.h: Likewise.
22468 * spew.c: Make sure cp-tree.h is included before parse.h, so the
22469 definition of flagged_type_tree is found before it is used.
22471 * parse.y: Added the ftype member to the type union, and changed a
22472 number of rules to use it instead of ttype. Added calls to
22473 check_for_new_type() as appropriate.
22474 * typeck2.c (check_for_new_type): New function for checking
22475 if a newly defined type appears in the specified tree.
22476 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
22477 for check_for_new_type().
22479 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
22481 * decl2.c (finish_file): Only use a sentry if the decl is public.
22483 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
22484 don't pass LOOKUP_ONLYCONVERTING.
22486 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
22488 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
22489 properly keeps track of const and volatile type modifiers.
22491 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
22493 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
22494 * pt.c (comp_template_args): Use it.
22496 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
22497 assemble_external for artificial function decls.
22499 * decl.c (cp_finish_decl): Oops.
22501 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
22503 * decl2.c (import_export_decl): Put static data member templates
22504 into common storage, or make them weak, depending on whether they
22505 are dynamically or statically initialized.
22506 (get_sentry): New function.
22507 (finish_file): Do import_export_decl for static data members before
22508 building the init/fini functions. Don't init/fini a variable that's
22509 EXTERNAL. Use a sentry for variables in common. Fix mismatching
22510 push/pop_temp_slots.
22511 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
22512 expand_static_init thang.
22513 * method.c (get_id_2): New function.
22515 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
22517 * parse.y (empty_parms): Make sure we use C++-style prototypes
22518 when we're declaring member functions.
22520 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
22522 * Makefile.in (CONFLICTS): 16 s/r conflicts.
22523 * parse.y (self_template_type): New nonterminal.
22525 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
22527 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
22529 * parse.y (base_class.1): Allow 'typename foo::bar'.
22531 * lex.c (check_newline): Remove #pragma code that plays with the
22532 input stream, since we now deal with tokens. Clear nextchar when
22534 (handle_cp_pragma): Use real_yylex.
22535 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
22538 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
22540 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
22542 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22544 * parse.y: New token SELFNAME for potential constructor.
22545 * spew.c (yylex): Handle it.
22546 * lex.c (identifier_type): Produce it.
22548 * parse.y (complete_type_name): In :: case, don't push class binding.
22549 (complex_type_name): Likewise.
22551 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
22553 * typeck.c (build_reinterpret_cast): Handle pointer to member
22556 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22558 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
22560 (check_newline): Put the vtable/unit/implementation/interface pragma
22561 code into handle_cp_pragma, replacing it with a call.
22562 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
22563 args. Get the next token after handling the pragma token.
22565 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
22567 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
22568 (convert_to_pointer_force): Likewise.
22570 * init.c (build_new): Fix array new without -fcheck-new.
22572 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
22574 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
22575 tree.c: Lose TYPE_NESTED_NAME.
22577 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
22580 * tree.def: Add VEC_INIT_EXPR.
22581 * expr.c (cplus_expand_expr): Handle it.
22582 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
22583 the extra file-scope symbol nastiness.
22585 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22587 * method.c (make_thunk): Thunks are static.
22588 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
22590 * decl2.c (mark_vtable_entries): Emit thunks as needed.
22591 (finish_file): Don't emit them here.
22593 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
22595 * rtti.c (build_dynamic_cast): Handle null pointers.
22596 (ifnonnull): New function.
22598 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
22600 * call.c (build_method_call): Remember the original basetype we
22601 were called with. Give an error message instead of trying
22602 (incorrectly) to call a non-static member function through a
22603 non-inherited class.
22605 * search.c (expand_upcast_fixups): Mark the new fixup as
22608 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22610 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
22612 * class.c (set_rtti_entry): Fix for thunks.
22614 * decl2.c (import_export_decl): Still emit typeinfo fns for
22615 cv-variants of builtin types.
22617 * rtti.c (expand_class_desc): Set up base_info_type_node here.
22618 (init_rtti_processing): Instead of here.
22620 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
22622 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
22623 (build_typeid): Only complain about taking dynamic typeid without
22626 * decl2.c: flag_rtti defaults to 1.
22628 * rtti.c (get_tinfo_var): The general class case is now smaller.
22629 (init_rtti_processing): Pack the latter three fields of base_info
22632 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
22634 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
22636 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
22638 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
22639 (push_memoized_context): Split out code to undefer pop_type_level to
22640 (clear_memoized_cache): here.
22641 (pop_memoized_context): We can only handle one layer of deferral of
22642 pop_type_level so clear the cache, if there was a previous level.
22644 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22646 * rtti.c (init_rtti_processing): Build up base_info_type_node.
22647 (expand_class_desc): Use one pointer to an array of base_info
22648 structs, passed using a CONSTRUCTOR.
22650 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
22652 * class.c (build_vbase_path): Remove block extern for
22653 flag_assume_nonnull_objects here.
22654 (build_vfn_ref): Split out functionality into build_vtbl_ref.
22655 (build_vtbl_ref): New routine.
22656 (build_vtable): Set up rtti info here.
22657 (add_virtual_function): Note in CLASSTYPE_RTTI the best
22658 place where we can get the rtti pointers from to avoid having to
22659 search around for a place.
22660 (finish_base_struct): Likewise.
22661 (finish_struct_1): Likewise. Never create totally new vtables
22662 with totally new vtable pointers for rtti. Disable code to layout
22663 vtable pointers better until we want to break binary
22665 * rtti.c (build_headof_sub): New routine to convert down to a
22666 sub-object that has an rtti pointer in the vtable.
22667 (build_headof): Use it. Also, use build_vtbl_ref now to be more
22669 (build_dynamic_cast): Make sure we have saved it, if we need to.
22670 * search.c (dfs_init_vbase_pointers): Disable code that deals with
22671 a more efficient vtable layout, enable later.
22672 * call.c (flag_assume_nonnull_objects): Moved declaration to
22673 * cp-tree.h: here. Declare build_vtbl_ref.
22674 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
22675 function calls that want a tree.
22677 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
22679 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
22680 other X subobjects in the most derived type. Ack.
22682 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
22683 get_typeid will do it for us.
22684 (get_typeid_1): Break out call-building for expand_*_desc to use.
22685 (get_typeid): Call it.
22686 (expand_*_desc): Likewise.
22687 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
22689 (init_decl_processing): Lose builtin_type_tdescs lossage.
22690 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
22692 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
22694 * pt.c (tsubst): When calling set_nested_typename, use
22695 TYPE_NESTED_NAME (current_class_type) instead of
22696 current_class_name.
22698 * decl.c (pushdecl): Likewise.
22699 (pushdecl_class_level): Likewise.
22700 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
22701 set_nested_typename.
22703 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
22705 * rtti.c (synthesize_tinfo_fn): Handle arrays.
22707 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
22709 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
22711 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
22712 (init_rtti_processing): Lose bad_cast_type.
22713 (build_dynamic_cast): Use throw_bad_cast.
22715 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
22717 * decl2.c (finish_file): Don't synthesize artificial functions
22718 that are external and not inline.
22720 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
22722 * decl2.c (finish_file): Handle having new inlines added to
22723 saved_inlines by synthesis.
22725 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
22727 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22729 RTTI rewrite to initialize nodes as needed, not require that
22730 users #include <typeinfo>, complete functionality and reduce wasted
22732 * rtti.c (init_rtti_processing): New fn.
22733 (build_typeid): The vtable entry is now a function.
22734 (get_tinfo_var): New fn.
22735 (get_tinfo_fn): Likewise.
22736 (get_typeid): Use it.
22737 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
22738 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
22740 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
22741 (synthesize_tinfo_fn): New fn.
22742 * method.c (build_t_desc_overload): Lose.
22743 (build_overload_with_type): More generic.
22744 * decl.c (init_decl_processing): Call init_rtti_processing.
22745 * class.c (set_rtti_entry): Use get_tinfo_fn.
22746 * decl2.c (mark_vtable_entries): Mark the rtti function.
22747 (finish_prevtable_vardecl): Don't build_t_desc.
22748 (import_export_decl): Handle tinfo functions.
22749 (finish_file): Likewise.
22750 * typeck.c (inline_conversion): New fn.
22751 (build_function_call_real): Use it.
22752 * cp-tree.h: Add decls.
22754 * method.c (hack_identifier): Also convert component_refs from
22757 * lex.c (cons_up_default_function): Use the type, not the name, in
22760 * decl2.c (import_export_vtable): Fix weak vtables.
22762 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
22764 * search.c (get_base_distance_recursive): Fix access checks for
22767 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22769 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
22771 (convert_harshness): Add prototypes wrapped by PROTO.
22772 * decl2.c (grok_function_init): Likewise.
22773 (do_toplevel_using_decl): Change to void return type.
22774 * class.c (build_vtable_entry): Remove decl of make_thunk.
22775 (merge_overrides): Fix order of arg definitions.
22776 (finish_vtbls): Likewise.
22777 (fixup_vtable_deltas): Likewise.
22778 (modify_all_direct_vtables): Likewise.
22779 (modify_all_indirect_vtables): Likewise.
22780 * search.c (get_base_distance_recursive): Likewise.
22781 (get_abstract_virtuals_1): Likewise.
22782 (fixup_virtual_upcast_offsets): Likewise.
22783 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
22784 * init.c (perform_member_init): Fix order of arg definitions.
22785 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
22786 * cp-tree.h (make_thunk): Add decl.
22787 (overload_template_name, push_template_decl): Add decls.
22788 (do_toplevel_using_decl): Change to void return type.
22789 (vec_binfo_member): Add decl.
22791 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22793 * typeck.c (mark_addressable, convert_for_assignment,
22794 convert_for_initialization, pointer_int_sum, pointer_diff,
22795 unary_complex_lvalue): Add prototypes wrapped by PROTO.
22796 (convert_sequence): #if 0 fn decl, since definition also is.
22798 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
22800 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
22801 cast to pointer types for type searching.
22803 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22805 * typeck.c (get_delta_difference): Use cp_error, not error, in the
22806 case where BINFO == 0.
22808 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
22810 * call.c (build_method_call): Fix wording of error messages so
22811 constructors come out right.
22813 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
22815 * decl.c (push_overloaded_decl): Don't warn about hidden
22816 constructors when both the type and the function are declared
22817 in a system header file.
22819 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
22821 * class.c (finish_struct_1): Propagate the TYPE_PACKED
22822 flag for the type to the type's fields.
22824 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22826 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
22828 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
22830 * class.c (base_info, finish_base_struct): Replace
22831 needs_virtual_dtor with base_has_virtual.
22833 (finish_struct_1): Remove the old code that tried to make default
22834 destructors virtual. Use base_has_virtual when checking if we need
22835 to add a vtable entry for the rtti code.
22837 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22839 * pt.c (push_template_decl): Complain about template decl with
22840 inappropriate declaration.
22842 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
22844 * typeck.c (build_x_unary_op): Remove bogus check for taking
22845 the address of a member function.
22847 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
22849 * parse.y (constructor_declarator): Only push the class if
22850 we are not already in the class.
22852 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
22854 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
22855 Add additional argument to INIT_CUMULATIVE_ARGS.
22857 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
22859 * decl.c (shadow_tag): Fix error about anon union with methods.
22861 * parse.y (self_reference): Only generate a self-reference if this
22862 is a non-template class.
22863 (opt.component_decl_list): Only use it if it was generated.
22865 * parse.y (component_decl_1): Use constructor_declarator.
22866 (fn.def2): Likewise.
22867 (notype_component_declarator0): Likewise.
22869 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
22871 * typeck.c (build_x_unary_op): Add checks for taking the address
22872 of a TARGET_EXPR or of a member function, and give appropriate
22875 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
22877 * pt.c (process_template_parm): Allow template type parms to be
22878 used as types for template const parms.
22880 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
22882 * init.c (expand_vec_init): Ensure the eh cleanups are on the
22885 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22887 * decl.c (lookup_name_real): Be even more picky about the
22888 ambiguous lookup warning.
22889 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
22890 * parse.y (constructor_declarator): Rather than here.
22892 * parse.y (constructor_declarator): New nonterminal.
22894 (explicit_instantiation): Likewise.
22896 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22898 Add implicit declaration of class name at class scope.
22899 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
22900 * parse.y (self_reference): New nonterminal.
22901 (opt.component_decl_list): Use it.
22902 (fn.def1): Add nested_name_specifier type_name cases.
22903 * class.c (build_self_reference): New function.
22904 (finish_struct): Handle access_default later, move self-reference
22906 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
22907 * cp-tree.h: Adjust.
22909 * pt.c (do_function_instantiation): Separate handling of member
22910 functions and non-member functions properly.
22912 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
22914 * pt.c (process_template_parm): Improve error for 'volatile class K'.
22916 * class.c (finish_struct_1): Check the right slot for destructors.
22918 * decl.c (start_enum): Complain about enum templates.
22920 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
22922 * init.c (resolve_offset_ref): Offset pointers to member data by one.
22923 * typeck.c (unary_complex_lvalue): Likewise.
22925 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
22927 * typeck.c (c_expand_return): Check for a returned local
22928 array name, similar to the check for an ADDR_EXPR.
22930 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22932 * decl.c (cp_finish_decl): Don't build cleanups for static
22935 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
22937 * typeck.c (build_modify_expr): Fix error messages to be more
22939 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
22940 assignment operators.
22941 * error.c (assop_as_string): Likewise. Add support for `%Q' for
22942 assignment operators.
22944 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22946 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
22947 give an error if initialized. pedwarn about nested type with the
22948 same name as its enclosing class.
22950 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
22952 * typeck.c (require_complete_type): Be sure to instantiate the
22953 MAIN_VARIANT of the type.
22955 * decl2.c (finish_file): Instantiate pending templates before
22956 processing static constructors and destructors.
22958 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
22961 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
22963 * decl2.c (delete_sanity): If error_mark_node is passed
22964 in as an expression, quit while we're ahead.
22966 * decl.c (grokdeclarator): Give an error message if `friend'
22967 is combined with any storage class specifiers.
22969 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
22971 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
22972 definition of nonexistent nested type.
22974 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
22975 not to say 'typedef'.
22977 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22979 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
22980 * search.c (dfs_walk, dfs_init_vbase_pointers,
22981 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
22982 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
22984 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
22986 * except.c (build_throw): Support minimal parse.
22987 * pt.c (tsubst_copy): Support THROW_EXPR.
22988 * decl2.c (build_expr_from_tree): Likewise.
22990 * pt.c (mangle_class_name_for_template): Always allocate
22993 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
22995 * cvt.c (cp_convert_to_pointer): Give an appropriate error
22996 when trying to cast from an incomplete type.
22998 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23000 * pt.c (instantiate_class_template): Don't bother setting up
23001 CLASSTYPE_TAGS explicitly, as the nested types will add
23004 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
23006 * decl.c (shadow_tag): Remove old error check for usage of
23007 an enum without a previous declaration.
23008 (xref_tag): Add error message about usage of enums without a
23009 previous declaration.
23011 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
23013 * lex.c (do_identifier): Only do name consistency check if we're
23016 * pt.c (push_template_decl): Don't crash if we get a member defn
23017 that doesn't match.
23019 * decl.c (xref_tag_from_type): New function to do an xref without
23020 always having to figure out code_type_node.
23021 * cp-tree.h: Declare it.
23022 * pt.c (instantiate_class_template): Use it for friend classes.
23023 (lookup_template_class): Use it.
23025 * typeck2.c (build_functional_cast): Pull out a single parm before
23026 passing it to build_c_cast.
23028 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
23030 * expr.c (do_case): Give an error message if a pointer is
23031 given as a case value.
23033 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
23035 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
23038 * lex.c (cons_up_default_function): Really, now, interface hackery
23039 does not apply to synthesized methods.
23041 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
23043 * call.c (build_method_call): Ctors and dtors now have special names
23044 with respect to lookups.
23045 * class.c (add_method): Likewise.
23046 (grow_method): Likewise.
23047 (finish_struct_methods): Likewise.
23048 (warn_hidden): Likewise.
23049 (finish_struct_1): Likewise.
23050 * cvt.c (convert_to_reference): Likewise.
23051 (convert_to_aggr): Likewise.
23052 (cp_convert): Likewise.
23053 * decl2.c (check_classfn): Likewise.
23054 * init.c (expand_member_init): Likewise.
23055 (expand_default_init): Likewise.
23056 (expand_aggr_init_1): Likewise.
23057 (build_offset_ref): Likewise.
23058 (build_new): Likewise.
23059 (build_delete): Likewise.
23060 * lex.c (do_inline_function_hair): Likewise.
23061 * search.c (lookup_field_1): Likewise.
23062 (lookup_fnfields_here): Likewise.
23063 (lookup_field): Likewise.
23064 (lookup_fnfields): Likewise.
23065 (get_virtual_destructor): Likewise.
23066 (dfs_debug_mark): Likewise.
23067 (dfs_pushdecls): Likewise.
23068 (dfs_compress_decls): Likewise.
23069 * tree.c (layout_basetypes): Likewise.
23070 * typeck.c (build_component_ref): Likewise.
23071 (build_x_function_call): Likewise.
23072 (build_modify_expr): Likewise.
23073 (convert_for_initialization): Likewise.
23074 (build_functional_cast): Likewise.
23075 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
23078 * decl.c (ctor_identifier): New.
23079 (dtor_identifier): New.
23080 (init_decl_processing): Set them.
23082 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
23084 * typeck.c (build_component_ref): Don't get confused by fields whose
23085 context has no type name, like pointer to member functions.
23087 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
23089 * decl.c (grokdeclarator): Handle typedef without declarator.
23091 * pt.c (tsubst): Handle SCOPE_REF in declarator.
23093 * parse.y (bad_parm): Catch another case of missing `typename'.
23095 * lex.c (yyprint): Handle TYPE_DECLs.
23097 * decl.c (start_function): Don't try to be clever.
23099 * lex.c: Lose compiler_error_with_decl.
23100 * typeck2.c: Lose error_with_aggr_type.
23101 (incomplete_type_error): Use cp_* instead of old functions.
23102 (readonly_error): Likewise.
23103 * typeck.c (convert_arguments): Likewise.
23104 * search.c (lookup_nested_field): Likewise.
23105 * method.c (make_thunk): Likewise.
23106 * decl.c (grokparms): Likewise.
23107 * cp-tree.h: Update.
23109 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
23112 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
23114 * method.c (build_opfncall): When deleting a pointer to an
23115 array, build a new pointer to the tree past any ARRAY_TYPE
23118 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23120 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
23122 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
23124 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
23127 * decl.c (finish_function): Don't set nested based on
23128 hack_decl_function_context.
23129 * parse.y (function_try_block): Check for nested function.
23130 (pending_inlines): Likewise.
23132 * decl2.c (build_expr_from_tree): If a unary op already has a
23133 type, just return it.
23135 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
23137 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
23138 (finish_file): Check the return value of walk_vtables.
23139 (finish_prevtable_vardecl): Return int.
23140 (finish_vtable_vardecl): Likewise.
23141 (prune_vtable_vardecl): Likewise.
23142 * lex.c (set_vardecl_interface_info): Likewise.
23143 * cp-tree.h: Adjust return types.
23145 * class.c (delete_duplicate_fields_1): Don't complain about
23146 duplicate nested types if they're the same type.
23147 (finish_struct): Remove check for duplicate.
23148 * decl2.c (grokfield): Don't check for typedef of anonymous type.
23150 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
23152 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
23154 * decl.c (grokdeclarator): Lose special handling of class-level
23155 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
23156 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
23158 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
23160 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
23162 * search.c (compute_access): Fix handling of anonymous union
23164 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
23165 from anonymous unions to their members.
23167 * typeck.c (build_x_function_call): For static member functions,
23168 hand off to build_member_call.
23170 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
23172 * typeck.c (build_component_ref): Handle OFFSET_REFs.
23174 * init.c (expand_vec_init): Fix init == 0 case.
23176 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
23178 * init.c (build_new): pedwarn about init and array new.
23179 (expand_vec_init): Handle lists, use convert_for_initialization.
23181 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
23182 when converting to an aggregate type.
23183 * cvt.c (cp_convert): Pass it through.
23185 * typeck.c (build_conditional_expr): Handle user-defined
23186 conversions to slightly different types.
23188 * decl.c (grokdeclarator): Force an array type in a parm to be
23191 * decl2.c (do_using_directive): Sorry.
23192 (do_namespace_alias): Likewise.
23193 * lex.c (real_yylex): Warn about using the `namespace' keyword.
23195 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
23197 * parse.y (datadef): Move call to note_list_got_semicolon up.
23199 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
23201 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
23203 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
23205 * decl.c (cp_finish_decl): The exception regions have to be
23206 nested, not overlapping. We start the exception region for a
23207 decl, after it has been fully built, and all temporaries for it
23208 have been cleaned up.
23210 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
23212 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
23214 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
23216 * tree.def: Add RETURN_INIT.
23217 * pt.c (instantiate_decl): Handle RETURN_INIT.
23218 * decl.c (store_return_init): Handle minimal_parse_mode.
23220 * tree.c (cp_build_type_variant): Just return an error_mark_node.
23221 * decl.c (make_typename_type): Don't try to get the file and line
23223 * typeck.c (comptypes): Handle TYPENAME_TYPE.
23225 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
23227 * decl.c (poplevel): Make sure we clear out and restore old local
23228 non-VAR_DECL values by default when they go out of scope.
23230 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
23232 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
23233 referring to addresses of variables and functions.
23235 * error.c (dump_expr): Support SIZEOF_EXPR.
23237 * init.c (do_friend): Use the return value of check_classfn.
23239 * typeck.c (convert_arguments): Call complete_type.
23241 * method.c (hack_identifier): After giving an error, set value to
23244 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
23246 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
23247 lossage for local classes.
23248 * cp-tree.h: Declare it.
23249 * decl.c (lookup_name_real): Evil, painful hack for local classes.
23250 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
23251 Use hack_decl_function_context.
23252 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
23253 (start_function): Use hack_decl_function_context.
23254 (finish_function): Likewise.
23255 * method.c (synthesize_method): Likewise.
23256 * lex.c (process_next_inline): Likewise.
23257 (do_pending_inlines): Likewise.
23258 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
23261 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
23263 * sig.c (build_signature_pointer_or_reference_type): Align
23264 signature pointers/references on 8-byte boundaries so they can be
23265 grabbed 2 words at a time on a Sparc.
23267 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
23269 * method.c (hack_identifier): Requiring a static chain is now a
23271 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
23274 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23276 * init.c (build_offset_ref): Call complete_type.
23278 * decl.c (pop_from_top_level): Always pop previous_class_type.
23280 * parse.y: Handle multiple decls in a for-init-statement.
23281 * pt.c (tsubst_expr): Likewise.
23283 * pt.c (tsubst): Use tsubst_expr for the second operand of an
23286 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
23287 (poplevel_class): Set it here.
23288 (pop_from_top_level): Pop it here if we're returning to class scope.
23289 * class.c (pushclass): Don't set it here.
23291 * decl.c (maybe_push_to_top_level): Save current_template_parms,
23292 and clear it if !pseudo.
23293 (pop_from_top_level): Restore it.
23295 * decl2.c (finish_file): Push the dummy each time we walk the list
23298 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
23299 something for CAST_EXPR.
23301 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23303 * cvt.c (cp_convert): Warn about implicit conversion of the
23304 address of a function to bool, as it is always true.
23306 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23308 * typeck.c (c_expand_return): Fix warning for local externs returned.
23310 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
23312 * tree.c (mapcar): Propagate const and volatile properly.
23314 * typeck.c (complete_type): Be sure to instantiate the
23315 MAIN_VARIANT of the type.
23317 * method.c (synthesize_method): Class interface hackery does not
23318 apply to synthesized methods.
23320 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
23322 * pt.c (comp_template_args): Use comptypes rather than just
23323 checking for TEMPLATE_TYPE_PARM equivalence.
23325 * typeck.c (build_x_function_call): Call complete_type before
23326 checking TYPE_OVERLOADS_CALL_EXPR.
23328 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
23330 * g++.c (main): Check also for new define ALT_LIBM.
23332 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23334 * pt.c (instantiate_class_template): If we don't have a pattern
23336 (coerce_template_parms): If we see a local class, bail.
23338 * decl.c (grok_reference_init): Make sure there's a type before
23341 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
23342 (push_template_decl): Likewise.
23344 * parse.y (named_class_head): Set
23345 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
23347 * decl.c (xref_tag): Diagnose redeclaration of template
23348 type-parameter name.
23350 * error.c (dump_type): Handle anonymous template type parms.
23352 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
23354 (coerce_template_parms): Likewise.
23356 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
23358 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
23359 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
23361 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
23363 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
23364 before trying to get its STUB_DECL.
23365 (coerce_template_parms): Likewise.
23367 * parse.y (template_type_parm): If they didn't use 'class',
23368 pretend they did after giving an error.
23370 * pt.c (coerce_template_parms): Diagnose use of local class.
23372 * decl.c (grok_reference_init): Use instantiate_type.
23374 * error.c (dump_expr): Handle TEMPLATE_DECLs.
23376 * parse.y (named_class_head): Diagnose mismatching types and tags.
23378 * decl.c (pushdecl): Type decls and class templates clash with
23379 artificial type decls, not hide them.
23381 * decl.c (redeclaration_error_message): Diagnose redefinition of
23382 templates properly.
23383 (duplicate_decls): Diagnose disallowed overloads for template
23386 * decl.c (start_decl): Call complete_type before checking for a
23389 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
23391 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
23393 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23395 * decl.c (grok_op_properties): Don't check for operator++(int) in
23398 * tree.c (perm_manip): Return a copy of variable and function
23399 decls with external linkage.
23401 * tree.def: Change some of the min tree codes to type "1".
23402 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
23403 * method.c (build_overload_int): Emit something arbitrary for
23404 anything but an INTEGER_CST if we're in a template.
23406 * decl.c (cp_finish_decl): Call complete_type before deciding
23407 whether or not to lay out the decl.
23409 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
23411 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
23413 * typeck2.c (build_x_arrow): Call complete_type.
23415 * pt.c (add_pending_template): Broken out.
23416 (lookup_template_class): If -fexternal-templates, call it for all
23417 the methods of implemented types.
23418 (instantiate_class_template): Instead of instantiating them here.
23419 (instantiate_decl): Handle -fexternal-templates earlier.
23421 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23423 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
23424 memoized lookup stuff inside GATHER_STATISTICS.
23426 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
23428 * decl.c (start_decl): Complain about array of incomplete type
23430 (grokdeclarator): Not here.
23432 * parse.y (template_parm): Expand full_parm inline so we can set
23433 the rule's precedence.
23435 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
23436 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
23437 * decl2.c (grokbitfield): Don't check for integer constant here.
23438 * class.c (finish_struct_1): Check here.
23440 * decl.c (define_label): Make the min decl go on permanent_obstack.
23442 * pt.c (unify): Don't handle CONST_DECLs.
23443 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
23444 (tsubst_copy): Likewise.
23446 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
23447 CONST_DECL for a template parm.
23449 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
23451 * decl.c (grokdeclarator): Complain about array of incomplete type
23453 (start_decl_1): Not here.
23455 * pt.c (tsubst): Handle pointer-to-function declarators.
23457 * method.c (hack_identifier): If pedantic, diagnose local class
23458 methods that require a static chain.
23460 * decl.c (grok_op_properties): No longer static.
23461 * cp-tree.h: Declare it.
23462 * pt.c (tsubst): Call it for operators.
23463 Use tsubst_copy for TREE_VECs.
23465 * parse.y (template_arg): The expr has precedence like '>'.
23467 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
23469 * pt.c (coerce_template_parms): Don't coerce an expression using
23471 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
23472 (tsubst): Don't use build_index_2_type if the max_value uses template
23474 * method.c (build_overload_int): Emit something arbitrary for an
23475 expression using template parms.
23477 * parse.y (template_close_bracket): New non-terminal to catch use
23478 of '>>' instead of '> >' in template class names.
23479 (template_type): Use it.
23480 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
23482 * tree.def: Add CAST_EXPR.
23483 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
23484 CONVERT_EXPR for minimal_parse_mode.
23485 * typeck.c (build_c_cast): Likewise.
23486 * pt.c (tsubst_copy): Likewise.
23487 * decl2.c (build_expr_from_tree): Likewise.
23488 * error.c (dump_expr): Likewise.
23490 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23492 * except.c (SetTerminate, SetUnexpected): Put back global vars.
23493 (init_exception_processing): Put back decl/init of
23494 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
23495 fns from libstdc++.
23497 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
23498 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
23500 * cp-tree.h (declare_uninstantiated_type_level,
23501 uninstantiated_type_level_p): Delete prototypes.
23503 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
23505 * pt.c (tsubst_expr): Add default return.
23507 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23509 * error.c (fndecl_as_string): Delete unused arg CNAME.
23510 * sig.c (build_signature_table_constructor,
23511 build_signature_method_call): Fix calls.
23513 * class.c (the_null_vtable_entry): Delete var definition.
23514 (init_class_processing): Delete tree the_null_vtable_entry init.
23515 * decl.c (no_print_{functions, builtins}): Declare as static.
23516 (__tp_desc_type_node): #if 0 var definition.
23517 (init_type_desc): #if 0 init of __tp_desc_type_node.
23518 (vb_off_identifier): Move var decl into init_decl_processing.
23519 (current_function_assigns_this): Declare as static.
23520 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
23521 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
23522 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
23523 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
23524 * init.c (BI_header_type, BI_header_size): Declare as static.
23525 * pt.c (template_classes): Delete unused var.
23526 (add_pending_template): Delete decl for non-existent fn.
23527 (lookup_template_class): Delete vars CODE and TAG_CODE.
23528 (instantiate_template): Delete unused var TARGS.
23529 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
23531 (__tp_desc_type_node): #if 0 var decl.
23532 (fndecl_as_string): Fix prototype.
23534 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
23536 * tree.def: Add GOTO_STMT.
23537 * pt.c (tsubst_expr): Support goto and labels.
23538 * decl.c (define_label): Support minimal parsing.
23539 * parse.y (simple_stmt): Likewise.
23541 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23543 * xref.c (GNU_xref_member): Only define/set var I if
23544 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
23546 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
23547 (GNU_xref_end): Fix call.
23548 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
23549 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
23551 * tree.c (build_exception_variant): Delete unused vars I, A, T,
23553 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
23554 (mapcar): Delete unused var CODE.
23555 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
23556 (break_out_cleanups): Fix call.
23557 (bot_manip): Likewise.
23558 * call.c (build_method_call): Likewise.
23559 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
23561 * typeck.c (unary_complex_lvalue, build_modify_expr,
23562 convert_for_initialization): Likewise.
23563 * typeck2.c (build_functional_cast): Likewise.
23564 * cp-tree.h (build_cplus_new): Fix prototype.
23566 * repo.c (open_repo_file): Delete unused var Q.
23567 (repo_compile_flags, repo_template_declared,
23568 repo_template_defined, repo_class_defined, repo_inline_used,
23569 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
23570 (repo_get_id, repo_vtable_used): Declare as static.
23571 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
23574 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
23576 * parse.y (pending_inlines): Add function_try_block case.
23578 * pt.c (unify): Fix for template const parms.
23580 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23582 * lex.c (extract_interface_info): Delete forward decl.
23583 (default_copy_constructor_body, default_assign_ref_body): Delete
23584 decls for non-existent functions.
23585 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
23586 (init_lex): Delete setting them.
23587 (cons_up_default_function): Delete unused vars FUNC_BUF,
23588 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
23589 #if 0'd synth code.
23590 (toplevel, expression_obstack): Delete unused extern decls.
23591 (tree_node_kind): Delete unused enum.
23592 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
23594 (tree_node_kind_names): Delete unused extern decl.
23595 (synth_obstack): Delete unused var.
23596 (init_lex): Don't set it.
23597 (init_parse): Add decl before use.
23598 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
23599 (current_unit_{name, language}): Delete unused vars.
23600 (check_newline): Don't bother setting them, just accept the #pragma.
23601 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
23602 (current_unit_{name, language}): Delete decls.
23604 * search.c: Wrap all of the memoized functions, macros, and
23605 variables inside #ifdef GATHER_STATISTICS.
23606 (lookup_field, lookup_fnfields): Likewise.
23607 (init_search_processing): Likewise.
23608 (reinit_search_statistics): Wrap whole function.
23609 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
23611 * decl.c (finish_function): Only call pop_memoized_context if
23612 GATHER_STATISTICS is defined.
23613 (start_function): Likewise for push_memoized_context.
23614 * class.c (pushclass, popclass): Likewise.
23616 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
23617 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
23619 * cvt.c (cp_convert): Delete unused local var FORM.
23620 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
23623 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23625 * pt.c (do_poplevel): Oops; really return what we get from
23626 poplevel this time.
23628 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23630 * cp-tree.h (is_aggr_type): Add prototype.
23632 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
23633 * method.c ({push,pop}_cp_function_context): Delete decls.
23634 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
23635 (SetUnexpected, SetTerminate): Delete unused vars.
23636 (init_exception_processing): Don't set SetUnexpected or
23637 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
23638 (output_exception_table_entry): Delete unused array LABEL.
23639 (expand_internal_throw): Delete unused var PARAMS.
23640 (expand_start_catch_block): Delete unused var CLEANUP.
23641 (emit_exception_table): Delete unused var EH_NODE_DECL.
23642 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
23643 GOTO_UNWIND_AND_THROW. Don't set them.
23644 (end_eh_unwinder): Add top decl.
23645 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
23646 (exception_section, push_rtl_perm, do_function_call,
23647 lang_interim_eh, push_eh_cleanup, eh_outer_context,
23648 expand_end_eh_spec, end_eh_unwinder): Declare as static.
23649 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
23650 throw_used): Likewise.
23651 * cp-tree.h (expand_end_eh_spec): Delete prototype.
23653 * search.c (dfs_mark, dfs_mark_vtable_path,
23654 dfs_unmark_vtable_path, dfs_mark_new_vtable,
23655 dfs_unmark_new_vtable, dfs_clear_search_slot,
23656 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
23657 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
23658 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
23660 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
23661 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
23662 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
23663 Only define #ifdef GATHER_STATISTICS.
23664 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
23666 (vbase_decl): Delete var definition.
23667 (init_search): Delete old decl.
23668 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
23669 never actually used.
23670 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
23671 (get_base_distance_recursive): Delete unused fourth arg
23672 BASETYPE_PATH. Fix call .
23673 (get_base_distance): Fix call.
23674 (push_class_decls): Delete unused var ID.
23675 (make_memoized_table_entry): Declare as static.
23676 (breadth_first_search): Declare as static.
23677 (tree_has_any_destructor_p): Declare as static.
23678 (pop_class_decls): Delete unused arg pop_class_decls.
23679 * class.c (popclass): Fix call to pop_class_decls.
23680 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
23681 tree_has_any_destructor_p): Delete prototypes.
23683 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
23684 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
23685 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
23686 (build_user_desc): Delete unused var T.
23687 (build_class_desc): Delete unused vars T and OFF.
23688 (build_t_desc): Delete unused var NAME_STRING.
23689 (build_headof): Make static.
23690 (get_bad_cast_node): Likewise.
23691 (get_def_to_follow): Likewise.
23692 * cp-tree.h (init_type_desc): Add prototype.
23693 (build_headof): Remove prototype.
23695 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
23697 * pt.c (tsubst): Only look for matching decls at file scope for
23698 non-member functions.
23700 * call.c (build_scoped_method_call): Handle scoped destructor
23701 calls in templates.
23703 * decl.c (*_top_level): Also save previous_class_values.
23705 * pt.c (tsubst_expr): Support do {} while loops.
23706 * parse.y (simple_stmt): Likewise.
23707 * tree.def: Likewise.
23709 * method.c (build_overload_identifier): For a class nested in a
23710 template class, don't mangle in the template parms from our
23713 * lex.c, cp-tree.h: Remove support for template instantiations in
23714 the pending_inlines code.
23715 * pt.c: Remove dead functions and unused arguments.
23716 (uses_template_parms): TYPENAME_TYPEs always use template parms.
23717 * parse.y: Stop passing anything to end_template_decl.
23718 * tree.c (print_lang_statistics): Only print tinst info #ifdef
23721 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23723 * init.c (expand_recursive_init{,_1}): Delete decls.
23724 (sort_member_init): Delete unused var INIT.
23725 (emit_base_init): Delete unused var X.
23726 (build_offset_ref): Delete unused var CNAME.
23727 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
23728 (emit_base_init): Delete unused local var BASE. Delete extern
23729 decl of IN_CHARGE_IDENTIFIER.
23730 (build_delete): Delete unused local var VIRTUAL_SIZE.
23732 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
23733 (build_delete): Fix call.
23734 * decl2.c (delete_sanity): Likewise.
23735 * cp-tree.h (build_vec_delete): Update prototype.
23737 * typeck.c (common_base_type): Delete unused var TMP.
23738 (build_binary_op): Delete local var ARGS_SAVE.
23739 (build_array_ref): Delete unused var ITYPE.
23740 (c_expand_return): Delete unused var USE_TEMP.
23742 * typeck.c (compexcepttypes): Delete unused arg STRICT.
23743 (comptypes): Fix calls.
23744 * decl.c (duplicate_decls): Likewise.
23745 * cp-tree.h (compexcepttypes): Delete extra arg.
23747 * decl2.c (check_classfn): Delete unused second arg CNAME.
23748 * decl.c (start_decl, grokfndecl): Fix calls.
23749 * init.c (do_friend): Likewise.
23750 * cp-tree.h (check_classfn): Update prototype.
23752 * cp-tree.h (signature_error, import_export_vtable,
23753 append_signature_fields, id_in_current_class, mark_used,
23754 copy_assignment_arg_p): Add decls.
23755 * decl2.c (mark_used): Delete decl.
23757 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
23759 * class.c (get_vtable_entry): Disable unused function.
23760 (doing_hard_virtuals): Delete unused static global var.
23761 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
23762 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
23763 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
23764 (modify_one_vtable): Delete unused var OLD_RTTI.
23765 (finish_struct_anon): Delete unused vars OFFSET and X.
23766 (finish_struct_bits): Delete unused var METHOD_VEC.
23767 (get_basefndecls): Delete unused var PURPOSE. Delete unused
23768 for-scope local variable METHODS.
23770 * call.c (user_harshness): Delete unused/unneeded arg PARM.
23771 (ideal_candidate): Delete unused args BASETYPE and PARMS.
23772 (build_method_call): Delete unused args passed into ideal_candidate.
23773 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
23774 * cp-tree.h (synthesize_method): Add decl.
23776 * decl.c (note_level_for_for): Give void return type.
23777 (pushdecl_nonclass_level): Likewise.
23778 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
23779 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
23780 (suspend_binding_level): Delete unused var LEVEL.
23781 (duplicate_decls): Delete unused var CTYPE.
23782 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
23783 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
23785 (grokdeclarator): Delete unused var C.
23786 (grokdeclarator): Delete unused var SIZE_VARIES.
23787 (grokparms): Delete unused var SAW_VOID.
23788 (start_function): Delete unused var OLDDECL.
23789 (cplus_expand_expr_stmt): Delete unused var
23790 REMOVE_IMPLICIT_IMMEDIATELY.
23792 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
23794 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
23796 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
23798 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
23799 (build_min_nt): Likewise.
23800 * pt.c (do_pushlevel): Emit line note.
23801 (do_poplevel): Return what we get from poplevel.
23802 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
23803 * parse.y: Use do_pushlevel and do_poplevel.
23804 * cp-tree.h: Declare do_poplevel.
23806 * cp-tree.h: Declare at_eof.
23807 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
23808 * decl2.c (import_export_decl): Renamed from import_export_inline.
23809 (finish_file): Call it to do interface handling for statics.
23810 * pt.c (tsubst_copy): Call mark_used on variables and functions
23813 * decl2.c (finish_file): Don't emit statics we can't generate.
23814 * pt.c (instantiate_decl): Don't set interface on instantiations
23817 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
23818 * tree.c (print_lang_statistics): Print max template depth.
23819 * pt.c (push_tinst_level): Dump entire instantiation context.
23820 (instantiate_class_template): Use it and pop_tinst_level.
23821 (instantiate_decl): Likewise.
23823 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
23824 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
23826 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
23828 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
23829 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
23830 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
23831 the new template implementation.
23833 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23835 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
23837 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
23839 * decl.c (cp_finish_decl): Delay emitting the debug information for
23840 a typedef that has been installed as the canonical typedef, if the
23841 type has not yet been defined.
23843 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
23845 * decl2.c (grokfield): Still call pop_nested_class for access decls.
23847 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23849 * decl.c (lookup_label): Call label_rtx.
23851 * decl.c (make_binding_level): New function.
23852 (pushlevel, pushlevel_class): Call it instead of explicit
23853 duplicate calls to xmalloc.
23855 * decl.c (init_decl_processing): Delete useless build_pointer_type
23858 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
23859 (sizet_ftype_string): Delete variable.
23860 (init_decl_processing): Add built-in functions fabsf, fabsl,
23861 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
23862 variable strlen_ftype, used for strlen.
23864 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
23866 * decl.c (push_to_top_level): Start from current_binding_level
23867 again for now; the stl hacks depend on g++ being broken in this
23868 way, and it'll be fixed in the template rewrite.
23870 * tree.def: Add USING_DECL.
23871 * decl2.c (do_class_using_decl): Implement.
23872 (grokfield): Pass access decls off to do_class_using_decl instead of
23874 * error.c (dump_decl): Handle USING_DECLs.
23875 * decl.c (grokdeclarator): Remove code for handling access decls.
23876 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
23877 as access decls for now.
23878 (finish_struct): Don't check USING_DECLs for other uses of the name.
23880 * search.c (get_matching_virtual): Use cp_error_at.
23882 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23884 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
23886 (self_promoting_args_p): Move the check that TYPE is non-nil
23887 before trying to look at its main variant.
23888 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
23890 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
23892 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
23893 (do_friend): Delete call to xref_friend.
23894 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
23896 * typeck.c (convert_sequence): #if 0 unused function.
23898 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
23899 be in decl_in_memory_p.
23900 (decl_in_memory_p): Delete decl.
23901 * expr.c (decl_in_memory_p): Delete fn.
23902 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
23904 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
23906 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
23908 * class.c (finish_struct_1): Check for a pure-specifier on a
23909 non-virtual function here.
23911 * decl2.c (grok_function_init): Don't check whether the function
23913 (grokfield): Don't call check_for_override here.
23915 * decl.c (push_to_top_level): Start from inner_binding_level,
23916 check class_shadowed in class levels.
23918 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
23920 * decl.c (resume_level): Ignore things that don't have names, instead
23923 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23925 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
23927 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
23929 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
23932 * parse.y (complete_type_name): Bind global_scope earlier.
23933 (complex_type_name): Likewise.
23934 (qualified_type_name): Remove.
23936 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
23938 * decl.c (grokfndecl): Move code that looks for virtuals in base
23940 * class.c (check_for_override): ... to a new function.
23941 (finish_struct_1): Call it.
23943 * cp-tree.h: Declare warn_sign_compare.
23945 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
23946 rather than extra_warnings to decide whether to warn about
23947 comparison of signed and unsigned.
23949 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
23950 implies -Wsign-compare. -Wall doesn't imply -W.
23952 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
23954 * typeck.c (build_component_ref): Fix to handle anon unions in base
23957 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23959 * class.c (resolves_to_fixed_type_p): Delete code dealing with
23960 a WITH_CLEANUP_EXPR, since we don't generate them any more.
23961 * cvt.c (build_up_reference): Likewise.
23962 * decl.c (grok_reference_init): Likewise.
23963 (cp_finish_decl): Likewise.
23964 * error.c (dump_expr): Likewise.
23965 * tree.c (real_lvalue_p): Likewise.
23966 (lvalue_p): Likewise.
23967 (build_cplus_new): Likewise.
23968 (unsave_expr_now): Likewise.
23969 * typeck.c (unary_complex_lvalue, build_modify_expr,
23970 c_expand_return): Likewise.
23972 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23974 Make the C++ front-end pay attention to attributes for structures.
23975 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
23977 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
23978 Take out old round_up_size use and setting the DECL_ALIGN possibly
23979 using it. Take out setting of TYPE_ALIGN to round_up_size, which
23980 can override what the attribute set.
23981 * cp-tree.h (finish_struct): Update prototype.
23982 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
23983 attributes to finish_struct.
23984 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
23985 value down into finish_struct.
23986 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
23988 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
23990 * decl.c (poplevel): Re-word dead for local handling.
23991 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
23992 (cp_finish_decl): If is_for_scope, check for duplicates so
23993 we can disable is_for_scope. Otherwise, preserve_temp_slots.
23995 * lex.c (do_identifier): Use global binding in preference of
23996 dead for local variable.
23998 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
24000 * init.c (initializing_context): Handle anon union changes, the
24001 context where fields of anon unions can be initialized now has to be
24002 found by walking up the TYPE_CONTEXT chain.
24004 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
24006 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
24007 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
24008 (obscure_complex_init): If bss is supported, always set
24009 DECL_INITIAL to error_mark_node.
24011 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24013 * init.c (is_friend): Make sure there's a context before we see if
24016 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
24018 * init.c (is_friend): Classes are not friendly with nested classes.
24020 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
24022 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
24023 and record its result.
24025 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
24027 * class.c (finish_struct_anon): Switch around code to not move anon
24028 union elements around, nor mess up their contexts, nor offsets,
24029 instead we now build up the right number of COMPONENT_REFs for all
24030 the anon unions that may be present at build_component_ref time.
24031 * typeck.c (lookup_anon_field): New routine to handle field lookup
24032 on fields without names. We find them, based upon their unique type
24034 * typeck.c (build_component_ref): Allow FIELD_DECL components.
24035 Handle finding components in anonymous unions, and ensure that a
24036 COMPONENT_REF is built for each level as necessary.
24038 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
24040 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
24041 code that ensures that copy ctors are used if appropriate.
24043 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24045 * init.c (build_vec_delete): Only give an error if base isn't an
24048 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
24050 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
24051 (yylex): If we see `new', keep slurping.
24053 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
24055 * class.c (finish_struct_1): Move code for handling anon unions...
24056 (finish_struct_anon): to here. Fixup so that we do the offset
24057 calculations right, and so that the fields are physically moved to
24058 the containers's chain.
24060 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24062 * decl.c (grokdeclarator): Avoid trying to get an operand off an
24065 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
24067 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
24068 POINTER_SIZE to agree with expr.c.
24070 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
24072 * search.c (lookup_field): Don't report ambiguities if protect is 0,
24073 instead return NULL_TREE.
24075 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
24077 * class.c (finish_struct_1): Call warn_hidden if we want warnings
24078 about overloaded virtual functions.
24079 (warn_hidden): New routine to warn of virtual functions that are
24080 hidden by other virtual functions, that are not overridden.
24081 (get_basefndecls): New routine, used by warn_hidden.
24082 (mark_overriders): New routine, used by warn_hidden.
24083 * search.c (get_matching_virtual): Remove old warning that just
24086 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24088 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
24090 * typeck.c (null_ptr_cst_p): Delete unused fn.
24091 (build_function_call_maybe): Delete unused fn.
24093 * expr.c (extract_init): #if 0 the code after unconditional return 0
24096 Delete old cadillac code.
24097 * edsel.c: Remove file.
24098 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
24099 * Makefile.in (CXX_OBJS): Delete edsel.o.
24100 (edsel.o): Delete rule.
24101 * cp-tree.h (flag_cadillac): Delete var decl.
24102 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
24103 * decl2.c (flag_cadillac): Delete var definition.
24104 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
24105 (grokfield): Delete code depending on flag_cadillac.
24106 (finish_anon_union): Likewise.
24107 * class.c (finish_struct_1): Likewise.
24108 (pushclass): Likewise.
24109 (popclass): Likewise.
24110 (push_lang_context): Likewise.
24111 (pop_lang_context): Likewise.
24112 * decl.c (init_decl_processing): Likewise.
24113 (start_decl): Likewise.
24114 (cp_finish_decl): Likewise.
24115 (xref_tag): Likewise.
24116 (finish_enum): Likewise.
24117 (start_function): Likewise.
24118 (finish_function): Likewise.
24119 (finish_stmt): Likewise.
24120 * lex.c (lang_init): Likewise.
24121 (check_newline): Likewise.
24123 * lex.c (do_pending_inlines): Delete synthesized method kludge.
24125 Delete defunct, ancient garbage collection implementation.
24126 * rtti.c: New file with the RTTI stuff from gc.c.
24127 * gc.c: Removed file (moved the remaining stuff into rtti.c).
24128 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
24129 (rtti.o): New rule, replacing gc.o.
24130 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
24131 * cp-tree.h: Delete gc-related fn decls.
24132 (DECL_GC_OFFSET): Delete macro.
24133 (flag_gc): Delete extern decl.
24134 * decl.c (current_function_obstack_index): Delete var decl.
24135 (current_function_obstack_usage): Delete var decl.
24136 (start_function): Delete clearing of current_function_obstack_index
24137 and current_function_obstack_usage.
24138 (init_decl_processing): Delete code relying on -fgc.
24139 Delete call to init_gc_processing.
24140 (cp_finish_decl): Delete calls to build_static_gc_entry and
24141 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
24142 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
24143 and to expand_expr of a __gc_main call.
24144 (maybe_gc_cleanup): Delete var decl.
24145 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
24146 * decl2.c (flag_gc): Delete var decl.
24147 (lang_f_options): Delete offering of -fgc.
24148 (lang_decode_option): Delete -fgc and -fno-gc handling.
24149 (get_temp_regvar): Delete gc code.
24150 * init.c (build_new): Delete gc code.
24151 * lex.c (init_lex): Delete checking of flag_gc.
24153 * typeck.c (convert_arguments): Delete gc code.
24154 (build_component_addr): Delete -fgc warning.
24155 (build_modify_expr): Delete gc code.
24157 * decl2.c (build_push_scope): Delete fn.
24158 * cp-tree.h (build_push_scope): Delete decl.
24160 * search.c (clear_search_slots): Delete fn.
24161 * cp-tree.h (clear_search_slots): Delete decl.
24163 * search.c (tree_needs_constructor_p): Delete fn.
24164 * cp-tree.h (tree_needs_constructor_p): Delete decl.
24166 * tree.c (id_cmp): Delete fn.
24168 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
24169 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
24171 * tree.c (decl_value_member): Delete fn.
24172 * cp-tree.h (decl_value_member): Delete decl.
24174 * tree.c (list_hash_lookup_or_cons): Delete fn.
24175 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
24177 * method.c (cplus_exception_name): Delete fn.
24178 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
24180 * spew.c (shift_tokens): Delete fn.
24182 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
24184 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
24186 * parse.y: Likewise.
24188 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24190 * tree.c (build_cplus_staticfn_type): Delete function definition;
24192 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
24194 * tree.c (virtual_member): Delete function definition; never used.
24195 * cp-tree.h (virtual_member): Delete decl.
24197 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
24199 * typeck.c (build_component_ref): Handle getting vbase pointers
24200 out of complex multiple inheritance better.
24202 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
24204 * typeck.c (build_object_ref): Make sure we use the real type, not
24205 any reference type.
24207 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
24209 * tree.c (build_exception_variant): Don't create new types if we
24210 don't have to, also build new types on the right obstack.
24212 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
24214 * decl.c (store_bindings): Split out from push_to_top_level.
24215 (push_to_top_level): Call it for b->type_shadowed on class binding
24218 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
24220 * search.c (expand_upcast_fixups): Fix so that offsets stored in
24221 vbase_offsets are always right. Fixes a problem where virtual base
24222 upcasting and downcasting could be wrong during conversions on this
24223 during virtual function dispatch at ctor/dtor time when dynamic
24224 vtable fixups for deltas are needed. This only sounds easier than
24226 (fixup_virtual_upcast_offsets): Change to reflect new calling
24227 convention for expand_upcast_fixups.
24229 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24231 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
24232 check that it's usable as the bitfield width.
24234 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24236 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
24237 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
24238 only ever used for functions in it.
24240 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
24242 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
24243 (nested_type): Likewise.
24244 (nested_name_specifier): Use lastiddecl.
24246 * decl.c (grokdeclarator): Adjust accordingly.
24247 * init.c (expand_member_init): Likewise.
24248 * parse.y (base_class): Likewise.
24249 * typeck2.c (build_functional_cast): Likewise.
24251 * typeck2.c (build_functional_cast): Fill in name after we've
24252 checked for non-aggr type.
24254 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
24256 * decl2.c (warn_pointer_arith): Default to on.
24258 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
24260 * lex.c (is_rid): New function.
24261 * decl.c (grokdeclarator): Diagnose reserved words used as
24264 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
24266 * tree.c (get_decl_list): Don't lose cv-quals.
24268 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
24269 typespecs used as declarator-ids.
24271 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
24273 * decl.c (poplevel): When poping a level, don't give a warning for
24274 any subblocks that already exist.
24276 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
24278 * typeck.c (build_object_ref): Finish what I started.
24280 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
24282 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
24284 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
24287 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
24289 * decl.c (xref_tag): Handle passing a type in directly.
24291 * parse.y (qualified_type_name): Pull out the type.
24292 (nested_type): Likewise.
24293 Take types directly instead of as identifiers.
24294 * call.c (build_scoped_method_call): Take types directly instead of
24296 * decl.c (xref_basetypes): Likewise.
24297 * init.c (expand_member_init): Likewise.
24298 (build_member_call): Likewise.
24299 (build_offset_ref): Likewise.
24300 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
24301 * method.c (do_build_assign_ref): Likewise.
24302 * decl.c (grokdeclarator): Handle a type appearing as the
24303 declarator-id for constructors.
24304 * method.c (do_build_copy_constructor): current_base_init_list now
24305 uses the types directly, not their names.
24306 * init.c (sort_base_init): Likewise.
24307 (expand_member_init): Likewise.
24308 * init.c (is_aggr_type): New function, like is_aggr_typedef.
24310 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
24312 * tree.c (layout_basetypes): Call build_lang_field_decl instead
24313 of build_lang_decl if first arg is a FIELD_DECL.
24315 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24317 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
24319 * except.c (expand_start_catch_block): Set TREE_USED to avoid
24320 warnings about the catch handler.
24322 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
24324 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
24325 expand_target_expr.
24327 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
24329 Fix access control to use trees rather than integers.
24330 * class.c (access_{default, public, protected, private,
24331 default_virtual, public_virtual, private_virtual}_node): Add
24333 (init_class_processing): Do creation of those nodes.
24334 * cp-tree.h (access_type): Delete enum decl.
24335 (access_{default, public, protected, private, default_virtual,
24336 public_virtual, private_virtual}_node): Add decls.
24337 (compute_access): Change return type.
24338 * search.c (compute_access): Have tree return type, instead of enum.
24339 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
24340 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
24341 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
24342 * parse.y (VISSPEC): Make ttype rather than itype.
24343 (base_class_access_list): Likewise.
24344 * *.[cy]: Change all refs of `access_public' to `access_public_node',
24346 * call.c (build_method_call): Make ACCESS be a tree.
24347 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
24348 * cvt.c (convert_to_aggr): Likewise.
24349 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
24351 * method.c (hack_identifier): Likewise.
24352 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
24354 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
24356 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
24357 frontend, and make it more consistent with respect to
24358 warn_pointer_arith.
24360 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
24362 * decl.c (pushdecl): Check for duplicate parameter names.
24364 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
24366 * decl.c (expand_static_init): Call assemble_external for atexit.
24368 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
24370 * except.c (do_unwind): Remove some generated dead code.
24371 (eh_outer_context): New routine, factor out some common code from
24372 expand_builtin_throw and end_eh_unwinder. Add code to do return
24373 address masking for the PA.
24374 (expand_builtin_throw): Use eh_outer_context instead of open coding
24376 (end_eh_unwinder): Likewise.
24378 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
24380 * except.c (expand_throw): Call assemble_external for __empty, if we
24383 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
24385 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
24386 NORMAL_RETURN_ADDR_OFFSET.
24387 (end_eh_unwinder): Likewise.
24389 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
24391 * gc.c (build_dynamic_cast): Make sure we don't cast away const
24392 when dealing with references, and make sure we handle dynamic
24393 casting to a cv qualified reference.
24395 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
24397 * except.c (struct eh_context): New structure top hold eh context
24399 (push_eh_context): New routine.
24400 (pop_eh_context): Likewise.
24401 * decl.c (push_cp_function_context): Use them.
24402 (pop_cp_function_context): Likewise.
24404 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
24406 * decl2.c (finish_file): Also prune uninteresting functions in the
24407 inline emission loop.
24409 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
24411 * sig.c (build_signature_table_constructor): Mark functions
24412 in the signature as referenced.
24414 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
24416 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
24417 the inline emission stuff.
24419 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
24421 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
24423 * lang-options.h: Add -f{no-,}weak.
24424 * decl.c (init_decl_processing): If the target does not support weak
24425 symbols, don't use them.
24426 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
24428 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
24430 * init.c (expand_member_init): warning for base init after members.
24432 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
24434 * cvt.c (build_expr_type_conversion): Don't convert to a reference
24437 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
24439 * method.c (report_type_mismatch): Improve wording for volatile
24442 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
24444 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
24445 expand_assignment, as the later doesn't handle things that have
24446 copy constructors well. The compiler would do bitwise copying,
24447 instead of ctor calling in some cases.
24449 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
24451 * g++.c (my_strerror): Return "cannot access" if errno is 0.
24452 (pfatal_with_name, perror_exec): Don't assume that
24453 the returned value from my_strerror contains no '%'s.
24455 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
24457 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
24459 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
24460 TYPE_METHODS/TREE_CHAIN mean what they used to.
24461 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
24462 instead of TYPE_METHODS.
24463 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
24464 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
24465 * cp-tree.h (CLASSTYPE_METHODS): Lose.
24466 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
24468 (struct lang_decl): Lose next_method field.
24469 (DECL_NEXT_METHOD): Lose.
24470 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
24471 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
24473 (finish_struct_methods): Don't mess with the TREE_CHAINs in
24476 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
24479 * call.c (build_method_call): Synthesize here even when not inlining.
24480 * typeck.c (build_function_call_real): Likewise.
24482 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
24484 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
24485 == DBX_DEBUG, call dbxout_start_new_source_file and
24486 dbxout_resume_previous_source_file when appropriate.
24488 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
24490 * except.c (start_anon_func): Push to the top level.
24491 (end_anon_func): Pop from the top level.
24493 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
24495 * cp-tree.h (build_cleanup): New routine to build cleanups.
24496 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
24497 call at ctor time and use atexit to run it later.
24498 * decl2.c (build_cleanup): New routine, taken from finish_file.
24499 (finish_file): Use build_cleanup instead, and don't put function
24500 local statics in global dtor list.
24502 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
24504 * except.c (expand_throw): Ensure that we have cleanups, if we try
24505 and expand cleanups.
24507 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
24509 * except.c (expand_throw): Add logic to manage dynamic cleanups for
24511 (expand_end_catch_block): Use the magic of expand_goto, instead of
24512 emit_jump so that we get the cleanup for any catch clause parameter
24513 and the cleanup for the exception object. Update to reflect label
24515 (push_eh_cleanup): New routine to register a cleanup for an
24517 (empty_fndecl): Used to default cleanup actions to
24519 (init_exception_processing): Setup empty_fndecl. Setup
24521 (expand_start_catch_block): Update to reflect label changes. Call
24522 push_eh_object to register the cleanup for the EH object.
24523 (start_anon_func): New routine to start building lambda expressions
24525 (end_anon_func): New routine to end them.
24526 (struct labelNode): Change so that we can use tree labels, or rtx
24528 (saved_cleanup): Object to check for dynamic cleanups for the
24529 exception handling object.
24530 (push_label_entry): Change so that we can use tree labels, or rtx
24532 (pop_label_entry): Likewise.
24533 (top_label_entry): Likewise.
24534 (expand_start_all_catch): Use tree label instead of rtx label, so
24535 that we can get the magic of expand_goto.
24536 (expand_end_all_catch): Update to reflect label changes.
24538 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
24540 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
24541 building_cleanup logic, as we now use UNSAVE_EXPRs.
24542 * cp-tree.h (unsave_expr): Declare it.
24543 * decl.c (building_cleanup): Remove.
24544 (maybe_build_cleanup): Remove building_cleanup logic, and use
24545 UNSAVE_EXPR instead.
24547 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
24549 * gc.c (build_t_desc): Update error message to say <typeinfo>.
24551 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24553 * decl.c (pushdecl): Only warn about shadowing a local variable if
24554 warn_shadow is true.
24556 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
24558 * typeck.c (build_binary_op_nodefault): Added warning about
24559 comparisons between different enum types with -Wall, unless
24560 -fenum-int-equiv set.
24562 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
24564 * class.c (finish_struct_1): Skip down to the inner type in
24565 multidimensional arrays. Ensures ctors will be made for types that
24568 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
24570 * decl.c (last_dtor_insn): New to track the last compiler generated
24572 (store_parm_decls): Set it.
24573 (finish_function): Use it to see if the dtor is empty. Avoid doing
24574 vtable setup all the time, if we can.
24575 (struct cp_function): Add last_dtor_insn.
24576 (push_cp_function_context): Save it.
24577 (pop_cp_function_context): Restore it.
24579 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
24581 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
24584 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
24586 * typeck.c (expand_target_expr): Make sure targets get put into the
24587 current temp_slot_level, so that the free_temp_slots call will reuse
24590 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
24592 * class.c (finish_struct_1): Delay delta fixups for virtual bases
24593 until after we have done the hard virtuals, to avoid a bogus `every
24594 virtual function must have a unique final overrider' for virtual
24595 functions that are only overridden by hard virtuals.
24597 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
24599 * pt.c (do_function_instantiation): Don't try to find a file-scope
24600 template for a member function.
24602 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
24604 * g++.c (main): Add handling of -nodefaultlibs.
24606 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
24608 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
24609 distinguish between direct bindings of reference variables, and
24610 indirect bindings of reference variables.
24611 * cvt.c (build_up_reference): Use it.
24612 * typeck.c (convert_arguments): Use it to indicate this is an
24614 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
24615 as they are unused.
24616 (expand_static_init): Likewise.
24617 (cplus_expand_expr_stmt): Likewise.
24618 * decl2.c (finish_file): Likewise.
24619 * init.c (perform_member_init): Likewise.
24620 (emit_base_init): Likewise.
24621 (expand_aggr_vbase_init_1): Likewise.
24623 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24625 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
24626 get a DECL_LANG_SPECIFIC node.
24627 * cp-tree.h (lang_decl_flags): Add new member `level'.
24628 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
24629 decl_flags level member.
24631 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24633 * call.c (build_method_call): Make sure instance has a
24634 TYPE_LANG_SPECIFIC node before we dive into it.
24636 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
24638 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
24640 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
24642 * decl.c (duplicate_decls): When smashing decls, smash staticness in
24645 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
24647 * decl.c (poplevel): Handle the merging of subblocks of cleanups
24648 when finishing blocks that have already been created (usually due to
24649 the fixup goto code). Fixes bad debugging information.
24651 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
24653 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
24654 that's not a list of overloaded functions.
24656 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24658 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
24659 before trying to use DECL_ABSTRACT_VIRTUAL_P.
24661 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
24663 * decl2.c (mark_used): New function for hooking into setting of
24664 TREE_USED on decls.
24665 * call.c (build_method_call): Use it.
24666 * class.c (instantiate_type): Likewise.
24667 * init.c (build_offset_ref): Likewise. Don't call assemble_external
24668 for all like-named functions.
24669 * method.c (hack_identifier): Likewise.
24670 (emit_thunk): Don't call assemble_external.
24671 (make_thunk): Create thunk as a FUNCTION_DECL so that it
24672 gets the right mode and ENCODE_SECTION_INFO works.
24674 * parse.y: Use mark_used. Pass operator names to do_identifier.
24675 * lex.c (do_identifier): Handle operator names.
24677 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
24679 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24681 * errfn.c: Include stdio.h.
24682 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
24684 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
24686 * typeck2.c (digest_init): Always convert initializers to the
24689 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
24691 * init.c (member_init_ok_or_else): Don't allow member initializers
24692 for indirect members, as it is invalid.
24694 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24696 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
24698 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
24700 * parse.y (for.init.statement): Catch compound statements inside for
24701 initializations, if we're being pedantic.
24703 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
24705 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
24708 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
24710 * error.c (dump_expr): Don't core dump when a boolean expression is
24711 used as a default argument.
24713 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
24715 * class.c (finish_struct_bits): Check aggregate_value_p instead of
24718 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
24720 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
24721 BLKmode type that would otherwise be returned in registers.
24723 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24725 * g++.c (WITHLIBC): New macro.
24726 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
24727 saw_libc and pass it at the end if it was set.
24729 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24731 * parse.y (fn.def1): Call split_specs_attrs in
24732 declmods notype_declarator case.