1 2000-01-12 Mark Mitchell <mark@codesourcery.com>
3 * call.c (convert_class_to_reference): Fix typos.
4 (build_conditional_expr): Handle errors gracefully.
5 * class.c (push_nested_class): Likewise.
6 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
7 (DECL_THIS_EXTERN): Use it.
8 (DECL_THIS_STATIC): Likewise.
9 * cvt.c (convert_to_void): Handle errors gracefully.
10 (build_expr_type_conversion): Likewise.
11 * decl.c (maybe_push_decl): Likewise.
12 (start_decl_1): Likewise.
13 (require_complete_types_for_parms): Likewise.
14 * parse.y (structsp): Likewise.
15 (base_class): Likewise.
16 * parse.c: Regenerated.
17 * pt.c (finish_member_template_decl): Likewise.
18 * typeck.c (decay_conversion): Likewise.
20 * cp-tree.h (dfs_skip_vbases): New function.
21 (find_vbase_instance): Likewise.
22 * class.c (determine_primary_base): Allow a nearly empty base to
23 serve as a primary base class under the new ABI.
24 (get_class_offset_1): Rename to ...
25 (dfs_get_class_offset): ... this. Simplify. Don't issue error
27 (get_class_offset): Use it. Issue error messages here.
28 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
29 find the right copies of virtual bases.
30 (fixup_vtable_deltas1): Rename to ...
31 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
32 bases as primary bases.
33 (fixup_vtable_deltas): Remove.
34 (override_one_vtable): Handle virtual bases as primary bases.
35 (merge_overrides): Likewise.
36 (finish_struct_1): Likewise.
37 (dump_class_hierarchy): Dump primary-ness of bases as well.
38 * search.c (mark_primary_bases): Use a pre-order traversal to
39 handle primary virtual bases.
40 (dfs_skip_vbases): New fiunction.
41 (expand_upcast_fixups): Adjust to handle primary virtual bases.
42 (fixup_virtual_upcast_offsets): Likewise.
43 (fixup_all_virtual_upcast_offsets): Likewise.
44 (dfs_find_vbase_instances): New function.
45 (find_vbase_instance): Likewise.
47 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
49 * lex.c (DIR_SEPARATOR): Delete macro.
51 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
53 * decl2.c (lang_decode_option): Handle automatic line wrapping
56 2000-01-11 Mark Mitchell <mark@codesourcery.com>
58 * friend.c (do_friend): Don't resolve scopes when processing
59 template declarations, even if the qualifying scope doesn't
60 involve template parameters.
62 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
64 * class.c (dfs_modify_vtables_queue_p): Remove.
65 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
66 and dfs_marked_real_bases_queue_p instead of
67 dfs_modify_vtables_queue_p.
69 * class.c (build_vbase_path): Simplify.
70 (dfs_propagate_binfo_offsets): New function.
71 (propagate_binfo_offsets): Use it.
72 (remove_base_field): Simplify.
73 (dfs_set_offset_for_vbases): Remove.
74 (dfs_set_offset_for_shared_vbases): New function.
75 (dfs_set_offset_for_unshared_vbases): Likewise.
76 (layout_virtual_bases): Use them.
77 (layout_basetypes): Don't call propagate_binfo_offsets.
78 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
81 * class.c (build_base_field): New function, split out from ...
82 (build_base_fields): ... here. Use it. Allocate primary bases
83 first, under the new ABI.
84 (get_vtable_entry): Remove.
85 (remove_base_field): New function, split out from ...
86 (remove_base_fields): ... here. Adjust since primary bases come
87 first under the new ABI.
89 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
90 (initialize_vtbl_ptrs): New function.
91 (expand_indirect_vtbls_init): Change prototype.
92 (convert_pointer_to_vbase): Declare.
93 * init.c (expand_direct_vtbls_init): Remove.
94 (dfs_initialize_vtbl_ptrs): New function.
95 (initialize_vtbl_ptrs): Likewise.
96 (emit_base_init): Use initialize_vtbl_ptrs.
97 * search.c (convert_pointer_to_vbase): Make it global.
98 (expand_indirect_vtbls_init): Remove vtable initialization code.
99 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
101 * class.c (dfs_finish_vtbls): New function.
102 (finish_vtbls): Use it.
103 (dump_class_hierarchy): New function.
105 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
106 (BINFO_VBASE_PRIMARY_P): New macro.
107 (BINFO_VIRTUALS): Add to documentation.
108 (SET_BINFO_PRIMARY_MARKED_P): Remove.
109 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
110 (dfs_mark_primary_bases_queue_p): Likewise.
111 (dfs_unmarked_real_bases_queue_p): New function.
112 (dfs_marked_real_bases_queue_p): Likewise.
113 * search.c (dfs_mark_primary_bases): Adjust.
114 (mark_primary_bases): Likewise.
115 (get_shared_vbase_if_not_primary): New function.
116 (dfs_unmarked_real_bases_queue_p): Likewise.
117 (dfs_marked_real_bases_queue_p): Likewise.
118 (dfs_get_pure_virtuals): Simplify.
119 (get_pure_virtuals): Likewise.
121 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
123 * lex.c: Include tm_p.h.
125 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
127 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
129 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
131 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
132 * pt.c (instantiate_decl): Defer comdat templates that might not be
135 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
136 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
137 (finish_file): Likewise.
139 * decl2.c (import_export_class): Undo 12/14 change.
141 * error.c (dump_decl): operator new, not operatornew.
143 * class.c (field_decl_cmp): A nontype is "greater" than a type.
144 * search.c (lookup_field_1): Look for the last field with the
147 2000-01-05 Nathan Sidwell <nathan@acm.org>
149 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
152 2000-01-05 Nathan Sidwell <nathan@acm.org>
154 * typeck.c (build_static_cast): Don't strip target qualifiers
155 when casting from a class.
157 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
159 * class.c (warn_hidden): Initialize variable `fndecl'.
161 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
163 * decl.c (flag_isoc9x): New variable to be able to use code in
164 c-common.c. For now always zero.
166 2000-01-03 Mark Mitchell <mark@codesourcery.com>
168 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
169 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
170 or unshare_base_binfos for virtual bases here.
171 * search.c (dfs_get_vbase_types): Do it here.
172 (get_vbase_types): Adjust.
174 2000-01-02 Mark Mitchell <mark@codesourcery.com>
176 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
177 (BINFO_PRIMARY_MARKED_P): Use flag 5.
178 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
179 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
180 (unmark_primary_bases): Remove declaration.
181 (unmarkedp): Declare.
182 (dfs_vbase_unmark): Likewise.
183 * class.c (determine_primary_base): Return immediately if there
184 are no base classes. Call mark_primary_bases here.
185 (modify_all_direct_vtables): Remove.
186 (modify_all_indirect_vtables): Remove.
187 (dfs_modify_vtables_queue_p): New function.
188 (dfs_modify_vtables): New function.
189 (modify_all_vtables): Use them.
190 (build_base_fields): Build FIELD_DECLs for primary virtual base
192 (create_vtable_ptr): Don't call determine_primary_base here.
193 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
194 (dfs_set_offset_for_vbases): ... this.
195 (layout_virtual_bases): Use it.
196 (layout_class_type): Call determine_primary_base here.
197 * search.c (unmarkedp): Make it global.
198 (shared_marked_p): Simplify.
199 (shared_unmarked_p): Likewise.
200 (dfs_primary_bases_queue_p): Remove.
201 (dfs_unmark_primary_bases): Likewise.
202 (unmark_primary_bases): Likewise.
203 (mark_primary_bases): Simplify.
204 (get_pure_virtuals): Don't call mark_primary_bases here.
205 (dfs_vbase_unmark): New function.
206 (get_vbase_types): Simplify.
208 * class.c (struct base_info): Remove.
209 (determine_primary_base): Take has_virtual_p rather than a
210 base_info as input. Don't calculate max_has_virtual.
211 (finish_struct_bits): Remove max_has_virtual argument.
212 (create_vtable_ptr): Remove max_has_virtual_p argument.
213 (layout_virtual_bases): Remove max argument.
214 (layout_basetypes): Likewise.
215 (layout_class_type): Remove max_has_virtual_p argument.
216 (finish_struct_1): Remove max_has_virtual.
218 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
219 (layout_basetypes): Remove.
220 * class.c (propagate_binfo_offsets): Moved here from tree.c.
221 Update to handle primary virtual bases.
222 (remove_base_fields): New function, split out from
224 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
225 (layout_virtual_bases): New function, split out from
226 layout_basetypes. Update to handle primary virtual bases.
227 (layout_basetypes): Moved here from tree.c. Use
228 remove_base_fields and layout_virtual_bases.
229 * search.c (dfs_mark_primary_bases_queue_p): New function.
230 (mark_primary_bases): Use it.
231 * tree.c (CEIL): Remove.
232 (propagate_binfo_offsets): Remove.
233 (layout_basetypes): Remove.
235 2000-01-01 Mark Mitchell <mark@codesourcery.com>
237 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
238 (BINFO_PRIMARY_MARKED_P): New macro.
239 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
240 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
241 (mark_primary_bases): New function.
242 (unmark_primary_bases): Likewise.
243 * search.c (get_abstract_virtuals_1): Remove.
244 (dfs_mark_primary_bases): New function.
245 (mark_primary_bases): Likewise.
246 (dfs_unmark_primary_bases): Likewise.
247 (unmark_primary_bases): Likewise.
248 (dfs_get_pure_virtuals): Likewise.
250 2000-01-01 Mark Mitchell <mark@codesourcery.com>
252 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
253 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
254 (modify_one_vtable): Adjust.
255 (fixup_vtable_deltas1): Likewise.
256 (override_one_vtable): Likewise.
257 * search.c (get_abstract_virtuals_1): Likewise.
258 (get_pure_virtuals): Likewise.
259 (expand_upcast_fixups): Likewise.
260 * tree.c (debug_binfo): Likewise.
262 * class.c (build_vtable): Don't return a value. Don't rebuild
263 vtables for bases that have already been handled.
264 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
265 already been handled.
266 (modify_one_vtable): Adjust accordingly.
267 (fixup_vtable_deltas1): Likewise.
268 (finish_struct_1): Likewise.
270 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
272 * call.c (build_new_method_call): Also check destructors.
274 1999-12-31 Mark Mitchell <mark@codesourcery.com>
276 * cp-tree.h (VF_NORMAL_VALUE): Remove.
277 * class.c (struct base_info): Remove vfield, vfields, and rtti.
278 (set_primary_base): New function, split out from ...
279 (finish_base_struct): ... here. Rename to ...
280 (determine_primary_base): ... this. Simplify.
281 (create_vtable_ptr): Tweak accordingly.
282 (finish_struct_1): Simplify.
284 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
285 (CLASSTYPE_N_BASECLASSES): Likewise.
286 (BINFO_FOR_VBASE): New macro.
287 (get_vbase_types): Change prototype.
288 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
289 (prepare_fresh_vtable): Likewise.
290 (finish_vtbls): Likewise.
291 (get_class_offset_1): Likewise.
292 (modify_all_indirect_vtables): Likewise.
293 (build_vbase_pointer_fields): Likewise.
294 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
295 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
296 (expand_member_init): Likewise.
297 * search.c (get_base_distance): Likewise.
298 (lookup_field_queue_p): Likewise.
299 (virtual_context): Likewise.
300 (get_vbase_types): Don't return a value. Set
301 CLASSTYPE_VBASECLASSES here.
302 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
304 1999-12-30 Mark Mitchell <mark@codesourcery.com>
306 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
308 1999-12-29 Mark Mitchell <mark@codesourcery.com>
310 * class.c (create_vtable_ptr): Put the vtable at the beginning of
311 the class, not the end, in the new ABI.
312 * tree.c (propagate_binfo_offsets): Do the right thing for the new
315 1999-12-29 Mark Mitchell <mark@codesourcery.com>
317 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
318 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
319 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
320 (check_field_decls): Likewise.
321 (check_bases_and_members): Likewise.
323 1999-12-28 Mark Mitchell <mark@codesourcery.com>
325 * cp-tree.h (do_inline_function_hair): Remove.
326 * class.c (layout_class_type): New function, split out from
328 (fixup_pending_inline): Likewise.
329 (fixup_inline_methods): New function.
330 * method.c (fixup_pending_inline): Remove.
331 (do_inline_function_hair): Likewise.
333 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
336 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
337 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
338 (CLASSTYPE_PURE_VIRTUALS): ... this.
339 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
340 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
341 (DECL_PURE_VIRTUAL_P): ... this.
342 (get_abstract_virtuals): Rename to ...
343 (get_pure_virtuals): ... this.
344 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
345 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
346 CLASSTYPE_PURE_VIRTUALS.
347 * class.c (build_vtable_entry): Likewise.
348 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
349 get_abstract_virtuals.
350 (build_vtbl_initializer): Likewise.
351 (override_one_vtable): Likewise.
352 (check_methods): Likewise.
353 * decl.c (duplicate_decls): Likewise.
354 (redeclaration_error_message): Likewise.
355 (lang_mark_tree): Likewise.
356 * decl2.c (grok_function_init): Likewise.
357 (import_export_vtable): Likewise.
358 (import_expor_class): Likewise.
359 * typeck2.c (abstract_virtuals_error): Likewise.
360 * xref.c (GNU_xref_member): Likewise.
361 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
363 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
365 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
368 1999-12-26 Mark Mitchell <mark@codesourcery.com>
370 * decl.c (store_return_init): Use mode of old RTL generated for
371 DECL_RESULT, not the mode of DECL_RESULT itself.
372 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
373 for functions that used named return values.
375 1999-12-24 Mark Mitchell <mark@codesourcery.com>
377 * semantics.c (expand_body): Use
378 note_deferral_of_defined_inline_function.
380 1999-12-22 Mark Mitchell <mark@codesourcery.com>
382 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
384 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
386 * error.c (dump_decl): Support named return values.
388 1999-12-20 Mark Mitchell <mark@codesourcery.com>
390 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
391 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
392 (CLASSTYPE_PRIMARY_BINFO): Likewise.
393 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
394 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
395 (check_bases_and_members): Set them here instead.
396 (create_vtable_ptr): New function, split out from ...
397 (finish_struct_1): ... here. Use it. Tidy. Use
398 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
399 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
400 the first field in the class.
401 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
402 seeing TYPE_VFIELD as the first field in the class.
404 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
405 (TYPE_POLYMORPHIC_P): ... this.
406 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
407 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
408 (TREE_CALLS_NEW): Remove.
409 (TREE_MANGLED): Likewise.
410 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
411 and TYPE_POLYMORPHIC_P.
412 * class.c (check_bases): Likewise.
413 (finish_base_struct): Likewise.
414 (finish_struct_bits): Likewise.
415 (check_for_override): Likewise.
416 (finish_struct_1): Likewise.
417 (get_vfield_name): Likewise.
418 * decl.c (xref_basetypes): Likewise.
419 * decl2.c (import_export_class): Likewise.
420 (import_export_decl): Likewise.
421 * error.c (dump_function_decl): Likewise.
422 * pt.c (instantiate_class_template): Likewise.
423 * repo.c (repo_inline_used): Likewise.
424 * rtti.c (build_headof): Likewise.
425 (get_tinfo_fn_dynamic): Likewise.
426 (build_x_typeid): Likewise.
427 (get_tinfo_var): Likewise.
428 (build_dynamic_cast_1): Likewise.
429 (synthesize_tinfo_fn): Likewise.
430 * search.c (lookup_field_1): Likewise.
431 (dfs_debug_mark): Likewise.
432 (maybe_suppress_debug_info): Likewise.
433 * typeck.c (build_component_ref): Likewise.
434 (build_component_addr): Likewise.
435 * typeck2.c (process_init_constructor): Likewise.
437 1999-12-20 Nathan Sidwell <nathan@acm.org>
439 * typeck.c (strip_all_pointer_quals): New static function.
440 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
442 1999-12-16 Mark Mitchell <mark@codesourcery.com>
444 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
445 (dso_handle_node): New macro.
446 (flag_use_cxa_atexit): New variable.
447 (declare_global_var): New function.
448 (start_anon_func): Remove declaration.
449 (end_anon_func): Likewise.
450 * decl.c (get_atexit_node): New function, split out from
451 destroy_local_static. Handle flag_use_cxa_atexit.
452 (get_dso_handle_node): Likewise.
453 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
454 except.c. Handle flag_use_cxa_atexit.
455 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
457 (declare_global_var): New variable.
458 (destroy_local_static): Handle flag_use_cxa_atexit.
459 * decl2.c (flag_use_cxa_atexit): New variable.
460 (lang_f_options): Likewise.
461 * except.c (start_anon_func): Remove.
462 (end_anon_func): Liekwise.
463 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
464 * rtti.c (get_tinfo_var): Use declare_global_var.
466 1999-12-16 Mark Mitchell <mark@codesourcery.com>
468 * class.c (check_field_decls): Don't return a value.
469 (avoid_overlap): Moved here from tree.c.
470 (build_base_fields): Likewise.
471 (check_bases): New function, split out from finish_base_struct.
472 (check_bases_and_members): New function, split out from
474 (struct base_info): Remove cant_have_default_ctor,
475 cant_have_const_ctor, cant_have_asn_ref.
476 (finish_base_struct): Split semantic analysis into check_bases.
477 (finish_struct_methods): Fix bogus assertion.
478 (check_field_decls): Call finish_struct_anon here.
479 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
480 (finish_struct_1): Use check_bases_and_members. Reorganize.
481 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
482 (build_base_fields): Don't declare.
483 * tree.c (avoid_overlap): Remove.
484 (build_base_fields): Likewise.
486 * optimize.c (struct inline_data): Remove scope_stmt.
487 (remap_block): Don't use insert_block_after_note. Don't update
489 (expand_call_inline): Don't update scope_stmt.
490 (optimize_function): Don't initialize scope_stmt.
491 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
492 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
494 1999-12-15 Mark Mitchell <mark@codesourcery.com>
496 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
497 out of the class, rather than taking them as parameters.
498 (build_vbase_pointer_fields): Move here from tree.c.
499 (build_vtbl_or_vbase_field): New function.
500 (check_methods): Likewise.
501 (remove_zero_width_bitfields): Likewise.
502 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
503 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
505 (finish_struct_methods): Handle the case where there are no
507 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
508 (check_field_decls): Call delete_duplicate_fields here.
509 (finish_struct_1): Tidy. Use check_methods and
510 remove_zero_width_bitfields.
511 * cp-tree.h (build_vbase_pointer_fields): Remove.
512 * decl.c (grokdeclarator): Use tree_cons instead of
514 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
515 instead of temp_tree_cons.
516 * lex.c (cons_up_default_function): Remove dead code.
517 * method.c (fixup_pending_inline): New function, split out from ...
518 (do_inline_function_hair): ... here.
519 * tree.c (build_vbase_pointer_fields): Remove.
521 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
523 * tree.c (walk_tree): Walk operand subtrees in forward order.
524 * optimize.c (expand_call_inline): Likewise.
525 (optimize_function): Initialize id->scope_stmt to something useful.
526 (remap_block): Assume id->scope_stmt has a useful value.
528 1999-12-15 Nathan Sidwell <nathan@acm.org>
530 * typeck.c (build_c_cast): Expand warning message. Move pointer
531 alignment warning to after the cast. Don't warn about pointer
532 alignment when given a pointer to incomplete.
534 1999-12-15 Richard Henderson <rth@cygnus.com>
536 * cp-tree.h (make_aggr_type): Declare.
537 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
538 (make_aggr_type): New.
540 * decl.c (build_typename_type, init_decl_processing): Use it.
541 (build_ptrmemfunc_type, xref_tag): Likewise.
542 * except.c (call_eh_info): Likewise.
543 * init.c (init_init_processing): Likewise.
544 * pt.c (process_template_parm, lookup_template_class): Likewise.
545 * rtti.c (expand_class_desc): Likewise.
546 * semantics.c (begin_class_definition, finish_typeof): Likewise.
547 * tree.c (copy_template_template_parm): Likewise.
549 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
551 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
552 sizeof (struct tree_common).
554 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
556 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
557 outermost block to point to the inlined function decl.
559 * error.c (dump_decl): operator==, not operator ==.
560 (op_to_string): Likewise.
562 * decl.c (compute_array_index_type): Handle null name.
564 * decl2.c (ambiguous_decl): Fix to match comment.
565 (lookup_using_namespace): Adjust.
567 * decl2.c (import_export_class): Don't ignore dllimport.
569 1999-12-14 Mark Mitchell <mark@codesourcery.com>
571 * class.c (check_field_decls): Split out from ...
572 (finish_struct_1): ... here. Use it. Tidy.
574 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
575 * optimize.c (copy_body_r): Pass it.
576 * tree.c (remap_save_expr): Clear walk_subtrees for an
577 already-handled SAVE_EXPR.
578 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
580 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
581 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
583 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
585 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
587 * class.c (finish_base_struct): Allow multiple COM base classes
588 as well as non-COM bases as long as it's not the leftmost.
590 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
592 * lex.c (saving_parse_to_obstack): New global.
593 (reinit_parse_for_block): Use.
594 (reinit_parse_for_expr): Use.
595 (check_newline): Use.
597 1999-12-13 Mark Mitchell <mark@codesourcery.com>
599 * optimize.c (initialize_inlined_parameters): Take FN to which the
600 parameters belong as an argument.
601 (expand_call_inline): Expand calls into the parameter
602 initializations before pushing the function onto the list of
603 functions we are presently expanding.
605 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
607 * class.c (get_vtable_name): Use a literal format string and
608 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
609 (prepare_fresh_vtable): Likewise.
611 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
614 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
616 * init.c (build_vec_init): Initialize variable `try_body'.
618 * lex.c (yyerror): Don't call a variadic function with a
619 non-literal format string.
621 * optimize.c (optimize_function): Call memset, not bzero.
623 * pt.c (for_each_template_parm_r): Add static prototype.
625 1999-12-09 Andreas Jaeger <aj@suse.de>
627 * except.c (expand_throw): Add static attribute to match
630 * Makefile.in (semantics.o): Add dependency on output.h.
631 * semantics.c: Include output.h for declaration of
634 1999-12-09 Mark Mitchell <mark@codesourcery.com>
636 * decl.c (init_decl_processing): Reenable inlining on trees.
637 (finish_function): Likewise.
638 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
639 * semantics.c (simplify_aggr_init_exprs): New function.
640 (expand_body): Use it.
641 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
642 sometimes present the same sub-tree twice.
644 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
647 * semantics.c (finish_switch_cond): Do conversions here, not ...
648 * typeck.c (c_expand_start_case): Here.
650 * semantics.c (do_poplevel): Remove unused variable.
652 1999-12-06 Mark Mitchell <mark@codesourcery.com>
654 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
655 unless we're declaring the variable in question.
657 1999-12-06 Mark Mitchell <mark@codesourcery.com>
659 * decl.c (init_decl_processing): #if 0 last patch.
660 (finish_function): Likewise.
662 1999-12-05 Mark Mitchell <mark@codesourcery.com>
664 * decl.c (init_decl_processing): Set flag_inline_trees if
667 * cp-tree.h (calls_setjmp_p): Declare.
668 * decl.c (finish_function): Mark functions that call setjmp as
670 * optimize.c (calls_setjmp_r): New function.
671 (calls_setjmp_p): Likewise.
673 1999-12-04 Mark Mitchell <mark@codesourcery.com>
675 * optimize.c (expand_call_inline): Wrap the expanded call in an
676 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
679 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
681 (remap_decl): New function.
682 (remap_block): Likewise.
683 (copy_scope_stmt): Likewise.
684 (copy_body_r): Use remap_decl and copy_scope_stmt.
685 (copy_body): Use VARRAY_TOP_TREE.
686 (initialize_inlined_parameters): Likewise.
687 (declare_return_variable): Likewise.
688 (inlinable_function_p): Check flag_inline_trees.
689 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
690 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
691 parameters of the inlined function.
692 (optimize_function): Prevent recursion into partially complete
695 * cp-tree.def (SCOPE_STMT): Take one operand.
696 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
697 (SCOPE_NULLIFIED_P): Redefine.
698 (SCOPE_NO_CLEANUPS_P): New macro.
699 (add_scope_stmt): Change prototype.
700 * decl.c (poplevel): Tidy. Warn about unused variables here.
701 Record SCOPE_STMT_BLOCKs.
702 (finish_function): Keep DECL_INITIAL for functions that might be
704 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
705 * semantics.c: Include rtl.h.
706 (add_scope_stmt): Return the new scope statement and, for an
707 end-of-scope statement, its matching begin statement. Don't set
709 (do_pushlevel): Simplify, now that we are always
711 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
712 (expand_stmt): Don't call expand_start_bindings or
713 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
714 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
716 * Makefile.in (semantics.o): Depend on RTL_H.
718 * decl2.c (pending_statics_used): Make it a macro.
719 (saved_inlines_used): Likewise.
720 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
721 (mark_inline_for_output): Likewise.
722 (ssdf_decls_used): Remove.
723 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
724 (generate_ctor_or_dtor_function): Adjust accordingly.
726 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
727 Greg McGary <gkm@gnu.org>
729 * decl.c (duplicate_decls): Merge
730 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
731 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
733 1999-12-02 Mike Stump <mrs@wrs.com>
735 * init.c (perform_member_init): Handle parse errors better.
737 1999-12-01 Mark Mitchell <mark@codesourcery.com>
739 * cp-tree.h (min_tree_cons): Remove.
740 (scratch_ovl_cons): Likewise.
741 * decl.c (saveable_obstack): Don't declare.
742 (duplicate_decls): Tweak error-message.
743 (initialize_local_var): Explicitly mark the definition as static.
744 (finish_function): Call permanent_allocation, just so
745 that the middle-end sees the obstacks it expects.
746 (mark_cp_function_context): Likewise.
747 * init.c (build_new): Don't use min_tree_cons.
748 * lex.c (permanent_obstack): Don't declare.
749 (current_obstack, saveable_obstack): Likewise.
750 * spew.c (current_obstack, saveable_obstack): Likewise.
751 * tree.c (current_obstack, saveable_obstack): Likewise.
752 (scratch_ovl_cons): Remove.
753 (build_min_nt): Don't mess with obstacks.
754 (build_min): Likewise.
755 (min_tree_cons): Remove
756 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
757 (build_x_function_call): Likewise.
758 (build_c_cast): Don't use min_tree_cons.
760 1999-11-29 Mark Mitchell <mark@codesourcery.com>
762 * pt.c (tsubst_decl): Robustify.
764 1999-11-27 Mark Mitchell <mark@codesourcery.com>
766 * decl2.c (finish_file): Call expand_body for inline functions
767 that will be written out but that do not yet have RTL.
768 * semantics.c (expand_body): Do not generate RTL For inline
769 functions that do not yet need to be written out.
771 1999-11-25 Mark Mitchell <mark@codesourcery.com>
773 * Make-lang.in (CXX_SRCS): Add optimize.c.
774 * Makefile.in (CXX_OBJS): Add optimize.o.
775 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
776 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
777 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
778 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
779 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
781 (optimize.o): New target.
782 * class.c: Don't include splay-tree.h.
783 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
784 * cp-tree.h: Include splay-tree.h.
785 (DECL_UNINLINABLE): New macro.
786 (CTOR_BEGIN_P, CTOR_END_P): New macros.
787 (flag_inline_trees): New variable.
788 (local_variable_p): New function.
789 (nonstatic_local_decl_p): Likewise.
790 (optimize_function): Likewise.
791 (cplus_unsave_expr_now): Remove.
792 (copy_tree_r): Declare.
793 (remap_save_expr): Likewise.
794 * decl.c (local_variable_p): Don't
796 (local_variable_p_walkfn): New function.
797 (make_rtl_for_local_static): Remove code to try to avoid writing
798 out static constants.
799 (emit_local_var): Fix indentation.
800 (nonstatic_local_decl_p): New function.
801 (check_default_argument): Use local_variable_p_walkfn, not
802 local_variable_p, when walking the tree.
803 (start_function): Set the DECL_CONTEXT for automatically generated
805 (finish_constructor_body): Use CTOR_STMT to mark the end of a
807 * decl2.c: Don't include splay-tree.h.
808 (flag_inline_trees): Define.
809 * dump.c: Don't include
811 * except.c (expand_end_catch_block): Fix comment formatting.
812 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
813 (expand_throw): Tidy comment.
814 * init.c (build_vec_delete_1): Use create_temporary_var.
815 * lex.c (cplus_tree_code_type): Make it static.
816 (cplus_tree_code_length): Likewise.
817 (cplus_tree_code_name): Likewise.
818 * optimize.c: New file.
819 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
821 (setup_vtbl_ptr): Mark the beginnings of constructors with
823 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
824 (expand_body): Call optimize_function. Save bodies if we're doing
826 * tree.c: Don't include splay-tree.h. Include insn-config.h and
828 (copy_tree_r): Make it public.
829 (statement_code_p): New function.
830 (mark_local_for_remap_r): Likewise.
831 (cp_usave_r): Likewise.
832 (cp_unsave): Likewise.
833 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
834 (walk_tree): Walk into `s' class nodes. Walk statement chains.
835 (copy_tree_r): Handle 's' class nodes. Restore chains for
836 statements. Nullify scopes. Don't copy types.
837 (init_tree): Set lang_unsave to cp_unsave.
838 (remap_save_expr): Define.
839 * ir.texi: Document CTOR_STMT.
841 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
843 * search.c (note_debug_info_needed): Do perform this optimization
845 (maybe_suppress_debug_info): Likewise. Start by clearing
846 TYPE_DECL_SUPPRESS_DEBUG.
848 1999-11-24 Mark Mitchell <mark@codesourcery.com>
850 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
852 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
854 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
856 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
857 function with a non-literal format string.
859 * lex.c (do_identifier): Likewise.
861 * typeck.c (build_unary_op): Likewise.
863 1999-11-23 Mark Mitchell <mark@codesourcery.com>
865 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
867 1999-11-22 Mark Mitchell <mark@codesourcery.com>
869 * cp-tree.def (CTOR_COMPLETE): New tree node.
870 * decl.c (finish_constructor_body): Add it, to mark the end of the
872 (finish_function): Don't call end_protect_partials here.
873 * ir.texi (CTOR_COMPLETE): Document it.
874 * semantics.c (expand_stmt): Handle it.
876 * cp-tree.def (FUNCTION_NAME): New tree node.
877 * cp-tree.h (current_function_name_declared): Tweak documentation.
878 (lang_decl_flags): Add pretty_function_p, adjust dummy.
879 (DECL_PRETTY_FUNCTION_P): New macro.
880 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
881 etc., in a template function. Use at_function_scope_p instead of
883 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
885 (tsubst): Handle FUNCTION_NAME.
886 (tsubst_copy): Likewise.
887 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
888 etc. in instantiation.
889 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
890 even in template functions.
891 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
892 conditional scope at the top of a destructor.
894 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
897 1999-11-22 Nathan Sidwell <nathan@acm.org>
899 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
900 when actually negative.
902 * typeck.c (convert_for_assignment): Expand comment about
903 strange NULL check, moved from ...
904 (convert_for_initialization): ... here. Remove unneeded
907 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
909 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
910 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
911 Always destruct virtual bases of array components, but never
913 (build_vec_init): Adjust invocations.
914 (build_delete): Likewise.
915 * decl2.c (delete_sanity): Likewise.
917 1999-11-19 Nathan Sidwell <nathan@acm.org>
919 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
920 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
921 * decl2.c (grok_method_quals): Accept `restrict' as applying to
922 the object pointer. Return such qualifiers.
923 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
926 1999-11-18 Mark Mitchell <mark@codesourcery.com>
928 * except.c (expand_end_catch_block): Fix typo.
929 (expand_exception_blocks): Simplify. Don't call
930 expand_leftover_cleanups.
932 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
934 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
935 * pt.c (tsubst, case INTEGER_TYPE): Call it.
936 Check uses_template_parms.
938 * class.c (finish_struct): If we're a local class in a template
939 function, add a TAG_DEFN.
940 * pt.c (lookup_template_class): If this is a local class in a
941 template function, call pushtag.
942 (tsubst_expr, case TAG_DEFN): Handle classes, too.
944 Emit debug info with the vtable.
945 * search.c (maybe_suppress_debug_info): New function...
946 * class.c (finish_struct_1): ...split out from here.
947 * cp-tree.h: Declare it.
948 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
949 if we're writing out the vtable.
950 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
951 note_debug_info_needed): #if 0 out.
953 1999-11-14 Mark Mitchell <mark@codesourcery.com>
955 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
956 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
958 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
959 * decl2.c (lookup_arg_dependent): Use it.
961 * cp-tree.h (cp_finish_decl): Change prototype.
962 (finish_static_data_member_decl): Likewise.
963 (push_permanent_obstack): Remove declaration.
964 (push_expression_obstack): Likewise.
965 (push_scratch_obstack): Likewise.
966 (DECL_TEMPLATE_PARM_P): Robustify.
967 (SET_DECL_TEMPLATE_PARM_P): New macro.
968 * class.c (add_method): Don't manipulate obstacks.
969 (finish_vtbls): Likewise.
970 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
971 * decl.c (binding_for_name): Don't manipulate obstacks.
972 (maybe_push_to_top_level): Likewise.
973 (pop_from_top_level): Likewise.
974 (duplicate_decls): Likewise.
975 (pushdecl): Likewise.
976 (implicitly_declare): Likewise.
977 (build_typename_type): Likewise.
978 (start_decl): Likewise.
979 (cp_finish_decl): Likewise.
980 (finish_decl): Likewise.
981 (destroy_local_static): Likewise.
982 (expand_static_init): Likewise.
983 (complete_array_type): Likewise.
984 (grokvardecl): Likewise.
985 (build_ptrmemfnc_type): Likewise.
986 (grokdeclarator): Likewise.
987 (xref_tag): Likewise.
988 (xref_basetypes): Likewise.
989 (start_enum): Likewise.
990 (finish_enum): Likewise.
991 (start_function): Likewise.
992 (finish_function): Likewise.
993 (start_method): Adjust call to cp_finish_decl.
994 * decl2.c (finish_static_data_member_decl): Don't manipulate
996 (grokfield): Likewise.
997 (grokbitfield): Likewise.
998 (get_temp_name): Likewise.
999 (get_sentry): Likewise.
1000 (fnish_file): Likewise.
1001 (lookup_arg_dependent): Likewise.
1002 * except.c (call_eh_info): Likewise.
1003 (push_eh_info): Likewise.
1004 (do_pop_exception): Likewise.
1005 (initialize_handler_parm): Likewise.
1006 (expand_end_eh_spec): Likewise.
1007 (alloc_eh_object): Likewise.
1008 (expand_throw): Likewise.
1009 * expr.c (extract_scalar_init): Likewise.
1010 * init.c (build_java_class_ref): Likewise.
1011 * lex.c (get_time_identifier): Likewise.
1012 (snarf_defarg): Likewise.
1013 (add_defarg_fn): Likewise.
1014 (is_global): Simplify.
1015 (do_identifier): Don't check TREE_PERMANENT.
1016 * method.c (emit_thunk): Don't manipulate obstacks.
1017 * parse.y (condition): Adjust call to cp_finish_decl.
1018 (primary): Likewise.
1019 (initdcl): Likewise.
1020 (initdcl0_innards): Likewise.
1021 (nomods_initdcl0): Likewise.
1022 * pt.c (push_inline_template_parms_recursive): Use
1023 SET_DECL_TEMPLATE_PARM_P.
1024 (process_template_parm): Likewise.
1025 (lookup_template_class): Don't manipulate obstacks.
1026 (instantiate_class_template): Adjust call to
1027 finish_static_data_member_decl.
1028 (tsubst_decl): Don't manipulate obstacks.
1029 (tsubst_expr): Likewise.
1030 (instantiate_template): Likewise.
1031 (instantiate_decl): Adjust calls to cp_finish_decl.
1032 * rtti.c (call_void_fn): Don't manipulate obstacks.
1033 (get_tinfo_var): Likewise.
1034 (get_tinfo_fn_unused): Likewise.
1035 (build_dynamic_cast_1): Likewise.
1036 (expand_si_desc): Likewise.
1037 (expand_class_desc): Likewise.
1038 (expand_ptr_desc): Likewise.
1039 (expand_attr_desc): Likewise.
1040 (expand_generic_desc): Likewise.
1041 (synthesize_tinfo_fn): Likewise.
1042 * search.c (expand_upcast_fixups): Likewise.
1043 * semantics.c (finish_asm_stmt): Likewise.
1044 (finish_named_return_value): Likewise.
1045 (begin_class_definition): Likewise.
1046 (finish_class_definition): Likewise.
1047 (finish_typeof): Likewise.
1048 * tree.c (build_cplus_method_type): Likewise.
1049 (reverse_path): Likewise.
1050 (copy_template_template_parm): Likewise.
1051 (build_expr_ptr_wrapper): Likewise.
1052 (push_expression_obstack): Remove.
1053 (push_permanent_obstack): Likewise.
1054 * typeck.c (mark_addressable): Likewise.
1056 1999-11-13 Mark Mitchell <mark@codesourcery.com>
1058 * call.c (build_conditional_expr): Use build_target_expr_with_type.
1059 (convert_like): Likewise.
1060 (build_over_call): Likewise.
1061 * cp-tree.h (build_target_expr): Remove.
1062 (build_target_expr_with_type): New function.
1063 * cvt.c (build_up_reference): Use get_target_expr.
1064 * decl.c (build_target_expr): Move to ...
1065 * tree.c (build_target_expr): Here. Make it static.
1066 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
1067 the temporary VAR_DECLs.
1068 (get_target_expr): Use it.
1070 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
1072 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
1073 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
1074 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
1075 * class.c (set_rtti_entry): Use it.
1077 1999-11-12 Mark Mitchell <mark@codesourcery.com>
1079 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
1081 * semantics.c (finish_expr_stmt): Call it here instead. Move
1082 default_conversion logic to semantic-analysis time.
1084 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
1086 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
1088 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
1090 * init.c (init_init_processing): Re-instated Nov 11 patch after
1093 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
1095 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
1096 Patch had not been approved yet.
1098 1999-11-12 Mark Mitchell <mark@codesourcery.com>
1100 * decl.c (compute_array_index_type): New function, split out from
1102 (create_array_type_for_decl): Likewise.
1103 (grokdeclarator): Use them.
1105 * semantics.c (expand_stmt): Don't suspend_momentary or
1108 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
1110 * init.c (init_init_processing): Header information for
1111 arrays allocated via `new' should have the same alignment used by
1114 1999-11-10 Mark Mitchell <mark@codesourcery.com>
1116 * error.c (dump_function_name): Don't crash if given a friend
1117 pseudo-instantiation.
1119 * cp-tree.h (build_enumerator): Change prototype.
1120 * decl.c (enum_next_value): Remove.
1121 (enum_overflow): Likewise.
1122 (init_decl_processing): Don't register enum_next_value as a root.
1123 (start_enum): Clear TYPE_VALUES for a redefined enum.
1124 (finish_enum): Reset the type of enumeration constants.
1125 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
1126 we don't need to. Maintain the TYPE_VALUES list and look there
1127 for the previously defined enumeration constant. Let enumeration
1128 constants have the type of their values until the enumeration type
1130 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
1132 * parse.c: Regenerated.
1133 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
1135 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
1136 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1138 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
1140 1999-11-09 Mark Mitchell <mark@codesourcery.com>
1142 * cp-tree.h (language_function): Remove x_last_dtor_insn and
1143 x_last_parm_cleanup_insn.
1144 * decl.c (last_dtor_insn): Remove.
1145 (last_parm_cleanup_insn): Likewise.
1146 (expand_start_early_try_stmts): Don't set them.
1147 (store_parm_decls): Likewise.
1148 (save_function_data): Or save them.
1149 (mark_lang_function): Or mark them.
1151 1999-11-08 Mark Mitchell <mark@codesourcery.com>
1153 * decl.c (store_parm_decls): Generate cleanup code at
1154 semantic-analysis time. Destroy objects in the correct order.
1156 1999-11-07 Mark Mitchell <mark@codesourcery.com>
1158 * cp-tree.h (begin_new_placement): Remove.
1159 (finish_new_placement): Likewise.
1160 * class.c (finish_struct_1): Don't suspend_momentary or
1162 * decl.c (grokdeclarator): Likewise.
1163 (maybe_build_cleanup_1): Likewise.
1164 * except.c (push_eh_cleanup): Likewise.
1165 (build_terminate_handler): Likewise.
1166 * init.c (build_new_1): Likewise.
1167 * parse.y (parse_decl): Change prototype.
1168 (initdecls, notype_initdecls, initdcl): Don't return int.
1169 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
1170 (.begin_new_placement): Remove.
1171 (.finish_new_placement): Likewise.
1172 (nonmomentary_expr): Likewise.
1173 (suspend_mom): Likewise.
1174 (condition): Don't suspend_momentary, resume_momentary, or keep
1175 track of need to resume.
1176 (unary_expr): Likewise.
1177 (new_placement): Likewise.
1179 (structsp): Likewise.
1180 (new_type_id): Likewise.
1181 (maybe_parmlist): Likewise.
1182 (direct_after_type_declaration): Likewise.
1183 (direct_new_declarator): Likewise.
1184 (direct_abstract_declaration): Likewise.
1185 * parse.c: Regenerated.
1186 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
1187 * semantics.c (begin_new_placement): Remove.
1188 (finish_new_placement): Likewise.
1190 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1192 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
1193 (DECL_TEMPLATE_INFO): Use it.
1194 * decl.c (warn_extern_redeclared_static): Do nothing for
1196 * decl2.c (mark_used): Explicitly check for function or variable.
1197 * semantics.c (finish_unary_op_expr): Check whether result is also
1200 1999-11-05 Mark Mitchell <mark@codesourcery.com>
1202 * Makefile.in (typeck2.o): Depend on output.h.
1203 * typeck2.c: Include output.h.
1205 * decl.c (flag_ansi): Remove declaration.
1207 * pt.c (tinst_level_tick): Make it static.
1208 (last_template_error_tick): Likewise.
1210 * cp-tree.h (mapcar): Remove declaration.
1211 (search_tree): Likewise.
1212 (walk_tree_fn): New typedef.
1213 (walk_tree): New function.
1214 * tree.c (bot_manip): Change prototype. Adjust to be called via
1216 (bot_replace): Likewise.
1217 (no_linkage_helper): Likewise.
1218 (copy_tree_r): New function.
1219 (search_tree): Rename, and adjust, to become ...
1220 (walk_tree): New function.
1222 (target_remap): Remove.
1223 (target_remap_count): Likewise.
1224 (break_out_target_exprs): Use walk_tree.
1225 * decl.c (local_variable_p): Change prototype.
1226 (check_default_argument): Use walk_tree.
1227 * pt.c (for_each_template_parm_r): New function, split out from ...
1228 (for_each_template_parm): Here. Use it, via walk_tree.
1230 1999-11-03 Mark Mitchell <mark@codesourcery.com>
1232 * class.c (check_bitfield_decl): New function, split out from
1234 (check_field_decl): Likewise. Recursively examine members of
1236 (finish_struct_1): Use them.
1237 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
1239 1999-11-02 Mark Mitchell <mark@codesourcery.com>
1241 * decl.c (grokfndecl): Remove dead code.
1243 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
1245 1999-11-02 Scott Snyder <snyder@fnal.gov>
1247 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
1249 * pt.c (tsubst_copy): Likewise.
1251 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
1253 * decl2.c (maybe_make_one_only): Always make things comdat on
1256 1999-10-31 Mark Mitchell <mark@codesourcery.com>
1258 * decl.c (finish_function): Call free_after_parsing for functions
1259 we are not immediately turning into RTL.
1261 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
1263 * cp-tree.h (flag_dump_translation_unit): Add decl.
1265 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
1267 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
1269 1999-10-30 Mark Mitchell <mark@codesourcery.com>
1271 * decl.c (pop_cp_function_context): Don't call free on a NULL
1273 * semantics.c: Include ggc.h.
1274 (expand_body): Do garbage-collection after processing a template
1275 function. Clear DECL_SAVED_TREE after generating RTL for a
1277 * Makefile.in (semantics.o): Depend on ggc.h.
1279 1999-10-29 Mark Mitchell <mark@codesourcery.com>
1281 * cp-tree.h (make_typename_type): Change prototype.
1282 * decl.c (make_typename_type): Only complain if so requested.
1283 * parse.y (nested_name_specifier): Adjust calls.
1284 (typename_sub0): Likewise.
1285 (typename_sub1): Likewise.
1286 * parse.c: Regenerated.
1287 * pt.c (convert_template_argument): Pass complain to
1291 1999-10-28 Mark Mitchell <mark@codesourcery.com>
1293 * semantics.c (finish_handler): End the scope of the handler
1294 before attaching it to the statement-tree.
1296 1999-10-28 Ian Lance Taylor <ian@zembu.com>
1298 * rtti.c (build_dynamic_cast_1): Give a better error message for
1299 an attempt to dynamic_cast from a non-polymorphic type.
1301 1999-10-27 Mark Mitchell <mark@codesourcery.com>
1303 * cp-tree.h (make_temp_vec): Remove.
1304 (make_scratch_vec): Likewise.
1305 * call.c (add_function_candidate): Use make_tree_vec.
1306 (add_conv_candidate): Likewise.
1307 (build_builtin_candidate): Likewise.
1308 (add_template_candidate_real): Likewise.
1309 * class.c (resolve_address_of_overloaded_function): Likewise.
1310 * decl.c (start_function): Don't fool with the momentary obstack.
1311 (finish_function): Likewise.
1312 * init.c (expand_direct_vtbls_init): Likewise.
1313 (begin_init_stmts): Likewise.
1314 (finish_init_stmts): Likewise.
1315 * pt.c (add_to_template_args): Use make_tree_vec.
1316 (check_explicit_specialization): Likewise.
1317 (coerce_template_parms): Likewise.
1318 (lookup_template_class): Don't fool with the momentary obstack.
1319 (instantiate_class_template): Likewise.
1320 (tsubst_template_arg_vector): Use make_tree_vec.
1321 (tsubst_aggr_type): Don't fool with the momentary obstack.
1322 (tsubst_decl): Likewise. Use make_tree_vec.
1323 (try_one_overload): Likewise.
1324 (try_class_unification): Don't fool with the momentary obstack.
1325 (get_bindings_real): Use make_tree_vec.
1326 (set_mangled_name_for_template_decl): Likewise.
1327 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
1328 * semantics.c (finish_expr_stmt): Likewise.
1329 (finish_do_stmt): Likewise.
1330 (finish_for_expr): Likewise.
1331 (finish_switch_cond): Likewise.
1332 (do_pushlevel): Likewise.
1333 (do_poplevel): Likewise.
1334 * tree.c (make_temp_vec): Remove.
1336 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
1337 CLEANUP_P for a TRY_BLOCK.
1338 * ir.texi: Document SAVE_EXPR.
1340 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
1342 * call.c (build_over_call): Check that the built-in function is
1343 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
1344 * typeck.c (build_function_call_real): Similarly.
1346 1999-10-26 Mark Mitchell <mark@codesourcery.com>
1348 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
1351 1999-10-24 Mark Mitchell <mark@codesourcery.com>
1353 * decl.c (push_overloaded_decl_1): Use pushdecl.
1355 * decl.c (auto_function): Replace #ifdef'd __inline with just
1357 * lex.c (my_get_run_time): Likeise.
1358 (yyprint): Likewise.
1359 (identifier_type): Likewise.
1360 * method.c (start_squangling): Likewise.
1361 (end_squangling): Likewise.
1363 (old_backref_index): Likewise.
1364 (flush_repeats): Likewise.
1365 (issue_ktype): Likewise.
1366 * parse.y (empty_parms): Likewise.
1367 * parse.c: Regenerated.
1369 1999-10-21 Mark Mitchell <mark@codesourcery.com>
1371 * dump.c (dequeue_and_dump): Replace several uses of
1372 queue_and_dump_index with dump_child.
1374 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1376 * expr.c: Include tm_p.h.
1378 1999-10-21 Mark Mitchell <mark@codesourcery.com>
1380 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
1381 (pushlevel_temporary): Remove.
1382 (add_scope_stmt): New function.
1383 * decl.c (pushlevel_temporary): Remove.
1384 (poplevel): Use add_scope_stmt.
1385 (start_decl_1): Likewise.
1386 * semantics.c (add_scope_stmt): New function.
1387 (do_pushlevel): Use it.
1388 (do_poplevel): Use it.
1389 (expand_stmt): Check SCOPE_PARTIAL_P.
1391 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
1392 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
1393 * expr.c (cplus_expand_expr): Expand it.
1394 * ir.texi: Document EMPTY_CLASS_EXPR.
1396 1999-10-20 Mark Mitchell <mark@codesourcery.com>
1398 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
1399 parameters as having namespace scope.
1401 1999-10-19 Mark Mitchell <mark@codesourcery.com>
1403 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
1404 (mangling_flags): New type.
1405 (build_overload_int): Change prototype.
1406 (build_overload_value): Likewise.
1407 (numeric_output_need_bar): Improve comment.
1408 (mangle_expression): New function, broken out from ...
1409 (build_overload_int): Here.
1410 (build_overload_value): Adjust for use of mangling flags. Don't
1411 warn about real-valued template parameters here. Do handle
1412 complex expressions involving real-valued template parameters.
1413 (build_template_parm_names): Encase non-type template parameters
1414 in underscores, if necessary.
1415 (process_overload_item): Remove conditional on
1416 PARM_CAN_BE_ARRAY_TYPE.
1418 1999-10-17 Mark Mitchell <mark@codesourcery.com>
1420 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
1422 * ir.texi: Clean up documentation of RETURN_INIT.
1424 1999-10-15 Greg McGary <gkm@gnu.org>
1426 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
1427 (lang_init): Set default for flag_bounds_check if still "unspecified".
1429 1999-10-13 Andrew Haley <aph@cygnus.com>
1431 * class.c (finish_struct_1): Force alignment of non-bitfields to
1434 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
1436 * typeck2.c (process_init_constructor): Handle empty constructors.
1438 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
1440 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
1442 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
1445 1999-10-13 Mark Mitchell <mark@codesourcery.com>
1447 * decl.c (make_rtl_for_local_static): Don't create register RTL
1448 for addressable constants.
1450 1999-10-13 Nathan Sidwell <nathan@acm.org>
1452 * cp-tree.h (build_x_va_arg): Prototype new function.
1453 * call.c (build_x_va_arg): Define it.
1454 * parse.y (unary_expr): Call build_x_va_arg.
1456 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
1457 * call.c (convert_type_from_ellipsis): Define it.
1458 * decl.c (init_decl_processing): Set lang_type_promotes_to.
1460 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
1462 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
1464 * class.c (fixed_type_or_null): Always set *nonnull.
1466 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1468 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
1469 __GNUC__ and __GNUC_MINOR__.
1471 1999-10-09 Mark Mitchell <mark@codesourcery.com>
1473 * cp-tree.h (make_rtl_for_local_static): New function.
1474 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
1476 (make_rtl_for_local_static): Here.
1477 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
1479 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1481 * method.c: Include tm_p.h.
1483 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1485 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
1486 * lex.c (cp_make_lake_type): Likewise.
1487 * tree.c (init_tree): Init make_lang_type_fn.
1489 1999-10-07 Mark Mitchell <mark@codesourcery.com>
1491 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
1494 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
1495 local statics if we don't really have them.
1497 * ir.texi: Improve documentation for STMT_EXPR. Describe
1500 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
1502 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
1504 1999-10-07 Greg McGary <gkm@gnu.org>
1506 * class.c (finish_struct_1): Use simpler method of
1507 removing elements of a singly-linked list which doesn't
1508 lose for classes without data members.
1510 1999-10-07 Mark Mitchell <mark@codesourcery.com>
1512 * friend.c (make_friend_class): Robustify.
1514 * semantics.c (finish_object_call_expr): Reject calls to template
1517 1999-10-06 Mark Mitchell <mark@codesourcery.com>
1519 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
1521 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
1522 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
1524 * class.c (get_vfield_offset): Likewise.
1525 (finish_base_struct): Likewise.
1526 (modify_one_vtable): Likewise.
1527 (fixup_vtable_deltas): Likewise.
1528 (finish_struct_1): Likewise.
1529 * init.c (expand_virtual_init): Likewise.
1530 * search.c (lookup_field_1): Likewise.
1531 (expand_upcast_fixups): Likewise.
1532 * typeck.c (build_component_ref): Likewise.
1533 (build_binary_op_nodefault): Likewise.
1535 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
1536 * ir.texi: Document TYPE_VFIELD.
1538 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
1540 * decl.c (grokdeclarator): Only warn about non-zero arrays if
1541 !in_system_header (linux socketbits.h can give this for
1542 __cmsg_data, which is using a GNU extension).
1544 1999-10-05 Mark Mitchell <mark@codesourcery.com>
1546 * decl2.c (start_static_storage_duration_function): Push the
1547 function declaration so it ends up in namespace scope.
1549 * dump.c (DUMP_CHILDREN): Remove.
1550 (DUMP_BINFO): Adjust.
1551 (struct dump_node_info): Remove dump_children_p.
1552 (queue_and_dump_type): Remove dump_children_p parameter.
1553 (queue): Don't set dump_children_p.
1554 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
1555 queue_and_dump_index.
1556 (dequeue_and_dump): Unconditionally print children. Adjust calls
1557 to functions mentioned above.
1558 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
1560 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
1561 * dump.c (dequeue_and_dump): Dump them.
1563 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
1565 * decl.c (start_function): Set current_in_charge_parm for
1566 constructors, too, where appropriate.
1567 * search.c (fixup_all_virtual_upcast_offsets): New function.
1568 (expand_indirect_vtbls_init): Use it.
1570 1999-10-04 Nathan Sidwell <nathan@acm.org>
1572 * decl2.c (grok_alignof): Don't decay lvalues.
1574 * init.c (build_new): Remove unused variable.
1576 1999-10-04 Mark Mitchell <mark@codesourcery.com>
1578 * cp-tree.h (struct language_function): Remove static_labelno.
1579 (static_labelno): Remove macro.
1580 * method.c (build_overload_nested_name): Make static_labelno
1583 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
1584 to decide whether or not a function is defined.
1586 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
1587 situations where make_node will do it automatically.
1588 * decl.c (grok_reference_init): Likewise.
1589 (expand_static_init): Likewise.
1590 (do_static_initialization): Likewise.
1591 * init.c (perform_member_init): Likewise.
1592 (expand_aggr_init_1): Likewise.
1593 (build_new_1): Likewise.
1594 * method.c (do_build_copy_constructor): Likewise.
1595 (do_build_assign_ref): Likewise.
1596 * search.c (expand_upcast_fixups): Likewise.
1597 * semantics.c (finish_stmt_expr): Likewise.
1598 * typeck.c (build_unary_op): Likewise.
1599 (check_return_expr): Likewise.
1601 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
1603 * init.c (build_vec_delete_1): Fold COND_EXPRs.
1605 1999-10-03 Mark Mitchell <mark@codesourcery.com>
1607 * cp-tree.def (VEC_INIT_EXPR): Remove.
1608 * cp-tree.h (struct stmt_tree): New type.
1609 (struct saved_scope): Remove firstobj. Add x_saved_tree,
1611 (class_cache_firstobj): Remove.
1612 (struct language_function): Remove stmts_are_full_exprs_p,
1613 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
1614 (current_stmt_tree): New macro.
1615 (last_tree): Adjust.
1616 (last_expr_type): Likewise.
1617 (doing_semantic_analysis_p): Simplify.
1618 (stmts_are_full_exprs_p): Adjust.
1619 (begin_tree): Remove prototype.
1620 (end_tree): Likewise.
1621 (begin_stmt_tree): Change prototype.
1622 (finish_stmt_tree): Likewise.
1623 (building_stmt_tree): Simplify.
1624 * decl.c (mark_stmt_tree): New function.
1625 (mark_saved_scope): Use it.
1626 (start_function): Rearrange slightly to call begin_stmt_tree
1628 (save_function_data): Tweak.
1629 (finish_function): Adjust call to finish_stmt_tree.
1630 (mark_lang_function): Use mark_stmt_tree.
1631 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
1632 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
1633 (build_vec_init): Remove creation of stand-in intializer.
1634 * pt.c (begin_tree): Remove.
1635 (end_tree): Likewise.
1636 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
1637 (begin_compound_stmt): Handle a compound-statement outside of a
1639 (begin_stmt_expr): Handle a statement-expression outsidef of a
1641 (finish_stmt_expr): Likewise.
1642 (begin_class_definition): Don't call begin_tree.
1643 (finish_inline_definitions): Don't call end_tree.
1644 (begin_stmt_tree): Take a pointer to tree, not a function as input.
1645 (finish_stmt_tree): Likewise.
1646 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
1649 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
1650 * parse.c: Regenerated.
1652 * dump.c (dqueue_and_dump): Dump bitfieldness.
1654 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
1655 bitfields, rather than DECL_BIT_FIELD.
1656 * ir.texi: Document how to tell whether or not a field is a
1659 * lex.c (make_lang_type): Fix typo in comment.
1661 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
1663 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
1665 1999-10-01 Mark Mitchell <mark@codesourcery.com>
1667 * pt.c (tsubst_decl): If the type of a template instantiation is
1668 bogus, so is the whole instantiation.
1670 1999-09-30 Mark Mitchell <mark@codesourcery.com>
1672 * decl.c (initialize_local_var): Handle static variables here.
1673 (cp_finish_decl): Tweak handling of function-scope static
1675 * semantics.c (expand_stmt): Handle DECL_STMTs for static
1678 * method.c (emit_thunk): Don't crash when -fsyntax-only.
1680 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
1681 global_dtor_p. Add init_priority.
1682 (DECL_ACCESS): Adjust accordingly.
1683 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
1684 (GLOBAL_INIT_PRIORITY): Likewise.
1685 * decl.c (lang_mark_tree): Adjust accordingly.
1686 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
1687 and GLOBAL_INIT_PRIORITY.
1688 * dump.c (dequeue_and_dump): Print them.
1689 * ir.texi: Document them.
1691 * decl2.c (struct priority_info_s): Remove initialization_sequence
1692 and destruction_sequence.
1693 (start_static_storage_duration_function): Return the body of the
1694 function. Convert for function-at-a-time mode.
1695 (generate_inits_for_priority): Remove.
1696 (finish_static_storage_duration_function): Change prototype.
1697 Adjust for function-at-a-time mode.
1698 (do_static_initialization): Likewise.
1699 (do_static_destruction): Likewise.
1700 (do_static_initialization_and_destruction): Remove.
1701 (start_static_initialization_or_destruction): New function.
1702 (finish_static_initialization_or_destruction): Likewise.
1703 (get_priority_info): Don't manipulation initialization_sequence or
1704 destruction_sequence.
1705 (prune_vars_needing_no_initialization): New function.
1706 (write_out_vars): Likewise.
1707 (finish_file): Use the various new functions instead of the old.
1709 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
1711 * cp-tree.h (warn_float_equal): Declare.
1712 * decl2.c (warn_float_equal): Define.
1713 (lang_decode_option): Recognize -W[no-]float-equal.
1714 * typeck.c (build_binary_op_nodefault): Conditionally warn
1715 about equality tests of floating point types.
1717 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
1719 Support normal type_info-based EH mechanisms with -fno-rtti.
1720 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
1721 (build_eh_type_type_ref): Likewise.
1722 (build_eh_type): Remove.
1723 (expand_throw): Call build_eh_type_type, not build_eh_type.
1724 * decl2.c (import_export_decl): Don't associate the tinfo fn with
1725 the vtable if -fno-rtti.
1726 * decl.c (init_decl_processing): Always init_rtti_processing.
1728 * rtti.c (get_typeid): Don't complain about -fno-rtti.
1730 * class.c (class_cache_obstack, class_obstack): Remove.
1731 (init_class_processing): Don't initialize class_obstack.
1732 (push_cache_obstack): Remove.
1733 (pushclass): Don't call it.
1734 * cp-tree.h: Remove prototype for push_cache_obstack.
1735 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
1736 (pushlevel_class): Don't push_decl_level.
1737 (poplevel_class): Don't pop_stack_level.
1738 (push_class_level_binding): Don't push_cache_obstack.
1739 (init_decl_processing): Don't intialize decl_obstack.
1740 * search.c (push_class_decls): Don't push_cache_obstack.
1741 * tree.c (list_hash_add): Put hash node on permanent_obstack.
1742 (hash_tree_cons): Don't mess with obstacks.
1743 (print_lang_statistics): Don't print stats for class_obstack and
1746 1999-09-29 Mark Mitchell <mark@codesourcery.com>
1748 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
1749 * ir.texi: Document DECL_EXTERNAL.
1751 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
1752 * ir.texi: Document THUNK_DECLs.
1754 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
1755 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1756 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1757 * error.c (dump_template_bindings): Remove unused parameter.
1758 Handle multiple levels of template parameters.
1759 (dump_template_decl): Use `parms', not `args', for template
1760 parameters. Fix thinko.
1761 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
1762 flags to dump_template_bindings.
1763 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
1764 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1765 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1766 (tsubst_copy): Clarify variable name.
1767 (most_general_template): Robustify.
1769 1999-09-29 Nathan Sidwell <nathan@acm.org>
1771 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
1772 to change primary template rendering.
1774 1999-09-29 Mark Mitchell <mark@codesourcery.com>
1776 * cp-tree.h (UPT_TEMPLATE): Remove.
1777 (UPT_PARMS): Likewise.
1778 (DECL_NEEDED_P): New macro.
1779 * decl2.c (finish_vtable_vardecl): Use it.
1780 (finish_objects): Don't crash with -fsyntax-only.
1781 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
1783 * pt.c (tsubst_friend_function): Remove FIXME that talks about
1785 (tsubst_expr): Correct handling of function try-blocks.
1786 * semantics.c: Include flags.h.
1787 (expand_body): Don't do RTL generation if -fsyntax-only.
1788 * Makefile.in (semantics.o): Depends on flags.h.
1790 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
1792 * pt.c (most_general_template): Adjust declaration.
1794 * cp-tree.h: (most_general_template): Declare.
1796 * error.c (dump_template_value): Rename to ...
1797 (dump_template_argument): This.
1798 (dump_template_argument_list): New function.
1799 (dump_type): Use it.
1800 (dump_template_parameter): New function.
1801 (dump_template_decl): Use it.
1802 (dump_template_bindings): New function.
1803 (dump_function_decl): Use it. Pretty print function template
1806 1999-09-28 Nathan Sidwell <nathan@acm.org>
1808 * decl.c (grokdeclarator): Distinguish parameter context for
1809 diagnostics. Tidy up missing type diagnostic.
1810 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
1812 1999-09-28 Mark Mitchell <mark@codesourcery.com>
1814 * ir.texi: Improve documentation for TARGET_EXPR.
1816 1999-09-27 Nathan Sidwell <nathan@acm.org>
1818 Augment stringification of trees.
1819 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
1820 (fndecl_as_string, type_as_string_real, args_as_string,
1821 code_as_string, language_as_string, parm_as_string,
1822 op_as_string, assop_as_string, cv_as_string): Remove.
1823 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
1824 (context_as_string): Declare new function.
1825 * error.c (cp_printers): Move definition.
1827 (OB_END_TEMPLATE_ID): Adjust.
1828 (interesting_scope_p): Remove.
1829 (dump_scope): New static function.
1830 (dump_qualifiers): Adjust prototype, reimplement.
1831 (dump_template_value): Use tree_string_flags.
1832 (dump_type_real): Move back to dump_type.
1833 (dump_type): Adjust prototype. Use tree_string_flags.
1834 (dump_aggr_type): Likewise. Use dump_template_parms.
1835 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
1837 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
1838 (dump_simple_decl): Likewise.
1839 (dump_decl): Likewise. Use dump_template_decl.
1840 (dump_template_decl): New static function broken out of dump_decl.
1841 (dump_function_decl): Adjust prototype. Use tree_string_flags.
1842 (dump_parameters): Likewise. Prefix space.
1843 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
1844 (dump_function_name): Likewise. Use dump_template_parms.
1845 (dump_template_parms): New static function broken out of
1847 (dump_expr_list): Adjust prototype. Use tree_string_flags.
1848 (dump_expr): Likewise.
1849 (fndecl_as_string): Removed
1850 (type_as_string_real): Removed
1851 (dump_binary_op): Adjust prototype. Use tree_string_flags.
1852 (dump_unary_op): Likewise.
1853 (type_as_string): Likewise.
1854 (expr_as_string): Likewise.
1855 (decl_as_string): Likewise.
1856 (context_as_string): New function.
1857 (lang_decl_name): Adjust.
1858 (decl_to_string): New static print callback.
1859 (expr_to_string): Likewise.
1860 (fndecl_to_string): Likewise.
1861 (code_as_string): Renamed to ...
1862 (code_to_string): ... here. Adjust.
1863 (language_as_string): Renamed to ...
1864 (language_to_string): ... here. Adjust.
1865 (parm_as_string): Renamed to ...
1866 (parm_to_string): ... here.
1867 (op_as_string): Renamed to ...
1868 (op_to_string): ... here.
1869 (assop_as_string): Renamed to ...
1870 (assop_to_string): ... here.
1871 (type_to_string): New static print callback.
1872 (args_as_string): Renamed to ...
1873 (args_to_string): ... here. Adjust.
1874 (cv_as_string): Renamed to ...
1875 (cv_to_string): ... here. Adjust.
1876 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
1877 (print_template_context): Likewise.
1879 1999-09-26 Mark Mitchell <mark@codesourcery.com>
1881 * cp-tree.h (expand_throw): Remove prototype.
1882 * except.c (expand_throw): Make it static. Use tree-generation
1883 functions, rather than RTL-generation functions.
1884 (build_throw): Use it.
1885 * expr.c: Include except.h.
1886 (cplus_expand_expr): Don't call expand_throw here.
1887 * Makefile.in (expr.o): Depend on except.h.
1888 * ir.texi: Update documentation for THROW_EXPR.
1890 * decl.c (start_function): Set x_dont_save_pending_sizes rather
1891 than calling get_pending_sizes.
1892 * init.c (build_new): Don't save and restore
1893 immediate_size_expand; instead, assert that it has the expected
1896 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1898 * lex.c (compiler_error): Add missing call to va_end().
1900 1999-09-25 Mark Mitchell <mark@codesourcery.com>
1902 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
1903 * ir.texi: Document RESULT_DECL and DECL_RESULT.
1905 * cp-tree.h (check_return_expr): New function.
1906 * decl.c (finish_constructor_body): New function.
1907 (pushdecl): Put global friend functions in namespace binding
1908 level, not the class binding level.
1909 (finish_destructor_body): Make sure the dtor_label is always
1910 defined. Fix typo in comment.
1911 (finish_function): Move generation of constructor-termination code
1912 to semantic-analysis time. Move generation of implicit `main'
1913 return value to semantic-analysis time.
1914 * semantics.c (finish_return_stmt): Generate goto's to
1915 ctor_label/dtor_label here. Use check_return_expr to do semantic
1916 analysis on the returned expression.
1917 * typeck.c (maybe_warn_about_returning_address_of_local): New
1918 function split out from c_expand_return.
1919 (check_return_expr): Likewise.
1920 (c_expand_return): Just generate the RTL for the return.
1922 1999-09-24 Mark Mitchell <mark@codesourcery.com>
1924 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
1925 (cleanup_type): Likewise.
1926 (search_tree): Change prototype.
1927 * decl.c (local_variable_p): Adjust for new interface to
1929 (check_default_argument): Likewise.
1930 * error.c (dump_expr): Handle INIT_EXPR.
1931 * except.c (expand_throw): Don't make cleanup_type a local static.
1932 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
1933 * init.c (build_new): Call build_new_1 directly, rather than
1934 building a NEW_EXPR.
1935 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
1936 processing file-scope initializers.
1937 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
1938 * tree.c: Include splay-tree.h
1939 (no_linkage_helper): Adjust for new interface to search_tree.
1940 (search_tree): Pass around pointers to tree nodes, rather than the
1941 nodes themselves. Handle VEC_INIT_EXPR.
1942 (no_linkage_check): Adjust for new interface to search_tree.
1943 (mapcar): Handle VEC_INIT_EXPR.
1944 (target_remap): New variable.
1945 (bot_manip): Use it.
1946 (bot_replace): New function.
1947 (break_out_target_exprs): Use it to remap all variables used in a
1948 default argument expression.
1949 * typeck.c (build_modify_expr): Don't crash when outside a
1950 function and presented with an INIT_EXPR assignment
1951 * Makefile.in (tree.o): Depend on splay-tree.h.
1953 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
1955 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
1957 (builtin_function): New arg CLASS. Arg CODE now of type int. All
1959 Set the builtin's DECL_BUILT_IN_CLASS.
1961 1999-09-24 Mark Mitchell <mark@codesourcery.com>
1963 * decl.c (pushdecl): Don't make local declarations of extern
1964 variables give the variable a DECL_CONTEXT for the function.
1965 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
1966 Don't accidentally make RTL for local declarations.
1967 (emit_local_var): Handle declarations with asm-specifiers here.
1969 1999-09-23 Mark Mitchell <mark@codesourcery.com>
1971 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
1972 STMT_IS_FULL_EXPR_P.
1974 * cp-tree.h (language_function): Add cannot_inline.
1975 * decl.c (start_function): Restore current_function_cannot_inline
1976 from the saved value.
1977 (save_function_data): Save current_function_cannot_inline.
1978 * decl2.c (start_objects): Change prototype. Build the function
1979 in function-at-a-time mode.
1980 (finish_objects): Likewise.
1981 (generate_ctor_or_dtor_function): Adjust accordingly.
1983 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
1984 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
1985 Don't call expand_anon_union_decl here
1986 * semantics.c (exapnd_stmt): Call it here, instead.
1987 * typeck.c (mark_addressable): Addressed variables are implicitly
1990 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1992 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
1993 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
1994 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
1995 * cp-tree.h: Add tree checking macros to various tree access
1997 * ptree.c (print_lang_decl): Test for function or variable
1998 before accessing template info.
2000 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
2002 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
2003 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
2004 * decl2.c (lang_f_options): Add -fshort-wchar.
2005 * cp-tree.h: Declare flag_short_wchar.
2006 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
2009 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2011 * ir.texi: Fix formatting errors and typos.
2013 1999-09-22 Mark Mitchell <mark@codesourcery.com>
2015 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
2017 * decl.c (pushdecl): Do create a binding for extern "C" functions,
2018 but not for their DECL_ASSEMBLER_NAMEs.
2019 (lookup_name_current_level): Fix formatting.
2020 (xref_tag): Likewise.
2021 * decl2.c (start_objects): Mark static constructors and
2022 destructors as used.
2024 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
2026 * decl.c (define_case_label): Don't crash if we're not in a switch.
2028 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
2029 * lang-options.h: Restore -fthis-is-variable. Remove help strings
2030 for unsupported flags.
2032 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
2034 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
2035 Accept and warn about -fthis-is-variable.
2037 1999-09-21 Mark Mitchell <mark@codesourcery.com>
2039 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
2040 CLEANUP_STMT, and SCOPE_STMT.
2042 * decl2.c (lang_decode_option): Adjust, in the wake of recent
2043 changes to option processing.
2045 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2047 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
2048 function pointer from pmfs with no object given.
2049 (convert_for_assignment): Do not return error when converting
2052 1999-09-21 Alex Samuel <samuel@codesourcery.com>
2054 * lex.c (internal_filename): New variable.
2055 (INTERNAL_FILENAME): New macro.
2056 (init_parse): Allocate internal_filename and mark as root. Use it
2057 instead of a string constant.
2059 1999-09-21 Nathan Sidwell <nathan@acm.org>
2061 Reimplement dynamic cast and catch matching.
2062 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
2063 * search.c (dynamic_cast_base_recurse): New function.
2064 (get_dynamic_cast_base_type): New function for dynamic cast.
2065 * rtti.c (build_dynamic_cast_1): Determine source and target
2066 class relationship. Call __dynamic_cast_2.
2067 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
2068 (__user_type_info::dyncast): New dynamic cast dispatcher.
2069 (__user_type_info::sub_kind): New nested enumeration.
2070 (__user_type_info::contained_p): sub_kind predicate.
2071 (__user_type_info::contained_public_p): Likewise.
2072 (__user_type_info::contained_nonpublic_p): Likewise.
2073 (__user_type_info::contained_nonvirtual_p: Likewise.
2074 (__user_type_info::upcast_result): New nested struct.
2075 (__user_type_info::dyncast_result): New nested struct.
2076 (*::do_upcast): New catch function.
2077 (*::do_dyncast): New dynamic cast function.
2078 (__user_type_info::find_public_subobj): New dynamic cast
2080 (*::do_find_public_subobj): New dynamic cast helper function.
2081 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
2082 (__user_type_info::dyncast): Define dynamic cast dispatcher.
2083 (*::do_upcast): Define catch function.
2084 (*::do_dyncast): Define dynamic cast function.
2085 (*::do_find_public_subobj): Define dynamic cast helper function.
2086 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
2087 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
2088 (__dynamic_cast_2): New dynamic cast runtime.
2090 1999-09-20 Mark Mitchell <mark@codesourcery.com>
2092 * cp-tree.h (finish_stmt_expr): Change prototype.
2093 * expr.c (cplus_expand_expr): Adjust call accordingly.
2094 * init.c (finish_init_stmts): Likewise.
2095 * parse.y (primary): Likewise.
2096 * pt.c (tsubst_copy): Likewise.
2097 * semantics.c (finish_stmt_expr): Don't take two parameters.
2098 Don't remove generated BLOCKs from the block-tree.
2100 Remove support for assigning to `this'.
2101 * NEWS: Note that fact.
2102 * class.c (build_vbase_path): Don't check flag_this_is_variable.
2103 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
2104 (language_function): Remove assigns_this, just_assigned_this, and
2105 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
2106 (base_init_expr): Remove.
2107 (current_vcalls_possible_p): New macro.
2108 (vtbls_set_up_p): Likewise.
2109 (emit_base_init): Change prototype.
2110 * decl.c (finish_destructor_body): New function, split out from
2112 (current_function_assigns_this): Remove.
2113 (current_function_just_assigned_this): Likewise.
2114 (start_function): Don't set them.
2115 (finish_function): Don't check them. Don't emit
2116 base-initialization code here. Generate code for destructors when
2117 doing semantic analysis.
2118 (finish_stmt): Don't check current_function_just_assigned_this.
2119 * decl2.c (lang_f_options): Remove this-is-variable.
2120 (lang_decode_option): Likewise.
2121 (grokclassfn): Don't check flag_this_is_variable.
2122 * init.c (emit_base_init): Return the expression generated.
2123 (construct_virtual_bases): Don't push/pop obstacks. Fix
2125 (build_new_1): Don't check flag_this_is_variable.
2126 (get_temp_regvar): Don't set DECL_REGISTER.
2127 (build_vec_init): Don't call use_variable.
2128 * lang-options.h: Remove "-fthis-is-variable" and
2129 "-fno-this-is-variable".
2130 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
2131 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
2133 * semantics.c (finish_expr_stmt_real): Rename to ...
2134 (finish_expr_stmt): This. Remove assigned_this parameter.
2135 (begin_if_stmt): Call do_pushlevel before starting the statement.
2136 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
2138 (setup_vtbl_ptr): Emit initialization code for bases and members
2139 at semantic-analysis time. Emit code to initialize vtables in
2141 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
2142 Don't handle CTOR_INITIALIZER any more.
2143 * typeck.c (build_modify_expr): Don't check for assignments to
2145 (c_expand_return): Don't suggest assigning to `this'.
2147 * Makefile.in (decl.o): Depend on RTL_H.
2148 (decl2.o): Likewise.
2149 (class.o): Likewise.
2151 (method.o): Likewise.
2152 (search.o): Likewise.
2156 * decl.c (duplicate_decls): When a builtin function is redeclared
2157 as static, make sure it is mangled correctly.
2159 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
2160 detail about the statement-tree.
2162 1999-09-20 Nathan Sidwell <nathan@acm.org>
2164 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
2166 1999-09-20 Nick Clifton <nickc@cygnus.com>
2168 * decl2.c (lang_decode_option): Extend comment.
2170 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2172 * typeck.c: Include "tm_p.h".
2174 1999-09-19 Mark Mitchell <mark@codesourcery.com>
2176 * ir.texi: New file.
2178 1999-09-19 Paul Burchard <burchard@pobox.com>
2180 * semantics.c (expand_stmt): Initialize return value.
2182 1999-09-18 Paul Burchard <burchard@pobox.com>
2184 * gxxint.texi: G++ now implements namespaces.
2186 1999-09-18 Mark Mitchell <mark@codesourcery.com>
2188 * decl.c (pop_label): Don't warn about unused labels more than
2190 * semantics.c (finish_goto_stmt): Always marked used labels as
2193 * decl.c (layout_var_decl): Change prototype. Call layout_decl
2194 even when the declaration is external.
2195 (cp_finish_decl): Adjust call to layout_var_decl.
2196 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
2198 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
2200 * typeck.c (get_member_function_from_ptrfunc): Always consider
2201 virtuality inside member pointer.
2203 1999-09-17 Mark Mitchell <mark@codesourcery.com>
2205 Turn on function-at-a-time processing.
2206 * cp-tree.h (doing_semantic_analysis_p): New macro.
2207 (SF_DEFAULT): Define to zero, not SF_EXPAND.
2208 (start_handler_parms): Change prototype.
2209 (expand_start_catch_block): Likewise.
2210 (expand_end_catch_block): Likewise.
2211 (expand_start_eh_spec): Likewise.
2212 (expand_end_eh_spec): Declare.
2213 (finish_handler_parms): Change prototype.
2214 (begin_catch_block): Declare.
2215 (finish_handler): Change prototype.
2216 (do_pushlevel): Declare.
2217 (do_poplevel): Likewise.
2218 * decl.c (pushlevel): Don't create
2219 binding levels when not doing semantic analysis.
2220 (poplevel): Don't pop them.
2221 (pushdecl): Assert that we are never called when not doing
2223 (pushdecl_top_level): Use push_to_top_level.
2224 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
2225 label when expanding.
2226 (cp_finish_decl): Only inject for-scope variables when doing
2227 semantic analysis. Add comments.
2228 (start_handler_parms): Return the handler parm.
2229 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
2230 already set. Reinitialize from saved function data if available.
2231 Don't pushlevel when not doing semantic analysis.
2232 (store_parm_decls): Only generate RTL when expanding. Only
2233 pushdecl when doing semantic analysis. Set
2234 current_eh_spec_try_block if appropriate.
2235 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
2236 Combine common code. Don't poplevel when not doing semantic
2238 (push_cp_function_context): Don't expand functions without an
2239 explicit call to expand_body.
2240 (mark_lang_function): Make eh_spec_try_block and
2242 * except.c (expand_end_eh_spec): Don't
2244 (process_start_catch_block): Likewise.
2245 (push_eh_cleanup): Use finish_decl_cleanup.
2246 (initialize_handler_parm): New function.
2247 (expand_start_catch_block): Use it.
2248 (expand_end_catch_block): Use tree-generation functions, not
2249 RTL-generation functions.
2250 (expand_start_eh_spec): Likewise.
2251 (expand_end_eh_spec): Likewise.
2252 (expand_exception_blocks): Simplify.
2253 (start_anon_func): Use do_pushlevel.
2254 (end_anon_func): Use do_poplvel. Call expand_body for the
2256 * expr.c (do_case): Don't call define_case_label.
2257 * init.c (create_temporary_var): Set DECL_CONTEXT for local
2259 * method.c (emit_thunk): Call expand_body for the
2261 (sythesize_method): Likewise.
2262 * parse.y (handler_args): Give it ttype.
2263 (eat_saved_input): Call expand_body.
2264 (base_init): Use do_pushlevel.
2265 (pending_inline): Call expand_body.
2266 (handler): Adjust calls to finish_handler_parms and
2268 (handler_args): Don't call expand_start_catch_block. Return the
2269 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
2270 * parse.c: Regenerated.
2271 * rtti.c (synthesize_tinfo_fn): Call finish_function.
2272 * semantics.c (do_pushlevel): Give it external linkage. Build
2274 (do_poplevel): Likewise.
2275 (finish_case_label): Call define_case_label when doing semantic
2277 (finish_goto_stmt): Create RTL for labels.
2278 (finish_function_try_block): Set in_function_try_handler
2280 (finish_function_handler_sequence): Unset it.
2281 (finish_handler_parms): Use expand_start_catch_block even when
2282 building a statement-tree.
2283 (begin_catch_block): New function.
2284 (finish_handler): Move a little RTL-generation logic here.
2285 (finish_decl_cleanup): Allow cleanups for empty declarations.
2286 (finish_named_return_value): Don't pushdecl when not doing
2288 (expand_stmt): Don't do semantic analysis for variable
2289 declarations. Handle START_CATCH_STMT. Call expand_label
2290 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
2291 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
2292 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
2293 RETURN_INIT and function try blocks.
2295 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
2296 x_scope_stmt_stack. Add x_in_charge_parm.
2297 (current_eh_spec_try_block): New macro.
2298 (current_scope_stmt_stack): Likewise.
2299 (current_in_charge_parm): Likewise.
2300 * decl.c (start_function): Initialize current_in_charge_parm.
2301 (finish_function): Use current_in_charge_parm rather than looking
2303 * search.c (expand_indirect_vtbls_init): Likewise.
2305 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
2306 (TRY_BLOCK): Likewise.
2307 (HANDLER): Likewise.
2308 (START_CATCH_STMT): New tree node.
2309 (SCOPE_STMT): Likewise.
2310 * cp-tree.h (SCOPE_BEGIN_P): New macro.
2311 (SCOPE_NULLIFIED_P): Likewise.
2312 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
2313 (struct lang_decl): Add saved_language_function.
2314 (DECL_PENDING_INLINE_INFO): Adjust documentation.
2315 (DECL_PENDING_INLINE_P): New macro.
2316 (TYPE_TI_ARGS): Fix typo in comment.
2317 (DECL_SAVED_TREE): Add to documentation.
2318 (DECL_SAVED_FUNCTION_DATA): New macro.
2319 (START_CATCH_TYPE): Likewise.
2320 (SCOPE_END_P): New macro.
2321 (declare_parm_level): Don't declare.
2322 * decl.c (mark_lang_function): New function, split out from
2323 mark_cp_function_context.
2324 (save_function_data): New function.
2325 (declare_parm_level): Remove.
2326 (finish_function): Use save_function_data to squirrel away
2327 important stuff for later use.
2328 (mark_cp_function_context): Use mark_function_data.
2329 (lang_mark_tree): Likewise.
2330 * lex.c (begin_definition_of_inclass_inline): Set
2331 DECL_PENDING_INLINE_P.
2332 (store_pending_inline): Clear it.
2333 * pt.c (tsubst_decl): Likewise.
2335 1999-09-17 Nathan Sidwell <nathan@acm.org>
2337 * call.c (perform_implicit_conversion): Deal with error_mark_node.
2339 1999-09-17 Mark Mitchell <mark@codesourcery.com>
2341 * decl.c (warn_extern_redeclared_static): Don't get confused by
2342 static member functions.
2343 (duplicate_decls): Merge DECL_THIS_STATIC.
2345 * decl.c (expand_static_init): Make sure assignments to local
2346 statics actually occur.
2348 1999-09-17 Mark Mitchell <mark@codesourcery.com>
2350 * cp-tree.h (poplevel_class): Declare.
2351 * class.c (popclass): Use poplevel_class, not poplevel.
2352 * decl.c (poplevel_class): Don't make it static. Don't return a
2354 (poplevel): Don't call poplevel_class; abort in a class
2355 binding level is seen.
2356 * semantics.c (finish_translation_unit): Use pop_everything.
2357 * parse.y (member_init): Allow errors.
2358 (pending_inline): Call finish_function.
2359 * parse.c: Regenerated.
2360 * Makefile.in (CONFLICTS): Adjust.
2362 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
2364 * error.c: Reduce code duplication.
2365 (dump_template_value): New function.
2366 (dump_type_real): Use it.
2367 (dump_decl): Likewise.
2368 (dump_function_name): Likewise.
2369 (dump_function_decl): Don't be too talkative about function return
2372 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2374 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
2376 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
2378 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
2380 * decl2.c (finish_file): Also call check_global_declarations for
2381 the pending_statics list.
2383 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
2385 * lex.c (cp_pragma_implementation): Allow #pragma implementation
2388 1999-09-15 Richard Henderson <rth@cygnus.com>
2390 * lex.c (mark_impl_file_chain): Follow the next chain.
2392 1999-09-15 Mark Mitchell <mark@codesourcery.com>
2394 * decl.c (warn_extern_redeclared_static): Simplify. Catch
2395 problems with extern "C" functions redeclared as static.
2396 (duplicate_decls): When a builtin is redeclared static, make the
2397 new function have internal linkage.
2399 1999-09-15 Mark Mitchell <mark@codesourcery.com>
2401 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
2402 * pt.c (tsubst_copy): Likewise.
2403 * tree.c (search_tree): Likewise.
2406 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2408 * typeck2.c (ack): Don't declare progname.
2410 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
2412 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
2413 filenames with ggc_alloc_string.
2415 1999-09-14 Mark Mitchell <mark@codesourcery.com>
2417 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
2419 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
2421 * cvt.c (build_up_reference): Likewise.
2422 * tree.c (build_cplus_new): Likewise.
2423 (get_target_expr): Likewise.
2425 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
2427 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
2429 1999-09-13 Mark Mitchell <mark@codesourcery.com>
2431 * cp-tree.h (build_target_expr): New function.
2432 * call.c (build_conditional_expr): Use build_target_expr.
2433 (convert_like): Likewise.
2434 (build_over_call): Likewise.
2435 * cvt.c (build_up_reference): Likewise.
2436 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
2437 (destroy_local_var): Here.
2438 (build_target_expr): New function.
2439 * tree.c (build_cplus_new): Use it.
2440 (get_target_expr): Likewise.
2442 1999-09-13 Nathan Sidwell <nathan@acm.org>
2444 * typeck.c (expr_sizeof): Don't decay arrays and functions.
2445 Remove misleading comment.
2446 (build_compound_expr): Don't decay arrays.
2448 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
2450 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
2451 class rvalues again.
2453 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2455 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
2457 * g++spec.c: Include gcc.h.
2458 (lang_specific_driver): Constify a char*. Call xcalloc, not
2459 xmalloc/bzero. All calls to the function pointer parameter now
2460 explicitly call `fatal'.
2462 1999-09-12 Mark Mitchell <mark@codesourcery.com>
2464 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
2465 * cvt.c (ocp_convert): Complete the from and destination types.
2466 Adjust warning about functions always being `true' in conditionals.
2467 * decl.c (duplicate_decls): Don't play funny games with abort.
2468 * error.c (dump_expr): Handle OVERLOADs.
2469 * spew.c (probe_obstack): Remove.
2470 * typeck.c (condition_conversion): Use perform_implicit_conversion.
2472 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
2474 * cp-tree.h (auto_function, define_function): Adjust prototypes.
2475 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
2477 (auto_function): Likewise, for CODE arg.
2478 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
2479 (builtin_function): ... here.
2481 1999-09-11 Mark Mitchell <mark@codesourcery.com>
2483 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
2484 (init_decl_processing): Don't set TREE_PERMANENT for the
2486 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
2487 (grokdeclarator): Likewise.
2488 (grokparms): Don't check TREE_PERMANENT when building up lists.
2489 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
2490 (mark_inline_for_output): Likewise.
2491 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
2492 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
2493 * lex.c (check_newline): Don't check ggc_p; it is always one.
2494 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
2495 * spew.c (yylex): Don't copy_node or probe_obstacks for
2496 non-permanent CONSTANTs and STRINGs.
2497 * tree.c (build_cplus_array_type_1): Don't fuss with
2498 TREE_PERMANENT on ARRAY_TYPEs.
2500 * cp-tree.def (CLEANUP_STMT): New node.
2501 * cp-tree.h (language_function): Add name_declared.
2502 (current_function_name_declared): New macro.
2503 (CLEANUP_DECL): New macro.
2504 (CLEANUP_EXPR): Likewise.
2505 (emit_local_var): Likewise.
2506 (finish_decl_cleanup): New function.
2507 * cvt.c (build_up_reference): Simplify.
2508 (ocp_convert): Remove dead code.
2509 * decl.c (start_decl): Remove call to add_decl_stmt.
2510 (grok_reference_init): Adjust, to handle bindings temporaries to
2511 references. Remove dead code.
2512 (initialize_local_var): Don't generate RTL for
2513 declarations here, or build cleanups here. Don't fuss with
2514 obstacks. Replace expand_start_target_temps calls with explicit
2515 setting of stms_are_full_exprs_p.
2516 (destroy_local_var): New function.
2517 (emit_local_var): Likewise.
2518 (cp_finish_decl): Use them, as appropriate.
2519 (start_function): Announce template functions.
2520 (store_parm_decls): Don't call declare_function_name here.
2521 (finish_stmt): Don't start emit base-initialization code when just
2522 building the statement-tree.
2523 * init.c (create_temporary_var): Move add_decl_stmt call ...
2524 (get_temp_regvar): Here.
2525 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
2526 cp_finish_decl would expect. Don't call add_decl_stmt.
2527 * semantics.c (begin_compound_stmt): Call declare_function_name,
2529 (finish_decl_cleanup): New function.
2530 (expand_stmt): Use emit_local_var to output variables.
2531 (expand_body): Set current_funtion_name_declared.
2533 1999-09-10 Mark Mitchell <mark@codesourcery.com>
2535 * cp-tree.h (finish_cleanup_try_block): New function.
2536 * semantics.c (finish_cleanup_try_block): Add comment.
2538 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2540 * cp-tree.h: Delete declarations for all tree nodes now moved to
2542 * decl.c: Delete their definitions.
2543 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
2544 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
2546 (init_decl_processing): Call build_common_tree_nodes and
2547 build_common_tree_nodes_2 instead of building their nodes here.
2548 Don't add gc roots for them.
2550 1999-09-10 Mark Mitchell <mark@codesourcery.com>
2552 * cp-tree.h (language_function): Rename expanding_p to
2553 x_expanding_p. Rename named_label_uses to x_named_label_uses.
2554 (expanding_p): Adjust accordingly.
2555 (TREE_VIA_PRIVATE): Fix typo in comment.
2556 (DECL_REFERENCE_SLOT): Remove.
2557 (SET_DECL_REFERENCE_SLOT): Likewise.
2558 * decl.c (named_label_uses): Adjust. Remove chicken comment.
2559 (push_overloaded_decl): Don't truncate the chain of bindings when
2560 adding an overloaded function.
2561 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
2562 (initialize_local_var): Fix typo in comment.
2563 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
2564 * decl2.c (start_objects): Make the fact that we are expanding
2565 the generated function right away explicit.
2566 (start_static_storage_duration_function): Likewise.
2567 (finish_file): Fix typo in comment.
2568 * init.c (build_vec_init): Correct bugs in handling cleanups.
2569 * semantics.c (maybe_convert_cond): New function.
2570 (FINISH_COND): Always store the condition, even if there's
2572 (finish_if_stmt_cond): Use maybe_convert_cond.
2573 (finish_while_stmt_cond): Likewise.
2574 (finish_do_stmt): Likewise.
2575 (finish_for_cond): Likewise.
2576 (expand_cond): Adjust.
2578 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
2579 * init.c (perform_member_init): Remove obstack machinations.
2580 (expand_cleanup_for_base): Likewise.
2581 (finish_init_stmts): Mark the statement-expression as used.
2582 * method.c (emit_thunk): Use tree-generating functions, not
2584 (do_build_copy_constructor): Likewise.
2585 (do_build_assign_ref): Likewise.
2586 (synthesize_method): Likewise. Keep track of line numbers.
2587 * pt.c (tsubst_expr): Handle various kinds of try blocks.
2588 * semantics.c (expand_stmts): Remove.
2589 (begin_function_try_block): Set FN_TRY_BLOCK_P.
2590 (finish_function_try_block): Be careful rechaining
2591 function try blocks.
2592 (expand_stmt): Loop through all the statements at a given level.
2593 (exapnd_body): Be careful with line-numbers here too. Prepare for
2594 being called directly from the parser.
2596 * cp-tree.h (finish_function): Adjust prototype.
2597 * decl.c (finish_function): Return the function compiled.
2598 * pt.c (instantiate_decl): Don't play games with obstacks.
2599 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
2600 (search_tree): Likewise.
2601 * typeck.c: Fix typo in comment.
2602 * typeck2.c (store_init_value): Add comment.
2604 * cp-tree.h (CPTI_ATEXIT): New macro.
2605 (atexit_node): Likewise.
2606 * decl.c (destroy_local_static): New function, broken out from ...
2607 (expand_static_init): Here.
2609 * rtti.c (get_tinfo_var): These should always be global
2610 (expand_si_desc): Use tree, not RTL, functions to generate code.
2611 (expand_class_desc): Likewise.
2612 (expand_ptr_desc): Likewise.
2613 (expand_attr_desc): Likewise.
2614 (expand_generic_desc): Likewise.
2615 (synthesize_tinfo_fn): Likewise.
2617 1999-09-09 Mark Mitchell <mark@codesourcery.com>
2619 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
2620 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
2622 (RECHAIN_STMST_FROM_CHAIN): Likewise.
2624 * parse.y (simple_stmt): Fix typo in last change.
2626 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
2627 (STMT_IS_FULL_EXPR_P): Likewise.
2628 (STMT_LINENO_FOR_FN_P): Likewise.
2629 (prep_stmt): New function.
2630 (building_stmt_tree): Tweak for safety.
2631 * pt.c (tsubst_expr): Use prep_stmt throughout.
2632 (add_tree): Move it to semantics.c
2633 * semantics.c (add_tree): Move it here.
2634 (finish_expr_stmt_real): New function.
2635 (finish_expr_stmt): Use it.
2636 (finish_if_stmt_cond): Use FINISH_COND.
2637 (finish_while_stmt_cond): Likewise.
2638 (finish_for_cond): Likewise.
2639 (finish_stmt_tree): Tweak line-number handling.
2640 (prep_stmt): New function.
2641 (expand_stmt): Use it.
2643 * cp-tree.h (begin_switch_stmt): Adjust prototype.
2644 (finish_switch_cond): Likewise.
2645 * parse.y (simple_stmt): Adjust accordingly.
2646 * parse.c: Regenerated.
2647 * pt.c (tsubst_expr): Adjust accordingly.
2648 * semantics.c (expand_cond): New function.
2649 (FINISH_COND): New macro.
2650 (begin_switch_stmt): Build the SWITCH_STMT here.
2651 (finish_switch_stmt_cond): Not here.
2652 (expand_stmt): Adjust calls to begin_switch_stmt and
2653 finish_switch_cond. Use expand_cond throughout.
2655 * dump.c (dequeue_and_dump): Dump types for constants.
2656 Describe DECL_ARG_TYPE more intuitively.
2659 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
2660 (lang_cleanup_tree): Remove.
2661 * lex.c (make_lang_type): Use ggc_alloc to allocate
2664 Reorganize per-function data.
2665 * cp-tree.h (saved_scope): Add function_decl, bindings.
2666 (language_function): Rename binding_level to bindings.
2667 (cp_function_chain): Use the current_function, not the
2668 outer_function_chain.
2669 (current_class_ptr): Make it work, even when there's no
2671 (current_class_ref): Likewise.
2672 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
2674 (clear_temp_name): Remove.
2675 * decl.c (check_function_type): New function, broken out from
2677 (current_binding_level): Adjust definition.
2678 (pushlevel): Simplify.
2679 (poplevel): Don't use named_label_uses when we're outside
2681 (mark_saved_scope): Mark function_decl and bindings.
2682 (maybe_push_to_top_level): Don't unconditionally push a new
2683 function context. Save bindings and the current_function_decl.
2684 Don't clear named_labels.
2685 (pop_from_top_level): Pop function context if appropriate.
2686 (init_decl_processing): Set init_lang_status and free_lang_status,
2687 rather than save_lang_status and restore_lang_status.
2688 (start_function): Take SF_* flags. Don't clear per-function data.
2689 Reorder and simplify to use new per-function data code. Add
2691 (store_parm_decls): Don't call init_function_start here.
2692 (finish_function): Adjust for new handling of per-function data.
2693 (push_cp_function_context): Simplify.
2694 (mark_cp_function_context): Change binding_level to bindings.
2695 * decl2.c (clear_temp_name): Remove.
2696 (start_objects): Use SF flags to start_function.
2697 (start_static_storage_duration_function): Likewise.
2698 * except.c (start_anon_func): Remove redundant calls to
2699 push_function_context_to. Use SF flags to start function.
2700 (end_anon_func): Remove redundant call to pop_function_context
2702 * lex.c (reinit_parse_for_function): Don't initialize per-function
2704 * method.c (emit_thunk): Clear current_function after calling
2705 assemble_end_function. Use SF flags for start_function.
2706 (synthesize_method): Use SF flags for start_function.
2707 * parse.c: Regenerated.
2708 * parse.y (fn.defpen): Likewise.
2709 (pending_inline): Clear current_function, even if something goes
2711 * pt.c (instantiate_decl): Use SF flags to start_function.
2712 Don't save and restore expanding_p.
2713 (add_tree): Handle the case where we are outside any function.
2714 (end_tree): Likewise.
2715 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
2716 * semantics.c (begin_function_definition): Likewise.
2717 (expand_body): Likewise.
2719 1999-09-09 Nathan Sidwell <nathan@acm.org>
2721 * cp-tree.h (convert_to_void): Prototype new function.
2722 (require_complete_type_in_void): Remove prototype.
2723 * cvt.c (convert_to_void): New function.
2724 (ocp_convert): Use convert_to_void.
2725 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
2727 * typeck.c (require_complete_type_in_void): Remove function.
2728 (build_compound_expr): Use convert_to_void.
2729 (build_static_cast): Likewise.
2730 (build_c_cast): Likewise.
2731 * semantics.c (finish_expr_stmt): Do not decay full expressions.
2733 * typeck.c (build_x_compound_expr): Add FIXME.
2735 1999-09-08 Mark Mitchell <mark@codesourcery.com>
2737 * cp-tree.h (scratch_tree_cons): Remove.
2738 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
2739 and perm_tree_cons with plain tree_cons.
2740 * class.c: Likewise.
2742 * decl2.c: Likewise.
2743 * except.c: Likewise.
2747 * method.c: Likewise.
2748 * parse.y: Likewise.
2752 * search.c: Likewise.
2753 * typeck.c: Likewise.
2754 * parse.c: Regenerated.
2755 * tree.c (build_srcloc): Simplify.
2757 1999-09-08 Mark Mitchell <mark@codesourcery.com>
2759 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
2761 (LANG_DECL_PERMANENT): Remove.
2762 * decl.c (duplicate_decls): Don't mess about with obstacks trying
2764 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
2765 * lex.c (free_lang_decl_chain): Remove.
2766 (build_lang_decl): Don't use obstacks.
2767 (retrofit_lang_decl): Likewise.
2768 (copy_lang_decl): Likewise.
2770 * cp-tree.h (saved_scope): Remove old_binding_level and
2771 function_decl. Tidy up.
2772 * decl.c (mark_saved_scope): Don't set them.
2773 (maybe_push_to_top_level): Clear memory.
2775 * decl.c (layout_var_decl): Change prototype. Don't complete
2776 types for external objects.
2777 (check_initializer): Likewise. Tidy.
2778 (initialize_local_var): Complete types here.
2779 (cp_finish_decl): Not here. Reorganize a little.
2780 (grokvardecl): Don't complete types here.
2782 * decl.c (start_function): Clear last_dtor_insn and
2783 last_parm_cleanup_insn.
2784 (push_cp_function_context): Just copy over a little of
2785 the old context, not all of it.
2787 * cp-tree.h (copy_to_permanent): Remove.
2788 (permanent_p): Likewise.
2789 * decl.c (building_typename_type): Don't use copy_to_permanent.
2790 (start_decl): Likewise.
2791 (grok_reference_init): Likewise.
2792 (cp_finish_decl): Likewise.
2793 * init.c (build_new_1): Don't use mapcar.
2794 (build_vec_delete_1): Don't use copy_to_permanent.
2795 (build_vec_init): Likewise.
2796 * parse.y (primary): Likewise.
2797 * parse.c: Regenerated.
2798 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
2799 (lookup_template_class): Likewise.
2800 (tsubst_friend_function): Likewise.
2801 (instantiate_class_template): Likewise.
2802 (tsubst_decl): Likewise.
2804 (instantiate_template): Likewise.
2806 * rtti.c (get_tinfo_fn): Likewise.
2807 (build_dynamic_cast): Likewise.
2808 * semantics.c (finish_if_stmt_cond): Likewise.
2809 (finish_while_stmt_cond): Likewise.
2810 (finish_do_stmt): Likewise.
2811 (finish_for_cond): Likewise.
2812 (finish_for_expr): Likewise.
2813 (finish_cleanup): Likewise.
2814 (add_decl_stmt): Likewise.
2815 (finish_named_return_value): Likewise.
2816 (finish_qualified_call_expr): Likewise.
2817 * tree.c (perm_manip): Remove.
2818 (build_exception_variant): Don't use copy_to_permanent.
2819 (permanent_p): Remove.
2820 (copy_to_permament): Remove.
2821 (build_min_nt): Don't use copy_to_permanent.
2822 (build_min): Likewise.
2823 (min_tree_cons): Likewise.
2824 * typeckc.c (build_static_cast): Likewise.
2825 (build_reinterpret_cast): Likewise.
2826 (build_const_cast): Likewise.
2828 1999-09-07 Mark Mitchell <mark@codesourcery.com>
2830 * decl.c (ggc_p): Set it to 1.
2831 (mark_saved_scope): Add prototype.
2833 1999-09-07 Richard Henderson <rth@cygnus.com>
2835 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
2836 * typeck.c (self_promoting_args_p): Delete.
2838 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
2840 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
2841 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
2843 1999-09-07 Mark Mitchell <mark@codesourcery.com>
2845 * Makefile.in (tree.o): Depend on ggc.h.
2846 * class.c (make_method_vec): Remove.
2847 (free_method_vec): Likewise.
2848 (free_method_vecs): Remove.
2849 (add_method): Don't use them.
2850 * cp-tree.def (PTRMEM_CST): Make it longer.
2851 (TEMPLATE_PARM_INDEX): Make it shorter.
2852 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
2853 (template_parm_index): Remove RTL field.
2854 (ptrmem_cst): Add RTL field.
2855 (finish_function): Removed parameter.
2856 (process_next_inline): Change prototype.
2857 (init_cplus_unsave): Rename to init_tree.
2858 (binding_init): Remove.
2859 * decl.c (free_binding_nodes): Remove.
2860 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
2861 (pop_binding): Don't use free_binding_nodes.
2862 (free_binding_vecs): Remove.
2863 (store_bindings): Don't use them.
2864 (pop_from_top_level): Likewise.
2865 (lookup_namespace_name): Simplify.
2866 (build_typename_type): Don't use obstack_free.
2867 (unqualified_namespace_lookup): Simplify.
2868 (lookup_name_real): Simplify.
2869 (start_function): Remove comment about leaks.
2870 (finish_function): Removed nested parameter. Call
2871 expand_end_bindings even when building_stmt_tree.
2872 Call ggc_push_context and ggc_pop_context around
2873 rest_of_compilation, if necessary.
2874 (mark_cp_function_context): Handle a NULL language-context.
2875 (lang_mark_false_label_stack): Fix typo.
2876 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
2877 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
2878 pointer to method types.
2879 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
2880 * decl2.c (finish_objects): Adjust call to finish_function.
2881 (finish_static_store_duration_function): Likewise.
2882 (do_nonmember_using_decl): Remove call to binding_init.
2883 * except.c (end_anon_func): Adjust call to finish_function.
2884 * lex.c (mark_impl_file_chain): New function.
2885 (init_parse): Call init_tree, not init_cplus_unsave.
2887 (cp_pramga_interface): Use xmalloc, not permalloc.
2888 (cp_pragma_implementation): Likewise.
2889 (begin_definition_of_inclass_inline): Simplify.
2890 (process_next_inline): Adjust prototype.
2891 (do_scoped_id): Don't call binding_init.
2892 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
2893 * method.c (emit_thunk): Adjust call to finish_function.
2894 (synthesize_method): Likewise.
2895 * parse.y (%union): Add a new `pi' variant.
2896 (PRE_PARSED_FUNCTION_DECL): Use it.
2897 (fn.defpen): Likewise.
2898 (fndef): Adjust call to finish_function.
2899 * pt.c (instantiate_decl): Likewise.
2900 * rtti.c (syntheisze_tinfo_fn): Likewise.
2901 * semantics.c (expand_body): Likewise.
2902 * tree.c: Include ggc.h.
2903 (mark_list_hash): New function.
2904 (binding_init): Remove.
2905 (init_cplus_unsave): Rename to ...
2906 (init_tree): This. Add GC roots.
2908 1999-09-05 Mark Mitchell <mark@codesourcery.com>
2910 Get ready for garbage collection.
2911 * Makefile.in (CXX_TREE_H): Add varray.h
2912 (lex.o): Depend on ggc.h.
2914 (decl2.o): Likewise.
2915 (method.o): Likewise.
2916 (search.o): Likewise.
2919 * class.c: Include ggc.h.
2920 (current_class_name): Remove.
2921 (current_class_type): Likewise.
2922 (current_access_specifier): Likewise.
2923 (previous_class_type): Likewise.
2924 (previous_class_values): Likewise.
2925 (class_cache_firstobj): Likewise.
2926 (current_lang_base): Likewise.
2927 (current_lang_stack): Likewise.
2928 (current_lang_stacksize): Likewise.
2929 (lang_name_c): Likewise.
2930 (lang_name_cplusplus): Likewise.
2931 (lang_name_java): Likewise.
2932 (current_lang_name): Likewise.
2933 (base_layout_decl): Likewise.
2934 (access_default_node): Likewise.
2935 (access_public_node): Likewise.
2936 (access_protected_node): Likewise.
2937 (access_private_node): Likewise.
2938 (access_default_virtual_node): Likewise.
2939 (access_public_virtual_node): Likewise.
2940 (access_protected_virtual_node): Likewise.
2941 (access_private_virtual_node): Likewise.
2942 (signed_zero_node): Likewise.
2943 (init_class_processing): Don't build base_layout_decl.
2944 (push_lang_context): Adjust now that current_lang_base is a varray.
2945 (pop_lang_context): Likewise.
2946 * cp-tree.h: Include varray.h.
2947 (cp_global_trees): Add access_default, access_public,
2948 access_protected, access_private, access_default_virtual,
2949 access_public_virtual, access_protected_virtual,
2950 access_private_virtual, ctor_identifier, delta2_identifier,
2951 delta_identifier, dtor_identifier, in_charge_identifier,
2952 index_identifier, nelts_identifier, this_identifier,
2953 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
2954 lang_name_c, lang_name_cplusplus, lang_name_java,
2955 empty_except_spec, null, jclass, minus_one, terminate.
2956 (saved_scope): Move here from decl.c. Define globals in terms of
2957 saved_scope: current_namespace, current_class_name,
2958 current_class_type, current_access_specifier, current_lang_stack,
2959 current_lang_base, current_lang_name, current_function_parms,
2960 current_template_parms, processing_template_decl,
2961 processing_specialization, processing_explicit_instantiation,
2962 previous_class_type, previous_class_values, class_cache_firstobj.
2963 (scope_chain): New variable.
2964 (init_pt): New function.
2965 * decl.c (current_namespace): Remove.
2966 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
2967 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
2968 (delta_identifier, delta2_identifier): Likewise.
2969 (pfn_or_delta2_identifier, tag_identifier): Likewise
2970 (vt_off_identifier, empty_except_spec, null_node): Likewise.
2971 (current_function_parms, current_lang_base): Remove.
2972 (current_lang_stack, previous_class_values): Remove.
2973 (class_binding_level): Macroize.
2974 (saved_scope): Remove.
2975 (current_saved_scope): Rename to scope_chain.
2976 (mark_saved_scope): Adjust for new scope structure.
2977 (maybe_push_to_top_level): Likewise.
2978 (pop_from_top_level): Likewise.
2979 (duplicate_decls): Adjust now that current_lang_base is a varray.
2980 (build_typename_type): Call ggc_add_tree_hash_table_root.
2981 (init_decl_processing): Call init_pt. Call push_to_top_level to
2982 set up globals. Add GC roots.
2983 (xref_basetypes): Adjust now that current_lang_base is a varray.
2984 * decl.h (this_identifier): Remove.
2985 (in_charge_identifier): Likewise.
2986 * decl2.c: Don't include varray.h.
2987 (current_namespace): Remove.
2988 (init_decl2): Add GC roots.
2989 * except.c (Terminate): Remove.
2990 (init_exception_processing): Use terminate_node instead.
2991 (build_terminate_handler): Likewise.
2992 * init.c (nc_nelts_field_id): Remove.
2993 (minus_one): Likewise.
2994 (init_init_processing): Use minus_one_node and nelts_identifier
2995 instead. Add GC roots.
2996 (jclass_node): Remove.
2997 (build_new_1): Use nelts_identifier.
2998 (build_vec_init): Likewise.
2999 (build_vec_delete): Likewise.
3000 * lex.c: Include ggc.h.
3001 (defarg_fn): Move declaration early.
3002 (defarg_parms): Likewise.
3003 (init_parse): Add GC roots.
3004 (handle_cp_pragma): Remove redundant declaration of
3006 * method.c: Include ggc.h.
3007 (btypelist): Make it a varray. All uses changed.
3008 (ktypelist): Likewise.
3009 (init_method): Add GC roots.
3010 * pt.c: Don't include varray.h. Include ggc.h.
3011 (current_template_parms): Remove.
3012 (processing_template_decl): Likewise.
3013 (processing_specialization): Likewise.
3014 (processing_explicit_instantiation): Likewise.
3015 (init_pt): New function.
3016 * repo.c: Include ggc.h.
3017 (init_repo): Add GC roots.
3018 * search.c: Don't include varray.h.
3019 (_vptr_name): Remove.
3020 (lookup_field_1): Use vtpr_identifier instead.
3021 (expand_indirect_vtbls_init): Remove redundant declaration of
3022 in_charge_identifier.
3023 (init_search_processing): Use vptr_identifier.
3025 1999-09-05 Richard Henderson <rth@cygnus.com>
3026 Bernd Schmidt <bernds@cygnus.co.uk>
3027 Mark Mitchell <mark@codesourcery.com>
3029 * Makefile.in (parse.o): Depend on ggc.h.
3030 (decl2.o): Depend on ggc.h.
3031 (init.o): Depend on ggc.h.
3032 * cp-tree.h (init_decl2): Declare.
3033 (cp_parse_init): Likewise.
3034 * decl.c (ggc_p): Define to zero.
3035 (mark_saved_scope): New function.
3036 (init_decl_processing): Call cp_parse_init, and cp_decl2.
3038 (expand_static_init): Add GC roots.
3039 * decl2.c: Include ggc.h.
3040 (init_decl2): New function.
3041 * init.c: Include ggc.h.
3042 (init_init_processing): Add GC roots.
3043 * parse.y: Include ggc.h.
3044 (cp_parse_init): New function.
3046 1999-09-04 Mark Mitchell <mark@codesourcery.com>
3048 * decl.c (init_decl_processing): Set mark_lang_status.
3049 (lang_mark_false_label_stack): Adjust prototype.
3050 * decl2.c (grok_function_init): Remove extraneous declaration of
3053 * Make-lang.in (cc1plus): Remove dependency on GGC.
3054 * Makefile.in (OBJS): Don't mention ggc-simple.o.
3055 (OBJDEPS): Don't mention ggc-simple.o.
3057 * Make-lang.in (cc1plus): Depend on $(GGC).
3058 * Makefile.in (OBJS): Add ggc-simple.o.
3059 (OBJDEPS): Likewise.
3060 * cp-tree.h (language_function): Rename members to `x_' versions;
3061 we now have x_named_labels, x_ctor_label, x_dtor_label,
3062 x_base_init_list, x_member_init_list, x_base_init_expr,
3063 x_current_class_ptr, x_current_class_ref, x_last_tree,
3064 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
3066 (dtor_label, ctor_label, current_base_init_list,
3067 current_member_init_list, base_init_expr, current_class_ptr,
3068 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
3069 * decl.c: Include ggc.h.
3070 (last_dtor_insn): Adjust to use x_ names.
3071 (last_parm_cleanup_insn): Likewise.
3072 (original_result_rtx): Likewise.
3073 (named_labels): Likewise.
3074 (mark_binding_level): New function.
3075 (mark_cp_function_context): Likewise.
3076 (mark_false_label_stack): Likewise.
3077 (lang_mark_tree): Likewise.
3078 (lang_cleanup_tree): Likewise.
3080 1999-09-03 Mark Mitchell <mark@codesourcery.com>
3082 * Makefile.in (CXX_TREE_H): Include function.h.
3083 (decl.o): Don't depend on function.h.
3084 (decl2.o): Likewise.
3085 (typeck.o): Likewise.
3087 (method.o): Likewise.
3088 * cp-tree.h: Include function.h.
3089 (cp_function): Rename to language_function. Remove next.
3090 (cp_function_chain): Make it a macro, not a variable.
3091 (push_cp_function_context): Don't declare.
3092 (pop_cp_function_context): Likewise.
3093 * decl.c: Don't include function.h.
3094 (push_cp_function_context): Make it static. Make it suitable for
3095 a save_lang_status callback.
3096 (pop_cp_function_context): Likewise.
3097 (maybe_push_to_top_level): Call push_function_context_to, not
3098 push_cp_function_context.
3099 (pop_from_top_level): Call pop_function_context_from, not
3100 pop_cp_function_context.
3101 (init_decl_processing): Set save_lang_status and
3102 restore_lang_status. Call push_function_context_to, not
3103 push_cp_function_context.
3104 (cp_function_chain): Remove.
3105 * decl2.c: Don't include function.h.
3106 * except.c: Don't include function.h.
3107 (start_anon_func): Call push_function_context_to, not
3108 push_cp_function_context.
3109 (end_anon_func): Call pop_function_context_from, not
3110 pop_cp_function_context.
3111 * init.c: Don't include function.h.
3112 * lex.c (begin_definition_of_inclass_inline): Call
3113 push_function_context_to, not push_cp_function_context.
3114 (process_next_inline): Call pop_function_context_from, not
3115 pop_cp_function_context.
3116 * method.c: Don't include function.h.
3117 (synthesize_method): Call push_function_context_to, not
3118 push_cp_function_context. Call pop_function_context_from, not
3119 pop_cp_function_context.
3120 * typeck.c: Don't include function.h.
3122 * decl.c (expand_static_init): Tweak handling of static
3123 initializations for objects without constructors.
3125 1999-09-03 Nathan Sidwell <nathan@acm.org>
3127 * typeck.c (build_indirect_ref): Reject dereference of pointer to
3130 1999-09-02 Mark Mitchell <mark@codesourcery.com>
3132 * cp-tree.h (cp_function): Move here, from decl.c.
3133 (cp_function_chain): Declare.
3134 (dtor_label): New macro, instead of variable.
3135 (ctor_label): Likewise.
3136 (current_base_init_list): Likewise.
3137 (current_member_init_list): Likewise.
3138 (base_init_expr): Likewise.
3139 (current_class_ptr): Likewise.
3140 (current_class_ref): Likewise.
3141 (last_tree): Likewise.
3142 (last_expr_type): Likewise.
3143 (current_function_returns_value): Likewise.
3144 (current_function_returns_null): Likewise.
3145 (current_function_just_assigned_this): Likewise.
3146 (current_function_parms_stored): Likewise.
3147 (temp_name_counter): Likewise.
3148 (static_labelno): Likewise.
3149 (expanding_p): Likewise.
3150 (stmts_are_full_exprs_p): Likewise.
3151 (in_function_try_handler): Likewise.
3152 (lang_type): Remove nested type_flags. All uses changed.
3153 * call.c (ctor_label): Remove.
3154 (dtor_label): Likewise.
3155 * class.c (current_class_ptr): Remove.
3156 (current_class_ref): Likewise.
3157 * decl.c (static_labelno): Remove.
3158 (dtor_label): Likewise.
3159 (last_dtor_insn): New macro, instead of variable.
3160 (last_parm_cleanup_insn): Likewise.
3161 (original_result_rtx): Likewise.
3162 (in_function_try_handler): Remove.
3163 (named_label_uses): New macro, instead of variable.
3164 (named_labels): Likewise.
3165 (current_function_returns_value): Remove.
3166 (current_function_returns_null): Likewise.
3167 (current_function_assigns_this): New macro, instead of variable.
3168 (current_function_just_assigned_this): Likewise.
3169 (current_binding_level): Likewise.
3170 (init_decl_processing): Call push_cp_function_context.
3171 (cp_function): Move to cp-tree.h
3172 (cp_function_chain): Make it global.
3173 (temp_name_counter): Remove.
3174 (push_cp_function_context): Simplify.
3175 (pop_cp_function_context): Likewise.
3176 * decl2.c (temp_name_counter): Remove.
3177 * init_c (current_base_init_list): Likewise.
3178 (current_member_init_list): Likewise.
3179 (base_init_expr): Likewise.
3180 * method.c (static_labelno): Likewise.
3181 * pt.c (last_tree): Likewise.
3182 * semantics.c (expanding_p): Likewise.
3183 (stmts_are_full_exprs_p): Likewise.
3184 (last_expr_type): Likewise.
3185 * typeck.c (dtor_label): Likewise.
3186 (ctor_label): Likewise.
3188 1999-09-01 Alex Samuel <samuel@codesourcery.com>
3190 * decl2.c (arg_assoc_template_arg): New prototype. New function.
3191 (arg_assoc_class): Use arg_assoc_template_arg for template
3193 (arg_assoc): Likewise.
3194 * pt.c (mangle_class_name_for_template): Allow member template
3197 1999-09-02 Nathan Sidwell <nathan@acm.org>
3199 * call.c (build_conditional_expr): Warn on enum mismatches.
3200 (convert_arg_to_ellipsis): Move non-pod check to after
3203 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3205 * gxx.gperf (hash, is_reserved_word): Add prototypes.
3207 * init.c (build_vec_init): Initialize variable `try_block'.
3209 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
3210 Likewise for bzero/memset.
3211 (token_getch, token_put_back): Add static prototypes. Remove
3212 `inline' from the definitions.
3213 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
3215 1999-09-01 Mark Mitchell <mark@codesourcery.com>
3217 * cp-tree.h (lang_type): Move align into type_flags.
3218 (CLASSTYPE_ALIGN): Adjust accordingly.
3219 * call.c (direct_reference_binding): Remove misleading comment.
3221 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3223 * parse.y (language_string): Constify.
3225 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3227 * repo.c (getpwd): Don't prototype.
3228 * xref.c (getpwd): Likewise
3230 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3232 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
3233 Remove hacks for stuff which now comes from libiberty.
3235 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
3237 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
3239 1999-08-30 Mark Mitchell <mark@codesourcery.com>
3241 * cp-tree.h (begin_init_stmts): Declare.
3242 (finish_init_stmts): Likewise.
3243 * cvt.c (build_up_reference): Wrap the declaration of a temporary
3244 in a statement-expression so that we will see it when expanding
3245 tree structure later.
3246 * init.c (begin_init_stmts): Don't make it static.
3247 (finish_init_stmts): Likewise.
3249 * cp-tree.h (start_handler_parms): New function.
3250 (expand_start_catch_block): Take only one parameter.
3251 (start_handler_parms): New function.
3252 * decl.c (start_handler_parms): Define it.
3253 * except.c (process_start_catch_block): Take only one parameter.
3254 Don't call grokdeclarator here.
3255 (expand_start_catch_block): Don't call grokdeclarator here,
3257 * parse.y (handler_args): Adjust call to
3258 expand_start_catch_block. Use start_handler_parms.
3259 * pt.c (push_template_decl_real): Make permanent lists have
3261 (tsubst_expr): Adjust calls to expand_start_catch_block
3263 * semantics.c (expand_stmt): Likewise.
3265 1999-08-29 Alex Samuel <samuel@codesourcery.com>
3267 * pt.c (push_template_decl_real): Use template declaration from
3268 class type if it exists.
3270 1999-08-29 Mark Mitchell <mark@codesourcery.com>
3272 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
3273 (maybe_inject_for_scope_var): Declare it.
3274 (initialize_local_var): Likewise.
3275 * decl.c (maybe_inject_for_scope_var): Make it global.
3276 (initialize_local_var): Likewise. Move cleanup handling here,
3277 from cp_finish_decl.
3278 (make_rtl_for_nonlocal_decl): Use
3279 push_obstacks_nochange/pop_obstacks, rather than
3280 end_temporary_allocation/resume_temporary_allocation.
3281 (cp_finish_decl): Try to complete the type of a variable when it
3282 is declared. Move cleanup-handling to initialize_local_var.
3283 (expand_static_init): Use tree-building code, rather than
3285 * decl2.c (get_temp_name): Assert non-initializedness of
3287 * init.c (create_temporary_var): Move RTL-assigning code to ...
3288 (get_temp_regvar): Here.
3289 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
3290 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
3291 call initialize_local_var to generate initialization code.
3293 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3295 * cp-tree.h (fndecl_as_string, type_as_string,
3296 type_as_string_real, args_as_string, decl_as_string,
3297 expr_as_string, code_as_string, language_as_string,
3298 parm_as_string, op_as_string, assop_as_string, cv_as_string,
3299 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
3301 * errfn.c (cp_printer): Likewise.
3303 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
3304 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
3305 cp_file_of, code_as_string, language_as_string, parm_as_string,
3306 op_as_string, assop_as_string, args_as_string, cv_as_string):
3309 * tree.c (lang_printable_name): Likewise.
3311 1999-08-28 Richard Henderson <rth@cygnus.com>
3313 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
3315 1999-08-28 Mark Mitchell <mark@codesourcery.com>
3317 * cp-tree.h (strip_array_types): New function.
3318 * decl.c (maybe_deduce_size_from_array_init): New function, split
3319 out from cp_finish_decl.
3320 (layout_var_decl): Likewise.
3321 (maybe_commonize_var): Likewise.
3322 (maybe_inject_for_scope_var): Likewise.
3323 (initialize_local_var): Likewise.
3324 (build_cleanup_on_safe_obstack): Likewise.
3325 (check_initializer): Likewise.
3326 (make_rtl_for_nonlocal_decl): Likewise.
3327 (cp_finish_decl): Use them.
3328 * typeck.c (strip_array_types): New function.
3330 * cp-tree.def (LABEL_STMT): New tree node.
3331 * cp-tree.h (LABEL_STMT_LABEL): New macro.
3332 (shadow_label): Remove.
3333 (declare_local_label): New function.
3334 (finish_label_decl): Likewise.
3335 * decl.c (make_label_decl): New function, split out from
3337 (shadowed_labels): Remove.
3338 (binding_level): Add shadowed_labels.
3339 (clear_binding_level): Remove.
3340 (push_binding_level): Just bzero the new binding level.
3341 (pushlevel): Fix indentation.
3342 (pop_label): New function.
3343 (pop_labels): Likewise, split out from poplevel.
3344 (poplevel): Pop local labels. Use pop_labels.
3345 (maybe_push_to_top_level): Don't clear shadowed_labels.
3346 (lookup_label): Use make_label_decl.
3347 (shadow_label): Remove.
3348 (declare_local_label): New function.
3349 (define_label): Simplify.
3350 (start_function): Don't clear shadowed_labels.
3351 (cp_function): Remove shadowed_labels.
3352 (push_cp_function_context): Don't save shadowed_labels.
3353 (pop_cp_function_context): Don't restore it.
3354 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
3355 * parse.y (label_decl): Use finish_label_decl.
3356 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
3358 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
3360 (finish_label_decl): New function.
3361 (expand_stmt): Handle LABEL_STMTs and local label declarations.
3363 1999-08-26 Mark Mitchell <mark@codesourcery.com>
3365 * decl.c (lookup_label): Build labels on the permanent obstack
3366 when building statement trees. Don't build RTL for labels when
3367 building statement trees.
3368 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
3369 building statement trees.
3370 (finish_label_stmt): Likewise.
3371 (expand_stmt): Adjust accordingly.
3372 * pt.c (tsubst_expr); Likewise.
3373 (do_decl_instantiation): Robustify.
3375 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
3376 * tree.c (build_cplus_new): Set it.
3377 * expr.c (cplus_expand_expr): Use it.
3378 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
3380 * decl.c (store_parm_decls): Reset immediate_size_expand.
3381 (finish_function): Likewise.
3383 * tree.c (cplus_unsave_expr_now): Don't return a value.
3385 * semantics.c (do_poplevel): Always initialize the return value.
3387 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
3389 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
3390 * tree.h (cplus_unsave_expr_now) : Same.
3392 1999-08-25 Mark Mitchell <mark@codesourcery.com>
3394 * decl.c (grokdeclarator): Amend comment.
3395 * except.c (expand_start_catch_block): Call push_template_decl for
3396 catch-block parameters.
3397 * method.c (synthesize_method): Build an empty compound statement
3398 for the body of a constructor.
3400 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
3402 * tree.c (cp_build_qualified_type_real): If we're asking for the
3403 same quals we already have, just return.
3405 1999-08-25 Mark Mitchell <mark@codesourcery.com>
3407 * cp-tree.def (SUBOBJECT): New tree node.
3408 * cp-tree.h (CLEANUP_P): New macro.
3409 (SUBOBJECT_CLEANUP): Likewise.
3410 (keep_next_level): Add parameter.
3411 (get_temp_regvar): Don't declare.
3412 (emit_base_init): Remove parameter.
3413 (expand_aggr_init): Rename to build_aggr_init.
3414 (expand_vec_init): Rename to build_vec_init.
3415 (do_pushlevel): Remove.
3416 (do_poplevel): Likewise.
3417 (finish_cleanup): New function.
3418 (finish_subobject): Likewise.
3419 (stmts_are_full_exprs_p): New variable.
3420 * decl.c (keep_next_level): Add parameter.
3421 (cp_finish_decl): Use build_aggr_init, not
3422 expand_aggr_init. Use finish_expr_stmt to expand the code.
3423 (expand_static_init): Use tree-generating, not RTL-generating,
3424 functions to handle the initialization.
3425 (start_function): Remove dead code. Always have a momentary
3426 obstack inside the function, even before hitting the first curly
3428 (cplus_expand_expr_stmt): Move calls to
3429 expand_{start,end}_target_temps into semantics.c.
3430 (cp_function): Add stmts_are_full_exprs_p.
3431 (push_cp_function_context): Save it.
3432 (pop_cp_function_context): Restore it.
3433 * decl2.c (get_temp_regvar): Move to init.c.
3434 (do_static_initialization): Use build_{aggr,vec}_init.
3435 (do_static_destruction): Fix typo in comment.
3436 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
3437 * except.c (expand_throw): Use create_temporary_var.
3438 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
3439 * init.c (expand_vec_init_try_block): Remove.
3440 (expand_vec_init_catch_clause): Likewise.
3441 (get_temp_regvar): New function.
3442 (begin_init_stmts): Likewise.
3443 (finish_init_stmts): Likewise.
3444 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
3446 (emit_base_init): Likewise. Remove unused parameter.
3447 (expand_virtual_init): Likewise.
3448 (expand_cleanup_for_base): Use finish_subobject.
3449 (expand_aggr_vbase_init_1): Simplify.
3450 (construct_virtual_bases): Use tree-generating functions to build
3452 (expand_aggr_init): Likewise. Rename to build_aggr_init.
3453 (expand_default_init): Likewise.
3454 (expand_aggr_init_1): Likewise.
3455 (expand_vec_init): Rename to build_vec_init.
3456 * method.c (do_build_copy_constructor): Use tree-generating
3457 functions. Don't call clear_last_expr.
3458 (do_build_assign_ref): Likewise.
3459 (synthesize_method): Call clear_last_expr here.
3460 * parse.y (base_init): Don't call clear_last_expr here.
3461 (nodecls): Likewise.
3462 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
3463 * semantics.c (do_pushlevel): Move to here.
3464 (do_poplevel): Likewise.
3465 (stmts_are_full_exprs_p): New variable.
3466 (finish_expr_stmt): Handle logic for temoprary cleanup here.
3467 (finish_for_stmt): Use finish_expr_stmt.
3468 (finish_cleanup): New function.
3469 (finish_function_try_block): Fix indentation.
3470 (finish_subobject): New function.
3471 (setup_vtbl_ptr): Call keep_next_level here.
3472 (finish_stmt_expr): Handle a block with no scope inside the
3473 statement-expression.
3474 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
3476 * tree.c (search_tree): Handle INIT_EXPR.
3478 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
3479 * typeck2.c (store_init_value): Change expand_aggr_init to
3480 build_aggr_init in comment.
3482 1999-08-25 Mark Mitchell <mark@codesourcery.com>
3484 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
3486 1999-08-25 Nathan Sidwell <nathan@acm.org>
3488 * decl2.c (handle_class_head): Be graceful about additional
3489 scope qualifiers. Adjust comments to reflect reality.
3491 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
3493 * call.c (build_conditional_expr): Fix typo.
3494 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
3495 lvalue before trying to mess with the sides.
3497 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
3499 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
3501 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
3503 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
3505 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
3506 Return arbitrary pointer or NULL.
3507 (check_eh_spec): Call __throw_type_match_rtti_2.
3508 * tinfo.h (*::dcast): Return int. Add valp parm.
3509 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
3510 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
3511 (__throw_type_match_rtti): Now just a wrapper.
3513 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
3514 (init_exception_processing): Don't initialize them.
3516 1999-08-23 Paul Burchard <burchard@pobox.com>
3518 * decl.c (check_default_argument): Fix typo.
3520 1999-08-22 Mark Mitchell <mark@codesourcery.com>
3522 * cp-tree.def (STMT_EXPR): Fix typo in node name.
3524 * dump.c (dump_next_stmt): New function.
3525 (dequeue_and_dump): Use it.
3527 * pt.c (tsubst_copy): Make sure to initialize return value for a
3528 STMT_EXPR, even when processing_template_decl.
3529 * semantics.c (finish_stmt_expr): A statement-expression whose
3530 last statement is not an expression-statement has type `void'.
3532 1999-08-20 Mark Mitchell <mark@codesourcery.com>
3534 * semantics.c (finish_stmt_expr): Fix typo in comment.
3535 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
3537 * init.c (build_vec_delete_1): Make the children of a permanent
3538 BIND_EXPR permanent.
3539 * pt.c (register_specialization): Don't register a specialization
3542 1999-08-18 Andrew Haley <aph@cygnus.com>
3544 * method.c (process_overload_item): Call build_mangled_C9x_name ()
3545 for all integer parameter types larger than long long.
3547 1999-08-19 Mark Mitchell <mark@codesourcery.com>
3549 * pt.c (redeclare_class_template): Merge default template
3550 arguments in both directions.
3552 * typeck.c (common_type): Undo 1999-08-18 change. Remove
3553 compiler_error message.
3555 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
3557 * cp-tree.h: Declare flag_use_repository.
3558 * pt.c (do_decl_instantiation): Don't complain about duplicate
3559 instantiation with -frepo.
3560 (do_type_instantiation): Likewise.
3562 * pt.c (push_template_decl_real): Complain about everything
3563 that isn't a valid template.
3565 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
3568 1999-08-19 Mark Mitchell <mark@codesourcery.com>
3570 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
3571 * decl2.c (build_expr_from_tree): Handle it.
3572 * error.c (dump_expr): Likewise.
3573 * pt.c (for_each_template_parm): Likewise.
3574 (tsubst_copy): Likewise.
3575 * tree.c (search_tree): Likewise.
3576 * semantics.c (finish_pseudo_destructor_call): Create it.
3578 1999-08-18 Mark Mitchell <mark@codesourcery.com>
3580 * search.c (setup_class_bindings): Robustify.
3581 * typeck.c (common_type): Use same_type_p, not pointer equality,
3584 * cp-tree.h (build_lang_field_decl): Remove.
3585 * class.c (build_vtable): Replace calls to build_lang_field_decl
3586 with build_lang_decl.
3587 (prepare_fresh_vtable): Likewise.
3588 (finish_struct_1): Likewise.
3589 (init_class_processing): Likewise.
3590 * decl.c (push_using_decl): Likewise.
3591 (init_decl_processsing): Likewise.
3592 (grokvardecl): Likewise.
3593 (build_ptrmemfunc_type): Likewise.
3594 (grokdeclarator): Likewise.
3595 (build_enumerator): Likewise.
3596 * decl2.c (grok_x_components): Likewise.
3597 (do_class_using_decl): Likewise.
3598 * except.c (call_eh_info): Likewise.
3599 * init.c (init_init_processing): Likewise.
3600 * rtti.c (expand_class_decl): Likewise.
3601 * tree.c (build_base_fields): Likewise.
3602 (build_vbase_pointer_fields): Likewise.
3603 * lex.c (build_lang_decl): Build declarations on the permanent
3604 obstack if we're building statmeent trees.
3605 (retrofit_lang_decl): Handle both the full lang_decl and also the
3606 smaller lang_decl_flags here.
3607 (build_lang_field_decl): Remove.
3608 * pt.c (push_template_decl_real): Issue errors for variable
3609 declarations that are not static members.
3611 1999-08-18 Richard Henderson <rth@cygnus.com>
3613 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
3616 1999-08-17 Mark Mitchell <mark@codesourcery.com>
3618 * cp-tree.h (back_end_hook): New variable.
3619 * decl2.c (back_end_hook): Define it.
3620 (finish_file): If it's non-NULL, call it.
3622 * decl.c (add_decl_to_level): New function.
3623 (push_local_binding): Use it.
3624 (find_binding): Fix typo in comment.
3625 (pushdecl): Use add_decl_to_level. Put templates on the
3626 corresponding namespace-scope binding levels.
3627 * dump.c (dequeue_and_dump): Print the specializations of a
3629 * pt.c (push_template_decl_real): Don't push a template multiple
3632 1999-08-17 Mark Mitchell <mark@codesourcery.com>
3634 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
3635 (CALL_DECLARATOR_QUALS): Likewise.
3636 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
3637 * decl.c (grokdeclarator): Adjust to use them.
3638 * decl2.c (grokfield): Likewise.
3639 (reparse_absdcl_as_casts): Likewise.
3640 * lex.c (make_call_declarator): Likewise.
3641 (set_quals_and_spec): Likewise.
3642 * pt.c (tsubst): Likewise.
3643 * tree.c (mapcar): Remove special hack to handle third operand of
3646 1999-08-16 Mark Mitchell <mark@codesourcery.com>
3648 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
3649 * class.c (build_vtable): Use build_lang_field_decl to build the
3650 VAR_DECLs for vtables.
3651 (prepare_fresh_vtable): Likewise.
3652 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
3653 CAN_HAVE_FULL_LANG_DECL_P.
3654 (push_using_decl): Use build_lang_decl to build USING_DECLs.
3655 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
3656 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
3657 (build_lang_field_decl): Likewise.
3658 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
3661 * cp-tree.def (STMT_EXPR): New tree node.
3662 * cp-tree.h (STMT_EXPR_STMT): New macro.
3663 (store_return_init): Change prototype.
3664 (finish_named_return_value): New function.
3665 (expand_stmt): Likewise.
3666 (expand_body): Likewise.
3667 (begin_stmt_tree): Likewise.
3668 (finish_stmt_tree): Likewise.
3669 (expanding_p): New variable.
3670 (last_expr_type): Likewise.
3671 (building_stmt_tree): New macro.
3672 * decl.c (start_function): Use building_stmt_tree, not
3673 processing_template_decl, where appropriate.
3674 (store_parm_decls): Likewise.
3675 (store_return_init): Move most of the body to semantics.c.
3676 (finish_function): Use building_stmt_tree.
3677 (finish_stmt): Clear last_expr_type here.
3678 (cp_function): Add expanding_p, last_tree, last_expr_type.
3679 (push_cp_function_context): Save them.
3680 (pop_cp_function_context): Restore them.
3681 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
3682 * error.c (dump_expr): Handle STMT_EXPR.
3683 * except.c (expand_start_catch_block): Use building_stmt_tree.
3685 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
3686 (do_case): Move add_tree call to semantics.c.
3687 * parse.y (return_init): Use finish_named_return_value.
3688 (for.init.statement): Use finish_expr_stmt.
3689 * parse.c: Regenerated.
3690 * pt.c (do_pushlevel): Move to semantics.c.
3691 (do_poplevel): Likewise.
3692 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
3693 (tsubst_expr): Don't expand all the way to RTL here. Handle
3694 RETURN_INIT and CTOR_INITIALIZER.
3695 (instantiate_decl): Call expand_body after tsubst'ing into
3697 * semantics.c (expand_stmts): New function.
3698 (expanding_p): New variable.
3699 (last_expr_type): Likewise.
3700 (finish_expr_stmt): Use building_stmt_tree.
3701 (begin_if_stmt): Likewise.
3702 (finish_if_stmt_cond): Likewise.
3703 (finish_then_clause): Likewise.
3704 (begin_else_clause): Likewise.
3705 (finish_else_clause): Likewise.
3706 (begin_while_stmt): Likewise.
3707 (finish_while_stmt_cond): Likewise.
3708 (finish_while_stmt): Likewise.
3709 (finish_do_body): Likewise.
3710 (finish_do_stmt): Likewise.
3711 (finish_return_stmt): Likewise.
3712 (begin_for_stmt): Likewise.
3713 (fnish_for_init_stmt): Likewise.
3714 (finish_for_cond): Likewise.
3715 (finish_for_expr): Likewise.
3716 (finish_for_stmt): Likewise.
3717 (finish_break_stmt): Likewise.
3718 (finish_continue_stmt): Likewise.
3719 (finish_switch_cond): Likewise.
3720 (finish_switch_stmt): Likewise.
3721 (finish_case_label): Call add_tree here if necessary.
3722 (finish_goto_statement): Use building_stmt_tree.
3723 (begin_try_block): Likewise.
3724 (begin_function_try_block): Likewise.
3725 (finish_try_block): Likewise.
3726 (finish_function_try_block): Likewise.
3727 (finish_handler_sequence): Likewise.
3728 (finish_function_handler_sequence): Likewise.
3729 (begin_handler): Likewise.
3730 (finish_handler_parms): Likewise.
3731 (finish_handler): Likewise.
3732 (begin_compound_stmt): Likewise.
3733 (finish_compound_stmt): Likewise.
3734 (finish_asm_stmt): Likewise.
3735 (finish_label_stmt): Likewise.
3736 (finish_named_return_value): New function.
3737 (setup_vtbl_ptr): Moved here from decl2.c.
3738 (do_pushlevel): Moved here from pt.c.
3739 (do_poplevel): Likewise.
3740 (begin_stmt_expr): Use building_stmt_tree.
3741 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
3742 when building_stmt_tree.
3743 (begin_stmt_tree): New function.
3744 (finish_stmt_tree): Likewise.
3745 (expand_stmt): Likewise.
3746 (expand_body): Likewise.
3747 * tree.c (build_cplus_method_type): Make sure the argument types
3748 end up on the same obstack as the METHOD_TYPE.
3749 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
3750 THROW_EXPR, STMT_EXPR.
3751 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
3752 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
3753 sorry, if an unsupported node is encountered.
3754 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
3755 (c_expand_return): Don't call add_tree here.
3757 1999-08-15 Mark Mitchell <mark@codesourcery.com>
3759 * pt.c (check_default_tmpl_args): Don't check in local scopes.
3760 (tsubst_decl): Make sure the declaration is on a saveable
3761 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
3763 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
3765 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
3767 Speed up Koenig lookup.
3768 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
3769 to return namespaces we've looked at.
3770 * decl2.c (lookup_using_namespace): Likewise.
3771 (add_function): Don't call ovl_member.
3772 (lookup_arg_dependent): Initialize k.namespaces to the list of
3773 namespaces seen in unqualified lookup.
3774 * call.c (equal_functions): Move here from tree.c.
3775 (joust): Use it to handle duplicate candidates.
3776 * tree.c (ovl_member): Use ==.
3778 1999-08-13 Mark Mitchell <mark@codesourcery.com>
3780 * cp-tree.def (DECL_STMT): Make it smaller.
3781 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
3782 (lang_decl): ... here. Add next.
3783 (DECL_SAVED_TREE): Adjust accordingly.
3784 (DECL_IMPLICIT_TYPEDEF_P): New macro.
3785 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
3786 (DECL_STMT_DECL): Likewise.
3787 (create_implicit_typedef): New function.
3788 (maybe_push_decl): Likewise.
3789 (tsubst_default_argument): New function.
3790 (at_function_scope_p): Likewise.
3791 (add_decl_stmt): Likewise.
3792 (push_permanent_obstack): Likewise.
3793 * call.c (convert_default_arg): Use tsubst_default_argument.
3794 * class.c (add_method): Use push_permanent_obstack.
3795 (build_self_reference): Create a TEMPLATE_DECL for the
3796 self-reference, if necessary.
3797 * decl.c (pseudo_global_level_p): Only look at the current binding
3799 (push_binding): Use push_permanent_obstack.
3800 (create_implicit_typedef): New function.
3802 (duplicate_decls): Use push_permanent_obstack.
3803 (maybe_push_decl): New function.
3804 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
3805 (start_decl_1): Remove dead code.
3806 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
3807 pseudo_global_level_p.
3808 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
3810 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
3811 pseudo_global_level_p.
3812 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
3814 (get_sentry): Use push_permanent_obstack.
3815 * dump.c (dequeue_and_dump): Enable DECL_STMT.
3816 * except.c (call_eh_info): Use push_permanent_obstack.
3817 (build_eh_type_ref): Likewise.
3818 (do_pop_exception): Likewise.
3819 (expand_eh_spec): Likewise.
3820 (alloc_eh_object): Likewise.
3821 (expand_throw): Likewise.
3822 * init.c (build_java_class_ref): Likewise.
3823 * lex.c (get_time_identifier): Likewise.
3824 (free_lang_decl_chain): Correct type.
3825 (retrofit_lang_decl): Adjust accordingly.
3826 (build_lang_field_decl): Likewise.
3827 * lex.h (free_lang_decl_chain): Likewise.
3828 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
3829 * parse.c: Regenerated.
3830 * pt.c (tsubst_default_arguments): New function.
3831 (retrieve_local_specialization): Likewise.
3832 (register_local_specialization): Likewise.
3833 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
3834 pseudo_global_level_p to determine whether or not a template is
3836 (lookup_template_class): Likewise. Use create_implicit_typedef.
3837 (instantiate_class_template): Call tsubst_default_arguments for
3838 member functions, if appropriate.
3839 (tsubst_default_argument): New function.
3840 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
3841 * search.c (at_function_scope_p): New function.
3842 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
3843 (finish_label_stmt): Likewise.
3844 (add_decl_stmt): New function.
3845 (begin_class_definition): Likewise.
3846 (finish_typeof): Likewise.
3847 * tree.c (copy_template_template_parm): Likewise.
3848 (copy_to_permanent): Likewise.
3849 (push_permanent_obstack): Define.
3850 (mark_addressable): Use it.
3851 * typeck.c (mark_addressable): Likewise.
3853 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
3855 * cp-tree.h (init_cplus_unsave): New.
3856 (cplus_unsave_expr_now): New.
3857 * lex.c (init_parse): Call init_cplus_unsave.
3858 * tree.c (init_cplus_unsave): New.
3859 (cplus_unsave_expr_now): New.
3861 1999-08-13 Mark Mitchell <mark@codesourcery.com>
3863 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
3864 decl_constant_value to simplify array bounds.
3866 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
3868 * lang-options.h: Add -fms-extensions.
3869 * cp-tree.h: Declare flag_ms_extensions.
3870 * decl2.c: Define it.
3871 * class.c (instantiate_type): Don't complain about taking the address
3872 of a bound member function if -fms-extensions.
3873 * typeck.c (build_unary_op): Likewise.
3874 * decl.c (grokdeclarator): Or about implicit int.
3875 * init.c (resolve_offset_ref): Or about implicit '&'.
3877 1999-08-11 Mark Mitchell <mark@codesourcery.com>
3879 * cp-tree.h (minimal_parse_mode): Remove.
3880 (finish_label_stmt): New function.
3881 * decl.c (saved_scope): Remove minimal parse mode.
3882 (maybe_push_to_top_level): Don't save it.
3883 (pop_from_top_level): Don't restore it.
3884 (define_label): Split out template-handling code to semantics.c.
3885 (start_decl): Don't use minimal_parse_mode.
3886 (cp_finish_decl): Likewise.
3887 (start_function): Don't increment it.
3888 (store_return_init): Don't use it.
3889 (finish_function): Don't decrement it.
3890 * parse.y (label_colon): Use finish_label_stmt throughout.
3891 * parse.c: Regenerated.
3892 * pt.c (minimal_parse_mode): Don't define it.
3893 (tsubst_expr): Use finish_label_stmt.
3894 * semantics.c (finish_label_stmt): New function.
3896 * dump.c (queue): Be careful when computing bitmasks.
3897 (dequeue_and_dump): Describe binfos as binfos, not as
3900 * parse.y (pedantic): Give it itype. Adjust usage accordingly
3902 * parse.c: Regenerated.
3904 * Make-lang.in (CXX_SRCS): Remove sig.c.
3905 * Makefile.in (CXX_OBJS): Remove sig.o.
3907 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
3908 (CPTI_SIGNATURE_TYPE): Likewise.
3909 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
3910 (opaque_type_node): Likewise.
3911 (signature_type_node): Likewise.
3912 (sigtable_entry_type): Likewise.
3913 (flag_handle_signatures): Likewise.
3914 (lang_type): Remove is_signature, is_signature_pointer,
3915 is_signature_reference, has_opaque_typedecls,
3916 sigtables_has_been_generated. Adjust dummy. Remove signature,
3917 signature_pointer_to, signature_reference_to.
3918 (IS_SIGNATURE): Remove.
3919 (SET_SIGNATURE): Remove.
3920 (CLEAR_SIGNATURE): Remove.
3921 (IS_SIGNATURE_POINTER): Remove.
3922 (IS_SIGNATURE_REFERENCE): Remove.
3923 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
3924 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
3925 (CLASSTYPE_SIGNATURE): Remove.
3926 (SIGNATURE_TYPE): Remove.
3927 (SIGNATURE_METHOD_VEC): Remove.
3928 (SIGNATURE_POINTER_TO): Remove.
3929 (SIGNATURE_REFERENCE_TO): Remove.
3930 (lang_decl_flags): Remove is_default_implementation. Rename
3931 memfunc_pointer_to to saved_tree.
3932 (IS_DEFAULT_IMPLEMENTATION): Remove.
3933 (DECL_MEMFUNC_POINTER_TO): Remove.
3934 (DECL_MEMFUNC_POINTING_TO): Remove.
3935 (DECL_SAVED_TREE): Adjust definition.
3936 (tag_types): Remove signature_type_node.
3937 (SIGNATURE_FIELD_NAME): Remove.
3938 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
3939 (SIGNATURE_OPTR_NAME): Likewise.
3940 (SIGNATURE_SPTR_NAME): Likewise.
3941 (SIGNATURE_POINTER_NAME): Likewise.
3942 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
3943 (SIGNATURE_REFERENCE_NAME): Likewise.
3944 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
3945 (SIGTABLE_PTR_TYPE): Likewise.
3946 (SIGTABLE_NAME_FORMAT): Likewise.
3947 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
3948 (SIGTABLE_TAG_NAME): Likewise.
3949 (SIGTABLE_VB_OFF_NAME): Likewise.
3950 (SIGTABLE_VT_OFF_NAME): Likewise.
3951 (finish_base_specifiers): Change prototype.
3952 (build_signature_pointer_type): Remove.
3953 (build_signature_reference_type): Remove.
3954 (build_signature_pointer_constructor): Remove.
3955 (build_signature_method_call): Remove.
3956 (build_optr_ref): Likewise.
3957 (append_signature_fields): Likewise.
3958 (signature_error): Likewise.
3959 * call.c (build_this): Remove signature support.
3960 (build_over_call): Likewise.
3961 (build_new_method_call): Likewise.
3962 * class.c (add_implicitly_declared_members): Likewise.
3963 (finish_struct_1): Likewise.
3964 (finish_struct): Likewise.
3965 * cvt.c (cp_convert_to_pointer): Likewise.
3966 (convert_to_pointer_force): Likewise.
3967 (ocp_convert): Likewise.
3968 * decl.c (sigtable_decl_p): Remove.
3969 (init_decl_processing): Remove support for signatures.
3970 (cp_finish_decl): Likewise.
3971 (grokdeclarator): Likewise.
3972 (grokparms): Likewise.
3973 (xref_tag): Likewise.
3974 (start_function): Likewise.
3975 (start_method): Likewise.
3976 * decl2.c (finish_sigtable_vardecl): Remove.
3977 (flag_handle_signatures): Remove.
3978 (lang_f_options): Remove handle-signatures.
3979 (grokfield): Remove support for signatures.
3980 (grokbitfield): Likewise.
3981 (finish_file): Likewise.
3982 (reparse_absdcl_as_casts): Likewise.
3983 * error.c (dump_type_real): Likewise.
3984 (dump_function_decl): Likewise.
3985 * friend.c (make_friend_class): Likewise.
3986 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
3987 * hash.h: Regenerated.
3988 * init.c (build_new_1): Remove support for signatures.
3989 * lang-options.h: Remove -fhandle-signatures,
3990 -fno-handle-signatures.
3991 * lex.c (init_parse): Remove support for signatures.
3992 (yyprint): Likewise.
3993 * lex.h (rid): Remove RID_SIGNATURE.
3994 * method.c (build_decl_overload_real): Remove support for
3996 (hack_identifier): Likewise.
3997 * parse.y (base_class): Likewise.
3998 (base_class.1): Likewise.
3999 (access_specifier): Likewise.
4000 * search.c (lookup_member): Likewise.
4001 * semantics.c (finish_qualified_object_call_expr): Likewise.
4002 (finish_template_type_parm): Likewise.
4003 (begin_class_definition): Likewise.
4004 (finish_base_specifier): Likewise.
4006 * tree.c (build_cplus_method_type): Remove support for signatures.
4007 * typeck.c (require_complete_type): Likewise.
4008 (c_sizeof): Likewise.
4009 (c_alignof): Likewise.
4010 (build_object_ref): Likewise.
4011 (build_component_ref): Likewise.
4012 (build_indirect_ref): Likewise.
4013 (build_c_cast): Likewise.
4014 (build_modify_expr): Likewise.
4015 (convert_for_initialization): Likewise.
4016 * typeck2.c (signature_error): Remove.
4017 (store_init_value): Remove support for signatures.
4018 (digest_init): Likewise.
4019 (build_x_arrow): Likewise.
4020 (build_functional_cast): Likewise.
4021 * xref.c (GNU_xref_decl): Likewise.
4023 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
4025 * lex.c (do_identifier): Remove unnecessary lookup of class field.
4027 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
4029 * decl2.c (set_decl_namespace): Do not complain about non-matching
4030 decls if processing a template.
4032 1999-08-09 Mark Mitchell <mark@codesourcery.com>
4034 * decl.c (build_ptrmemfunc_type): Handle qualified
4035 pointer-to-member types here.
4036 * tree.c (cp_build_qualified_type_real): Simplify handling here.
4038 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4040 * lex.c (lang_identify): Likewise.
4042 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
4044 * Makefile.in: Update dependencies.
4045 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
4047 * decl.c: Include "function.h"
4048 (cleanup_label, return_label): Delete declarations.
4049 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
4050 (finish_function): Rename last_parm_insn variable to
4051 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
4052 * decl2.c: Include "function.h".
4053 (rtl_expr_chain): Delete declaration.
4054 * method.c: Include "function.h"
4055 * tree.c (build_vbase_pointer_fields): Don't initialize
4056 DECL_SAVED_INSNS with NULL_RTX.
4057 * typeck.c: Include "function.h"
4059 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
4061 * semantics.c (begin_function_try_block, finish_function_try_block,
4062 finish_function_handler_sequence): New fns.
4063 * parse.y (function_try_block): Use them.
4064 * pt.c (instantiate_decl): Likewise.
4066 * cp-tree.h: Declare in_function_try_handler.
4067 * decl.c: Define it.
4068 (start_function): Clear it.
4069 (struct cp_function, push_cp_function_context): Save it.
4070 (pop_cp_function_context): Restore it.
4071 * parse.y (function_try_block): Set and clear it.
4072 * except.c (expand_end_catch_block): Rethrow if we reach the end
4073 of a function-try-block handler in a ctor or dtor.
4074 * typeck.c (c_expand_return): Complain about returning from a
4075 function-try-block handler of a ctor.
4077 * parse.y (function_try_block): Call end_protect_partials
4078 before expand_start_all_catch.
4080 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
4082 * decl.c (struct binding_level): Add eh_region field.
4083 (push_binding_level): Set it.
4084 (define_label): Complain about jumping into an EH block.
4086 * ptree.c (print_lang_type): Print the real type of a PMF.
4087 Print what exceptions a fn type throws.
4089 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4091 * class.c (count_fields, add_fields_to_vec): Add static prototype.
4093 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
4094 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
4097 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
4100 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
4103 * dump.c (queue_and_dump_index, dump_int, dump_string,
4104 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
4106 (dump_stmt): Add static prototype.
4108 * errfn.c (cp_thing): Constify a char*.
4110 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
4111 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
4112 dump_expr): Constify a char*.
4114 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
4115 read_line_number): Add static prototype.
4116 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
4117 (real_yylex): Move label `letter' into the scope where it is used.
4119 * method.c (build_mangled_template_parm_index, build_overload_int,
4120 build_decl_overload_real, get_id_2): Constify a char*.
4122 * search.c (check_final_overrider): Make static.
4124 * typeck.c (composite_pointer_type): Constify a char*.
4126 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
4128 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
4129 we're looking at a class.
4131 * decl.c (lookup_name_real): Set the complain flag if we're
4132 looking for a namespace member.
4134 * lex.c (real_yylex): We can have a number with no digits.
4136 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
4138 * search.c (binfo_from_vbase): New fn.
4139 * cp-tree.h: Declare it.
4140 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
4141 from pointer to member of virtual base.
4142 * typeck.c (get_delta_difference): Likewise.
4144 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
4146 * pt.c (tsubst): Use build_index_type to build in-template array
4147 index type. Fixes g++.oliva/dwarf1.C.
4148 * decl.c (grokdeclarator): Likewise, just for consistency, as it
4149 doesn't seem to trigger the bug without it.
4151 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
4153 * typeck2.c (add_exception_specifier): Use complete_type.
4155 1999-08-06 Mark Mitchell <mark@codesourcery.com>
4157 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
4158 (dump_binary_op): Bulletproof.
4159 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
4160 * tree.c (search_tree): Don't enumerate all the nodes of classes
4161 `1', `2', and `<'; handle them generically. Don't be sorry about
4162 "unrecognized tree codes"; just abort.
4163 (no_linkage_check): Don't do linkage checks for templates.
4165 * tree.c (cp_build_qualified_type_real): Handle
4166 pointer-to-member-function types correctly.
4168 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
4170 * decl.c (pushdecl): Only give an error for shadowing a parm
4171 from *this* function.
4173 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
4175 * typeck2.c: Update URLs and mail addresses.
4177 1999-08-04 Nathan Sidwell <nathan@acm.org>
4179 * cp-tree.h (empty_except_spec): New global var.
4180 (compexcepttypes): Remove prototype.
4181 (comp_except_specs): Prototype new global function.
4182 (add_exception_specifier): Prototype new global function.
4183 * decl.c (empty_except_spec): Define new global var.
4184 (duplicate_decls): Use comp_except_specs, reword error message.
4185 (init_decl_processing): Initialize empty_except_spec.
4186 Adjust build_exception_variant calls.
4187 * parse.y (exception_specification_opt): Use empty_except_spec.
4188 (ansi_raise_identifier): Call check_for_new_type.
4189 (ansi_raise_identifiers): Use add_exception_specifier.
4190 * pt.c (tsubst): Use add_exception_specifier to build exception
4192 * search.c (check_final_overrider): New static function, broken
4193 out of get_matching_virtual. Check throw specifiers, reword
4195 (get_matching_virtual): Use check_final_overrider.
4196 * tree.c (build_exception_variant): Use comp_except_specs.
4197 * typeck.c (compexcepttypes): Remove.
4198 (comp_except_types): New static function, helper for
4199 comp_except_specs. Compare two types as exception specifiers.
4200 (comp_except_specs): New global function, compare two exception
4202 (comptypes): Adjust for comp_except_specs.
4203 * typeck2.c (add_exception_specifier): New global function.
4205 * class.c (check_for_override): Reword error message.
4207 1999-08-03 Nathan Sidwell <nathan@acm.org>
4209 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
4210 * cp-tree.h (struct lang_type): Added non_pod_class flag.
4211 (CLASSTYPE_NON_POD_P): New macro to access it.
4212 * class.c (finish_struct_1): Determine non-PODness.
4213 Check for arrays of pointers (-Weffc++).
4214 Remove array inspection duplicated code.
4215 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
4216 Use CLASSTYPE_NON_POD_P.
4218 1999-08-03 Nathan Sidwell <nathan@acm.org>
4220 * class.c (duplicate_tag_error): Preserve template information.
4222 1999-08-03 Nathan Sidwell <nathan@acm.org>
4224 * decl.c (start_enum): Show location of previous definition.
4225 * parse.y (enumlist_opt): New reduction.
4226 (structsp): Simplify enum rules to use enumlist_opt.
4228 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
4230 * lex.c (yyprint): Handle PFUNCNAME.
4232 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
4233 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
4235 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
4237 * decl.c (start_decl): Set attributes before duplicate_decls call.
4239 1999-08-02 Mark Mitchell <mark@codesourcery.com>
4241 * Make-lang.in (CXX_SRCS): Add dump.c.
4242 * Makefile.in (CXX_OBJS): Add dump.o.
4243 (dump.o): New target.
4244 * cp-tree.h (DECL_CONV_FN_P): Document.
4245 (DECL_OVERLOADED_OPERATOR_P): New function.
4246 (TYPE_PTRMEM_CLASS_TYPE): New macro.
4247 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
4248 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
4249 (ASM_VOLATILE_P): New macro.
4250 (STMT_LINENO): Likewise.
4251 (cp_namespace_decls): New function.
4252 (dump_node_to_file): New function.
4253 * decl.c (cp_namespace_decls): New function.
4254 (walk_namespaces_r): Use it.
4255 (wrapup_globals_for_namespace): Likewise.
4256 * decl2.c (flag_dump_translation_unit): New variable.
4257 (lang_decode_option): Handle -fdump-translation-unit.
4258 (finish_file): If flag_dump_translation_unit is set, dump the
4261 * lang-options.h: Add -fdump-translation-unit.
4262 * pt.c (tsubst_template_parms): Robustify.
4263 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
4264 (tsubst_expr): Use STMT_LINENO.
4265 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
4266 for invalid cv-qualifiers even while building templates.
4268 1999-08-02 Richard Henderson <rth@cygnus.com>
4270 * call.c: Include defaults.h instead of expr.h.
4273 * typeck.c: Include defaults.h.
4275 1999-08-02 Mark Mitchell <mark@codesourcery.com>
4277 * lex.c (errorcount, sorrycount): Don't declare.
4278 * repo.c (errorcount, sorrycount): Likewise.
4279 * typeck2.c (errorcount, sorrycount): Likewise.
4281 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
4283 * call.c (convert_default_arg, build_over_call): Change all uses of
4284 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
4285 Ensure expr.h is included.
4286 * decl.c (grokparams): Ditto.
4287 * pt.c (tsubst_decl): Ditto.
4288 * typeck.c (convert_arguments): Ditto.
4290 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
4292 * class.c (mark_overriders): Fix order of args to overrides.
4293 (warn_hidden): Likewise. Fix for having virtual and non-virtual
4294 functions with the same name.
4296 1999-08-02 Richard Henderson <rth@cygnus.com>
4298 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
4300 1999-08-01 Mark Mitchell <mark@codesourcery.com>
4302 * call.c (build_conditional_expr): Fix typo in comment.
4304 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
4306 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
4307 case_stack; use in_control_zone_p.
4308 * typeck.c (c_expand_return): Likewise.
4310 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
4312 * except.c (catch_clauses): Delete declaration.
4314 1999-07-30 Mark Mitchell <mark@codesourcery.com>
4316 * call.c (build_conditional_expr): Call convert_from_reference to
4317 avoid reference/non-reference type confusion. Fix typo.
4319 1999-07-30 Richard Henderson <rth@cygnus.com>
4321 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
4322 * cp-tree.h (initializer_constant_valid_p): Remove.
4324 1999-07-28 Mark Mitchell <mark@codesourcery.com>
4326 * call.c (conditional_conversion): Don't build BASE_CONVs for
4327 conversions between things that have the same type.
4328 (build_conditional_expr): Tweak.
4329 (convert_like): Some BASE_CONVs really do require the generation
4332 * init.c (perform_member_init): Don't go through build_modify_expr
4333 for simple initializations.
4335 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
4337 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
4338 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
4339 virtual functions and MI. Simplify.
4341 * method.c: Remove prototype for largest_union_member.
4342 * pt.c (determine_specialization): Fix uninitialized warning.
4343 * lex.c (real_yylex): Likewise.
4345 1999-07-27 Mark Mitchell <mark@codesourcery.com>
4347 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
4350 * cp-tree.h (BINFO_VIRTUALS): Document new format.
4351 * class.c (modify_one_vtable): Change prototype accordingly.
4352 (modify_all_vtables): Likewise.
4353 (modify_all_direct_vtables): Likewise.
4354 (modify_all_indirect_vtables): Likewise.
4355 (build_vtable_entry_for_fn): New function.
4356 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
4357 (modify_vtable_entry): Likewise.
4358 (add_virtual_function): Likewise.
4359 (build_vtbl_initializer): New function.
4360 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
4361 (fixup_vtable_deltas1): Likewise.
4362 (fixup_vtable_deltas): Likewise.
4363 (override_one_vtable): Likewise.
4364 (finish_struct_1): Likewise.
4366 * error.c (dump_expr): Likewise.
4367 * search.c (get_abstract_virtuals_1): Likewise.
4368 (get_abstract_virtuals): Likewise.
4369 (expand_upcast_fixups): Likewise.
4370 * tree.c (debug_binfo): Likewise.
4371 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
4372 __pure_virtual here.
4374 1999-07-26 Mark Mitchell <mark@codesourcery.com>
4376 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
4377 as per 1999-07-26 change.
4379 * typeck.c (c_sizeof): Don't allow non-static data members.
4380 (expr_sizeof): Likewise.
4382 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
4384 * input.c (feed_input): Only touch lineno and input_filename
4385 if !USE_CPPLIB. Save the old values before setting the new ones.
4387 * input.c (feed_input): Add file, line parms.
4388 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
4389 (real_yylex): Check linemode before input_redirected().
4391 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
4392 from op new to warning.
4394 1999-07-26 Mark Mitchell <mark@codesourcery.com>
4396 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
4397 * call.c: All uses changed.
4398 * typeck.c: Likewise.
4400 1999-07-26 Nathan Sidwell <nathan@acm.org>
4402 * exception.cc (__cplus_type_matcher): Match __eh_matcher
4405 1999-07-26 Mark Mitchell <mark@codesourcery.com>
4407 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
4408 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
4409 (strip_top_quals): Declare.
4410 (ncp_convert): Likewise.
4411 (type_after_usual_arithmetic_converions): Likewise.
4412 (composite_pointer_type): Likewise.
4413 * call.c (strip_top_quals): Don't make it static.
4414 (promoted_arithmetic_type_p): New function.
4415 (conditional_conversion): Likewise.
4416 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
4417 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
4418 for converting a type to itself.
4419 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
4420 (implicit_conversion): Make sure the from and to types are
4422 (add_builtin_candidate): Correct handling of ?: operator.
4423 (add_builtin_candidates): Improve documentation.
4424 (build_conditional_expr): New function.
4425 (can_convert): Implement in terms of can_convert_arg.
4426 (ncp_convert): New function.
4427 * typeck.c (type_after_usual_arithmetic_conversions): New
4428 function, split out from common_type.
4429 (composite_pointer_type): New function, split out from
4430 build_conditional_expr.
4431 (common_type): Use type_after_usual_arithmetic_conversions.
4432 Remove redundant attribute merging.
4433 (comptypes): Tidy. Handle COMPLEX_TYPE.
4434 (build_binary_op_nodefault): Use null_ptr_cst_p.
4435 (build_conditional_expr): Remove.
4436 (convert_for_assignment): Use new conversion functions.
4438 * cp-tree.h (abstract_virtuals_error): Change declaration.
4439 * typeck2.c (abstract_virtuals_error): Check to see if an error
4440 ocurred, and return a boolean value accordingly.
4441 (build_functional_cast): Adjust accordingly.
4442 * class.c (finish_struct_1): Likewise.
4443 * cvt.c (ocp_convert): Likewise.
4444 * decl.c (cp_finish_decl): Likewise.
4445 (grokparams): Likewise.
4446 (grok_op_properties): Likewise.
4447 (start_function): Likewise.
4448 * init.c (build_new_1): Likewise.
4450 * pt.c (unify): Don't get confused by pointers-to-member functions.
4452 * search.c (build_cplus_new): Robustify.
4454 1999-07-24 Richard Henderson <rth@cygnus.com>
4456 * gxx.gperf (__builtin_va_arg): New.
4457 * parse.y (VA_ARG): New token.
4458 (unary_expr): Recognize it.
4460 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
4462 * g++FAQ.texi: Deleted per Joe Buck's request.
4463 * Makefile.in: Corresponding changes.
4465 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
4467 * lex.c: Sync with C frontend.
4468 (whitespace_cr): New fn.
4469 (skip_white_space): Use it.
4470 (init_parse): Reorder.
4471 (yyprint): Support CONSTANT.
4472 (pragma_getc, pragma_ungetc): Bring back.
4473 (read_line_number): Change in_system_header directly.
4474 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
4475 (parse_float): Update to C version.
4476 (yylex): Handle '$' under the letter case.
4477 Remove looking_for_typename handling.
4478 Support hex floating point constants.
4479 Follow C's lead for choosing type of integer constants.
4480 Rearrange stuff to match C frontend.
4481 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
4482 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
4484 1999-07-23 Mark Mitchell <mark@codesourcery.com>
4486 * call.c (reference_binding): Tweak.
4487 (mayble_handle_implicit_object): Use direct_reference_binding to
4488 create the right implicit conversion sequence.
4490 1999-07-22 Mark Mitchell <mark@codesourcery.com>
4492 * pt.c (convert_nontype_argument): Don't call decl_constant_value
4493 if we're converting to a reference type.
4495 * call.c (NEED_TEMPORARY_P): New macro.
4496 (standard_conversion): Set it, for derived-to-base conversions.
4497 (reference_related_p): New function.
4498 (reference_compatible_p): Likewise.
4499 (convert_class_to_reference): Likewise.
4500 (direct_reference_binding): Likewise.
4501 (reference_binding): Rework for standards-compliance.
4502 (convert_like): Adjust accordingly.
4503 (maybe_handle_ref_bind): Simplify; the right conversion sequences
4504 are now built up in reference_binding.
4505 (initialize_reference): New function.
4506 * cp-tree.h (ICS_USER_FLAG): Document.
4507 (ICS_THIS_FLAG): Likewise.
4508 (ICS_BAD_FLAG): Likewise.
4509 (NEED_TEMPORARY_P): Likewise.
4510 (cp_lvalue_kind): New type.
4511 (real_lvalue_p): Return it.
4512 * error.c (dump_expr): Provide more accurate representation for
4514 * init.c (expand_default_init): Do not try to perform implicit
4515 conversions for a brace-enclosed initializer.
4516 * search.c (lookup_conversions): Document.
4517 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
4519 (real_lvalue_p): Adjust accordingly.
4520 (lvalue_p): Likewise.
4521 (build_cplus_new): Don't allow the creation of an abstract class.
4522 * typeck.c (convert_for_initialization): Use initialize_reference.
4524 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
4526 * lex.c (real_yylex) : Correct the test for overflow when lexing
4529 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
4531 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
4532 not DECL_BUILT_IN, to determine if a function is internally declared.
4533 (duplicate_decls): Likewise. Improve handling of builtins.
4534 (push_overloaded_decl): Remove special handling of builtins.
4536 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
4538 * decl.c (grokdeclarator): Pull out decl_constant_value in
4541 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
4542 * cp-tree.h, pt.c, semantics.c: Adjust.
4543 * method.c (largest_union_member): Remove.
4545 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
4547 * lex.c (token_getch, token_put_back): New fns.
4548 (real_yylex): Use them.
4550 * lex.c (lang_init): Generalize.
4551 (lang_init_options): Tell cpplib this is C++.
4552 (nextchar): Remove. Replace uses with put_back.
4553 (skip_white_space): Handle linemode here. Optimize for cpplib.
4554 (extend_token_buffer_to): New fn.
4555 (extend_token_buffer): Use it.
4556 (read_line_number, check_newline): Just deal with tokens.
4557 (real_yylex): More cpplib optimizations. Simplify. Don't produce
4558 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
4559 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
4560 * parse.y (PAREN_STAR_PAREN): Remove.
4561 * input.c: Don't use the putback machinery with cpplib.
4562 (sub_getch): Fold back into getch.
4563 (getch): Don't handle linemode here.
4564 (feed_input): Unget any text in the token buffer.
4566 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
4567 nextyychar, nextyylval): Remove.
4569 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
4570 Jason Merrill <jason@yorick.cygnus.com>
4572 * lex.c (indent_level): New variable.
4573 (init_parse): Set cpp_token to CPP_DIRECTIVE.
4574 (consume_string): Make this smart about USE_CPPLIB.
4575 (yyungetc): Use put_back function.
4576 (pragma_getc, pragma_ungetc): Functions deleted.
4577 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
4578 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
4580 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
4581 Also, clean up cases where we redundantly set token_buffer[0].
4582 (read_line_number): New fn.
4583 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
4584 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
4585 (sub_getch): Conditionalize out code that's not appropriate if
4587 (put_back): Rewrite in case USE_CPPLIB is defined.
4588 (input_redirected): Ditto.
4590 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
4592 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
4593 c_global_trees and accessor macros defined in c-common.h.
4594 (cp_tree_index): New enumeration.
4595 (cp_global_trees): Declare new array. Add accessor macros for it, and
4596 delete declarations of tree nodes replaced by it.
4597 (builtin_function): Delete macro, add declaration for new function.
4599 * decl.c: Delete definitions for tree nodes that were replaced by
4600 cp_global_trees and c_global_trees.
4601 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
4602 to generate the common builtins here.
4603 (builtin_function): New function.
4604 * decl2.c (abort_fndecl): Delete declaration.
4605 * except.c (expand_builtin_return_address): Delete declaration.
4606 (builtin_return_address_fndecl): Delete variable.
4607 (const_ptr_type_node): Delete declaration.
4608 * lex.c (cons_up_default_function): Delete declaration of
4610 * parse.y (void_list_node): Delete declaration.
4611 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
4613 (const_string_type_node): Delete declaration.
4614 * search.c (abort_fndecl): Delete declaration.
4615 * Makefile.in: Update dependencies.
4617 1999-07-19 Mark Mitchell <mark@codesourcery.com>
4619 * pt.c (check_default_tmpl_args): Move test for missing default
4620 arguments here, from ...
4621 (end_template_parm_list): Here.
4623 1999-07-18 Mark Mitchell <mark@codesourcery.com>
4625 * decl.c (lookup_nested_type): Remove.
4626 (pushtag): Don't call it.
4628 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
4630 * Makefile.in (INTERFACE): Bump to 2.
4632 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
4634 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
4635 instructions to gcc.gnu.org. Removed e-mail address.
4637 1999-07-17 Mark Mitchell <mark@codesourcery.com>
4639 * pt.c (determine_specialization): Tighten error-checking.
4640 (end_template_parm_list): Likewise.
4642 1999-07-14 Mark Mitchell <mark@codesourcery.com>
4644 * pt.c (check_default_tmpl_args): Handle friends defined in the
4645 class just like member functions defined in the class.
4647 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
4648 Jason Merrill <jason@yorick.cygnus.com>
4650 * cp-tree.h (struct lang_decl): Added field for storing sorted
4651 FIELD_DECLs (used in TYPE_DECLs).
4652 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
4653 (DECL_SORTED_FIELDS): New macro.
4654 * class.c (method_name_cmp): New function.
4655 (finish_struct_methods): Modified to support sorting and searching
4657 (finish_struct_anon): Changed code in inner loop to use ELT rather
4658 than UELT (which required an extra indirection for every reference).
4659 (field_decl_cmp): New function to support sorting FIELD_DECLs.
4660 (finish_struct_1): Sort fields.
4661 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
4662 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
4663 Also, switch to using array indexing rather than a changing pointer.
4664 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
4667 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
4669 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
4670 casts in system headers or extern "C" blocks.
4672 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
4675 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
4677 * decl2.c (write_virtuals): Deleted declaration.
4678 * cp-tree.h (write_virtuals): Deleted extern declaration.
4679 * class.c (finish_struct_1): Removed #if 0'd code that mentions
4681 * semantics.c (begin_class_definition): Rewrite code to not depend
4684 * lex.c (cp_pragma_interface): New function.
4685 (cp_pragma_implementation): Likewise.
4686 (handle_cp_pragma): Call them.
4688 * typeck.c (comptypes): Simplify C code in look_hard.
4690 * xref.c (PALLOC): Use xcalloc, not calloc.
4691 (SALLOC): Use xmalloc, not malloc.
4693 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
4695 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
4698 * decl.c (duplicate_decls): If a redeclaration doesn't match the
4699 initial declaration, then don't save the inline info and by all
4700 means don't mark the function as a builtin function.
4702 * decl.c (lookup_name_real): Set NONCLASS to 1 if
4703 CURRENT_CLASS_TYPE is 0.
4705 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
4708 * ptree.c (print_lang_type): Added vtable-needs-writing.
4710 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
4712 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
4714 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
4716 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4717 Merged into c-common.
4719 1999-07-05 Dave Brolley <brolley@cygnus.com>
4721 * lex.c (errorcount): Declare it.
4722 (finish_parse): Update errorcount for when using CPPLIB.
4724 1999-07-05 Mark Mitchell <mark@codesourcery.com>
4726 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
4728 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
4729 * decl.c (push_class_binding): Use it.
4730 (lookup_name_real): Likewise.
4732 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
4734 * cp-tree.h (widest_integer_literal_type_node,
4735 widest_unsigned_literal_type) : New.
4736 * decl.c (widest_integer_literal_type_node,
4737 widest_unsigned_literal_type) : New.
4738 (init_decl_processing): Handle/use the two new types.
4739 * lex.c (real_yylex): Same.
4740 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4743 1999-07-01 Mark Mitchell <mark@codesourcery.com>
4745 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
4746 to anonymous cv-qualified types.
4748 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
4750 * lex.c (real_yylex) : Change integer literal overflow handling to
4753 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
4755 1999-06-28 Richard Henderson <rth@cygnus.com>
4757 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
4759 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
4761 * error.c (dump_type_real): Handle TREE_LIST again.
4763 * typeck.c (comp_target_parms): Don't complain about
4764 converting from () to (...) if !flag_strict_prototype.
4766 * decl.c (grokdeclarator): Update the names of all variants when
4769 1999-06-21 Mark Mitchell <mark@codesourcery.com>
4771 * init.c (expand_aggr_vbase_init): Rename to
4772 construct_virtual_bases. Conditionalize construction here,
4774 (emit_base_init): Here.
4776 1999-06-19 Mark Mitchell <mark@codesourcery.com>
4778 * semantics.c (finish_asm_statement): Apply decay conversions to
4781 * decl.c (expand_static_init): When building an anonymous function
4782 for use with atexit, compute its body before and after entering
4785 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
4788 1999-06-18 Mark Mitchell <mark@codesourcery.com>
4790 * init.c (expand_aggr_vbase_init): Add flag parameter.
4791 (build_partial_cleanup_for): Remove, inlining into ..
4792 (expand_cleanup_for_base): ... here. Take flag parameter.
4793 (emit_base_init): Pass the in_chrg parameter to
4794 emit_aggr_vbase_init.
4795 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
4797 1999-06-16 Mark Mitchell <mark@codesourcery.com>
4799 * decl2.c (import_export_decl): Use same_type_p, rather than
4800 relying on pointer-equality for types.
4802 * method.c (do_build_copy_constructor): Simplify.
4804 * call.c (build_method_call): Remove bogus code for two-argument
4806 * init.c (build_new_1): Expand on comment, and remove dead code.
4808 * init.c (expand_cleanup_for_base): New function, split out
4810 (emit_base_init): Here.
4811 (expand_aggr_vbase_init): Use it.
4813 1999-06-15 Mark Mitchell <mark@codesourcery.com>
4815 * cp-tree.h (class_cache_firstobj): Declare.
4816 (maybe_push_cache_obstack): Rename to push_cache_obstack.
4817 * class.c (permanent_obstack): Remove declaration.
4818 (class_cache_firstobj): Make it global.
4819 (add_method): Don't use permanent_obstack directly.
4820 (pushclass): Only free the class_cache_obstack if we know how far
4822 (maybe_push_cache_obstack): Rename to push_cache_obstack.
4823 * decl.c: Remove dead comment.
4824 (saved_scope): Add class_cache_firstobj.
4825 (push_to_top_level): Save it.
4826 (pop_from_top_level): Restore it.
4827 (push_class_level_binding): Use push_cache_obstack, not
4828 maybe_push_cache_obstack.
4829 * search.c (push_class_decls): Likewise.
4831 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
4833 * pt.c (tsubst_friend_function): Push into namespace of friend
4834 function before pushdecl'ing it.
4836 1999-06-14 Nathan Sidwell <nathan@acm.org>
4838 * call.c (build_new_op): Remove REF_BIND from all operands.
4840 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
4842 * init.c (build_new_1): Look up operator delete even if there was
4843 no explicit new placement.
4845 1999-06-08 Nathan Sidwell <nathan@acm.org>
4847 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
4849 (build_throw): ... here. Call it.
4850 (process_start_catch_block): Call it.
4852 1999-06-07 Mark Mitchell <mark@codesourcery.com>
4854 * search.c (convert_pointer_to_single_level): Reimplement without
4857 1999-06-06 Mark Mitchell <mark@codesourcery.com>
4859 * method.c (is_back_referenceable_type): Back-reference bools when
4862 1999-06-07 Dave Brolley <brolley@cygnus.com>
4864 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
4865 * input.c (putback_buffer): New structure type.
4866 (putback): Replaces putback_char member.
4867 (putback): Replaces putback_char static variable.
4868 (feed_input): Use putback.
4869 (end_input): Use putback.
4870 (sub_getch): Use putback.
4871 (put_back): Use putback.
4873 1999-06-05 Mark Mitchell <mark@codesourcery.com>
4875 * decl.c (grokdeclarator): Fix typo in last change.
4877 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
4879 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
4880 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
4882 1999-06-04 Nathan Sidwell <nathan@acm.org>
4884 * except.c (build_throw): Check throw expression validity.
4886 1999-06-03 Mark Mitchell <mark@codesourcery.com>
4888 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
4889 just because flag_signed_bitfields is false.
4891 1999-06-03 Nathan Sidwell <nathan@acm.org>
4893 * semantics.c (begin_class_definition): Update the struct's
4895 * class.c (finish_struct): ... rather than here.
4897 * decl.c (make_typename_type): Don't rely on uninitialized
4900 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4902 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
4904 1999-05-31 Mark Mitchell <mark@codesourcery.com>
4906 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
4907 and friends rather than messing with current_obstack directly.
4908 (cp_build_qualified_type_real): Rework ARRAY_TYPE
4909 allocation to match practice throughout the rest of the
4912 1999-05-30 Mark Mitchell <mark@codesourcery.com>
4914 * lex.c (make_lang_type): Create TYPE_BINFO for
4915 TEMPLATE_TYPE_PARMs just like for non-template types.
4917 * decl.c (start_decl): Move checks on initialization to ...
4918 (cp_finish_decl): Here. Tidy formatting slightly.
4920 1999-05-28 Mark Mitchell <mark@codesourcery.com>
4922 * decl.c (add_binding): Don't complain about a redeclaration of a
4923 semantically identical typedef in a local scope.
4925 1999-05-28 Nathan Sidwell <nathan@acm.org>
4927 * decl.c (complete_array_type): Allocate off same obstack. Fix
4928 DO_DEFAULT comment to match reality.
4930 * friend.c (make_friend_class): Fix diagnostic typo.
4932 1999-05-28 Mark Mitchell <mark@codesourcery.com>
4934 * decl.c (lookup_namespace_name): Handle getting a
4936 (expand_static_init): Don't call pushdecl for implicitly declared
4937 `atexit' used to register destructors.
4939 1999-05-25 Mark Mitchell <mark@codesourcery.com>
4941 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
4944 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
4945 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
4946 by combining TEMPLATE_INFO and LEVEL into a single union.
4947 (DECL_TEMPLATE_INFO): Reformat.
4948 (DECL_SAVED_TREE): Document.
4949 (DECL_TEMPLATE_INJECT): Remove.
4950 * class.c (finish_struct): Remove code to deal with
4951 DECL_TEMPLATE_INJECT.
4953 * decl.c (maybe_process_template_type_declaration): Handle all new
4954 types in templates uniformly.
4955 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
4957 * pt.c (lookup_template_class): Inject template instantiations of
4958 forward-declarations.
4959 (instantiate_class_template): Remove code processing
4960 DECL_TEMPLATE_INJECT.
4962 * pt.c (lookup_template_class): Tweak lookup to find member
4965 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
4967 * semantics.c (finish_asm_stmt): Make strings permanent if they're
4970 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
4972 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
4973 parts of pointer to data member types.
4975 1999-05-24 Mark Mitchell <mark@codesourcery.com>
4977 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
4978 and then make it look like `abort'. Just use `abort' instead.
4980 * typeck.c (build_static_cast): Don't allow static_casts that cast
4982 (casts_away_constness_r): New function.
4983 (casts_away_constness): Likewise.
4985 * decl.c (lookup_tag): Remove code no longer needed after
4986 name-lookup improvements.
4987 * decl2.c (handle_class_head): Make error-recovery more robust.
4988 * friend.c (make_friend_class): Reject templated typename types.
4989 * lex.c (is_global): A template parameter isn't global.
4990 * parse.y (class_head): Robustify.
4991 * parse.c: Regenerated.
4993 1999-05-22 Mark Mitchell <mark@codesourcery.com>
4995 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
4996 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
4998 * cp-tree.h (push_nested_namespace): Declare.
4999 (pop_nested_namespace): Likewise.
5000 * decl.c (push_nested_namespace): New function.
5001 (pop_nested_namespace): Likewise.
5002 * pt.c (instantiate_class_template): Use them.
5004 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
5006 * cp-tree.h (cplus_expand_constant): Declare.
5007 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
5008 converted from one pointer-to-object type to another.
5009 * expr.c (cplus_expand_constant): Don't make it static.
5010 * typeck.c (build_component_ref): Don't crash when presented with
5011 a component which is a TEMPLATE_DECL.
5012 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
5013 cast from a pointer-to-member constant to its own type does not
5014 result in a valid non-type template argument.
5016 1999-05-21 Mark Mitchell <mark@codesourcery.com>
5017 Nathan Sidwell <nathan@acm.org>
5019 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
5020 * cp-tree.h: Fix typo in documentation on pointers-to-members.
5021 (cp_build_qualified_type): Make it a macro.
5022 (cp_build_qualified_type_real): Declare.
5023 * decl.c (grokdeclarator): Remove misleading comment. Avoid
5024 problem with template parameters and restrict-qualification.
5025 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
5026 * hash.h: Regenerated.
5027 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
5029 (NORID): Remove definition.
5030 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
5031 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
5032 (fn_type_unification): Check that the function type resulting from
5033 the deduction is legal.
5034 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
5035 (unify): Use cp_build_qualified_type_real.
5036 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
5037 (cp_build_qualified_type): Rename to ...
5038 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
5039 and modify appropriately.
5041 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
5042 reveal optimization opportunities.
5044 * pt.c (tsubst): Don't issue error messages when we're not
5045 complaining, even if we see a qualified function type.
5046 (check_cv_quals_for_unify): Don't allow a qualified function
5049 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
5051 * class.c (instantiate_type): Downgrade errors for object-dependent
5052 memfn refs to pedwarn.
5054 1999-05-20 Mark Mitchell <mark@codesourcery.com>
5056 * decl.c (grokdeclarator): Don't treat [] as indicating a
5057 zero-sized array in a typedef.
5059 * call.c (build_object_call): Don't look at DECL_NAME for a type.
5060 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
5061 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
5063 * pt.c (for_each_template_parm): Rework to match documentation.
5064 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
5066 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
5068 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
5070 * class.c (finish_base_struct): Allow non-COM bases for COM classes
5071 except at the leftmost position.
5072 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
5073 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
5074 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
5076 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
5077 (build_cplus_new): Make sure that what we return is of the right type.
5079 1999-05-20 Mark Mitchell <mark@codesourcery.com>
5081 * cp-tree.h (make_ptrmem_cst): New function.
5082 * expr.c (cplus_expand_constant): Split out from ...
5083 (cplus_expand_expr): Here. Use cplus_expand_constant.
5084 (init_cplus_expand): Set lang_expand_constant.
5085 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
5087 * tree.c (make_ptrmem_cst): Define.
5088 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
5089 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
5091 1999-05-19 Mark Mitchell <mark@codesourcery.com>
5093 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
5095 * decl2.c (start_static_storage_duration_function): Fix comment.
5096 (finish_file): Create static storage duration functions lazily.
5098 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
5100 Implement anonymous structs.
5101 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
5102 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
5103 * class.c (finish_struct_1): Remove redundant check for anon struct.
5104 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
5105 (check_tag_decl): Check for anonymous struct here.
5106 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
5107 * init.c (sort_member_init, emit_base_init): Handle getting fields
5108 as well as names in current_member_init_list.
5109 (perform_member_init): Handle getting an anon aggr.
5110 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
5111 (do_build_copy_constructor): Likewise.
5113 1999-05-19 Mark Mitchell <mark@codesourcery.com>
5115 * tree.c (cp_build_qualified_type): Don't allow qualified function
5118 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
5120 * gxxint.texi: Fix typo.
5122 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
5124 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
5125 * class.c (finish_struct_1): Use CLASS_TYPE_P.
5126 * ptree.c (print_lang_type): Likewise.
5127 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
5129 * typeck2.c (digest_init): Likewise.
5131 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
5133 * call.c (joust): Compare the types of the conv ops, not the
5134 target types of the conversions.
5136 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
5138 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
5141 1999-05-17 Mark Mitchell <mark@codesourcery.com>
5143 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
5144 * decl.c (grokfndecl): Don't allow inline declarations of friend
5145 template specializations, or friend template specializations with
5147 * pt.c (tsubst): Handle substitution into array types that does
5148 not yield a fixed upper bound, even when not processing a
5150 (tsubst_copy): Deal with the fact that the second operand to a
5151 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
5152 * search.c (marked_pushdecls_p): Don't descend into
5153 TEMPLATE_TYPE_PARMs and the like.
5154 (unmarked_pushdecls_p): Likewise.
5156 * call.c (build_over_call): Don't throw away
5157 initializations/copies of empty classes; use MODIFY_EXPR and
5158 INIT_EXPR as for non-empty classes.
5159 * class.c (finish_struct_1): Put the padding byte for an empty
5160 class on the TYPE_NONCOPIED_PARTS list for the class.
5162 1999-05-16 Mark Mitchell <mark@codesourcery.com>
5164 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
5165 indicate a reference to a field that is a qualified name.
5167 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
5169 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
5170 ASM_OUTPUT_CONSTRUCTOR.
5172 * friend.c (do_friend): Add attrlist arg. Remove support for
5173 getting a non-decl as 'decl'.
5174 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
5176 (grokdeclarator): Adjust.
5177 * cp-tree.h: Adjust.
5179 1999-05-16 Mark Mitchell <mark@codesourcery.com>
5181 * cp-tree.h (permanent_p): New function.
5182 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
5183 possibly complex tree node.
5184 * tree.c (mapcar): Adjust comments, and follow coding standards in
5186 (permanent_p): New function.
5188 1999-05-13 Per Bothner <bothner@cygnus.com>
5190 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
5191 primitive Java types, if we actually see `extern "Java"'.
5193 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5195 * lang-specs.h: Pass -$ to the preprocessor.
5197 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
5199 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
5200 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
5201 (resolve_offset_ref): Don't handle a raw baselink.
5202 * cvt.c (build_expr_type_conversion): Likewise.
5203 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
5204 convert_for_initialization): Likewise.
5205 * class.c (instantiate_type): Handle seeing a baselink under an
5207 * error.c (dump_expr): Likewise.
5208 * pt.c (for_each_template_parm): Likewise.
5209 (resolve_overloaded_unification): Likewise.
5210 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
5211 * typeck.c (expr_sizeof): Also complain about other permutations
5212 of overloaded functions.
5214 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
5216 * init.c (resolve_offset_ref): Don't return a raw method.
5218 * typeck.c (decay_conversion): Don't handle a raw method.
5219 Resolve all OFFSET_REFs.
5220 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
5221 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
5222 same_type_p for pmf bits. Don't use build_binary_op to compare
5223 raw pointers to methods.
5224 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
5225 to decide when to call resolve_offset_ref.
5226 (build_c_cast, convert_for_initialization): Likewise.
5227 * cvt.c (build_expr_type_conversion): Likewise.
5229 1999-05-06 Nathan Sidwell <nathan@acm.org>
5231 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
5233 1999-05-05 Mark Mitchell <mark@codesourcery.com>
5235 * decl2.c (start_objects): Don't let static constructors and
5236 destructors get inlined.
5238 * parse.y (nested_name_specifier): Make sure ordinary types are
5239 complete, just like template types.
5240 * parse.c: Regenerated.
5242 * pt.c (check_explicit_specialization): Improve error messages.
5244 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
5246 * typeck.c (string_conv_p): Use same_type_p to check whether we
5247 try to convert between char and wchar_t.
5249 1999-05-03 Mark Mitchell <mark@codesourcery.com>
5251 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
5252 lookup to error_mark_node here.
5253 (lookup_member): Revise documentation. Add comments. Don't set
5254 the TREE_TYPE to error_mark_node here, and don't build up an extra
5255 TREE_LIST for ambiguous lookups.
5256 (setup_class_bindings): Adjust accordingly.
5257 (push_class_decls): Revise out-of-date comments.
5259 * typeck.c (build_const_cast): Tighten checks for legality.
5261 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
5263 * init.c (build_member_call): Lookup names coming from
5264 namespace-scoped LOOKUP_EXPR.
5266 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
5268 * gxxint.texi: Add documentation for 'I'.
5270 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
5272 * tinfo.cc (operator==): Qualify type_info with std::.
5274 1999-05-02 Mark Mitchell <mark@codesourcery.com>
5276 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
5277 (DECL_COMDAT): Remove definition.
5279 1999-05-01 Mark Mitchell <mark@codesourcery.com>
5281 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
5284 1999-04-30 Mark Mitchell <mark@codesourcery.com>
5286 * class.c (build_vtable): Use build_lang_decl when building
5287 vtables, not just build_decl.
5288 (prepare_fresh_vtable): Likewise.
5289 * decl.c (wrapup_globals_for_namespace): Mark vtables as
5290 DECL_EXTERNAL when calling wrapup_global_declarations.
5291 * decl2.c (priority_info_s): Add initializations_p and
5292 destructions_p members.
5293 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
5294 when deciding what vtables to write out.
5295 (ssdf_decls): New variable.
5296 (ssdf_decls_used): Likewise.
5297 (start_static_storage_duration_function): Deal with being called
5298 multiple times. Avoid inlining this function.
5299 (generate_inits_for_priority): Deal with reuse of priority map.
5300 (get_priority_info): Clear initializations_p and destructions_p.
5301 (do_static_initialization): Tweak comment.
5302 (do_static_destruction): Likewise. Fix condition on sentries for
5304 (generate_ctor_or_dtor_function): Call all of the static storage
5306 (generate_ctor_or_dtor_function_for_priority): Check
5307 initializations_p and destructions_p to see what priorities need
5308 initialization functions.
5309 (finish_file): Rework to generate multiple static storage duration
5310 functions, rather than just one.
5312 * typeck.c (build_const_cast): Tweak last change to handle
5313 templates correctly.
5315 * typeck.c (build_const_cast): Disallow use of const_cast to
5316 anything but a pointer or reference type.
5318 1999-04-30 Nathan Sidwell <nathan@acm.org>
5320 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
5323 1999-04-29 Mark Mitchell <mark@codesourcery.com>
5325 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
5326 (finish_file): Indent comments properly.
5328 1999-04-29 Richard Henderson <rth@cygnus.com>
5330 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
5331 (do_static_destruction): Likewise.
5333 1999-04-29 Nathan Sidwell <nathan@acm.org>
5335 * cp-tree.h (TYPE_NOTHROW_P): New macro.
5336 * decl2.c (delete_sanity): Warn on deleting void *.
5337 * init.c (build_new_1): Use TYPE_NOTHROW_P.
5338 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
5339 throwing operator new.
5341 1999-04-28 Nathan Sidwell <nathan@acm.org>
5343 * cp-tree.h (build_component_addr): Remove prototype.
5344 * typeck.c (build_component_addr): Make static. Remove MSG
5346 (build_component_addr): Remove MSG parameter, clean up
5348 (build_x_function_call): Use cp_error.
5349 (build_unary_op): Adjust call of build_component_addr.
5351 1999-04-28 Mark Mitchell <mark@codesourcery.com>
5353 * pt.c (tsubst_friend_class): Check for NULL.
5355 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5357 * search.c (binfo_for_vtable): Initialize bfvi.var.
5359 1999-04-27 Nathan Sidwell <nathan@acm.org>
5361 * rtti.c (build_x_typeid): Check rtti is enabled.
5363 1999-04-26 Mark Mitchell <mark@codesourcery.com>
5365 * search.c (is_subobject_of_p): Make sure we're looking at the
5368 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
5370 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
5372 1999-04-23 Mark Mitchell <mark@codesourcery.com>
5374 * decl2.c (finish_file): Tweak handling of extern inlines so that
5375 they are not unnecessarily put out.
5377 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
5378 such as base classes.
5380 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
5382 * tree.c (build_exception_variant): Fix typo: use the chain of U,
5383 not trying V, while cycling through U.
5385 1999-04-22 Mark Mitchell <mark@codesourcery.com>
5387 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
5388 preserves_first_arg. Enlarge dummy accordingly.
5389 (DECL_TINFO_FN_P): New macro.
5390 (SET_DECL_TINFO_FN_P): Likeiwse.
5391 (DECL_RETURNS_FIRST_ARG): Remove.
5392 (DECL_PRESERVES_THIS): Likewise.
5393 (DECL_INIT_PRIORITY): New macro.
5394 (finish_struct_1): Change prototype.
5395 (cat_namespace_levels): Remove prototype.
5396 (vtable_decl_p): New prototype.
5397 (vtype_decl_p): Likewise.
5398 (sigtable_decl_p): Likewise.
5399 (walk_globals_pred): New typedef.
5400 (walk_globals_fn): Likewise.
5401 (walk_globals): New prototype.
5402 (walk_namespaces_fn): New typedef.
5403 (walk_namespaces): New prototype.
5404 (wrapup_globals_for_namespace): Likewise.
5405 (walk_vtables): Remove prototype.
5406 (walk_sigtables): Likewise.
5407 (instantiate_pending_templates): New prototype.
5408 * class.c (finish_struct_1): Don't return a value.
5409 * decl.h (pending_statics): Remove declaration.
5410 * decl.c (walk_namespaces_r): New function.
5411 (walk_globals_r): Likewise.
5412 (vtable_decl_p): Likewise.
5413 (vtype_decl_p): Likewise.
5414 (sigtable_decl_p): Likewise.
5415 (walk_namespaces): Likewise.
5416 (walk_globals_data): New type.
5417 (walk_globals): New function.
5418 (wrapup_globals_for_namespace): Likewise.
5419 (expand_static_init): Remove assertion. Remove redundancy in
5420 conditional. Don't put static data members in static_aggregates
5422 (finish_function): Remove redundancy in conditional. Don't set
5423 DECL_RETURNS_FIRST_ARG.
5424 (cat_namespace_levels): Remove.
5425 * decl2.c: Include splay-tree.h and varray.h.
5426 (priority_info_s): New structure.
5427 (finish_vtable_vardecl): Change prototype. Adjust for new calling
5429 (prune_vtable_vardecl): Likewise.
5430 (finish_sigtable_vardecl): Likewise.
5431 (setup_initp): Remove.
5434 (start_static_storage_duration_function): New function.
5435 (generate_inits_for_priority): Likewise.
5436 (finish_static_storage_duration_function): Likewise.
5437 (get_priority_info): Likewise.
5438 (do_static_initialization): Likewise.
5439 (do_static_destruction): Likewise.
5440 (do_static_initialization_and_destruction): Likewise.
5441 (generate_ctor_or_dtor_function): Likewise.
5442 (generate_ctor_and_dtor_functions_for_priority): Likewise.
5443 (pending_statics): Make it a varray.
5444 (pending_statics_used): New variable.
5445 (saved_inlines): Make it a varray.
5446 (saved_inlines_used): New variable.
5447 (finish_static_data_member): Change method of updating
5449 (mark_inline_for_output): Remove #if 0'd code. Change method of
5450 updating saved_inlines.
5451 (walk_vtables): Remove.
5452 (walk_sigtables): Likewise.
5453 (import_export_decl): Use DECL_TINFO_FN_P.
5454 (pending_templates): Remove declaration.
5455 (maybe_templates): Likewise.
5456 (static_aggregates_initp): Likewise.
5457 (setup_initp): Likewise.
5458 (finish_objects): Simplify.
5459 (INITIALIZE_P_IDENTIFIER): New macro.
5460 (PRIORITY_IDENTIFIER): New macro.
5461 (SSDF_IDENTIFIER): New macro.
5462 (initialize_p_decl): New variable.
5463 (priority_decl): Likewise.
5464 (ssdf_decl): Likewise.
5465 (priority_info_map): Likewise.
5466 (finish_file): Recode output of static intializers and other
5467 file-scope finalization tasks.
5468 * error.c (OB_END_TEMPLATE_ID): New macro.
5469 (dump_type_real): Use it.
5470 (dump_decl): Likewise.
5471 (dump_function_name): Likewise.
5472 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
5474 (check_newline): Use walk_globals, not walk_vtables.
5475 * pt.c (pending_tempalte_expansions): Remove.
5476 (set_vardecl_interface_info): Likewise.
5477 (pending_templates): Make static.
5478 (maybe_templates): Likewise.
5479 (instantiate_class_template): Adjust call to finish_struct_1.
5480 (instantiate_pending_templates): New function.
5481 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
5482 * tree.c (static_aggregates_initp): Remove.
5483 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
5485 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
5487 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
5488 with the RTL code RETURN.
5489 * hash.h: Regenerated.
5490 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
5491 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
5492 * parse.c: Regenerated.
5493 * pt.c: Include varray.h. Include rtl.h since varray.h requires
5495 (inline_parm_levels): New variable.
5496 (inline_parm_levels_used): Likewise.
5497 (maybe_begin_member_template_processing): Update them.
5498 (maybe_end_member_template_processing): Use them, rather than
5499 guessing how many levels to pop.
5501 * decl.c (make_typename_type): Tighten error-checking.
5503 1999-04-20 Mark Mitchell <mark@codesourcery.com>
5505 * cp-tree.h (build_binary_op): Remove unneeded parameter.
5506 * class.c (build_vrable_entry_ref): Adjust call to
5508 * decl.c (expand_static_init): Likewise.
5509 (grokdeclarator): Likewise.
5510 (finish_function): Likewise.
5511 * decl2.c (delete_sanity): Likewise.
5512 (do_dtors): Likewise.
5513 (do_ctors): Likewise.
5514 * error.c (dump_type_suffix): Likewise.
5515 * expr.c (cplus_expand_expr): Likewise.
5516 * init.c (resolve_offset_ref): Likewise.
5517 (build_new): Likewise.
5518 (build_new_1): Likewise.
5519 (build_vec_delete_1): Likewise.
5520 (expand_vec_init_catch_clause): Likewise.
5521 (build_delete): Likewise.
5522 * pt.c (tsubst): Likewise.
5523 * rtti.c (synthesize_tinfo_fn): Likewise.
5524 * search.c (expand_upcast_fixups): Likewise.
5525 (expand_direct_vtbls_init): Likewise.
5526 * typeck.c (get_member_function_from_ptrfunc): Likewise.
5527 (build_binary_op_nodefault): Likewise.
5528 (point_int_sum): Likewise.
5529 (pointer_diff): Likewise.
5530 (build_unary_op): Likewise.
5531 (build_modify_expr): Likewise.
5532 (get_delta_difference): Likewise.
5533 (build_ptrmemfunc): Likewise.
5534 (expand_ptrmemfunc_cst): Likewise.
5536 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
5538 * decl.c (grokfndecl): Always call cplus_decl_attributes.
5539 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
5541 1999-04-19 Mark Mitchell <mark@codesourcery.com>
5543 * cp-tree.h (finish_static_data_member_decl): New function.
5544 * decl2.c (finish_static_data_member_decl): Split out from ...
5546 * pt.c (instantiate_class_template): Use it here instead of
5548 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
5549 finish_static_data_member_decl will do that. Explicit set
5550 DECL_EXTERNAL to match non-template processing.
5552 1999-04-18 Mark Mitchell <mark@codesourcery.com>
5554 * cp-tree.h (finish_class_definition): Add parameter.
5555 * parse.y (structsp): Use it. Don't call pop_scope here.
5556 * parse.c: Regenerated.
5557 * semantics.c (finish_class_definition): Pop it here.
5559 1999-04-17 Mark Mitchell <mark@codesourcery.com>
5561 * decl.c (xref_tag): Revise handling of nested template
5563 * pt.c (check_explicit_specialization): Tweak handling of friend
5564 templates in template classes.
5565 (tsubst_friend_class): Handle friend declarations for nested
5566 member template classes.
5568 1999-04-16 Mark Mitchell <mark@codesourcery.com>
5570 * class.c (finish_struct): Remove unused variable.
5571 (pushclass): Likewise.
5572 (invalidate_class_lookup_cache): Likewise.
5573 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
5574 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
5575 doesn't get obliterated.
5576 (make_typename_type): Handle template classes correctly.
5578 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
5579 (storetags): Declare.
5580 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
5581 (pushclass): Likewise. Use storetags to install tag declarations,
5583 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
5584 * decl.c (storetags): Make it global.
5585 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
5586 implicit typename declaration.
5587 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
5588 * method.c (hack_identifier): Likewise.
5589 * search.c (lookup_member): Likewise.
5591 * decl.c (warn_about_implicit_typename_lookup): New function.
5592 (lookup_name_real): Use it. Rework handling of implicit typename
5595 1999-04-15 Mark Mitchell <mark@codesourcery.com>
5597 * cp-tree.h (lookup_nested_field): Remove.
5598 * class.c (push_nested_class): Handle UNION_TYPEs.
5599 (pop_nested_class): Likewise.
5600 * decl.c (lookup_name_real): Don't call lookup_nested_field.
5601 (start_decl): Use push_nested_class, not just pushclass.
5602 (cp_finish_decl): Use pop_nested_class, not just popclass.
5603 * search.c (lookup_nested_field): Remove.
5605 * cp-tree.h (lang_type): Add documentation.
5606 * decl2.c (handle_class_head): Create template declarations here,
5608 * parse.y (class_head): Return whether or not we entered a new
5609 scope, as well as the type named.
5610 (named_class_head): Likewise.
5611 (named_complex_class_head_sans_basetype): Likewise.
5612 (structsp): Adjust accordingly. Pop scope when required.
5613 * parse.c: Regenerated.
5614 * pt.c (check_default_tmpl_args): Robustify.
5615 (redeclare_class_template): Likewise.
5616 (instantiate_class_template): An instantiation of an
5617 anonymous union is itself an anonymous union.
5618 * semantics.c (begin_class_definition): Don't create template
5621 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
5623 * parse.y (after_type_declarator_intern): New nonterminal.
5624 (after_type_declarator): Use it.
5625 (direct_after_type_declarator): Likewise. Move above
5626 nonnested_type to fix reduce/reduce conflict resolution.
5627 (declmods): Reducing from just 'attributes' has EMPTY precedence.
5628 * Makefile.in (CONFLICTS): Update.
5630 * decl.c (define_label): Downgrade error for jumping over a
5631 non-POD decl to pedwarn.
5633 1999-04-14 Mark Mitchell <mark@codesourcery.com>
5635 * cp-tree.h (popclass): Change declaration.
5636 (pop_nested_class): Likewise.
5637 (poplevel_class): Remove declaration.
5638 * call.c (convert_default_argument): Pass no arguments to
5640 * class.c (finish_struct_1): Likewise.
5641 (finish_struct): Likewise.
5642 (popclass): Remove argument. Simplify code accordingly.
5643 (pop_nested_class): Likewise.
5644 * decl.c (poplevel_class): Declare it here, and make it static.
5645 (poplevel): Handle class scopes.
5646 (poplevel_class): Don't take an rgument. Simplify.
5647 (pop_everything): Pass no arguments to pop_nested_class.
5648 (cp_finish_decl): Pass no arguments to popclass.
5649 (grokdeclarator): Pass no arguments to pop_nested_class.
5650 (finish_function): Likewise.
5651 * decl2.c (grokfield): Likewise.
5652 (pop_scope): Pass no arguments to popclass.
5653 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
5654 * pt.c (instantiate_class_template): Move call to pushclass, and
5655 document. Pass no arguments to popclass.
5656 (regenerate_decl_from_template): Likewise.
5658 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
5660 * typeck.c (build_unary_op): Handle taking the address of a unique
5661 bound non-static member function.
5663 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
5665 * lang-options.h (-Wdeprecated): New flag.
5666 * decl2.c (warn_deprecated): New flag.
5667 (lang_decode_option): Deprecated this-is-variable,
5668 external-templates, alt-external-templates.
5669 Support -Wdeprecated.
5670 * errfn.c (cp_deprecated): New function.
5672 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
5674 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
5675 of the decls themselves.
5677 * pt.c (tsubst_function_type): Copy attributes over.
5679 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
5681 * cp-tree.h: Add prototype.
5682 * decl.c (init_decl_processing): Set valid_lang_attribute.
5684 1999-04-13 Mark Mitchell <mark@codesourcery.com>
5686 * class.c (finish_struct_1): Look at the const-ness of the field's
5687 type, not the TREE_READONLY-ness of the declaration.
5688 * method.c (synthesize_method): Likewise.
5689 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
5690 creating new declarations.
5692 1999-04-13 Mike Stump <mrs@wrs.com>
5694 * decl2.c (import_export_decl): Because vtables always reference
5695 virtual functions, even if they are inlined, don't allow
5696 -fno-implement-inlines to not emit them, instead, emit them with
5698 * decl.c (start_function): Likewise.
5700 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
5702 * cp-tree.h (struct lang_type): Add com_interface.
5703 (CLASSTYPE_COM_INTERFACE): New macro.
5704 * class.c (set_rtti_entry): COM interface classes have no RTTI
5705 entries in their vtables; adjust.
5706 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
5707 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
5708 finish_struct_1): Likewise.
5709 * decl2.c (mark_vtable_entries): Likewise.
5710 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
5711 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
5712 expand_upcast_fixups): Likewise.
5713 * tree.c (debug_binfo): Likewise.
5715 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
5716 * typeck.c (comptypes): If we get it, ignore attributes.
5717 * class.c (instantiate_type): Use BASELINK_P. Change complain
5718 parameter to flags; 2 means ignore attributes.
5719 * call.c (build_op_delete_call): Pass it.
5721 * decl.c (xref_tag): Only complain once about using a typedef-name
5722 with 'struct'. Downgrade to pedwarn.
5724 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
5726 * parse.y (absdcl_intern): New nonterminal.
5727 (absdcl, direct_abstract_declarator): Use it.
5729 * pt.c (lookup_template_class): Look through implict typename.
5731 1999-04-11 Mark Mitchell <mark@codesourcery.com>
5733 * friend.c (add_friend): Deal gracefully with error_mark_node.
5734 * method.c (build_overload_value): Handle pointers-to-members as
5735 template parameters.
5737 * decl.c (push_binding): Fix typo in comment.
5739 1999-04-10 Mark Mitchell <mark@codesourcery.com>
5741 * error.c (dump_type_real): If a typename is a template-id, put
5742 out the template arguments.
5743 (dump_expr): Handle TEMPLATE_ID_EXPR.
5744 * pt.c (lookup_template_class): Now that full arguments are
5745 available everywhere, remove code that tried to guess them.
5747 1999-04-09 Mark Mitchell <mark@codesourcery.com>
5749 * decl.c (make_typename_type): Complain if we don't find a type
5750 when trying to make a typename type for a non-template type.
5752 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
5754 * decl.c (start_decl): Pass attributes to grokdeclarator.
5755 (grokdeclarator): Handle attributes on constructor-syntax
5758 1999-04-08 Mark Mitchell <mark@codesourcery.com>
5760 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
5763 * search.c (template_self_reference_p): Tweak.
5765 1999-04-07 Mark Mitchell <mark@codesourcery.com>
5767 * init.c (build_offset_ref): Don't build yet another weird data
5768 structure to describe overloaded functions.
5770 1999-04-06 Mark Mitchell <mark@codesourcery.com>
5772 * cp-tree.h (BASELINK_P): New macro.
5773 (SET_BASELINK_P): Likewise.
5774 * init.c (build_member_call): Remove needless assignment in if
5776 * search.c (lookup_field_r): Fix handling when we are looking
5777 specifically for a type; these are not hidden by functions and
5779 (lookup_member): Use SET_BASELINK_P.
5780 * tree.c (is_overloaded_fn): Use BASELINK_P.
5781 (really_overloaed_fn): Likewise.
5782 (get_first_fn): Likewise.
5784 1999-04-05 Mark Mitchell <mark@codesourcery.com>
5786 * decl.c (lookup_name_current_level): Tweak, and improve
5789 * class.c (maybe_fixup_vptrs): Remove declaration.
5790 (build_class_init_list): Likewise.
5791 * decl.c (pushdecl_class_level): Call check_template_shadow here
5793 (push_class_level_binding): ... not here.
5794 * search.c (dfs_push_type_decls): Only avoid
5795 template-self-reference TYPE_DECLs if they are from base classes.
5797 1999-04-04 Mark Mitchell <mark@codesourcery.com>
5799 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
5802 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
5804 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
5805 (finish_struct_1): Don't call build_class_init_list.
5807 1999-04-02 Mark Mitchell <mark@codesourcery.com>
5809 * tinfo.h (__class_type_info): Fix illegal declaration.
5811 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
5812 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
5813 (IDENTIFIER_CLASS_VALUE): Improve documentation.
5814 (is_properly_derived_from): Declare.
5815 (invalidate_class_lookup_cache): Likewise.
5816 (maybe_maybe_note_name_used_in_class): Likewise.
5817 (note_name_declared_in_class): Likewise.
5818 (push_using_decl): Remove duplicate declaration.
5819 (id_in_current_class): Remove declaration.
5820 (push_class_binding): Change prototype.
5821 (clear_identitifer_class_values): Declare.
5822 * call.c (is_properly_derived_from): Make it global.
5823 (build_new_function_call): Be careful about updating candidates.
5824 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
5825 asked to make illegal calls.
5826 * class.c: Include splay-tree.h.
5827 (class_stack_node): Add names_used slot.
5828 (check_member_decl_is_same_in_complete_scope): Remove.
5829 (add_method): Fix comment. Push the declaration into class
5831 (finish_struct_1): When popping the class, pop the bindings too.
5832 Remove check for data member/function member conflict.
5833 (finish_struct): Remove calls to
5834 check_member_decl_is_same_in_complete_scope. Change calls to
5836 (pushclass): Clear names_used in the class stack entry.
5837 Use invalidate_class_lookup_cache to remove cached entries, rather
5838 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
5839 before entering a new class. Remove dead code. Don't mess with
5840 current_function_decl when pushing declarations.
5841 (invalidate_class_lookup_cache): New function, split out from ...
5842 (popclass): Here. Clean up names_used on our way out.
5843 (instantiate_type): Adjust.
5844 (build_self_reference): Don't push the declaration here.
5845 (maybe_note_name_used_in_class): New function.
5846 (note_name_declared_in_class): Likewise.
5847 * decl.c (add_binding): Change prototype.
5848 (find_class_binding_level): New function.
5849 (innermost_nonclass_level): Likewise.
5850 (current_binding_level): Update documentation.
5851 (inner_binding_level): Remove. Replace with current_binding_level
5853 (push_binding_level): Remove special handling of
5854 class_binding_level.
5855 (pop_binding_level): Likewise. Use find_class_binding_level.
5856 (suspend_binding_level): Likewise.
5857 (global_bindings_p): Use innermost_nonclass_level.
5858 (toplevel_bindings_p): Likewise.
5859 (namespace_bindings_p): Likewise.
5860 (pseudo_global_level_p): Likewise.
5861 (push_binding): Clear INHERITED_VALUE_BINDING_P.
5862 (add_binding): Check for illegal multiple declarations. Return a
5863 value indicating whether or not the new binding was legal.
5864 (push_local_binding): Skip over class binding levels. Check
5865 return value from add_binding.
5866 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
5867 note_name_declared_in_class.
5868 (pushlevel_class): Remove "fake out the rest of the compiler"
5870 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
5871 (clear_identifier_class_values): New function.
5872 (pop_from_top_level): Use it.
5873 (pop_everything): Tweak.
5874 (maybe_process_template_type_declaration): Don't push the
5875 declaration for the template here.
5876 (pushtag): Don't push tag declarations into class scope here.
5877 (pushdecl): Apply DeMorgan's law for readability.
5878 (pushdecl_class_level): Remove special-case code for
5879 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
5880 (push_class_level_bindng): Deal with inherited bindings.
5881 (lookup_name_real): Remove special-case code for
5882 TYPE_BEING_DEFINED, and some implicit typename magic.
5883 (grokdeclarator): Handle COMPONENT_REF for a template function.
5884 (build_enumerator): Don't call pushdecl_class_level here.
5885 (id_in_current_class): Remove.
5886 * decl2.c (grokfield): Don't call pushdecl_class_level or
5887 check_template_shadow.
5888 * errfn.c (cp_file_of): Don't declare.
5889 (cp_line_of): Likewise.
5890 * error.c (dump_decl): Handle an OVERLOAD.
5891 (cp_file_of): Likewise.
5892 (cp_line_of): Likewise.
5893 * init.c (build_member_call): Handle a COMPONENT_REF.
5894 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
5895 pushdecl_class_level.
5896 * method.c (hack_identifier): Build COMPONENT_REFs for references
5897 to member templates as well as member functions. Remove dead
5899 * parse.y (left_curly): Remove.
5900 (nonnested_type): Call maybe_note_name_used_in_class, not
5901 pushdecl_class_level.
5902 * parse.c: Regenerated.
5903 (nested_name_specifier_1): Likewise.
5904 * pt.c (check_explicit_specialization): Adjust, for robustness.
5905 (check_template_shadow): Handle OVERLOADs.
5906 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
5907 TEMPLATE_DECL, if appropriate.
5908 * search.c (envelope_add_decl): Remove.
5909 (dfs_pushdecls): Likewise.
5910 (dfs_compress_decls): Likewise.
5911 (dfs_push_decls): New function.
5912 (dfs_push_type_decls): Likewise.
5913 (setup_class_bindings): Likewise.
5914 (template_self_reference_p): Likewise.
5915 (lookup_field_r): Use it.
5916 (looup_member): Remove old comment. Deal with ambiguity.
5917 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
5918 and remove envelope processing.
5919 * semantics.c (begin_class_definition): Let pushclass push
5920 declarations for base classes.
5921 (finish_member_declaration): Push declarations into class scope.
5922 * typeck.c (build_component_ref): Just put an OVERLOAD into the
5923 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
5924 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
5925 * Makefile.in (class.o): Depend on splay-tree.h.
5927 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
5929 * cvt.c (convert_pointer_to_real): Use same_type_p.
5930 * typeck.c (comp_target_types): Use same_type_p.
5932 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
5934 * semantics.c (begin_inline_definitions,
5935 finish_inline_definitions): Rename from finish_default_args and
5936 begin_inline_definitions, respectively, to something that isn't a
5938 * parse.y (structsp): Adjust.
5940 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
5941 (list_hash_lookup): Likewise.
5942 (hash_tree_chain): Adjust.
5943 * pt.c (tsubst): Adjust.
5944 (tsubst_arg_types): Use plain hash_tree_cons.
5945 * cp-tree.h (hash_tree_cons_simple): Lose.
5946 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
5948 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5950 * Makefile.in (hash.h): Generate using gperf language 'C', not
5951 'KR-C', so gperf uses the `const' keyword on strings.
5953 * gxx.gperf (resword): Const-ify a char*.
5955 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
5957 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
5958 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
5959 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
5960 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
5961 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
5962 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
5965 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
5967 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
5969 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
5971 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
5973 1999-03-27 Mark Mitchell <mark@codesourcery.com>
5975 * cp-tree.h (add_friend): Declare.
5976 (add_friends): Likewise.
5977 * friend.c (add_friend): Make it global. Don't add to
5978 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
5979 (add_friends): Make it global.
5980 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
5981 befriending class is a template.
5982 * parse.y (component_decl_1): Fix typo in comment.
5983 * parse.c: Regenerated.
5984 * pt.c (instantiate_class_template): Use add_friend and
5985 add_friends rather that duplicating some of their functionality
5988 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
5990 * call.c (build_field_call): Unify 'this' and non-'this' cases.
5992 * typeck.c (build_indirect_ref): Check for 'this' sooner.
5994 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5996 * call.c (op_error): Const-ify a char*.
5997 (add_candidate, source_type, add_warning): Add static prototype.
5998 (print_z_candidates): Const-ify a char*.
6000 * class.c (resolve_address_of_overloaded_function,
6001 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
6002 (get_vtable_name, finish_struct_1): Const-ify a char*.
6004 * cvt.c (convert_to_reference): Likewise.
6006 * decl.c (redeclaration_error_message, record_builtin_type,
6007 record_unknown_type, member_function_or_else, bad_specifiers):
6009 (find_binding, select_decl, unqualified_namespace_lookup,
6010 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
6011 Add static prototype.
6012 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
6013 implicitly_declare, record_builtin_java_type, define_function,
6014 grok_op_properties, tag_name): Const-ify a char*.
6016 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
6017 (define_function, finish_builtin_type): Const-ify a char*.
6018 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
6019 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
6020 (file_name_nondirectory): Const-ify a char*.
6021 (init_filename_times): Don't prototype.
6022 (compiler_error): Prototype.
6023 (yyerror, init_repo): Const-ify a char*.
6024 (build_srcloc): Don't prototype.
6025 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
6027 (warn_for_assignment): Don't prototype.
6028 (convert_for_initialization, readonly_error, check_for_new_type,
6029 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
6032 * decl2.c (acceptable_java_type, output_vtable_inherit,
6033 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
6034 merge_functions, decl_namespace, validate_nonmember_using_decl,
6035 do_nonmember_using_decl): Add static prototype.
6036 (lang_f_options): Const-ify a char*.
6037 (finish_builtin_type): Likewise.
6038 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
6041 * errfn.c: Include cp-tree.h.
6042 (cp_thing): Add static prototype.
6043 (compiler_error): Don't protoptype.
6044 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
6045 passing it to `cp_thing'.
6047 * error.c (interesting_scope_p): Add static prototype.
6049 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
6052 * init.c (compiler_error): Don't prototype.
6053 (member_init_ok_or_else): Const-ify a char*.
6054 (build_java_class_ref): Add static prototype.
6056 * lex.c (compiler_error): Don't prototype.
6057 (get_time_identifier, interface_strcmp, extend_token_buffer,
6058 handle_cp_pragma): Const-ify a char*.
6059 (is_global, init_filename_times): Add static prototype.
6060 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
6061 (compiler_error): Change from fixed args to variable args.
6062 (yyerror): Const-ify a char*.
6064 * parse.y (cond_stmt_keyword): Const-ify a char*.
6065 (parse_decl): Add static prototype.
6067 * pt.c (template_args_equal, print_template_context): Likewise.
6068 (print_candidates, check_default_tmpl_args): Const-ify a char*.
6069 (instantiate_class_template): Likewise.
6071 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
6073 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
6074 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
6076 * search.c (lookup_field_info, lookup_member): Likewise.
6077 (lookup_member): Cast the first argument of `bzero' to a PTR.
6079 * sig.c (compiler_error): Don't prototype.
6080 (build_signature_pointer_or_reference_nam): Const-ify a char*.
6081 (get_sigtable_name, build_member_function_pointer): Likewise.
6083 * tree.c (compiler_error): Don't prototype.
6084 (no_linkage_helper, build_srcloc): Add static prototype.
6085 (build_vbase_pointer_fields): Const-ify a char*.
6086 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
6088 * typeck.c (compiler_error): Don't prototype.
6089 (convert_for_assignment): Const-ify a char*.
6090 (comp_cv_target_types): Add static prototype.
6091 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
6092 build_component_addr, build_unary_op, convert_for_initialization):
6095 * typeck2.c (ack): Add static prototype and change from fixed args
6097 (readonly_error, check_for_new_type): Const-ify a char*.
6099 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
6100 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
6101 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
6102 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
6103 gen_assign, GNU_xref_member): Const-ify a char*.
6105 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
6107 * gxxint.texi: Remove old discussion on copying virtual bases.
6109 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
6111 * Make-lang.in: Remove all references to g++.o/g++.c.
6112 Link g++ from gcc.o.
6114 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
6116 * decl2.c (comdat_linkage): Treat vtables like functions.
6118 1999-03-25 Mark Mitchell <mark@codesourcery.com>
6120 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
6122 1999-03-25 Nathan Sidwell <nathan@acm.org>
6124 * decl.c (init_decl_processing): Add `signed' type as a synonym
6127 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
6129 * typeck.c (common_type): Handle cv-qual unification for pointers
6132 * decl.c (unqualified_namespace_lookup): Return error_mark_node
6134 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
6135 * lex.c (do_identifier): If we got error_mark_node, call
6138 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6140 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
6143 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
6145 * decl.c (lookup_name_real): Do nested field lookup regardless of
6148 1999-03-24 Mark Mitchell <mark@codesourcery.com>
6150 * cp-tree.h (lang_type): Remove has_assignment and
6151 has_real_assignment. Add befriending_classes.
6152 (TYPE_HAS_ASSIGNMENT): Remove.
6153 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
6154 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
6155 (lang_decl): Document.
6156 (DECL_BEFRIENDING_CLASSES): New macro.
6157 (FRIEND_NAME): Move declaration to more obvious location.
6158 (FRIEND_DECLS): Likewise.
6159 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
6160 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
6161 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
6162 (grok_op_properties): Likewise.
6163 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
6164 (add_friend): Likewise. Don't do weird things with assignment
6165 operators. Update DECL_BEFRIENDING_CLASSES.
6166 (add_friends): Don't do weird things with assignment operators.
6167 (make_friend_class): Likewise. Update
6168 CLASSTYPE_BEFRIENDING_CLASSES.
6169 * pt.c (instantiate_class_template): Don't set
6170 TYPE_HAS_ASSIGNMENT.
6171 (tsubst_copy): Substitute the TREE_TYPE for more unary
6173 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
6174 * search.c (protected_accessible_p): New function.
6175 (friend_accessible_p): Likewise.
6176 (accessible_p): Use them.
6178 1999-03-23 Mark Mitchell <mark@codesourcery.com>
6180 * pt.c (convert_nontype_argument): Don't create things that aren't
6181 PTRMEM_CSTs when applying a qualification conversion to a
6184 1999-03-23 Mark Mitchell <mark@codesourcery.com>
6186 * Makefile.in (OBJS): Don't mention hash.o.
6187 (OBJDEPS): Likewise.
6189 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
6191 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
6192 * decl.c (expand_static_init): Make sure we don't add any after
6195 * decl.c (cp_finish_decl): Move intelligence about handling
6196 DECL_COMDAT for variables from here...
6197 * decl2.c (comdat_linkage): ...to here.
6198 (maybe_make_one_only): Tweak.
6199 (import_export_decl): Call comdat_linkage for variables, too.
6200 (finish_file): Handle template statics properly.
6202 1999-03-22 Mark Mitchell <mark@codesourcery.com>
6204 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
6205 Document internals of pointer-to-member-functions.
6206 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
6207 (PFN_FROM_PTRMEMFUNC): Likewise.
6208 (build_type_conversion): Remove unused parameter.
6209 (build_ptrmemfunc1): Declare.
6210 (expand_ptrmemfunc_cst): New function.
6211 (delta2_from_ptrmemfunc): Likewise.
6212 (pfn_from_ptrmemfunc): Likewise.
6213 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
6214 build_type_conversion. Use TYPE_PTRMEM_P for readability.
6215 (convert_to_reference): Remove unused parameter to
6216 build_type_conversion.
6217 (ocp_convert): Likewise.
6218 (build_user_type_conversion): Likewise.
6219 * error.c (dump_expr): Handle NULL pointer-to-member functions.
6220 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
6221 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
6222 open when handling pointer-to-member functions.
6223 * pt.c (convert_nontype_argument): Clean up error messages. Be
6224 more stringent with pointers-to-members.
6225 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
6226 (build_unary_op): Tidy ever-so-slightly.
6227 (build_conditional_expr): Remove extra parameter to
6228 build_type_conversion.
6229 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
6231 (expand_ptrmemfunc_cst): Define.
6232 (delta2_from_ptrmemfunc): Likewise.
6233 (pfn_from_ptrmemfunc): Likewise.
6235 1999-03-19 Mark Mitchell <mark@codesourcery.com>
6237 * init.c (build_member_call): Handle template-id expressions
6239 * typeck.c (build_x_function_call): Likewise.
6241 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
6243 * friend.c (make_friend_class): Avoid core dump when
6244 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
6246 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
6248 * decl.c (start_function): Suppress normal linkage heuristics
6249 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
6251 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
6253 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
6254 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
6256 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
6258 * parse.y (named_complex_class_head_sans_basetype):
6259 Do not push a scope for error_mark_node.
6260 (maybe_base_class_list): Likewise.
6262 * decl.c (start_decl): Check for error_mark_node as a type.
6263 Detected by g++.brendan/array-refs.C.
6264 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
6265 (maybe_build_cleanup_1): Likewise. Detected by
6266 g++.jason/incomplete1.C.
6268 * tree.c (build_dummy_object): Use void_zero_node instead of the
6270 (is_dummy_object): Check for such a node.
6271 Detected by g++.bob/inherit1.C
6273 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
6275 * method.c (old_backref_index): Split out...
6276 (flush_repeats): From here. Rename back from try_old_backref.
6277 (build_mangled_name): Put back some old-style repeat handling.
6279 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6281 * lex.c: Don't include setjmp.h.
6282 (parse_float): New static function.
6283 (pf_args): New struct.
6284 (real_yylex): Use them in call to `do_float_handler'.
6286 1999-03-15 Mark Mitchell <mark@markmitchell.com>
6288 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
6289 * tree.c (layout_basetypes): Not here.
6290 * search.c (dfs_search): Remove; no longer used.
6292 1999-03-12 Mark Mitchell <mark@markmitchell.com>
6294 * decl2.c (validate_nonmember_using_decl): Issue sensible
6295 error-messages on bogus qualifiers.
6297 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
6299 * call.c (add_function_candidate): Fix uninitialized variable.
6301 * Makefile.in (search.o): Add dependency on varray.h.
6303 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
6305 * decl.c (duplicate_decls): Use same_type_p.
6306 * method.c (try_old_backref): Renamed from flush_repeats. Use
6307 same_type_p. Don't try to handle repeats. Return success.
6308 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
6309 calls from old-style code, too.
6310 (check_ktype): Use same_type_p.
6311 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
6312 (build_qualified_name): Simplify logic.
6313 (process_overload_item): Strip typedefs and quals at the top.
6314 (build_mangled_name_for_type_with_Gcode): Remove call to
6315 type_canonical_variant.
6316 (build_mangled_name): Likewise. Remove support for old-style
6317 repeats, which have been disabled since 2.7.2. Don't mess with
6319 (build_decl_overload_real): Don't mess with TREE_USED.
6321 1999-03-13 Nathan Sidwell <nathan@acm.org>
6323 * error.c (cp_printers): Add 'F' escape character.
6324 (dump_type_real): Remove TREE_LIST (fnargs) printing.
6325 Functionality moved to dump_parameters.
6326 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
6327 (dump_function_decl): Extend meaning of V parameter. Use
6328 dump_parameters and dump_exception_spec.
6329 (dump_parameters): New static function.
6330 (dump_exception_spec): New static function.
6331 (fndecl_as_string): Change argument semantics. Use
6332 dump_function_decl directly.
6334 * sig.c (build_signature_table_constructor): Use cp_error.
6336 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
6338 * semantics.c (finish_switch_cond): Handle error cases gracefully.
6339 Detected by g++.law/enum5.C.
6341 * typeck.c (build_modify_expr): Check for errors after resolving
6342 offsets. Detected by g++.brendan/static1.C.
6344 * decl.c (complete_array_type): Ignore initial_value if it is an
6345 error. Detected by g++.benjamin/17930.C.
6347 * typeck2.c (process_init_constructor): Return error if one argument
6348 is in error. Detected by g++.benjamin/13478.C.
6350 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
6352 * decl.c (select_decl): Allow class templates when we need types.
6353 * decl2.c (ambiguous_decl): Likewise.
6355 1999-03-12 Mark Mitchell <mark@markmitchell.com>
6357 * lex.c (do_identifier): Correct call to enforce_access.
6358 * search.c (accessible_p): Tweak comment.
6360 1999-03-10 Mark Mitchell <mark@markmitchell.com>
6362 * semantics.c (begin_class_definition): Call build_self_reference.
6363 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
6365 * search.c (assert_canonical_unmarked): Fix typo in prototype.
6367 * search.c (dfs_canonical_queue): New function.
6368 (dfs_assert_unmarked_p): Likewise.
6369 (assert_canonical_unmarked): Likewise.
6370 (access_in_type): Use it.
6371 (accessible_p): Likewise. Walk the whole tree when umarking.
6373 * sig.c (build_signature_table_constructor): Use accessible_p
6374 instead of compute_access.
6376 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
6378 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
6380 1999-03-09 Mark Mitchell <mark@markmitchell.com>
6382 * cp-tree.h (flag_access_control): Declare.
6383 (TREE_VIA_PPUBLIC): Document.
6384 (DECL_NONSTATIC_MEMBER_P): New macro.
6385 (enforce_access): Return an indication of whether or not access
6387 (build_self_reference): Change prototype.
6388 (compute_access): Replace with ...
6389 (accessible_p): New function.
6390 (dfs_walk): Change prototype.
6391 (dfs_unmark): Likewise.
6392 (markedp): Likewise.
6393 * call.c (enforce_access): Use accessible_p.
6394 * class.c (build_self_reference): Insert the declaration into the
6395 list of members for this type, and make it public.
6396 * decl.c (xref_basetypes): Avoid ill-timed recursion.
6397 * init.c (build_offset_ref): Use lookup_member, not three separate
6398 name-lookups. Call enforce_access rather than checking for
6399 illegal accesses here.
6400 (resolve_offset_ref): Likewise.
6401 * lex.c (do_identifier): Likewise.
6402 * method.c (hack_identifier): Likewise.
6403 * parse.y (self_reference): Remove.
6404 (opt_component_decl_list): Don't use it.
6405 * parse.c: Regenerated.
6406 * pt.c (print_candidates): Generalize to handle lists of
6407 overloaded functions.
6408 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
6410 (get_template_base): Use new calling convention for dfs_walk.
6411 * search.c: Include varray.h. Add prototypes.
6412 (dfs_walk): Accept a data pointer to pass to the work functions.
6413 All callers changed. All work functions changed.
6414 (breadth_first_search): Rename to bfs_walk, and make consistent
6416 (dfs_walk_real): New function.
6417 (canonical_binfo): New function.
6418 (context_for_name_lookup): Likewise.
6419 (shared_marked_p): Likewise.
6420 (shared_unmarked_p): Likewise.
6421 (lokup_field_queue_p): Likewise.
6422 (lookup_field_r): Generalize to handle both functions and fields.
6423 (lookup_field): Just call lookup_member.
6424 (lookup_fnfields): Likewise.
6425 (lookup_member): Move body of lookup_field here and generalize.
6426 (dfs_accessible_queue_p): Likewise.
6427 (dfs_accessible_p): Likewise.
6428 (dfs_access_in_type): Likewise.
6429 (access_in_type): Likewise.
6430 (compute_access): Remove, and replace with ...
6431 (accessible_p): New function.
6432 (vbase_types): Remove.
6433 (vbase_decl_ptr_intermediate): Likewise.
6434 (vbase_decl_ptr): Likewise.
6435 (vbase_init_result): Likewise.
6436 (closed_envelopes): Likewise.
6437 (bvtable): Likewise.
6439 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
6441 * call.c (add_function_candidate): Check for proper number of args
6442 before checking the validity of those args.
6444 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
6446 * cp-tree.h (struct lang_type): Add anon_union field.
6447 (ANON_UNION_TYPE_P): Use it instead of examining type.
6448 (SET_ANON_UNION_TYPE_P): New macro.
6449 * decl.c (check_tag_decl): Use it.
6451 * search.c (compute_access): Handle non-type contexts earlier, and
6454 * tree.c (build_exception_variant): Use copy_to_permanent.
6456 * decl2.c (setup_initp): Give statics with no priority the default
6458 (do_dtors, do_ctors, finish_file): Remove special handling of
6459 non-prioritized statics.
6461 1999-03-05 Mark Mitchell <mark@markmitchell.com>
6463 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
6464 * decl.c (make_typename_type): Don't issue an error if an
6465 immediate lookup fails; it migt be resolved later.
6466 * friend.c (is_friend): Add comment.
6467 * search.c (breadth_first_search): Add POSTFN and DATA
6468 parameters. Tidy. All callers changed.
6469 (lookup_field_queue_p): New function.
6470 (lookup_field_r): Likewise.
6471 (lookup_field_post): Likewise.
6472 (lookup_field): Use them, via breadth_first_search, instead of
6474 (compute_access): Robustify.
6475 (lookup_fnfield_info): New structure.
6477 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
6479 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
6481 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
6483 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
6486 * decl2.c (import_export_class): Also return if
6487 CLASSTYPE_INTERFACE_ONLY is set.
6489 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
6491 * decl.c (push_overloaded_decl): Only overwrite the old binding if
6493 * decl2.c (do_local_using_decl): Fix loop termination.
6495 1999-03-02 Mark Mitchell <mark@markmitchell.com>
6497 * cp-tree.h (determine_specialization): Don't declare.
6498 * pt.c (determine_specialization): Make it static. Eliminate
6499 complain parameter. Note that decl is always non-NULL now, and
6500 simplify accordingly.
6502 * decl.c (maybe_push_to_top_level): Always call
6503 push_cp_function_context.
6504 (pop_from_top_level): Always call pop_cp_function_context.
6506 1999-02-26 Nathan Sidwell <nathan@acm.org>
6508 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
6510 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
6511 * init.c (build_new_1): Extra arg to complete_type_or_else.
6512 (build_delete): Likewise.
6513 * typeck.c (require_complete_type): Likewise.
6514 (pointer_int_sum): Likewise.
6515 (pointer_diff): Likewise.
6516 (build_component_ref): Likewise.
6518 * typeck2.c (incomplete_type_error): Always use cp_error.
6519 Show declaration of undefined type, if appropriate.
6520 Deal with UNKNOWN_TYPE nodes.
6522 * typeck.c (require_complete_type): Use TYPE_SIZE as
6523 size_zero_node to mean incomplete type.
6524 (require_complete_type_in_void): New function.
6525 (build_compound_expr): Call complete_type_in_void for LHS.
6526 (build_c_cast): Call complete_type_in_void for void cast.
6527 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
6528 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
6529 require_complete_type_in_void. Call it.
6530 * cp-tree.h (require_complete_type_in_void): Prototype new function.
6532 * typeck.c (convert_arguments): Use alternative format for
6533 function decls. Don't require_complete_type here. Simplify
6534 diagnostic printing.
6535 (convert_for_initialization): Don't require_complete_type on RHS yet.
6536 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
6538 * call.c (build_over_call): Cope with qualified void return type.
6539 * semantics.c (finish_call_expr): Likewise.
6540 * typeck.c (build_function_call_real): Likewise.
6541 (c_expand_return): Likewise.
6542 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
6544 * call.c (print_z_candidates): Use alternate print format, to be
6545 consistent with (pt.c) print_candidates.
6546 * method.c (hack_identifier): List candidate members.
6547 * search.c (lookup_field): Build ambiguous list, and show it, if
6550 1999-02-26 Mark Mitchell <mark@markmitchell.com>
6552 * typeck.c (decay_conversion): Don't confuse constant array
6553 variables with their initializers.
6555 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
6557 * pt.c (regenerate_decl_from_template): Tweak for clarity.
6558 (instantiate_decl): Mark a decl instantiated before regenerating
6559 it to avoid recursion.
6560 * tree.c (mapcar): Don't call decl_constant_value unless we know
6561 something is TREE_READONLY_DECL_P.
6563 * class.c (check_for_override): Don't stop checking when we find
6564 the first overridden function. Delete #if 0'd code.
6565 * search.c (get_matching_virtual): Likewise.
6567 1999-02-25 Richard Henderson <rth@cygnus.com>
6569 * lang-specs.h: Define __FAST_MATH__ when appropriate.
6571 1999-02-24 Mike Stump <mrs@wrs.com>
6573 * typeck.c (convert_for_assignment): Allow boolean integral constant
6574 expressions to convert to null pointer.
6576 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
6578 * decl.c (lookup_namespace_name): Resolve namespace aliases.
6580 * class.c (push_nested_class): Allow namespaces.
6582 * decl2.c (set_decl_namespace): Add friendp parameter.
6583 * decl.c (grokfndecl): Pass it.
6584 (grokvardecl): Likewise.
6585 * cp-tree.h: Change declaration.
6587 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
6589 * pt.c (tsubst): Allow an array of explicit size zero.
6591 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
6593 * errfn.c: Change varargs code to look like toplev.c.
6595 * method.c (process_modifiers): Don't prepend 'U' for char or
6598 1999-02-20 Craig Burley <craig@jcb-sc.com>
6600 * Make-lang.in (cplib2.ready): Don't consider updating
6601 cplib2 stuff if the current directory isn't writable, as
6602 it won't work (such as during a `make install').
6604 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
6606 * decl2.c (start_objects): Make file scope constructors and
6607 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
6608 ASM_OUTPUT_DESTRUCTOR are defined.
6610 1999-02-19 Mark Mitchell <mark@markmitchell.com>
6612 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
6613 (fn_type_unification): Adjust prototype.
6614 (lookup_fnfields_1): Declare.
6615 * call.c (add_template_candidate_real): Adjust call to
6616 fn_type_unification.
6617 * class.c (add_method): Don't allow duplicate declarations of
6618 constructors or destructors.
6619 (resolve_address_of_overloaded_function): Remove unused variable.
6620 Adjust call to fn_type_unification.
6621 * decl.c (grokfndecl): Be more robust in the face of illegal
6623 * decl2.c (check_classfn): Remove hokey handling of member
6625 * pt.c (determine_specialization): Improve comments. Adjust to
6626 handle template argument deduction as per the standard.
6627 (check_explicit_specialization): Fix comment spacing. Handle
6628 type-conversion operators correctly. Improve error-recovery.
6629 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
6630 (get_bindings_real): Simplify handling of static members.
6631 * search.c (lookup_fnfields_1): Make it have external linkage.
6632 * typeck.c (compparms): Fix comment.
6633 (build_unary_op): Don't try to figure out which template
6634 specialization is being referred to when when the address-of
6635 operator is used with a template function.
6637 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6639 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
6640 keyword to match an analogous change at the top level.
6642 * tree.c (lvalue_or_else): Likewise.
6644 1999-02-17 Mark Mitchell <mark@markmitchell.com>
6646 * decl.c (xref_basetypes): Comment.
6647 * pt.c (instantiate_class_template): Use xref_basetypes.
6649 1999-02-16 Mark Mitchell <mark@markmitchell.com>
6651 * cp-tree.h (tsubst): Change prototype.
6652 (tsubst_expr): Likewise.
6653 (tsubst_copy): Likewise.
6654 (type_unification): Remove prototype.
6655 * call.c (convert_default_arg): Adjust call to tsubst_expr.
6656 * class.c (resolve_address_of_overloaded_function): Just use
6657 fn_type_unification.
6658 * decl.c (grokdeclarator): Adjust call to tsubst.
6659 * method.c (build_template_parm_names): Likewise.
6660 * pt.c (GTB_VIA_VIRTUAL): New macro.
6661 (GTB_IGNORE_TYPE): Likewise.
6662 (resolve_overloaded_unification): Add `complain' parameter.
6663 (try_one_overload): Likewise.
6664 (tsubst_template_arg_vector): Likewise.
6665 (tsubst_template_parms): Likewise.
6666 (tsubst_aggr_type): Likewise.
6667 (tsubst_arg_types): Likewise.
6668 (tsubst_call_declarator_parms): Likewise.
6669 (unify): Remove explicit_mask.
6670 (type_unification_real): Likewise.
6671 (get_template_base_recursive): Likewise.
6672 (coerce_template_template_parms): Provide prototype.
6673 (tsubst_function_type): Likewise.
6674 (try_class_unification): New function.
6675 All callers changed to use new complain parameter.
6676 (get_template_base): Use try_class_unification.
6677 (unify): Adjust handling of classes derived from template types.
6678 (fn_type_unification): Substitute explicit arguments before
6681 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6683 * decl.c (pushdecl): Remove dead code.
6685 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
6687 * decl2.c (finish_objects): Fix code I missed in previous change.
6689 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
6691 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
6692 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
6694 * pt.c (maybe_process_partial_specialization): Complain about
6695 'template <>' on non-specialization.
6697 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
6699 * decl.c (grokdeclarator): Catch wierd declarators.
6700 * decl2.c (finish_file): Don't abort because of namespace parsing
6702 (check_decl_namespace): Remove.
6704 1999-02-09 Mark Mitchell <mark@markmitchell.com>
6706 * cp-tree.h (get_template_base): Don't declare.
6707 (dfs_walk): Declare.
6708 (dfs_unmark): Likewise.
6709 (markedp): Likewise.
6710 * pt.c (unify): Remove duplicate declaration. Pass tparms and
6711 targs to get_template_base.
6712 (get_template_base_recursive): Move here from search.c. Check to
6713 see that the base found can be instantiated to form the desired
6715 (get_template_base): Likewise.
6716 (get_class_bindings): Simplify.
6717 * search.c (get_template_base_recursive): Move to pt.c.
6718 (get_template_base): Likewise.
6719 (markedp): Make it global.
6720 (dfs_walk): Likewise.
6721 (dfs_unmark): Likewise.
6723 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
6725 * pt.c (maybe_process_partial_specialization): Complain about
6726 specialization in wrong namespace.
6727 * tree.c (decl_namespace_context): New fn.
6729 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6731 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
6732 * pt.c (coerce_template_template_parms): Handle nested
6733 template template parameters.
6735 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
6737 * typeck2.c: Update email addresses.
6739 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6741 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
6744 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
6746 * lex.c (retrofit_lang_decl): Split out...
6747 (build_lang_decl): From here.
6748 * decl.c (pushdecl): Call it for functions generated by the middle
6749 end that don't have DECL_LANG_SPECIFIC.
6750 * cp-tree.h: Declare it.
6752 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
6753 (start_objects, finish_objects): Only use special
6754 init_priority code if the user specified a priority.
6755 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
6758 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
6760 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
6761 mkstemp.o. Get them from libiberty now.
6762 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
6764 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6766 * decl2.c (lang_decode_option): Use read_integral_parameter.
6768 1999-02-01 Mark Mitchell <mark@markmitchell.com>
6770 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
6771 before calling complete_type_or_else.
6773 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6775 * input.c (inline): Don't define, its handled by system.h.
6777 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
6779 * decl2.c: Don't define flag_no_ident here. Don't process
6781 * cp-tree.h: Don't declare flag_no_ident here.
6782 * lang-specs.h: Map -Qn to -fno-ident.
6784 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
6786 * cp-tree.h (struct tree_binding): Replace scope field with a union.
6787 (BINDING_SCOPE): Adjust.
6788 * decl.c (BINDING_LEVEL): Adjust.
6790 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
6792 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
6795 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
6798 * tree.c (equal_functions): Fix name in prototype.
6800 * decl.c (push_local_binding): Add FLAGS argument.
6801 (pushdecl, push_overloaded_decl): Pass it.
6802 * decl2.c (do_local_using_decl): Likewise.
6803 * cp-tree.h: Adjust prototype.
6804 * decl.c (poplevel): Fix logic.
6806 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
6807 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
6808 (cat_namespace_levels): Don't loop forever.
6810 1999-01-25 Richard Henderson <rth@cygnus.com>
6812 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
6814 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
6816 * class.c (resolve_address_of_overloaded_function): Mark the
6817 chosen function used.
6819 * call.c (build_call): Make sure that a function coming in has
6820 been marked used already.
6821 * decl.c (expand_static_init): Call mark_used instead of
6823 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
6824 alloc_eh_object, expand_throw): Likewise.
6825 * init.c (build_builtin_delete_call): Likewise.
6826 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
6827 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
6828 expand_generic_desc): Likewise.
6830 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
6832 * tree.c (equal_functions): New function.
6833 (ovl_member): Call it.
6835 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
6837 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
6839 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
6841 * decl.c (decls_match): Return 1 if old and new are identical.
6842 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
6844 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
6846 * decl.c (start_function): Make member functions one_only on windows.
6847 * decl2.c (import_export_decl): Likewise.
6849 * decl.c (grokdeclarator): Don't complain about implicit int in
6850 a system header. Change same-name field check to not complain in
6851 a system header instead of within extern "C".
6853 1999-01-21 Mark Mitchell <mark@markmitchell.com>
6855 * cp-tree.h (PUSH_GLOBAL): New macro.
6856 (PUSH_LOCAL): Likewise.
6857 (PUSH_USING): Likewise.
6858 (namespace_bindings_p): Declare.
6859 (push_overloaded_decl): Likewise.
6860 * decl.c (push_overloaded_decl): Don't make it static. Check for
6861 illegal declarations after using declarations here.
6862 (namespace_bindings_p): Likewise.
6863 (duplicate_decls): Don't consider declarations from different
6864 namespaces to be the same.
6865 (pushdecl): Use symbolic PUSH_ constants in calls to
6866 push_overloaded_decl.
6867 (push_overloaded_decl_1): Likewise.
6868 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
6869 (do_nonmember_using_decl): Check for illegal using declarations
6870 after ordinary declarations here.
6871 (do_local_using_decl): Call pushdecl to insert declarations.
6873 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
6875 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
6877 1999-01-21 Mark Mitchell <mark@markmitchell.com>
6879 * tree.c (build_cplus_array_type_1): Don't call build_array_type
6880 for types involving template parameters.
6882 * cp-tree.h (PARM_DECL_EXPR): Delete.
6883 (convert_default_arg): Change prototype.
6884 (check_default_argument): Declare.
6885 (search_tree): Likewise.
6886 * call.c (convert_default_arg): Take the function to which the
6887 default argument belongs as a parameter, and do any necessary
6888 instantiation here, instead of ...
6889 (build_over_call): Here.
6890 * decl.c (local_variable_p): New function.
6891 (check_default_argument): Likewise, split out and tidied from ...
6893 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
6894 * pt.c (tsubst_call_declarator_parms): New function.
6895 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
6896 with CALL_EXPRs, rather than trying to be clever.
6897 (tsubst): Use tsubst_call_declarator_parms.
6898 * tree.c (search_tree): Don't make it static.
6899 * typeck.c (convert_arguments): Use new interface to
6900 convert_default_arg.
6902 1999-01-20 Mark Mitchell <mark@markmitchell.com>
6904 * error.c (dump_function_decl): Don't print the argument types for
6905 a function when the verbosity level is negative.
6907 * call.c (build_over_call): Check format attributes at call-time.
6909 * pt.c (tsubst_copy): Fix comment.
6910 (unify): Don't allow unification with variable-sized arrays.
6912 * semantics.c (finish_stmt_expr): When processing a template make
6913 the BIND_EXPR long-lived.
6915 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
6917 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
6918 (import_export_vtable): Not here.
6920 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
6922 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
6923 non-static member function.
6925 1999-01-18 Nathan Sidwell <nathan@acm.org>
6927 * class.c (instantiate_type): Only diagnose illegal address of member
6928 function if complaining.
6930 * decl.c (lookup_name_real): Remove duplicate code.
6932 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
6934 * tree.c (copy_template_template_parm): Use permanent_obstack.
6936 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6938 * pt.c (unify): Remove restrictions on deduction of argument
6939 of template template parameters.
6941 1999-01-18 Nathan Sidwell <nathan@acm.org>
6943 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
6945 * class.c (resolve_address_of_overloaded_function): Show list of
6946 all candidates, when none of them match.
6948 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
6950 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
6951 definition of 'casting away const' in reinterpret_cast<>.
6953 1999-01-18 Graham <grahams@rcp.co.uk>
6955 * cvt.c: Add include for decl.h, remove extern for
6956 static_aggregates which is now provided by decl.h.
6958 * Makefile.in (cvt.o): Add dependency for decl.h and missing
6959 dependencies for convert.h and flags.h.
6961 1999-01-18 Nathan Sidwell <nathan@acm.org>
6963 * decl2.c (do_dtors): Set current location to that of the
6964 decl, for sensible diagnostics and debugging.
6965 (check_classfn): Issue `incomplete type' error, if
6966 class is not defined.
6968 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
6970 * cp-tree.h: Add prototype for bound_pmf_p.
6972 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
6973 Manfred Hollstein <manfred@s-direktnet.de>
6975 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
6978 1999-01-16 Nathan Sidwell <nathan@acm.org>
6980 * cp-tree.h (struct lang_type): Added has_mutable flag.
6981 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
6982 (TYPE_HAS_MUTABLE_P): New macro to read it.
6983 (cp_has_mutable_p): Prototype for new function.
6984 * class.c (finish_struct_1): Set has_mutable from members.
6985 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
6986 it contains a mutable.
6987 * typeck.c (cp_has_mutable_p): New function.
6989 1999-01-15 Mark Mitchell <mark@markmitchell.com>
6991 * pt.c (process_template_parm): Ignore top-level qualifiers on
6992 non-type parameters.
6994 * decl.c (start_function): Use current_function_parms in the call
6995 to require_complete_type_for_parms, not the probably empty
6998 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
7000 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
7002 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
7003 that we don't suppress the other copies.
7004 * lex.c (handle_cp_pragma): Likewise.
7006 1999-01-13 Mark Mitchell <mark@markmitchell.com>
7008 * decl.c (grokdeclarator): Undo 1998-12-14 change.
7009 * tree.c (build_cplus_array_type_1): Likewise.
7010 * pt.c (instantiate_class_template): Remove misleading comment.
7011 (tsubst_aggr_type): Substitute if there are template parameters,
7012 regardless of whether or not they use template arguments.
7013 (unify): Likewise, but for unification.
7015 1999-01-12 Richard Henderson <rth@cygnus.com>
7017 * cp-tree.h (flag_permissive): Declare extern.
7019 1999-01-06 Mark Mitchell <mark@markmitchell.com>
7021 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
7023 (lang_type): Add is_partial_instantiation. Decrease width of
7025 (PARTIAL_INSTANTIATION_P): New macro.
7026 (OPERATOR_TYPENAME_P): Remove.
7027 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
7028 OPERATOR_TYPENAME_P.
7029 (grok_op_properties): Likewise.
7030 * friend.c (do_friend): Handle friends that are member functions
7032 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
7033 * pt.c (instantiate_class_template): Rework for clarity. Avoid
7034 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
7035 any more partial instantiation than is absolutely necessary for
7036 implicit typename. Set PARTIAL_INSTANTIATION_P.
7037 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
7038 * semantics.c (begin_class_definition): Handle partial
7039 specializations of a type that was previously partially
7042 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
7044 * g++spec.c (LIBSTDCXX): Provide default definition.
7045 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
7047 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7049 * Make-lang.in (g++.o): Depend on prefix.h.
7051 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
7053 * tree.c (bound_pmf_p): New fn.
7054 * typeck.c (build_c_cast): Use it.
7056 * decl.c (grok_op_properties): Use same_type_p.
7058 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7060 * Makefile.in (cvt.o): Depend on toplev.h.
7062 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
7064 * cvt.c: Include toplev.h.
7066 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
7069 * init.c (expand_vec_init): Initialize variable `itype'.
7071 * lex.c (yyerror): Cast the argument passed to a ctype function to
7074 * method.c (build_mangled_C9x_name): Wrap prototype and definition
7075 in "HOST_BITS_PER_WIDE_INT >= 64".
7077 * typeck.c (build_binary_op): Mark parameter `convert_p' with
7080 1998-12-22 Mark Mitchell <mark@markmitchell.com>
7082 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
7083 * tree.c (build_exception_variant): Don't crash on empty throw
7086 1998-12-18 DJ Delorie <dj@cygnus.com>
7088 * cvt.c (convert_to_reference): Check for both error_mark_node
7089 and NULL_NODE after call to convert_for_initialization.
7091 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
7093 * error.c (interesting_scope_p): New fn.
7094 (dump_simple_decl): Use it.
7095 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
7096 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
7098 1998-12-16 Mark Mitchell <mark@markmitchell.com>
7100 * class.c (resolve_address_of_overloaded_function): Do conversion
7101 to correct type here, rather than ...
7102 (instantiate_type): Here.
7104 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
7105 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
7106 (decl_template_parm_p): Remove.
7107 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
7109 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
7110 * pt.c (push_inline_template_parms_recursive): Set it.
7111 (decl_template_parm_p): Remove.
7112 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
7113 (process_template_parm): Set it.
7115 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
7117 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
7118 if configured with cpplib.
7120 1998-12-15 Mark Mitchell <mark@markmitchell.com>
7122 * decl.c (poplevel): Make sure ns_binding is initialized.
7124 * decl.c (finish_function): Undo inadvertent change in previous
7127 1998-12-14 Mark Mitchell <mark@markmitchell.com>
7129 * class.c (pushclass): Tweak handling of class-level bindings.
7130 (resolve_address_of_overloaded_function): Update pointer-to-member
7132 (instantiate_type): Likewise.
7133 * cvt.c (cp_convert_to_pointer): Likewise.
7134 * decl.c (pop_binding): Take the DECL to pop, not just the name.
7135 Deal with `struct stat' hack.
7136 (binding_level): Add to documentation.
7137 (push_binding): Clear BINDING_TYPE.
7138 (add_binding): New function.
7139 (push_local_binding): Use it.
7140 (push_class_binding): Likewise.
7141 (poplevel): Adjust calls to pop_binding.
7142 (poplevel_class): Likewise.
7143 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
7144 declarations to current binding level.
7145 (push_class_level_binding): Likewise.
7146 (push_overloaded_decl): Adjust handling of OVERLOADs in local
7148 (lookup_namespace_name): Don't crash when confronted with a
7150 (lookup_name_real): Do `struct stat' hack in local binding
7152 (build_ptrmemfunc_type): Adjust documentation.
7153 (grokdeclarator): Don't avoid building real array types when
7154 processing templates unless really necessary.
7155 (finish_method): Adjust calls to pop_binding.
7156 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
7157 not reparse_decl_as_expr.
7158 (build_expr_from_tree): Deal with a template-id as the function to
7159 call in a METHOD_CALL_EXPR.
7160 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
7161 (maybe_adjust_types_For_deduction): Don't do peculiar things with
7163 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
7164 pointer-to-member types where necessary.
7165 * tree.c (build_cplus_array_type_1): Don't avoid building real
7166 array types when processing templates unless really necessary.
7167 (build_exception_variant): Compare the exception lists correctly.
7169 1998-12-13 Mark Mitchell <mark@markmitchell.com>
7171 * cp-tree.def (CPLUS_BINDING): Update documentation.
7172 * cp-tree.h (LOCAL_BINDING_P): New macro.
7173 (lang_identifier): Rename local_value to bindings.
7174 (tree_binding): Make `scope' of type `void*', not `tree'.
7175 (BINDING_SCOPE): Update documentation.
7176 (IDENTIFIER_LOCAL_VALUE): Remove.
7177 (IDENTIFIER_CLASS_VALUE): Document.
7178 (IDENTIFIER_BINDING): New macro.
7179 (IDENTIFIER_VALUE): Likewise.
7180 (TIME_IDENTIFIER_TIME): Likewise.
7181 (TIME_IDENTIFIER_FILEINFO): Likewise.
7182 (IMPLICIT_TYPENAME_P): Likewise.
7183 (set_identifier_local_value): Remove.
7184 (push_local_binding): New function.
7185 (push_class_binding): Likewise.
7186 * class.c (pushclass): Update comments; use push_class_binding.
7187 * decl.c (set_identifier_local_value_with_scope): Remove.
7188 (set_identifier_local_value): Likewise.
7189 (push_binding): New function.
7190 (pop_binding): Likewise.
7191 (binding_level): Update documentation. Remove shadowed.
7192 (BINDING_LEVEL): New macro.
7193 (free_binding_nodes): New variable.
7194 (poplevel): Adjust for new name-lookup scheme. Don't mess up
7195 BLOCK_VARs when doing for-scope extension. Remove effectively
7197 (pushlevel_class): Tweak formatting.
7198 (poplevel_class): Adjust for new name-lookup scheme.
7199 (print_binding_level): Likewise.
7200 (store_bindings): Likewise.
7201 (pushdecl): Likewise.
7202 (pushdecl_class_level): Likewise.
7203 (push_class_level_binding): Likewise.
7204 (push_overloaded_decl): Update comments. Adjust for new
7206 (lookup_name_real): Likewise.
7207 (lookup_name_current_level): Likewise.
7208 (cp_finish_decl): Likewise.
7209 (require_complete_types_for_parms): Likewise. Remove misleading
7211 (grok_parms): Likewise. Don't call
7212 require_complete_types_for_parms here.
7213 (grok_ctor_properties): Don't treat templates as copy
7215 (grop_op_properties): Or as assignment operators.
7216 (start_function): Document. Adjust for new name-lookup scheme.
7217 (finish_function): Likewise.
7218 * decl2.c (do_local_using_decl): Use push_local_binding.
7219 * lex.c (begin_definition_of_inclass_inline): New function, split
7221 (do_pending_inlines): Here, and ...
7222 (process_next_inline): Here.
7223 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
7224 (init_filename_times): Likewise.
7225 (extract_interface_info): Likewise.
7226 (ste_typedecl_interface_info): Likewise.
7227 (check_newline): Likewise.
7228 (dump_time_statistics): Likewise.
7229 (handle_cp_pragma): Likewise.
7230 (do_identifier): Adjust for new name-lookup scheme.
7231 * parse.y (function_try_block): Return ctor_initializer_opt value.
7233 (fn.defpen): Pass appropriate values to start_function.
7234 (pending_inline): Use functor_try_block value, and pass
7235 appropriate values to finish_function.
7236 * pt.c (is_member_template): Update documentation; remove handling
7237 of FUNCTION_DECLs. As per name, this function should deal only in
7239 (decl_template_parm_p): Change name of olddecl parameter to decl.
7240 (check_template_shadow): Adjust for new name-lookup scheme.
7241 (lookup_template_class): Likewise.
7242 (tsubst_decl): Tweak so as not to confuse member templates with
7243 copy constructors and assignment operators.
7244 (unify): Handle UNION_TYPEs.
7245 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
7246 (lang_print_xnode): Adjust for new name-lookup scheme.
7247 * typeck.c (mark_addressable): Likewise.
7248 (c_expand_return): Likewise.
7250 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
7252 * decl.c (grokdeclarator): Allow field with same name as class
7255 * decl.c (lookup_name_real): Don't limit field lookup to types.
7256 * class.c (check_member_decl_is_same_in_complete_scope): No error
7257 if icv and x are the same.
7258 * lex.c (do_identifier): Tweak error message.
7260 1998-12-10 Mark Mitchell <mark@markmitchell.com>
7262 * decl.c (start_enum): Use push_obstacks, not
7263 end_temporary_allocation.
7264 (finish_enum): Call pop_obstacks.
7266 1998-12-10 Mark Mitchell <mark@markmitchell.com>
7268 * class.c (instantiate_type): Return error_mark_node rather than
7271 1998-12-09 Mark Mitchell <mark@markmitchell.com>
7273 * cp-tree.h (most_specialized_instantiation): New function.
7274 (print_candidates): Likewise.
7275 * class.c (validate_lhs): Remove.
7276 (resolve_address_of_overloaded_function): New function, split out
7277 and then substantially reworked, from ...
7278 (instantiate_type): Use it. Simplify.
7279 * cvt.c (convert_to_reference): Complain when caller has indicated
7280 that's the right thing to do. Don't crash if instantiate_type
7282 * pt.c: Substitute `parameters' for `paramters' throughout.
7283 (print_candidates): Don't make it static.
7284 (most_specialized_instantiation): Split out from ...
7285 (most_specialized): Here.
7287 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
7289 * lex.c (lang_init_options): Initialize cpplib.
7290 * decl2.c (parse_options,cpp_initialized): Removed.
7291 (lang_decode_option): Move initialization of cpplib to
7294 1998-12-09 Mark Mitchell <mark@markmitchell.com>
7296 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
7297 well as the TYPE_DECL, when a typedef name is assigned to a
7298 previously anonymous type.
7300 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
7302 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
7303 __cp_eh_info for getting the eh info pointer. Add table_index to
7305 (push_eh_cleanup): Don't increment 'handlers' data field.
7306 (process_start_catch_block): Don't set the 'caught' field.
7308 * cp/exception.cc (CP_EH_INFO): New macro for getting the
7309 exception info pointer within library routines.
7310 (__cp_eh_info): Use CP_EH_INFO.
7311 (__start_cp_handler): Get exception info pointer, set caught field,
7312 and increment the handlers field. Avoids this being done by handlers.
7313 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
7314 (uncaught_exception): Use CP_EH_INFO macro.
7316 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
7318 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
7320 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
7322 * lex.c (check_newline): Add support for \ as `natural'
7323 characters in file names in #line to be consistent with #include
7324 handling. We support escape processing in the # 1 "..." version of
7325 the command. See also support in cp/lex.c.
7327 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
7329 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
7332 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
7334 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
7336 * error.c (dump_simple_decl): Also print namespace context.
7337 (dump_function_decl): Likewise.
7339 * decl2.c (ambiguous_decl): Don't print old value if it's
7342 * decl.c (lookup_name_real): Fix handling of local types shadowed
7343 by a non-type decl. Remove obsolete code.
7344 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
7346 * lang-options.h: Add -fpermissive.
7347 * decl2.c: Likewise.
7348 * cp-tree.h: Add flag_permissive.
7349 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
7350 were specified, set flag_pedantic_errors.
7351 * call.c (build_over_call): Turn dropped qualifier messages
7353 * cvt.c (convert_to_reference): Likewise.
7354 * typeck.c (convert_for_assignment): Likewise.
7356 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
7358 * decl2.c (coerce_new_type): Use same_type_p.
7359 (coerce_delete_type): Likewise.
7361 * call.c (check_dtor_name): Return 1, not error_mark_node.
7363 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
7365 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
7366 if MULTIPLE_SYMBOL_SPACES.
7368 * pt.c (check_template_shadow): New fn.
7369 * decl2.c (grokfield): Use it.
7370 * decl.c (pushdecl): Likewise.
7371 (pushdecl_class_level): Likewise.
7372 (start_method): Likewise.
7373 (xref_tag): Don't try to use 't' if we're defining.
7375 * call.c (check_dtor_name): Just return an error_mark_node.
7376 * pt.c (lookup_template_class): Complain about using non-template here.
7377 * parse.y (apparent_template_type): Not here.
7379 * pt.c (check_explicit_specialization): Complain about specialization
7382 * lang-options.h: Add -f{no-,}implicit-inline-templates.
7384 * pt.c (convert_nontype_argument): Don't assume that any integer
7385 argument is intended to be a constant-expression.
7387 1998-12-03 Mark Mitchell <mark@markmitchell.com>
7389 * class.c (handle_using_decl): Fix comment. Don't lookup
7390 constructors in base classes.
7391 (validate_lhs): Fix typo in comment.
7392 * search.c (lookup_field_1): Don't return a USING_DECL.
7394 * cp-tree.h (DECL_ACCESS): Improve documentation.
7396 * decl.c (expand_static_init): Don't set the initialization-done
7397 flag until the initialization is done.
7399 1998-12-02 Mark Mitchell <mark@markmitchell.com>
7401 * decl2.c (validate_nonmember_using_decl): Complain about using
7402 declarations for class members.
7404 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
7406 * typeck2.c (process_init_constructor): Use same_type_p.
7408 * decl.c (check_tag_decl): Don't warn about null decl inside a
7411 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
7413 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
7414 (resolve_overloaded_unification): Strip baselinks.
7416 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7418 * g++spec.c: Don't prototype xmalloc.
7420 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
7422 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
7424 * decl.c (check_tag_decl): Do complain about null friend decl at
7427 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
7429 * lex.c (make_lang_type): Clear the whole struct lang_type, not
7430 only the first multiple of sizeof (int).
7432 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
7434 * decl.c (start_decl): An explicit specialization of a static data
7435 member is only a definition if it has an initializer.
7437 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
7438 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
7440 * init.c (expand_default_init): Check for DIRECT_BIND instead of
7443 * call.c (build_over_call): Use build_decl.
7445 * except.c (expand_throw): Just use convert, not
7446 build_reinterpret_cast.
7448 * lex.c (handle_generic_pragma): Use token_buffer.
7450 * decl.c (check_tag_decl): Don't complain about null friend decl.
7452 1998-11-24 Dave Pitts <dpitts@cozx.com>
7454 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
7456 * lex.c (check_newline): Use ISALPHA.
7457 (readescape): Use ISGRAPH.
7458 (yyerror): Use ISGRAPH.
7460 1998-11-24 Nathan Sidwell <nathan@acm.org>
7462 * search.c (get_abstract_virtuals): Do not use initial
7463 CLASSTYPE_ABSTRACT_VIRTUALS.
7464 * typeck2.c (abstract_virtuals_error): Show location of abstract
7466 * call.c (build_new_method_call): Use
7467 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
7468 * class.c (finish_struct_bits): Don't bother working out whether
7469 get_abstract_virtuals will do anything, just do it.
7471 1998-11-24 Graham <grahams@rcp.co.uk>
7473 * typeck.c (build_component_ref): Remove unused statement.
7475 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
7477 * class.c (add_method): Catch invalid overloads.
7479 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
7480 * search.c (lookup_conversions): Handle getting real OVERLOADs.
7481 (add_conversions): Likewise. Revert last change.
7482 * call.c (add_conv_candidate): Pass totype to add_candidate instead
7483 of fn. Don't add a new candidate if the last one was for the same
7485 (print_z_candidates): Handle getting a type as a function.
7486 (joust): If we got two conversion candidates to the same type,
7488 (build_object_call): Lose 'templates'.
7489 (build_user_type_conversion_1): Handle getting real OVERLOADs.
7491 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
7493 * typeck2.c (process_init_constructor): If there are elements
7494 that don't have initializers and they need to have constructors
7495 run, supply them with initializers.
7497 * class.c (finish_struct_1): A class with a 0-width bitfield is
7500 1998-11-23 Mark Mitchell <mark@markmitchell.com>
7502 * pt.c (instantiate_class_template): Don't try to figure out what
7503 specialization to use for a partial instantiation. Correct
7504 typos in a couple of comments. Avoid calling uses_template_parms
7507 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
7509 * method.c (process_overload_item): Add call to
7510 build_mangled_C9x_name for intTI_type_nodes.
7511 (build_mangled_C9x_name): Add prototype, define.
7512 * decl.c (init_decl_processing): Add names for
7515 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
7517 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
7519 * class.c (finish_struct_1): Set things up for 0-width bitfields
7520 like we do for others.
7522 * decl.c (check_tag_decl): New fn.
7523 (shadow_tag): Split out from here.
7524 * decl2.c (grok_x_components): Call it.
7526 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
7528 * decl.c: Lose warn_about_return_type.
7529 (grokdeclarator): Always complain about implicit int, except for
7532 * decl.c (tag_name): New fn.
7533 (xref_tag): Complain about using typedef-name after class-key.
7535 * init.c (expand_vec_init): Also keep going if from_array.
7537 * tree.c (is_overloaded_fn): Also handle the output of
7540 * decl.c (grokdeclarator): Use constructor_name when comparing
7541 field name against enclosing class.
7542 * class.c (finish_struct_anon): Likewise.
7544 1998-11-22 Mark Mitchell <mark@markmitchell.com>
7546 * decl.c (poplevel): Remove code to handle KEEP == 2.
7547 (finish_function): Don't confuse BLOCK-order when
7548 processing a destructor.
7550 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
7552 * decl.c (require_complete_types_for_parms): Call layout_decl
7553 after we've completed the type.
7555 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
7557 * decl2.c (validate_nonmember_using_decl): Allow using templates
7558 from the global namespace.
7560 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
7562 Handle specifying template args to member function templates.
7563 * tree.c (build_overload): Always create an OVERLOAD for a template.
7564 * search.c (add_conversions): Handle finding an OVERLOAD.
7565 * decl2.c (check_classfn): Likewise.
7566 * lex.c (identifier_type): See through a baselink.
7567 * parse.y (do_id): Don't call do_identifier if we got a baselink.
7568 * class.c (instantiate_type, case TREE_LIST): Recurse.
7570 * decl.c (grokdeclarator): Allow a boolean constant for array
7571 bounds, odd as that sounds.
7573 * pt.c (unify): Be more strict about non-type parms, except for
7575 (UNIFY_ALLOW_INTEGER): New macro.
7577 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
7579 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
7581 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
7583 * semantics.c (begin_class_definition): Call
7584 maybe_process_partial_specialization before push_template_decl.
7585 Don't call push_template_decl for a specialization.
7586 * search.c (lookup_field): Do return a member template class.
7587 * decl2.c (handle_class_head): Handle member template classes.
7589 * decl.c (grokdeclarator): A parm type need not be complete.
7591 * pt.c (convert_nontype_argument): Fix thinko.
7593 1998-11-18 Mark Mitchell <mark@markmitchell.com>
7595 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
7596 (global_delete_fndecl): New variable.
7597 * decl.c (global_delete_fndecl): Define it.
7598 (init_decl_processing): Set it.
7599 * init.c (build_builtin_delete_call): Use it.
7600 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
7603 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
7605 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
7608 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
7609 * call.c (build_object_call): Also support references to functions.
7610 * typeck.c (convert_for_initialization): Don't decay a function
7611 if the target is a reference to function.
7613 * search.c (add_conversions): Get all the overloads from a class.
7615 * decl.c (grok_ctor_properties): Complain about any constructor
7616 that will take a single arg of the class type by value.
7618 * typeck2.c (build_functional_cast): Can't create objects of
7619 abstract classes this way.
7620 * cvt.c (ocp_convert): Likewise.
7622 * decl.c (grokfndecl): Member functions of local classes are not
7625 1998-11-18 Mark Mitchell <mark@markmitchell.com>
7627 * Make-lang.in (cc1plus): Add dependency on hash.o.
7629 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
7631 * search.c (get_abstract_virtuals): Complain about virtuals with
7633 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
7634 with no final overrider.
7635 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
7636 on virtuals with no final overrider.
7638 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
7640 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
7643 * friend.c (do_friend): Don't set_mangled_name_for_decl.
7645 * class.c (finish_struct_anon): Complain about non-fields.
7646 * decl2.c (build_anon_union_vars): Likewise.
7648 * decl.c (grokdeclarator): Normal data members can't have the same
7649 name as the class, either.
7650 * class.c (finish_struct_anon): Neither can members of an
7653 1998-11-17 Mark Mitchell <mark@markmitchell.com>
7655 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
7656 (TYPE_BINFO): Likewise.
7657 (IS_AGGR_TYPE): Tweak.
7658 (SET_IS_AGGR_TYPE): New macro.
7659 (CLASS_TYPE_P): Tweak.
7660 (lang_type): Group mark bitfields together. Remove linenum.
7661 (CLASSTYPE_SOURCE_LINE): Remove macro.
7662 (CLASSTYPE_MARKED_N): New macro.
7663 (SET_CLASSTYPE_MARKED_N): Likewise.
7664 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
7665 (CLASS_TYPE_MARKED_*): Use them.
7666 (SET_CLASSTYPE_MARKED_*): Likewise.
7667 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
7668 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
7669 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
7670 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
7671 * class.c (class_cache_obstack): New variable.
7672 (class_cache_firstobj): Likewise.
7673 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
7674 (pushclass): Free the cache, when appropriate.
7676 (maybe_push_cache_obstack): Use class_cache_obstack.
7677 * decl.c (include hash.h).
7678 (typename_hash): New function.
7679 (typename_compare): Likewise.
7680 (build_typename_type): Check the hash table to avoid creating
7682 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
7683 (grokdeclarator): Use CLASS_TYPE_P.
7684 (xref_basetypes): Likewise.
7685 (start_function): Likewise. Don't put current_class_ref on the
7687 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
7689 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
7690 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
7691 fields for types other than class types. Do clear TYPE_ALIAS_SET
7692 for types other than class types, though.
7693 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
7694 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7695 * pt.c (process_template_parm): Don't set
7696 CLASSTYPE_GOT_SEMICOLON.
7697 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7698 Coerce arguments on the momentary obstack.
7699 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7700 (instantiate_class_template): Calculate template arguments on the
7701 momentary obstack. Tidy.
7702 (tsubst_template_arg_vector): Use make_temp_vec.
7703 (tsubst_aggr_type): Put template arguments on the momentary
7705 (tsubst_decl): Likewise.
7706 (tsubst): Copy the array bounds index to the permanent obstack
7707 before building index types. Use new macros.
7708 (unify): Use new macros.
7709 (do_type_instantiation): Likewise.
7710 * search.c (lookup_fnfields_1): Use new macros.
7711 (dfs_pushdecls): Build envelopes on the cache obstack.
7712 (dfs_compress_decls): Use new macros.
7713 (push_class_decls): Build on the cache obstack.
7714 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
7715 * sign.c (build_signature_pointer_or_reference_type): Use
7717 * tree.c (make_binfo): Check CLASS_TYPE_P.
7718 (copy_template_template_parm): Adjust.
7719 (make_temp_vec): Use push_expression_obstack.
7720 * typeck.c (complete_type): Use new macros.
7721 (comptypes): Likewise.
7723 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
7725 * pt.c (tsubst): Add diagnostics for invalid array, reference
7726 and pointer to member types.
7728 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
7730 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
7732 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
7735 * parse.y (structsp): Fix cut-and-paste error.
7737 * init.c (build_new): Complain about non-integral size.
7739 * parse.y (unary_expr): Complain about defining types in sizeof.
7741 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
7743 * rtti.c (build_x_typeid): Complain about typeid without
7744 including <typeinfo>.
7745 (get_typeid): Likewise. Complain about typeid of incomplete type.
7746 (get_tinfo_fn_dynamic): Likewise.
7747 (get_typeid_1): Not static anymore.
7748 * except.c (build_eh_type_type): Use get_typeid_1.
7750 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
7751 ambiguous or private bases. Fix warning for reference cast.
7753 1998-11-16 Mark Mitchell <mark@markmitchell.com>
7755 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
7756 * decl.c (duplicate_decls): Remove special-case code to deal with
7757 template friends, and just do the obvious thing.
7758 * pt.c (register_specialization): Tweak for clarity, and also to
7759 clear DECL_INITIAL for an instantiation before it is merged with a
7761 (check_explicit_specialization): Fix indentation.
7762 (tsubst_friend_function): Handle both definitions in friend
7763 declaration and outside friend declarations.
7764 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
7765 (regenerate_decl_from_template): Tweak accordingly.
7766 (instantiate_decl): Likewise.
7768 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
7770 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
7771 member function reference to error.
7772 * cvt.c (ocp_convert): Complain about converting an overloaded
7775 * init.c (build_offset_ref): Just return a lone static member
7778 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
7781 * typeck.c (build_binary_op_nodefault): Improve error handling.
7783 * decl.c (grokfndecl): Complain about making 'main' a template.
7785 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
7787 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
7788 TYPE_DECL in a template.
7790 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
7792 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
7794 * decl.c (struct cp_function): Add named_label_uses.
7795 (push_cp_function_context): Save it.
7796 (pop_cp_function_context): Restore it.
7797 (define_label): Also complain about jumping into the scope of
7798 non-POD objects that don't have constructors.
7799 * tree.c (pod_type_p): New fn.
7801 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
7802 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
7803 (get_tinfo_fn): Not here.
7804 * repo.c (repo_get_id): Abort if we get called for an incomplete
7807 1998-11-13 Mark Mitchell <mark@markmitchell.com>
7809 * except.c (expand_throw): Make sure first argument to
7810 __cp_push_exception is of type `void*' to avoid spurious error
7813 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
7815 * pt.c (try_one_overload): Take orig_targs again. Only check for
7816 mismatches against them; we don't care what a previous call found.
7817 (resolve_overloaded_unification): Adjust.
7819 * search.c (lookup_field): Don't return anything for a non-type
7820 field from a dependent type.
7821 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
7822 in an array declarator.
7823 (start_decl): Push into the class before looking for the field.
7825 1998-11-08 Mark Mitchell <mark@markmitchell.com>
7827 * method.c (build_overload_value): Handle REFERENCE_TYPE.
7829 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
7831 * decl.c (grokdeclarator): Allow namespace-scoped members if they
7834 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
7836 * pt.c (tsubst_decl): Don't mess with the global value of an
7837 un-mangled DECL_ASSEMBLER_NAME.
7839 1998-11-03 Christopher Faylor <cgf@cygnus.com>
7841 * decl.c (init_decl_processing): Remove CYGWIN conditional
7842 since CYGWIN is now able to deal with trapping signals.
7844 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7846 * cp-tree.h: Don't include gansidecl.h.
7847 * exception.cc: Include gansidecl.h (since we don't include config.h)
7848 * g++spec.c: Don't include gansidecl.h.
7850 1998-11-06 Mark Mitchell <mark@markmitchell.com>
7852 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
7854 (DECL_DEFINED_IN_CLASS_P): New macro.
7855 (TEMPLATE_PARMS_FOR_INLINE): Document.
7856 (check_static_variable_definition): New function.
7857 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
7859 (check_static_variable_definition): Split out from ...
7860 (grokdeclarator): Here.
7861 * pt.c (check_default_tmpl_args): New function, split out from ...
7862 (push_template_decl_real): Here.
7863 (instantiate_template): Fix comment.
7865 1998-11-04 Mark Mitchell <mark@markmitchell.com>
7867 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
7868 (CP_TYPE_VOLATILE_P): Likewise.
7869 (CP_TYPE_RESTRICT_P): Likewise.
7871 1998-11-03 Mark Mitchell <mark@markmitchell.com>
7873 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
7875 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
7877 * class.c (instantiate_type): Be more helpful.
7879 * decl2.c (import_export_decl): Call import_export_class.
7881 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
7882 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
7883 * pt.c (tsubst_copy): Likewise.
7885 1998-11-02 Mark Mitchell <mark@markmitchell.com>
7887 * init.c (expand_vec_init): Fix off-by-one error.
7889 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
7891 * parse.y (apparent_template_type): New type.
7892 (named_complex_class_head_sans_basetype): Use it.
7893 * Makefile.in (CONFLICTS): One new conflict.
7894 * parse.c: Regenerated.
7896 1998-11-01 Mark Mitchell <mark@markmitchell.com>
7898 * cp-tree.h (COMPARE_STRICT): New macro.
7899 (COMPARE_BASE): Likewise.
7900 (COMPARE_RELAXED): Likewise.
7901 (COMPARE_REDECLARATION): Likewise.
7902 (same_type_p): Likewise.
7903 (same_or_base_type_p): Likewise.
7904 * call.c (standard_conversion): Use them, in place of comptypes
7905 with numeric arguments.
7906 (reference_binding): Likewise.
7907 (convert_like): Likewise.
7908 (build_over_call): Likewise.
7909 (is_subseq): Likewise.
7910 (is_properly_derived_from): Likewise.
7911 (compare_ics): Likewise.
7913 * class.c (delete_duplicate_fields_1): Likewise.
7914 (resolves_to_fixed_type_p): Likewise.
7915 (instantiate_type): Likewise. Remove #if 0'd code.
7916 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
7917 (pushdecl): Likewise.
7918 (lookup_name_real): Likewise.
7919 (grokdeclarator): Likewise. Check for illegal array declarations.
7920 (grokparms): Likewise.
7921 (grok_op_properties): Likewise.
7922 * decl2.c (check_classfn): Likewise.
7923 * friend.c (is_friend): Likewise.
7924 (make_friend_class): Likewise.
7925 * init.c (expand_aggr_init): Likewise.
7926 (expand_vec_init): Likewise.
7927 * pt.c (is_member_template_class): Remove declaration.
7928 (is_specialization_of): Use COMPARE_* and new macros.
7929 (comp_template_parms): Likewise.
7930 (convert_nontype_argument): Likewise.
7931 (coerce_template_template_parms): Likewise.
7932 (template_args_equal): Likewise.
7933 (lookup_template_class): Likewise.
7934 (type_unification_real): Likewise.
7936 (get_bindings_real): Likewise.
7937 * search.c (covariant_return_p): Likewise.
7938 (get_matching_virtual): Likewise.
7939 * sig.c (match_method_types): Likewise.
7940 * tree.c (vec_binfo_member): Likewise.
7941 (cp_tree_equal): Likewise.
7942 * typeck.c (common_type): Likewise.
7943 (comp_array_types): Likewise. Get issues involving unknown array
7945 (comptypes): Update comments. Use new flags.
7946 (comp_target_types): Use new macros.
7947 (compparms): Likewise.
7948 (comp_target_parms): Likewise.
7949 (string_conv_p): Likewise.
7950 (build_component_ref): Likewise.
7951 (build_indirect_ref): Likewise.
7952 (build_conditional_expr): Likewise.
7953 (build_static_cast): Likewise.
7954 (build_reinterpret_cast): Likewise.
7955 (build_const_cast): Likewise.
7956 (build_modify_expr): Likewise.
7957 (convert_for_assignment): Likewise.
7958 (comp_ptr_ttypes_real): Likewise.
7959 (ptr_reasonably_similar): Likewise.
7960 (comp_ptr_ttypes_const): Likewise.
7962 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
7964 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
7966 1998-10-30 Mark Mitchell <mark@markmitchell.com>
7968 * decl2.c (delete_sanity): Pass integer_zero_node, not
7969 integer_two_node, to build_vec_delete.
7970 * init.c (build_array_eh_cleanup): Remove.
7971 (expand_vec_init_try_block): New function.
7972 (expand_vec_init_catch_clause): Likewise.
7973 (build_vec_delete_1): Don't deal with case that auto_delete_vec
7974 might be integer_two_node anymore.
7975 (expand_vec_init): Rework for initialization-correctness and
7976 exception-correctness.
7977 * typeck2.c (process_init_constructor): Make mutual exclusivity
7978 of cases more obvious.
7980 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
7982 * decl.c (lookup_name_real): OK, only warn if not lexing.
7983 Simplify suggested fix.
7985 * cp-tree.h (IDENTIFIER_MARKED): New macro.
7986 * search.c (lookup_conversions): Use breadth_first_search.
7987 (add_conversions): Avoid adding two conversions to the same type.
7988 (breadth_first_search): Work with base binfos, rather
7989 than binfos and base indices.
7990 (get_virtual_destructor): Adjust.
7991 (tree_has_any_destructor_p): Adjust.
7992 (get_matching_virtual): Adjust.
7994 * pt.c (push_template_decl_real): Generalize check for incorrect
7995 number of template parms.
7996 (is_member_template_class): #if 0.
7998 1998-10-29 Richard Henderson <rth@cygnus.com>
8000 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
8003 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
8005 * lex.c: Call check_newline from lang_init always. After
8006 calling cpp_start_read, set yy_cur and yy_lim to read from the
8007 cpplib token buffer.
8009 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
8011 * class.c (instantiate_type): Don't consider templates for a normal
8014 * class.c (finish_struct_1): Don't complain about non-copy
8015 assignment ops in union members.
8017 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
8018 (prepare_fresh_vtable): Likewise.
8019 (finish_struct_1): Don't call import_export_class.
8020 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
8021 (finish_prevtable_vardecl): Lose.
8022 (finish_file): Don't call it.
8023 * pt.c (instantiate_class_template): Likewise.
8024 * cp-tree.h: Remove it.
8026 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
8027 * decl.c (finish_function): Not here.
8028 (start_function): Do set DECL_INITIAL.
8030 * pt.c (push_template_decl_real): Complain about default template
8031 args for enclosing classes.
8033 * call.c (add_function_candidate): Treat conversion functions
8034 as coming from the argument's class.
8035 * cp-tree.h (DECL_CONV_FN_P): New fn.
8036 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
8037 * class.c (add_method): Use DECL_CONV_FN_P.
8038 * decl2.c (check_classfn): Likewise.
8039 * error.c (dump_function_name): Likewise.
8040 (dump_function_decl): Likewise.
8041 * pt.c (fn_type_unification): Likewise.
8042 * search.c (add_conversions): Likewise.
8044 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
8046 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
8047 * method.c (hack_identifier): Also check for using RESULT_DECL
8050 1998-10-27 Mark Mitchell <mark@markmitchell.com>
8052 * decl.c (grokdeclarator): Use type_quals, rather than constp,
8055 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
8057 * call.c (standard_conversion): instantiate_type here.
8058 (reference_binding): And here.
8059 (implicit_conversion): Not here.
8060 (build_op_delete_call): No need to cons up an OVERLOAD.
8061 * cvt.c (cp_convert_to_pointer): instantiate_type here.
8062 (convert_to_reference): And here.
8063 * decl.c (grok_reference_init): Not here.
8064 (grokparms): Or here.
8065 * typeck2.c (digest_init): Or here.
8066 * typeck.c (decay_conversion): Take the address of overloaded
8068 (require_instantiated_type): Lose.
8069 (convert_arguments): Don't handle unknown types here.
8070 (build_c_cast): Likewise.
8071 (build_binary_op): Gut.
8072 (build_conditional_expr): Don't require_instantiated_type.
8073 (build_modify_expr): Likewise.
8074 (build_static_cast): Don't instantiate_type.
8075 (build_reinterpret_cast): Likewise.
8076 (build_const_cast): Likewise.
8077 (convert_for_initialization): Likewise.
8078 (build_ptrmemfunc): Use type_unknown_p.
8079 (convert_for_assignment): Also do default_conversion on overloaded
8080 functions. Hand them off to ocp_convert.
8082 1998-10-26 Mark Mitchell <mark@markmitchell.com>
8084 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
8085 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
8087 * class.c (finish_struct_1): Use build_cplus_array_type to build
8089 * decl.c (init_decl_processing): Likewise.
8090 * except.c (expand_end_eh_spec): Likewise.
8091 * search.c (expand_upcast_fixups): Simplify very slightly.
8093 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
8095 * decl.c (grokdeclarator): Complain about a variable using
8096 constructor syntax coming back null from start_decl.
8098 * friend.c (make_friend_class): Complain about trying to make
8099 a non-class type a friend.
8101 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
8102 (start_function): Not here.
8104 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
8106 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
8108 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
8110 * typeck2.c (process_init_constructor): Only skip anonymous fields
8111 if they are bitfields.
8113 * cp-tree.def (TYPEOF_TYPE): New code.
8114 * error.c (dump_type_real): Handle it.
8115 * pt.c (tsubst): Likewise.
8116 * tree.c (search_tree): Likewise.
8117 * semantics.c (finish_typeof): New fn.
8118 * parse.y (typespec): Use it.
8119 * cp-tree.h: Declare it.
8121 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
8123 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
8125 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
8127 * typeck.c (convert_arguments): Don't handle pmf references
8130 * init.c (build_member_call): Don't try to convert to the base type
8131 if it's ambiguous or pedantic.
8133 * typeck2.c (check_for_new_type): Only depend on pedantic for
8136 1998-10-25 Mark Mitchell <mark@markmitchell.com>
8138 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
8139 non-converting constructors.
8141 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
8143 * gxxint.texi: Correct documentation for n, N, Q, and B.
8145 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
8147 * parse.y (condition): Convert VAR_DECL from reference to indirect
8150 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
8152 * exception.cc (__cp_pop_exception): Free the original exception
8153 value, not the potentially coerced one.
8155 1998-10-23 Mark Mitchell <mark@markmitchell.com>
8157 * Makefile.in (hash.h): Run gperf when necessary.
8159 * cp-tree.h (CP_TYPE_READONLY): Remove.
8160 (CP_TYPE_VOLATILE): Likewise.
8161 (CP_TYPE_QUALS): New macro.
8162 (CP_TYPE_CONST_P): Likewise.
8163 (CP_TYPE_VOLATILE_P): Likewise.
8164 (CP_TYPE_RESTRICT_P): Likewise.
8165 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
8166 (cp_build_type_variant): Rename to ...
8167 (cp_build_qualified_type): New function.
8168 (c_apply_type_quals_to_decl): Declare.
8169 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
8170 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
8171 (cp_type_qual_from_rid): New function.
8172 (compparms): Remove unused parameter. All callers changed.
8173 (cp_type_quals): New function.
8174 (at_least_as_qualified_p): Likewise.
8175 (more_qualified_p): Likewise.
8177 * call.c (standard_conversion): Replace calls to
8178 cp_build_type_variant with cp_build_qualified_type. Use
8179 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
8180 compare them. Use CP_TYPE_* macros to check qualifiers.
8181 (reference_binding): Likewise.
8182 (implicit_conversion): Likewise.
8183 (add_builtin_candidates): Likewise.
8184 (build_over_call): Likewise.
8185 * class.c (overrides): Compare all qualifiers, not just `const',
8186 on method declarations.
8187 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
8188 (convert_pointer_to_real): Likewise.
8189 (type_promotes_to): Likewise.
8190 * decl.c (check_for_uninitialized_const_var): New function.
8191 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
8192 (cp_finish_decl): Use check_for_uninitialized_const_var.
8193 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
8195 (grok_ctor_properties): Likewise.
8196 (grok_op_properties): Likewise.
8197 (start_function): Likewise.
8198 (rever_static_member_fn): Likewise.
8199 * decl2.c (grok_method_quals): Likewise.
8200 (grokfield): Likewise.
8201 * error.c (dump_readonly_or_volatile): Rename to ...
8202 (dump_qualifiers): New function. Handle `restrict'.
8203 (dump_type_real): Use it.
8204 (dump_aggr_type): Likewise.
8205 (dump_type_prefix): Likewise.
8206 (dump_type_suffix): Likewise.
8207 (dump_function_decl): Likewise.
8208 (cv_as_string): Likewise.
8209 * gxx.gperf: Add __restrict and __restrict__.
8210 * gxxint.texi: Document `u' as used for `__restrict', and a few
8211 other previously undocumented codes.
8212 * hash.h: Regenerated.
8213 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
8214 (build_member_call): Likewise.
8215 (build_new_1): Likewise.
8216 * lex.c (init_parse): Add entry for RID_RESTRICT.
8217 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
8218 (cp_type_qual_from_rid): Define.
8219 * lex.h (enum rid): Add RID_RESTRICT.
8220 * method.c (process_modifiers): Deal with `restrict'.
8221 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
8222 * parse.c: Regenerated.
8223 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
8224 (tsubst_aggr_type): Likewise.
8226 (check_cv_quals_for_unify): Likewise.
8228 * rtti.c (init_rtti_processing): Likewise.
8229 (build_headof): Likewise.
8230 (get_tinfo_var): Likewise.
8231 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
8232 (expand_class_desc): Likewise.
8233 (expand_attr_desc): Likewise.
8234 (synthesize_tinfo_fn): Likewise.
8235 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
8236 (get_matching_virtual): Likewise.
8237 (expand_upcast_fixups): Likewise.
8238 * sig.c (build_signature_pointer_or_reference_name): Take
8239 type_quals, not constp and volatilep.
8240 (build_signature_pointer_or_reference_type): Likewise.
8241 (match_method_types): More CP_TYPE_QUALS conversion, etc.
8242 (build_signature_pointer_constructor): Likewise.
8243 (build_signature_method_call): Likewise.
8244 * tree.c (build_cplus_array_type): Likewise.
8245 (cp_build_type_variant): Rename to ...
8246 (cp_build_qualified_type): New function. Deal with `__restrict'.
8247 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
8248 (build_exception_variant): Likewise.
8250 * typeck.c (qualif_type): Likewise.
8251 (common_type): Likewise.
8252 (comptypes): Likewise.
8253 (comp_cv_target_types): Likewise.
8254 (at_least_as_qualified_p): Define.
8255 (more_qualified_p): Likewise.
8256 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
8257 (compparms): Likewise.
8258 (inline_conversion): Likewise.
8259 (string_conv_p): Likewise.
8260 (build_component_ref): Likewise.
8261 (build_indirect_ref): Likewise.
8262 (build_array_ref): Likewise.
8263 (build_unary_op): Likewise.
8264 (build_conditional_expr): Likewise.
8265 (build_static_cast): Likewise.
8266 (build_c_cast): Likewise.
8267 (build_modify_expr): Likewise.
8268 (convert_For_assignment): Likewise.
8269 (comp_ptr_ttypes_real): Likewise.
8270 (cp_type_quals): New function.
8272 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
8274 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
8275 (CP_TYPE_VOLATILE): Likewise.
8276 * decl.c (grokdeclarator): Use them.
8277 * tree.c (canonical_type_variant): Likewise.
8279 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
8281 * parse.y (named_class_head): Push into class while parsing the
8283 * decl2.c (push_scope, pop_scope): New functions.
8284 * cp-tree.h: Declare them.
8285 * init.c (build_new_1): Delay cleanup until end of full expression.
8287 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
8289 * typeck.c (build_component_ref): Use of a type here is an error.
8291 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
8293 Revamp references to member functions.
8294 * method.c (hack_identifier): Call build_component_ref for a
8295 reference to a member function.
8296 * typeck.c (build_component_ref): Only return a single function
8297 if it's static. Otherwise, return a COMPONENT_REF.
8298 (build_x_function_call): Handle a COMPONENT_REF.
8299 (build_unary_op): Handle all unknown-type things.
8300 * decl2.c (arg_assoc): Handle COMPONENT_REF.
8301 * class.c (instantiate_type): Complain if the function we get is a
8302 nonstatic member function. Remove code for finding "compatible"
8304 * pt.c (tsubst_copy): Handle NOP_EXPR.
8305 * tree.c (build_dummy_object): New fn.
8306 (maybe_dummy_object): New fn.
8307 (is_dummy_object): New fn.
8308 * cp-tree.h: Declare them.
8309 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
8310 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
8311 * init.c (build_member_call): Use maybe_dummy_object and
8313 (build_offset_ref): Use maybe_dummy_object.
8314 (resolve_offset_ref): Use is_dummy_object.
8315 * typeck.c (build_x_function_call): Call build_dummy_object.
8316 (unary_complex_lvalue): Call is_dummy_object.
8318 * typeck.c (build_component_addr): Make sure field is a field.
8320 * call.c (build_new_op): Delete obsolete code.
8322 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
8324 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
8326 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
8327 std if std is ignored.
8329 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
8331 * decl.c (grokvardecl): Fix thinko.
8333 * decl.c (grokdeclarator): Embedded attrs bind to the right,
8336 * parse.y (fn.def2): Fix 'attrs' format.
8338 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
8340 * Makefile.in (CONFLICTS): Update.
8341 * parse.y (expr_or_declarator_intern): New rule.
8342 (expr_or_declarator, direct_notype_declarator, primary,
8343 functional_cast): Use it.
8344 (notype_declarator_intern): New rule.
8345 (notype_declarator, complex_notype_declarator): Use it.
8347 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
8349 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
8350 (grokvardecl): Likewise.
8352 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8354 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
8355 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
8357 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
8359 * pt.c (process_partial_specialization): Cast 1st argument of
8362 * tree.c (build_base_fields): Cast `base_align' to (int) when
8363 comparing against one.
8365 1998-10-16 Mark Mitchell <mark@markmitchell.com>
8367 * decl.c (lookup_name_real): Handle template parameters for member
8368 templates where said parameters have the same name as the
8371 * decl.c (expand_static_init): Build cleanups before entering the
8372 anonymous function used to do them to avoid access-checking
8375 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
8376 accidentally removed by previous change, and make DECL_RTL here.
8377 * class.c (add_method): Don't make DECL_RTL here.
8379 * pt.c (for_each_template_parm): Don't examine uninstantiated
8382 1998-10-16 Dave Brolley <brolley@cygnus.com>
8384 * lex.c (real_yylex): Fix unaligned access of wchar_t.
8386 1998-10-16 Mark Mitchell <mark@markmitchell.com>
8388 * class.c (add_method): Fix documentation to reflect previous
8389 changes. Check for duplicate method declarations here.
8390 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
8391 correctly; such things never match.
8392 (grokfndecl): Don't look for duplicate methods here.
8393 * decl2.c (check_classfn): Don't assume names are mangled.
8394 Don't add bogus member function declarations to a class before the
8395 class type is complete.
8396 (grokfield): Reformat error message.
8397 * method.c (set_mangled_name_for_decl): Don't mangle names while
8398 processing_template_decl.
8400 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
8402 * typeck.c (build_indirect_ref): Complain about a pointer to data
8404 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
8406 * init.c (resolve_offset_ref): Don't undo the above.
8408 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
8409 (struct lang_decl_flags): Add `bitfield'.
8410 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
8412 * decl2.c (grokbitfield, grok_alignof): Likewise.
8413 * init.c (build_offset_ref): Likewise.
8414 * typeck.c (build_component_addr, expr_sizeof): Likewise.
8415 * cvt.c (build_up_reference): Don't crash if taking the address
8416 returns error_mark_node.
8418 * decl.c (grokfndecl): Also check ctype when checking for ::main().
8420 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
8422 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
8424 (grokdeclarator): Instead of here.
8425 * friend.c (do_friend): Lose special handling of ::main and
8427 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
8429 * spew.c (yylex): Clear looking_for_typename if we got
8432 1998-10-15 Mark Mitchell <mark@markmitchell.com>
8434 * class.c (maybe_warn_about_overly_private_class): Improve error
8435 messages for class with only private constructors.
8437 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
8438 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
8439 (build_typename_type): New function.
8440 * decl.c (build_typename_type): Broken out from ...
8441 (make_typename_type): Use it.
8442 * search.c (lookup_field): Likewise.
8444 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8446 * pt.c (convert_nontype_argument): Check against type_referred_to.
8447 * decl.c (grokvardecl): Check for declarator name before building
8448 DECL_ASSEMBLER_NAME.
8450 1998-10-14 Mark Mitchell <mark@markmitchell.com>
8452 * pt.c (lookup_template_class): Add comment.
8453 (instantiate_class_template): Don't mark the _TYPE node for
8454 member class templates as an instantiation.
8456 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
8458 * decl.c (grokfndecl): Fix my thinko.
8460 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
8462 * tinfo2.cc (fast_compare): Remove.
8463 (before): Just use strcmp.
8464 * tinfo.cc (operator==): Just use strcmp.
8466 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
8468 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
8471 1998-10-13 Mark Mitchell <mark@markmitchell.com>
8473 * cp-tree.h (specializations_of_same_template_p): Remove.
8474 * search.c (get_template_base): Don't use it.
8475 (get_template_base_recursive): Likewise.
8476 * pt.c (specializations_of_same_template_p): Remove.
8477 (unify): Don't use it.
8478 (lookup_template_class): Find the correct parent when setting
8479 CLASSTYPE_TI_TEMPLATE.
8481 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
8483 * tinfo.cc (operator==): Always compare names.
8485 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
8487 * decl.c (start_function): Fix cut-and-paste error.
8489 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
8491 * inc/typeinfo: Add #pragma interface.
8492 (operator!=): Just call operator==.
8493 * tinfo.cc: Add #pragma implementation.
8494 (operator==): Move from inc/typeinfo and tinfo2.cc.
8495 Check __COMMON_UNRELIABLE instead of _WIN32.
8497 * typeck2.c (my_friendly_abort): Add URL.
8499 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
8501 * decl.c (start_method): Added extra parameter for attributes.
8502 * cp-tree.h (start_method): Update prototype.
8503 * parse.y (fn.def2): Update start_method parameter list.
8505 1998-10-11 Mark Mitchell <mark@markmitchell.com>
8507 * cp-tree.h (specializations_of_same_template_p): Declare.
8508 * pt.c (specializations_of_same_template_p): New function.
8510 * search.c (get_template_base): Use it.
8511 (get_template_base_recursive): Likewise.
8513 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
8515 * decl2.c (start_objects): Add new variable `joiner' and
8516 initialize it properly.
8518 1998-10-09 Mark Mitchell <mark@markmitchell.com>
8520 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
8521 change to vtable types.
8523 * cvt.c (ocp_convert): Avoid infinite recursion caused by
8526 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
8528 * pt.c (resolve_overloaded_unification): New fn.
8529 (try_one_overload): Likewise.
8530 (unify): Don't fail on unknown type.
8531 (type_unification_real): Likewise. Use resolve_overloaded_unification
8532 to handle an overloaded argument.
8533 (template_args_equal): Split out...
8534 (comp_template_args): From here.
8535 (determine_specialization): Also allow a template with more
8536 parms than were explicitly specified.
8537 * cp-tree.h: Add template_args_equal.
8538 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
8540 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
8542 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
8545 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
8547 * typeck.c (unsigned_type): Only return TItype nodes when
8548 HOST_BITS_PER_WIDE_INT is >= 64 bits.
8549 (signed_type): Likewise.
8550 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
8551 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
8552 (init_decl_processing): Only create TItype nodes when
8553 HOST_BITS_PER_WIDE_INT is >= 64 bits.
8554 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
8555 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
8557 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8559 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
8560 (gxx.gperf): Update comments describing invocation flags.
8561 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
8563 1998-10-07 Mark Mitchell <mark@markmitchell.com>
8565 * class.c (finish_struct_1): Add commentary on previous change.
8567 * cp-tree.h (vtbl_ptr_type_node): New variable.
8568 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
8569 already of the right type.
8570 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
8571 Simplify code to grow vtable.
8572 * decl.c (vtbl_ptr_type_node): Define.
8573 (init_decl_processing): Initialize it.
8575 1998-10-06 Mark Mitchell <mark@markmitchell.com>
8577 * cp-tree.def (PTRMEM_CST): New tree node.
8578 * cp-tree.h (ptrmem_cst): New type.
8579 (lang_type): Remove local_typedecls.
8580 (dummy): Increase to 12 bits from 11.
8581 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
8582 (PTRMEM_CST_CLASS): New macro.
8583 (PTRMEM_CST_MEMBER): Likewise.
8584 (current_access_specifier): New variable.
8585 (current_class_type): Remove duplicate declaration.
8586 (finish_struct): Change prototype.
8587 (unreverse_member_declarations): New function.
8588 (pushdecl_class_level): Change prototype.
8589 (grok_enum_decls): Remove.
8590 (fixup_anonymous_union): New function.
8591 (grok_x_components): Change prototype.
8592 (tsubst_chain): Remove.
8593 (finish_member_template_decl): Likewise.
8594 (check_explicit_specialization): Fix indentation.
8595 (finish_class_definition): Change prototype.
8596 (finish_member_class_template): Likewise.
8597 (finish_member_declaration): New function.
8598 (check_multiple_declarators): Likewise.
8599 * class.c (class_stack_node_t): New type.
8600 (current_class_base): Remove.
8601 (current_class_stack): Change type.
8602 (current_access_specifier): New variable.
8603 (grow_method): Remove.
8604 (check_member_decl_is_same_in_complete_scope): Break out from
8606 (make_method_vec): New function.
8607 (free_method_vec): Likewise.
8608 (add_implicitly_declared_members): Break out from finish_struct_1.
8609 (free_method_vecs): New variable.
8610 (add_method): Rework for direct use from parser.
8611 (handle_using_decl): Watch for NULL_TREE while iterating through
8612 CLASSTYPE_METHOD_VEC.
8613 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
8614 just do some error-checking.
8615 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
8616 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
8617 (finish_struct): Change prototype. Simplify; fields and methods
8618 are already set up at this point.
8619 (init_class_processing): Set up current_class_stack.
8620 (pushclass): Save current_access_specifier.
8621 (popclass): Restore it.
8622 (currently_open_class): Simplify.
8623 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
8624 * decl.c (saved_scope): Add access_specifier.
8625 (maybe_push_to_top_level): Save it.
8626 (pop_from_top_level): Restore it.
8627 (maybe_process_template_type_declaration): Use
8628 finish_member_declaration.
8629 (pushtag): Likewise.
8630 (pushdecl_class_level): Don't return a value.
8631 (fixup_anonymous_union): Break out from grok_x_components.
8632 (shadow_tag): Use it.
8633 (xref_tag): Complain about using an elaborated type specifier to
8634 reference a template type parameter or typedef name.
8635 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
8636 (current_local_enum): Remove.
8637 (build_enumerator): Call finish_member_declaration.
8638 (grok_enum_decls): Remove.
8639 * decl2.c (grok_x_components): Simplify.
8640 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
8641 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
8642 (merge_functions): Add to comment.
8643 (arg_assoc_type): Prototype.
8644 (arg_assoc): Pass as many arguments as there are parameters.
8645 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
8647 * expr.c (cpls_expand_expr): Remove dead code. Handle
8649 * friend.c (do_friend): Lookup friends when in nested classes.
8651 * init.c (build_offset_ref): Do lookup even for classes that are
8652 only partially defined.
8653 (decl_constant_value): Remove dead code.
8654 * method.c (build_overload_value): Remove hack where by TYPE was
8655 not a TYPE. Handle PTRMEM_CST.
8656 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
8658 * parse.y (components, notype_components, component_decl,
8659 component_decl_1, component_declarator, component_declarator0):
8660 Now all are itype rather than ttype. Rework to add members to
8662 (typesqpecqual_reserved): Use check_multiple_declarators.
8663 (structsp): Update class to finish_class_definition.
8664 (do_xref_defn): Unsplit into named_class_head.
8665 (access_specifier): Set current_access_specifier.
8666 * pt.c (set_current_access_from_decl): New function.
8667 (finish_member_template_decl): Don't take the parameters.
8668 (comp_template_args): Make more robust.
8669 (lookup_template_class): Don't use current_local_enum.
8670 (for_each_template_parm): Handle PTRMEM_CST.
8671 (instantiate_class_template): Use set_current_access_from_decl,
8672 finish_member_declaration and unreverse_member_declarations. Set
8673 lineno/input_filename before generating implicit member functions.
8674 (type_unification_real): Don't assume back-unification happens
8675 only for the last argument.
8676 (regenerate_decl_from_template): Call pushclass a bit earlier.
8677 (tsubst_chain): Remove.
8678 (tsubst_enum): Use set_current_access_from_decl.
8679 (set_mangled_name_for_template_decl): Fix indentation.
8680 * search.c (lookup_fnfields_1): Change iteration through
8681 CLASSTYPE_METHOD_VEC.
8682 (dfs_pushdecls): Likewise.
8683 (dfs_compress_decls): Likewise.
8684 (add_conversions): Likewise.
8685 * semantics.c (finish_class_definition): Don't take components.
8686 Change call to finish_struct.
8687 (finish_member_declaration): New function.
8688 (finish_member_class_template): Don't take template parameters.
8689 Change call to grok_x_components. Call finish_member_template_decl.
8690 (check_multiple_declarators): New function.
8691 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
8692 a passed in fieldlist.
8693 * tree.c (search_tree): Handle PTRMEM_CST.
8695 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
8696 INTEGER_CSTs, for pointer-to-data members.
8698 * call.c (resolve_args): Resolve template specializations, if
8701 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8703 * Makefile.in (spew.o): Depend on toplev.h.
8705 * call.c (compare_ics): Initialize variables `deref_from_type2',
8706 `deref_to_type1' and `deref_to_type2'.
8708 * except.c (get_eh_type): Hide prototype and definition.
8709 (process_start_catch_block_old): Remove unused static prototype.
8711 * pt.c (tsubst_decl): Initialize variable `argvec'.
8713 * spew.c: Include toplev.h.
8715 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
8717 * pt.c (instantiate_decl): Do save and restore file position.
8719 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
8721 * method.c (build_decl_overload_real): Clear
8722 numeric_output_need_bar after __.
8724 1998-10-05 Nathan Sidwell <nathan@acm.org>
8726 * call.c (build_new_method_call): Issue 'incomplete type' error,
8727 if class is not defined.
8729 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8731 * call.c (build_object_call): Move declaration of variable
8732 `fn' into the scope where it is used. Don't access variable
8733 `fn' when it is uninitialized, instead use `fns'.
8735 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8737 * errfn.c (cp_thing): Print buf as a string not as a printf format
8738 to avoid problems with the operator%. Consequently, `%%' sequences
8739 in format are copied as `%' in buf.
8741 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
8743 * pt.c (pop_tinst_level): Call extract_interface_info.
8744 (instantiate_decl): Don't save and restore file position.
8746 * decl.c (cp_finish_decl): Make statics in extern inlines and
8747 templates common, if possible and the target doesn't support weak
8750 * decl.c (grokdeclarator): Remove redundant calls to
8751 build_type_variant and some duplicated code.
8752 * sig.c (build_signature_reference_type): Only take the type parm.
8753 (build_signature_pointer_type): Likewise.
8754 * tree.c (build_cplus_method_type): Adjust.
8755 * cp-tree.h: Update.
8757 1998-10-04 Mark Mitchell <mark@markmitchell.com>
8759 * call.c (build_over_call): Make pedwarns about dropped qualifiers
8760 into full-fledged errors.
8761 * cvt.c (convert_to_reference): Likewise.
8762 * typeck.c (convert_for_assignment): Likewise.
8764 * search.c (expand_upcast_vtables): In addition to unsetting
8765 TREE_READONLY, remove top-level const type qualifier.
8767 1998-10-03 Mark Mitchell <mark@markmitchell.com>
8769 * class.c (current_class_ptr, current_class_ref): Clarify
8771 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
8772 NOP type conversions.
8773 * decl.c (decls_match): Use comptypes directly; ignore
8774 qualifiers on the DECL.
8775 (duplicate_decls): Remove qualifier checks on DECL.
8776 (grokdeclarator): Make the type built up include top-level
8778 * decl2.c (do_dtors): Fix spelling error.
8779 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
8780 when printing type information.
8781 * init.c (build_new_1): Add documentation. Deal with the fact
8782 that type of allocated memory now contains qualifiers.
8783 * lex.c (is_global): Improve error-recovery.
8784 * sig.c (build_member_function_pointer): Don't cast away const
8785 on fields of sigtable_entry_type.
8786 * tree.c (lvalue_type): Don't look at top-level qualifiers on
8788 * typeck.c (decay_conversion): Likewise.
8789 (build_component_ref): Make sure the type of the COMPONENT_REF
8790 contains top-level qualifiers, as appropriate. Improve
8792 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
8793 (build_array_ref): Likewise.
8794 (build_unary_op): Improve error-recovery.
8795 (unary_complex_lvalue): Make taking the address a bound member
8796 function an error, not a sorry.
8797 (build_conditional_expr): Look at the type qualifiers, not the
8798 qualifiers on the expression itself.
8800 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
8802 * decl2.c (merge_functions): Remove duplicates.
8804 * decl2.c: Add -f{no-,}implicit-inline-templates.
8805 (import_export_decl): Check it.
8807 * decl.c (lookup_name_real): Template parms also take precedence
8808 over implicit typename. Only warn if yylex.
8810 * typeck.c (build_conditional_expr): Only fold if ifexp is an
8813 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
8816 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
8818 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
8819 * class.c (build_vbase_pointer): Use it.
8820 * rtti.c (expand_class_desc): Likewise.
8821 * tree.c (build_vbase_pointer_fields): Likewise.
8823 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
8825 * decl.c (start_decl): Add invocation of
8826 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8827 (start_function): Add invocation of
8828 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8830 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
8831 HANDLE_GENERIC_PRAGMAS.
8833 1998-09-28 Anthony Green <green@cygnus.com>
8835 * semantics.c (finish_asm_stmt): Always permit volatile asms.
8837 1998-09-28 Mark Mitchell <mark@markmitchell.com>
8839 * decl.c (grokdeclarator): Tighten checks for invalid
8840 destructors. Improve error-messages and error-recovery.
8841 * decl2.c (check_classfn): Don't assume that mangled destructor
8842 names contain type information.
8844 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
8846 * search.c (get_base_distance): Remove assert.
8848 * decl2.c (build_anon_union_vars): Don't process a field with no
8850 (finish_anon_union): Also complain about local anon unions with no
8853 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
8855 * decl.c (lookup_namespace_name): If the name is a namespace,
8856 return it immediately.
8858 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8860 * cp-tree.h (define_case_label): Remove unused parameter.
8861 (check_java_method): Likewise.
8862 (grokclassfn): Likewise.
8863 (expand_aggr_init): Likewise.
8864 (build_x_delete): Likewise.
8865 (maybe_end_member_template_processing): Likewise.
8866 (unshare_base_binfos): Add prototype.
8867 (string_conv_p): Likewise.
8868 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
8870 * cvt.c (build_up_reference): Remove unused parameter
8871 `checkconst', all callers changed.
8872 (build_type_conversion): Mark parameter `code' with
8874 (build_expr_type_conversion): Initialize variable `conv'.
8876 * decl.c (push_namespace): Initialize variable `d'.
8877 (define_case_label): Remove unused parameter `decl', all callers
8880 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
8881 `argc' with ATTRIBUTE_UNUSED.
8882 (grokclassfn): Remove unused parameter `cname', all callers
8884 (check_java_method): Likewise for parameter `ctype'.
8885 (copy_assignment_arg_p): Mark parameter `virtualp' with
8887 (finish_prevtable_vardecl): Likewise for parameter `prev'.
8889 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
8891 * init.c (expand_aggr_init_1): Remove unused parameter
8892 `alias_this', all callers changed.
8893 (expand_aggr_init): Likewise.
8894 (expand_default_init): Likewise.
8895 (build_new_1): Initialize variable `susp'.
8896 (build_x_delete): Remove unused parameter `type', all callers
8899 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
8901 (readescape): Use (unsigned) value in shift.
8902 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
8903 comparing to a signed quantity.
8905 * pt.c (maybe_end_member_template_processing): Remove unused
8906 parameter `decl', all callers changed.
8907 (check_explicit_specialization): Add braces around empty body in
8909 (current_template_args): Initialize variable `args'.
8910 (lookup_template_class): Likewise for variable `prev_local_enum'.
8911 (tsubst_decl): Likewise for variable `r'.
8912 (set_mangled_name_for_template_decl): Initialize variable
8915 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
8916 Likewise for variable `i'.
8917 (yylex): Initialize variable `trrr'.
8919 * typeck.c (compparms): Mark variable `strict' with
8922 * xref.c (simplify_type): Cast argument of ctype function to
8925 1998-09-24 Mark Mitchell <mark@markmitchell.com>
8927 * cp-tree.h (language_lvalue_valid): Remove.
8928 * decl.c (grokdeclarator): Don't disallow references to functions.
8929 * tree.c (lvalue_p_1): New function, combining duplicated
8932 (real_lvalue_p): Likewise.
8933 * typeck.c (language_lvalue_valid): Remove.
8934 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
8935 they don't have TREE_READONLY set.
8936 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
8938 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
8940 * spew.c (yylex): Give diagnostic.
8941 * hash.h (is_reserved_word): Add export.
8942 * gxx.gperf: Likewise.
8943 * lex.h (rid): Add RID_EXPORT.
8944 * lex.c (init_parse): Likewise.
8946 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
8948 * friend.c (do_friend): Make warning a full sentence.
8950 1998-09-22 Mark Mitchell <mark@markmitchell.com>
8952 * parse.y (component_decl_list): Improve error-recovery.
8954 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
8956 * decl.c (make_typename_type): Move error to point where name
8957 variable can be used by dump_type.
8959 1998-09-22 Mark Mitchell <mark@markmitchell.com>
8961 * decl.c (grokfndecl): Improve error-recovery.
8962 * decl2.c (grokfield): Likewise.
8963 * pt.c (finish_member_template_decl): Likewise.
8965 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
8967 * method.c (hack_identifier): Finding multiple members is always
8970 1998-09-21 Per Bothner <bothner@cygnus.com>
8972 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
8974 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
8976 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
8978 1998-09-20 Mark Mitchell <mark@markmitchell.com>
8980 * class.c (maybe_warn_about_overly_private_class): Reformat.
8982 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
8984 * exception.cc (__cplus_type_matcher): Realign some code.
8986 1998-09-16 Mark Mitchell <mark@markmitchell.com>
8988 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
8989 (tinfo2.o): Likewise.
8990 (exception.o): Likewise.
8992 (opnew.o): Likewise.
8993 (opnewnt.o): Likewise.
8994 (opvnew.o): Likewise.
8995 (opvnewnt.o): Likewise.
8996 (opdel.o): Likewise.
8997 (opdelnt.o): Likewise.
8998 (opvdel.o): Likewise.
8999 (opvdelnt.o): Likewise.
9001 1998-09-16 Richard Henderson <rth@cygnus.com>
9003 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
9005 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
9007 * call.c (build_field_call): Handle static data members too.
9009 * typeck.c (comptypes): When comparing pointer types, check
9010 whether referred types match even in strictest modes.
9012 1998-09-15 Mark Mitchell <mark@markmitchell.com>
9014 * cp-tree.h: Revert previous change.
9015 (finish_struct_methods): Remove declaration.
9016 * class.c: Revert previous change.
9017 (maybe_warn_about_overly_private_class): New function.
9018 (finish_struct_methods): Declare here, and make static. Remove
9019 unnecessary parameters. Tidy slightly. Use
9020 maybe_warn_about_overly_private_class.
9021 (finish_struct_1): Adjust. Remove check for private constructors,
9023 (finish_struct): Adjust.
9025 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
9027 * except.c (expand_start_catch_block): No need to check for new
9029 (process_start_catch_block_old): Deleted.
9030 (process_start_catch_block): Add call to start_decl_1().
9031 (expand_end_catch_block): Add call to end_catch_handler().
9032 * exception.cc (__cplus_type_matcher): Only check the exception
9033 language if there is an exception table.
9035 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
9037 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
9038 as used to prevent conflicts with virtual function tables.
9040 1998-09-14 Mark Mitchell <mark@markmitchell.com>
9042 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
9043 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
9044 * class.c (maybe_class_too_private_p): New function.
9045 (finish_struct_methods): Use it.
9046 (finish_struct_1): Likewise.
9047 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
9050 * pt.c (check_specialization_scope): Fix spelling error.
9051 (check_explicit_specialization): Remove code to handle explicit
9052 specializations in class scope; they are now correctly diagnosed
9055 1998-09-10 Mark Mitchell <mark@markmitchell.com>
9057 * decl.c (pushdecl): Don't copy types if the
9058 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
9061 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9063 * class.c (get_enclosing_class): New function.
9064 (is_base_of_enclosing_class): Likewise.
9065 * cp-tree.h (get_enclosing_class): Declare.
9066 (is_base_of_enclosing_class): Likewise.
9067 * pt.c (coerce_template_parms): Use them.
9069 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
9071 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
9072 null to decide whether to use it.
9074 * error.c (dump_type_real): Handle NAMESPACE_DECL.
9075 * parse.y (base_class.1): Avoid crash on error.
9077 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
9079 * decl.c (make_typename_type): If context is a namespace, the code
9082 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
9084 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
9086 1998-09-08 Mark Mitchell <mark@markmitchell.com>
9088 * cp-tree.h (anonymous_namespace_name): Declare.
9089 * decl.c: Define it.
9090 (push_namespace): Use anonymous_namespace_name, rather than local
9092 * error.c (dump_decl): If a namespace is named
9093 anonymous_namespace_name, call it {anonymous}.
9095 * decl.c (grokparms): Distinguish between references and pointers
9098 1998-09-08 Richard Henderson <rth@cygnus.com>
9099 Mark Mitchell <mark@markmitchell.com>
9101 * pt.c (process_partial_specialization): Consistently allocate
9102 and zero tpd.parms based on ntparms. Use tpd2.parms, not
9103 tpd.parms, where appropriate.
9105 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
9107 * Makefile.in (INCLUDES): Update after recent toplevel gcc
9110 1998-09-05 Mark Mitchell <mark@markmitchell.com>
9112 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
9113 * class.c (finish_struct): Remove hackery to deal with explicit
9114 specializations in class scope.
9115 * decl.c (grokfndecl): Improve error-recovery.
9116 * decl2.c (grokfield): Likewise.
9117 * pt.c (check_specialization_scope): New function.
9118 (begin_specialization): Call it.
9119 (process_partial_specialization): New function, split out from
9120 push_template_decl. Check partial specializations more
9122 (push_template_decl): Call it.
9123 (check_explicit_specialization): Don't attempt to handle explicit
9124 specializations in class scope.
9125 (template_parm_data): Document. Add current_arg and
9126 arg_uses_template_parms.
9127 (mark_template_parm): Set it.
9128 (tsubst_arg_types): Remove unused variable.
9129 * semantics.c (begin_class_definition): Tweak.
9131 1998-09-04 Mark Mitchell <mark@markmitchell.com>
9133 * inc/typeinfo (type_info::type_info(const char*)): Make
9136 * cp-tree.h (hash_tree_cons_simple): New macro.
9137 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
9138 (coerce_template_parms): Use make_temp_vec, instead of
9139 make_tree_vec. Document this behavior.
9140 (lookup_template_class): Likewise.
9141 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
9142 Remove dead code (and add assertion to check its deadness). Fix
9143 bug w.r.t. exception specifications.
9145 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
9147 * decl2.c (import_export_vtable): Always make artificials comdat.
9148 (import_export_decl): Likewise.
9149 * pt.c (mark_decl_instantiated): Likewise.
9151 1998-09-03 Mark Mitchell <mark@markmitchell.com>
9153 * cp-tree.h (finish_globally_qualified_member_call_expr):
9155 (finish_qualified_call_expr).
9156 * semantics.c: Likewise.
9157 * parse.y (primary): Use it.
9158 * method.c (hack_identifier): Remove redundant code.
9160 * init.c (resolve_offset_ref): Call convert_from_reference to
9161 handle members of reference type. Improve error recovery.
9163 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
9165 * cp-tree.h: Declare warn_nontemplate_friend.
9166 * decl2.c (lang_decode_option): Set.
9167 * lang-options.h: Add -Wnon-template-friend.
9168 * friend.c (do_friend): Use to toggle non-template function warning.
9170 1998-09-03 Mark Mitchell <mark@markmitchell.com>
9172 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
9173 corresponding INTEGER_CSTs when processing_template_decl.
9174 * pt.c (tsubst_enum): Tweak accordingly.
9176 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9178 * decl.c (pushdecl_class_level): Add warning here.
9181 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
9183 * cvt.c (convert_pointer_to_real): Tidy.
9184 * search.c (get_base_distance_recursive): Simplify.
9185 (get_base_distance): Likewise.
9187 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
9190 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
9192 * lex.c (check_newline): Call HANDLE_PRAGMA before
9193 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
9194 if unknown pragmas are encountered.
9195 (handle_sysv_pragma): Interpret return code from
9196 handle_pragma_token (). Return success/failure indication rather
9197 than next unprocessed character.
9198 (pragma_getc): New function: retrieves characters from the
9199 input stream. Defined when HANDLE_PRAGMA is defined.
9200 (pragma_ungetc): New function: replaces characters back into the
9201 input stream. Defined when HANDLE_PRAGMA is defined.
9203 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
9205 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
9206 * class.c (build_vtable_entry_ref): Likewise.
9208 1998-09-01 Mark Mitchell <mark@markmitchell.com>
9210 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
9211 * decl2.c (import_export_decl): Likewise.
9212 * pt.c (instantiate_decl): Use it.
9214 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
9216 * decl.c (lookup_name_real): Also do implicit typename thing for
9217 artificial TYPE_DECLs.
9218 * search.c (lookup_field): Likewise.
9219 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
9220 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
9221 (enter_scope_of): Extract type from implicit typename.
9222 (begin_class_definition): Likewise.
9223 * lex.c (identifier_type): Handle implicit typename when checking
9226 * cp-tree.h: Declare flag_strict_prototype.
9227 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
9229 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
9230 specified, set it to the value of pedantic.
9232 1998-09-01 Mark Mitchell <mark@markmitchell.com>
9234 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
9236 1998-08-31 Mark Mitchell <mark@markmitchell.com>
9238 * decl.c (finish_enum): Handle member enums of classes declared in
9241 * decl2.c (grok_x_components): Strip attributes before calling
9244 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
9246 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
9247 -fenum-int-equivalence and -fno-nonnull-objects.
9248 * class.c (check_for_override): Remove support for -fall-virtual.
9249 (finish_struct_1): Likewise.
9250 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
9251 * typeck.c (build_binary_op_nodefault): Likewise.
9252 * cvt.c (ocp_convert): Likewise.
9253 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
9254 * class.c (build_vbase_path): Likewise.
9256 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
9258 * Makefile.in (INTERFACE): New, set to 1.
9260 1998-08-30 Mark Mitchell <mark@markmitchell.com>
9262 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
9263 comparing with global_namespace.
9264 (dump_aggr_type): Likewise.
9266 * decl.c (grokfndecl): Issue error on declaration of friend
9267 templates with explicit template arguments.
9269 * pt.c (convert_template_argument): New function, split out
9271 (coerce_template_parms): Here.
9272 (tsubst): Attempt better error-recovery.
9274 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
9276 * pt.c (decl_template_parm_p): Add checks for
9277 TEMPLATE_TEMPLATE_PARM.
9279 1998-08-28 Mark Mitchell <mark@markmitchell.com>
9281 * lex.c (do_identifier): Fix thinko in previous change.
9283 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
9285 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
9286 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
9288 1998-08-28 Richard Henderson <rth@cygnus.com>
9290 Add support for discarding unused virtual functions.
9291 * lang-options.h: Add -fvtable-gc.
9292 * cp-tree.h: Add flag_vtable_gc.
9293 * decl2.c (output_vtable_inherit): New fn.
9294 (finish_vtable_vardecl): Call it.
9295 * class.c (build_vtable_entry_ref): New fn.
9296 (build_vtbl_ref): Call it.
9298 1998-08-28 Mark Mitchell <mark@markmitchell.com>
9300 * cp-tree.h (build_enumerator): Take the enumeration type as a
9302 * decl.c (finish_enum): Don't set the TREE_TYPE for the
9303 enumeration constant values if we're processing_template_decls.
9304 Don't set the type for the CONST_DECLs either; that's done in
9306 (build_enumerator): Take the enumeration type as a
9308 * lex.c (do_identifier): Don't resolve enumeration constants while
9309 processing template declarations, even if they happen to be
9310 TEMPLATE_PARM_INDEXs.
9312 * parse.y (current_enum_type): New variable.
9313 (primary): Don't allow statement-expression in local classes just
9314 as we don't in global classes.
9315 (structsp): Use current_enum_type.
9316 (enum_list): Likewise.
9317 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
9318 finish_enum; they no longer occur.
9320 * cp-tree.h (finish_base_specifier): New function.
9321 * parse.y (base_class): Use it.
9322 * semantics.c (finish_base_specifier): Define it.
9324 * parse.y (structsp): Warn on use of typename outside of template
9327 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
9329 * lex.c (handle_cp_pragma): Remove #pragma vtable.
9330 * lang-options.h: Remove +e options.
9331 * decl2.c (lang_decode_option): Likewise.
9332 (import_export_vtable): Don't check write_virtuals.
9333 (finish_vtable_vardecl, finish_file): Likewise.
9334 * search.c (dfs_debug_mark): Likewise.
9335 * semantics.c (begin_class_definition): Likewise.
9336 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
9338 * call.c (build_over_call): Check flag_elide_constructors.
9339 * decl2.c: flag_elide_constructors defaults to 1.
9340 * typeck.c (convert_arguments): Remove return_loc parm.
9341 (build_function_call_real): Adjust.
9343 * search.c: Tear out all mi_matrix and memoize code.
9344 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
9345 * lang-options.h: Remove documentation for -fhandle-exceptions,
9346 -fmemoize-lookups and -fsave-memoized.
9347 * cp-tree.h: Lose mi_matrix and memoize support.
9348 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
9349 * class.c: Lose struct class_level.
9350 (pushclass, popclass): Lose memoize support.
9351 * init.c (build_offset_ref): Likewise.
9353 Never change BINFO_INHERITANCE_CHAIN.
9354 * init.c (emit_base_init): Change modification of
9355 BINFO_INHERITANCE_CHAIN to an assert.
9356 * search.c (get_base_distance_recursive): Likewise.
9357 (get_base_distance): Likewise.
9358 (lookup_member): Likewise.
9359 (convert_pointer_to_single_level): Likewise.
9360 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
9361 (lookup_fnfields): Likewise.
9362 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
9363 (unshare_base_binfos): Don't call propagate_binfo_offsets.
9364 (layout_basetypes): Call propagate_binfo_offsets instead of
9365 unshare_base_binfos.
9366 * decl.c (xref_basetypes): Call unshare_base_binfos.
9367 * pt.c (instantiate_class_template): Likewise.
9368 * tree.c (reverse_path): Remove 'copy' parm; always make a
9370 * class.c (build_vbase_path): Just call it.
9371 * search.c (compute_access): Likewise. Don't re-reverse.
9373 1998-08-27 Mark Mitchell <mark@markmitchell.com>
9375 * class.c (build_vbase_path): Use reverse_path.
9376 (finish_base_struct): Move warnings for inaccessible bases to
9378 (modify_one_vtable): Remove check of TREE_USED (binfo).
9379 (fixup_vtable_deltas1): Likewise.
9380 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
9381 (xref_tag): Remove binfos parameter.
9382 (make_binfo): Remove chain parameter.
9383 (reverse_path): Add copy parameter.
9384 * decl.c (init_decl_processing): Change calls to xref_tag.
9385 (xref_tag): Remove binfos parameter.
9386 (xref_basetypes): Change calls to make_binfo.
9387 * decl2.c (grok_x_components): Change calls to xref_tag.
9388 (handle_class_head): Likewise.
9389 * friend.c (do_friend): Likewise.
9390 * lex.c (make_lang_type): Change calls to make_binfo.
9391 * parse.y (structsp): Change calls to xref_tag.
9392 (named_complex_class_head_sans_basetype): Likewise.
9393 (named_class_head): Likewise.
9394 * rtti.c (init_rtti_processing): Likewise.
9395 * search.c (compute_access): Change calls to reverse_path.
9396 (dfs_get_vbase_types): Change calls to make_binfo.
9397 (get_vbase_types): Remove dead code.
9398 * tree.c (unshare_base_binfos): Change calls to make_binfo.
9399 (layout_basetypes): Warn here about inaccessible bases.
9400 (make_binfo): Remove chain parameter.
9401 (reverse_path): Add copy parameter.
9403 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
9405 * class.c: #if 0 complete_type_p.
9406 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
9407 * method.c (process_overload_item): Likewise.
9408 * typeck.c (comp_target_types): Likewise.
9410 Stop sharing binfos for indirect virtual bases.
9411 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
9412 (layout_basetypes): Likewise.
9413 (unshare_base_binfos): Copy vbases, too.
9414 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
9415 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
9416 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
9417 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
9418 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
9419 reference to BINFO_VIA_PUBLIC.
9420 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
9421 (push_class_decls): Use them.
9422 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
9423 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
9425 1998-08-27 Mark Mitchell <mark@markmitchell.com>
9427 * decl.c (build_enumerator): Set DECL_CONTEXT for the
9430 1998-08-26 Mark Mitchell <mark@markmitchell.com>
9432 * cp-tree.h (finish_enum): Change prototype.
9433 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
9434 VALUES parameter. Don't try to compute mins/maxs if
9435 processing_template_decl.
9436 * parse.y (structsp): Use new calling sequence for finish_enum.
9437 * pt.c (tsubst_enum): Likewise. Take the new type as input.
9438 (lookup_template_class): Remove unused variables. Tweak.
9439 Register enums on instantiation list before substituting
9440 enumeration constants.
9441 (tsubst_decl): Remove unused variables.
9442 (regenerate_decl_from_template): Likewise.
9444 * decl.c (duplicate_decls): Don't obliterate the
9445 DECL_TEMPLATE_INFO for a template if we're not replacing it with
9448 * lex.c (do_identifier): Fix typo in comment.
9450 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9452 * errfn.c: Remove stdarg.h/varargs.h.
9455 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
9457 * pt.c (tsubst_copy): Only do typename overloading on an
9458 IDENTIFIER_NODE that happens to look like a typename if it actually
9459 has a type for us to use.
9461 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
9463 * typeck.c (comp_cv_target_types): Split out...
9464 (comp_target_types): From here. Don't allow cv-qual changes under
9465 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
9466 (build_ptrmemfunc): Pass 1 to nptrs.
9467 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
9469 1998-08-25 Mark Mitchell <mark@markmitchell.com>
9471 * search.c (dependent_base_p): Don't compare a binfo to
9472 current_class_type; use the TREE_TYPE of the binfo instead.
9474 * cp-tree.h (CLASS_TYPE_P): Revise definition.
9476 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
9478 * decl.c (duplicate_decls): Don't complain about different
9479 exceptions from an internal decl even if pedantic.
9481 * typeck.c (convert_for_assignment): Converting from pm of vbase
9482 to derived is an error, not a sorry.
9484 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
9485 * class.c (fixed_type_or_null): Rename from
9486 resolves_to_fixed_type_p. Return the dynamic type of the
9487 expression, if fixed, or null.
9488 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
9489 does not match the static type.
9490 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
9491 resolves_to_fixed_type_p again.
9493 1998-08-24 Mark Mitchell <mark@markmitchell.com>
9495 * pt.c (tsubst_decl): Move special case code for dealing with
9496 tricky friend templates here from ...
9497 (regenerate_decl_from_template): Here.
9499 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
9501 * decl.c (start_decl): Remove redundant linkage check.
9503 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
9505 * typeck.c (c_expand_return): Handle the case that valtype
9506 is wider than the functions return type.
9508 1998-08-24 Mark Mitchell <mark@markmitchell.com>
9510 * cp-tree.h (CLASS_TYPE_P): New macro.
9511 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
9512 * pt.c (process_template_parm): Undo previous change.
9514 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
9516 * cp-tree.h: Declare.
9517 * pt.c (decl_template_parm_p): New function.
9518 * decl.c (pushdecl): Check decls for redeclaring template parms.
9519 (xref_tag): Make redeclaration an error, print decl.
9520 * decl2.c (grokfield): Check field_decls for redeclaration as well.
9522 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
9524 * parse.y (primary): Fix up the type of string constants.
9526 1998-08-24 Mark Mitchell <mark@markmitchell.com>
9528 * typeck.c (convert_for_initialization): Move check for odd uses
9529 of NULL to avoid duplicate warnings.
9531 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
9533 * tree.c (lvalue_type): Fix for arrays.
9534 * typeck.c (string_conv_p): New fn.
9535 (convert_for_assignment): Use it.
9536 (build_unary_op): Use lvalue_type.
9537 * call.c (standard_conversion, convert_like): Use string_conv_p.
9538 (add_function_candidate): Use lvalue_type.
9539 * cvt.c (convert_to_reference): Likewise.
9540 * decl2.c (lang_decode_option): Ignore -traditional.
9541 * decl.c (init_decl_processing): flag_writable_strings inhibits
9544 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
9546 * lang-options.h (lang_options): Add fconst-strings to the list
9548 * decl2.c (lang_f_options, lang_decode_option): Likewise.
9550 1998-08-24 Nathan Sidwell <nathan@acm.org>
9552 * lex.c (real_yylex): Don't warn about long long constants if
9553 we're allowing long long.
9555 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9557 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
9558 accessing bindings directly.
9560 * search.c (my_tree_cons): Reimplement.
9562 * lang-specs.h: Remove __HONOR_STD.
9563 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
9565 1998-08-23 Mark Mitchell <mark@markmitchell.com>
9567 * decl.c (grokdeclarator): Complain about in-class initialization
9568 of aggregates and/or references.
9569 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
9570 TEMPLATE_TYPE_PARMs.
9572 * decl2.c (grok_array_decl): Add comment.
9573 (mark_used): Don't instantiate an explicit instantiation.
9574 * friend.c (make_friend_class): Remove bogus comment. Fix check
9575 for partial specializations.
9576 * pt.c (check_explicit_specialization): Don't
9577 SET_DECL_EXPLICIT_INSTANTIATION here.
9578 (mark_decl_instantiated): Or here.
9579 (do_decl_instantiation): Do it here, instead. Add checks for
9580 duplicate explicit instantiations, etc. Tidy.
9581 (do_type_instantiation): Likewise.
9582 (instantiate_decl): Improve comments. Complain about explicit
9583 instantiations where no definition is available.
9585 * cp-tree.h (ansi_null_node): Remove.
9586 * call.c (build_over_call): Warn about converting NULL to an
9588 * cvt.c (build_expr_type_conversion): Likewise. Use
9589 null_ptr_cst_p instead of expanding it inline.
9590 * decl.c (ansi_null_node): Remove.
9591 (init_decl_processing): Make null_node always have integral type.
9592 * except.c (build_throw): Warn about converting NULL to an
9594 * lex.c (init_parse): Remove handling of ansi_null_node.
9595 * pt.c (type_unification_real): Don't convert NULL to void* type.
9596 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
9597 (convert_for_assignment): Warn about converting NULL to an
9599 (convert_for_initialization): Likewise.
9601 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
9603 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
9604 * pt.c (coerce_template_parms): Use no_linkage_check.
9605 * decl.c (grokvardecl): Likewise.
9606 (grokfndecl): Likewise. Members of anonymous types have no linkage.
9608 * method.c (process_overload_item): Remove useless code.
9610 1998-08-20 Per Bothner <bothner@cygnus.com>
9612 Handle new'ing of Java classes.
9613 * init.c (build_class_classref): New function.
9614 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
9615 constructor does not return this; don't need to exception-protect.
9617 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
9618 * decl2.c (acceptable_java_type): Handle template-derived types.
9620 1998-08-20 Per Bothner <bothner@cygnus.com>
9622 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
9624 1998-08-20 Mark Mitchell <mark@markmitchell.com>
9626 * decl.c (duplicate_decls): Always merge the old and new patterns
9627 for templates, regardless of whether or not the new one has
9628 DECL_INITIAL. Don't throw away specializations. Merge
9630 * pt.c (tsubst_decl): Use the right pattern when calculating the
9631 complete args for a new template instance.
9632 (do_decl_instantiation): Fix typo in comment.
9633 (regenerate_decl_from_template): Deal with tricky friend template
9635 (instantiate_decl): Likewise.
9637 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
9639 * init.c (build_builtin_delete_call): Add missing assemble_external
9642 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
9644 * parse.y (notype_unqualified_id): Also accept ~A<int>.
9646 1998-08-19 Mark Mitchell <mark@markmitchell.com>
9648 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
9650 * except.c (build_throw): Warn when NULL is thrown, even with
9651 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
9654 * cp-tree.h (ansi_null_node): New variable.
9655 * decl.c (ansi_null_node): New variable.
9656 (init_decl_processing): Initialize its type.
9657 * lex.c (init_parse): Initialize its value. Use ansi_null_node
9658 for null_node in non-ANSI mode.
9659 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
9660 place of null_node to avoid spurious errors.
9662 1998-08-17 Mark Mitchell <mark@markmitchell.com>
9664 * cp-tree.h (enter_scope_of): New function.
9665 * parse.y (complex_direct_notype_declarator): Use it.
9666 * semantics.c (enter_scope_of): New function.
9668 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
9670 * decl.c (grokparms): No, here.
9672 * decl.c (grokdeclarator): Catch parm with pointer to array of
9673 unknown bound here...
9674 * method.c (process_overload_item): ...not here.
9676 * gxxint.texi: Remove obsolete documentation of overloading code.
9678 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
9679 * class.c (finish_struct_bits): Likewise.
9681 * tree.c (lvalue_type): Fix for arrays.
9682 * typeck.c (build_unary_op): Use lvalue_type.
9683 * call.c (add_function_candidate): Likewise.
9684 * cvt.c (convert_to_reference): Likewise.
9686 * decl2.c (lang_decode_option): Ignore -traditional.
9688 * init.c (build_offset_ref): Don't mess with error_mark_node.
9689 * lex.c (do_scoped_id): Use cp_error.
9691 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
9693 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
9695 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
9697 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
9699 * cp-tree.h (set_identifier_local_value): Provide prototype.
9701 * decl2.c (do_namespace_alias): Remove unused variables `binding'
9704 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
9706 * Makefile.in: Rename BBISON to BISON so that it can be properly
9707 inherited from the parent makefile.
9709 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
9711 * lang-options.h: Add -finit-priority.
9712 * decl2.c: Likewise. Check flag_init_priority instead of
9715 * decl2.c (setup_initp): New fn.
9716 (start_objects, finish_objects, do_ctors): Handle init_priority.
9717 (do_dtors, finish_file): Likewise.
9719 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
9721 * pt.c (tsubst_copy): Hush warning.
9723 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
9725 1998-08-12 Mark Mitchell <mark@markmitchell.com>
9727 * pt.c (print_template_context): Don't abort when instantiating a
9730 * decl.c (grokdeclarator): Issue errors on namespace qualified
9731 declarators in parameter lists or in class scope.
9733 1998-08-09 Mark Mitchell <mark@markmitchell.com>
9735 * pt.c (check_explicit_specialization): Don't abort on bogus
9736 explicit instantiations.
9738 1998-08-07 Mark Mitchell <mark@markmitchell.com>
9740 * typeck.c (require_complete_type): Use complete_type_or_else.
9741 (complete_type_or_else): Always return NULL_TREE on failure, as
9744 * pt.c (tsubst_aggr_type): Prototype.
9745 (tsubst_decl): New function, split out from tsubst. Set
9746 input_filename and lineno as appropriate.
9747 (pop_tinst_level): Restore the file and line number saved in
9749 (instantiate_class_template): Set input_filename and lineno as
9751 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
9752 context for a TYPENAME_TYPE is complete.
9754 * decl2.c (grokbitfield): Issue errors on bitfields declared with
9756 (do_dtors): As in do_ctors, pretend to be a member of the same
9757 class as a static data member while generating a call to its
9760 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
9761 conversions, even in complex virtual base class hierarchies.
9763 1998-08-06 Mark Mitchell <mark@markmitchell.com>
9765 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
9766 (TYPE_TEMPLATE_INFO): Likewise.
9767 (SET_TYPE_TEMPLATE_INFO): Likewise.
9768 (ENUM_TI_TEMPLATE): Likewise.
9769 (ENUM_TI_ARGS): Likewise.
9770 (lookup_nested_type_by_name): Remove.
9771 * decl.c (maybe_process_template_type_declaration): Handle enums.
9772 (start_enum): Don't check for primary-template enum declarations
9774 (finish_enum): Clean up, document. Make sure template enum
9775 constants get the correct type.
9776 (build_enumerator): Copy initializers for template enumerations,
9778 (grok_enum_decls): Document.
9779 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
9780 better. Build LOOKUP_EXPRs for local variables, even if they are
9782 * pt.c (tsubst_enum): Remove field_chain parameter.
9783 (template_class_depth): Include the depth of surrounding function
9785 (push_template_decl): Check for primary-template enum declarations
9786 here. Deal with enumeration templates.
9787 (lookup_template_class): Likewise.
9788 (for_each_template_parm): Likewise.
9789 (instantiate_class_template): Don't call tsubst_enum directly,
9790 call tsubst instead, to instantiate enums. Deal with all
9791 field_chain issues here, not in tsubst_enum.
9792 (lookup_nested_type_by_name): Remove.
9793 (tsubst_aggr_type): Revise handling of enumeration types.
9795 (tsubst_copy): Likewise.
9796 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
9798 1998-08-04 Mark Mitchell <mark@markmitchell.com>
9800 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
9801 uses template parameters.
9802 * method.c (build_template_parm_names): Use the full set of
9803 template arguments for tsubst'ing.
9804 (build_overload_identifier): Pass the full set of template
9805 arguments to build_template_parm_names, not just the
9807 * pt.c (TMPL_ARGS_DEPTH): Define using
9808 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
9809 (NUM_TMPL_ARGS): New macro.
9810 (add_outermost_template_args): Deal with the case where the outer
9811 args will be completely discarded.
9812 (coerce_template_parms): Use the full set of template arguments
9813 for tsubst'ing. Simplify. Add some asserts. Improve
9815 (lookup_template_class): Pass the full set of template arguments
9816 to coerce_template_parms.
9817 (tsubst): Add assertion.
9818 (do_type_instantiation): Don't instantiate member template
9821 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
9822 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
9824 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
9826 * method.c (set_mangled_name_for_decl): Change return type to void.
9828 * decl.c (lookup_name_real): A namespace-level decl takes priority
9829 over implicit typename. Avoid doing the same lookup twice.
9831 * search.c (dependent_base_p): New fn.
9832 (dfs_pushdecls, dfs_compress_decls): Use it.
9834 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
9835 virtual functions if the type doesn't have any.
9837 1998-08-03 Mark Mitchell <mark@markmitchell.com>
9839 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
9840 uses template parameters.
9842 1998-08-02 Mark Mitchell <mark@markmitchell.com>
9844 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
9845 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
9846 * lex.c (do_identifier): Don't use a second argument, or a type,
9847 when building LOOKUP_EXPRs.
9848 (do_identifier): Likewise.
9849 (do_scoped_id): Likewise.
9850 * method.c (hack_identifier): Improve error message.
9851 * pt.c (lookup_template_function): Don't needlessly call
9852 copy_to_permanent or build_min.
9853 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
9855 (do_decl_instantiation): Improve error message.
9856 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
9857 (build_min): Copy the type to the permanent obstack, too.
9859 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
9861 * init.c (init_init_processing): Remove BI* handling.
9862 (build_builtin_call): Remove.
9863 (build_builtin_delete_call): New fn.
9864 (build_delete): Use it.
9866 1998-07-31 Mark Mitchell <mark@markmitchell.com>
9868 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
9869 (maybe_check_template_type): New function.
9870 * decl.c (maybe_process_template_type_declaration): New function,
9871 split out from pushtag Call maybe_check_template_type.
9872 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
9873 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9874 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9875 * pt.c (template_class_depth_real): Generalization of ...
9876 (template_class_depth): Use it.
9877 (register_specialization): Use duplicate_decls for duplicate
9878 declarations of specializations.
9879 (maybe_check_template_type): New function.
9880 (push_template_decl_real): Fix comment.
9881 (convert_nontype_argument): Likewise.
9882 (lookup_template_class): Likewise. Avoid an infinite loop on
9884 (tsubst_friend_function): Fix comment.
9885 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
9887 * semantics.c (begin_function_definition): Use
9888 reset_specialization to note that template headers don't apply
9889 directly to declarations after the opening curly for a function.
9891 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
9893 * decl.c (push_overloaded_decl): Use current_namespace instead of
9894 DECL_CONTEXT (decl) to determine where we go.
9896 * decl.c (lookup_name_real): Fix typo.
9898 1998-07-28 Mark Mitchell <mark@markmitchell.com>
9900 * friend.c (is_friend): Be lenient with member functions to deal
9901 with nested friends.
9903 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
9905 * class.c (finish_struct_1): Convert integer_zero_node to
9906 ssizetype before passing it to set_rtti_entry.
9907 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
9908 of any size to a pointer.
9910 1998-07-27 Mark Mitchell <mark@markmitchell.com>
9912 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
9913 (build_template_decl_overload): Remove.
9914 (set_mangled_name_for_decl): New function.
9915 (innermost_args): Remove is_spec parameter.
9916 (most_specialized, most_specialized_class): Remove declarations.
9917 (lookup_template_class): Add entering_scope parameter.
9918 (maybe_process_partial_specialization): New function.
9919 (finish_template_decl): Likewise.
9920 (finish_template_type): Likewise.
9921 * class.c (finish_struct): Clean up processing of member template
9923 * decl.c (pushtag): Fix formatting.
9924 (lookup_tag): Improve handling of pseudo-global levels.
9925 (make_typename_type): Adjust call to lookup_template_class.
9926 (shadow_tag): Use maybe_process_partial_specialization.
9927 (xref_tag): Improve handling of member friends.
9928 (start_function): Call push_nested_class before
9929 push_template_decl. Don't call push_template_decl for
9931 * decl2.c (grok_x_components): Don't call xref_tag for
9932 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
9933 (grokclassfn): Use set_mangled_name_for_decl.
9934 (arg_assoc_class): Adjust call to innermost_args.
9935 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
9936 * error.c (dump_function_name): Improve printing of template
9938 * friend.c (is_friend): Don't compare types of decls to determine
9939 friendship, unless flag_guiding_decls.
9940 (make_friend_class): Partial specializations cannot be friends.
9941 (do_friend): Use set_mangled_name_for_decl. Call
9942 push_template_decl_real instead of push_template_decl.
9943 * method.c (build_decl_overload_real): Remove prototype. Give it
9945 (build_overload_identififer): Adjust call to innermost_args.
9946 (build_template_decl_overload): Remove.
9947 (set_mangled_name_for_decl): New function.
9948 * parse.y (.finish_template_type): New non-terminal.
9949 (template_def): Use finish_template_decl. Use template_extdef
9951 (template_extdef, template_datadef): New non-terminals, containing
9952 only those rules for things which can be templates.
9954 (template_type, self_template_type): Use .finish_template_type.
9955 (named_class_head): Use maybe_process_partial_specialization.
9956 * pt.c (mangle_class_name_for_template): Remove context parameter.
9957 (get_class_bindings): Remove outer_args parameter.
9958 (complete_template_args): Remove.
9959 (add_outermost_template_args): New function.
9960 (register_specialization): Return the specialization.
9961 (unregister_specialization): New function.
9962 (tsubst_template_parms): Likewise.
9963 (most_specialized, most_specialized_class): Prototype here as
9965 (original_template): Rename to most_general_template.
9966 (tsubst_template_parms): New function.
9967 (set_mangled_name_for_template_decl): Likewise.
9968 (TMPL_ARGS_DEPTH): New macro.
9969 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
9970 (TMPL_ARGS_LEVEL): New macro.
9971 (SET_TMPL_ARGS_LEVEL): Likewise.
9972 (TMPL_ARG): Likewise.
9973 (SET_TMPL_ARG): Likewise.
9974 (TMPL_ARGS_DEPTH): Likewise.
9975 (finish_member_template_decl): Use finish_template_decl.
9976 (maybe_process_partial_specialization): New function, split out
9978 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
9979 (maybe_begin_member_template_processing): Use new macros.
9980 (is_member_template): Likewise.
9981 (is_member_template_class): Likewise.
9982 (add_to_template_args): Likewise. Deal with multiple levels of
9984 (maybe_process_partial_specialization): New function.
9985 (retrieve_specialization): Add consistency check.
9986 (determine_specialization): Return full argument list.
9987 (check_explicit_specialization): Tweak friend handling. Use full
9988 argument lists. Simplify.
9989 (current_template_args): Use new macros.
9990 (push_template_decl_real): Change ill-named mainargs to specargs.
9991 Check that a partial specialization actually specializes at least
9992 one parameter. Improve friend handling. Modify for full
9994 (classtype_mangled_name): Don't mangle the names of
9996 (lookup_template_class): Add entering_scope parameter. Use it to
9997 avoid finding a template type when an instantiation is required.
9998 Simplify. Use full template arguments.
9999 (tsubst_friend_function): Use unregister_specialization. Use new
10000 macros. Use full template arguments.
10001 (tsubst_friend_class): Substitute, using tsubst_template_parms,
10002 into the template parameters before passing them to
10003 redeclare_class_template.
10004 (instantiate_class_template): Simplify. Use full template
10005 arguments. Adjust calls to get_class_bindings. Use
10006 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
10007 (innermost_args): Use new macros.
10008 (tsubst_aggr_type): New function, split out from tsubst.
10009 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
10010 conventions for lookup_template_class. Refine handling of partial
10011 instantiations. Remove calls to complete_template_args.
10012 Simplify. Add consistency checks. Use set_mangled_name_for_decl
10013 and set_mangled_name_for_template_decl.
10014 (tsubst_copy): Use tsubst_aggr_type.
10015 (instantiate_template): Use full template arguments.
10016 (more_specialized): Improve formatting.
10017 (more_specialized_class): Adjust calls to get_class_bindings.
10018 (get_bindings_real): Don't call complete_template_args.
10019 (most_specialized): Don't overwrite input; create a new list.
10020 (most_specialized_class): Use most_general_template.
10021 (regenerate_decl_from_template): Use unregister_specialization.
10022 Use full template arguments.
10023 (instantiate_decl): Use full template arguments.
10024 (set_mangled_name_for_template_decl): New function.
10025 * semantics.c (begin_class_definition): Use
10026 maybe_process_partial_specialization.
10027 (finish_member_class_template): New function.
10028 (finish_template_decl): Likewise.
10029 (finish_template_type): Likewise.
10030 (typeck.c): Don't crash after issuing a compiler_error.
10031 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
10033 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
10035 * typeck2.c (build_functional_cast): Handle default-initialization.
10037 * call.c (build_over_call): Pass 1 to popclass.
10039 * parse.y (direct_notype_declarator): Add precedence declaration
10040 to notype_unqualified_id case.
10041 * Makefile.in (EXPECT): Adjust.
10043 * tree.c (ovl_member): Fix for single function in OVL.
10045 1998-07-27 Dave Brolley <brolley@cygnus.com>
10047 * c-lex.c (yylex): Fix boundary conditions in character literal and
10048 string literal loops.
10050 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
10052 * decl.c (lookup_name_real): OK, do return the from_obj value
10053 unless got_object depends on template parms.
10055 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
10057 * pt.c (coerce_template_parms): Also complain about local enums.
10059 * cp-tree.h: Add prototype for set_identifier_local_value.
10060 * decl.c (set_identifier_local_value_with_scope): Make static,
10062 * search.c (covariant_return_p): Likewise.
10063 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
10065 * call.c (build_method_call): Only pull out the type of a destructor
10066 if it's a template type parm.
10067 * decl.c (lookup_name_real): Never return the from_obj value.
10069 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
10071 * except.c (process_start_catch_block_old): Call start_decl_1 for
10073 * decl.c (start_decl_1): Avoid duplicate error.
10075 * init.c (expand_default_init): Only perform the initialization if
10076 it will do something.
10078 1998-07-23 H.J. Lu (hjl@gnu.org)
10080 * parse.y (base_class): Check for invalid base class.
10082 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
10084 * decl2.c (import_export_template): Fold in...
10085 (import_export_class): ...to here. Handle dllimport/export.
10087 * class.c (build_vtable): Pass at_eof to import_export_vtable.
10088 (prepare_fresh_vtable): Likewise.
10089 * decl2.c (import_export_class): Split out...
10090 (finish_prevtable_vardecl): From here.
10091 * class.c (finish_struct_1): Call import_export_class if at_eof.
10093 * decl.c (start_function): #if 0 mysterious code I wrote and have
10095 * rtti.c (get_tinfo_fn): If this is for a class type, set
10098 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
10100 * inc/exception: Change terminate and unexpected to ().
10102 * parse.y (named_class_head_sans_basetype_defn): A
10103 named_class_head_sans_basetype followed by '{' or ':' is a defn.
10105 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
10107 * tree.c (canonical_type_variant): New fn to handle arrays.
10108 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
10109 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
10110 * method.c (process_overload_item): Use build_overload_value for
10113 1998-07-20 Dave Brolley <brolley@cygnus.com>
10115 * lex.c (mbchar.h): #include it.
10116 (GET_ENVIRONMENT): New macro.
10117 (init_parse): Set character set based on LANG environment variable.
10118 (real_yylex): Handle multibyte characters in character literals.
10119 (real_yylex): Handle multibyte characters in string literals.
10121 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
10123 * lex.c (do_identifier): Look for class value even if we don't
10124 have a global value. Do implicit declaration if parsing is 2.
10125 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
10128 1998-07-19 Mark Mitchell <mark@markmitchell.com>
10130 * decl.c (pushtag): Revert previous change.
10131 * pt.c (lookup_template_class): Don't put out debugging
10132 information for types that use template parameters.
10134 * decl.c (pushtag): Don't put out debugging information for
10135 compiler-generated typedefs.
10137 * error.c (dump_type_real): Don't crash when presented with
10138 intQI_type_node or the like.
10140 * semantics.c (finish_translation_unit): Fix spelling error in
10143 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
10145 * decl.c (lookup_name_real): Pull out single function here.
10146 (select_decl): Not here.
10147 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
10149 * decl.c (qualify_lookup): Tweak again.
10151 * pt.c (lookup_template_class): Don't mess with the context of the
10153 * decl2.c (current_decl_namespace): Remove special handling for
10156 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
10157 a member template specialization.
10159 * tree.c (ovl_member): Use decls_match to compare functions.
10160 * decl.c (decls_match): Check the context of a function.
10162 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
10163 in Koenig lookup support rules.
10164 * semantics.c (finish_call_expr): Handle the new cases.
10166 * typeck.c (build_x_function_call): Handle overloaded methods.
10168 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
10170 1998-07-16 Mark Mitchell <mark@markmitchell.com>
10172 * semantics.c (finish_object_call_expr): Revert previous change.
10173 * call.c (build_new_method_call): Likewise. Instead, convert
10174 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
10176 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
10178 * decl.c (qualify_lookup): Handle templates.
10180 * decl2.c (do_using_directive): Don't pass ancestor.
10181 * decl.c (push_using_directive): Calculate ancestor.
10183 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
10184 * decl.c (pushdecl): Move type shadowing handling from here...
10185 (duplicate_decls): ...to here.
10186 * decl.c (set_identifier_local_value_with_scope): New fn.
10187 (pushdecl): Use it.
10188 (set_identifier_local_value, lookup_type_current_level): New fns.
10189 * decl2.c (do_local_using_decl): Handle types and binding level
10192 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
10193 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
10194 (lookup_namespace_name): Likewise.
10195 * typeck.c (build_unary_op): Not here anymore.
10197 * decl2.c (do_class_using_decl): Make sure we get an identifier.
10198 * class.c (handle_using_decl): Ignore TYPE_DECLs.
10200 * decl.c (qualify_lookup): New fn.
10201 (lookup_name_real): Use it.
10203 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
10205 * decl2.c (add_using_namespace): When directly using a namespace
10206 that was indirect before, promote it.
10208 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
10209 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
10210 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
10211 * decl.c (select_decl): Replace two flag parameters by one.
10212 (unqualified_namespace_lookup): Likewise, pass flag.
10213 (lookup_flags): New function.
10214 (lookup_name_real): Compute flags, pass them.
10215 (lookup_namespace_name): Call with zero-flag.
10216 * decl2.c (ambiguous_decl): Add flag parameter, complain only
10217 according to flags.
10218 (lookup_using_namespace, qualified_lookup_using_namespace):
10219 Add flag parameter, pass them through.
10220 * lex.c (do_scoped_id): Call with zero-flag.
10222 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
10224 * typeck.c (convert_for_assignment): Use comptypes.
10226 1998-07-16 Mark Mitchell <mark@markmitchell.com>
10228 * semantics.c (finish_object_call_expr): Move test for the
10229 function called being a TYPE_DECL to ...
10230 * call.c (build_new_method_call): Here.
10232 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
10234 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
10235 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
10237 * lex.c (looking_for_typename): Don't initialize.
10239 * decl2.c (ambiguous_decl): Clarify error message.
10241 * decl.c (push_using_directive): Iterate over namespaces used
10244 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10246 * decl2.c (add_using_namespace): Iterate over namespaces used
10249 * decl.c (lookup_name_real): Accept namespace aliases as locals.
10250 (cat_namespace_levels): Ignore aliases.
10251 (duplicate_decls): Ignore duplicate aliases.
10252 * decl2.c (do_namespace_alias): Process block level namespace
10253 aliases. Store alias with pushdecl. Remove odr errors.
10254 * parse.y (namespace_alias): New non-terminal.
10257 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
10259 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
10260 Handle TEMPLATE_TYPE_PARM.
10261 (arg_assoc): Rewrite.
10263 * pt.c (complete_template_args): Don't look at the context unless
10266 * method.c (build_decl_overload_real): Fix namespace handling.
10268 * typeck.c (build_unary_op): Extract a lone function from an
10271 * call.c (build_scoped_method_call): Handle getting a namespace
10272 for basetype in a destructor call.
10273 (check_dtor_name): Handle enums.
10275 * parse.y (using_directive): New nonterminal.
10276 (extdef, simple_stmt): Use it.
10278 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
10280 * decl2.c (add_function): Move error message ...
10281 (arg_assoc_namespace): ... from here.
10283 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
10285 * parse.y (namespace_qualifier): Fix multiple level handling.
10286 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
10287 (arg_assoc): Don't skip the first argument of a function.
10289 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
10291 * search.c (my_tree_cons): Clean up.
10293 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
10295 * call.c (joust): Don't warn about "confusing" conversions to the
10298 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
10300 * class.c (push_nested_class): Complain about namespaces.
10301 * decl.c (start_decl): Enter the object's namespace.
10302 (cp_finish_decl): Leave it.
10303 (grokdeclarator): Likewise.
10304 * decl2.c (check_decl_namespace): New function.
10305 (finish_file): Call it.
10306 * parse.y (complex_direct_notype_declarator): Set complexity
10307 of namespace-qualified ids to -1, enter the namespace.
10309 * method.c (build_template_decl_overload): Expect _DECL as first
10310 parameter. Put context temporarily into current_namespace.
10311 * pt.c (check_explicit_specialization): Change caller.
10312 (tsubst): Likewise.
10314 * init.c (build_offset_ref): Call mark_used and
10315 convert_from_reference for namespace members.
10317 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
10319 * search.c (my_tree_cons): The bitfield is at index 2.
10321 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
10323 * lang-options.h: Format changed to work with new --help support
10326 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
10328 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
10329 Do Koenig lookup in CALL_EXPR.
10330 (arg_assoc): Handle error_mark.
10331 * lex.c (is_global): New function.
10332 (do_identifier): Expect arguments for Koenig lookup.
10333 * parse.y (primary): Add rules for calls of unqualified function calls.
10334 (do_id): Change call of do_identifier.
10335 * pt.c (finish_stmt_expr): Likewise.
10336 * semantics.c (finish_id_expr): Likewise.
10337 (finish_call_expr): Add integer parameter to indicate
10338 argument-dependent lookup.
10340 * decl.c (struct binding_level): New field using_directives.
10341 (push_using_decl): Not sorry anymore.
10342 (push_using_directive): New function.
10343 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
10344 (unqualified_namespace_lookup): New function, code from ...
10345 (lookup_name_real): ... here.
10346 * decl2.c (lookup_using_namespace): Pass using list instead of
10348 (validate_nonmember_using_decl): New function.
10349 (do_nonmember_using_decl): New function.
10350 (do_toplevel_using_decl): Use them.
10351 (do_local_using_decl): New function.
10352 (do_using_directive): Support block-level directives.
10353 * parse.y (simple_stmt): Support using declarations and
10355 (namespace_qualifier, namespace_using_decl): New non-terminals.
10357 * xref.c (classname): New function.
10358 (GNU_xref_hier): Change class and base parameters to tree.
10359 * decl.c (xref_baseypes): Change caller.
10360 * friend.c (make_friend_class): Likewise.
10362 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10364 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
10367 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
10368 template template parameter, record its use.
10369 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
10370 its template arguments if exists.
10372 * pt.c (coerce_template_template_parms): New function equivalent
10373 to coerce_template_parms when IS_TMPL_PARM is true.
10374 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
10375 all callers changed.
10377 (coerce_template_parms): Access ARGLIST properly when creating a
10378 new vector. Only accept implicit TYPE_DECL as valid argument for
10379 a template template parameter when it is a base class of
10380 current_class_type. Don't display error message when COMPLAIN is
10383 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
10385 * repo.c (get_base_filename): Use file_name_nondirectory.
10386 (open_repo_file): Likewise.
10387 * cp-tree.h (file_name_nondirectory): Add prototype.
10389 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
10391 * friend.c (do_friend): Pull the identifier out of declarator.
10392 Use cp_error and friends.
10393 * decl2.c (qualified_lookup_using_namespace): Fix call to
10395 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
10396 (grokvardecl): Use DECL_CLASS_SCOPE_P.
10397 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
10398 * class.c (warn_hidden): Fix for OVERLOAD.
10399 From grahams@rcp.co.uk:
10400 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
10401 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
10403 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
10405 * g++.1 (-traditional): Remove duplicated documentation.
10407 1998-07-11 Mark Mitchell <mark@markmitchell.com>
10409 * method.c (flush_repeats): Add nrepeats parameter.
10410 (issue_nrepeats): Likewise.
10411 (is_back_referenceable_type): New function. Don't back-reference
10412 TEMPLATE_TYPE_PARMs as well as simple types like integers.
10413 (build_mangled_name_for_type): Likewise.
10414 (build_mangled_name_for_type_with_Gcode): Likewise.
10415 (lasttype): Remove.
10416 (nrepeats): Likewise.
10417 (Nrepeats): Likewise.
10418 (start_squangling): Don't clear the variables removed above.
10419 (end_squangling): Likewise.
10420 (flush_repeats): Tidy. Use nrepeats parameter rather than
10422 (issue_nrepeats): Likewise, but with nrepeats global. Use
10423 is_backreferenceable_type.
10424 (build_overload_nested_name): Tidy. Add comment. Use
10425 build_mangled_name_for_type.
10426 (build_underscore_int): Comment.
10427 (build_overload_scope_ref): Use build_mangled_name_for_type.
10428 (build_overload_int): Likewise.
10429 (build_template_template_parm_names): Tidy.
10430 (build_template_parm_names): Use build_mangled_name_for_type.
10431 (build_overload_identifier): Add comments.
10432 (build_mangled_name_for_type_with_Gcode): Split out from
10433 build_mangled_name.
10434 (build_mangled_name_for_type): Use it.
10435 (build_mangled_name): Rework to use build_mangled_name_for_type
10436 and to not use global nrepeats/Nrepeats. Tidy.
10437 (process_modifiers): Tidy.
10438 (check_btype): Use is_backreferenceable_type. Add comment.
10439 Rename `node' to `type'.
10440 (process_overload_item): Set numeric_output_need_bar here.
10441 Use build_mangled_name_for_type. Tidy.
10442 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
10443 build_mangled_name_for_type.
10445 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
10448 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
10450 * cp-tree.h (warn_long_long): Define.
10451 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
10452 warning "ANSI C++ does not support `long long'".
10453 * decl2.c (warn_long_long): Define.
10454 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
10456 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
10458 * decl.c (xref_tag): Handle attributes between 'class' and name.
10459 * parse.y (aggr): Likewise.
10460 * semantics.c (finish_class_definition): Likewise.
10461 * Makefile.in (EXPECTED): Adjust.
10463 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
10464 * decl2.c: Define them.
10465 (lang_decode_option): Handle them.
10466 * lang-options.h: Add -foptional-diags.
10467 * class.c (finish_struct): Don't complain about multiple meanings of
10468 name if -fno-optional-diags.
10469 * decl.c (pushdecl_class_level): Likewise.
10470 * lex.c (real_yylex): Check warn_multichar.
10472 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
10474 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
10476 * tree.c (make_binfo): Fix length.
10478 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
10480 * decl2.c (lang_decode_option): Remove warn_template_debugging.
10481 * lang-options.h: Likewise.
10483 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10485 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
10486 (process_start_catch_block): Likewise for variables
10487 `false_label_rtx', `call_rtx' and `return_value_rtx'.
10489 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
10491 * tree.c (build_srcloc): Make sure we allocate this node on the
10494 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
10496 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
10497 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
10498 (lang_specific_driver): Only add -lm automatically if need_math is
10501 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
10503 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
10505 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10507 * Makefile.in (EXPR_H): New dependency variable.
10508 (decl2.o): Depend on $(EXPR_H).
10509 (typeck.o): Likewise.
10510 (init.o): Likewise.
10511 (expr.o): Likewise.
10513 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
10515 * decl.c (start_enum): Put local enums on permanent_obstack.
10517 1998-06-25 Mark Mitchell <mark@markmitchell.com>
10519 * cp-tree.h (c_get_alias_set): Declare.
10520 * decl.c (init_decl_processing): Set lang_get_alias_set.
10522 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
10524 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
10525 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
10526 flag for all function decls which are in the exception table.
10527 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
10528 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
10529 code is emitted for any referenced rtti function.
10531 1998-06-25 Dave Brolley <brolley@cygnus.com>
10533 * lang-specs.h: Use new | syntax to eliminate
10534 string concatenation.
10536 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
10538 * cp-tree.h (CP_DECL_CONTEXT): New macro.
10539 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
10540 * method.c (build_overload_nested_name): Likewise.
10541 * sig.c (build_signature_pointer_or_reference_type): Don't set
10544 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10546 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
10547 * cp-tree.h (FROB_CONTEXT): New macro.
10548 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
10549 * decl.c (namespace_binding): Replace NULL_TREE with
10551 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
10552 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
10554 * decl.c (pushtag): Use FROB_CONTEXT.
10555 (pushdecl, make_typename_type, define_function, grokdeclarator):
10557 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
10558 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
10560 * decl2.c (decl_namespace): Return global_namespace if no context.
10561 * method.c (build_overload_nested_name): Expect null as context.
10562 * pt.c (mangle_class_name_for_template): Do nothing for null
10564 (lookup_template_class): Allow for null id_context.
10566 1998-06-25 Richard Henderson <rth@cygnus.com>
10568 * method.c (emit_thunk): Set current_function_is_thunk for the
10569 ASM_OUTPUT_MI_THUNK case as well.
10571 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
10573 * exception.cc (__cplus_type_matcher): Get a match_info pointer
10574 instead of an exception table entry as a parameter.
10576 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
10578 * parse.y (function_try_block): Don't call start_catch_handler.
10579 * except.c (call_eh_info): Remove coerced field from declaration.
10580 (build_eh_type_type_ref): New function to create an address of a
10581 rtti function for the new style exception tables.
10582 (expand_start_catch_block): Split function, this contains the
10584 (process_start_catch_block_old): New function to perform the rest
10585 of expand_start_catch_block under old style exceptions.
10586 (process_start_catch_block_old): New function to perform the rest
10587 of expand_start_catch_block under new style exceptions.
10588 (expand_end_catch_block): Only pop the false label off the stack under
10589 the old style of exceptions.
10590 * semantics.c (finish_try_block): Don't call start_catch_handler.
10591 * exception.cc (struct cp_eh_info): Add original_value field.
10592 (__cplus_type_matcher): Perform type matching on the original exception
10593 value, and if we have a match, set the current value.
10594 (__cp_push_exception): Set the original exception value.
10596 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
10598 * call.c (joust): Fix confusing conversion warning.
10600 * call.c (build_op_delete_call): Add placement parm. Check
10601 LOOKUP_SPECULATIVELY.
10602 * cp-tree.h, decl2.c, init.c: Adjust.
10603 * decl.c (finish_function): Use it.
10605 * pt.c (tsubst): Diagnose creating void fields or variables.
10607 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10609 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
10611 * cp-tree.h (check_dtor_name): Add prototype.
10613 * init.c (expand_member_init): Remove unused variables
10614 `ptr_type_node', `parm' and `rval'.
10616 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
10617 in call to fprintf.
10618 (lang_print_xnode): Likewise.
10620 * typeck2.c (enum_name_string): Cast argument to sprintf to long
10621 and use %ld specifier.
10623 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
10624 specifier in call to fprintf.
10625 (GNU_xref_member): Cast argument to sprintf to int.
10627 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10629 * typeck2.c (pop_init_level): Warn about implicit zero initialization
10632 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10634 * cp-tree.h: Prototype function `check_java_method'.
10636 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
10638 * class.c (finish_struct): Make conflicting use of id a pedwarn.
10639 * decl.c (pushdecl_class_level): Likewise.
10641 1998-06-17 Mark Mitchell <mark@markmitchell.com>
10643 * pt.c (convert_nontype_argument): Issue an error when presented
10644 with an integer (real) constant that cannot be simplified to an
10645 INT_CST (REAL_CST).
10647 * cp-tree.h (c_get_alias_set): Remove declaration added in
10648 1998-06-13 change that should never have been checked in.
10650 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
10652 * typeck.c (build_binary_op_nodefault): Change % in format strings
10655 * decl.c (grokvardecl): Don't build_static_name for decls that
10656 aren't at namespace scope.
10658 * init.c (perform_member_init): Catch default-initialization of
10661 1998-06-17 Mark Mitchell <mark@markmitchell.com>
10663 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
10665 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
10667 * method.c (hack_identifier): Complain about getting a namespace
10669 * typeck.c (decay_conversion): Remove check for namespaces.
10670 * typeck2.c (incomplete_type_error): Likewise.
10671 * parse.y (template_arg): Add PTYPENAME expansion.
10673 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
10675 * decl.c (grokvardecl): Don't build external assembler names for
10676 TYPENAMEs in other namespaces as there is no declarator.
10677 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
10678 info from DECL_CONTEXT if it is NULL.
10680 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
10682 * call.c (check_dtor_name): Split out.
10683 (build_scoped_method_call): Use it.
10684 (build_method_call): Use it.
10685 * init.c (build_offset_ref): Use it.
10687 * typeck.c (build_static_cast): Fix handling of pointers to members.
10689 * decl.c (finish_function): Just return nothing from a constructor.
10690 * typeck.c (c_expand_return): Complain about returning a void
10691 expression from a destructor.
10693 1998-06-13 Mark Mitchell <mark@markmitchell.com>
10695 * class.c (alter_access): Accept a BINFO explaining how to get
10696 from the entity whose accessed is being altered to the type doing
10698 (handle_using_decl): New function containing code split out from ...
10699 (finish_struct_1): Here.
10701 * cp-tree.h (complete_type_or_else): Declare.
10702 * init.c (build_new_1, build_delete): Use it.
10703 * typeck.c (require_complete_type): Use complete_type, rather than
10704 expanding it inline.
10705 (complete_type_or_else): New function.
10706 (build_component_ref): Use it.
10707 (pointer_int_sum): Make sure the type pointed to is complete.
10708 (pointer_diff): Likewise.
10710 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
10713 * search.c (get_matching_virtual): Note that member templates
10714 cannot override virtual functions.
10716 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
10718 * pt.c (check_explicit_specialization): If DECLARATOR turned into
10719 an error_mark_node from lookup_template_function, return the same.
10720 (determine_specialization): Also make sure TEMPLATE_ID isn't an
10721 error_mark_node, before we try to read its operands.
10722 * decl.c (grokdeclarator): If we got an error_mark_node from
10723 check_explicit_specialization, just return it right back.
10725 1998-06-12 Mark Mitchell <mark@markmitchell.com>
10727 * class.c (instantiate_type): Don't treat template-ids that don't
10728 specify any template arguments as equivalent to ordinary
10729 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
10730 pointer-to-members for member templates. Tidy slightly.
10731 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
10732 * init.c (build_offset_ref): Handle template-ids like ordinary
10733 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
10734 offset part of the OFFSET_REF.
10735 * typeck.c (build_unary_op): Change check for unknown types to
10736 look for OFFSET_REFs, not SCOPE_REFs.
10738 1998-06-11 Mark Mitchell <mark@markmitchell.com>
10740 * pt.c (is_member_template_class): New function.
10741 (push_template_decl_real): Use it.
10743 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
10745 * friend.c (do_friend): Add support for nested classes using
10746 member functions of the enclosing class as friends.
10748 1998-06-10 Mark Mitchell <mark@markmitchell.com>
10750 * call.c (convert_default_arg): Make global, not static.
10751 (convert_arg_for_ellipsis): Split out from ...
10752 (build_over_call): Here.
10753 * cp-tree.h (convert_default_arg); Declare.
10754 (convert_arg_to_ellipsis): Likewise.
10755 (do_member_init): Remove.
10756 * init.c (do_member_init): Remove; this code is dead.
10757 (expand_member_init): Remove much of this code; it is dead.
10758 * typeck.c (convert_arguments): Use convert_default_arg and
10759 convert_arg_for_ellipsis, rather than duplicating here.
10761 * call.c (convert_like): Don't fail silently if
10762 build_user_type_conversion fails. Always return error_mark_node
10765 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
10767 * search.c (covariant_return_p): Complain about ambiguous base.
10769 * typeck.c (build_component_ref): Diagnose ref to nested type.
10771 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
10773 * decl.c (grokparms): Check that INIT isn't an error_mark_node
10774 before giving error about invalid type for default arg.
10776 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
10778 * call.c (build_method_call): Fix thinko.
10780 1998-06-10 Dave Brolley <brolley@cygnus.com>
10782 * decl2.c (lang_decode_option): New argc/argv interface.
10783 * cp-tree.h (lang_decode_option): New argc/argv interface.
10784 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
10785 specified for cpplib-enabled compilers.
10786 * lex.c (lang_init): Don't check_newline for cpplib.
10787 (init_parse): Don't initialize cpplib here.
10789 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
10791 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
10792 piece before checking DECL_MUTABLE_P.
10794 1998-06-10 John Carr <jfc@mit.edu>
10796 * tree.c (debug_binfo): Make printf format match arguments.
10798 * error.c (OB_PUTI): Make printf format match arguments.
10800 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
10802 * init.c (perform_member_init): Handle default-initialization.
10804 * except.c (build_throw): Handle throwing NULL.
10806 * typeck.c (build_x_function_call): Use resolve_offset_ref.
10808 * search.c (compute_access): Only strip an anonymous union
10811 * call.c (add_builtin_candidates): Tweak.
10813 * cvt.c (build_expr_type_conversion): Restore code for conversion
10815 * decl2.c (delete_sanity): Use it. Clean up.
10817 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
10819 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
10821 * typeck.c (c_expand_return): Don't warn about void expressions on
10822 return statements in functions returning void.
10824 1998-06-09 Mark Mitchell <mark@markmitchell.com>
10826 * pt.c (fn_type_unification): Revise documentation. Tidy.
10827 (type_unification): Likewise.
10829 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
10831 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
10833 * parse.y (function_try_block): Rename expand_start_catch, and delete
10835 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
10838 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
10840 * search.c (lookup_member): New fn.
10841 * class.c (finish_struct_1): Use it.
10842 * decl.c (lookup_name_real): Use it.
10844 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10846 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
10848 * cp-tree.h: Add prototype for `maybe_print_template_context' and
10849 `maybe_make_one_only'.
10851 * decl.c (auto_function): Remove unused variable `decl'.
10853 * decl2.c: Include dwarf2out.h and dwarfout.h.
10855 * lex.c: Remove redundant declarations of `set_float_handler' and
10858 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
10860 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
10861 time flag. Call __cp_eh_info instead of __cp_exception_info.
10862 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
10863 (__cp_exception_info): Return offset into cp_eh_info structure to
10864 match what use to be the start of this structure.
10865 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
10866 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
10868 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
10869 __cp_eh_info instead of __cp_exception_info.
10871 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
10873 * decl.c (cp_finish_decl): Disable inlining of extern inlines
10874 with static variables.
10876 1998-06-08 Mark Mitchell <mark@markmitchell.com>
10878 * init.c (build_offset_ref): Correct previous change to use build,
10881 1998-06-07 Mark Mitchell <mark@markmitchell.com>
10883 * class.c (instantiate_type): Handle pointer-to-members where the
10884 member is a template.
10885 * init.c (build_offset_ref): Likewise.
10886 * typeck.c (build_unary_op): Likewise.
10888 1998-06-07 Richard Henderson <rth@cygnus.com>
10890 * lex.c (lang_init_options): New function.
10891 (lang_init): Remove flag_exceptions == 2 hack.
10893 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
10895 * search.c (envelope_add_decl): Tweak for implicit typename.
10897 * call.c (joust): Also warn about confusing conversion op/constructor
10898 overload resolution.
10900 * spew.c (yylex): Also return the TYPE_DECL if got_object.
10901 Don't clear got_object after '~'.
10902 * call.c (build_scoped_method_call): Tweak destructor handling.
10903 (build_method_call): Likewise.
10904 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
10905 TYPE_MAIN_VARIANT for destructors.
10906 * semantics.c (finish_object_call_expr): Complain about calling a
10909 1998-06-05 Per Bothner <bothner@cygnus.com>
10911 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
10912 Define - update needed by gcc.c change.
10914 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
10916 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
10918 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
10920 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
10921 * decl.c (lookup_name_real): Add namespaces_only parameter.
10922 If set, return only NAMESPACE_DECLs.
10923 (select_decl): Likewise.
10924 (identifier_type_value): Give additional parameter.
10925 (lookup_name_nonclass): Likewise.
10926 (lookup_name): Likewise.
10927 (find_binding): Skip namespace aliases.
10928 (binding_for_name): Likewise.
10929 (push_namespace): Check for namespace aliases.
10930 (lookup_name_namespace_only): New function.
10931 (begin_only_namespace_names, end_only_namespace_names): New functions.
10932 * decl2.c (set_decl_namespace): Skip namespace aliases.
10933 (do_using_directive): Likewise.
10934 (do_namespace_alias): Produce namespace aliases, fix alias
10936 * error.c (dump_decl): Support SCOPE_REF.
10937 * parse.y (extdef): Wrap lookup with namespace_only for namespace
10938 aliases and using declarations.
10940 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
10942 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
10944 * error.c (dump_expr): Clean up NEW_EXPR case.
10946 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
10948 Suggested by Brendan Kehoe
10949 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
10950 treat it as using ::decl.
10952 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
10954 * tree.c (mapcar): Support NEW_EXPR.
10956 * error.c (dump_expr): Support NEW_EXPR.
10958 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
10960 * method.c (make_thunk): Use overload machinery to make name.
10961 * search.c (covariant_return_p): New fn.
10962 (get_matching_virtual): Use it.
10964 * init.c (build_new_1): Fix check for void.
10966 1998-06-01 Per Bothner <bothner@cygnus.com>
10968 * cp-tree.h (TYPE_FOR_JAVA): New macro.
10969 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
10970 java_int_type_node, java_long_type_node, java_float_type_node,
10971 java_double_type_node, java_char_type_node, java_boolean_type_node):
10972 New "primitive" types, with predefined names __java_byte etc.
10973 (record_builtin_java_type): New function.
10974 (init_decl_processing): Make Java types with record_builtin_java_type.
10975 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
10976 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
10977 (grokfndecl): Call check_java_method for Java classes.
10978 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
10979 (process_overload_item): Match types against specific
10980 java_XX_type_node types, rather than using is_java_type.
10981 * class.c (finish_struct_1): Don't add default copy constructor
10982 or operator= if TYPE_FOR_JAVA.
10983 (pop_lang_conext): Restore strict_prototyp proper if Java.
10984 * decl2.c (acceptable_java_type, check_java_method): New functions.
10985 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
10986 (tsubst): Move common statement after if statement.
10987 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
10989 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
10991 * pt.c (for_each_template_parm): Use first_rtl_op.
10993 * tree.c (build_cplus_array_type_1): Also check index_type for
10996 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
10998 * pt.c (tsubst): Always copy BINFO_BASETYPES.
11000 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
11002 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
11003 TYPE_SIZE_UNIT too.
11005 1998-05-29 Mark Mitchell <mark@markmitchell.com>
11007 * decl.c (grokdeclarator): Don't complain about in-class
11008 initialization of static consts if we don't really know the type
11011 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
11013 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
11014 * method.c (build_destructor_name): New fn.
11015 * decl2.c (maybe_retrofit_in_chrg): Split out...
11016 (grokclassfn): From here. Reorganize.
11017 * decl.c (grok_ctor_properties): Make sure ctors for types with
11018 vbases have the in_chrg parm.
11019 * pt.c (instantiate_class_template): Update
11020 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
11022 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
11024 1998-05-28 Mark Mitchell <mark@markmitchell.com>
11026 * pt.c (instantiate_decl): Make test for whether or not static
11027 variables should be instantiated early match its comment.
11029 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
11031 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
11033 (start_function): Call check_default_args.
11034 * decl2.c (grokfield): Don't call check_default_args.
11035 (check_default_args): Use cp_error_at.
11036 * lex.c (do_pending_defargs): Call check_default_args.
11038 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
11040 * call.c (build_method_call): Make sure get_type_value returns
11041 something before we try to use its TYPE_MAIN_VARIANT.
11042 (build_scoped_method_call): Likewise.
11044 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
11046 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
11047 initialize an array.
11049 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
11052 * friend.c (do_friend): Clarify template warning.
11054 1998-05-27 Mark Mitchell <mark@markmitchell.com>
11056 * decl.c (shadow_label): Don't treat decls as identifiers.
11057 (maybe_push_to_top_level): Clear shadowed_labels.
11059 * pt.c (instantiate_decl): Reset lineno and filename after calling
11060 regenerate_decl_from_template.
11062 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
11065 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
11067 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
11069 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11071 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
11072 (convert_nontype_argument): Handle cases when nontype template
11073 parameters become classes after substitution.
11075 1998-05-26 Mark Mitchell <mark@markmitchell.com>
11077 * friend.c (is_friend): Use comptypes, rather than == to compare
11078 types. Modify for new representation of template friends.
11079 (make_friend_class): Likewise.
11080 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
11081 (instantiate_class_template): Deal with template friends.
11083 * decl.c (store_parm_decls): Remove redundant call to
11084 expand_main_function.
11086 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
11088 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
11091 1998-05-26 Per Bothner <bothner@cygnus.com>
11093 * language_as_string: Handle lang_java.
11095 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
11097 * decl.c (pushdecl): Don't copy the type_decl.
11099 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11101 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
11102 current_class_type.
11103 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
11105 * parse.y (complex_direct_notype_declarator): Use $1 to access
11106 scope of notype_qualified_id.
11108 1998-05-26 Dave Brolley <brolley@cygnus.com>
11110 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
11111 (init_parse): Initialize cpplib interface.
11113 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
11114 empty continuation.
11116 1998-05-26 Mark Mitchell <mark@markmitchell.com>
11118 * decl.c (pushtag): Avoid crashing on erroneous input.
11120 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11122 * decl.c (push_namespace): Only produce one unique name for
11123 anonymous namespaces.
11124 (get_unique_name): Remove.
11126 1998-05-25 Mark Mitchell <mark@markmitchell.com>
11128 * call.c (tourney): Don't do any extra comparisons.
11130 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
11132 * cp-tree.h (processing_template_parmlist): Declare.
11133 * decl.c (pushtag): Don't call push_template_decl when we
11135 * pt.c (processing_template_parmlist): New variable.
11136 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
11137 (complete_template_args): Use it.
11138 (add_to_template_args): Likewise.
11139 (innermost_args): Likewise.
11140 (tsubst): Likewise.
11141 (begin_template_parm_list): Use processing_template_parmlist.
11142 (end_template_parm_list): Likewise.
11144 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
11145 * decl.c (grokdeclarator): Use it.
11146 * decl2.c (grok_x_components): Likewise.
11147 * init.c (initializing_context): Likewise.
11148 * method.c (do_build_copy_constructor): Likewise.
11149 (do_build_assign_ref): Likewise.
11150 * search.c (compute_access): Likewise.
11151 * typeck.c (build_component_ref): Likewise.
11153 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
11154 unnamed type a typedef name "for linkage purposes".
11156 * pt.c (lookup_template_class): Don't look at
11157 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
11159 * method.c (build_overload_int): Handle error cases gracefully.
11161 * pt.c (instantiate_decl): Handle static member variables
11164 * pt.c (tsubst): Use the tsubst'd type when producing new
11165 TEMPLATE_PARM_INDEX nodes.
11167 1998-05-24 Mark Mitchell <mark@markmitchell.com>
11169 * tree.c (cp_tree_equal): Handle pointers to member functions.
11171 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
11172 sure the type of the REF_BIND is a reference type.
11173 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
11174 target_type for clarity.
11176 * parse.y (xcond): Move call to condition_conversion ...
11177 * semantics.c (finish_for_cond): Here.
11178 * parse.c: Regenerated.
11180 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
11182 * decl.c (push_namespace): Namespaces have type void.
11183 * typeck2.c (incomplete_type_error): Complain about namespace
11184 used as expression.
11185 * typeck.c (decay_conversion): Likewise.
11187 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
11189 * error.c (dump_expr): Support namespaces.
11191 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
11193 * cp-tree.def: Add SRCLOC.
11194 * cp-tree.h: Add struct tree_srcloc and accessor macros.
11195 * tree.c (build_srcloc, build_srcloc_here): New fns.
11196 * pt.c (add_pending_template): Use build_srcloc_here.
11197 (push_tinst_level): Update last_template_error_tick before erroring.
11198 (instantiate_decl): Restore lineno and input_filename before
11199 calling add_pending_template.
11200 * decl2.c (finish_file): Set up lineno and input_filename for
11203 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
11205 * decl.c (lang_print_error_function): New fn.
11206 (init_decl_processing): Set print_error_function to use it.
11207 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
11209 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
11212 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
11213 copy-initialization.
11215 * class.c (build_vtable_entry): Use int_fits_type_p.
11216 (build_vtable): Pass a signed offset to build_vtable_entry.
11217 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
11218 set_rtti_entry): Likewise.
11220 1998-05-22 Per Bothner <bothner@cygnus.com>
11222 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
11223 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
11225 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
11227 * pt.c (print_template_context): Use fprintf instead of cp_error.
11229 * pt.c (determine_specialization): Just return an error_mark_node.
11230 Also print the decl we want in error messages. If we complain,
11231 return error_mark_node.
11232 (tsubst_friend_function): Set lineno and input_filename so
11233 error messages will be useful.
11234 (instantiate_template): Just return an error_mark_node.
11235 (check_explicit_specialization): Don't mess with a returned
11238 * pt.c (print_template_context): Add new argument.
11239 (maybe_print_template_context): New fn.
11240 (push_tinst_level): Increment tinst_level_tick.
11241 (pop_tinst_level): Likewise.
11242 * errfn.c (cp_thing): Call maybe_print_template_context. Use
11243 xrealloc instead of xmalloc.
11245 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
11247 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
11249 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
11250 if the template we looked up is the same as the one we already
11253 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
11255 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
11256 (cpp_reader,parse_in): Add for cpplib.
11257 (check_newline): Call handle_sysv_pragma with new interface.
11258 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
11260 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
11261 (sub_getch): Call GETC for cpplib.
11263 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
11264 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
11266 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
11268 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
11270 * decl2.c (maybe_make_one_only): New fn.
11271 (import_export_vtable): Use it.
11272 (import_export_decl): Likewise.
11273 * pt.c (mark_decl_instantiated): Likewise.
11275 1998-05-21 Mark Mitchell <mmitchell@usa.net>
11277 * decl2.c (find_representative_member): Rename to ...
11278 (build_anon_union_vars): New function.
11279 (finish_anon_union): Fix stupidity of previous change.
11281 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
11283 * decl.c (grokfndecl): Handle definition of specialization in
11284 friend declaration.
11286 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
11288 1998-05-20 Mark Mitchell <mmitchell@usa.net>
11290 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
11291 to look for type declarations.
11292 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
11293 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
11294 (finish_member_class_template): Declare.
11295 * decl.c (pushtag): Put member class templates on the
11296 CLASSTYPE_TAGS list, just as for ordinary member classes.
11297 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
11298 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
11299 IDENTIFIER_NAMESPACE_VALUEs.
11300 * parse.y (component_decl): Move code to ...
11301 * semantics.c (finish_member_class_template): New function.
11302 Don't put member class templates on the list of components for a
11304 * parse.c: Regenerated.
11305 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
11306 In fact, don't use DECL_CONTEXT at all here.
11308 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
11310 * decl.c (record_unknown_type): New function.
11311 (init_decl_processing): Call it for the unknown and global type
11314 1998-05-20 Mark Mitchell <mmitchell@usa.net>
11316 * decl2.c (find_representative_member): New function.
11317 (finish_anon_union): Use it.
11319 * cp-tree.h (MAIN_NAME_P): New macro.
11320 (DECL_MAIN_P): Likwise.
11321 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
11322 (grokfndecl): Use the new macros.
11323 (grokdeclarator): Likewise.
11324 (start_function): Likewise.
11325 (store_parm_decls): Likewise.
11326 (finsh_function): Likewise.
11327 * friend.c (do_friend): Likewise.
11328 * typeck.c (build_function_call_real): Likewise.
11329 (build_unary_op): Likewise.
11331 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
11333 * decl2.c (start_objects, finish_objects, do_dtors,
11334 do_ctors): Split out from...
11335 (finish_file): ...here.
11337 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
11339 * tree.c (is_overloaded_fn): Don't abort on placeholders from
11342 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
11344 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
11346 * error.c (dump_expr): Handle an ARROW_EXPR.
11348 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
11350 * decl.c (saveable_obstack): Declare.
11351 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
11352 declare, if necessary.
11354 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
11356 * call.c (compare_qual): Remove.
11357 (is_subseq): Tweak.
11358 (is_properly_derived_from): New function.
11359 (maybe_handle_ref_bind): Likewise.
11360 (maybe_handle_implicit_object): Likewise.
11361 (compare_ics): Modify substantially to bring into conformance with
11363 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
11364 (comp_cv_qualification): Declare.
11365 (comp_cv_qual_signature): Likewise.
11366 * typeck.c (comp_cv_qualification): Likewise.
11367 (comp_cv_qual_signature): Likewise.
11369 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11371 * Makefile.in (parse.o): Depend on toplev.h.
11373 * class.c (typecode_p): Remove prototype and definition.
11375 * cp-tree.h (currently_open_class, is_empty_class, member_p):
11378 * decl.c (push_overloaded_decl_top_level): Remove prototype and
11381 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
11382 in call to `cp_thing'.
11383 (cp_warning): Likewise for function pointer `warning'.
11385 * except.c (do_function_call): Remove prototype and definition.
11386 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
11388 * method.c (is_java_type): Add prototype and make it static.
11390 * parse.y: Include toplev.h.
11392 * pt.c (type_unification): Remove unused variable `arg'.
11393 (instantiate_decl): Likewise for `save_ti'.
11395 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
11397 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
11399 * init.c (build_member_call): Handle template_ids.
11400 * parse.y (primary): Add global_scope template_id.
11402 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
11404 * decl2.c (get_sentry): Use end_temporary_allocation.
11405 Don't declare permanent_obstack.
11407 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
11409 * parse.y (.finish_new_placement): New non-terminal.
11410 (unary_expr, new_type_id): Use it.
11411 * parse.c: Regenerated.
11413 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
11415 * pt.c (redeclare_class_template): Say where the original definition
11416 of the template-parameter's default argument appeared.
11418 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
11420 * call.c (build_over_call): Tweak empty class handling.
11422 * decl.c (make_typename_type): Use currently_open_class.
11424 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
11426 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
11428 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
11429 for a type unless it is one.
11431 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
11433 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
11435 * Makefile.in (program_transform_name, objdir): Define.
11437 * Makefile.in (BISON): Use bison from the build tree if it exists.
11440 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
11442 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
11444 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
11446 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
11448 * call.c (build_scoped_method_call): Likewise.
11450 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
11452 * init.c (build_new_1): Call suspend_momentary around the creation
11453 of values that must be saved for exception handling.
11454 * parse.y (.build_new_placement): New non-terminal.
11455 (unary_expr, new_placement): Use it.
11456 * parse.c: Regenerated.
11458 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
11460 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
11463 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
11466 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
11468 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
11470 * decl.c (start_decl): Revert problem change.
11472 * Makefile.in (CONFLICTS): Fix.
11474 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11476 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
11478 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
11480 * class.c (finish_struct_1): Use BINFO_SIZE.
11482 * decl.c (start_decl): Use 'tem'.
11484 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
11486 * exception.cc: Include eh-common.h.
11487 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
11488 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
11489 (__cp_push_exception): Initialize eh_info struct as well.
11490 * except.c: Remove local structs and include eh-common.h.
11491 (init_exception_processing): Set language and version codes.
11492 (call_eh_info): Add presence of eh_info to runtime description of
11494 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
11495 * semantics.c (finish_try_block): Call start_catch_block() and
11497 * parse.y (function_try_block): Call start_catch_block() and
11500 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
11502 * typeck.c (original_type): New function.
11503 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
11504 to see if they're actually the same.
11505 * cp-tree.h (original_type): Declare.
11507 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11509 * Makefile.in (lex.o): Depend on output.h.
11511 * call.c (add_function_candidate): Remove unused variable `cand'.
11512 (add_conv_candidate): Likewise.
11513 (build_builtin_candidate): Likewise.
11515 * cp-tree.h: Add prototype for `types_overlap_p'.
11517 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
11519 * decl2.c (merge_functions): Remove unused variables `tmp' and
11522 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
11523 (code_as_string): Likewise.
11524 (language_as_string): Likewise.
11525 (parm_as_string): Likewise.
11526 (op_as_string): Likewise.
11527 (assop_as_string): Likewise.
11528 (cv_as_string): Likewise.
11530 * lex.c: Include output.h.
11532 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
11534 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
11537 * tinfo.cc (__class_type_info::dcast): Change the type of variable
11538 `i' from int to size_t.
11540 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
11543 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
11545 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
11546 DECL_NAMESPACE_SCOPE_P.
11547 (lang_decl_name): Likewise.
11548 * pt.c (tsubst_friend_function, tsubst): Likewise.
11549 * decl.c (pushdecl, redeclaration_error_message, start_decl,
11550 cp_finish_decl, start_function): Likewise.
11551 * class.c (finish_struct_1): Likewise.
11552 * call.c (build_over_call): Likewise.
11553 (compare_ics): Use DERIVED_FROM_P.
11555 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
11557 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
11558 * method.c (build_mangled_name): Use it.
11559 (build_decl_overload_real): Likewise.
11561 * error.c (dump_simple_decl): New function, broken out from ...
11562 (dump_decl): Use it.
11564 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
11566 * ptree.c (lang_print_xnode): Add missing `break'.
11568 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
11570 * call.c (add_template_candidate): Adjust for changes to
11571 fn_type_unification.
11572 (add_template_candidate_real): Likewise.
11573 (add_template_conv_candidate): Likewise.
11574 (build_user_type_conversion_1): Likewise.
11575 (build_new_function_call): Likewise.
11576 (build_object_call): Likewise.
11577 (build_new_op): Likewise.
11578 (build_new_method_call): Likewise.
11579 * class.c (instantiate_type): Likewise.
11580 * cp-tree.h (unification_kind_t): New type.
11581 (fn_type_unification): Adjust prototype.
11582 (type_unificaiton): Likewise.
11583 * pt.c (UNIFY_ALLOW_NONE): New macro.
11584 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
11585 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
11586 (UNIFY_ALLOW_DERIVED): Likewise.
11587 (unify): Change prototype.
11588 (maybe_adjust_types_for_deduction): New function.
11589 (check_cv_quals_for_unify): Likewise.
11590 (determine_specialization): Adjust.
11591 (fn_type_unification): Likewise.
11592 (type_unification): Likewise.
11593 (type_unification_real): Likewise. Use
11594 maybe_adjust_types_for_deduction. Fix mishandling of
11595 back-unification of template functions passed as arguments. Pass
11596 appropriate combination of UNIFY_ALLOW_* to unify.
11597 (unify): Remove unused NTPARMS parameter. Use
11598 check_cv_quals_for_unify. Remove bogus code that allowed
11599 too-generous unification in order to adhere more closely to standard.
11600 (get_bindings_real): Adjust.
11601 (get_class_bindings): Likewise.
11603 * method.c (build_overload_identifier): Only use the innermost
11604 template arguments when mangling.
11605 * pt.c (tsubst_template_argument_vector): New function.
11606 (complete_template_args): Deal with the situation where the
11607 extra_args contain more than one level of arguments.
11608 (lookup_template_class): Deal with member template classes, which
11609 may have more than one level of arguments.
11610 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
11611 Improve handling of member template classes. Use
11612 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
11613 tsubst_template_argument_vector where appropriate.
11614 (regenerate_decl_from_template): Break out from ...
11615 (instantiate_decl): Here.
11617 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
11618 * parse.h: Regenerated.
11619 * parse.c: Really regenerated.
11621 * cp-tree.h (finish_unary_op_expr): New function.
11622 (finish_id_expr): Likewise.
11623 (begin_new_placement): Likewise.
11624 (finish_new_placement): Likewise.
11625 (finish_declarator): Likewise.
11626 (finish_translation_unit): Likewise.
11627 (finish_parmlist): Likewise.
11628 (begin_class_definition): Likewise.
11629 (finish_class_definition): Likewise.
11630 (finish_default_args): Likewise.
11631 (finish_inline_definitions): Likewise.
11632 * parse.y (GCC_ASM_KEYWORD): Remove.
11633 (TYPENAME_ELLIPSIS): Likewise.
11634 * parse.c: Regenerated.
11635 Use new functions in semantics.c in the actions for many rules.
11636 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
11637 * hash.h: Regenerated.
11638 * semantics.c (finish_expr_stmt): Allow NULL expr.
11639 (finish_unary_op_expr): New function, containing
11640 code previously in parse.y.
11641 (finish_id_expr): Likewise.
11642 (begin_new_placement): Likewise.
11643 (finish_new_placement): Likewise.
11644 (finish_declarator): Likewise.
11645 (finish_translation_unit): Likewise.
11646 (finish_parmlist): Likewise.
11647 (begin_class_definition): Likewise.
11648 (finish_class_definition): Likewise.
11649 (finish_default_args): Likewise.
11650 (finish_inline_definitions): Likewise.
11652 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
11654 * typeck.c (build_c_cast): Don't decay arrays and functions to
11655 pointer type when converting to a class type.
11657 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
11659 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
11660 (DECL_CLASS_SCOPE_P): Likewise.
11662 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
11664 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
11665 * decl2.c (constructor_name_full): Likewise.
11667 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
11669 * tree.c (mapcar): Add OVERLOAD support.
11671 * init.c (resolve_offset_ref): We must use basetype_path before we
11672 destroy it with a call to convert_pointer_to.
11674 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
11676 * class.c (currently_open_class): New fn.
11677 * decl.c (lookup_name_real): Use it.
11678 * search.c (lookup_field): Likewise.
11680 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
11682 * cp-tree.def (OVERLOAD): New node.
11683 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
11684 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
11685 (NAMESPACE_BINDING): Remove.
11686 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
11688 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
11690 (tree_overload): New struct.
11691 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
11692 (REAL_IDENTIFIER_TYPE_VALUE): Define.
11693 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
11694 (lang_decl_flags): Remove in_namespace.
11695 (lang_decl): Remove chain.
11696 (DECL_CHAIN, DECL_NAMESPACE): Remove.
11697 (flag_honor_std): Declare extern.
11698 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
11699 namespace_binding, set_namespace_binding,
11700 lookup_function_nonclass, cat_namespace_levels,
11701 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
11702 scratch_ovl_cons, ovl_member, build_overload): Declare.
11703 (decl_list_length, get_namespace_id, current_namespace_id,
11704 overloaded_globals_p): Remove.
11705 (lookup_using_namespace, qualified_lookup_using_namespace): Change
11707 (push_scratch_obstack): New macro.
11708 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
11709 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
11711 (build_new_function_call): Iterate using OVL_CHAIN.
11712 Print DECL_NAME in when reporting ambiguities.
11713 (build_object_call): Iterate using OVL_NEXT for fns, convs.
11714 (build_new_op): Call lookup_function_nonclass.
11715 Iterate using OVL_NEXT.
11716 (build_op_delete_call): Change detection of members.
11717 Do not wrap TREE_LIST around fields and single global functions.
11718 (build_over_call): Don't push a class level if the context is a
11720 (build_new_method_call): Iterate using OVL_NEXT.
11721 * class.c (add_method): Chain overloaded members using
11722 build_overload. Remove copying of method.
11723 (grow_method): When iterating through the obstack, expect OVERLOAD
11724 nodes. Chain overload members.
11725 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
11726 nodes in call to get_baselinks.
11727 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
11728 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
11729 fdecls that are OVERLOAD nodes.
11730 (validate_lhs): New function.
11731 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
11732 code. Use DECL_NAME in error messages. Split code between global
11733 and member function processing.
11734 * decl.c (global_type_node): New static variable.
11735 (in_std): New global.
11736 (struct binding_level): New field usings.
11737 (resume_binding_level): Assert that we are not in a class.
11738 (toplevel_bindings_p): Just check for namespace_p or
11740 (resume_level): Remove.
11741 (find_binding): New function.
11742 (binding_for_name): Call it.
11743 (namespace_binding, set_namespace_binding): New functions.
11744 (push_namespace): Associate binding level with new namespace,
11745 resume_binding_level for existing namespace. Remove old code.
11746 Fake std by counting.
11747 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
11748 (maybe_push_to_top_level): Save current namespace.
11749 (pop_from_top_level): Restore saved namespace.
11750 (pop_namespace): Call suspend_binding_level. Remove old code.
11751 (cat_namespace_levels): New function.
11752 (set_identifier_type_value_with_scope): For namespace bindings,
11753 set BINDING_TYPE, and use global_type_node.
11754 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
11755 (identifier_type_value): New function.
11756 (pushtag): If no context, use current_namespace.
11757 (duplicate_decls): Don't process DECL_CHAIN.
11758 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
11759 already set. Never reset it to NULL_TREE. Lookup global variables
11760 in their namespace. Push overloaded templates if they are on
11762 (pushdecl_namespace_level): New function.
11763 (pushdecl_top_level): Implement using pushdecl_namespace_level.
11764 (pushdecl_using_decl): New function.
11765 (overloaded_globals_p): Remove.
11766 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
11767 them. Use namespace_binding and set_namespace_value.
11768 (redeclaration_error_message): Complain if the declarations come
11769 from different namespaces.
11770 (lookup_tag): On namespace level, look in the BINDING_TYPE.
11771 (lookup_namespace_name): Pass tree_bindings from stack. Remove
11773 (select_decl): New function.
11774 (lookup_name_real): Call it for qualified and unqualified lookup.
11775 Pass tree_bindings from the stack.
11776 If prefer_type is 1, also accept namespaces.
11777 (lookup_function_nonclass): New function.
11778 (init_decl_processing): Set the binding level of the global
11779 namespace to global_binding_level.
11780 Build a proper type list for __builtin_apply.
11781 Initialize std_node to "fake std" if flag_honor_std is set.
11782 Initialize global_type_node.
11783 Allocated bad_alloc in namespace std if flag_honor_std.
11784 (define_function): Set the DECL_CONTEXT to the current_namespace.
11785 (start_decl): A namespace is not considered as a context here. If
11786 the DECL_CONTEXT is a namespace, push the decl.
11787 (cp_finish_decl): Check for namespaces used as initializers.
11788 (grokfndecl): Add namespace parameter. Remove processing of
11790 (grokvardecl): Add namespace parameter.
11791 (grokdeclarator): Process SCOPEs that are namespaces. For
11792 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
11793 (start_function): Check for contexts that are namespaces.
11794 Set context for declarations that have not been pushed.
11795 (store_parm_decls): Check for ::main only.
11796 (finish_function): Likewise.
11797 (start_method): Check for contexts that are namespaces.
11798 (start_method): Remove DECL_CHAIN processing.
11799 * decl2.c (flag_honor_std): Declare.
11800 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
11801 (decl_namespace_list): New static global.
11802 (grok_x_components): Ignore namespaces as type contexts.
11803 (check_classfn): Expect OVERLOAD nodes.
11804 (grokfield): Remove DECL_CHAIN processing.
11805 (finish_file): Call cat_namespace_levels.
11806 (merge_functions): New function.
11807 (ambiguous_decl): Rewrite.
11808 (lookup_using_namespace): Produce tree_bindings.
11809 (qualified_lookup_using_namespace): Likewise.
11810 (set_decl_namespace, decl_namespace, current_decl_namespace,
11811 push_decl_namespace, pop_decl_namespace): New functions.
11812 (arg_lookup): New struct.
11813 (add_function, arg_assoc_namespace, arg_assoc_class,
11814 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
11816 (get_namespace_id, current_namespace_id): Remove.
11817 (do_toplevel_using_decl): Rewrite.
11818 (do_class_using_decl): Complain about namespace qualifiers.
11819 (do_using_directive): Sorry if not on namespace level. Complain
11820 about unknown namespaces.
11821 * error.c (dump_aggr_type): Check for namespace contexts.
11822 * except.c (init_exception_processing): Push terminate into std.
11823 * friend.c (is_friend): A namespace is not a context, here.
11824 * init.c (expand_member_init): Remove DECL_CHAIN processing.
11825 (build_offset_ref): Process OVERLOAD nodes.
11826 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
11827 * lex.c (identifier_type): Loop using OVL_CHAIN.
11828 (see_typename): Set looking_for_typename to 2.
11829 (real_yylex): Likewise.
11830 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
11831 (do_scoped_id): Expect OVERLOAD nodes.
11832 Change calling convention for qualified_lookup_using_namespace.
11833 (build_lang_decl): Don't set in_namespace anymore.
11834 * method.c (typevec_size): New global.
11835 (build_overload_nested_name): Return if global_namespace.
11836 Otherwise, always expect a declaration context.
11837 (build_qualified_name): Likewise.
11838 Make sure we don't write beyond typevec_size.
11839 (build_decl_overload_real): Likewise.
11840 Allocate one extra slot for the namespace.
11841 (hack_identifier): Mark code dead.
11842 Process OVERLOAD and NAMESPACE_DECL nodes.
11843 * parse.y (program): Pop namespaces until in global namespace.
11844 (extdef): In a using-declaration, don't discard the identifier if
11845 there is no declaration.
11846 (left_curly): Ignore type contexts which are namespaces.
11847 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
11849 * pt.c (template_class_depth): Expect types to be namespaces.
11850 (determine_specialization): Simplify by expecting OVERLOAD nodes.
11851 (push_template_decl): Push into namespace level.
11852 Reset ctx if it is a namespace.
11853 Set DECL_CONTEXT to current_namespace if not set already.
11854 Ignore real contexts that are namespaces.
11855 (mangle_class_name_for_template): Skip global_namespace.
11856 Mangle other namespaces as declarations.
11857 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
11858 (lookup_template_class): Push into namespace of context.
11859 If the context is a namespace, set it to global_namespace.
11860 Use id_context for mangling.
11861 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
11862 (tsubst_friend_function): Ignore namespace contexts.
11863 Push into namespace level.
11864 (tsubst): Handle NAMESPACE_DECL nodes.
11865 Remove DECL_CHAIN processing.
11866 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
11867 * ptree.c (print_lang_identifier): Print bindings.
11868 (lang_print_xnode): Print OVERLOAD nodes.
11869 * rtti.c (init_rtti_processing): Push type_info into std.
11870 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
11871 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
11872 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
11873 lookup_fnfields_here): Likewise.
11874 Process all nodes, instead of going through TREE_CHAIN.
11875 * sig.c (build_signature_pointer_or_reference_type): Set context
11876 to global_namespace.
11877 (build_signature_table_constructor): Expect OVERLOAD nodes.
11878 * spew.c (yylex): Save old setting of looking_for_typename.
11879 * tree.c (decl_list_length): Remove.
11880 (binding_init): New function.
11881 (count_functions): Rewrite.
11882 (is_overloaded_fn): Expect OVERLOAD nodes.
11883 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
11884 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
11885 ovl_member): New functions.
11886 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
11887 (type_unknown_p): Likewise.
11888 (require_instantiated_type): Likewise.
11889 (build_component_ref): Declare code dead.
11890 (build_x_function_call): Create and expect OVERLOAD nodes.
11891 (build_function_call_real): Check for ::main only.
11892 (build_unary_op): Likewise. Expect OVERLOAD nodes.
11893 (convert_for_assignment): Check for TREE_LIST before accessing
11895 * decl.c (duplicate_decls): Check for namespace bindings instead
11896 of global bindings.
11897 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
11898 lookup_name_current_level, start_decl, xref_tag,
11899 finish_enum): Likewise.
11900 * init.c (build_offset_ref): Likewise.
11901 * search.c (lookup_field): Likewise.
11902 (lookup_fnfields): Likewise.
11903 (dfs_debug_mark): Likewise.
11904 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
11905 (poplevel_class, pop_from_top_level): Likewise.
11906 * decl2.c (finish_method): Likewise.
11907 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
11908 * decl.c (record_builtin_type): Likewise.
11909 (init_decl_processing, grokfndecl): Likewise.
11910 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
11911 (make_lang_type): Likewise.
11912 * parse.y (make_thunk): Likewise.
11913 * pt.c (tsubst): Likewise.
11914 * tree.c (debug_binfo): Likewise.
11915 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
11916 tinfo2.cc, inc/new.h: Add std qualifications.
11917 * inc/new: Wrap with namespace std if __HONOR_STD.
11918 * inc/typeinfo: Likewise.
11920 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
11922 * call.c (build_user_type_conversion_1): Handle second_conv
11923 properly for templates.
11925 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
11927 * method.c (build_decl_overload_real): Set TREE_USED flag to
11928 zero for build_type_variants nodes as well.
11930 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
11932 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
11934 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
11936 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
11937 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
11938 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
11939 xref.o): Add toplev.h dependencies.
11941 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
11943 * errfn.c (cp_error, cp_warning): Remove declarations for
11944 error and warning respectively.
11946 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11948 * error.c: Convert to using ctype macros defined in system.h.
11949 * method.c: Likewise.
11950 * xref.c: Likewise.
11951 * lex.c: Likewise. Also remove redundant system header stuff.
11953 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
11955 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
11956 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
11957 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
11958 xref.c: Add include of toplev.h.
11960 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
11962 * tree.c (perm_manip): Also regenerate the RTL of an extern.
11963 (copy_to_permanent): Use end_temporary_allocation.
11965 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
11967 * init.c (expand_vec_init): The initialization of each array
11968 element is a full-expression.
11970 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
11972 * method.c (build_mangled_name): Add a call to build_type_variant
11973 to get the right type.
11975 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
11977 * Makefile.in: Add .SUFFIXES.
11979 * cp-tree.def: Remove NAMESPACE_DECL.
11981 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
11983 * call.c (build_over_call): Do evaluate arg even if it has empty
11985 * decl.c (start_function): Don't push a member function.
11987 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
11989 * Makefile.in (g++FAQ.info): Put -o option before input file.
11991 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
11993 * gxxint.texi: Add info for squangling codes K and B.
11995 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
11997 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
11998 the expression in templates.
11999 (finish_stmt_expr): Likewise.
12001 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
12003 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
12005 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
12007 * decl.c (maybe_push_to_top_level): Always clear
12008 current_template_parms and processing_template_decl.
12009 (pushtag): Remove check of current_class_type and some comments,
12010 since maybe_push_to_top_level no longer creates confusion.
12012 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
12014 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
12015 (DECL_CLASS_TEMPLATE_P): Likewise.
12016 (DECL_PRIMARY_TEMPLATE): Likewise.
12017 (PRIMARY_TEMPLATE_P): Use it.
12018 (push_template_decl_real): New function.
12019 (redeclare_class_template): Take new template parameters as
12021 (is_specialization_of): New function.
12022 (comp_template_args): Declare.
12023 * decl.c (pushtag): Handle friend template classes.
12024 (xref_tag): Likewise. Use new calling convention for
12025 redeclare_class_template.
12026 * decl2.c (grok_x_components): Handle friend templates.
12027 * friend.c (is_friend): Use is_specialization_of where
12028 appropriate. Deal with friend class templates.
12029 (make_friend_class): Let a class template be friends with itself.
12030 * pt.c (comp_template_args): Remove declaration.
12031 (tsubst_friend_class): New function.
12032 (push_template_decl_real): New function.
12033 (push_template_decl): Use it.
12034 (redeclare_class_template): Adjust for new calling convention.
12035 (comp_template_args): Give it external linkage.
12036 (instantiate_class_type): Use tsubst_friend_class to deal
12037 with friend templates.
12038 * typeck.c (comptypes): Use comp_template_args, rather than
12039 expanding it inline.
12040 * parse.y (component_decl): Handle a nested template type
12041 like other component type declarations.
12043 * pt.c (check_explicit_specialization): Handle overloaded
12044 constructors correctly.
12046 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
12047 (lookup_template_class): Use it.
12049 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
12051 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
12052 * cp-tree.h: Add WRAPPER support.
12053 * call.c (add_candidate): Split out from add_*_candidate fns.
12054 (build_over_call): Take the candidate instead of function and args.
12055 Enforce access control here. Emit overload warnings here.
12056 (add_warning): New fn.
12057 (joust): Add WARN parm. If not set, call add_warning instead of
12058 printing a warning. Re-enable some warnings.
12059 (tourney): Pass it.
12060 (convert_like): Adjust.
12061 (build_new_op): Adjust.
12062 (build_new_function_call): Adjust.
12063 (build_user_type_conversion_1): Adjust.
12064 (USER_CONV_FN): Adjust.
12065 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
12066 build_int_wrapper): New fns.
12068 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
12070 * pt.c (unify): Fix typo in previous change.
12072 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
12074 * error.c (dump_type_real): Declare canonical_name.
12076 * typeck.c (comp_target_types): Fix PMFs.
12078 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
12080 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
12081 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
12084 * pt.c (tsubst): Decrease the template-level of
12085 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
12086 TEMPLATE_PARM_INDEX.
12087 (template_decl_level): New function.
12088 (unify): Make sure to record unifications for template
12089 parameters, even when the parameters exactly match the arguments.
12090 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
12091 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
12092 aren't from the level we're currently working on.
12094 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
12096 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
12098 * decl2.c (check_member_template): Set DECL_IGNORED for member
12099 class templates, too.
12101 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
12103 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12105 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
12107 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
12109 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
12110 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
12111 (init_decl_processing): Handle TI types.
12112 * typeck.c (unsigned_type, signed_type): Handle TI types.
12114 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
12116 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
12117 New local added_libraries. Increment count when add library to
12120 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
12122 * cp-tree.h (type_as_string_real): New function.
12123 * pt.c (mangle_class_name_for_template): Use it.
12124 * error.c (dump_aggr_type): Change prototype.
12125 (dump_type_prefix): Likewise.
12126 (dump_type_suffix): Likewise.
12127 (dump_type_real): Convert from dump_type. If desired, the
12128 "canonica" name of a typedef, i.e., the name of the underlying
12129 type, can be printed.
12130 (dump_type): Call dump_type_real.
12132 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
12134 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
12136 * typeck.c (comp_target_types): Tweak pedantic case.
12137 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
12138 Return -1 or 1 instead of 1 or 2.
12139 (compparms): Remove STRICT handling.
12140 (convert_for_assignment): Fix handling of pmfs.
12142 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
12144 * typeck.c (comp_target_types): Handle references like pointers.
12145 (comp_target_parms): Note that return code from comp_target_types
12146 can be negative to indicate failure.
12148 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12150 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
12151 which requires a working target compiler to build.
12153 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
12155 * tree.c (avoid_overlap): Add prototype.
12157 * spew.c (num_tokens): Add prototype.
12158 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
12160 * search.c (dfs_check_overlap): Add prototype.
12161 (dfs_no_overlap_yet): Likewise.
12163 * pt.c (original_template): Add prototype.
12164 (inline_needs_template_parms): Likewise.
12165 (push_inline_template_parms_recursive): Likewise.
12166 (retrieve_specialization, register_specialization): Likewise.
12167 (print_candidates, reduce_template_parm_level): Likewise.
12168 (build_template_decl, mark_template_parm): Likewise.
12169 (tsubst_friend_function, get_bindings_real): Likewise.
12171 * method.c (start_squangling): Add prototype.
12172 (end_squangling, check_ktype, issue_ktype): Likewise.
12173 (build_overloaded_scope_ref, check_btype): Likewise.
12174 (build_mangled_template_parm_index): Likewise.
12176 * lex.c (init_cpp_parse): Add prototype.
12177 (handle_cp_pragma, handle_sysv_pragma): Likewise.
12178 (reduce_cmp, token_cmp): Likewise.
12180 * except.c (call_eh_info): Add prototype.
12181 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
12182 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
12184 * decl2.c (is_namespace_ancestor): Add prototype.
12185 (namespace_ancestor, add_using_namespace): Likewise.
12186 (ambiguous_decl): Likewise.
12188 * decl.c (indent): Add prototype.
12190 * call.c (add_template_candidate_real): Add prototype.
12192 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
12194 * decl2.c (build_expr_from_tree): Just return a PMF.
12196 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
12198 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
12199 when doing initializations.
12201 * pt.c (unify): Use comptypes to compare type args.
12203 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
12205 * decl.c (duplicate_decls): Fix check for when it's safe to free
12208 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
12211 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
12213 * pt.c (build_template_parm_index): Add prototype.
12215 * search.c (my_tree_cons): Don't clear words outside the
12216 newly allocated node.
12218 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
12220 * lex.c (init_parse): Now returns char* containing the filename.
12222 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
12223 Jeff Law <law@cygnus.com>
12225 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
12228 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12230 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
12232 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
12234 * decl.c (duplicate_decls): Don't warn for redundant decls if
12235 friend: let add_friend take care of it.
12237 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
12239 * sig.c (build_signature_pointer_constructor): Don't set
12240 TREE_HAS_CONSTRUCTOR for a signature pointer.
12241 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
12242 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
12244 * typeck.c (build_unary_op): Only allow taking the address of a
12246 * typeck2.c (digest_init): Simplify.
12247 (store_init_value): Don't pedwarn about using { } for pmfs.
12249 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
12251 * cp-tree.h (start_decl): Update prototype.
12252 * decl.c (start_decl): Like the C version, new parameters
12253 for the attributes. Call cplus_decl_attributes here,
12254 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
12255 (grokdeclarator): Pass NULL for new start_decl arguments.
12256 * pt.c (tsubst_expr): Likewise.
12257 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
12258 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
12259 * lex.c (build_lang_decl): Add lang_name_java.
12260 * class.c (push_lang_context): Add lang_name_java.
12261 * method.c (build_mangled_name): Check for is_java_type.
12263 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
12265 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
12266 * call.c (build_scoped_method_call): Check for TREE_CODE for
12267 VOID_TYPE instead of type == void_type_node.
12268 (build_method_call): Likewise.
12269 * decl.c (lookup_name_real): Likewise.
12270 (grokdeclarator): Likewise.
12271 (start_decl): Likewise.
12272 (grokparms): Likewise.
12273 (start_function): Likewise.
12274 (finish_function): Likewise.
12275 (start_method): Likewise.
12277 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
12279 * lex.c (finput): New variable.
12280 (init_cpp_parse): Renamed from init_parse.
12281 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
12282 (finish_parse): New function.
12283 * cp-tree.h (init_lex, init_parse): Remove declarations.
12285 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
12287 * call.c (build_call): Still evaluate the actual argument.
12288 * class.c (is_empty_class): Update for -fnew-abi.
12290 * decl2.c: -fnew-abi implies -fsquangle.
12292 * method.c (do_build_assign_ref): Don't do anything to copy
12294 (do_build_copy_constructor): Likewise.
12295 * call.c (build_over_call): Likewise.
12297 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
12299 * tree.c (avoid_overlap): Return a value.
12301 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
12303 * method.c (check_btype): Add missing argument to xrealloc.
12304 (check_ktype): Likewise.
12306 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
12308 Implement empty base optimization.
12309 * class.c (finish_struct_1): Add vbase fields earlier. Set
12310 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
12311 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
12312 (types_overlap_p): New fn.
12313 * tree.c (avoid_overlap): New fn.
12314 (build_base_fields): Use it to avoid overlapping empty bases.
12315 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
12317 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
12319 Re-implement allocation of base class subobjects.
12320 * tree.c (unshare_base_binfos): New fn.
12321 (layout_basetypes): Use it. Now handles offsets of both virtual and
12322 non-virtual bases, after layout_type.
12323 (layout_vbasetypes): Remove.
12324 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
12325 (build_vbase_pointer_fields): Split out from old layout_basetypes.
12326 * class.c (finish_base_struct): Lose offset handling code.
12327 Move nonvdtor warning here. Don't mess with t_binfo anymore.
12328 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
12329 * cp-tree.h: Adjust.
12331 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
12333 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
12334 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
12335 * class.c (duplicate_tag_error): Likewise.
12336 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
12337 * tree.c (layout_vbasetypes): Update from layout_record, remove
12338 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
12339 (layout_basetypes): Likewise.
12341 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
12343 * class.c, Make sure system.h is included just after config.h.
12344 Delete lingering stdio and errno references too.
12345 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
12347 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
12349 * friend.c (is_friend): Fix access control for local classes.
12351 * class.c (is_empty_class): New fn.
12352 * call.c (build_call): Don't pass empty class objects to a function.
12354 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
12356 * call.c (build_over_call): Do name resolution for default
12357 arguments of function templates in the scope of the templates.
12359 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
12361 * call.c: Include system.h. Remove includes, declarations and
12362 defines provided by system.h.
12363 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
12364 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
12365 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
12366 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
12367 * typeck2.c, xref.c: Likewise.
12368 * Makefile.in: Dependencies updated as appropriate.
12369 * Make-lang.in: Likewise.
12371 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
12373 * pt.c (fn_type_unification): Allow incomplete unification without
12374 an immediate error message.
12376 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
12378 * tree.c (member_p): New fn.
12379 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
12380 initializing class members.
12382 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
12383 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
12385 * call.c (build_method_call): Handle non-scoped destructors, too.
12386 * pt.c (tsubst_copy): Likewise.
12388 * pt.c (print_template_context): Split out...
12389 (push_tinst_level): ...from here.
12391 * friend.c (is_friend): Don't pass a type to decl_function_context.
12393 * typeck.c (convert_for_initialization): Always hand off
12394 conversions to class type.
12396 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
12398 * friend.c (is_friend): Local classes have the same access as the
12399 enclosing function.
12401 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
12403 * typeck.c (expand_target_expr): Delete dead function.
12405 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
12407 * repo.c (save_string): Delete dead function.
12409 * method.c (thunk_printable_name): Delete dead function.
12411 * lex.c (yynextch): Delete dead function.
12413 * expr.c (tree_extract_aggr_init): #if 0 out.
12415 * except.c (do_unwind): Delete dead function.
12416 (easy_expand_asm): Likewise.
12418 * cvt.c (build_conversion_type_1): Delete dead function.
12420 * cp-tree.h (push_expression_obstack): Declare.
12422 * call.c (source_type): #if 0 out.
12424 * class.c (alter_access): Remove unused label. Add braces
12425 around empty else clause.
12427 * lex.c (yyprint): Fix argument to printf.
12429 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
12431 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
12433 * pt.c (instantiate_class_template): Make sure template
12434 arguments are permanent.
12435 * init.c (resolve_offset_ref): Don't go looking around in
12438 * semantics.c: Add routines to handle expressions, and some
12439 declaration processing.
12440 * parse.y: Use them.
12441 (current_class_depth): Move declaration to cp-tree.h.
12442 * parse.c: Regenerated.
12443 * cp-tree.h: Use them.
12444 (current_class_depth): Declare.
12445 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
12447 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
12449 * error.c (dump_decl): Be a bit more explicit with template
12450 type arguments, when verbose.
12452 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
12454 * inc/exception: Reorder closing braces.
12456 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
12458 * pt.c (redeclare_class_template): New function.
12459 * cp_tree.h (redeclare_class_template): Declare it.
12460 * decl.c (xref_tag): Use it.
12462 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
12464 * call.c (build_over_call): Check IS_AGGR_TYPE, not
12465 TYPE_LANG_SPECIFIC.
12466 * typeck.c (convert_arguments): Likewise.
12468 * decl.c (grokdeclarator): Remove const and volatile from type after
12469 setting constp and volatilep.
12471 * class.c (finish_struct_1): Don't warn about bool bitfield larger
12474 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
12476 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
12478 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
12480 * call.c (build_object_call): Complain about ambiguous operator(),
12481 rather that crashing.
12482 (build_new_op): Likewise.
12483 (build_op_delete_call): Likewise.
12485 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
12487 * cvt.c (perform_qualification_conversions): Use comp_target_types
12488 instead of comp_ptr_ttypes.
12490 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
12492 * cp-tree.h (enforce_access): Declare.
12493 * call.c (enforce_access): Make it extern, not static.
12494 * class.c (alter_access): Use enforce_access; modify code for ISO
12495 compliance, rather than ARM rules.
12497 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12499 * cp-tree.h: Fix typo.
12501 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
12503 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
12504 if (aggregate_value_p (type)).
12506 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
12508 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
12510 * tree.c (mapcar): When dealing with a DECL, use it's constant
12512 * pt.c (lookup_template_class): Don't mangle the names of template
12513 classes whose arguments are unknown.
12515 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
12517 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
12519 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
12521 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
12523 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
12524 boolean_type_node to 1.
12526 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
12528 * error.c (dump_expr): Remove unused variable `l'.
12530 * pt.c (for_each_template_parm): New function, created by
12531 converting uses_template_parms.
12532 (tree_fn_t): New typedef.
12533 (uses_template_parms): Use it.
12534 (mark_template_parm): New function.
12535 (push_template_decl): Check that the argument list of a partial
12536 specialization uses all the template parameters.
12538 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
12539 with it; we might want it for debugging.
12540 * cp-tree.h (type_unification): Change interface.
12541 * class.c (finish_struct_1): Skip nested template types, just like
12542 ordinary nested types.
12543 (instantiate_type): Use new interface to type_unification.
12544 * lex.c (init_lex): Add __sz as opname for sizeof.
12545 * method.c (build_overload_scope_ref): New function.
12546 (build_overload_int): Handle complex expressions. Set
12547 numeric_output_need_bar if necessary.
12548 (build_overload_value): Handle non-PARM_DECL nodes; this
12549 routine is now used by build_overload_int. Remove some
12550 assignments to numeric_output_need_bar. Use
12551 build_overload_scope_ref.
12552 (build_qualified_name): Note that some template mangled names end
12553 with digits, and set numeric_output_need_bar appropriately. Use
12554 build_underscore_int.
12555 * pt.c (unify): Change interface.
12556 (type_unification_real): Likewise.
12557 (determine_specialization): Use new interfaces.
12558 (tsubst): Deal gracefully with situations in which the argument
12559 vector is not fully filled.
12560 (fn_type_unification): Use new interfaces.
12561 (type_unification): Likewise. Remove NOP_EXPR hack.
12562 (type_unification_real): Likewise.
12563 (unify): Likewise. Deal with unification of complex expressions.
12565 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
12567 * pt.c (complete_template_args): Initialize skip properly.
12569 * decl.c (make_typename_type): Revert.
12570 (make_implicit_typename): Remove.
12571 (lookup_name_real): Don't call it. Call lookup_field if we see a
12572 TYPE_DECL from a template base.
12573 * search.c (lookup_field): Do implicit typename stuff.
12575 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
12576 Geoff Noer <noer@cygnus.com>
12578 * Makefile.in: Various fixes for building cygwin32 native toolchains.
12579 * Make-lang.in: Likewise.
12581 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12583 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
12585 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
12587 * decl.c (make_implicit_typename): Rewrite removed code.
12588 (make_typename_type): Call it if the type we look up comes from
12589 a base that uses template parms.
12591 * pt.c (complete_template_args): Rewrite.
12592 (tsubst, FUNCTION_DECL): Use it.
12594 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
12596 * semantics.c (finish_asm_stmt): Fix combine strings. Call
12597 c_expand_asm_operands () if output_operands, input_operands or
12598 clobbers is not NULL_TREE.
12600 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12602 * pt.c (complete_template_args): New function.
12603 (get_bindings): Deal with specializations of function templates
12604 with return type containing parameters from outer class
12606 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
12607 substitute arguments and compose a new type.
12609 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
12611 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
12614 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
12616 * decl.c (make_implicit_typename): Lose useless code.
12618 * call.c (standard_conversion): Handle A* -> const A* properly.
12620 * pt.c (get_bindings_real): Rename from get_bindings. Add
12621 check_rettype parm.
12622 (get_bindings): Pass 1.
12623 (get_bindings_overload): Pass 0.
12625 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
12627 * pt.c (check_explicit_specialization): When reverting a static
12628 member function, also remove the `this' parameter from
12629 last_function_parms.
12631 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
12633 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
12634 a function context.
12636 * decl.c (store_bindings): Use free_binding_vecs.
12637 (pop_from_top_level): Likewise.
12639 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
12641 * decl.c (make_implicit_typename): Only change the type of a
12644 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
12646 * semantics.c: New file, containing routines to perform the
12647 semantic phase of parsing.
12649 * pt.c (tsubst_expr): Likewise.
12650 * cp-tree.h: Declare the various functions in semantics.c.
12651 Provide macros to access _STMT tree nodes.
12652 * cp-tree.def: Add ASM_STMT tree node.
12653 * Makefile.in, Make-lang.in: Add dependencies on and for
12656 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
12658 * pt.c (push_template_decl): Only check primary templates.
12660 * pt.c (check_explicit_specialization): Complain about default args
12661 in explicit specialization.
12663 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
12664 constructor_declarator.
12666 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
12668 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
12669 has no overloaded operator ->.
12671 * call.c (build_field_call): Don't crash when presented with a
12672 field that is actually a nested type.
12674 * decl.c (pushtag): Deal with friend class injection in local
12677 * call.c (build_object_call): Don't crash if OBJ is a
12678 pointer-to-member-function.
12680 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
12682 * pt.c (push_template_decl): Complain about template with C linkage,
12683 anonymous template class.
12685 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
12687 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
12688 * search.c: Likewise.
12690 * lex.c (do_pending_defargs): Only call
12691 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
12693 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
12695 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
12697 * parse.y: Deal with CONSTRUCTORS in new_initializers.
12699 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
12701 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
12702 closely mimics the behavior in parse.y.
12703 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
12704 into a compound statement.
12706 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
12708 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
12709 * pt.c (inline_needs_template_parms): New fn.
12710 (original_template): New fn.
12711 (push_inline_template_parms_recursive): New fn.
12712 (maybe_begin_member_template_processing): Use them.
12713 (maybe_end_member_template_processing): Likewise.
12714 (is_member_or_friend_template): Rename to is_member_template.
12715 Member functions of local classes are never member templates.
12717 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12719 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
12720 added in the class scope to catch redefinition error.
12722 * pt.c (reduce_template_parm_level): Also copy
12723 the DECL_TEMPLATE_PARMS field.
12725 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
12727 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
12728 reduced-level template type parameter.
12730 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
12732 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
12733 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
12734 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
12735 * decl.c (duplicate_decls): Propagate it.
12736 * typeck2.c (abstract_virtuals_error): Use two loops to emit
12737 abstract virtual functions and virtual functions which need a
12738 final overrider separately.
12740 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
12742 * lang-specs.h: Properly put brackets around array elements in
12745 * typeck.c (build_binary_op_nodefault): Correctly place parens around
12746 && and || in expression.
12748 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
12750 * call.c (default_parm_conversions): Remove prototype definition.
12751 (build_method_call): Remove unused variable result.
12753 * cvt.c (ocp_convert): Remove unused variable conversion.
12755 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
12757 * except.c (do_unwind): #if 0 definition of unused variables fcall
12760 * expr.c (extract_scalar_init): #if 0 prototype and function
12763 * init.c (expand_aggr_init_1): Remove unused variable init_type.
12764 (build_new_1): Remove unused variable t.
12766 * pt.c (instantiate_class_template): Remove unused variable newtag;
12767 cast called function return value to void.
12768 (do_decl_instantiation): Remove unused variables name and fn.
12770 * tree.c (get_type_decl): Add default return to shut up compiler from
12771 complaining control reaches end of non-void function.
12773 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
12775 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
12777 * call.c (default_parm_conversions): Remove prototype definition.
12778 (build_method_call): Remove unused variable result.
12779 (build_over_call): Add default case in enumeration switch.
12781 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
12783 * decl2.c (lang_decode_option): Change j's type to size_t.
12785 * tree.c (layout_vbasetypes): record_align and desired_align are of
12786 type unsigned int; const_size and nonvirtual_const_size likewise.
12788 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
12790 * parse.y (new_initializer): Make sure all initializers are
12793 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
12795 * decl2.c (import_export_decl): Mark tinfo functions for
12796 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
12798 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
12800 * method.c: Fix typo.
12802 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12804 * method.c: Include "system.h" to get stdlib.h, stdio.h,
12805 ctype.h, string.h, etc.
12806 (issue_nrepeats): Add default case in enumeration switch.
12807 (check_btype): Likewise.
12808 (process_overload_item): Likewise.
12810 * Makefile.in (method.o): Depend on system.h.
12812 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12814 * lex.c (do_scoped_id): Fix parenthesizing.
12816 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
12818 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
12819 FLAG_RTTI is unset, initialize type info machinery and continue
12820 with FLAG_RTTI enabled.
12821 (get_typeid): Likewise.
12823 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
12825 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
12828 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
12830 * pt.c (finish_member_template_decl): Deal more gracefully with
12831 invalid declarations.
12833 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
12835 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
12836 cp-tree.h: Clean up more old overloading code, old RTTI code, and
12837 some formatting quirks.
12839 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
12840 method.c, pt.c, ptree.c, typeck.c: Remove support for
12841 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
12843 * Makefile.in: Adjust.
12845 * pt.c (unify): Don't allow reduced cv-quals when strict.
12847 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
12848 *type_unification* and unify.
12850 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
12852 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
12853 (nested_name_specifier): And add it before this use.
12854 (typename_sub0): And this use. Also add use without the keyword.
12855 (typename_sub1): Likewise.
12856 * pt.c (instantiate_class_template): Don't actually instantiate
12857 anything if our type uses template parms.
12859 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
12861 * decl.c (start_function): Don't call temporary_allocation for a
12864 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
12866 * pt.c (instantiate_class_template): Don't mess with friends if
12867 our type uses template parms.
12869 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
12871 * parse.y (nested_name_specifier): Use explicit_template_type.
12872 (typename_sub): Allow a template_type, an explicit_template_type,
12873 or an implicit template type at the end.
12874 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
12875 * decl.c (make_typename_type): Handle template-id where the name
12876 is a TEMPLATE_DECL.
12877 * call.c (build_scoped_method_call): Handle member template
12879 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
12880 destructor is represented by the type.
12882 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
12883 * parse.y (nested_name_specifier): Add 'template' case.
12884 (explicit_template_type): New rule.
12885 (typename_sub): Use it.
12886 * decl.c (make_typename_type): Handle getting a template-id for NAME.
12887 * pt.c (tsubst): Likewise.
12889 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
12891 * pt.c (add_to_template_args): Fix thinko.
12892 (instantiate_class_template): Call it later.
12894 * pt.c (get_class_bindings): Add outer_args parm.
12895 (most_specialized_class): Likewise.
12896 (instantiate_class_template): Pass it.
12897 (more_specialized_class): Likewise.
12898 (lookup_template_class): Get context from template if none
12900 (finish_member_template_decl): Don't do anything with a
12901 partial specialization.
12902 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
12904 * class.c (finish_struct): Member class templates have already been
12905 checked for name clashes.
12906 * decl.c (pushdecl_with_scope): Handle pushing at class level.
12908 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
12910 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
12911 (tsubst, *_PARM): Support multiple levels of template classes.
12912 (instantiate_class_template): Look up the pattern from the
12914 (lookup_template_class): Handle getting a template for d1.
12915 (push_template_decl): Correct setting of 'primary'.
12916 (reduce_template_parm_level): Add 'levels' parm.
12917 (finish_member_template_decl): Support member class templates.
12918 (template_class_depth): Handle multiple levels.
12919 * parse.y (component_decl_1, fn.def2): Remove member template case.
12920 (component_decl): Add member template cases.
12921 * decl2.c (check_member_template): We now handle member template
12923 * decl.c (pushtag): Handle member templates.
12924 * method.c (do_inline_function_hair): Don't touch
12925 IDENTIFIER_GLOBAL_VALUE.
12926 * init.c (build_offset_ref): If name isn't an identifier, just
12928 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
12930 * typeck.c (get_delta_difference): Do adjust for conversions to
12931 and from virtual base.
12933 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
12935 * typeck.c (get_delta_difference): Give hard error for conversion
12938 * cp-tree.h: Tweak formatting.
12940 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
12942 * decl.c (push_namespace): Handle redeclaration error.
12944 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
12945 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
12946 (NAMESPACE_BINDING): New macro.
12947 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
12950 * pt.c (push_template_decl): Use innermost_args.
12952 * decl.c (get_unique_name): Tweak from earlier in the name.
12954 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
12956 * cp-tree.def: Add CPLUS_BINDING node.
12957 * cp-tree.h (tree_binding): New struct.
12958 (BINDING_SCOPE, BINDING_VALUE): New macros.
12959 (current_namespace, global_namespace): Declare extern.
12960 (struct lang_decl_flags): New field in_namespace.
12961 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
12962 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
12963 (TREE_INDIRECT_USING): New macro.
12964 * decl2.c (current_namespace, global_namespace): Declare. The
12965 value is a NAMESPACE_DECL now, not a TREE_LIST.
12966 (is_namespace_ancestor, namespace_ancestor): New static functions.
12967 (add_using_namespace, ambiguous_decl): Likewise.
12968 (lookup_using_namespace): New support function for lookup_name.
12969 (qualified_lookup_using_namespace): New support function for
12970 do_scoped_id and lookup_namespace_name.
12971 (get_namespace_id): Mark as obsolete.
12972 (current_namespace_id): Likewise.
12973 (do_namespace_alias): Implement.
12974 (do_using_directive): Implement as call to add_using_namespace.
12975 * decl.c (binding_for_name): New function.
12976 (push_namespace, pop_namespace): Implement.
12977 (push_decl): Don't install a FUNCTION_DECL in the global branch.
12978 (lookup_namespace_name): Implement using qualified lookup.
12979 (lookup_name_real): For global scoping, lookup in
12980 global_namespace. For namespace scoping, lookup in given
12981 namespace. For unscoped lookup, iterate over namespace,
12982 considering using directives.
12983 (init_decl_processing): Initialize global_namespace.
12984 (grokvardecl): Build assembler name as static name for globals.
12985 (grokdeclarator): Remove old namespace mangling.
12986 (xref_tag): When installing a global binding for the
12987 tag, make sure we have an identifier.
12988 * method.c (build_overload_nested_name): Mangle namespaces.
12989 (build_qualified_name): Likewise.
12990 (build_decl_overload_real): Likewise.
12991 * lex.c (build_lang_decl): Set namespace for new declaration to
12993 (do_scoped_id): Find global names in global or current
12994 namespace, or using qualified namespace lookup, depending on
12996 * init.c (build_member_call): When scope is namespace, use
12997 build_x_function_call instead.
12998 (build_offset_ref): When scope is namespace, collapse processing
12999 to lookup_namespace_name instead.
13000 * error.c (dump_decl): Support NAMESPACE_DECL.
13001 * decl.c (pushdecl): Bind globals to current namespace.
13002 (push_overloaded_decl): Likewise.
13003 (lookup_tag): Likewise.
13004 (lookup_name_current_level): Likewise.
13005 (xref_tag): Likewise.
13006 (start_function): Likewise.
13007 * lex.c (do_identifier): Likewise.
13008 (identifier_typedecl_value): Likewise.
13009 (real_yylex): Likewise.
13010 * method.c (do_inline_function_hair): Likewise.
13011 * parse.y (unscoped): Likewise.
13012 * pt.c (check_explicit_specialization): Likewise.
13013 (lookup_template_class): Likewise.
13014 * rtti.c (call_void_fn): Likewise.
13015 * sig.c (build_sigtable): Likewise.
13016 * ptree.c (lang_print_xnode): New function.
13018 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
13020 * pt.c (instantiate_class_template): Don't instantiate if pedantic
13021 and the args use template parms.
13023 * pt.c (push_tinst_level): If the instantiation uses template parms,
13025 * decl.c (xref_basetypes): Do call complete_type for basetypes
13026 that involve template parameters.
13028 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
13030 * typeck2.c (process_init_constructor): Fix labeled init check.
13032 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
13034 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
13035 argument to tsubst and friends.
13037 * pt.c (tsubst, FUNCTION_DECL): Tidy.
13039 * typeck.c (build_x_function_call): Handle static member function
13040 templates like non-templates. Handle friend templates like normal
13041 function templates.
13042 * pt.c (tsubst, *_PARM): Don't use orig_level.
13043 (get_bindings): Don't call add_to_template_args.
13044 (instantiate_template): Likewise.
13045 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
13046 * ptree.c (print_lang_type): Print index/level for template parms.
13048 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
13050 * Make-lang.in (cc1plus): Note that cc1plus depends on
13051 cp/cp-tree.h and cp/cp-tree.def.
13053 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
13054 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
13055 position in a template parameter list.
13056 * cp-tree.h (template_parm_index): New structure, used as the tree
13057 structure for a TEMPLATE_PARM_INDEX.
13058 (TEMPLATE_PARM_IDX): New macro.
13059 (TEMPLATE_PARM_LEVEL): Likewise.
13060 (TEMPLATE_PARM_DESCENDANTS): Likewise.
13061 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
13062 (TEMPLATE_PARM_DECL): Likewise.
13063 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
13064 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
13065 (TEMPLATE_TYPE_DECL): Likewise.
13066 (TEMPLATE_CONST_IDX): Remove.
13067 (TEMPLATE_CONST_LEVEL): Likewise.
13068 (TEMPLATE_CONST_SET_INFO): Likewise.
13069 (TEMPLATE_TYPE_SET_INFO): Likewise.
13070 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
13072 (TEMPLATE_TYPE_LEVEL): Likewise.
13073 * decl.c (decls_match): Call comp_template_parms, rather than
13074 expanding it inline.
13075 (duplicate_decls): If two template declarations are being merged,
13076 then their TEMPLATE_INFOs should be merged as well.
13077 (grokfndecl): Save template-id information when declaring a friend
13078 with explicit template arguments. Pass arguments to
13079 check_explicit_specialization via correct convention; at some
13080 point check_explicit_specialization changed, but these call-sites
13082 (grokdeclarator): Tidy up slightly.
13083 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
13084 two template functions with the same DECL_ASSEMBLER_NAME the same,
13085 since the names are not yet mangled.
13086 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
13087 TEMPLATE_CONST_PARM.
13088 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
13089 decl for a non-type parameter, rather than printing `<tparm ...>'.
13090 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
13091 (do_friend): Deal with template friends.
13092 * lex.c (do_pending_inlines): Call
13093 maybe_begin_member_template_processing, rather than
13094 conditionally calling begin_member_template_processing.
13095 (process_next_inline): Likewise. Call
13096 maybe_end_member_template_processing, rather than
13097 conditionally calling end_member_template_processing.
13098 (do_pending_defargs): Likewise.
13099 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
13100 TEMPLATE_CONST_PARM.
13101 * method.c (build_mangled_template_parm_index): New function.
13102 (build_overload_value): Use it.
13103 (build_overload_name): Likewise.
13104 * pt.c (finish_member_template_decl): Allow friend declarations.
13105 (template_class_depth): New function.
13106 (is_member_template): Rename, and modify, to become...
13107 (is_member_or_friend_template): New function.
13108 (end_member_template_processing): Rename, and modify, to become...
13109 (maybe_end_member_template_processing).
13110 (build_template_parm_index): New function.
13111 (reduce_template_parm_level): New function.
13112 (process_template_parm): Modify to use build_template_parm_index.
13113 (push_template_decl): Deal with friend templates.
13114 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
13115 TEMPLATE_CONST_PARM.
13116 (tsubst_friend_function): New function.
13117 (instantiate_class_template): Generate the DECL_FRIENDLIST
13118 for a new instantiation by using tsubst_friend_function rather
13120 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
13121 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
13122 appropriate new macros. Use reduce_template_parm_level to
13123 generate lower-level template parameters. Handle tsubst'ing into
13124 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
13125 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
13126 templates. Similarly for the template parameters for a new
13128 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
13129 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
13130 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
13131 (get_bindings): Call add_to_template_args if necessary.
13132 (instantiate_decl): Handle instantiations of friend templates.
13133 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
13134 TEMPLATE_TYPE_PARM as a list of fields; it's not!
13135 * spew.c (yylex): Do a little manual constant propagation to
13138 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
13140 * error.c: Include sys/types.h.
13142 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
13144 * method.c (build_mangled_name): Start CPP directives in column zero.
13146 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13148 * typeck2.c (process_init_constructor): Sorry about non-trivial
13149 labeled initializers.
13150 * parse.y (initlist): Re-enable labeled initializers.
13152 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13154 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
13155 all callers changed. Rely on the new parameter instead of arg
13156 being a TREE_LIST when determine whether we are working inside
13157 template template parameter. Clean up is_type test.
13159 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
13161 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
13162 * typeck2.c (initializer_constant_valid_p): Allow conversions
13163 between pointers and references.
13165 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
13167 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
13168 if pedantic || warn_pointer_arith.
13170 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13172 * pt.c (unify): Handle TEMPLATE_DECL.
13174 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
13176 * cp-tree.h (strip_attrs): Remove decl.
13178 1998-02-18 Doug Evans <devans@cygnus.com>
13180 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
13181 Update olddecl's attributes too.
13182 (strip_attrs): Remove function.
13183 * typeck.c (common_type): Call merge_machine_type_attributes.
13185 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
13187 * parse.y (initdcl0_innards): New grammar symbol.
13188 (nomods_initdecls, nomods_initdcl0): Change type from itype to
13189 none, since the resulting value is never used.
13190 (parse_decl): New function.
13191 (datadef): Remove redundant actions.
13192 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
13193 * parse.c: Regenerated.
13195 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
13197 * parse.y (simple_stmt): Use getdecls() to check for decl.
13199 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
13201 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
13203 (c++.install-common): Install c++filt properly as native or as cross
13205 (c++.uninstall): Add c++filt.
13207 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13209 * call.c (standard_conversion): Fix multi-level ptr conversions.
13211 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
13213 * init.c (build_new): Propagate error_mark_node up.
13215 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
13217 * parse.y (simple_stmt): If the condition isn't a declaration,
13218 start the controlled block after the test.
13220 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13222 * call.c (build_over_call): Convert builtin abs, labs and fabs to
13224 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
13227 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13229 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
13231 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13233 * cp-tree.h: Add access_protected_virtual_node.
13234 * class.c (init_class_processing): Initialize it.
13235 * decl.c (xref_basetypes): Use it.
13236 * parse.y (base_class_access_list): Likewise.
13238 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
13239 (c++.install-common): Install c++filt.
13241 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13243 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
13245 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
13247 * call.c (reference_binding): Use comptypes when comparing
13248 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
13250 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
13252 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
13253 (really_overloaded_fn): Move check here from is_overloaded_fn.
13254 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
13256 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
13258 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
13261 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
13263 * cp-tree.h (push_template_decl): Return the decl passed in, or an
13264 equivalent duplicate.
13265 * decl.c (pushtag): Use the return value from push_template_decl.
13266 (duplicate_decls): When duplicating a template declaration, merge
13267 the DECL_TEMPLATE_RESULTs as well.
13268 (make_implicit_typename): Don't try to dive into typename types to
13269 find a context for making a new implicit typename.
13270 (start_decl): Use the return value from push_template_decl.
13271 (grokdeclarator): Complain about declarations list `const operator
13272 int'. Since we don't correctly handle in-class initializations of
13273 non-static data members, complain about this (now illegal)
13274 practice. Issue an error for initializations of non-const statics
13275 since that is illegal as well, and since we don't handle that case
13277 (start_function): Use the return value from push_template_decl.
13278 (start_method): Likewise.
13279 * decl2.c (grokfield): Likewise. Since the change to
13280 grokdeclarator ensures that all initialized fields are in fact
13281 static, remove a redundant test for TREE_PUBLIC.
13282 * parse.y (initlist): Disable labeled initializers since they do
13283 not work as per the documentation, and since they do not use the
13284 same syntax as the C front end.
13285 * pt.c (push_template_decl): Return the decl passed in, or an
13286 equivalent duplicate.
13287 (lookup_template_class): When searching in a nested context,
13288 use the right arguments.
13289 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
13290 * typeck.c (build_component_ref): Assign the correct type to the
13291 result of build_vfn_ref.
13293 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
13295 * pt.c (convert_nontype_argument): Fix typo.
13296 (check_explicit_specialization): Allow old-style specialization
13297 of class template members.
13299 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
13300 Manfred Hollstein <manfred@s-direktnet.de>
13302 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
13303 when deciding to override DECL_ASSEMBLER_NAME.
13305 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
13307 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
13308 * cp-tree.h (flag_do_squangling): Add declaration.
13309 * lang-options.h: Add -fsquangle and -fno-squangle.
13310 * method.c: Add macros and static variables for squangling.
13311 (build_overload_name): Rename to build_mangled_name, add logic for B
13312 compression, and split into process_modifiers and
13313 process_overload_item.
13314 (process_modifiers): New function, to handle constant, reference,
13316 (process_overload_item): New function, handles issue of type codes.
13317 (build_overload_name): New function, start squangling and call
13318 build_mangled_name.
13319 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
13320 (start_squangling): New function to initialize squangling structs.
13321 (end_squangling): New function to destroy squangling structs.
13322 (nrepeats): Rename variable to Nrepeats.
13323 (issue_nrepeats): New function for issuing 'n' type repeats.
13324 (check_ktype): New function to check for type K name compression.
13325 (build_overload_nested_name): Add a check for K name compression.
13326 (build_qualified_name): Add a check for K name compression and don't
13327 use DECL_ASSEMBLER_NAME when squangling is on.
13328 (check_btype): New function, checks for B type compression.
13329 (build_static_name, build_decl_overload_real): Initiate squangling.
13330 (build_typename_overload, build_overload_with_type): Initiate
13333 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
13335 * method.c (make_thunk): Avoid name buffer overflow.
13337 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
13339 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
13340 don't define them yet.
13342 * parse.y (nomods_initdcl0): Add constructor_declarator case.
13344 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13346 * config-lang.in (diff_excludes): Use basename only.
13348 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
13350 * tinfo2.cc: Add tinfo for signed char.
13352 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
13354 * search.c (compute_access): Handle protected constructors in derived
13355 classes as accessible.
13357 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
13359 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
13360 Call convert_from_reference sooner.
13362 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
13364 * cvt.c (ocp_convert): Obtain the constant values from constant
13365 decls even if the destination type is the same as the type of the
13368 * decl2.c (finish_file): Make sure that static inlines with
13369 definitions are not marked DECL_EXTERNAL before returning.
13371 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13373 * decl.c: Lose arg_looking_for_template.
13374 (lookup_name_real): Likewise.
13375 * parse.y: Lose processing_template_arg, template_arg1.
13376 (primary): Likewise.
13377 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
13379 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13381 * error.c (dump_decl): Fix type of default arguments for template
13382 template parameters and nontype template parameters.
13383 * parse.y (template_parm): Handle invalid default template
13384 template arguments here.
13386 * parse.y (template_parm): Use template_arg instead of PTYPENAME
13387 for default template template argument.
13388 * pt.c (coerce_template_parms): Merge default template argument
13389 codes. Can treat RECORD_TYPE as template name if it is implicitly
13390 created. Fix argument index in error message.
13391 * typeck.c (comptypes): Merge template argument comparison codes in
13392 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
13394 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
13396 * lex.c (file_name_nondirectory): Also check for '/'.
13398 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
13400 * parse.y (primary): Deal with statement-expressions in
13402 * pt.c (tsubst_copy): Handle BIND_EXPR.
13403 * tree.c (mapcar): Likewise.
13405 * call.c (add_template_candidate_real): Pass extra parameter to
13406 fn_type_unification.
13407 * cp-tree.h (fn_type_unification): Add parameter.
13408 * pt.c (fn_type_unification): Add additional parameter to deal with
13409 static member functions.
13410 (get_bindings): Deal with static member functions.
13412 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
13413 (revert_static_member_fn): Declare.
13414 * decl.c (revert_static_member_fn): Remove declaration. Change
13415 linkage from internal to external.
13416 (cp_finish_decl): Deal with virtual functions in classes local to
13417 template functions.
13418 * decl2.c (finish_file): Don't forget to emit increment/decrement
13419 expressions in initializers for file-scope variables.
13420 * parse.y (typename_sub2): If the typename doesn't names a
13421 template, rather than a type, issue an error message.
13422 * pt.c (check_explicit_specialization): Handle specializations of
13423 static member functions.
13424 (coerce_template_parms): Handle offset references to lists of
13426 * search.c (note_debug_info_needed): Don't crash when handed a
13427 type which is being defined.
13428 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
13429 that can happen with some illegal code.
13431 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13433 * call.c (user_harshness): Initialize `code' to 0.
13434 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
13435 (null_ptr_cst_p): Add parentheses around && within ||.
13436 (standard_conversion): Likewise.
13437 (z_candidate): Likewise.
13438 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
13439 (build_object_call): Likewise for `mem_args'.
13440 (build_new_op): Likewise for `mem_arglist'. Add `return' from
13441 default case in enumeration switch.
13443 * class.c (build_vtable_entry): Add explicit braces to avoid
13445 (build_class_init_list): Likewise.
13446 (finish_struct_1): Initialize `width' to 0.
13447 (instantiate_type): Initialize `name' to NULL_TREE. Add
13448 explicit braces to avoid ambiguous `else'.
13450 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
13453 * decl.c (grok_reference_init): Eliminate unused parameter, all
13455 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
13456 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
13457 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
13458 (grokdeclarator): Add parentheses around && within ||. Add
13459 explicit braces to avoid ambiguous `else'.
13460 (grokparms): Initialize `type' to NULL_TREE.
13461 (xref_tag): Remove unused label `just_return'.
13462 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
13463 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
13464 (hack_incomplete_structures): Add parentheses around assignment
13465 used as truth value.
13467 * decl2.c (coerce_delete_type): Hide definition of `e3'.
13469 * error.c: Include <stdlib.h>.
13470 (dump_expr): Change the type of `i' to size_t. Remove unused
13473 * except.c (init_exception_processing): Remove unused variable `d'.
13474 (expand_throw): Likewise for `label'.
13476 * friend.c (add_friends): Add explicit braces to avoid ambiguous
13479 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
13480 (sort_base_init): Likewise for `binfo'.
13481 (expand_member_init): Likewise for `rval'.
13482 (build_member_call): Add parentheses around assignment used as
13484 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
13485 (build_new): Initialize `nelts' to NULL_TREE. Initialize
13486 `old_immediate_size_expand' to 0.
13487 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
13488 (build_vec_delete_1): Remove unused variable `block'.
13489 (expand_vec_init): Initialize `itype' to NULL_TREE.
13491 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
13492 declaration of `index' and `rindex' with autoconf macros.
13493 (reinit_parse_for_expr): Remove unused variables
13494 `look_for_semicolon' and `look_for_lbrac'.
13495 (cons_up_default_function): Initialize `args' to NULL_TREE.
13496 (readescape): Initialize `firstdig' to 0.
13497 (real_yylex): Add parentheses around assignment used as truth value.
13499 * method.c: Include <strings.h> if we don't have <string.h>.
13500 Protect declaration of `index' with autoconf macro.
13502 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
13503 Initialize `type' to NULL_TREE.
13504 (structsp): Remove unused variable `id'.
13506 * pt.c (coerce_template_parms): Add explicit braces to avoid
13508 (lookup_template_class): Initialize `template' to NULL_TREE.
13509 (instantiate_class_template): Remove unused variable `name' and `e'.
13510 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
13511 (do_poplevel): Initialize `saved_warn_unused' to 0.
13512 (type_unification): Remove unused varable `parm'.
13513 (unify): Likewise for `j'.
13515 * repo.c (init_repo): Add parentheses around assignment used as
13517 (finish_repo): Remove unused varable `p'.
13519 * search.c (get_binfo): Initialize `type' to NULL_TREE.
13520 (get_base_distance): Likewise.
13521 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
13522 and `new_v' to NULL_TREE.
13523 (lookup_fnfields): Likewise for `rval_binfo_h'.
13524 (breadth_first_search): Add parentheses around assignment used as
13526 (get_template_base): Initialize `type' to NULL_TREE.
13528 * sig.c (append_signature_fields): Initialize `last_mfptr' to
13530 (build_signature_table_constructor): Likewise for
13531 `last_rhs_field', `pfn' and `vt_off'.
13532 (build_sigtable): Likewise for `init'.
13534 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
13535 (propagate_binfo_offsets): Likewise for `delta'.
13536 (hash_tree_cons): Initialize hashcode to 0.
13537 (can_free): Likewise for `size'.
13538 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
13540 * typeck.c (convert_sequence): Hide prototype.
13541 (common_type): Add explicit braces to avoid ambiguous `else'.
13542 (comp_target_types): Likewise.
13543 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
13544 (build_function_call_real): Add explicit braces to avoid ambiguous
13546 (convert_arguments): Initialize `called_thing' to 0.
13547 (convert_for_initialization): Initialize `savew' and `savee' to 0.
13549 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
13550 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
13551 (build_x_arrow): Likewise for `last_rval'.
13553 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
13555 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
13557 * decl.c (init_decl_processing): Use set_sizetype.
13558 * decl2.c (sizetype): Don't declare.
13559 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
13560 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
13561 (build_component_addr, unary_complex_lvalue): Likewise.
13562 * rtti.c (expand_class_desc): Likewise.
13563 * class.c (get_vfield_offset): Likewise.
13565 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
13567 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
13568 early to avoid bogus error. Handle overloaded function
13569 names provided as template arguments correctly.
13570 (coerce_template_parms): Don't mishandle overloaded functions when
13571 dealing with template template parameters.
13572 (lookup_template_class): Issue an error message, rather than
13573 crashing, when the TYPE_DECL provided is not a template type.
13575 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
13577 * class.c (instantiate_type): Don't just return a known type if
13580 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
13582 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
13583 since that code could never be reached.
13585 * error.c (dump_decl): Avoid aborting in the midst of printing an
13586 error message about an illegal template declaration.
13588 * parse.y (structsp): Print an error message, rather than crashing,
13589 when a class-head does not name a class.
13591 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
13592 template arguments as a g++ extension.
13594 * cp-tree.def (ALIGNOF_EXPR): New tree code.
13595 * decl2.c (grok_alignof): If processing_template_decl, just store
13597 * typeck.c (c_alignof): Likewise.
13598 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
13599 * error.c (dump_expr): Likewise.
13600 * pt.c (tsubst_copy): Likewise.
13601 * tree.c (cp_tree_equal): Likewise.
13602 * pt.c (uses_template_parms): Correctly determine whether or not a
13603 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
13604 folding can be done.
13606 * cp-tree.h (grok_enum_decls): Remove type parameter.
13607 * decl.c (grok_enum_decls): Likewise.
13608 * decl2.c (grok_x_components): Call grok_enum_decls
13609 unconditionally, since it will do nothing if there is no
13610 current_local_enum. Use the new calling sequence.
13611 * pt.c (tsubst_enum): Use the new calling sequence for
13614 * decl.c (start_function): Make member functions of local classes
13615 in extern inline functions have comdat linkage here...
13616 (grokdeclarator): Rather than here.
13618 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
13620 * pt.c (convert_nontype_argument): Use decl_constant_value.
13622 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
13624 * call.c (add_template_candidate_real): New function.
13625 (add_template_candidate): Use it.
13626 (add_template_conv_candidate): Likewise.
13627 (joust): Pass extra argument to more_specialized.
13628 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
13629 (is_local_class): Remove.
13630 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
13631 * cp-tree.h (is_local_class): Remove.
13632 (perform_array_to_pointer_conversion): Likewise.
13633 (finish_member_template_decl): Add.
13634 (check_explicit_specialization): Return a tree, not an int.
13635 (more_specialized): Take additional argument.
13636 (get_bindings): Likewise.
13637 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
13638 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13639 (perform_array_to_pointer_conversion): Remove.
13640 * decl.c (saved_scope): Add processing_specialization,
13641 processing_explicit_instantiation fields.
13642 (maybe_push_to_top_level): Save them.
13643 (pop_from_top_level): Restore them.
13644 (grokfndecl): Use new return value from
13645 check_explicit_specialization.
13646 (start_decl): Don't check flag_guiding_decls before pushing
13648 (cp_finish_decl): Remove previous (bogus) change.
13649 (grok_declarator): Use decl_function_context rather than
13651 * decl2.c (finish_file): Pass extra argument to get_bindings.
13652 (build_expr_from_tree): Let build_x_component_ref check
13653 validity of arguments rather than doing it here.
13654 * lex.c (cons_up_default_function): Remove code fooling with
13655 processing_specialization, processing_explicit_instantiation
13656 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
13657 * method.c (build_overload_identifier): Mangle local classes in
13658 template functions correctly.
13659 * parse.y (finish_member_template_decl): Move to pt.c.
13660 * pt.c (finish_member_template_decl): Moved here from parse.y.
13661 (print_candidates): New function.
13662 (determine_specialization): Change interface. Properly look for
13663 most specialized versions of template candidates.
13664 (check_explicit_specialization): Fully process explicit
13666 (push_template_decl): Avoid looking at CLASSTYPE fields in
13668 (determine_overloaded_function): Remove.
13669 (convert_nontype_argument): Change name from
13670 convert_nontype_parameter. Use determine_overloaded_function
13671 instead of instantiate_type.
13672 (mangle_class_name_for_template): Handle type contexts as well as
13674 (classtype_mangled_name): Likewise.
13675 (lookup_template_class): Likewise.
13676 (tsubst): Likewise.
13677 (more_specialized): Take explict template arguments as a
13679 (most_specialized): Likewise.
13680 (get_bindings): Likewise. Check that return types match before
13681 proclaiming a function a match.
13682 (do_decl_instantiation): Remove code searching for function to
13683 instantiate; that is now done in check_explicit_specialization.
13684 (add_maybe_template): Pass extra argument to get_bindings.
13685 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
13687 * typeck.c (build_component_ref): Check for invalid arguments.
13689 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
13691 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
13692 return_target and call_target are equivalent.
13694 * pt.c (type_unification_real): Just accept function parms that
13695 don't use any template parms.
13697 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
13699 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
13700 unset DECL_NOT_REALLY_EXTERN.
13702 * parse.y (typename_sub*): Fix std::.
13704 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
13706 * error.c (dump_decl): Fix type default template args.
13707 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
13709 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
13711 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
13712 (file_name_nondirectory): Use.
13714 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13716 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
13717 that are not really present. Substitute default arguments in
13718 template template arguments. Correctly convert TEMPLATE_DECL to
13719 TEMPLATE_TEMPLATE_PARM.
13720 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
13721 are no longer treated specially here.
13722 * parse.y (template_template_parm): Fix copy error.
13723 * decl.c (grokdeclarator): Warn about missing `typename' for nested
13724 type created from template template parameters.
13725 * parse.y (bad_parm): Likewise
13727 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
13728 (push_nested_class): Likewise.
13729 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
13730 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
13731 (copy_template_template_parm): Declare.
13732 * decl.c (arg_looking_for_template): New variable.
13733 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
13734 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
13735 node if arg_looking_for_template is nonzero.
13736 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
13737 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
13738 (grokdeclarator): Handle TEMPLATE_DECL.
13739 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
13740 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
13741 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
13742 (dump_decl): Handle unnamed template type parameters.
13743 Handle template template parameters.
13744 (dump_function_name): Handle template template parameters.
13745 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
13746 Handle TEMPLATE_TEMPLATE_PARM.
13747 * method.c (build_template_template_parm_names): New function.
13748 (build_template_parm_names): Handle TEMPLATE_DECL.
13749 (build_overload_nested_name, build_overload_name):
13750 Handle TEMPLATE_TEMPLATE_PARM.
13751 * parse.y (maybe_identifier): New nonterminal.
13752 (template_type_parm): Use it.
13753 (template_template_parm, template_arg1): New nonterminal.
13754 (template_parm): Add template_template_parm rules.
13755 (template_arg): Set processing_template_arg.
13756 (template_arg1): Rules moved from template_arg.
13757 (primary, nonnested_type): Set arg_looking_for_template if we are
13758 processing template arguments.
13759 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
13760 (process_template_parm): Handle template template parameters.
13761 (coerce_template_parms, comp_template_args): Likewise.
13762 (mangle_class_name_for_template, lookup_template_class): Likewise.
13763 (uses_template_parms): Handle TEMPLATE_DECL and
13764 TEMPLATE_TEMPLATE_PARM.
13765 (current_template_args): Handle TEMPLATE_DECL.
13766 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
13767 * search.c (dfs_walk, dfs_record_inheritance):
13768 Handle TEMPLATE_TEMPLATE_PARM.
13769 * tree.c (copy_template_template_parm): New function.
13770 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
13771 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
13773 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
13775 * decl.c (start_decl): Don't allow duplicate definitions of static
13778 * call.c (build_user_type_conversion_1): Handle user-defined
13779 template conversion operators correctly.
13781 * decl2.c (build_expr_from_tree): Issue an error message if the
13782 object in a COMPONENT_REF is a TEMPLATE_DECL.
13784 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
13786 * class.c (is_local_class): New function.
13787 * cp-tree.h (is_local_class): Declare it.
13788 (last_tree): Likewise.
13789 (begin_tree): Likewise.
13790 (end_tree): Likewise.
13791 (lookup_template_class): Change prototype.
13792 * decl.c (cp_finish_decl): Check for NULL where necessary.
13793 Consider FUNCTION_DECLS to declare objects with top-level binding,
13794 when calling make_decl_rtl.
13795 (grokdeclarator): Give members of local classes internal linkage.
13796 (start_function): Remove declaration of last_tree.
13797 (finish_function): Set flag_keep_inline_functions around call to
13798 rest_of_compilation if we are processing a member function in a
13800 (start_method): Call push_template_decl for member functions of
13801 local classes in template functions.
13802 * decl2.c (import_export_decl): Don't give external linkage to
13803 instantiations of templates with internal linkage.
13804 * parse.y (last_tree): Remove declaration.
13805 (template_type): Pass extra parameter to lookup_template_class.
13806 (self_template_type): Likewise.
13807 (structsp): Move call to reset_specialization into left_curly.
13808 (left_curly): Call reset_specialization, and begin_tree.
13809 * pt.c (saved_trees): New variable.
13810 (mangle_class_name_for_template): Change prototype. Use
13811 additional function context to name local classes in templates
13813 (classtype_mangled_name): Pass the context.
13814 (push_template_decl): Handle local classes and templates, and
13815 member functions for such classes.
13816 (convert_nontype_parameter): Fix handling of pointer-to-member
13818 (lookup_template_class): Handle local classes in templates.
13819 (tsubst): Likewise. Don't assume that template instantiations
13820 have external linkage; pay attention to the template declaration.
13821 (mark_decl_instantiated): Likewise.
13822 (begin_tree): New function.
13823 (end_tree): Likewise.
13825 * decl.c (xref_basetypes): Don't call complete_type for basetypes
13826 that involve template parameters; that can lead to infinite
13827 recursion unnecessarily.
13829 * pt.c (register_specialization): Do not register specializations
13830 that aren't ready to be registered yet.
13831 (check_explicit_specialization): Handle explicit specialization of
13832 constructors and destructors.
13833 (build_template_decl): New function.
13834 (push_template_delc): Handle out-of-class specializations of
13837 * pt.c (check_explicit_specialization): Set up the template
13838 information before registering the specialization.
13839 (coerce_template_parms): Fix thinko.
13840 (tsubst): Handle specializations of member templates correctly.
13842 * class.c (finish_struct_methods): Remove calls to
13843 check_explicit_specialization from here.
13844 (finish_struct): And insert them here.
13845 * cp-tree.h (perform_qualification_conversions): New function.
13846 (perform_array_to_pointer_conversion): Likewise.
13847 (begin_explicit_instantiation): Likewise.
13848 (end_explicit_instantiation): Likewise.
13849 (determine_specialization): Renamed from
13850 determine_explicit_specialization.
13851 (comp_template_parms): New function.
13852 (processing_explicit_instantiation): New variable.
13853 * cvt.c (perform_qualification_conversions): New function.
13854 (perform_array_to_pointer_conversion): Likewise.
13855 * decl.c (duplicate_decls): Don't consider template functions
13856 alike unless they have the same parameters. Refine handling of
13857 instantiation/specialization mismatches.
13858 (start_decl): Don't call pushdecl for template specializations,
13859 since they don't affect overloading.
13860 (start_function): Likewise.
13861 (grokfndecl): Call check_explicit_specialization a little later.
13862 Don't call duplicate_decls for memberm template specializations.
13863 (grokdeclarator): Don't update template_count for classes that are
13864 themselves specializations. Remove use of `2' as parameter to
13865 grokfndecl since that value isn't used.
13866 * lex.c (cons_up_default_function): Save and restore
13867 processing_explicit_instantiation around calls to grokfield.
13868 * parse.y (finish_member_template_decl): New function.
13869 (component_decl_1): Use it.
13870 (fn.def2): Likewise.
13871 (template_arg_list_opt): New nonterminal.
13872 (template_type): Use it.
13873 (self_template_type): Likewise.
13874 (template_id): Likewise.
13875 (object_template_id): Likewise.
13876 (notype_template_declarator): Likwise.
13877 (begin_explicit_instantiation): Likewise.
13878 (end_explicit_instantiation): Likewise.
13879 (explicit_instantiation): Use them.
13880 * pt.c (coerce_template_parms): Add parameters.
13881 (processing_explicit_instantiation): New variable.
13882 (convert_nontype_parameter): New function.
13883 (determine_overloaded_function): Likewise.
13884 (begin_explicit_instantiation): Likewise.
13885 (end_explicit_instantiation): Likewise.
13886 (retrieve_specialization): Likewise.
13887 (register_specialization): Likewise.
13888 (processing_explicit_specialization): Removed.
13889 (determine_specialization): Handle specializations of member
13890 functions of template class instantiations.
13891 (check_explicit_specialization): Refine to conform to standard.
13892 (comp_template_parms): New function.
13893 (coerce_template_parms): Call convert_nontype_parameter.
13894 (tsubst): Refine handling of member templates. Use
13895 register_specialization.
13896 (instantiate_template): Use retrieve_specialization.
13897 (do_decl_instantiation): Likewise.
13898 (instantiate_decl): Likewise.
13899 (type_unification): Improve handling of explict template
13901 * tree.c (mapcar): Return error_mark_node, rather than aborting,
13902 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
13903 * typeck.c (build_unary_op): Call determine_specialization, rather
13904 than determine_explicit_specialization.
13906 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
13908 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
13910 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13912 * error.c (dump_decl): For enum tags, output the tag, not its value.
13914 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
13916 * decl.c (init_decl_processing): Only call init_rtti_processing
13919 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
13921 * init.c (build_new_1): Split out from build_new.
13922 (build_new): Just return a NEW_EXPR.
13923 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
13925 * decl2.c (get_temp_regvar): Tweak.
13927 * cp-tree.h (TREE_CALLS_NEW): Comment out.
13928 * class.c (resolves_to_fixed_type_p): Remove use.
13929 * method.c (build_opfncall): Likewise.
13930 * call.c (build_new_op): Likewise.
13932 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
13934 * exception.cc (__eh_alloc, __eh_free): New fns.
13935 (__cp_push_exception, __cp_pop_exception): Use them.
13936 (__uncatch_exception): Call terminate here if no exception.
13937 * except.c (build_terminate_handler): New fn.
13938 (expand_start_catch_block): Use it.
13939 (expand_exception_blocks): Likewise.
13940 (alloc_eh_object): New fn.
13941 (expand_throw): Use it. Protect exception init with terminate.
13942 * typeck.c (build_modify_expr): Remove code that ignores trivial
13945 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13947 * call.c (add_builtin_candidate): Add default case in enumeration
13949 (build_new_op): Likewise.
13950 (convert_like): Likewise.
13951 * cvt.c (build_expr_type_conversion): Likewise.
13952 * tree.c (real_lvalue_p): Likewise.
13953 (lvalue_p): Likewise.
13954 (cp_tree_equal): Likewise.
13955 * typeck.c (comptypes): Likewise.
13956 (build_component_ref): Likewise.
13957 (build_function_call_real): Likewise.
13958 (build_binary_op_nodefault): Likewise.
13959 (build_unary_op): Likewise.
13960 (build_modify_expr): Likewise.
13961 * typeck2.c (initializer_constant_valid_p): Likewise.
13963 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
13965 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
13967 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
13969 * pt.c (coerce_template_parms): Make sure to digest_init if
13972 * decl.c (duplicate_decls): Make the newdecl virtual if the
13973 olddecl was, just as is done with other attributes of olddecl.
13975 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
13977 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
13978 address of an OFFSET_REF.
13980 * cp-tree.def: Add AGGR_INIT_EXPR.
13981 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
13982 AGGR_INIT_EXPR where appropriate.
13983 * expr.c (cplus_expand_expr): Likewise. Simplify.
13985 * decl2.c (finish_file): Remove call to register_exception_table.
13987 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13989 * pt.c (instantiate_class_template): Don't do injection when
13990 processing_template_decl is true, as pollutes current_binding_level
13993 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
13995 * pt.c (maybe_fold_nontype_arg): Add prototype.
13997 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13999 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
14000 * error.c (dump_expr): Likewise.
14002 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
14004 * typeck.c (build_function_call_real): Remove "inline called before
14005 definition" pedwarn.
14007 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
14009 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
14011 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
14013 * pt.c (type_unification_real): Change __null to type void* with
14016 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
14018 * call.c (implicit_conversion): Don't call
14019 build_user_type_conversion_1 with a NULL expr, since it will
14022 * pt.c (unify): Don't try to unify array bounds if either array is
14025 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14027 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
14028 Replace extern decls with casts.
14030 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
14031 Update last_parm_cleanup_insn.
14032 (store_after_parms): Remove.
14033 * cp-tree.h: Adjust.
14035 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
14037 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
14038 (finish_file): Check DECL_COMDAT instead of weak|one_only.
14039 (import_export_vtable): Use make_decl_one_only instead of
14040 comdat_linkage for win32 tweak.
14041 (import_export_decl): Likewise.
14042 * pt.c (mark_decl_instantiated): Likewise.
14044 * decl2.c (finish_file): Lose handling of templates in pending_statics.
14046 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
14048 * decl2.c (finish_file): Lose call to expand_builtin_throw.
14049 * except.c (expand_builtin_throw): Remove.
14050 * cp-tree.h: Remove ptr_ptr_type_node.
14051 * decl.c: Likewise.
14053 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
14055 * decl.c (ptr_ptr_type_node): Define.
14056 (init_decl_processing): Initialize it.
14057 * cp-tree.h: Declare it.
14058 * exception.cc (__cp_exception_info): Use __get_eh_info.
14059 (__cp_push_exception): Likewise.
14060 (__cp_pop_exception): Likewise.
14062 From Scott Snyder <snyder@d0sgif.fnal.gov>:
14063 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
14065 (init_exception_processing): Removed saved_pc initialization.
14067 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
14069 * pt.c (instantiate_decl): Defer all templates but inline functions.
14071 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
14073 * init.c (expand_vec_init): Don't fold a list of parameters.
14075 * decl.c (copy_args_p): Handle copy elision for types with virtual
14077 * call.c (build_over_call): Likewise.
14079 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
14081 * pt.c (lookup_template_function): Copy the template arguments,
14082 not just the list containing them, to the permanent obstack.
14084 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
14086 * except.c (expand_start_catch_block): suspend_momentary for the
14089 * error.c (dump_decl): Handle LOOKUP_EXPR.
14091 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
14093 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
14094 permanent obstack if we are processing a template decl.
14095 * typeck.c (build_static_cast): Likewise.
14096 (build_const_cast): Likewise.
14097 (build_reinterpret_cast): Likewise.
14099 * pt.c (coerce_template_parms): Coerce some expressions, even
14100 when processing_template_decl.
14102 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14104 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
14105 handling of pointer difference expressions.
14107 * typeck.c (comp_target_types): Comparison of function/method types
14108 is independent of nptrs.
14110 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
14112 * pt.c (tsubst): Avoid creating pointer to reference and
14113 reference to reference types.
14115 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
14117 * parse.y (do_id): New nonterminal.
14118 (template_id): Use it.
14120 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
14122 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
14123 * spew.c (yylex): Don't do_identifier here.
14124 * decl2.c (build_expr_from_tree): Revert last change.
14126 * decl2.c (build_expr_from_tree): Expand the name for a method call.
14127 * parse.y (object_template_id): Don't try to take the DECL_NAME.
14129 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
14131 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
14133 * call.c (build_op_delete_call): Adjust.
14135 * except.c (expand_end_catch_block): Lose rethrow region.
14136 (expand_start_catch_block): Likewise.
14137 (expand_end_catch_block): Don't expand_leftover_cleanups.
14139 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14141 * pt.c (tsubst): Remove tree_cons call (places redundant info into
14142 DECL_TEMPLATE_INSTANTIATION).
14144 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
14146 * tree.c (is_overloaded_fn): Handle getting a fn template.
14147 (really_overloaded_fn): Likewise.
14148 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
14149 * pt.c (check_explicit_specialization): Tweak.
14150 (determine_explicit_specialization): Tweak.
14152 * tree.c, cp-tree.h (get_target_expr): New fn.
14154 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
14156 * pt.c (check_explicit_specialization): Fix misspelling in
14157 diagnostic: `preceeded'.
14158 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
14161 1997-12-02 Mark Mitchell <mmitchell@usa.net>
14163 * pt.c (determine_explicit_specialization): Avoid an internal
14164 error for bad specializations.
14166 * method.c (build_overload_value): Handle SCOPE_REF.
14168 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
14170 * class.c (prepare_fresh_vtable): Enable even more complex MI
14173 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
14175 * exception.cc (__check_eh_spec): Optimize a bit.
14177 * exception.cc (__cp_pop_exception): Lose handler arg.
14178 * except.c (do_pop_exception): Likewise.
14179 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
14180 (expand_end_catch_block): Likewise.
14182 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14184 * pt.c (check_explicit_specialization): Complain about using a
14185 template-id for a non-specialization.
14187 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
14189 * repo.c: Prototype rindex only if needed.
14190 * xref.c: Likewise.
14192 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14194 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
14196 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
14198 * typeck.c (build_const_cast): Handle references here instead of
14199 handing off to convert_to_reference.
14201 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
14202 TerminateFunctionCall.
14203 (init_exception_processing): Likewise. Terminate et al are now
14204 the fns, not ADDR_EXPRs.
14205 (various): Lose redundant assemble_external calls.
14206 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
14208 * cp-tree.h (struct lang_decl_flags): Add comdat.
14209 (DECL_COMDAT): New macro.
14210 * decl.c (duplicate_decls): Propagate it.
14211 (cp_finish_decl): Handle it.
14212 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
14214 * class.c: Remove static pending_hard_virtuals.
14215 (add_virtual_function): Take pointers to pending_virtuals
14216 and pending_hard_virtuals.
14217 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
14219 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
14221 * decl2.c (import_export_vtable): If we support one_only but not
14222 weak symbols, mark instantiated template vtables one_only.
14223 (import_export_decl): Likewise for tinfo functions.
14224 (finish_vtable_vardecl): Also write out vtables from explicitly
14225 instantiated template classes.
14226 * pt.c (mark_class_instantiated): Revert last change.
14228 * except.c (expand_throw): Call mark_used on the destructor.
14230 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
14232 * lex.c (lang_init): Enable flag_exceptions by default if no
14233 command line switch was specified.
14235 1997-11-26 Mark Mitchell <mmitchell@usa.net>
14237 * pt.c (unify): Handle `void' template parameters in
14240 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
14242 * rtti.c (build_dynamic_cast): Handle template case here.
14243 (build_dynamic_cast_1): Not here.
14245 * typeck2.c (digest_init): Make copies where appropriate.
14247 * decl2.c (delete_sanity): resolve_offset_ref.
14249 * except.c: Call terminate without caching so many bits.
14251 * except.c (expand_start_catch_block): Fix catching a reference
14254 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
14256 * init.c (build_new): Copy size to the saveable obstack.
14258 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
14259 TRY_CATCH_EXPR for now.
14261 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
14263 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
14264 has DECL_LANG_SPECIFIC.
14266 * exception.cc (struct cp_eh_info): Add handlers field.
14267 (__cp_push_exception): Initialize it.
14268 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
14269 (__throw_bad_exception): Remove.
14270 * except.c (call_eh_info): Add handlers field.
14271 (get_eh_handlers): New fn.
14272 (push_eh_cleanup): Increment handlers.
14274 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
14276 * except.c (expand_start_eh_spec): Use the try/catch code.
14277 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
14278 doing everything inline.
14279 (init_exception_processing): throw_type_match now takes
14280 const void pointers.
14281 * exception.cc (__check_eh_spec): New fn.
14282 * inc/exception: Neither terminate nor unexpected return.
14283 * decl.c: Make const_ptr_type_node public.
14284 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
14286 * except.c (expand_start_catch_block): We only need the rethrow
14287 region for non-sjlj exceptions.
14288 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
14290 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
14292 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
14293 (various.o): Likewise.
14294 * inc/new: Add placement deletes. Add throw specs for default new.
14295 * new.cc (set_new_handler): Move here from libgcc2.
14296 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
14297 (new): Move from libgcc2. Throw bad_alloc.
14298 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
14299 * decl.c (init_decl_processing): Update exception specs on new and
14302 * method.c (build_decl_overload_real): Don't mess with global
14305 * init.c (build_new): Check for null throw spec, not nothrow_t.
14307 * decl.c (duplicate_decls): Don't complain about different exceptions
14308 from an internal declaration.
14310 * call.c (build_op_delete_call): Fix check for member fns again.
14312 * decl2.c (import_export_decl): Interface hackery affects
14313 virtual synthesized methods.
14315 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14317 * decl.c (start_decl): Don't just complain about a mismatched
14320 * decl.c (make_implicit_typename): Handle case where t is not
14321 actually from context.
14322 * tree.c (get_type_decl): Lose identifier case.
14323 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
14324 * parse.y (nonnested_type): Just use lookup_name.
14325 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
14327 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
14329 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
14330 T was built in C language context (for example, by
14331 output_func_start_profiler).
14333 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
14335 * decl.c (make_implicit_typename): New fn.
14336 (lookup_name_real): Use it. Use current_class_type as the context.
14338 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
14340 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
14342 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14344 * friend.c (do_friend): Warn about non-template friends in templates.
14346 * call.c (build_op_delete_call): Fix handling of inherited delete.
14348 * search.c (dfs_record_inheritance): Ignore template type parms.
14350 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
14352 * call.c (build_new_op): Fix copy error.
14353 (build_op_new_call): New fn.
14354 (build_op_delete_call): New fn.
14355 * cp-tree.h: Declare them.
14356 * init.c (build_new): Use them. Support placement delete.
14357 (build_x_delete): Use build_op_delete_call.
14358 (build_delete): Likewise.
14359 * decl2.c (delete_sanity): Likewise.
14360 (coerce_delete_type): Don't complain about placement delete.
14362 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
14364 * call.c (build_new_function_call): Remove unused 'obj' parm.
14365 * cp-tree.h, typeck.c: Adjust.
14367 * init.c (build_new): Make the cleanup last longer.
14368 (expand_vec_init): Call do_pending_stack_adjust.
14370 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
14372 * pt.c (do_type_instantiation): Fix typo.
14373 (mark_class_instantiated): If we support one_only but not weak
14374 symbols, don't mark this as known.
14376 * init.c (build_new): Handle vec delete in EH cleanup.
14378 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14380 * call.c (build_method_call): Call complete_type before checking
14383 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
14385 * decl.c (add_block_current_level): Delete.
14386 * init.c (build_vec_delete_1): Delete build_block and
14387 add_block_current_level calls.
14389 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
14391 * init.c (build_new): Handle freeing allocated memory when the
14392 constructor throws.
14394 * call.c (build_new_method_call): Fix flags arg.
14396 * pt.c (do_type_instantiation): Don't try to instantiate
14398 (mark_decl_instantiated): If we support one_only but not
14399 weak symbols, mark this one_only.
14400 * decl2.c (import_export_vtable): Don't defer handling of vtables
14401 if MULTIPLE_SYMBOL_SPACES.
14403 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14405 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
14407 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
14409 * except.c (do_pop_exception): Return a value.
14411 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
14413 * call.c (build_new_method_call): Handle getting a
14414 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
14415 if we got template parms.
14416 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
14418 * decl2.c (build_expr_from_tree): Tweak last change.
14419 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
14420 (maybe_fold_nontype_arg): Split out from tsubst_copy.
14421 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
14423 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14425 * pt.c (tsubst_copy): Handle explicit template arguments in
14427 * typeck.c (build_x_function_call): Likewise.
14428 * decl2.c (build_expr_from_tree): Lookup function name if it
14431 * pt.c (tsubst): Instantiate template functions properly when
14432 template parameter does not appear in function arguments and return
14434 (comp_template_args): Handle member templates required by tsubst.
14436 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
14438 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
14441 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14443 * pt.c (coerce_template_parms): Tweak error message.
14445 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
14446 return type defaults to `int', even if there are storage-class
14449 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
14451 Complete nested exception support.
14452 * except.c (do_pop_exception): Split out...
14453 (push_eh_cleanup): From here. Handle the EH region by hand.
14454 (expand_start_catch_block): Add a new level for the catch parm.
14455 Move the rethrow region outside the two cleanup regions.
14456 Protect the initializer for the catch parm with terminate.
14457 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
14458 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
14459 popping off the middle of the stack.
14460 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
14461 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
14462 (build_cplus_new): Only wrap CALL_EXPRs.
14463 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
14464 the constructor call.
14466 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14468 * Make-lang.in (c++.distdir): Make inc subdirectory.
14470 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14472 * decl2.c (finish_file): Put back some code.
14474 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14476 * decl2.c (finish_file): Remove redundant code.
14477 * method.c (emit_thunk): Don't let the backend defer generic thunks.
14479 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
14481 * except.c (call_eh_info): Split out...
14482 (push_eh_info): From here.
14483 (expand_builtin_throw): Use it.
14484 (expand_start_catch_block): Move region start back.
14486 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
14488 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
14489 (real_yylex): Record wide strings using target endianness, not host.
14491 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
14493 * repo.c (rindex): Add decl unconditionally.
14494 (get_base_filename, open_repo_file): Don't cast rindex.
14495 * xref.c (rindex): Add decl unconditionally.
14496 (index): Remove unused decl.
14497 (open_xref_file): Don't cast rindex.
14499 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14501 * class.c (build_vbase_path): Propagate the result type properly.
14503 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
14505 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
14506 remaining use of saved_throw_type with a call to get_eh_type.
14508 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
14510 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
14511 (file_name_nondirectory): New function, doing the same as the macro.
14512 (set_typedecl_interface_info): Use it instead of the macro.
14513 (check_newline): Likewise.
14514 (handle_cp_pragma): Likewise.
14516 * repo.c (get_base_filename): Cast result of rindex to char*.
14517 (open_repo_file): Likewise.
14518 * xref.c (open_xref_file): Likewise.
14519 * error.c (dump_char): Make its arg int, not char.
14521 * except.c (push_eh_info): Pass the number of fields - 1 down, not
14522 the exact number of fields.
14524 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
14526 Support for nested exceptions.
14527 * tinfo2.cc (__is_pointer): New fn.
14528 * exception.cc (struct cp_eh_info): Define.
14529 (__cp_exception_info, __uncatch_exception): New fns.
14530 (__cp_push_exception, __cp_pop_exception): New fns.
14531 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
14533 (init_exception_processing): Likewise. __eh_pc is now external.
14534 (push_eh_info): New fn.
14535 (get_eh_{info,value,type,caught}): New fns.
14536 (push_eh_cleanup): Just call __cp_pop_exception.
14537 (expand_start_catch_block): Use push_eh_info. Start the eh region
14539 (expand_end_eh_spec): Use push_eh_info.
14540 (expand_throw): Call __cp_push_exception to set up the exception info.
14541 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
14543 (expand_builtin_throw): Don't refer to empty_fndecl.
14545 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
14547 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
14549 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
14551 * method.c (build_template_parm_names, build_decl_overload_real):
14552 Add static to definitions.
14553 * pt.c (add_to_template_args, note_template_header,
14554 processing_explicit_specialization, type_unification_real): Likewise.
14555 ({determine,check}_explicit_specialization): Use a single string for
14558 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
14560 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
14561 (expand_end_catch_block): Likewise.
14562 (expand_end_eh_spec): Likewise.
14564 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
14566 * decl.c (duplicate_decls): Handle template specializations
14568 * error.c (dump_function_name): Fix printing of specializations of
14569 member functions that are not member templates.
14570 * cp-tree.h (processing_specialization): Make global.
14571 * pt.c (processing_specialization): Likewise.
14572 * lex.c (cons_up_default_function): Save and restore
14573 processing_specialization to avoid confusion.
14575 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
14577 * decl.c (init_decl_processing): Give null_node unknown* type.
14578 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
14579 (common_type): Likewise.
14580 * error.c (args_as_string): Recognize null_node.
14582 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14584 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
14585 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
14587 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
14589 * Make-lang.in (g++): Include prefix.o.
14591 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
14593 * pt.c (determine_explicit_specialization): Initialize "dummy"
14594 to keep Purify quiet.
14596 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
14598 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
14599 (build_overload_int): Not here.
14601 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
14603 * class.c (build_type_pathname): Remove.
14604 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
14606 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
14608 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
14609 &&label GNU extension.
14611 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
14613 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
14614 so as to avoid incorrect manglings.
14615 * method.c (build_decl_overload_real): Don't mangle return types
14618 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14620 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
14621 scratch_tree_cons): Define as macros for now.
14622 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
14623 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
14624 typeck2.c: Use them and the expression_obstack variants.
14626 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14628 * decl.c (store_return_init): Allow classes with explicit ctors to
14629 be used with the named return values extension.
14631 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
14633 * pt.c (instantiate_decl): Fix previous change.
14635 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
14637 * pt.c (tsubst): Fix thinko.
14638 (instantiate_decl): Really use the original template.
14640 * call.c (build_new_method_call): Use simple constructor_name for
14643 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
14645 * method.c (build_underscore_int): Don't use ANSI specific
14648 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
14650 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
14651 for our key method; it might have been inlined by -O3.
14653 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
14655 * decl.c (make_typename_type): Do not try to call lookup_field for
14656 non-aggregate types.
14658 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
14660 * typeck.c (build_reinterpret_cast): Tweak.
14662 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
14664 * typeck.c (build_reinterpret_cast): Converting a void pointer
14665 to function pointer with a reinterpret_cast produces a warning
14666 if -pedantic is issued.
14668 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14670 * typeck.c (c_expand_return): Don't warn about returning a
14671 reference-type variable as a reference.
14673 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
14675 * method.c (build_static_name): Fix typo.
14677 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
14679 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
14680 OLDDECL before we try to do DECL_USE_TEMPLATE.
14682 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
14684 * decl.c (duplicate_decls): Don't warn about template instances.
14686 * typeck.c (mark_addressable): Lose ancient code that unsets
14689 * pt.c (do_decl_instantiation): Lose support for instantiating
14692 * call.c (build_new_function_call): Fix handling of null explicit
14694 (build_new_method_call): Likewise.
14696 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
14698 * method.c (build_underscore_int): Fix typo.
14700 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
14702 * tree.c (print_lang_statistics): #if 0 call to
14703 print_inline_obstack_statistics until its definition is checked in.
14705 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
14707 * decl2.c (finish_file): Move dump_tree_statistics to end.
14709 * pt.c (instantiate_decl): Look for the original template.
14710 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
14711 of member templates.
14713 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
14715 * Makefile.in (g++FAQ.*): New rules.
14716 (CONFLICTS): Update.
14717 * g++FAQ.texi: Moved from libg++.
14719 * parse.y (PFUNCNAME): Only specify the type once.
14721 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
14723 * lex.c (real_yylex): Clean up the code to fully behave the way
14724 the c-lex.c parser does for complex and real numbers.
14726 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
14728 * method.c (build_decl_overload_real): Reformat.
14730 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
14732 * method.c (synthesize_method): If at_eof, determine our linkage.
14734 1997-09-29 Paul Eggert <eggert@twinsun.com>
14736 * lex.c (real_yylex): Treat `$' just like `_', except issue a
14737 diagnostic if !dollars_in_ident or if pedantic.
14739 * lang-specs.h (@c++): -ansi no longer implies -$.
14741 * decl2.c (lang_decode_option):
14742 -traditional and -ansi now do not mess with
14745 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
14747 * Makefile.in (parse.o, decl.o): Also depend on
14748 $(srcdir)/../except.h $(srcdir)/../output.h.
14749 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
14750 $(srcdir)/../except.h $(srcdir)/../output.h.
14751 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
14754 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
14756 * expr.c (cplus_expand_expr): Make it static.
14758 * decl2.c, init.c, typeck.c: Include "expr.h".
14759 (expand_expr): Use proper values when calling the function.
14761 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
14763 * lang-options.h: New -Wold-style-cast flag.
14764 * cp-tree.h (warn_old_style_cast): New variable.
14765 * decl2.c (warn_old_style_cast): Likewise.
14766 (lang_decode_option): Support -Wold-style-cast.
14767 (reparse_absdcl_as_casts): Produce old-style-cast warning.
14769 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14771 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
14772 TREE_USED, reset value based on already_used.
14774 * init.c (expand_member_init): Revert change.
14776 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
14778 * cp-tree.h, decl.c, decl2.c, pt.c:
14779 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
14781 * decl2.c (lang_decode_option): Add missing ;.
14783 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
14785 * friend.c (do_friend): Disable injection for all template-derived
14787 * decl2.c (lang_decode_option): Handle -fguiding-decls.
14788 * parse.y (notype_template_declarator): New nonterminal.
14789 (direct_notype_declarator): Use it.
14790 (complex_direct_notype_declarator): Likewise.
14791 (object_template_id): Accept any kind of identifier after TEMPLATE.
14792 (notype_qualified_id): Don't add template declarators here.
14794 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
14796 * call.c (add_template_candidate): Add explicit_targs parameter.
14797 (build_scoped_method_call): Use it.
14798 (build_overload_call_real): Likewise.
14799 (build_user_type_conversion_1): Likewise.
14800 (build_new_function_call): Likewise.
14801 (build_object_call): Likewise.
14802 (build_new_op): Likewise.
14803 (build_new_method_call): Likewise.
14804 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
14805 (build_new_method_call): Likewise.
14807 * class.c (finish_struct_methods): Add specialization pass to
14808 determine which methods were specializing which other methods.
14809 (instantiate_type): Handle TEMPLATE_ID_EXPR.
14811 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
14813 * cp-tree.h (name_mangling_version): New variable.
14814 (flag_guiding_decls): Likewise.
14815 (build_template_decl_overload): New function.
14816 (begin_specialization): Likewise.
14817 (reset_specialization): Likewise.
14818 (end_specialization): Likewise.
14819 (determine_explicit_specialization): Likewise.
14820 (check_explicit_specialization): Likewise.
14821 (lookup_template_function): Likewise.
14822 (fn_type_unification): Add explicit_targs parameter.
14823 (type_unification): Likewise.
14825 * decl.c (duplicate_decls): Add smarts for explicit
14827 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
14829 (grokfndecl): Call check_explicit_specialization.
14831 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
14832 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
14833 (check_classfn): Handle specializations.
14835 * error.c (dump_function_name): Print specialization arguments.
14837 * friend.c (do_friend): Don't call pushdecl for template
14840 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
14842 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
14843 and -fno-guiding-decls.
14845 * lex.c (identifier_type): Return PFUNCNAME for template function
14848 * method.c (build_decl_overload_real): New function.
14849 (build_template_parm_names): New function.
14850 (build_overload_identifier): Use it.
14851 (build_underscore_int): New function.
14852 (build_overload_int): Use it. Add levels for template
14854 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
14855 (build_overload_nested_names): Handle template type parameters.
14856 (build_template_decl_overload): New function.
14858 * parse.y (YYSTYPE): New ntype member.
14859 (nested_name_specifier): Use it.
14860 (nested_name_specifier_1): Likewise.
14861 (PFUNCNAME): New token.
14862 (template_id, object_template_id): New non-terminals.
14863 (template_parm_list): Note specializations.
14864 (template_def): Likewise.
14865 (structsp): Likewise.
14866 (fn.def2): Handle member template specializations.
14867 (component_decl_1): Likewise.
14868 (direct_notype_declarator): Handle template-ids.
14869 (component_decl_1): Likewise.
14870 (direct_notype_declarator): Handle template-ids.
14871 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
14873 * pt.c (processing_specializations): New variable.
14874 (template_header_count): Likewise.
14875 (type_unification_real): New function.
14876 (processing_explicit_specialization): Likewise.
14877 (note_template_header): Likewise.
14878 (is_member_template): Handle specializations.
14879 (end_template_decl): Call reset_specialization.
14880 (push_template_decl): Handle member template specializations.
14881 (tsubst): Likewise.
14882 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
14883 (instantiate_template): Handle specializations.
14884 (instantiate_decl): Likewise.
14885 (fn_type_unification): Handle explicit_targs.
14886 (type_unification): Likewise. Allow incomplete unification
14887 without an error message, if allow_incomplete.
14888 (get_bindings): Use new calling sequence for fn_type_unification.
14890 * spew.c (yylex): Handle PFUNCNAME.
14892 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
14893 (really_overloaded_fn): Likewise.
14894 (get_first_fn): Handle function templates.
14896 * typeck.c (build_x_function_call): Use really_overloaded_fn.
14897 Handle TEMPLATE_ID_EXPR.
14898 (build_x_unary_op): Likewise.
14899 (build_unary_op): Likewise.
14900 (mark_addressable): Templates whose address is taken are marked
14903 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14905 * decl.c (init_decl_processing): Declare __builtin_constant_p as
14906 accepting any kind of type, not only int.
14908 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
14910 * search.c (get_matching_virtual): Notice virtual bases when sorrying
14911 about covariant returns.
14913 * parse.y (member_init): Also imply typename here. Remove ancient
14914 extension for initializing base members.
14916 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
14918 Handle multi-level typenames and implicit typename in base list.
14919 * parse.y (typename_sub{,[0-2]}): New rules.
14920 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
14921 (nonnested_type): New rule.
14922 (complete_type_name): Use it.
14923 (base_class.1): Use typename_sub and nonnested_type.
14924 (nested_name_specifier): Don't elide std:: here.
14925 * decl.c (make_typename_type): Handle getting a type for NAME.
14926 (lookup_name_real): Turn std:: into :: here.
14928 Rvalue conversions were removed in London.
14929 * call.c (is_subseq): Don't consider lvalue transformations.
14930 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
14931 (joust): Re-enable ?: kludge.
14933 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
14935 * decl.c (start_function): Up warning of no return type to be a
14938 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14940 * init.c (expand_member_init): Don't set TREE_USED.
14941 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
14942 set,don't clear TREE_USED wholesale.
14944 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
14946 * call.c (build_over_call): Do require_complete_type before
14949 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
14951 * search.c (lookup_field): Call complete_type in all cases.
14953 * decl.c (finish_function): Just warn about flowing off the end.
14955 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
14957 * decl.c (grokparms): Don't bash a permanent list node if we're
14960 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
14962 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
14964 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
14966 * call.c (build_new_op): Give better error for syntactically
14967 correct, but semantically invalid, use of undeclared template.
14969 * call.c (compare_qual): Handle pmfs.
14971 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
14972 after the exception spec.
14974 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
14976 * call.c (null_ptr_cst_p): Integer type, not integral type.
14978 * call.c (joust): Disable warnings until they can be moved to the
14981 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
14983 * Makefile.in, config-lang.in: Convert to autoconf.
14985 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
14987 * decl.c (lookup_name_real): Add implicit 'typename' to types from
14990 * pt.c (most_specialized_class): Fix typo.
14991 (tsubst): Move constant folding to TREE_VEC case.
14993 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
14995 * pt.c (do_poplevel): Don't warn about unused local variables
14996 while processing_template_decl since we don't always know whether
14997 or not they will need constructing/destructing.
14999 * pt.c (uses_template_parms): Check the values of an enumeration
15000 type to make sure they don't depend on template parms.
15002 * decl.c (make_typename_type): Don't lookup the field if the
15003 context uses template parms, even if we're not
15004 processing_template_decl at the moment.
15006 * pt.c (coerce_template_parms): Avoid looking at the
15007 TYPE_LANG_DECL portion of a typename type, since there won't be
15009 (tsubst): Do constant folding as necessary to make sure that
15010 arguments passed to lookup_template_class really are constants.
15012 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
15014 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
15015 * decl2.c (finish_file): Only register exception tables if we
15018 * decl.c (init_decl_processing): Add __builtin_[fs]p.
15020 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15022 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
15024 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
15026 * error.c (dump_decl): Avoid crashing when presented with a
15027 uninitialized constant, as can occur with a template parameter.
15028 (dump_expr): Make sure that there are enough levels of
15029 current_template_parms before we start diving through them.
15031 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
15033 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
15036 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15038 * except.c (expand_throw): Call build_delete for all
15039 exception types, not just objects with destructors.
15041 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
15043 * decl.c (current_local_enum): Remove static.
15044 * pt.c (tsubst_enum): Save and restore value of current_local_enum
15045 in case template is expanded in enum decl.
15046 (instantiate_class_template): Use new tsubst_enum signature.
15047 (tsubst_expr): Likewise.
15049 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
15051 * pt.c (begin_member_template_processing): Take a function as
15052 argument, not a set of template arguments. Use the template
15053 parameters, rather than the arguments. Handle non-type parameters
15054 correctly. Push a binding level for the parameters so that multiple
15055 member templates using the same parameter names can be declared.
15056 (end_member_template_processing): Pop the binding level.
15057 (push_template_decl): Mark member templates as static when
15060 * lex.c (do_pending_inlines): Pass the function, not its template
15061 arguments, to begin_member_template_processing.
15062 (process_next_inline): Likewise.
15063 (do_pending_defargs): Likewise.
15065 * error.c (dump_expr): Obtain the correct declaration for a
15066 TEMPLATE_CONST_PARM.
15068 * call.c (add_template_conv_candidate): New function.
15069 (build_object_call): Handle member templates, as done in the other
15072 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
15074 * decl.c (replace_defag): Undo previous change.
15075 * lex.c (do_pending_defargs): Deal with member templates.
15077 * pt.c (is_member_template): Avoid crashing when passed a
15078 non-function argument.
15080 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
15082 * class.c (grow_method): Remove check for redeclaration.
15084 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
15086 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
15087 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
15088 (PRIMARY_TEMPLATE_P): Use it.
15089 * call.c (build_overload_call_real): Use it.
15090 * class.c (instantiate_type): Likewise.
15091 * decl.c (decls_match): Likewise.
15092 * method.c (build_overload_identifier): Likewise.
15093 * pt.c (push_template_decl): Likewise.
15094 (classtype_mangled_name): Likewise.
15095 (lookup_template_class): Likewise.
15097 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
15098 DECL_NTPARMS to conform to usage elsewhere.
15099 * call.c (add_template_candidate): Likewise.
15100 * class.c (instantiate_type): Likewise.
15101 * pt.c (instantiate_template): Likewise.
15102 (get_bindings): Likewise.
15104 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
15105 is_member_template.
15107 * pt.c (unify): Undo changes to allow multiple levels of template
15109 (type_unification): Likewise.
15110 (fn_type_unification): Likewise.
15111 (get_class_bindings): Likewise.
15112 * cp-tree.h (Likewise).
15114 * decl.c (replace_defarg): Check that the type of the default
15115 parameter does not invlove a template type before complaining
15116 about the initialization.
15118 * error.c (dump_expr): Deal with template constant parameters in
15119 member templates correctly.
15121 * pt.c (is_member_template): Deal with class specializations
15123 (tsubst): Handle "partial instantiation" of member templates
15126 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
15128 * pt.c (type_unification): Change calling sequence to allow for
15129 multiple levels of template parameters.
15130 (tsubst_expr): Likewise.
15131 (tsubst): Likewise.
15132 (tsubst_copy): Likewise.
15133 (instantiate_template): Likewise.
15135 * call.c (build_overload_call_real): Use it.
15136 (add_builtin_candidate): Use it.
15137 (build_new_method_call): Use it.
15138 * class.c (instantiate_type): Use it.
15139 * decl.c (grokdeclarator): Use it.
15140 * decl2.c (finish_file): Use it.
15141 * method.c (build_overload_identifier): Use it.
15143 * call.c (add_template_candidate): Add additional parameter for
15144 the function return type. Call fn_type_unification istead of
15146 (build_user_type_conversion_1): Handle member templates.
15147 (build_new_function_call): Likewise.
15148 (build_new_op): Likewise.
15149 (build_new_method_call): Likewise.
15151 * class.c (grow_method): Don't give an error message indicating
15152 that two member templates with the same name are ambiguous.
15153 (finish_struct): Treat member template functions just like member
15156 * cp-tree.h (check_member_template): Add declaration.
15157 (begin_member_template_processing): Likewise.
15158 (end_member_template_processing): Likewise.
15159 (fn_type_unification): Likewise.
15160 (is_member_template): Likewise.
15161 (tsubst): Change prototype.
15162 (tsubst_expr): Likewise.
15163 (tsubst_copy): Likewise.
15164 (instantiate_template): Likewise.
15165 (get_bindings): Likewise.
15167 * decl.c (decls_match): Handle multiple levels of template
15169 (pushdecl): Handle template type params just like other type
15171 (push_class_level_binding): Return immediately if the
15172 class_binding_level is NULL.
15173 (grokfndecl): If check_classfn() returns a member_template, use
15174 the result of the template, not the template itself.
15176 * decl2.c (check_member_template): New function. Check to see
15177 that the entity declared to be a member template can be one.
15178 (check_classfn): Allow redeclaration of member template functions
15179 with different types; the new functions can be specializations or
15180 explicit instantiations.
15182 * error.c (dump_decl): Handle multiple levels of template
15184 (dump_function_decl): Update to handle function templates.
15186 * lex.c (do_pending_inlines): Set up template parameter context
15187 for member templates.
15188 (process_next_inline): Likewise.
15190 * method.c (build_overload_identifier): Adjust for multiple levels
15191 of template parameters.
15193 * parse.y (fn.def2): Add member templates.
15194 (component_decl_1): Likewise.
15196 * pt.c (begin_member_template_processing): New function.
15197 (end_member_template_processing): Likewise.
15198 (is_member_template): Likewise.
15199 (fn_type_unification): Likewise.
15200 (current_template_parms): Return a vector of all the template
15201 parms, not just the innermost level of parms.
15202 (push_template_decl): Deal with the possibility of member
15204 (lookup_template_class): Likewise.
15205 (uses_template_parms): Likewise.
15206 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
15207 TEMPLATE_CONST_PARM to deal with multiple levels of template
15208 arguments. Add processing of TEMPLATE_DECL to produce new
15209 TEMPLATE_DECLs from old ones.
15210 (do_decl_instantiation): Handle member templates.
15212 * search.c (lookup_fnfields_1): Handle member template conversion
15215 * tree.c (cp_tree_equal): Check the levels, as well as the
15216 indices, of TEMPLATE_CONST_PARMs.
15218 * typeck.c (comptypes): Check the levels, as well as the indices,
15219 fo TEMPLATE_TYPE_PARMs.
15220 (build_x_function_call): Treat member templates like member
15223 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
15225 * typeck.c (c_expand_return): Always convert_for_initialization
15226 before checking for returning a pointer to local.
15228 * pt.c (type_unification): If strict and the function parm doesn't
15229 use template parms, just compare types.
15231 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
15233 * method.c (build_overloaded_value): Replace direct call
15234 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
15236 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
15238 * typeck.c (convert_arguments): Don't arbitrarily choose the first
15239 of a set of overloaded functions.
15241 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
15243 * lex.c (real_yylex): Don't elide __FUNCTION__.
15245 * method.c (build_overload_value): Add in_template parm.
15246 (build_overload_int): Likewise.
15247 (build_overload_identifier): Pass it.
15249 * decl.c (duplicate_decls): Don't bash a previous template
15250 definition with a redeclaration.
15252 * pt.c (unify): float doesn't match double.
15254 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
15255 TYPE_DECL. Handle getting non-template types.
15256 * parse.y (explicit_instantiation): Use typespec instead of
15257 aggr template_type.
15259 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
15261 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
15263 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
15265 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
15266 (compare_ics): Likewise.
15268 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
15270 * call.c (joust): Warn about choosing one conversion op over
15271 another because of 'this' argument when the other return type is
15273 (source_type): New fn.
15275 * call.c (build_new_op): Strip leading REF_BIND from first operand
15276 to builtin operator.
15278 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
15281 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
15283 * call.c (null_ptr_cst_p): Remove support for (void*)0.
15285 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
15287 * typeck.c (expand_target_expr): Make definition match declaration.
15289 * class.c (get_basefndecls): Make definition match declaration.
15291 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
15293 * input.c (sub_getch): Eventually give up and release the input file.
15295 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
15298 * call.c (joust): Tweak message.
15300 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
15302 * error.c (type_as_string): Put const/volatile on template type
15303 parameters where appropriate.
15305 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
15307 * call.c (strictly_better): Make arguments unsigned ints.
15309 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
15311 * lex.c (real_yylex): Refer to __complex instead of complex.
15313 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
15315 * lex.c (real_yylex): Don't use getc directly.
15317 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
15319 * call.c (is_subseq): Don't try to be clever.
15321 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
15323 * parse.y, pt.c: Include "except.h".
15324 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
15325 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
15326 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
15327 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
15330 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
15332 * decl2.c (mark_vtable_entries): Instead of replacing pure
15333 virtuals with a reference to __pure_virtual, copy the decl and
15336 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
15338 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
15340 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
15342 * pt.c (instantiate_class_template): Call repo_template_used
15343 before finish_prevtable_vardecl.
15345 * call.c (is_subseq): New fn.
15346 (compare_ics): Use it.
15348 * repo.c (finish_repo): Don't crash on no args.
15350 * parse.y (named_complex_class_head_sans_basetype): Handle
15351 explicit global scope.
15352 * decl2.c (handle_class_head): New fn.
15354 * pt.c (unify): Add CONST_DECL case.
15356 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15358 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
15360 * cp-tree.h (report_type_mismatch): Add prototype.
15361 * call.c (build_overload_call_real): Remove erroneous fourth
15362 argument to report_type_mismatch.
15363 (build_user_type_conversion_1): Remove erroneous second arg to
15365 (build_new_function_call): Likewise.
15366 (build_object_call): Likewise.
15367 (build_new_op): Likewise.
15368 (build_new_method_call): Likewise.
15370 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
15372 * error.c (dump_decl): Don't bother processing a function with no
15373 DECL_LANG_SPECIFIC.
15375 * method.c (emit_thunk): Call init_function_start in the macro case.
15377 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
15379 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
15380 defined and used to set flag_vtable_thunks.
15382 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
15384 * parse.y: Don't clear the inlines from their obstack until they've
15385 all been processed.
15387 * decl.c (duplicate_decls): Don't complain about exception
15388 specification mismatch if flag_exceptions is off.
15390 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
15392 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
15394 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
15396 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
15397 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
15398 Include <stdio.h> before include files that formerly used STDIO_PROTO.
15400 * decl.c, g++spec.c, lex.c, method.c, repo.c:
15401 Include "config.h" first, as per autoconf manual.
15403 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
15405 * decl.c (duplicate_decls): Tweak wording.
15406 * lex.c (do_pending_defargs): Don't die if we see a default arg
15407 that isn't a DEFAULT_ARG.
15408 * error.c (dump_expr): Handle DEFAULT_ARG.
15410 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
15411 * lang-options.h: Add -fhandle-exceptions.
15413 * class.c (build_vtable): Vtables are artificial.
15414 (prepare_fresh_vtable): Likewise.
15416 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15418 * cvt.c (ocp_convert): After converting to the target type, set
15419 LOOKUP_NO_CONVERSION.
15421 * call.c (joust): Warn about potentially confusing promotion rules
15423 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
15425 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
15427 * exception.cc: Declare __terminate_func with noreturn attribute.
15429 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
15431 * parse.y: Break out eat_saved_input, handle errors.
15432 (function_try_block): Use compstmt instead of compstmt_or_error.
15434 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
15436 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
15438 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15440 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
15441 existence of cc1plus check whether $(LANGUAGES) contains C++.
15443 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15445 * method.c (do_build_copy_constructor): When copying an anonymous
15446 union member loop around to handle nested anonymous unions. Use
15447 the offset of the member relative to the outer structure, not the
15450 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
15452 * call.c (resolve_args): New fn.
15453 (build_new_function_call): Use it.
15454 (build_object_call): Likewise.
15455 (build_new_method_call): Likewise.
15457 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15459 * call.c (build_over_call): tsubst all default parms from templates.
15461 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
15463 * decl.c (struct cp_function): Add static_labelno.
15464 (push_cp_function_context): Save it.
15465 (pop_cp_function_context): Restore it.
15467 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
15469 * typeck.c (build_component_ref_1): Convert from reference.
15471 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15473 * parse.y (current_declspecs, prefix_attributes): Initialize to
15476 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
15477 before we try to force it to be a TREE_LIST.
15478 (decl): Make sure $1.t is non-nil.
15480 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
15482 * pt.c (uses_template_parms): Handle template first-parse codes.
15484 * decl.c (cp_finish_decl): Only warn about user-defined statics.
15486 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
15488 * pt.c (unify): Handle BOOLEAN_TYPE.
15490 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
15491 * pt.c (tsubst): Don't set it.
15492 * call.c (build_over_call): Use uses_template_parms.
15494 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
15496 * method.c (build_overload_nested_name): Use static_labelno
15497 instead of var_labelno.
15498 (build_qualified_name): New fn.
15499 (build_overload_name): Split out from here.
15500 (build_static_name): Use build_qualified_name.
15501 * decl.c (cp_finish_decl): Statics in extern inline functions
15502 have comdat linkage.
15503 (start_function): Initialize static_labelno.
15505 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15507 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
15508 before "all member functions in class [] are private".
15510 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
15512 * lex.c (do_scoped_id): convert_from_reference.
15513 * init.c (build_offset_ref): Likewise.
15515 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
15517 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
15519 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
15521 * typeck.c (get_member_function_from_ptrfunc): Promote index
15524 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
15526 * tree.c (layout_basetypes): Move non-virtual destructor warning.
15527 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
15529 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15531 * decl.c (grokdeclarator): Call add_defarg_fn for the function
15533 * lex.c (add_defarg_fn): Adjust.
15534 (do_pending_defargs): Adjust. Don't skip the first parm.
15536 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
15538 * decl.c (build_enumerator): Global enumerators are also readonly.
15540 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
15541 (build_dynamic_cast): Call it and convert_from_reference.
15543 * lex.c (add_defarg_fn): New fn.
15544 (snarf_defarg): Don't add to defarg_types.
15545 (do_pending_defargs): Lose defarg_types. All fns we process now
15547 * decl.c (grokfndecl): Call add_defarg_fn.
15549 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
15550 * cp-tree.def: Add DEFAULT_ARG.
15551 * spew.c (yylex): Call snarf_defarg as appropriate.
15552 * parse.y: New tokens DEFARG and DEFARG_MARKER.
15553 (defarg_again, pending_defargs, defarg, defarg1): New rules.
15554 (structsp): Use pending_defargs.
15555 (parms, full_parm): Use defarg.
15556 * lex.c (init_lex): Initialize inline_text_firstobj.
15557 (do_pending_inlines): Never pass the obstack to feed_input.
15558 (process_next_inline): Call end_input instead of restore_pending_input.
15559 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
15560 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
15561 * input.c (end_input): New fn.
15562 (sub_getch): At the end of some fed input, just keep returning EOF
15563 until someone calls end_input.
15564 Remove 'obstack' field from struct input_source.
15565 * decl.c (grokparms): Handle DEFAULT_ARG.
15566 (replace_defarg): New fn.
15567 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
15569 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15571 * call.c (implicit_conversion): If nothing else works, try binding
15572 an rvalue to a reference.
15574 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
15576 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
15577 ifndef for Cygwin32 to include SIGSEGV.
15579 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
15581 * class.c (finish_struct_1): Only complain about pointers without
15582 copy stuff if there are any constructors.
15584 * rtti.c (build_dynamic_cast): Call complete_type on the types.
15586 * decl.c (grokfndecl): If the function we chose doesn't actually
15589 * decl2.c (grokclassfn): Don't specify 'const int' for the
15590 artificial destructor parm.
15592 * pt.c (type_unification): If we are called recursively, nothing
15595 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
15597 * decl.c (init_decl_processing): Stop trying to catch signals
15598 other than SIGABRT since the Cygwin32 library doesn't support
15599 them correctly yet. This fixes a situation in which g++ causes
15600 a hang on SIGSEGVs and other such signals in our Win32-hosted
15603 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
15605 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
15607 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
15609 * typeck2.c (store_init_value): Always return the value if our
15610 type needs constructing.
15612 * method.c (hack_identifier): Convert class statics from
15615 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
15617 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
15619 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
15621 * typeck.c (c_expand_return): Make sure we clean up temporaries at
15622 the end of return x;
15624 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15626 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
15628 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
15630 * except.c (expand_builtin_throw): Add support
15631 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
15633 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15635 * repo.c (extract_string): Null-terminate.
15637 * cp-tree.h (TI_SPEC_INFO): New macro.
15638 (CLASSTYPE_TI_SPEC_INFO): New macro.
15639 * pt.c (push_template_decl): Correctly determine # of template parms
15642 * call.c (compare_ics): Really fix 'this' conversions.
15644 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
15647 * pt.c (push_template_decl): Complain about mismatch in # of
15648 template parms between a class template and a member template.
15650 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15652 * method.c (synthesize_method): You can't call
15653 function_cannot_inline_p after finish_function.
15654 * decl.c (finish_function): Turn on flag_inline_functions and turn
15655 off DECL_INLINE before handing a synthesized method to the
15658 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15660 * method.c (synthesize_method): Remove July 30 change to never set
15661 DECL_INLINE if at_eof.
15663 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
15665 * xref.c (GNU_xref_member): Ensure that the node has a
15666 decl_lang_specific part before checking DECL_FRIEND_P.
15668 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
15670 * pt.c (instantiate_class_template): Diagnose non-class types used
15673 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
15675 * typeck.c (build_conditional_expr): Use convert_for_initialization
15676 instead of convert_and_check.
15678 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15680 * parse.y (typespec): Don't pedwarn for typeof.
15682 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
15684 * repo.c (finish_repo): Only check changes if we would write a
15687 * call.c (compare_ics): Fix handling of 'this' conversions.
15689 * pt.c (do_decl_instantiation): Support static data too. Rename
15690 from do_function_instantiation.
15691 * cp-tree.h: Adjust.
15694 * repo.c (extract_string): New fn.
15695 (get_base_filename): Use it.
15696 (init_repo): Compare old args with current args.
15698 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
15700 * Makefile.in, Make-lang.in: Protect C-ls with a comment
15701 character, idea from Paul Eggert <eggert@twinsun.com>.
15703 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
15705 * typeck.c (c_expand_return): Be more persistent in looking for
15708 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
15709 pointer to reference.
15711 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
15713 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
15715 * init.c (build_member_call, build_offset_ref):
15716 Use do_scoped_id instead of do_identifier.
15718 * cvt.c (convert): Remove bogosity.
15720 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15722 * cvt.c (build_up_reference): Do checks of ARGTYPE and
15723 TARGET_TYPE before trying to use get_binfo.
15725 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
15727 * cvt.c (build_up_reference): Call get_binfo to get access control.
15729 * decl2.c (import_export_decl): If we don't support weaks, leave
15732 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
15734 * except.c (expand_builtin_throw): Add support for machines that
15735 cannot access globals after throw's epilogue when
15736 -fno-sjlj-exceptions is used.
15738 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
15740 * parse.y: 'std::' becomes '::'.
15741 * lex.c (real_yylex): Remove 'namespace' warning.
15742 * init.c (build_member_call): Ignore 'std::'.
15743 (build_offset_ref): Likewise.
15744 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
15745 (do_toplevel_using_decl): Ignore 'using std::whatever'.
15746 * decl.c (push_namespace): Just sorry.
15747 (pop_namespace): Nop.
15748 (init_decl_processing): Declare std namespace.
15750 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
15752 * search.c (push_class_decls): A name which ambiguously refers to
15753 several instantiations of the same template just refers to the
15756 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
15758 * decl.c (build_enumerator): Fix problem with unsigned long
15759 enumerated values being smashed to ints, causing overflow
15760 when computing next enumerated value (for enum values around
15763 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
15765 * typeck.c (build_component_ref): Only call mark_used on a decl.
15767 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15769 * typeck.c (build_c_cast): Make the check for a ptr to function
15770 more specific before possible default_conversion call.
15772 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
15774 * except.c (expand_exception_blocks): Simplify and fix and make
15775 sure we don't end a region in a sequence, as expand_end_bindings
15778 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
15780 * except.c (init_exception_processing): Mark terminate as not
15781 returning so that the optimizer can optimize better.
15783 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
15785 * cvt.c (convert): Don't do any extra work, if we can avoid it
15788 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
15790 * *.[chy]: Change cp_convert to ocp_convert, change convert to
15791 cp_convert. convert is now reserved for the backend, and doesn't
15792 have the semantics a frontend person should ever want.
15794 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
15796 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
15797 Lose -traditional support.
15799 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15801 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
15803 * parse.y (self_reference): Do it for templates, too.
15804 * class.c (pushclass): Don't overload_template_name; the alias
15805 generated by build_self_reference serves the same purpose.
15807 * tree.c (list_hash): Make static, take more args.
15808 (list_hash_lookup): Likewise.
15809 (list_hash_add): Make static.
15810 (list_hash_canon): Lose.
15811 (hash_tree_cons): Only build a new node if one isn't already in the
15813 (hash_tree_chain): Use hash_tree_cons.
15814 * cp-tree.h: Adjust.
15815 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
15816 of calling lookup_name.
15818 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15820 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
15821 doesn't refer to the CONST_DECLs.
15823 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
15825 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
15827 (expand_class_desc): Convert the last argument to a sizetype.
15829 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15831 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
15832 __real__): Add reswords.
15833 * hash.h: Regenerate.
15834 * lex.h (rid): Add RID_COMPLEX.
15835 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
15836 * lex.c (init_lex): Add building of RID_COMPLEX.
15837 (real_yylex): General cleanup in line with what c-lex.c also has,
15838 sans the cruft for traditional; add handling of SPEC_IMAG, complex
15839 types, and imaginary numeric constants.
15840 * parse.y (REALPART, IMAGPART): Add tokens.
15841 (unary_expr): Add REALPART and IMAGPART rules.
15842 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
15843 * decl.c (complex_{integer,float,double,long}_type_node): Define
15845 (init_decl_processing): Set up the types.
15846 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
15847 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
15848 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15849 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
15850 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
15852 * method.c (build_overload_name): Add handling of the different
15853 COMPLEX_TYPEs, prefixing them with `J'.
15854 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
15855 as a template parm.
15856 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
15857 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
15858 (mapcar): Handle COMPLEX_CST.
15859 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
15860 (common_type): Add code for complex types.
15861 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15862 (convert_for_assignment): Likewise.
15863 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
15865 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
15867 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
15868 tsubst_expr, as it might try to do overload resolution.
15870 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
15872 * pt.c (instantiate_class_template): Oops.
15874 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
15876 * cp-tree.def: Add TAG_DEFN.
15877 * pt.c (tsubst_enum): New fn.
15878 (instantiate_class_template): Use it.
15879 (tsubst_expr): Support TAG_DEFN.
15880 (tsubst): Support local enums.
15881 (tsubst_copy): Likewise.
15882 * decl.c (finish_enum): Likewise.
15883 (start_enum): If this is a local enum, switch to permanent_obstack.
15885 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
15887 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
15888 (finish_function): Put the base init code for constructors just
15889 after the parm cleanup insns.
15890 (struct cp_function): Add last_parm_cleanup_insn.