1 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
3 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
4 (BINFO_VBASE_PRIMARY_P): New macro.
5 (BINFO_VIRTUALS): Add to documentation.
6 (SET_BINFO_PRIMARY_MARKED_P): Remove.
7 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8 (dfs_mark_primary_bases_queue_p): Likewise.
9 (dfs_unmarked_real_bases_queue_p): New function.
10 (dfs_marked_real_bases_queue_p): Likewise.
11 * search.c (dfs_mark_primary_bases): Adjust.
12 (mark_primary_bases): Likewise.
13 (get_shared_vbase_if_not_primary): New function.
14 (dfs_unmarked_real_bases_queue_p): Likewise.
15 (dfs_marked_real_bases_queue_p): Likewise.
16 (dfs_get_pure_virtuals): Simplify.
17 (get_pure_virtuals): Likewise.
19 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21 * lex.c: Include tm_p.h.
23 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
25 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
27 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
29 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
30 * pt.c (instantiate_decl): Defer comdat templates that might not be
33 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
34 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
35 (finish_file): Likewise.
37 * decl2.c (import_export_class): Undo 12/14 change.
39 * error.c (dump_decl): operator new, not operatornew.
41 * class.c (field_decl_cmp): A nontype is "greater" than a type.
42 * search.c (lookup_field_1): Look for the last field with the
45 2000-01-05 Nathan Sidwell <nathan@acm.org>
47 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
50 2000-01-05 Nathan Sidwell <nathan@acm.org>
52 * typeck.c (build_static_cast): Don't strip target qualifiers
53 when casting from a class.
55 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
57 * class.c (warn_hidden): Initialize variable `fndecl'.
59 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
61 * decl.c (flag_isoc9x): New variable to be able to use code in
62 c-common.c. For now always zero.
64 2000-01-03 Mark Mitchell <mark@codesourcery.com>
66 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
67 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
68 or unshare_base_binfos for virtual bases here.
69 * search.c (dfs_get_vbase_types): Do it here.
70 (get_vbase_types): Adjust.
72 2000-01-02 Mark Mitchell <mark@codesourcery.com>
74 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
75 (BINFO_PRIMARY_MARKED_P): Use flag 5.
76 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
77 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
78 (unmark_primary_bases): Remove declaration.
80 (dfs_vbase_unmark): Likewise.
81 * class.c (determine_primary_base): Return immediately if there
82 are no base classes. Call mark_primary_bases here.
83 (modify_all_direct_vtables): Remove.
84 (modify_all_indirect_vtables): Remove.
85 (dfs_modify_vtables_queue_p): New function.
86 (dfs_modify_vtables): New function.
87 (modify_all_vtables): Use them.
88 (build_base_fields): Build FIELD_DECLs for primary virtual base
90 (create_vtable_ptr): Don't call determine_primary_base here.
91 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
92 (dfs_set_offset_for_vbases): ... this.
93 (layout_virtual_bases): Use it.
94 (layout_class_type): Call determine_primary_base here.
95 * search.c (unmarkedp): Make it global.
96 (shared_marked_p): Simplify.
97 (shared_unmarked_p): Likewise.
98 (dfs_primary_bases_queue_p): Remove.
99 (dfs_unmark_primary_bases): Likewise.
100 (unmark_primary_bases): Likewise.
101 (mark_primary_bases): Simplify.
102 (get_pure_virtuals): Don't call mark_primary_bases here.
103 (dfs_vbase_unmark): New function.
104 (get_vbase_types): Simplify.
106 * class.c (struct base_info): Remove.
107 (determine_primary_base): Take has_virtual_p rather than a
108 base_info as input. Don't calculate max_has_virtual.
109 (finish_struct_bits): Remove max_has_virtual argument.
110 (create_vtable_ptr): Remove max_has_virtual_p argument.
111 (layout_virtual_bases): Remove max argument.
112 (layout_basetypes): Likewise.
113 (layout_class_type): Remove max_has_virtual_p argument.
114 (finish_struct_1): Remove max_has_virtual.
116 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
117 (layout_basetypes): Remove.
118 * class.c (propagate_binfo_offsets): Moved here from tree.c.
119 Update to handle primary virtual bases.
120 (remove_base_fields): New function, split out from
122 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
123 (layout_virtual_bases): New function, split out from
124 layout_basetypes. Update to handle primary virtual bases.
125 (layout_basetypes): Moved here from tree.c. Use
126 remove_base_fields and layout_virtual_bases.
127 * search.c (dfs_mark_primary_bases_queue_p): New function.
128 (mark_primary_bases): Use it.
129 * tree.c (CEIL): Remove.
130 (propagate_binfo_offsets): Remove.
131 (layout_basetypes): Remove.
133 2000-01-01 Mark Mitchell <mark@codesourcery.com>
135 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
136 (BINFO_PRIMARY_MARKED_P): New macro.
137 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
138 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
139 (mark_primary_bases): New function.
140 (unmark_primary_bases): Likewise.
141 * search.c (get_abstract_virtuals_1): Remove.
142 (dfs_mark_primary_bases): New function.
143 (mark_primary_bases): Likewise.
144 (dfs_unmark_primary_bases): Likewise.
145 (unmark_primary_bases): Likewise.
146 (dfs_get_pure_virtuals): Likewise.
148 2000-01-01 Mark Mitchell <mark@codesourcery.com>
150 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
151 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
152 (modify_one_vtable): Adjust.
153 (fixup_vtable_deltas1): Likewise.
154 (override_one_vtable): Likewise.
155 * search.c (get_abstract_virtuals_1): Likewise.
156 (get_pure_virtuals): Likewise.
157 (expand_upcast_fixups): Likewise.
158 * tree.c (debug_binfo): Likewise.
160 * class.c (build_vtable): Don't return a value. Don't rebuild
161 vtables for bases that have already been handled.
162 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
163 already been handled.
164 (modify_one_vtable): Adjust accordingly.
165 (fixup_vtable_deltas1): Likewise.
166 (finish_struct_1): Likewise.
168 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
170 * call.c (build_new_method_call): Also check destructors.
172 1999-12-31 Mark Mitchell <mark@codesourcery.com>
174 * cp-tree.h (VF_NORMAL_VALUE): Remove.
175 * class.c (struct base_info): Remove vfield, vfields, and rtti.
176 (set_primary_base): New function, split out from ...
177 (finish_base_struct): ... here. Rename to ...
178 (determine_primary_base): ... this. Simplify.
179 (create_vtable_ptr): Tweak accordingly.
180 (finish_struct_1): Simplify.
182 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
183 (CLASSTYPE_N_BASECLASSES): Likewise.
184 (BINFO_FOR_VBASE): New macro.
185 (get_vbase_types): Change prototype.
186 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
187 (prepare_fresh_vtable): Likewise.
188 (finish_vtbls): Likewise.
189 (get_class_offset_1): Likewise.
190 (modify_all_indirect_vtables): Likewise.
191 (build_vbase_pointer_fields): Likewise.
192 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
193 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
194 (expand_member_init): Likewise.
195 * search.c (get_base_distance): Likewise.
196 (lookup_field_queue_p): Likewise.
197 (virtual_context): Likewise.
198 (get_vbase_types): Don't return a value. Set
199 CLASSTYPE_VBASECLASSES here.
200 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
202 1999-12-30 Mark Mitchell <mark@codesourcery.com>
204 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
206 1999-12-29 Mark Mitchell <mark@codesourcery.com>
208 * class.c (create_vtable_ptr): Put the vtable at the beginning of
209 the class, not the end, in the new ABI.
210 * tree.c (propagate_binfo_offsets): Do the right thing for the new
213 1999-12-29 Mark Mitchell <mark@codesourcery.com>
215 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
216 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
217 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
218 (check_field_decls): Likewise.
219 (check_bases_and_members): Likewise.
221 1999-12-28 Mark Mitchell <mark@codesourcery.com>
223 * cp-tree.h (do_inline_function_hair): Remove.
224 * class.c (layout_class_type): New function, split out from
226 (fixup_pending_inline): Likewise.
227 (fixup_inline_methods): New function.
228 * method.c (fixup_pending_inline): Remove.
229 (do_inline_function_hair): Likewise.
231 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
234 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
235 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
236 (CLASSTYPE_PURE_VIRTUALS): ... this.
237 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
238 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
239 (DECL_PURE_VIRTUAL_P): ... this.
240 (get_abstract_virtuals): Rename to ...
241 (get_pure_virtuals): ... this.
242 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
243 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
244 CLASSTYPE_PURE_VIRTUALS.
245 * class.c (build_vtable_entry): Likewise.
246 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
247 get_abstract_virtuals.
248 (build_vtbl_initializer): Likewise.
249 (override_one_vtable): Likewise.
250 (check_methods): Likewise.
251 * decl.c (duplicate_decls): Likewise.
252 (redeclaration_error_message): Likewise.
253 (lang_mark_tree): Likewise.
254 * decl2.c (grok_function_init): Likewise.
255 (import_export_vtable): Likewise.
256 (import_expor_class): Likewise.
257 * typeck2.c (abstract_virtuals_error): Likewise.
258 * xref.c (GNU_xref_member): Likewise.
259 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
261 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
263 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
266 1999-12-26 Mark Mitchell <mark@codesourcery.com>
268 * decl.c (store_return_init): Use mode of old RTL generated for
269 DECL_RESULT, not the mode of DECL_RESULT itself.
270 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
271 for functions that used named return values.
273 1999-12-24 Mark Mitchell <mark@codesourcery.com>
275 * semantics.c (expand_body): Use
276 note_deferral_of_defined_inline_function.
278 1999-12-22 Mark Mitchell <mark@codesourcery.com>
280 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
282 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
284 * error.c (dump_decl): Support named return values.
286 1999-12-20 Mark Mitchell <mark@codesourcery.com>
288 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
289 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
290 (CLASSTYPE_PRIMARY_BINFO): Likewise.
291 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
292 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
293 (check_bases_and_members): Set them here instead.
294 (create_vtable_ptr): New function, split out from ...
295 (finish_struct_1): ... here. Use it. Tidy. Use
296 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
297 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
298 the first field in the class.
299 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
300 seeing TYPE_VFIELD as the first field in the class.
302 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
303 (TYPE_POLYMORPHIC_P): ... this.
304 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
305 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
306 (TREE_CALLS_NEW): Remove.
307 (TREE_MANGLED): Likewise.
308 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
309 and TYPE_POLYMORPHIC_P.
310 * class.c (check_bases): Likewise.
311 (finish_base_struct): Likewise.
312 (finish_struct_bits): Likewise.
313 (check_for_override): Likewise.
314 (finish_struct_1): Likewise.
315 (get_vfield_name): Likewise.
316 * decl.c (xref_basetypes): Likewise.
317 * decl2.c (import_export_class): Likewise.
318 (import_export_decl): Likewise.
319 * error.c (dump_function_decl): Likewise.
320 * pt.c (instantiate_class_template): Likewise.
321 * repo.c (repo_inline_used): Likewise.
322 * rtti.c (build_headof): Likewise.
323 (get_tinfo_fn_dynamic): Likewise.
324 (build_x_typeid): Likewise.
325 (get_tinfo_var): Likewise.
326 (build_dynamic_cast_1): Likewise.
327 (synthesize_tinfo_fn): Likewise.
328 * search.c (lookup_field_1): Likewise.
329 (dfs_debug_mark): Likewise.
330 (maybe_suppress_debug_info): Likewise.
331 * typeck.c (build_component_ref): Likewise.
332 (build_component_addr): Likewise.
333 * typeck2.c (process_init_constructor): Likewise.
335 1999-12-20 Nathan Sidwell <nathan@acm.org>
337 * typeck.c (strip_all_pointer_quals): New static function.
338 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
340 1999-12-16 Mark Mitchell <mark@codesourcery.com>
342 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
343 (dso_handle_node): New macro.
344 (flag_use_cxa_atexit): New variable.
345 (declare_global_var): New function.
346 (start_anon_func): Remove declaration.
347 (end_anon_func): Likewise.
348 * decl.c (get_atexit_node): New function, split out from
349 destroy_local_static. Handle flag_use_cxa_atexit.
350 (get_dso_handle_node): Likewise.
351 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
352 except.c. Handle flag_use_cxa_atexit.
353 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
355 (declare_global_var): New variable.
356 (destroy_local_static): Handle flag_use_cxa_atexit.
357 * decl2.c (flag_use_cxa_atexit): New variable.
358 (lang_f_options): Likewise.
359 * except.c (start_anon_func): Remove.
360 (end_anon_func): Liekwise.
361 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
362 * rtti.c (get_tinfo_var): Use declare_global_var.
364 1999-12-16 Mark Mitchell <mark@codesourcery.com>
366 * class.c (check_field_decls): Don't return a value.
367 (avoid_overlap): Moved here from tree.c.
368 (build_base_fields): Likewise.
369 (check_bases): New function, split out from finish_base_struct.
370 (check_bases_and_members): New function, split out from
372 (struct base_info): Remove cant_have_default_ctor,
373 cant_have_const_ctor, cant_have_asn_ref.
374 (finish_base_struct): Split semantic analysis into check_bases.
375 (finish_struct_methods): Fix bogus assertion.
376 (check_field_decls): Call finish_struct_anon here.
377 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
378 (finish_struct_1): Use check_bases_and_members. Reorganize.
379 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
380 (build_base_fields): Don't declare.
381 * tree.c (avoid_overlap): Remove.
382 (build_base_fields): Likewise.
384 * optimize.c (struct inline_data): Remove scope_stmt.
385 (remap_block): Don't use insert_block_after_note. Don't update
387 (expand_call_inline): Don't update scope_stmt.
388 (optimize_function): Don't initialize scope_stmt.
389 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
390 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
392 1999-12-15 Mark Mitchell <mark@codesourcery.com>
394 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
395 out of the class, rather than taking them as parameters.
396 (build_vbase_pointer_fields): Move here from tree.c.
397 (build_vtbl_or_vbase_field): New function.
398 (check_methods): Likewise.
399 (remove_zero_width_bitfields): Likewise.
400 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
401 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
403 (finish_struct_methods): Handle the case where there are no
405 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
406 (check_field_decls): Call delete_duplicate_fields here.
407 (finish_struct_1): Tidy. Use check_methods and
408 remove_zero_width_bitfields.
409 * cp-tree.h (build_vbase_pointer_fields): Remove.
410 * decl.c (grokdeclarator): Use tree_cons instead of
412 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
413 instead of temp_tree_cons.
414 * lex.c (cons_up_default_function): Remove dead code.
415 * method.c (fixup_pending_inline): New function, split out from ...
416 (do_inline_function_hair): ... here.
417 * tree.c (build_vbase_pointer_fields): Remove.
419 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
421 * tree.c (walk_tree): Walk operand subtrees in forward order.
422 * optimize.c (expand_call_inline): Likewise.
423 (optimize_function): Initialize id->scope_stmt to something useful.
424 (remap_block): Assume id->scope_stmt has a useful value.
426 1999-12-15 Nathan Sidwell <nathan@acm.org>
428 * typeck.c (build_c_cast): Expand warning message. Move pointer
429 alignment warning to after the cast. Don't warn about pointer
430 alignment when given a pointer to incomplete.
432 1999-12-15 Richard Henderson <rth@cygnus.com>
434 * cp-tree.h (make_aggr_type): Declare.
435 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
436 (make_aggr_type): New.
438 * decl.c (build_typename_type, init_decl_processing): Use it.
439 (build_ptrmemfunc_type, xref_tag): Likewise.
440 * except.c (call_eh_info): Likewise.
441 * init.c (init_init_processing): Likewise.
442 * pt.c (process_template_parm, lookup_template_class): Likewise.
443 * rtti.c (expand_class_desc): Likewise.
444 * semantics.c (begin_class_definition, finish_typeof): Likewise.
445 * tree.c (copy_template_template_parm): Likewise.
447 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
449 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
450 sizeof (struct tree_common).
452 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
454 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
455 outermost block to point to the inlined function decl.
457 * error.c (dump_decl): operator==, not operator ==.
458 (op_to_string): Likewise.
460 * decl.c (compute_array_index_type): Handle null name.
462 * decl2.c (ambiguous_decl): Fix to match comment.
463 (lookup_using_namespace): Adjust.
465 * decl2.c (import_export_class): Don't ignore dllimport.
467 1999-12-14 Mark Mitchell <mark@codesourcery.com>
469 * class.c (check_field_decls): Split out from ...
470 (finish_struct_1): ... here. Use it. Tidy.
472 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
473 * optimize.c (copy_body_r): Pass it.
474 * tree.c (remap_save_expr): Clear walk_subtrees for an
475 already-handled SAVE_EXPR.
476 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
478 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
479 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
481 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
483 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
485 * class.c (finish_base_struct): Allow multiple COM base classes
486 as well as non-COM bases as long as it's not the leftmost.
488 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
490 * lex.c (saving_parse_to_obstack): New global.
491 (reinit_parse_for_block): Use.
492 (reinit_parse_for_expr): Use.
493 (check_newline): Use.
495 1999-12-13 Mark Mitchell <mark@codesourcery.com>
497 * optimize.c (initialize_inlined_parameters): Take FN to which the
498 parameters belong as an argument.
499 (expand_call_inline): Expand calls into the parameter
500 initializations before pushing the function onto the list of
501 functions we are presently expanding.
503 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
505 * class.c (get_vtable_name): Use a literal format string and
506 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
507 (prepare_fresh_vtable): Likewise.
509 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
512 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
514 * init.c (build_vec_init): Initialize variable `try_body'.
516 * lex.c (yyerror): Don't call a variadic function with a
517 non-literal format string.
519 * optimize.c (optimize_function): Call memset, not bzero.
521 * pt.c (for_each_template_parm_r): Add static prototype.
523 1999-12-09 Andreas Jaeger <aj@suse.de>
525 * except.c (expand_throw): Add static attribute to match
528 * Makefile.in (semantics.o): Add dependency on output.h.
529 * semantics.c: Include output.h for declaration of
532 1999-12-09 Mark Mitchell <mark@codesourcery.com>
534 * decl.c (init_decl_processing): Reenable inlining on trees.
535 (finish_function): Likewise.
536 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
537 * semantics.c (simplify_aggr_init_exprs): New function.
538 (expand_body): Use it.
539 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
540 sometimes present the same sub-tree twice.
542 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
545 * semantics.c (finish_switch_cond): Do conversions here, not ...
546 * typeck.c (c_expand_start_case): Here.
548 * semantics.c (do_poplevel): Remove unused variable.
550 1999-12-06 Mark Mitchell <mark@codesourcery.com>
552 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
553 unless we're declaring the variable in question.
555 1999-12-06 Mark Mitchell <mark@codesourcery.com>
557 * decl.c (init_decl_processing): #if 0 last patch.
558 (finish_function): Likewise.
560 1999-12-05 Mark Mitchell <mark@codesourcery.com>
562 * decl.c (init_decl_processing): Set flag_inline_trees if
565 * cp-tree.h (calls_setjmp_p): Declare.
566 * decl.c (finish_function): Mark functions that call setjmp as
568 * optimize.c (calls_setjmp_r): New function.
569 (calls_setjmp_p): Likewise.
571 1999-12-04 Mark Mitchell <mark@codesourcery.com>
573 * optimize.c (expand_call_inline): Wrap the expanded call in an
574 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
577 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
579 (remap_decl): New function.
580 (remap_block): Likewise.
581 (copy_scope_stmt): Likewise.
582 (copy_body_r): Use remap_decl and copy_scope_stmt.
583 (copy_body): Use VARRAY_TOP_TREE.
584 (initialize_inlined_parameters): Likewise.
585 (declare_return_variable): Likewise.
586 (inlinable_function_p): Check flag_inline_trees.
587 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
588 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
589 parameters of the inlined function.
590 (optimize_function): Prevent recursion into partially complete
593 * cp-tree.def (SCOPE_STMT): Take one operand.
594 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
595 (SCOPE_NULLIFIED_P): Redefine.
596 (SCOPE_NO_CLEANUPS_P): New macro.
597 (add_scope_stmt): Change prototype.
598 * decl.c (poplevel): Tidy. Warn about unused variables here.
599 Record SCOPE_STMT_BLOCKs.
600 (finish_function): Keep DECL_INITIAL for functions that might be
602 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
603 * semantics.c: Include rtl.h.
604 (add_scope_stmt): Return the new scope statement and, for an
605 end-of-scope statement, its matching begin statement. Don't set
607 (do_pushlevel): Simplify, now that we are always
609 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
610 (expand_stmt): Don't call expand_start_bindings or
611 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
612 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
614 * Makefile.in (semantics.o): Depend on RTL_H.
616 * decl2.c (pending_statics_used): Make it a macro.
617 (saved_inlines_used): Likewise.
618 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
619 (mark_inline_for_output): Likewise.
620 (ssdf_decls_used): Remove.
621 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
622 (generate_ctor_or_dtor_function): Adjust accordingly.
624 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
625 Greg McGary <gkm@gnu.org>
627 * decl.c (duplicate_decls): Merge
628 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
629 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
631 1999-12-02 Mike Stump <mrs@wrs.com>
633 * init.c (perform_member_init): Handle parse errors better.
635 1999-12-01 Mark Mitchell <mark@codesourcery.com>
637 * cp-tree.h (min_tree_cons): Remove.
638 (scratch_ovl_cons): Likewise.
639 * decl.c (saveable_obstack): Don't declare.
640 (duplicate_decls): Tweak error-message.
641 (initialize_local_var): Explicitly mark the definition as static.
642 (finish_function): Call permanent_allocation, just so
643 that the middle-end sees the obstacks it expects.
644 (mark_cp_function_context): Likewise.
645 * init.c (build_new): Don't use min_tree_cons.
646 * lex.c (permanent_obstack): Don't declare.
647 (current_obstack, saveable_obstack): Likewise.
648 * spew.c (current_obstack, saveable_obstack): Likewise.
649 * tree.c (current_obstack, saveable_obstack): Likewise.
650 (scratch_ovl_cons): Remove.
651 (build_min_nt): Don't mess with obstacks.
652 (build_min): Likewise.
653 (min_tree_cons): Remove
654 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
655 (build_x_function_call): Likewise.
656 (build_c_cast): Don't use min_tree_cons.
658 1999-11-29 Mark Mitchell <mark@codesourcery.com>
660 * pt.c (tsubst_decl): Robustify.
662 1999-11-27 Mark Mitchell <mark@codesourcery.com>
664 * decl2.c (finish_file): Call expand_body for inline functions
665 that will be written out but that do not yet have RTL.
666 * semantics.c (expand_body): Do not generate RTL For inline
667 functions that do not yet need to be written out.
669 1999-11-25 Mark Mitchell <mark@codesourcery.com>
671 * Make-lang.in (CXX_SRCS): Add optimize.c.
672 * Makefile.in (CXX_OBJS): Add optimize.o.
673 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
674 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
675 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
676 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
677 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
679 (optimize.o): New target.
680 * class.c: Don't include splay-tree.h.
681 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
682 * cp-tree.h: Include splay-tree.h.
683 (DECL_UNINLINABLE): New macro.
684 (CTOR_BEGIN_P, CTOR_END_P): New macros.
685 (flag_inline_trees): New variable.
686 (local_variable_p): New function.
687 (nonstatic_local_decl_p): Likewise.
688 (optimize_function): Likewise.
689 (cplus_unsave_expr_now): Remove.
690 (copy_tree_r): Declare.
691 (remap_save_expr): Likewise.
692 * decl.c (local_variable_p): Don't
694 (local_variable_p_walkfn): New function.
695 (make_rtl_for_local_static): Remove code to try to avoid writing
696 out static constants.
697 (emit_local_var): Fix indentation.
698 (nonstatic_local_decl_p): New function.
699 (check_default_argument): Use local_variable_p_walkfn, not
700 local_variable_p, when walking the tree.
701 (start_function): Set the DECL_CONTEXT for automatically generated
703 (finish_constructor_body): Use CTOR_STMT to mark the end of a
705 * decl2.c: Don't include splay-tree.h.
706 (flag_inline_trees): Define.
707 * dump.c: Don't include
709 * except.c (expand_end_catch_block): Fix comment formatting.
710 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
711 (expand_throw): Tidy comment.
712 * init.c (build_vec_delete_1): Use create_temporary_var.
713 * lex.c (cplus_tree_code_type): Make it static.
714 (cplus_tree_code_length): Likewise.
715 (cplus_tree_code_name): Likewise.
716 * optimize.c: New file.
717 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
719 (setup_vtbl_ptr): Mark the beginnings of constructors with
721 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
722 (expand_body): Call optimize_function. Save bodies if we're doing
724 * tree.c: Don't include splay-tree.h. Include insn-config.h and
726 (copy_tree_r): Make it public.
727 (statement_code_p): New function.
728 (mark_local_for_remap_r): Likewise.
729 (cp_usave_r): Likewise.
730 (cp_unsave): Likewise.
731 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
732 (walk_tree): Walk into `s' class nodes. Walk statement chains.
733 (copy_tree_r): Handle 's' class nodes. Restore chains for
734 statements. Nullify scopes. Don't copy types.
735 (init_tree): Set lang_unsave to cp_unsave.
736 (remap_save_expr): Define.
737 * ir.texi: Document CTOR_STMT.
739 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
741 * search.c (note_debug_info_needed): Do perform this optimization
743 (maybe_suppress_debug_info): Likewise. Start by clearing
744 TYPE_DECL_SUPPRESS_DEBUG.
746 1999-11-24 Mark Mitchell <mark@codesourcery.com>
748 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
750 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
752 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
754 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
755 function with a non-literal format string.
757 * lex.c (do_identifier): Likewise.
759 * typeck.c (build_unary_op): Likewise.
761 1999-11-23 Mark Mitchell <mark@codesourcery.com>
763 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
765 1999-11-22 Mark Mitchell <mark@codesourcery.com>
767 * cp-tree.def (CTOR_COMPLETE): New tree node.
768 * decl.c (finish_constructor_body): Add it, to mark the end of the
770 (finish_function): Don't call end_protect_partials here.
771 * ir.texi (CTOR_COMPLETE): Document it.
772 * semantics.c (expand_stmt): Handle it.
774 * cp-tree.def (FUNCTION_NAME): New tree node.
775 * cp-tree.h (current_function_name_declared): Tweak documentation.
776 (lang_decl_flags): Add pretty_function_p, adjust dummy.
777 (DECL_PRETTY_FUNCTION_P): New macro.
778 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
779 etc., in a template function. Use at_function_scope_p instead of
781 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
783 (tsubst): Handle FUNCTION_NAME.
784 (tsubst_copy): Likewise.
785 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
786 etc. in instantiation.
787 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
788 even in template functions.
789 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
790 conditional scope at the top of a destructor.
792 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
795 1999-11-22 Nathan Sidwell <nathan@acm.org>
797 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
798 when actually negative.
800 * typeck.c (convert_for_assignment): Expand comment about
801 strange NULL check, moved from ...
802 (convert_for_initialization): ... here. Remove unneeded
805 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
807 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
808 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
809 Always destruct virtual bases of array components, but never
811 (build_vec_init): Adjust invocations.
812 (build_delete): Likewise.
813 * decl2.c (delete_sanity): Likewise.
815 1999-11-19 Nathan Sidwell <nathan@acm.org>
817 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
818 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
819 * decl2.c (grok_method_quals): Accept `restrict' as applying to
820 the object pointer. Return such qualifiers.
821 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
824 1999-11-18 Mark Mitchell <mark@codesourcery.com>
826 * except.c (expand_end_catch_block): Fix typo.
827 (expand_exception_blocks): Simplify. Don't call
828 expand_leftover_cleanups.
830 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
832 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
833 * pt.c (tsubst, case INTEGER_TYPE): Call it.
834 Check uses_template_parms.
836 * class.c (finish_struct): If we're a local class in a template
837 function, add a TAG_DEFN.
838 * pt.c (lookup_template_class): If this is a local class in a
839 template function, call pushtag.
840 (tsubst_expr, case TAG_DEFN): Handle classes, too.
842 Emit debug info with the vtable.
843 * search.c (maybe_suppress_debug_info): New function...
844 * class.c (finish_struct_1): ...split out from here.
845 * cp-tree.h: Declare it.
846 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
847 if we're writing out the vtable.
848 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
849 note_debug_info_needed): #if 0 out.
851 1999-11-14 Mark Mitchell <mark@codesourcery.com>
853 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
854 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
856 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
857 * decl2.c (lookup_arg_dependent): Use it.
859 * cp-tree.h (cp_finish_decl): Change prototype.
860 (finish_static_data_member_decl): Likewise.
861 (push_permanent_obstack): Remove declaration.
862 (push_expression_obstack): Likewise.
863 (push_scratch_obstack): Likewise.
864 (DECL_TEMPLATE_PARM_P): Robustify.
865 (SET_DECL_TEMPLATE_PARM_P): New macro.
866 * class.c (add_method): Don't manipulate obstacks.
867 (finish_vtbls): Likewise.
868 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
869 * decl.c (binding_for_name): Don't manipulate obstacks.
870 (maybe_push_to_top_level): Likewise.
871 (pop_from_top_level): Likewise.
872 (duplicate_decls): Likewise.
873 (pushdecl): Likewise.
874 (implicitly_declare): Likewise.
875 (build_typename_type): Likewise.
876 (start_decl): Likewise.
877 (cp_finish_decl): Likewise.
878 (finish_decl): Likewise.
879 (destroy_local_static): Likewise.
880 (expand_static_init): Likewise.
881 (complete_array_type): Likewise.
882 (grokvardecl): Likewise.
883 (build_ptrmemfnc_type): Likewise.
884 (grokdeclarator): Likewise.
885 (xref_tag): Likewise.
886 (xref_basetypes): Likewise.
887 (start_enum): Likewise.
888 (finish_enum): Likewise.
889 (start_function): Likewise.
890 (finish_function): Likewise.
891 (start_method): Adjust call to cp_finish_decl.
892 * decl2.c (finish_static_data_member_decl): Don't manipulate
894 (grokfield): Likewise.
895 (grokbitfield): Likewise.
896 (get_temp_name): Likewise.
897 (get_sentry): Likewise.
898 (fnish_file): Likewise.
899 (lookup_arg_dependent): Likewise.
900 * except.c (call_eh_info): Likewise.
901 (push_eh_info): Likewise.
902 (do_pop_exception): Likewise.
903 (initialize_handler_parm): Likewise.
904 (expand_end_eh_spec): Likewise.
905 (alloc_eh_object): Likewise.
906 (expand_throw): Likewise.
907 * expr.c (extract_scalar_init): Likewise.
908 * init.c (build_java_class_ref): Likewise.
909 * lex.c (get_time_identifier): Likewise.
910 (snarf_defarg): Likewise.
911 (add_defarg_fn): Likewise.
912 (is_global): Simplify.
913 (do_identifier): Don't check TREE_PERMANENT.
914 * method.c (emit_thunk): Don't manipulate obstacks.
915 * parse.y (condition): Adjust call to cp_finish_decl.
918 (initdcl0_innards): Likewise.
919 (nomods_initdcl0): Likewise.
920 * pt.c (push_inline_template_parms_recursive): Use
921 SET_DECL_TEMPLATE_PARM_P.
922 (process_template_parm): Likewise.
923 (lookup_template_class): Don't manipulate obstacks.
924 (instantiate_class_template): Adjust call to
925 finish_static_data_member_decl.
926 (tsubst_decl): Don't manipulate obstacks.
927 (tsubst_expr): Likewise.
928 (instantiate_template): Likewise.
929 (instantiate_decl): Adjust calls to cp_finish_decl.
930 * rtti.c (call_void_fn): Don't manipulate obstacks.
931 (get_tinfo_var): Likewise.
932 (get_tinfo_fn_unused): Likewise.
933 (build_dynamic_cast_1): Likewise.
934 (expand_si_desc): Likewise.
935 (expand_class_desc): Likewise.
936 (expand_ptr_desc): Likewise.
937 (expand_attr_desc): Likewise.
938 (expand_generic_desc): Likewise.
939 (synthesize_tinfo_fn): Likewise.
940 * search.c (expand_upcast_fixups): Likewise.
941 * semantics.c (finish_asm_stmt): Likewise.
942 (finish_named_return_value): Likewise.
943 (begin_class_definition): Likewise.
944 (finish_class_definition): Likewise.
945 (finish_typeof): Likewise.
946 * tree.c (build_cplus_method_type): Likewise.
947 (reverse_path): Likewise.
948 (copy_template_template_parm): Likewise.
949 (build_expr_ptr_wrapper): Likewise.
950 (push_expression_obstack): Remove.
951 (push_permanent_obstack): Likewise.
952 * typeck.c (mark_addressable): Likewise.
954 1999-11-13 Mark Mitchell <mark@codesourcery.com>
956 * call.c (build_conditional_expr): Use build_target_expr_with_type.
957 (convert_like): Likewise.
958 (build_over_call): Likewise.
959 * cp-tree.h (build_target_expr): Remove.
960 (build_target_expr_with_type): New function.
961 * cvt.c (build_up_reference): Use get_target_expr.
962 * decl.c (build_target_expr): Move to ...
963 * tree.c (build_target_expr): Here. Make it static.
964 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
965 the temporary VAR_DECLs.
966 (get_target_expr): Use it.
968 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
970 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
971 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
972 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
973 * class.c (set_rtti_entry): Use it.
975 1999-11-12 Mark Mitchell <mark@codesourcery.com>
977 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
979 * semantics.c (finish_expr_stmt): Call it here instead. Move
980 default_conversion logic to semantic-analysis time.
982 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
984 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
986 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
988 * init.c (init_init_processing): Re-instated Nov 11 patch after
991 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
993 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
994 Patch had not been approved yet.
996 1999-11-12 Mark Mitchell <mark@codesourcery.com>
998 * decl.c (compute_array_index_type): New function, split out from
1000 (create_array_type_for_decl): Likewise.
1001 (grokdeclarator): Use them.
1003 * semantics.c (expand_stmt): Don't suspend_momentary or
1006 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
1008 * init.c (init_init_processing): Header information for
1009 arrays allocated via `new' should have the same alignment used by
1012 1999-11-10 Mark Mitchell <mark@codesourcery.com>
1014 * error.c (dump_function_name): Don't crash if given a friend
1015 pseudo-instantiation.
1017 * cp-tree.h (build_enumerator): Change prototype.
1018 * decl.c (enum_next_value): Remove.
1019 (enum_overflow): Likewise.
1020 (init_decl_processing): Don't register enum_next_value as a root.
1021 (start_enum): Clear TYPE_VALUES for a redefined enum.
1022 (finish_enum): Reset the type of enumeration constants.
1023 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
1024 we don't need to. Maintain the TYPE_VALUES list and look there
1025 for the previously defined enumeration constant. Let enumeration
1026 constants have the type of their values until the enumeration type
1028 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
1030 * parse.c: Regenerated.
1031 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
1033 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
1034 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1036 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
1038 1999-11-09 Mark Mitchell <mark@codesourcery.com>
1040 * cp-tree.h (language_function): Remove x_last_dtor_insn and
1041 x_last_parm_cleanup_insn.
1042 * decl.c (last_dtor_insn): Remove.
1043 (last_parm_cleanup_insn): Likewise.
1044 (expand_start_early_try_stmts): Don't set them.
1045 (store_parm_decls): Likewise.
1046 (save_function_data): Or save them.
1047 (mark_lang_function): Or mark them.
1049 1999-11-08 Mark Mitchell <mark@codesourcery.com>
1051 * decl.c (store_parm_decls): Generate cleanup code at
1052 semantic-analysis time. Destroy objects in the correct order.
1054 1999-11-07 Mark Mitchell <mark@codesourcery.com>
1056 * cp-tree.h (begin_new_placement): Remove.
1057 (finish_new_placement): Likewise.
1058 * class.c (finish_struct_1): Don't suspend_momentary or
1060 * decl.c (grokdeclarator): Likewise.
1061 (maybe_build_cleanup_1): Likewise.
1062 * except.c (push_eh_cleanup): Likewise.
1063 (build_terminate_handler): Likewise.
1064 * init.c (build_new_1): Likewise.
1065 * parse.y (parse_decl): Change prototype.
1066 (initdecls, notype_initdecls, initdcl): Don't return int.
1067 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
1068 (.begin_new_placement): Remove.
1069 (.finish_new_placement): Likewise.
1070 (nonmomentary_expr): Likewise.
1071 (suspend_mom): Likewise.
1072 (condition): Don't suspend_momentary, resume_momentary, or keep
1073 track of need to resume.
1074 (unary_expr): Likewise.
1075 (new_placement): Likewise.
1077 (structsp): Likewise.
1078 (new_type_id): Likewise.
1079 (maybe_parmlist): Likewise.
1080 (direct_after_type_declaration): Likewise.
1081 (direct_new_declarator): Likewise.
1082 (direct_abstract_declaration): Likewise.
1083 * parse.c: Regenerated.
1084 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
1085 * semantics.c (begin_new_placement): Remove.
1086 (finish_new_placement): Likewise.
1088 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1090 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
1091 (DECL_TEMPLATE_INFO): Use it.
1092 * decl.c (warn_extern_redeclared_static): Do nothing for
1094 * decl2.c (mark_used): Explicitly check for function or variable.
1095 * semantics.c (finish_unary_op_expr): Check whether result is also
1098 1999-11-05 Mark Mitchell <mark@codesourcery.com>
1100 * Makefile.in (typeck2.o): Depend on output.h.
1101 * typeck2.c: Include output.h.
1103 * decl.c (flag_ansi): Remove declaration.
1105 * pt.c (tinst_level_tick): Make it static.
1106 (last_template_error_tick): Likewise.
1108 * cp-tree.h (mapcar): Remove declaration.
1109 (search_tree): Likewise.
1110 (walk_tree_fn): New typedef.
1111 (walk_tree): New function.
1112 * tree.c (bot_manip): Change prototype. Adjust to be called via
1114 (bot_replace): Likewise.
1115 (no_linkage_helper): Likewise.
1116 (copy_tree_r): New function.
1117 (search_tree): Rename, and adjust, to become ...
1118 (walk_tree): New function.
1120 (target_remap): Remove.
1121 (target_remap_count): Likewise.
1122 (break_out_target_exprs): Use walk_tree.
1123 * decl.c (local_variable_p): Change prototype.
1124 (check_default_argument): Use walk_tree.
1125 * pt.c (for_each_template_parm_r): New function, split out from ...
1126 (for_each_template_parm): Here. Use it, via walk_tree.
1128 1999-11-03 Mark Mitchell <mark@codesourcery.com>
1130 * class.c (check_bitfield_decl): New function, split out from
1132 (check_field_decl): Likewise. Recursively examine members of
1134 (finish_struct_1): Use them.
1135 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
1137 1999-11-02 Mark Mitchell <mark@codesourcery.com>
1139 * decl.c (grokfndecl): Remove dead code.
1141 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
1143 1999-11-02 Scott Snyder <snyder@fnal.gov>
1145 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
1147 * pt.c (tsubst_copy): Likewise.
1149 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
1151 * decl2.c (maybe_make_one_only): Always make things comdat on
1154 1999-10-31 Mark Mitchell <mark@codesourcery.com>
1156 * decl.c (finish_function): Call free_after_parsing for functions
1157 we are not immediately turning into RTL.
1159 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
1161 * cp-tree.h (flag_dump_translation_unit): Add decl.
1163 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
1165 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
1167 1999-10-30 Mark Mitchell <mark@codesourcery.com>
1169 * decl.c (pop_cp_function_context): Don't call free on a NULL
1171 * semantics.c: Include ggc.h.
1172 (expand_body): Do garbage-collection after processing a template
1173 function. Clear DECL_SAVED_TREE after generating RTL for a
1175 * Makefile.in (semantics.o): Depend on ggc.h.
1177 1999-10-29 Mark Mitchell <mark@codesourcery.com>
1179 * cp-tree.h (make_typename_type): Change prototype.
1180 * decl.c (make_typename_type): Only complain if so requested.
1181 * parse.y (nested_name_specifier): Adjust calls.
1182 (typename_sub0): Likewise.
1183 (typename_sub1): Likewise.
1184 * parse.c: Regenerated.
1185 * pt.c (convert_template_argument): Pass complain to
1189 1999-10-28 Mark Mitchell <mark@codesourcery.com>
1191 * semantics.c (finish_handler): End the scope of the handler
1192 before attaching it to the statement-tree.
1194 1999-10-28 Ian Lance Taylor <ian@zembu.com>
1196 * rtti.c (build_dynamic_cast_1): Give a better error message for
1197 an attempt to dynamic_cast from a non-polymorphic type.
1199 1999-10-27 Mark Mitchell <mark@codesourcery.com>
1201 * cp-tree.h (make_temp_vec): Remove.
1202 (make_scratch_vec): Likewise.
1203 * call.c (add_function_candidate): Use make_tree_vec.
1204 (add_conv_candidate): Likewise.
1205 (build_builtin_candidate): Likewise.
1206 (add_template_candidate_real): Likewise.
1207 * class.c (resolve_address_of_overloaded_function): Likewise.
1208 * decl.c (start_function): Don't fool with the momentary obstack.
1209 (finish_function): Likewise.
1210 * init.c (expand_direct_vtbls_init): Likewise.
1211 (begin_init_stmts): Likewise.
1212 (finish_init_stmts): Likewise.
1213 * pt.c (add_to_template_args): Use make_tree_vec.
1214 (check_explicit_specialization): Likewise.
1215 (coerce_template_parms): Likewise.
1216 (lookup_template_class): Don't fool with the momentary obstack.
1217 (instantiate_class_template): Likewise.
1218 (tsubst_template_arg_vector): Use make_tree_vec.
1219 (tsubst_aggr_type): Don't fool with the momentary obstack.
1220 (tsubst_decl): Likewise. Use make_tree_vec.
1221 (try_one_overload): Likewise.
1222 (try_class_unification): Don't fool with the momentary obstack.
1223 (get_bindings_real): Use make_tree_vec.
1224 (set_mangled_name_for_template_decl): Likewise.
1225 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
1226 * semantics.c (finish_expr_stmt): Likewise.
1227 (finish_do_stmt): Likewise.
1228 (finish_for_expr): Likewise.
1229 (finish_switch_cond): Likewise.
1230 (do_pushlevel): Likewise.
1231 (do_poplevel): Likewise.
1232 * tree.c (make_temp_vec): Remove.
1234 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
1235 CLEANUP_P for a TRY_BLOCK.
1236 * ir.texi: Document SAVE_EXPR.
1238 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
1240 * call.c (build_over_call): Check that the built-in function is
1241 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
1242 * typeck.c (build_function_call_real): Similarly.
1244 1999-10-26 Mark Mitchell <mark@codesourcery.com>
1246 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
1249 1999-10-24 Mark Mitchell <mark@codesourcery.com>
1251 * decl.c (push_overloaded_decl_1): Use pushdecl.
1253 * decl.c (auto_function): Replace #ifdef'd __inline with just
1255 * lex.c (my_get_run_time): Likeise.
1256 (yyprint): Likewise.
1257 (identifier_type): Likewise.
1258 * method.c (start_squangling): Likewise.
1259 (end_squangling): Likewise.
1261 (old_backref_index): Likewise.
1262 (flush_repeats): Likewise.
1263 (issue_ktype): Likewise.
1264 * parse.y (empty_parms): Likewise.
1265 * parse.c: Regenerated.
1267 1999-10-21 Mark Mitchell <mark@codesourcery.com>
1269 * dump.c (dequeue_and_dump): Replace several uses of
1270 queue_and_dump_index with dump_child.
1272 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1274 * expr.c: Include tm_p.h.
1276 1999-10-21 Mark Mitchell <mark@codesourcery.com>
1278 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
1279 (pushlevel_temporary): Remove.
1280 (add_scope_stmt): New function.
1281 * decl.c (pushlevel_temporary): Remove.
1282 (poplevel): Use add_scope_stmt.
1283 (start_decl_1): Likewise.
1284 * semantics.c (add_scope_stmt): New function.
1285 (do_pushlevel): Use it.
1286 (do_poplevel): Use it.
1287 (expand_stmt): Check SCOPE_PARTIAL_P.
1289 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
1290 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
1291 * expr.c (cplus_expand_expr): Expand it.
1292 * ir.texi: Document EMPTY_CLASS_EXPR.
1294 1999-10-20 Mark Mitchell <mark@codesourcery.com>
1296 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
1297 parameters as having namespace scope.
1299 1999-10-19 Mark Mitchell <mark@codesourcery.com>
1301 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
1302 (mangling_flags): New type.
1303 (build_overload_int): Change prototype.
1304 (build_overload_value): Likewise.
1305 (numeric_output_need_bar): Improve comment.
1306 (mangle_expression): New function, broken out from ...
1307 (build_overload_int): Here.
1308 (build_overload_value): Adjust for use of mangling flags. Don't
1309 warn about real-valued template parameters here. Do handle
1310 complex expressions involving real-valued template parameters.
1311 (build_template_parm_names): Encase non-type template parameters
1312 in underscores, if necessary.
1313 (process_overload_item): Remove conditional on
1314 PARM_CAN_BE_ARRAY_TYPE.
1316 1999-10-17 Mark Mitchell <mark@codesourcery.com>
1318 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
1320 * ir.texi: Clean up documentation of RETURN_INIT.
1322 1999-10-15 Greg McGary <gkm@gnu.org>
1324 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
1325 (lang_init): Set default for flag_bounds_check if still "unspecified".
1327 1999-10-13 Andrew Haley <aph@cygnus.com>
1329 * class.c (finish_struct_1): Force alignment of non-bitfields to
1332 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
1334 * typeck2.c (process_init_constructor): Handle empty constructors.
1336 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
1338 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
1340 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
1343 1999-10-13 Mark Mitchell <mark@codesourcery.com>
1345 * decl.c (make_rtl_for_local_static): Don't create register RTL
1346 for addressable constants.
1348 1999-10-13 Nathan Sidwell <nathan@acm.org>
1350 * cp-tree.h (build_x_va_arg): Prototype new function.
1351 * call.c (build_x_va_arg): Define it.
1352 * parse.y (unary_expr): Call build_x_va_arg.
1354 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
1355 * call.c (convert_type_from_ellipsis): Define it.
1356 * decl.c (init_decl_processing): Set lang_type_promotes_to.
1358 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
1360 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
1362 * class.c (fixed_type_or_null): Always set *nonnull.
1364 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1366 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
1367 __GNUC__ and __GNUC_MINOR__.
1369 1999-10-09 Mark Mitchell <mark@codesourcery.com>
1371 * cp-tree.h (make_rtl_for_local_static): New function.
1372 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
1374 (make_rtl_for_local_static): Here.
1375 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
1377 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1379 * method.c: Include tm_p.h.
1381 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1383 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
1384 * lex.c (cp_make_lake_type): Likewise.
1385 * tree.c (init_tree): Init make_lang_type_fn.
1387 1999-10-07 Mark Mitchell <mark@codesourcery.com>
1389 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
1392 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
1393 local statics if we don't really have them.
1395 * ir.texi: Improve documentation for STMT_EXPR. Describe
1398 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
1400 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
1402 1999-10-07 Greg McGary <gkm@gnu.org>
1404 * class.c (finish_struct_1): Use simpler method of
1405 removing elements of a singly-linked list which doesn't
1406 lose for classes without data members.
1408 1999-10-07 Mark Mitchell <mark@codesourcery.com>
1410 * friend.c (make_friend_class): Robustify.
1412 * semantics.c (finish_object_call_expr): Reject calls to template
1415 1999-10-06 Mark Mitchell <mark@codesourcery.com>
1417 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
1419 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
1420 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
1422 * class.c (get_vfield_offset): Likewise.
1423 (finish_base_struct): Likewise.
1424 (modify_one_vtable): Likewise.
1425 (fixup_vtable_deltas): Likewise.
1426 (finish_struct_1): Likewise.
1427 * init.c (expand_virtual_init): Likewise.
1428 * search.c (lookup_field_1): Likewise.
1429 (expand_upcast_fixups): Likewise.
1430 * typeck.c (build_component_ref): Likewise.
1431 (build_binary_op_nodefault): Likewise.
1433 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
1434 * ir.texi: Document TYPE_VFIELD.
1436 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
1438 * decl.c (grokdeclarator): Only warn about non-zero arrays if
1439 !in_system_header (linux socketbits.h can give this for
1440 __cmsg_data, which is using a GNU extension).
1442 1999-10-05 Mark Mitchell <mark@codesourcery.com>
1444 * decl2.c (start_static_storage_duration_function): Push the
1445 function declaration so it ends up in namespace scope.
1447 * dump.c (DUMP_CHILDREN): Remove.
1448 (DUMP_BINFO): Adjust.
1449 (struct dump_node_info): Remove dump_children_p.
1450 (queue_and_dump_type): Remove dump_children_p parameter.
1451 (queue): Don't set dump_children_p.
1452 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
1453 queue_and_dump_index.
1454 (dequeue_and_dump): Unconditionally print children. Adjust calls
1455 to functions mentioned above.
1456 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
1458 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
1459 * dump.c (dequeue_and_dump): Dump them.
1461 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
1463 * decl.c (start_function): Set current_in_charge_parm for
1464 constructors, too, where appropriate.
1465 * search.c (fixup_all_virtual_upcast_offsets): New function.
1466 (expand_indirect_vtbls_init): Use it.
1468 1999-10-04 Nathan Sidwell <nathan@acm.org>
1470 * decl2.c (grok_alignof): Don't decay lvalues.
1472 * init.c (build_new): Remove unused variable.
1474 1999-10-04 Mark Mitchell <mark@codesourcery.com>
1476 * cp-tree.h (struct language_function): Remove static_labelno.
1477 (static_labelno): Remove macro.
1478 * method.c (build_overload_nested_name): Make static_labelno
1481 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
1482 to decide whether or not a function is defined.
1484 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
1485 situations where make_node will do it automatically.
1486 * decl.c (grok_reference_init): Likewise.
1487 (expand_static_init): Likewise.
1488 (do_static_initialization): Likewise.
1489 * init.c (perform_member_init): Likewise.
1490 (expand_aggr_init_1): Likewise.
1491 (build_new_1): Likewise.
1492 * method.c (do_build_copy_constructor): Likewise.
1493 (do_build_assign_ref): Likewise.
1494 * search.c (expand_upcast_fixups): Likewise.
1495 * semantics.c (finish_stmt_expr): Likewise.
1496 * typeck.c (build_unary_op): Likewise.
1497 (check_return_expr): Likewise.
1499 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
1501 * init.c (build_vec_delete_1): Fold COND_EXPRs.
1503 1999-10-03 Mark Mitchell <mark@codesourcery.com>
1505 * cp-tree.def (VEC_INIT_EXPR): Remove.
1506 * cp-tree.h (struct stmt_tree): New type.
1507 (struct saved_scope): Remove firstobj. Add x_saved_tree,
1509 (class_cache_firstobj): Remove.
1510 (struct language_function): Remove stmts_are_full_exprs_p,
1511 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
1512 (current_stmt_tree): New macro.
1513 (last_tree): Adjust.
1514 (last_expr_type): Likewise.
1515 (doing_semantic_analysis_p): Simplify.
1516 (stmts_are_full_exprs_p): Adjust.
1517 (begin_tree): Remove prototype.
1518 (end_tree): Likewise.
1519 (begin_stmt_tree): Change prototype.
1520 (finish_stmt_tree): Likewise.
1521 (building_stmt_tree): Simplify.
1522 * decl.c (mark_stmt_tree): New function.
1523 (mark_saved_scope): Use it.
1524 (start_function): Rearrange slightly to call begin_stmt_tree
1526 (save_function_data): Tweak.
1527 (finish_function): Adjust call to finish_stmt_tree.
1528 (mark_lang_function): Use mark_stmt_tree.
1529 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
1530 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
1531 (build_vec_init): Remove creation of stand-in intializer.
1532 * pt.c (begin_tree): Remove.
1533 (end_tree): Likewise.
1534 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
1535 (begin_compound_stmt): Handle a compound-statement outside of a
1537 (begin_stmt_expr): Handle a statement-expression outsidef of a
1539 (finish_stmt_expr): Likewise.
1540 (begin_class_definition): Don't call begin_tree.
1541 (finish_inline_definitions): Don't call end_tree.
1542 (begin_stmt_tree): Take a pointer to tree, not a function as input.
1543 (finish_stmt_tree): Likewise.
1544 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
1547 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
1548 * parse.c: Regenerated.
1550 * dump.c (dqueue_and_dump): Dump bitfieldness.
1552 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
1553 bitfields, rather than DECL_BIT_FIELD.
1554 * ir.texi: Document how to tell whether or not a field is a
1557 * lex.c (make_lang_type): Fix typo in comment.
1559 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
1561 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
1563 1999-10-01 Mark Mitchell <mark@codesourcery.com>
1565 * pt.c (tsubst_decl): If the type of a template instantiation is
1566 bogus, so is the whole instantiation.
1568 1999-09-30 Mark Mitchell <mark@codesourcery.com>
1570 * decl.c (initialize_local_var): Handle static variables here.
1571 (cp_finish_decl): Tweak handling of function-scope static
1573 * semantics.c (expand_stmt): Handle DECL_STMTs for static
1576 * method.c (emit_thunk): Don't crash when -fsyntax-only.
1578 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
1579 global_dtor_p. Add init_priority.
1580 (DECL_ACCESS): Adjust accordingly.
1581 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
1582 (GLOBAL_INIT_PRIORITY): Likewise.
1583 * decl.c (lang_mark_tree): Adjust accordingly.
1584 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
1585 and GLOBAL_INIT_PRIORITY.
1586 * dump.c (dequeue_and_dump): Print them.
1587 * ir.texi: Document them.
1589 * decl2.c (struct priority_info_s): Remove initialization_sequence
1590 and destruction_sequence.
1591 (start_static_storage_duration_function): Return the body of the
1592 function. Convert for function-at-a-time mode.
1593 (generate_inits_for_priority): Remove.
1594 (finish_static_storage_duration_function): Change prototype.
1595 Adjust for function-at-a-time mode.
1596 (do_static_initialization): Likewise.
1597 (do_static_destruction): Likewise.
1598 (do_static_initialization_and_destruction): Remove.
1599 (start_static_initialization_or_destruction): New function.
1600 (finish_static_initialization_or_destruction): Likewise.
1601 (get_priority_info): Don't manipulation initialization_sequence or
1602 destruction_sequence.
1603 (prune_vars_needing_no_initialization): New function.
1604 (write_out_vars): Likewise.
1605 (finish_file): Use the various new functions instead of the old.
1607 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
1609 * cp-tree.h (warn_float_equal): Declare.
1610 * decl2.c (warn_float_equal): Define.
1611 (lang_decode_option): Recognize -W[no-]float-equal.
1612 * typeck.c (build_binary_op_nodefault): Conditionally warn
1613 about equality tests of floating point types.
1615 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
1617 Support normal type_info-based EH mechanisms with -fno-rtti.
1618 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
1619 (build_eh_type_type_ref): Likewise.
1620 (build_eh_type): Remove.
1621 (expand_throw): Call build_eh_type_type, not build_eh_type.
1622 * decl2.c (import_export_decl): Don't associate the tinfo fn with
1623 the vtable if -fno-rtti.
1624 * decl.c (init_decl_processing): Always init_rtti_processing.
1626 * rtti.c (get_typeid): Don't complain about -fno-rtti.
1628 * class.c (class_cache_obstack, class_obstack): Remove.
1629 (init_class_processing): Don't initialize class_obstack.
1630 (push_cache_obstack): Remove.
1631 (pushclass): Don't call it.
1632 * cp-tree.h: Remove prototype for push_cache_obstack.
1633 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
1634 (pushlevel_class): Don't push_decl_level.
1635 (poplevel_class): Don't pop_stack_level.
1636 (push_class_level_binding): Don't push_cache_obstack.
1637 (init_decl_processing): Don't intialize decl_obstack.
1638 * search.c (push_class_decls): Don't push_cache_obstack.
1639 * tree.c (list_hash_add): Put hash node on permanent_obstack.
1640 (hash_tree_cons): Don't mess with obstacks.
1641 (print_lang_statistics): Don't print stats for class_obstack and
1644 1999-09-29 Mark Mitchell <mark@codesourcery.com>
1646 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
1647 * ir.texi: Document DECL_EXTERNAL.
1649 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
1650 * ir.texi: Document THUNK_DECLs.
1652 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
1653 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1654 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1655 * error.c (dump_template_bindings): Remove unused parameter.
1656 Handle multiple levels of template parameters.
1657 (dump_template_decl): Use `parms', not `args', for template
1658 parameters. Fix thinko.
1659 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
1660 flags to dump_template_bindings.
1661 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
1662 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1663 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1664 (tsubst_copy): Clarify variable name.
1665 (most_general_template): Robustify.
1667 1999-09-29 Nathan Sidwell <nathan@acm.org>
1669 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
1670 to change primary template rendering.
1672 1999-09-29 Mark Mitchell <mark@codesourcery.com>
1674 * cp-tree.h (UPT_TEMPLATE): Remove.
1675 (UPT_PARMS): Likewise.
1676 (DECL_NEEDED_P): New macro.
1677 * decl2.c (finish_vtable_vardecl): Use it.
1678 (finish_objects): Don't crash with -fsyntax-only.
1679 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
1681 * pt.c (tsubst_friend_function): Remove FIXME that talks about
1683 (tsubst_expr): Correct handling of function try-blocks.
1684 * semantics.c: Include flags.h.
1685 (expand_body): Don't do RTL generation if -fsyntax-only.
1686 * Makefile.in (semantics.o): Depends on flags.h.
1688 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
1690 * pt.c (most_general_template): Adjust declaration.
1692 * cp-tree.h: (most_general_template): Declare.
1694 * error.c (dump_template_value): Rename to ...
1695 (dump_template_argument): This.
1696 (dump_template_argument_list): New function.
1697 (dump_type): Use it.
1698 (dump_template_parameter): New function.
1699 (dump_template_decl): Use it.
1700 (dump_template_bindings): New function.
1701 (dump_function_decl): Use it. Pretty print function template
1704 1999-09-28 Nathan Sidwell <nathan@acm.org>
1706 * decl.c (grokdeclarator): Distinguish parameter context for
1707 diagnostics. Tidy up missing type diagnostic.
1708 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
1710 1999-09-28 Mark Mitchell <mark@codesourcery.com>
1712 * ir.texi: Improve documentation for TARGET_EXPR.
1714 1999-09-27 Nathan Sidwell <nathan@acm.org>
1716 Augment stringification of trees.
1717 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
1718 (fndecl_as_string, type_as_string_real, args_as_string,
1719 code_as_string, language_as_string, parm_as_string,
1720 op_as_string, assop_as_string, cv_as_string): Remove.
1721 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
1722 (context_as_string): Declare new function.
1723 * error.c (cp_printers): Move definition.
1725 (OB_END_TEMPLATE_ID): Adjust.
1726 (interesting_scope_p): Remove.
1727 (dump_scope): New static function.
1728 (dump_qualifiers): Adjust prototype, reimplement.
1729 (dump_template_value): Use tree_string_flags.
1730 (dump_type_real): Move back to dump_type.
1731 (dump_type): Adjust prototype. Use tree_string_flags.
1732 (dump_aggr_type): Likewise. Use dump_template_parms.
1733 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
1735 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
1736 (dump_simple_decl): Likewise.
1737 (dump_decl): Likewise. Use dump_template_decl.
1738 (dump_template_decl): New static function broken out of dump_decl.
1739 (dump_function_decl): Adjust prototype. Use tree_string_flags.
1740 (dump_parameters): Likewise. Prefix space.
1741 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
1742 (dump_function_name): Likewise. Use dump_template_parms.
1743 (dump_template_parms): New static function broken out of
1745 (dump_expr_list): Adjust prototype. Use tree_string_flags.
1746 (dump_expr): Likewise.
1747 (fndecl_as_string): Removed
1748 (type_as_string_real): Removed
1749 (dump_binary_op): Adjust prototype. Use tree_string_flags.
1750 (dump_unary_op): Likewise.
1751 (type_as_string): Likewise.
1752 (expr_as_string): Likewise.
1753 (decl_as_string): Likewise.
1754 (context_as_string): New function.
1755 (lang_decl_name): Adjust.
1756 (decl_to_string): New static print callback.
1757 (expr_to_string): Likewise.
1758 (fndecl_to_string): Likewise.
1759 (code_as_string): Renamed to ...
1760 (code_to_string): ... here. Adjust.
1761 (language_as_string): Renamed to ...
1762 (language_to_string): ... here. Adjust.
1763 (parm_as_string): Renamed to ...
1764 (parm_to_string): ... here.
1765 (op_as_string): Renamed to ...
1766 (op_to_string): ... here.
1767 (assop_as_string): Renamed to ...
1768 (assop_to_string): ... here.
1769 (type_to_string): New static print callback.
1770 (args_as_string): Renamed to ...
1771 (args_to_string): ... here. Adjust.
1772 (cv_as_string): Renamed to ...
1773 (cv_to_string): ... here. Adjust.
1774 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
1775 (print_template_context): Likewise.
1777 1999-09-26 Mark Mitchell <mark@codesourcery.com>
1779 * cp-tree.h (expand_throw): Remove prototype.
1780 * except.c (expand_throw): Make it static. Use tree-generation
1781 functions, rather than RTL-generation functions.
1782 (build_throw): Use it.
1783 * expr.c: Include except.h.
1784 (cplus_expand_expr): Don't call expand_throw here.
1785 * Makefile.in (expr.o): Depend on except.h.
1786 * ir.texi: Update documentation for THROW_EXPR.
1788 * decl.c (start_function): Set x_dont_save_pending_sizes rather
1789 than calling get_pending_sizes.
1790 * init.c (build_new): Don't save and restore
1791 immediate_size_expand; instead, assert that it has the expected
1794 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1796 * lex.c (compiler_error): Add missing call to va_end().
1798 1999-09-25 Mark Mitchell <mark@codesourcery.com>
1800 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
1801 * ir.texi: Document RESULT_DECL and DECL_RESULT.
1803 * cp-tree.h (check_return_expr): New function.
1804 * decl.c (finish_constructor_body): New function.
1805 (pushdecl): Put global friend functions in namespace binding
1806 level, not the class binding level.
1807 (finish_destructor_body): Make sure the dtor_label is always
1808 defined. Fix typo in comment.
1809 (finish_function): Move generation of constructor-termination code
1810 to semantic-analysis time. Move generation of implicit `main'
1811 return value to semantic-analysis time.
1812 * semantics.c (finish_return_stmt): Generate goto's to
1813 ctor_label/dtor_label here. Use check_return_expr to do semantic
1814 analysis on the returned expression.
1815 * typeck.c (maybe_warn_about_returning_address_of_local): New
1816 function split out from c_expand_return.
1817 (check_return_expr): Likewise.
1818 (c_expand_return): Just generate the RTL for the return.
1820 1999-09-24 Mark Mitchell <mark@codesourcery.com>
1822 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
1823 (cleanup_type): Likewise.
1824 (search_tree): Change prototype.
1825 * decl.c (local_variable_p): Adjust for new interface to
1827 (check_default_argument): Likewise.
1828 * error.c (dump_expr): Handle INIT_EXPR.
1829 * except.c (expand_throw): Don't make cleanup_type a local static.
1830 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
1831 * init.c (build_new): Call build_new_1 directly, rather than
1832 building a NEW_EXPR.
1833 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
1834 processing file-scope initializers.
1835 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
1836 * tree.c: Include splay-tree.h
1837 (no_linkage_helper): Adjust for new interface to search_tree.
1838 (search_tree): Pass around pointers to tree nodes, rather than the
1839 nodes themselves. Handle VEC_INIT_EXPR.
1840 (no_linkage_check): Adjust for new interface to search_tree.
1841 (mapcar): Handle VEC_INIT_EXPR.
1842 (target_remap): New variable.
1843 (bot_manip): Use it.
1844 (bot_replace): New function.
1845 (break_out_target_exprs): Use it to remap all variables used in a
1846 default argument expression.
1847 * typeck.c (build_modify_expr): Don't crash when outside a
1848 function and presented with an INIT_EXPR assignment
1849 * Makefile.in (tree.o): Depend on splay-tree.h.
1851 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
1853 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
1855 (builtin_function): New arg CLASS. Arg CODE now of type int. All
1857 Set the builtin's DECL_BUILT_IN_CLASS.
1859 1999-09-24 Mark Mitchell <mark@codesourcery.com>
1861 * decl.c (pushdecl): Don't make local declarations of extern
1862 variables give the variable a DECL_CONTEXT for the function.
1863 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
1864 Don't accidentally make RTL for local declarations.
1865 (emit_local_var): Handle declarations with asm-specifiers here.
1867 1999-09-23 Mark Mitchell <mark@codesourcery.com>
1869 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
1870 STMT_IS_FULL_EXPR_P.
1872 * cp-tree.h (language_function): Add cannot_inline.
1873 * decl.c (start_function): Restore current_function_cannot_inline
1874 from the saved value.
1875 (save_function_data): Save current_function_cannot_inline.
1876 * decl2.c (start_objects): Change prototype. Build the function
1877 in function-at-a-time mode.
1878 (finish_objects): Likewise.
1879 (generate_ctor_or_dtor_function): Adjust accordingly.
1881 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
1882 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
1883 Don't call expand_anon_union_decl here
1884 * semantics.c (exapnd_stmt): Call it here, instead.
1885 * typeck.c (mark_addressable): Addressed variables are implicitly
1888 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1890 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
1891 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
1892 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
1893 * cp-tree.h: Add tree checking macros to various tree access
1895 * ptree.c (print_lang_decl): Test for function or variable
1896 before accessing template info.
1898 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
1900 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
1901 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
1902 * decl2.c (lang_f_options): Add -fshort-wchar.
1903 * cp-tree.h: Declare flag_short_wchar.
1904 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
1907 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1909 * ir.texi: Fix formatting errors and typos.
1911 1999-09-22 Mark Mitchell <mark@codesourcery.com>
1913 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
1915 * decl.c (pushdecl): Do create a binding for extern "C" functions,
1916 but not for their DECL_ASSEMBLER_NAMEs.
1917 (lookup_name_current_level): Fix formatting.
1918 (xref_tag): Likewise.
1919 * decl2.c (start_objects): Mark static constructors and
1920 destructors as used.
1922 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
1924 * decl.c (define_case_label): Don't crash if we're not in a switch.
1926 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
1927 * lang-options.h: Restore -fthis-is-variable. Remove help strings
1928 for unsupported flags.
1930 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
1932 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
1933 Accept and warn about -fthis-is-variable.
1935 1999-09-21 Mark Mitchell <mark@codesourcery.com>
1937 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
1938 CLEANUP_STMT, and SCOPE_STMT.
1940 * decl2.c (lang_decode_option): Adjust, in the wake of recent
1941 changes to option processing.
1943 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1945 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
1946 function pointer from pmfs with no object given.
1947 (convert_for_assignment): Do not return error when converting
1950 1999-09-21 Alex Samuel <samuel@codesourcery.com>
1952 * lex.c (internal_filename): New variable.
1953 (INTERNAL_FILENAME): New macro.
1954 (init_parse): Allocate internal_filename and mark as root. Use it
1955 instead of a string constant.
1957 1999-09-21 Nathan Sidwell <nathan@acm.org>
1959 Reimplement dynamic cast and catch matching.
1960 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
1961 * search.c (dynamic_cast_base_recurse): New function.
1962 (get_dynamic_cast_base_type): New function for dynamic cast.
1963 * rtti.c (build_dynamic_cast_1): Determine source and target
1964 class relationship. Call __dynamic_cast_2.
1965 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
1966 (__user_type_info::dyncast): New dynamic cast dispatcher.
1967 (__user_type_info::sub_kind): New nested enumeration.
1968 (__user_type_info::contained_p): sub_kind predicate.
1969 (__user_type_info::contained_public_p): Likewise.
1970 (__user_type_info::contained_nonpublic_p): Likewise.
1971 (__user_type_info::contained_nonvirtual_p: Likewise.
1972 (__user_type_info::upcast_result): New nested struct.
1973 (__user_type_info::dyncast_result): New nested struct.
1974 (*::do_upcast): New catch function.
1975 (*::do_dyncast): New dynamic cast function.
1976 (__user_type_info::find_public_subobj): New dynamic cast
1978 (*::do_find_public_subobj): New dynamic cast helper function.
1979 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
1980 (__user_type_info::dyncast): Define dynamic cast dispatcher.
1981 (*::do_upcast): Define catch function.
1982 (*::do_dyncast): Define dynamic cast function.
1983 (*::do_find_public_subobj): Define dynamic cast helper function.
1984 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
1985 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
1986 (__dynamic_cast_2): New dynamic cast runtime.
1988 1999-09-20 Mark Mitchell <mark@codesourcery.com>
1990 * cp-tree.h (finish_stmt_expr): Change prototype.
1991 * expr.c (cplus_expand_expr): Adjust call accordingly.
1992 * init.c (finish_init_stmts): Likewise.
1993 * parse.y (primary): Likewise.
1994 * pt.c (tsubst_copy): Likewise.
1995 * semantics.c (finish_stmt_expr): Don't take two parameters.
1996 Don't remove generated BLOCKs from the block-tree.
1998 Remove support for assigning to `this'.
1999 * NEWS: Note that fact.
2000 * class.c (build_vbase_path): Don't check flag_this_is_variable.
2001 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
2002 (language_function): Remove assigns_this, just_assigned_this, and
2003 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
2004 (base_init_expr): Remove.
2005 (current_vcalls_possible_p): New macro.
2006 (vtbls_set_up_p): Likewise.
2007 (emit_base_init): Change prototype.
2008 * decl.c (finish_destructor_body): New function, split out from
2010 (current_function_assigns_this): Remove.
2011 (current_function_just_assigned_this): Likewise.
2012 (start_function): Don't set them.
2013 (finish_function): Don't check them. Don't emit
2014 base-initialization code here. Generate code for destructors when
2015 doing semantic analysis.
2016 (finish_stmt): Don't check current_function_just_assigned_this.
2017 * decl2.c (lang_f_options): Remove this-is-variable.
2018 (lang_decode_option): Likewise.
2019 (grokclassfn): Don't check flag_this_is_variable.
2020 * init.c (emit_base_init): Return the expression generated.
2021 (construct_virtual_bases): Don't push/pop obstacks. Fix
2023 (build_new_1): Don't check flag_this_is_variable.
2024 (get_temp_regvar): Don't set DECL_REGISTER.
2025 (build_vec_init): Don't call use_variable.
2026 * lang-options.h: Remove "-fthis-is-variable" and
2027 "-fno-this-is-variable".
2028 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
2029 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
2031 * semantics.c (finish_expr_stmt_real): Rename to ...
2032 (finish_expr_stmt): This. Remove assigned_this parameter.
2033 (begin_if_stmt): Call do_pushlevel before starting the statement.
2034 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
2036 (setup_vtbl_ptr): Emit initialization code for bases and members
2037 at semantic-analysis time. Emit code to initialize vtables in
2039 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
2040 Don't handle CTOR_INITIALIZER any more.
2041 * typeck.c (build_modify_expr): Don't check for assignments to
2043 (c_expand_return): Don't suggest assigning to `this'.
2045 * Makefile.in (decl.o): Depend on RTL_H.
2046 (decl2.o): Likewise.
2047 (class.o): Likewise.
2049 (method.o): Likewise.
2050 (search.o): Likewise.
2054 * decl.c (duplicate_decls): When a builtin function is redeclared
2055 as static, make sure it is mangled correctly.
2057 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
2058 detail about the statement-tree.
2060 1999-09-20 Nathan Sidwell <nathan@acm.org>
2062 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
2064 1999-09-20 Nick Clifton <nickc@cygnus.com>
2066 * decl2.c (lang_decode_option): Extend comment.
2068 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2070 * typeck.c: Include "tm_p.h".
2072 1999-09-19 Mark Mitchell <mark@codesourcery.com>
2074 * ir.texi: New file.
2076 1999-09-19 Paul Burchard <burchard@pobox.com>
2078 * semantics.c (expand_stmt): Initialize return value.
2080 1999-09-18 Paul Burchard <burchard@pobox.com>
2082 * gxxint.texi: G++ now implements namespaces.
2084 1999-09-18 Mark Mitchell <mark@codesourcery.com>
2086 * decl.c (pop_label): Don't warn about unused labels more than
2088 * semantics.c (finish_goto_stmt): Always marked used labels as
2091 * decl.c (layout_var_decl): Change prototype. Call layout_decl
2092 even when the declaration is external.
2093 (cp_finish_decl): Adjust call to layout_var_decl.
2094 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
2096 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
2098 * typeck.c (get_member_function_from_ptrfunc): Always consider
2099 virtuality inside member pointer.
2101 1999-09-17 Mark Mitchell <mark@codesourcery.com>
2103 Turn on function-at-a-time processing.
2104 * cp-tree.h (doing_semantic_analysis_p): New macro.
2105 (SF_DEFAULT): Define to zero, not SF_EXPAND.
2106 (start_handler_parms): Change prototype.
2107 (expand_start_catch_block): Likewise.
2108 (expand_end_catch_block): Likewise.
2109 (expand_start_eh_spec): Likewise.
2110 (expand_end_eh_spec): Declare.
2111 (finish_handler_parms): Change prototype.
2112 (begin_catch_block): Declare.
2113 (finish_handler): Change prototype.
2114 (do_pushlevel): Declare.
2115 (do_poplevel): Likewise.
2116 * decl.c (pushlevel): Don't create
2117 binding levels when not doing semantic analysis.
2118 (poplevel): Don't pop them.
2119 (pushdecl): Assert that we are never called when not doing
2121 (pushdecl_top_level): Use push_to_top_level.
2122 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
2123 label when expanding.
2124 (cp_finish_decl): Only inject for-scope variables when doing
2125 semantic analysis. Add comments.
2126 (start_handler_parms): Return the handler parm.
2127 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
2128 already set. Reinitialize from saved function data if available.
2129 Don't pushlevel when not doing semantic analysis.
2130 (store_parm_decls): Only generate RTL when expanding. Only
2131 pushdecl when doing semantic analysis. Set
2132 current_eh_spec_try_block if appropriate.
2133 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
2134 Combine common code. Don't poplevel when not doing semantic
2136 (push_cp_function_context): Don't expand functions without an
2137 explicit call to expand_body.
2138 (mark_lang_function): Make eh_spec_try_block and
2140 * except.c (expand_end_eh_spec): Don't
2142 (process_start_catch_block): Likewise.
2143 (push_eh_cleanup): Use finish_decl_cleanup.
2144 (initialize_handler_parm): New function.
2145 (expand_start_catch_block): Use it.
2146 (expand_end_catch_block): Use tree-generation functions, not
2147 RTL-generation functions.
2148 (expand_start_eh_spec): Likewise.
2149 (expand_end_eh_spec): Likewise.
2150 (expand_exception_blocks): Simplify.
2151 (start_anon_func): Use do_pushlevel.
2152 (end_anon_func): Use do_poplvel. Call expand_body for the
2154 * expr.c (do_case): Don't call define_case_label.
2155 * init.c (create_temporary_var): Set DECL_CONTEXT for local
2157 * method.c (emit_thunk): Call expand_body for the
2159 (sythesize_method): Likewise.
2160 * parse.y (handler_args): Give it ttype.
2161 (eat_saved_input): Call expand_body.
2162 (base_init): Use do_pushlevel.
2163 (pending_inline): Call expand_body.
2164 (handler): Adjust calls to finish_handler_parms and
2166 (handler_args): Don't call expand_start_catch_block. Return the
2167 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
2168 * parse.c: Regenerated.
2169 * rtti.c (synthesize_tinfo_fn): Call finish_function.
2170 * semantics.c (do_pushlevel): Give it external linkage. Build
2172 (do_poplevel): Likewise.
2173 (finish_case_label): Call define_case_label when doing semantic
2175 (finish_goto_stmt): Create RTL for labels.
2176 (finish_function_try_block): Set in_function_try_handler
2178 (finish_function_handler_sequence): Unset it.
2179 (finish_handler_parms): Use expand_start_catch_block even when
2180 building a statement-tree.
2181 (begin_catch_block): New function.
2182 (finish_handler): Move a little RTL-generation logic here.
2183 (finish_decl_cleanup): Allow cleanups for empty declarations.
2184 (finish_named_return_value): Don't pushdecl when not doing
2186 (expand_stmt): Don't do semantic analysis for variable
2187 declarations. Handle START_CATCH_STMT. Call expand_label
2188 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
2189 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
2190 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
2191 RETURN_INIT and function try blocks.
2193 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
2194 x_scope_stmt_stack. Add x_in_charge_parm.
2195 (current_eh_spec_try_block): New macro.
2196 (current_scope_stmt_stack): Likewise.
2197 (current_in_charge_parm): Likewise.
2198 * decl.c (start_function): Initialize current_in_charge_parm.
2199 (finish_function): Use current_in_charge_parm rather than looking
2201 * search.c (expand_indirect_vtbls_init): Likewise.
2203 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
2204 (TRY_BLOCK): Likewise.
2205 (HANDLER): Likewise.
2206 (START_CATCH_STMT): New tree node.
2207 (SCOPE_STMT): Likewise.
2208 * cp-tree.h (SCOPE_BEGIN_P): New macro.
2209 (SCOPE_NULLIFIED_P): Likewise.
2210 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
2211 (struct lang_decl): Add saved_language_function.
2212 (DECL_PENDING_INLINE_INFO): Adjust documentation.
2213 (DECL_PENDING_INLINE_P): New macro.
2214 (TYPE_TI_ARGS): Fix typo in comment.
2215 (DECL_SAVED_TREE): Add to documentation.
2216 (DECL_SAVED_FUNCTION_DATA): New macro.
2217 (START_CATCH_TYPE): Likewise.
2218 (SCOPE_END_P): New macro.
2219 (declare_parm_level): Don't declare.
2220 * decl.c (mark_lang_function): New function, split out from
2221 mark_cp_function_context.
2222 (save_function_data): New function.
2223 (declare_parm_level): Remove.
2224 (finish_function): Use save_function_data to squirrel away
2225 important stuff for later use.
2226 (mark_cp_function_context): Use mark_function_data.
2227 (lang_mark_tree): Likewise.
2228 * lex.c (begin_definition_of_inclass_inline): Set
2229 DECL_PENDING_INLINE_P.
2230 (store_pending_inline): Clear it.
2231 * pt.c (tsubst_decl): Likewise.
2233 1999-09-17 Nathan Sidwell <nathan@acm.org>
2235 * call.c (perform_implicit_conversion): Deal with error_mark_node.
2237 1999-09-17 Mark Mitchell <mark@codesourcery.com>
2239 * decl.c (warn_extern_redeclared_static): Don't get confused by
2240 static member functions.
2241 (duplicate_decls): Merge DECL_THIS_STATIC.
2243 * decl.c (expand_static_init): Make sure assignments to local
2244 statics actually occur.
2246 1999-09-17 Mark Mitchell <mark@codesourcery.com>
2248 * cp-tree.h (poplevel_class): Declare.
2249 * class.c (popclass): Use poplevel_class, not poplevel.
2250 * decl.c (poplevel_class): Don't make it static. Don't return a
2252 (poplevel): Don't call poplevel_class; abort in a class
2253 binding level is seen.
2254 * semantics.c (finish_translation_unit): Use pop_everything.
2255 * parse.y (member_init): Allow errors.
2256 (pending_inline): Call finish_function.
2257 * parse.c: Regenerated.
2258 * Makefile.in (CONFLICTS): Adjust.
2260 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
2262 * error.c: Reduce code duplication.
2263 (dump_template_value): New function.
2264 (dump_type_real): Use it.
2265 (dump_decl): Likewise.
2266 (dump_function_name): Likewise.
2267 (dump_function_decl): Don't be too talkative about function return
2270 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2272 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
2274 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
2276 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
2278 * decl2.c (finish_file): Also call check_global_declarations for
2279 the pending_statics list.
2281 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
2283 * lex.c (cp_pragma_implementation): Allow #pragma implementation
2286 1999-09-15 Richard Henderson <rth@cygnus.com>
2288 * lex.c (mark_impl_file_chain): Follow the next chain.
2290 1999-09-15 Mark Mitchell <mark@codesourcery.com>
2292 * decl.c (warn_extern_redeclared_static): Simplify. Catch
2293 problems with extern "C" functions redeclared as static.
2294 (duplicate_decls): When a builtin is redeclared static, make the
2295 new function have internal linkage.
2297 1999-09-15 Mark Mitchell <mark@codesourcery.com>
2299 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
2300 * pt.c (tsubst_copy): Likewise.
2301 * tree.c (search_tree): Likewise.
2304 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2306 * typeck2.c (ack): Don't declare progname.
2308 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
2310 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
2311 filenames with ggc_alloc_string.
2313 1999-09-14 Mark Mitchell <mark@codesourcery.com>
2315 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
2317 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
2319 * cvt.c (build_up_reference): Likewise.
2320 * tree.c (build_cplus_new): Likewise.
2321 (get_target_expr): Likewise.
2323 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
2325 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
2327 1999-09-13 Mark Mitchell <mark@codesourcery.com>
2329 * cp-tree.h (build_target_expr): New function.
2330 * call.c (build_conditional_expr): Use build_target_expr.
2331 (convert_like): Likewise.
2332 (build_over_call): Likewise.
2333 * cvt.c (build_up_reference): Likewise.
2334 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
2335 (destroy_local_var): Here.
2336 (build_target_expr): New function.
2337 * tree.c (build_cplus_new): Use it.
2338 (get_target_expr): Likewise.
2340 1999-09-13 Nathan Sidwell <nathan@acm.org>
2342 * typeck.c (expr_sizeof): Don't decay arrays and functions.
2343 Remove misleading comment.
2344 (build_compound_expr): Don't decay arrays.
2346 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
2348 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
2349 class rvalues again.
2351 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2353 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
2355 * g++spec.c: Include gcc.h.
2356 (lang_specific_driver): Constify a char*. Call xcalloc, not
2357 xmalloc/bzero. All calls to the function pointer parameter now
2358 explicitly call `fatal'.
2360 1999-09-12 Mark Mitchell <mark@codesourcery.com>
2362 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
2363 * cvt.c (ocp_convert): Complete the from and destination types.
2364 Adjust warning about functions always being `true' in conditionals.
2365 * decl.c (duplicate_decls): Don't play funny games with abort.
2366 * error.c (dump_expr): Handle OVERLOADs.
2367 * spew.c (probe_obstack): Remove.
2368 * typeck.c (condition_conversion): Use perform_implicit_conversion.
2370 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
2372 * cp-tree.h (auto_function, define_function): Adjust prototypes.
2373 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
2375 (auto_function): Likewise, for CODE arg.
2376 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
2377 (builtin_function): ... here.
2379 1999-09-11 Mark Mitchell <mark@codesourcery.com>
2381 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
2382 (init_decl_processing): Don't set TREE_PERMANENT for the
2384 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
2385 (grokdeclarator): Likewise.
2386 (grokparms): Don't check TREE_PERMANENT when building up lists.
2387 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
2388 (mark_inline_for_output): Likewise.
2389 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
2390 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
2391 * lex.c (check_newline): Don't check ggc_p; it is always one.
2392 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
2393 * spew.c (yylex): Don't copy_node or probe_obstacks for
2394 non-permanent CONSTANTs and STRINGs.
2395 * tree.c (build_cplus_array_type_1): Don't fuss with
2396 TREE_PERMANENT on ARRAY_TYPEs.
2398 * cp-tree.def (CLEANUP_STMT): New node.
2399 * cp-tree.h (language_function): Add name_declared.
2400 (current_function_name_declared): New macro.
2401 (CLEANUP_DECL): New macro.
2402 (CLEANUP_EXPR): Likewise.
2403 (emit_local_var): Likewise.
2404 (finish_decl_cleanup): New function.
2405 * cvt.c (build_up_reference): Simplify.
2406 (ocp_convert): Remove dead code.
2407 * decl.c (start_decl): Remove call to add_decl_stmt.
2408 (grok_reference_init): Adjust, to handle bindings temporaries to
2409 references. Remove dead code.
2410 (initialize_local_var): Don't generate RTL for
2411 declarations here, or build cleanups here. Don't fuss with
2412 obstacks. Replace expand_start_target_temps calls with explicit
2413 setting of stms_are_full_exprs_p.
2414 (destroy_local_var): New function.
2415 (emit_local_var): Likewise.
2416 (cp_finish_decl): Use them, as appropriate.
2417 (start_function): Announce template functions.
2418 (store_parm_decls): Don't call declare_function_name here.
2419 (finish_stmt): Don't start emit base-initialization code when just
2420 building the statement-tree.
2421 * init.c (create_temporary_var): Move add_decl_stmt call ...
2422 (get_temp_regvar): Here.
2423 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
2424 cp_finish_decl would expect. Don't call add_decl_stmt.
2425 * semantics.c (begin_compound_stmt): Call declare_function_name,
2427 (finish_decl_cleanup): New function.
2428 (expand_stmt): Use emit_local_var to output variables.
2429 (expand_body): Set current_funtion_name_declared.
2431 1999-09-10 Mark Mitchell <mark@codesourcery.com>
2433 * cp-tree.h (finish_cleanup_try_block): New function.
2434 * semantics.c (finish_cleanup_try_block): Add comment.
2436 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2438 * cp-tree.h: Delete declarations for all tree nodes now moved to
2440 * decl.c: Delete their definitions.
2441 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
2442 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
2444 (init_decl_processing): Call build_common_tree_nodes and
2445 build_common_tree_nodes_2 instead of building their nodes here.
2446 Don't add gc roots for them.
2448 1999-09-10 Mark Mitchell <mark@codesourcery.com>
2450 * cp-tree.h (language_function): Rename expanding_p to
2451 x_expanding_p. Rename named_label_uses to x_named_label_uses.
2452 (expanding_p): Adjust accordingly.
2453 (TREE_VIA_PRIVATE): Fix typo in comment.
2454 (DECL_REFERENCE_SLOT): Remove.
2455 (SET_DECL_REFERENCE_SLOT): Likewise.
2456 * decl.c (named_label_uses): Adjust. Remove chicken comment.
2457 (push_overloaded_decl): Don't truncate the chain of bindings when
2458 adding an overloaded function.
2459 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
2460 (initialize_local_var): Fix typo in comment.
2461 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
2462 * decl2.c (start_objects): Make the fact that we are expanding
2463 the generated function right away explicit.
2464 (start_static_storage_duration_function): Likewise.
2465 (finish_file): Fix typo in comment.
2466 * init.c (build_vec_init): Correct bugs in handling cleanups.
2467 * semantics.c (maybe_convert_cond): New function.
2468 (FINISH_COND): Always store the condition, even if there's
2470 (finish_if_stmt_cond): Use maybe_convert_cond.
2471 (finish_while_stmt_cond): Likewise.
2472 (finish_do_stmt): Likewise.
2473 (finish_for_cond): Likewise.
2474 (expand_cond): Adjust.
2476 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
2477 * init.c (perform_member_init): Remove obstack machinations.
2478 (expand_cleanup_for_base): Likewise.
2479 (finish_init_stmts): Mark the statement-expression as used.
2480 * method.c (emit_thunk): Use tree-generating functions, not
2482 (do_build_copy_constructor): Likewise.
2483 (do_build_assign_ref): Likewise.
2484 (synthesize_method): Likewise. Keep track of line numbers.
2485 * pt.c (tsubst_expr): Handle various kinds of try blocks.
2486 * semantics.c (expand_stmts): Remove.
2487 (begin_function_try_block): Set FN_TRY_BLOCK_P.
2488 (finish_function_try_block): Be careful rechaining
2489 function try blocks.
2490 (expand_stmt): Loop through all the statements at a given level.
2491 (exapnd_body): Be careful with line-numbers here too. Prepare for
2492 being called directly from the parser.
2494 * cp-tree.h (finish_function): Adjust prototype.
2495 * decl.c (finish_function): Return the function compiled.
2496 * pt.c (instantiate_decl): Don't play games with obstacks.
2497 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
2498 (search_tree): Likewise.
2499 * typeck.c: Fix typo in comment.
2500 * typeck2.c (store_init_value): Add comment.
2502 * cp-tree.h (CPTI_ATEXIT): New macro.
2503 (atexit_node): Likewise.
2504 * decl.c (destroy_local_static): New function, broken out from ...
2505 (expand_static_init): Here.
2507 * rtti.c (get_tinfo_var): These should always be global
2508 (expand_si_desc): Use tree, not RTL, functions to generate code.
2509 (expand_class_desc): Likewise.
2510 (expand_ptr_desc): Likewise.
2511 (expand_attr_desc): Likewise.
2512 (expand_generic_desc): Likewise.
2513 (synthesize_tinfo_fn): Likewise.
2515 1999-09-09 Mark Mitchell <mark@codesourcery.com>
2517 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
2518 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
2520 (RECHAIN_STMST_FROM_CHAIN): Likewise.
2522 * parse.y (simple_stmt): Fix typo in last change.
2524 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
2525 (STMT_IS_FULL_EXPR_P): Likewise.
2526 (STMT_LINENO_FOR_FN_P): Likewise.
2527 (prep_stmt): New function.
2528 (building_stmt_tree): Tweak for safety.
2529 * pt.c (tsubst_expr): Use prep_stmt throughout.
2530 (add_tree): Move it to semantics.c
2531 * semantics.c (add_tree): Move it here.
2532 (finish_expr_stmt_real): New function.
2533 (finish_expr_stmt): Use it.
2534 (finish_if_stmt_cond): Use FINISH_COND.
2535 (finish_while_stmt_cond): Likewise.
2536 (finish_for_cond): Likewise.
2537 (finish_stmt_tree): Tweak line-number handling.
2538 (prep_stmt): New function.
2539 (expand_stmt): Use it.
2541 * cp-tree.h (begin_switch_stmt): Adjust prototype.
2542 (finish_switch_cond): Likewise.
2543 * parse.y (simple_stmt): Adjust accordingly.
2544 * parse.c: Regenerated.
2545 * pt.c (tsubst_expr): Adjust accordingly.
2546 * semantics.c (expand_cond): New function.
2547 (FINISH_COND): New macro.
2548 (begin_switch_stmt): Build the SWITCH_STMT here.
2549 (finish_switch_stmt_cond): Not here.
2550 (expand_stmt): Adjust calls to begin_switch_stmt and
2551 finish_switch_cond. Use expand_cond throughout.
2553 * dump.c (dequeue_and_dump): Dump types for constants.
2554 Describe DECL_ARG_TYPE more intuitively.
2557 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
2558 (lang_cleanup_tree): Remove.
2559 * lex.c (make_lang_type): Use ggc_alloc to allocate
2562 Reorganize per-function data.
2563 * cp-tree.h (saved_scope): Add function_decl, bindings.
2564 (language_function): Rename binding_level to bindings.
2565 (cp_function_chain): Use the current_function, not the
2566 outer_function_chain.
2567 (current_class_ptr): Make it work, even when there's no
2569 (current_class_ref): Likewise.
2570 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
2572 (clear_temp_name): Remove.
2573 * decl.c (check_function_type): New function, broken out from
2575 (current_binding_level): Adjust definition.
2576 (pushlevel): Simplify.
2577 (poplevel): Don't use named_label_uses when we're outside
2579 (mark_saved_scope): Mark function_decl and bindings.
2580 (maybe_push_to_top_level): Don't unconditionally push a new
2581 function context. Save bindings and the current_function_decl.
2582 Don't clear named_labels.
2583 (pop_from_top_level): Pop function context if appropriate.
2584 (init_decl_processing): Set init_lang_status and free_lang_status,
2585 rather than save_lang_status and restore_lang_status.
2586 (start_function): Take SF_* flags. Don't clear per-function data.
2587 Reorder and simplify to use new per-function data code. Add
2589 (store_parm_decls): Don't call init_function_start here.
2590 (finish_function): Adjust for new handling of per-function data.
2591 (push_cp_function_context): Simplify.
2592 (mark_cp_function_context): Change binding_level to bindings.
2593 * decl2.c (clear_temp_name): Remove.
2594 (start_objects): Use SF flags to start_function.
2595 (start_static_storage_duration_function): Likewise.
2596 * except.c (start_anon_func): Remove redundant calls to
2597 push_function_context_to. Use SF flags to start function.
2598 (end_anon_func): Remove redundant call to pop_function_context
2600 * lex.c (reinit_parse_for_function): Don't initialize per-function
2602 * method.c (emit_thunk): Clear current_function after calling
2603 assemble_end_function. Use SF flags for start_function.
2604 (synthesize_method): Use SF flags for start_function.
2605 * parse.c: Regenerated.
2606 * parse.y (fn.defpen): Likewise.
2607 (pending_inline): Clear current_function, even if something goes
2609 * pt.c (instantiate_decl): Use SF flags to start_function.
2610 Don't save and restore expanding_p.
2611 (add_tree): Handle the case where we are outside any function.
2612 (end_tree): Likewise.
2613 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
2614 * semantics.c (begin_function_definition): Likewise.
2615 (expand_body): Likewise.
2617 1999-09-09 Nathan Sidwell <nathan@acm.org>
2619 * cp-tree.h (convert_to_void): Prototype new function.
2620 (require_complete_type_in_void): Remove prototype.
2621 * cvt.c (convert_to_void): New function.
2622 (ocp_convert): Use convert_to_void.
2623 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
2625 * typeck.c (require_complete_type_in_void): Remove function.
2626 (build_compound_expr): Use convert_to_void.
2627 (build_static_cast): Likewise.
2628 (build_c_cast): Likewise.
2629 * semantics.c (finish_expr_stmt): Do not decay full expressions.
2631 * typeck.c (build_x_compound_expr): Add FIXME.
2633 1999-09-08 Mark Mitchell <mark@codesourcery.com>
2635 * cp-tree.h (scratch_tree_cons): Remove.
2636 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
2637 and perm_tree_cons with plain tree_cons.
2638 * class.c: Likewise.
2640 * decl2.c: Likewise.
2641 * except.c: Likewise.
2645 * method.c: Likewise.
2646 * parse.y: Likewise.
2650 * search.c: Likewise.
2651 * typeck.c: Likewise.
2652 * parse.c: Regenerated.
2653 * tree.c (build_srcloc): Simplify.
2655 1999-09-08 Mark Mitchell <mark@codesourcery.com>
2657 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
2659 (LANG_DECL_PERMANENT): Remove.
2660 * decl.c (duplicate_decls): Don't mess about with obstacks trying
2662 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
2663 * lex.c (free_lang_decl_chain): Remove.
2664 (build_lang_decl): Don't use obstacks.
2665 (retrofit_lang_decl): Likewise.
2666 (copy_lang_decl): Likewise.
2668 * cp-tree.h (saved_scope): Remove old_binding_level and
2669 function_decl. Tidy up.
2670 * decl.c (mark_saved_scope): Don't set them.
2671 (maybe_push_to_top_level): Clear memory.
2673 * decl.c (layout_var_decl): Change prototype. Don't complete
2674 types for external objects.
2675 (check_initializer): Likewise. Tidy.
2676 (initialize_local_var): Complete types here.
2677 (cp_finish_decl): Not here. Reorganize a little.
2678 (grokvardecl): Don't complete types here.
2680 * decl.c (start_function): Clear last_dtor_insn and
2681 last_parm_cleanup_insn.
2682 (push_cp_function_context): Just copy over a little of
2683 the old context, not all of it.
2685 * cp-tree.h (copy_to_permanent): Remove.
2686 (permanent_p): Likewise.
2687 * decl.c (building_typename_type): Don't use copy_to_permanent.
2688 (start_decl): Likewise.
2689 (grok_reference_init): Likewise.
2690 (cp_finish_decl): Likewise.
2691 * init.c (build_new_1): Don't use mapcar.
2692 (build_vec_delete_1): Don't use copy_to_permanent.
2693 (build_vec_init): Likewise.
2694 * parse.y (primary): Likewise.
2695 * parse.c: Regenerated.
2696 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
2697 (lookup_template_class): Likewise.
2698 (tsubst_friend_function): Likewise.
2699 (instantiate_class_template): Likewise.
2700 (tsubst_decl): Likewise.
2702 (instantiate_template): Likewise.
2704 * rtti.c (get_tinfo_fn): Likewise.
2705 (build_dynamic_cast): Likewise.
2706 * semantics.c (finish_if_stmt_cond): Likewise.
2707 (finish_while_stmt_cond): Likewise.
2708 (finish_do_stmt): Likewise.
2709 (finish_for_cond): Likewise.
2710 (finish_for_expr): Likewise.
2711 (finish_cleanup): Likewise.
2712 (add_decl_stmt): Likewise.
2713 (finish_named_return_value): Likewise.
2714 (finish_qualified_call_expr): Likewise.
2715 * tree.c (perm_manip): Remove.
2716 (build_exception_variant): Don't use copy_to_permanent.
2717 (permanent_p): Remove.
2718 (copy_to_permament): Remove.
2719 (build_min_nt): Don't use copy_to_permanent.
2720 (build_min): Likewise.
2721 (min_tree_cons): Likewise.
2722 * typeckc.c (build_static_cast): Likewise.
2723 (build_reinterpret_cast): Likewise.
2724 (build_const_cast): Likewise.
2726 1999-09-07 Mark Mitchell <mark@codesourcery.com>
2728 * decl.c (ggc_p): Set it to 1.
2729 (mark_saved_scope): Add prototype.
2731 1999-09-07 Richard Henderson <rth@cygnus.com>
2733 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
2734 * typeck.c (self_promoting_args_p): Delete.
2736 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
2738 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
2739 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
2741 1999-09-07 Mark Mitchell <mark@codesourcery.com>
2743 * Makefile.in (tree.o): Depend on ggc.h.
2744 * class.c (make_method_vec): Remove.
2745 (free_method_vec): Likewise.
2746 (free_method_vecs): Remove.
2747 (add_method): Don't use them.
2748 * cp-tree.def (PTRMEM_CST): Make it longer.
2749 (TEMPLATE_PARM_INDEX): Make it shorter.
2750 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
2751 (template_parm_index): Remove RTL field.
2752 (ptrmem_cst): Add RTL field.
2753 (finish_function): Removed parameter.
2754 (process_next_inline): Change prototype.
2755 (init_cplus_unsave): Rename to init_tree.
2756 (binding_init): Remove.
2757 * decl.c (free_binding_nodes): Remove.
2758 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
2759 (pop_binding): Don't use free_binding_nodes.
2760 (free_binding_vecs): Remove.
2761 (store_bindings): Don't use them.
2762 (pop_from_top_level): Likewise.
2763 (lookup_namespace_name): Simplify.
2764 (build_typename_type): Don't use obstack_free.
2765 (unqualified_namespace_lookup): Simplify.
2766 (lookup_name_real): Simplify.
2767 (start_function): Remove comment about leaks.
2768 (finish_function): Removed nested parameter. Call
2769 expand_end_bindings even when building_stmt_tree.
2770 Call ggc_push_context and ggc_pop_context around
2771 rest_of_compilation, if necessary.
2772 (mark_cp_function_context): Handle a NULL language-context.
2773 (lang_mark_false_label_stack): Fix typo.
2774 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
2775 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
2776 pointer to method types.
2777 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
2778 * decl2.c (finish_objects): Adjust call to finish_function.
2779 (finish_static_store_duration_function): Likewise.
2780 (do_nonmember_using_decl): Remove call to binding_init.
2781 * except.c (end_anon_func): Adjust call to finish_function.
2782 * lex.c (mark_impl_file_chain): New function.
2783 (init_parse): Call init_tree, not init_cplus_unsave.
2785 (cp_pramga_interface): Use xmalloc, not permalloc.
2786 (cp_pragma_implementation): Likewise.
2787 (begin_definition_of_inclass_inline): Simplify.
2788 (process_next_inline): Adjust prototype.
2789 (do_scoped_id): Don't call binding_init.
2790 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
2791 * method.c (emit_thunk): Adjust call to finish_function.
2792 (synthesize_method): Likewise.
2793 * parse.y (%union): Add a new `pi' variant.
2794 (PRE_PARSED_FUNCTION_DECL): Use it.
2795 (fn.defpen): Likewise.
2796 (fndef): Adjust call to finish_function.
2797 * pt.c (instantiate_decl): Likewise.
2798 * rtti.c (syntheisze_tinfo_fn): Likewise.
2799 * semantics.c (expand_body): Likewise.
2800 * tree.c: Include ggc.h.
2801 (mark_list_hash): New function.
2802 (binding_init): Remove.
2803 (init_cplus_unsave): Rename to ...
2804 (init_tree): This. Add GC roots.
2806 1999-09-05 Mark Mitchell <mark@codesourcery.com>
2808 Get ready for garbage collection.
2809 * Makefile.in (CXX_TREE_H): Add varray.h
2810 (lex.o): Depend on ggc.h.
2812 (decl2.o): Likewise.
2813 (method.o): Likewise.
2814 (search.o): Likewise.
2817 * class.c: Include ggc.h.
2818 (current_class_name): Remove.
2819 (current_class_type): Likewise.
2820 (current_access_specifier): Likewise.
2821 (previous_class_type): Likewise.
2822 (previous_class_values): Likewise.
2823 (class_cache_firstobj): Likewise.
2824 (current_lang_base): Likewise.
2825 (current_lang_stack): Likewise.
2826 (current_lang_stacksize): Likewise.
2827 (lang_name_c): Likewise.
2828 (lang_name_cplusplus): Likewise.
2829 (lang_name_java): Likewise.
2830 (current_lang_name): Likewise.
2831 (base_layout_decl): Likewise.
2832 (access_default_node): Likewise.
2833 (access_public_node): Likewise.
2834 (access_protected_node): Likewise.
2835 (access_private_node): Likewise.
2836 (access_default_virtual_node): Likewise.
2837 (access_public_virtual_node): Likewise.
2838 (access_protected_virtual_node): Likewise.
2839 (access_private_virtual_node): Likewise.
2840 (signed_zero_node): Likewise.
2841 (init_class_processing): Don't build base_layout_decl.
2842 (push_lang_context): Adjust now that current_lang_base is a varray.
2843 (pop_lang_context): Likewise.
2844 * cp-tree.h: Include varray.h.
2845 (cp_global_trees): Add access_default, access_public,
2846 access_protected, access_private, access_default_virtual,
2847 access_public_virtual, access_protected_virtual,
2848 access_private_virtual, ctor_identifier, delta2_identifier,
2849 delta_identifier, dtor_identifier, in_charge_identifier,
2850 index_identifier, nelts_identifier, this_identifier,
2851 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
2852 lang_name_c, lang_name_cplusplus, lang_name_java,
2853 empty_except_spec, null, jclass, minus_one, terminate.
2854 (saved_scope): Move here from decl.c. Define globals in terms of
2855 saved_scope: current_namespace, current_class_name,
2856 current_class_type, current_access_specifier, current_lang_stack,
2857 current_lang_base, current_lang_name, current_function_parms,
2858 current_template_parms, processing_template_decl,
2859 processing_specialization, processing_explicit_instantiation,
2860 previous_class_type, previous_class_values, class_cache_firstobj.
2861 (scope_chain): New variable.
2862 (init_pt): New function.
2863 * decl.c (current_namespace): Remove.
2864 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
2865 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
2866 (delta_identifier, delta2_identifier): Likewise.
2867 (pfn_or_delta2_identifier, tag_identifier): Likewise
2868 (vt_off_identifier, empty_except_spec, null_node): Likewise.
2869 (current_function_parms, current_lang_base): Remove.
2870 (current_lang_stack, previous_class_values): Remove.
2871 (class_binding_level): Macroize.
2872 (saved_scope): Remove.
2873 (current_saved_scope): Rename to scope_chain.
2874 (mark_saved_scope): Adjust for new scope structure.
2875 (maybe_push_to_top_level): Likewise.
2876 (pop_from_top_level): Likewise.
2877 (duplicate_decls): Adjust now that current_lang_base is a varray.
2878 (build_typename_type): Call ggc_add_tree_hash_table_root.
2879 (init_decl_processing): Call init_pt. Call push_to_top_level to
2880 set up globals. Add GC roots.
2881 (xref_basetypes): Adjust now that current_lang_base is a varray.
2882 * decl.h (this_identifier): Remove.
2883 (in_charge_identifier): Likewise.
2884 * decl2.c: Don't include varray.h.
2885 (current_namespace): Remove.
2886 (init_decl2): Add GC roots.
2887 * except.c (Terminate): Remove.
2888 (init_exception_processing): Use terminate_node instead.
2889 (build_terminate_handler): Likewise.
2890 * init.c (nc_nelts_field_id): Remove.
2891 (minus_one): Likewise.
2892 (init_init_processing): Use minus_one_node and nelts_identifier
2893 instead. Add GC roots.
2894 (jclass_node): Remove.
2895 (build_new_1): Use nelts_identifier.
2896 (build_vec_init): Likewise.
2897 (build_vec_delete): Likewise.
2898 * lex.c: Include ggc.h.
2899 (defarg_fn): Move declaration early.
2900 (defarg_parms): Likewise.
2901 (init_parse): Add GC roots.
2902 (handle_cp_pragma): Remove redundant declaration of
2904 * method.c: Include ggc.h.
2905 (btypelist): Make it a varray. All uses changed.
2906 (ktypelist): Likewise.
2907 (init_method): Add GC roots.
2908 * pt.c: Don't include varray.h. Include ggc.h.
2909 (current_template_parms): Remove.
2910 (processing_template_decl): Likewise.
2911 (processing_specialization): Likewise.
2912 (processing_explicit_instantiation): Likewise.
2913 (init_pt): New function.
2914 * repo.c: Include ggc.h.
2915 (init_repo): Add GC roots.
2916 * search.c: Don't include varray.h.
2917 (_vptr_name): Remove.
2918 (lookup_field_1): Use vtpr_identifier instead.
2919 (expand_indirect_vtbls_init): Remove redundant declaration of
2920 in_charge_identifier.
2921 (init_search_processing): Use vptr_identifier.
2923 1999-09-05 Richard Henderson <rth@cygnus.com>
2924 Bernd Schmidt <bernds@cygnus.co.uk>
2925 Mark Mitchell <mark@codesourcery.com>
2927 * Makefile.in (parse.o): Depend on ggc.h.
2928 (decl2.o): Depend on ggc.h.
2929 (init.o): Depend on ggc.h.
2930 * cp-tree.h (init_decl2): Declare.
2931 (cp_parse_init): Likewise.
2932 * decl.c (ggc_p): Define to zero.
2933 (mark_saved_scope): New function.
2934 (init_decl_processing): Call cp_parse_init, and cp_decl2.
2936 (expand_static_init): Add GC roots.
2937 * decl2.c: Include ggc.h.
2938 (init_decl2): New function.
2939 * init.c: Include ggc.h.
2940 (init_init_processing): Add GC roots.
2941 * parse.y: Include ggc.h.
2942 (cp_parse_init): New function.
2944 1999-09-04 Mark Mitchell <mark@codesourcery.com>
2946 * decl.c (init_decl_processing): Set mark_lang_status.
2947 (lang_mark_false_label_stack): Adjust prototype.
2948 * decl2.c (grok_function_init): Remove extraneous declaration of
2951 * Make-lang.in (cc1plus): Remove dependency on GGC.
2952 * Makefile.in (OBJS): Don't mention ggc-simple.o.
2953 (OBJDEPS): Don't mention ggc-simple.o.
2955 * Make-lang.in (cc1plus): Depend on $(GGC).
2956 * Makefile.in (OBJS): Add ggc-simple.o.
2957 (OBJDEPS): Likewise.
2958 * cp-tree.h (language_function): Rename members to `x_' versions;
2959 we now have x_named_labels, x_ctor_label, x_dtor_label,
2960 x_base_init_list, x_member_init_list, x_base_init_expr,
2961 x_current_class_ptr, x_current_class_ref, x_last_tree,
2962 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
2964 (dtor_label, ctor_label, current_base_init_list,
2965 current_member_init_list, base_init_expr, current_class_ptr,
2966 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
2967 * decl.c: Include ggc.h.
2968 (last_dtor_insn): Adjust to use x_ names.
2969 (last_parm_cleanup_insn): Likewise.
2970 (original_result_rtx): Likewise.
2971 (named_labels): Likewise.
2972 (mark_binding_level): New function.
2973 (mark_cp_function_context): Likewise.
2974 (mark_false_label_stack): Likewise.
2975 (lang_mark_tree): Likewise.
2976 (lang_cleanup_tree): Likewise.
2978 1999-09-03 Mark Mitchell <mark@codesourcery.com>
2980 * Makefile.in (CXX_TREE_H): Include function.h.
2981 (decl.o): Don't depend on function.h.
2982 (decl2.o): Likewise.
2983 (typeck.o): Likewise.
2985 (method.o): Likewise.
2986 * cp-tree.h: Include function.h.
2987 (cp_function): Rename to language_function. Remove next.
2988 (cp_function_chain): Make it a macro, not a variable.
2989 (push_cp_function_context): Don't declare.
2990 (pop_cp_function_context): Likewise.
2991 * decl.c: Don't include function.h.
2992 (push_cp_function_context): Make it static. Make it suitable for
2993 a save_lang_status callback.
2994 (pop_cp_function_context): Likewise.
2995 (maybe_push_to_top_level): Call push_function_context_to, not
2996 push_cp_function_context.
2997 (pop_from_top_level): Call pop_function_context_from, not
2998 pop_cp_function_context.
2999 (init_decl_processing): Set save_lang_status and
3000 restore_lang_status. Call push_function_context_to, not
3001 push_cp_function_context.
3002 (cp_function_chain): Remove.
3003 * decl2.c: Don't include function.h.
3004 * except.c: Don't include function.h.
3005 (start_anon_func): Call push_function_context_to, not
3006 push_cp_function_context.
3007 (end_anon_func): Call pop_function_context_from, not
3008 pop_cp_function_context.
3009 * init.c: Don't include function.h.
3010 * lex.c (begin_definition_of_inclass_inline): Call
3011 push_function_context_to, not push_cp_function_context.
3012 (process_next_inline): Call pop_function_context_from, not
3013 pop_cp_function_context.
3014 * method.c: Don't include function.h.
3015 (synthesize_method): Call push_function_context_to, not
3016 push_cp_function_context. Call pop_function_context_from, not
3017 pop_cp_function_context.
3018 * typeck.c: Don't include function.h.
3020 * decl.c (expand_static_init): Tweak handling of static
3021 initializations for objects without constructors.
3023 1999-09-03 Nathan Sidwell <nathan@acm.org>
3025 * typeck.c (build_indirect_ref): Reject dereference of pointer to
3028 1999-09-02 Mark Mitchell <mark@codesourcery.com>
3030 * cp-tree.h (cp_function): Move here, from decl.c.
3031 (cp_function_chain): Declare.
3032 (dtor_label): New macro, instead of variable.
3033 (ctor_label): Likewise.
3034 (current_base_init_list): Likewise.
3035 (current_member_init_list): Likewise.
3036 (base_init_expr): Likewise.
3037 (current_class_ptr): Likewise.
3038 (current_class_ref): Likewise.
3039 (last_tree): Likewise.
3040 (last_expr_type): Likewise.
3041 (current_function_returns_value): Likewise.
3042 (current_function_returns_null): Likewise.
3043 (current_function_just_assigned_this): Likewise.
3044 (current_function_parms_stored): Likewise.
3045 (temp_name_counter): Likewise.
3046 (static_labelno): Likewise.
3047 (expanding_p): Likewise.
3048 (stmts_are_full_exprs_p): Likewise.
3049 (in_function_try_handler): Likewise.
3050 (lang_type): Remove nested type_flags. All uses changed.
3051 * call.c (ctor_label): Remove.
3052 (dtor_label): Likewise.
3053 * class.c (current_class_ptr): Remove.
3054 (current_class_ref): Likewise.
3055 * decl.c (static_labelno): Remove.
3056 (dtor_label): Likewise.
3057 (last_dtor_insn): New macro, instead of variable.
3058 (last_parm_cleanup_insn): Likewise.
3059 (original_result_rtx): Likewise.
3060 (in_function_try_handler): Remove.
3061 (named_label_uses): New macro, instead of variable.
3062 (named_labels): Likewise.
3063 (current_function_returns_value): Remove.
3064 (current_function_returns_null): Likewise.
3065 (current_function_assigns_this): New macro, instead of variable.
3066 (current_function_just_assigned_this): Likewise.
3067 (current_binding_level): Likewise.
3068 (init_decl_processing): Call push_cp_function_context.
3069 (cp_function): Move to cp-tree.h
3070 (cp_function_chain): Make it global.
3071 (temp_name_counter): Remove.
3072 (push_cp_function_context): Simplify.
3073 (pop_cp_function_context): Likewise.
3074 * decl2.c (temp_name_counter): Remove.
3075 * init_c (current_base_init_list): Likewise.
3076 (current_member_init_list): Likewise.
3077 (base_init_expr): Likewise.
3078 * method.c (static_labelno): Likewise.
3079 * pt.c (last_tree): Likewise.
3080 * semantics.c (expanding_p): Likewise.
3081 (stmts_are_full_exprs_p): Likewise.
3082 (last_expr_type): Likewise.
3083 * typeck.c (dtor_label): Likewise.
3084 (ctor_label): Likewise.
3086 1999-09-01 Alex Samuel <samuel@codesourcery.com>
3088 * decl2.c (arg_assoc_template_arg): New prototype. New function.
3089 (arg_assoc_class): Use arg_assoc_template_arg for template
3091 (arg_assoc): Likewise.
3092 * pt.c (mangle_class_name_for_template): Allow member template
3095 1999-09-02 Nathan Sidwell <nathan@acm.org>
3097 * call.c (build_conditional_expr): Warn on enum mismatches.
3098 (convert_arg_to_ellipsis): Move non-pod check to after
3101 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3103 * gxx.gperf (hash, is_reserved_word): Add prototypes.
3105 * init.c (build_vec_init): Initialize variable `try_block'.
3107 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
3108 Likewise for bzero/memset.
3109 (token_getch, token_put_back): Add static prototypes. Remove
3110 `inline' from the definitions.
3111 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
3113 1999-09-01 Mark Mitchell <mark@codesourcery.com>
3115 * cp-tree.h (lang_type): Move align into type_flags.
3116 (CLASSTYPE_ALIGN): Adjust accordingly.
3117 * call.c (direct_reference_binding): Remove misleading comment.
3119 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3121 * parse.y (language_string): Constify.
3123 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3125 * repo.c (getpwd): Don't prototype.
3126 * xref.c (getpwd): Likewise
3128 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3130 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
3131 Remove hacks for stuff which now comes from libiberty.
3133 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
3135 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
3137 1999-08-30 Mark Mitchell <mark@codesourcery.com>
3139 * cp-tree.h (begin_init_stmts): Declare.
3140 (finish_init_stmts): Likewise.
3141 * cvt.c (build_up_reference): Wrap the declaration of a temporary
3142 in a statement-expression so that we will see it when expanding
3143 tree structure later.
3144 * init.c (begin_init_stmts): Don't make it static.
3145 (finish_init_stmts): Likewise.
3147 * cp-tree.h (start_handler_parms): New function.
3148 (expand_start_catch_block): Take only one parameter.
3149 (start_handler_parms): New function.
3150 * decl.c (start_handler_parms): Define it.
3151 * except.c (process_start_catch_block): Take only one parameter.
3152 Don't call grokdeclarator here.
3153 (expand_start_catch_block): Don't call grokdeclarator here,
3155 * parse.y (handler_args): Adjust call to
3156 expand_start_catch_block. Use start_handler_parms.
3157 * pt.c (push_template_decl_real): Make permanent lists have
3159 (tsubst_expr): Adjust calls to expand_start_catch_block
3161 * semantics.c (expand_stmt): Likewise.
3163 1999-08-29 Alex Samuel <samuel@codesourcery.com>
3165 * pt.c (push_template_decl_real): Use template declaration from
3166 class type if it exists.
3168 1999-08-29 Mark Mitchell <mark@codesourcery.com>
3170 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
3171 (maybe_inject_for_scope_var): Declare it.
3172 (initialize_local_var): Likewise.
3173 * decl.c (maybe_inject_for_scope_var): Make it global.
3174 (initialize_local_var): Likewise. Move cleanup handling here,
3175 from cp_finish_decl.
3176 (make_rtl_for_nonlocal_decl): Use
3177 push_obstacks_nochange/pop_obstacks, rather than
3178 end_temporary_allocation/resume_temporary_allocation.
3179 (cp_finish_decl): Try to complete the type of a variable when it
3180 is declared. Move cleanup-handling to initialize_local_var.
3181 (expand_static_init): Use tree-building code, rather than
3183 * decl2.c (get_temp_name): Assert non-initializedness of
3185 * init.c (create_temporary_var): Move RTL-assigning code to ...
3186 (get_temp_regvar): Here.
3187 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
3188 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
3189 call initialize_local_var to generate initialization code.
3191 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3193 * cp-tree.h (fndecl_as_string, type_as_string,
3194 type_as_string_real, args_as_string, decl_as_string,
3195 expr_as_string, code_as_string, language_as_string,
3196 parm_as_string, op_as_string, assop_as_string, cv_as_string,
3197 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
3199 * errfn.c (cp_printer): Likewise.
3201 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
3202 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
3203 cp_file_of, code_as_string, language_as_string, parm_as_string,
3204 op_as_string, assop_as_string, args_as_string, cv_as_string):
3207 * tree.c (lang_printable_name): Likewise.
3209 1999-08-28 Richard Henderson <rth@cygnus.com>
3211 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
3213 1999-08-28 Mark Mitchell <mark@codesourcery.com>
3215 * cp-tree.h (strip_array_types): New function.
3216 * decl.c (maybe_deduce_size_from_array_init): New function, split
3217 out from cp_finish_decl.
3218 (layout_var_decl): Likewise.
3219 (maybe_commonize_var): Likewise.
3220 (maybe_inject_for_scope_var): Likewise.
3221 (initialize_local_var): Likewise.
3222 (build_cleanup_on_safe_obstack): Likewise.
3223 (check_initializer): Likewise.
3224 (make_rtl_for_nonlocal_decl): Likewise.
3225 (cp_finish_decl): Use them.
3226 * typeck.c (strip_array_types): New function.
3228 * cp-tree.def (LABEL_STMT): New tree node.
3229 * cp-tree.h (LABEL_STMT_LABEL): New macro.
3230 (shadow_label): Remove.
3231 (declare_local_label): New function.
3232 (finish_label_decl): Likewise.
3233 * decl.c (make_label_decl): New function, split out from
3235 (shadowed_labels): Remove.
3236 (binding_level): Add shadowed_labels.
3237 (clear_binding_level): Remove.
3238 (push_binding_level): Just bzero the new binding level.
3239 (pushlevel): Fix indentation.
3240 (pop_label): New function.
3241 (pop_labels): Likewise, split out from poplevel.
3242 (poplevel): Pop local labels. Use pop_labels.
3243 (maybe_push_to_top_level): Don't clear shadowed_labels.
3244 (lookup_label): Use make_label_decl.
3245 (shadow_label): Remove.
3246 (declare_local_label): New function.
3247 (define_label): Simplify.
3248 (start_function): Don't clear shadowed_labels.
3249 (cp_function): Remove shadowed_labels.
3250 (push_cp_function_context): Don't save shadowed_labels.
3251 (pop_cp_function_context): Don't restore it.
3252 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
3253 * parse.y (label_decl): Use finish_label_decl.
3254 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
3256 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
3258 (finish_label_decl): New function.
3259 (expand_stmt): Handle LABEL_STMTs and local label declarations.
3261 1999-08-26 Mark Mitchell <mark@codesourcery.com>
3263 * decl.c (lookup_label): Build labels on the permanent obstack
3264 when building statement trees. Don't build RTL for labels when
3265 building statement trees.
3266 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
3267 building statement trees.
3268 (finish_label_stmt): Likewise.
3269 (expand_stmt): Adjust accordingly.
3270 * pt.c (tsubst_expr); Likewise.
3271 (do_decl_instantiation): Robustify.
3273 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
3274 * tree.c (build_cplus_new): Set it.
3275 * expr.c (cplus_expand_expr): Use it.
3276 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
3278 * decl.c (store_parm_decls): Reset immediate_size_expand.
3279 (finish_function): Likewise.
3281 * tree.c (cplus_unsave_expr_now): Don't return a value.
3283 * semantics.c (do_poplevel): Always initialize the return value.
3285 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
3287 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
3288 * tree.h (cplus_unsave_expr_now) : Same.
3290 1999-08-25 Mark Mitchell <mark@codesourcery.com>
3292 * decl.c (grokdeclarator): Amend comment.
3293 * except.c (expand_start_catch_block): Call push_template_decl for
3294 catch-block parameters.
3295 * method.c (synthesize_method): Build an empty compound statement
3296 for the body of a constructor.
3298 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
3300 * tree.c (cp_build_qualified_type_real): If we're asking for the
3301 same quals we already have, just return.
3303 1999-08-25 Mark Mitchell <mark@codesourcery.com>
3305 * cp-tree.def (SUBOBJECT): New tree node.
3306 * cp-tree.h (CLEANUP_P): New macro.
3307 (SUBOBJECT_CLEANUP): Likewise.
3308 (keep_next_level): Add parameter.
3309 (get_temp_regvar): Don't declare.
3310 (emit_base_init): Remove parameter.
3311 (expand_aggr_init): Rename to build_aggr_init.
3312 (expand_vec_init): Rename to build_vec_init.
3313 (do_pushlevel): Remove.
3314 (do_poplevel): Likewise.
3315 (finish_cleanup): New function.
3316 (finish_subobject): Likewise.
3317 (stmts_are_full_exprs_p): New variable.
3318 * decl.c (keep_next_level): Add parameter.
3319 (cp_finish_decl): Use build_aggr_init, not
3320 expand_aggr_init. Use finish_expr_stmt to expand the code.
3321 (expand_static_init): Use tree-generating, not RTL-generating,
3322 functions to handle the initialization.
3323 (start_function): Remove dead code. Always have a momentary
3324 obstack inside the function, even before hitting the first curly
3326 (cplus_expand_expr_stmt): Move calls to
3327 expand_{start,end}_target_temps into semantics.c.
3328 (cp_function): Add stmts_are_full_exprs_p.
3329 (push_cp_function_context): Save it.
3330 (pop_cp_function_context): Restore it.
3331 * decl2.c (get_temp_regvar): Move to init.c.
3332 (do_static_initialization): Use build_{aggr,vec}_init.
3333 (do_static_destruction): Fix typo in comment.
3334 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
3335 * except.c (expand_throw): Use create_temporary_var.
3336 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
3337 * init.c (expand_vec_init_try_block): Remove.
3338 (expand_vec_init_catch_clause): Likewise.
3339 (get_temp_regvar): New function.
3340 (begin_init_stmts): Likewise.
3341 (finish_init_stmts): Likewise.
3342 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
3344 (emit_base_init): Likewise. Remove unused parameter.
3345 (expand_virtual_init): Likewise.
3346 (expand_cleanup_for_base): Use finish_subobject.
3347 (expand_aggr_vbase_init_1): Simplify.
3348 (construct_virtual_bases): Use tree-generating functions to build
3350 (expand_aggr_init): Likewise. Rename to build_aggr_init.
3351 (expand_default_init): Likewise.
3352 (expand_aggr_init_1): Likewise.
3353 (expand_vec_init): Rename to build_vec_init.
3354 * method.c (do_build_copy_constructor): Use tree-generating
3355 functions. Don't call clear_last_expr.
3356 (do_build_assign_ref): Likewise.
3357 (synthesize_method): Call clear_last_expr here.
3358 * parse.y (base_init): Don't call clear_last_expr here.
3359 (nodecls): Likewise.
3360 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
3361 * semantics.c (do_pushlevel): Move to here.
3362 (do_poplevel): Likewise.
3363 (stmts_are_full_exprs_p): New variable.
3364 (finish_expr_stmt): Handle logic for temoprary cleanup here.
3365 (finish_for_stmt): Use finish_expr_stmt.
3366 (finish_cleanup): New function.
3367 (finish_function_try_block): Fix indentation.
3368 (finish_subobject): New function.
3369 (setup_vtbl_ptr): Call keep_next_level here.
3370 (finish_stmt_expr): Handle a block with no scope inside the
3371 statement-expression.
3372 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
3374 * tree.c (search_tree): Handle INIT_EXPR.
3376 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
3377 * typeck2.c (store_init_value): Change expand_aggr_init to
3378 build_aggr_init in comment.
3380 1999-08-25 Mark Mitchell <mark@codesourcery.com>
3382 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
3384 1999-08-25 Nathan Sidwell <nathan@acm.org>
3386 * decl2.c (handle_class_head): Be graceful about additional
3387 scope qualifiers. Adjust comments to reflect reality.
3389 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
3391 * call.c (build_conditional_expr): Fix typo.
3392 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
3393 lvalue before trying to mess with the sides.
3395 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
3397 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
3399 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
3401 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
3403 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
3404 Return arbitrary pointer or NULL.
3405 (check_eh_spec): Call __throw_type_match_rtti_2.
3406 * tinfo.h (*::dcast): Return int. Add valp parm.
3407 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
3408 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
3409 (__throw_type_match_rtti): Now just a wrapper.
3411 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
3412 (init_exception_processing): Don't initialize them.
3414 1999-08-23 Paul Burchard <burchard@pobox.com>
3416 * decl.c (check_default_argument): Fix typo.
3418 1999-08-22 Mark Mitchell <mark@codesourcery.com>
3420 * cp-tree.def (STMT_EXPR): Fix typo in node name.
3422 * dump.c (dump_next_stmt): New function.
3423 (dequeue_and_dump): Use it.
3425 * pt.c (tsubst_copy): Make sure to initialize return value for a
3426 STMT_EXPR, even when processing_template_decl.
3427 * semantics.c (finish_stmt_expr): A statement-expression whose
3428 last statement is not an expression-statement has type `void'.
3430 1999-08-20 Mark Mitchell <mark@codesourcery.com>
3432 * semantics.c (finish_stmt_expr): Fix typo in comment.
3433 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
3435 * init.c (build_vec_delete_1): Make the children of a permanent
3436 BIND_EXPR permanent.
3437 * pt.c (register_specialization): Don't register a specialization
3440 1999-08-18 Andrew Haley <aph@cygnus.com>
3442 * method.c (process_overload_item): Call build_mangled_C9x_name ()
3443 for all integer parameter types larger than long long.
3445 1999-08-19 Mark Mitchell <mark@codesourcery.com>
3447 * pt.c (redeclare_class_template): Merge default template
3448 arguments in both directions.
3450 * typeck.c (common_type): Undo 1999-08-18 change. Remove
3451 compiler_error message.
3453 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
3455 * cp-tree.h: Declare flag_use_repository.
3456 * pt.c (do_decl_instantiation): Don't complain about duplicate
3457 instantiation with -frepo.
3458 (do_type_instantiation): Likewise.
3460 * pt.c (push_template_decl_real): Complain about everything
3461 that isn't a valid template.
3463 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
3466 1999-08-19 Mark Mitchell <mark@codesourcery.com>
3468 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
3469 * decl2.c (build_expr_from_tree): Handle it.
3470 * error.c (dump_expr): Likewise.
3471 * pt.c (for_each_template_parm): Likewise.
3472 (tsubst_copy): Likewise.
3473 * tree.c (search_tree): Likewise.
3474 * semantics.c (finish_pseudo_destructor_call): Create it.
3476 1999-08-18 Mark Mitchell <mark@codesourcery.com>
3478 * search.c (setup_class_bindings): Robustify.
3479 * typeck.c (common_type): Use same_type_p, not pointer equality,
3482 * cp-tree.h (build_lang_field_decl): Remove.
3483 * class.c (build_vtable): Replace calls to build_lang_field_decl
3484 with build_lang_decl.
3485 (prepare_fresh_vtable): Likewise.
3486 (finish_struct_1): Likewise.
3487 (init_class_processing): Likewise.
3488 * decl.c (push_using_decl): Likewise.
3489 (init_decl_processsing): Likewise.
3490 (grokvardecl): Likewise.
3491 (build_ptrmemfunc_type): Likewise.
3492 (grokdeclarator): Likewise.
3493 (build_enumerator): Likewise.
3494 * decl2.c (grok_x_components): Likewise.
3495 (do_class_using_decl): Likewise.
3496 * except.c (call_eh_info): Likewise.
3497 * init.c (init_init_processing): Likewise.
3498 * rtti.c (expand_class_decl): Likewise.
3499 * tree.c (build_base_fields): Likewise.
3500 (build_vbase_pointer_fields): Likewise.
3501 * lex.c (build_lang_decl): Build declarations on the permanent
3502 obstack if we're building statmeent trees.
3503 (retrofit_lang_decl): Handle both the full lang_decl and also the
3504 smaller lang_decl_flags here.
3505 (build_lang_field_decl): Remove.
3506 * pt.c (push_template_decl_real): Issue errors for variable
3507 declarations that are not static members.
3509 1999-08-18 Richard Henderson <rth@cygnus.com>
3511 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
3514 1999-08-17 Mark Mitchell <mark@codesourcery.com>
3516 * cp-tree.h (back_end_hook): New variable.
3517 * decl2.c (back_end_hook): Define it.
3518 (finish_file): If it's non-NULL, call it.
3520 * decl.c (add_decl_to_level): New function.
3521 (push_local_binding): Use it.
3522 (find_binding): Fix typo in comment.
3523 (pushdecl): Use add_decl_to_level. Put templates on the
3524 corresponding namespace-scope binding levels.
3525 * dump.c (dequeue_and_dump): Print the specializations of a
3527 * pt.c (push_template_decl_real): Don't push a template multiple
3530 1999-08-17 Mark Mitchell <mark@codesourcery.com>
3532 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
3533 (CALL_DECLARATOR_QUALS): Likewise.
3534 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
3535 * decl.c (grokdeclarator): Adjust to use them.
3536 * decl2.c (grokfield): Likewise.
3537 (reparse_absdcl_as_casts): Likewise.
3538 * lex.c (make_call_declarator): Likewise.
3539 (set_quals_and_spec): Likewise.
3540 * pt.c (tsubst): Likewise.
3541 * tree.c (mapcar): Remove special hack to handle third operand of
3544 1999-08-16 Mark Mitchell <mark@codesourcery.com>
3546 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
3547 * class.c (build_vtable): Use build_lang_field_decl to build the
3548 VAR_DECLs for vtables.
3549 (prepare_fresh_vtable): Likewise.
3550 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
3551 CAN_HAVE_FULL_LANG_DECL_P.
3552 (push_using_decl): Use build_lang_decl to build USING_DECLs.
3553 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
3554 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
3555 (build_lang_field_decl): Likewise.
3556 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
3559 * cp-tree.def (STMT_EXPR): New tree node.
3560 * cp-tree.h (STMT_EXPR_STMT): New macro.
3561 (store_return_init): Change prototype.
3562 (finish_named_return_value): New function.
3563 (expand_stmt): Likewise.
3564 (expand_body): Likewise.
3565 (begin_stmt_tree): Likewise.
3566 (finish_stmt_tree): Likewise.
3567 (expanding_p): New variable.
3568 (last_expr_type): Likewise.
3569 (building_stmt_tree): New macro.
3570 * decl.c (start_function): Use building_stmt_tree, not
3571 processing_template_decl, where appropriate.
3572 (store_parm_decls): Likewise.
3573 (store_return_init): Move most of the body to semantics.c.
3574 (finish_function): Use building_stmt_tree.
3575 (finish_stmt): Clear last_expr_type here.
3576 (cp_function): Add expanding_p, last_tree, last_expr_type.
3577 (push_cp_function_context): Save them.
3578 (pop_cp_function_context): Restore them.
3579 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
3580 * error.c (dump_expr): Handle STMT_EXPR.
3581 * except.c (expand_start_catch_block): Use building_stmt_tree.
3583 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
3584 (do_case): Move add_tree call to semantics.c.
3585 * parse.y (return_init): Use finish_named_return_value.
3586 (for.init.statement): Use finish_expr_stmt.
3587 * parse.c: Regenerated.
3588 * pt.c (do_pushlevel): Move to semantics.c.
3589 (do_poplevel): Likewise.
3590 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
3591 (tsubst_expr): Don't expand all the way to RTL here. Handle
3592 RETURN_INIT and CTOR_INITIALIZER.
3593 (instantiate_decl): Call expand_body after tsubst'ing into
3595 * semantics.c (expand_stmts): New function.
3596 (expanding_p): New variable.
3597 (last_expr_type): Likewise.
3598 (finish_expr_stmt): Use building_stmt_tree.
3599 (begin_if_stmt): Likewise.
3600 (finish_if_stmt_cond): Likewise.
3601 (finish_then_clause): Likewise.
3602 (begin_else_clause): Likewise.
3603 (finish_else_clause): Likewise.
3604 (begin_while_stmt): Likewise.
3605 (finish_while_stmt_cond): Likewise.
3606 (finish_while_stmt): Likewise.
3607 (finish_do_body): Likewise.
3608 (finish_do_stmt): Likewise.
3609 (finish_return_stmt): Likewise.
3610 (begin_for_stmt): Likewise.
3611 (fnish_for_init_stmt): Likewise.
3612 (finish_for_cond): Likewise.
3613 (finish_for_expr): Likewise.
3614 (finish_for_stmt): Likewise.
3615 (finish_break_stmt): Likewise.
3616 (finish_continue_stmt): Likewise.
3617 (finish_switch_cond): Likewise.
3618 (finish_switch_stmt): Likewise.
3619 (finish_case_label): Call add_tree here if necessary.
3620 (finish_goto_statement): Use building_stmt_tree.
3621 (begin_try_block): Likewise.
3622 (begin_function_try_block): Likewise.
3623 (finish_try_block): Likewise.
3624 (finish_function_try_block): Likewise.
3625 (finish_handler_sequence): Likewise.
3626 (finish_function_handler_sequence): Likewise.
3627 (begin_handler): Likewise.
3628 (finish_handler_parms): Likewise.
3629 (finish_handler): Likewise.
3630 (begin_compound_stmt): Likewise.
3631 (finish_compound_stmt): Likewise.
3632 (finish_asm_stmt): Likewise.
3633 (finish_label_stmt): Likewise.
3634 (finish_named_return_value): New function.
3635 (setup_vtbl_ptr): Moved here from decl2.c.
3636 (do_pushlevel): Moved here from pt.c.
3637 (do_poplevel): Likewise.
3638 (begin_stmt_expr): Use building_stmt_tree.
3639 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
3640 when building_stmt_tree.
3641 (begin_stmt_tree): New function.
3642 (finish_stmt_tree): Likewise.
3643 (expand_stmt): Likewise.
3644 (expand_body): Likewise.
3645 * tree.c (build_cplus_method_type): Make sure the argument types
3646 end up on the same obstack as the METHOD_TYPE.
3647 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
3648 THROW_EXPR, STMT_EXPR.
3649 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
3650 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
3651 sorry, if an unsupported node is encountered.
3652 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
3653 (c_expand_return): Don't call add_tree here.
3655 1999-08-15 Mark Mitchell <mark@codesourcery.com>
3657 * pt.c (check_default_tmpl_args): Don't check in local scopes.
3658 (tsubst_decl): Make sure the declaration is on a saveable
3659 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
3661 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
3663 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
3665 Speed up Koenig lookup.
3666 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
3667 to return namespaces we've looked at.
3668 * decl2.c (lookup_using_namespace): Likewise.
3669 (add_function): Don't call ovl_member.
3670 (lookup_arg_dependent): Initialize k.namespaces to the list of
3671 namespaces seen in unqualified lookup.
3672 * call.c (equal_functions): Move here from tree.c.
3673 (joust): Use it to handle duplicate candidates.
3674 * tree.c (ovl_member): Use ==.
3676 1999-08-13 Mark Mitchell <mark@codesourcery.com>
3678 * cp-tree.def (DECL_STMT): Make it smaller.
3679 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
3680 (lang_decl): ... here. Add next.
3681 (DECL_SAVED_TREE): Adjust accordingly.
3682 (DECL_IMPLICIT_TYPEDEF_P): New macro.
3683 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
3684 (DECL_STMT_DECL): Likewise.
3685 (create_implicit_typedef): New function.
3686 (maybe_push_decl): Likewise.
3687 (tsubst_default_argument): New function.
3688 (at_function_scope_p): Likewise.
3689 (add_decl_stmt): Likewise.
3690 (push_permanent_obstack): Likewise.
3691 * call.c (convert_default_arg): Use tsubst_default_argument.
3692 * class.c (add_method): Use push_permanent_obstack.
3693 (build_self_reference): Create a TEMPLATE_DECL for the
3694 self-reference, if necessary.
3695 * decl.c (pseudo_global_level_p): Only look at the current binding
3697 (push_binding): Use push_permanent_obstack.
3698 (create_implicit_typedef): New function.
3700 (duplicate_decls): Use push_permanent_obstack.
3701 (maybe_push_decl): New function.
3702 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
3703 (start_decl_1): Remove dead code.
3704 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
3705 pseudo_global_level_p.
3706 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
3708 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
3709 pseudo_global_level_p.
3710 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
3712 (get_sentry): Use push_permanent_obstack.
3713 * dump.c (dequeue_and_dump): Enable DECL_STMT.
3714 * except.c (call_eh_info): Use push_permanent_obstack.
3715 (build_eh_type_ref): Likewise.
3716 (do_pop_exception): Likewise.
3717 (expand_eh_spec): Likewise.
3718 (alloc_eh_object): Likewise.
3719 (expand_throw): Likewise.
3720 * init.c (build_java_class_ref): Likewise.
3721 * lex.c (get_time_identifier): Likewise.
3722 (free_lang_decl_chain): Correct type.
3723 (retrofit_lang_decl): Adjust accordingly.
3724 (build_lang_field_decl): Likewise.
3725 * lex.h (free_lang_decl_chain): Likewise.
3726 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
3727 * parse.c: Regenerated.
3728 * pt.c (tsubst_default_arguments): New function.
3729 (retrieve_local_specialization): Likewise.
3730 (register_local_specialization): Likewise.
3731 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
3732 pseudo_global_level_p to determine whether or not a template is
3734 (lookup_template_class): Likewise. Use create_implicit_typedef.
3735 (instantiate_class_template): Call tsubst_default_arguments for
3736 member functions, if appropriate.
3737 (tsubst_default_argument): New function.
3738 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
3739 * search.c (at_function_scope_p): New function.
3740 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
3741 (finish_label_stmt): Likewise.
3742 (add_decl_stmt): New function.
3743 (begin_class_definition): Likewise.
3744 (finish_typeof): Likewise.
3745 * tree.c (copy_template_template_parm): Likewise.
3746 (copy_to_permanent): Likewise.
3747 (push_permanent_obstack): Define.
3748 (mark_addressable): Use it.
3749 * typeck.c (mark_addressable): Likewise.
3751 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
3753 * cp-tree.h (init_cplus_unsave): New.
3754 (cplus_unsave_expr_now): New.
3755 * lex.c (init_parse): Call init_cplus_unsave.
3756 * tree.c (init_cplus_unsave): New.
3757 (cplus_unsave_expr_now): New.
3759 1999-08-13 Mark Mitchell <mark@codesourcery.com>
3761 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
3762 decl_constant_value to simplify array bounds.
3764 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
3766 * lang-options.h: Add -fms-extensions.
3767 * cp-tree.h: Declare flag_ms_extensions.
3768 * decl2.c: Define it.
3769 * class.c (instantiate_type): Don't complain about taking the address
3770 of a bound member function if -fms-extensions.
3771 * typeck.c (build_unary_op): Likewise.
3772 * decl.c (grokdeclarator): Or about implicit int.
3773 * init.c (resolve_offset_ref): Or about implicit '&'.
3775 1999-08-11 Mark Mitchell <mark@codesourcery.com>
3777 * cp-tree.h (minimal_parse_mode): Remove.
3778 (finish_label_stmt): New function.
3779 * decl.c (saved_scope): Remove minimal parse mode.
3780 (maybe_push_to_top_level): Don't save it.
3781 (pop_from_top_level): Don't restore it.
3782 (define_label): Split out template-handling code to semantics.c.
3783 (start_decl): Don't use minimal_parse_mode.
3784 (cp_finish_decl): Likewise.
3785 (start_function): Don't increment it.
3786 (store_return_init): Don't use it.
3787 (finish_function): Don't decrement it.
3788 * parse.y (label_colon): Use finish_label_stmt throughout.
3789 * parse.c: Regenerated.
3790 * pt.c (minimal_parse_mode): Don't define it.
3791 (tsubst_expr): Use finish_label_stmt.
3792 * semantics.c (finish_label_stmt): New function.
3794 * dump.c (queue): Be careful when computing bitmasks.
3795 (dequeue_and_dump): Describe binfos as binfos, not as
3798 * parse.y (pedantic): Give it itype. Adjust usage accordingly
3800 * parse.c: Regenerated.
3802 * Make-lang.in (CXX_SRCS): Remove sig.c.
3803 * Makefile.in (CXX_OBJS): Remove sig.o.
3805 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
3806 (CPTI_SIGNATURE_TYPE): Likewise.
3807 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
3808 (opaque_type_node): Likewise.
3809 (signature_type_node): Likewise.
3810 (sigtable_entry_type): Likewise.
3811 (flag_handle_signatures): Likewise.
3812 (lang_type): Remove is_signature, is_signature_pointer,
3813 is_signature_reference, has_opaque_typedecls,
3814 sigtables_has_been_generated. Adjust dummy. Remove signature,
3815 signature_pointer_to, signature_reference_to.
3816 (IS_SIGNATURE): Remove.
3817 (SET_SIGNATURE): Remove.
3818 (CLEAR_SIGNATURE): Remove.
3819 (IS_SIGNATURE_POINTER): Remove.
3820 (IS_SIGNATURE_REFERENCE): Remove.
3821 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
3822 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
3823 (CLASSTYPE_SIGNATURE): Remove.
3824 (SIGNATURE_TYPE): Remove.
3825 (SIGNATURE_METHOD_VEC): Remove.
3826 (SIGNATURE_POINTER_TO): Remove.
3827 (SIGNATURE_REFERENCE_TO): Remove.
3828 (lang_decl_flags): Remove is_default_implementation. Rename
3829 memfunc_pointer_to to saved_tree.
3830 (IS_DEFAULT_IMPLEMENTATION): Remove.
3831 (DECL_MEMFUNC_POINTER_TO): Remove.
3832 (DECL_MEMFUNC_POINTING_TO): Remove.
3833 (DECL_SAVED_TREE): Adjust definition.
3834 (tag_types): Remove signature_type_node.
3835 (SIGNATURE_FIELD_NAME): Remove.
3836 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
3837 (SIGNATURE_OPTR_NAME): Likewise.
3838 (SIGNATURE_SPTR_NAME): Likewise.
3839 (SIGNATURE_POINTER_NAME): Likewise.
3840 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
3841 (SIGNATURE_REFERENCE_NAME): Likewise.
3842 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
3843 (SIGTABLE_PTR_TYPE): Likewise.
3844 (SIGTABLE_NAME_FORMAT): Likewise.
3845 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
3846 (SIGTABLE_TAG_NAME): Likewise.
3847 (SIGTABLE_VB_OFF_NAME): Likewise.
3848 (SIGTABLE_VT_OFF_NAME): Likewise.
3849 (finish_base_specifiers): Change prototype.
3850 (build_signature_pointer_type): Remove.
3851 (build_signature_reference_type): Remove.
3852 (build_signature_pointer_constructor): Remove.
3853 (build_signature_method_call): Remove.
3854 (build_optr_ref): Likewise.
3855 (append_signature_fields): Likewise.
3856 (signature_error): Likewise.
3857 * call.c (build_this): Remove signature support.
3858 (build_over_call): Likewise.
3859 (build_new_method_call): Likewise.
3860 * class.c (add_implicitly_declared_members): Likewise.
3861 (finish_struct_1): Likewise.
3862 (finish_struct): Likewise.
3863 * cvt.c (cp_convert_to_pointer): Likewise.
3864 (convert_to_pointer_force): Likewise.
3865 (ocp_convert): Likewise.
3866 * decl.c (sigtable_decl_p): Remove.
3867 (init_decl_processing): Remove support for signatures.
3868 (cp_finish_decl): Likewise.
3869 (grokdeclarator): Likewise.
3870 (grokparms): Likewise.
3871 (xref_tag): Likewise.
3872 (start_function): Likewise.
3873 (start_method): Likewise.
3874 * decl2.c (finish_sigtable_vardecl): Remove.
3875 (flag_handle_signatures): Remove.
3876 (lang_f_options): Remove handle-signatures.
3877 (grokfield): Remove support for signatures.
3878 (grokbitfield): Likewise.
3879 (finish_file): Likewise.
3880 (reparse_absdcl_as_casts): Likewise.
3881 * error.c (dump_type_real): Likewise.
3882 (dump_function_decl): Likewise.
3883 * friend.c (make_friend_class): Likewise.
3884 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
3885 * hash.h: Regenerated.
3886 * init.c (build_new_1): Remove support for signatures.
3887 * lang-options.h: Remove -fhandle-signatures,
3888 -fno-handle-signatures.
3889 * lex.c (init_parse): Remove support for signatures.
3890 (yyprint): Likewise.
3891 * lex.h (rid): Remove RID_SIGNATURE.
3892 * method.c (build_decl_overload_real): Remove support for
3894 (hack_identifier): Likewise.
3895 * parse.y (base_class): Likewise.
3896 (base_class.1): Likewise.
3897 (access_specifier): Likewise.
3898 * search.c (lookup_member): Likewise.
3899 * semantics.c (finish_qualified_object_call_expr): Likewise.
3900 (finish_template_type_parm): Likewise.
3901 (begin_class_definition): Likewise.
3902 (finish_base_specifier): Likewise.
3904 * tree.c (build_cplus_method_type): Remove support for signatures.
3905 * typeck.c (require_complete_type): Likewise.
3906 (c_sizeof): Likewise.
3907 (c_alignof): Likewise.
3908 (build_object_ref): Likewise.
3909 (build_component_ref): Likewise.
3910 (build_indirect_ref): Likewise.
3911 (build_c_cast): Likewise.
3912 (build_modify_expr): Likewise.
3913 (convert_for_initialization): Likewise.
3914 * typeck2.c (signature_error): Remove.
3915 (store_init_value): Remove support for signatures.
3916 (digest_init): Likewise.
3917 (build_x_arrow): Likewise.
3918 (build_functional_cast): Likewise.
3919 * xref.c (GNU_xref_decl): Likewise.
3921 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
3923 * lex.c (do_identifier): Remove unnecessary lookup of class field.
3925 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
3927 * decl2.c (set_decl_namespace): Do not complain about non-matching
3928 decls if processing a template.
3930 1999-08-09 Mark Mitchell <mark@codesourcery.com>
3932 * decl.c (build_ptrmemfunc_type): Handle qualified
3933 pointer-to-member types here.
3934 * tree.c (cp_build_qualified_type_real): Simplify handling here.
3936 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3938 * lex.c (lang_identify): Likewise.
3940 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
3942 * Makefile.in: Update dependencies.
3943 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
3945 * decl.c: Include "function.h"
3946 (cleanup_label, return_label): Delete declarations.
3947 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
3948 (finish_function): Rename last_parm_insn variable to
3949 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
3950 * decl2.c: Include "function.h".
3951 (rtl_expr_chain): Delete declaration.
3952 * method.c: Include "function.h"
3953 * tree.c (build_vbase_pointer_fields): Don't initialize
3954 DECL_SAVED_INSNS with NULL_RTX.
3955 * typeck.c: Include "function.h"
3957 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
3959 * semantics.c (begin_function_try_block, finish_function_try_block,
3960 finish_function_handler_sequence): New fns.
3961 * parse.y (function_try_block): Use them.
3962 * pt.c (instantiate_decl): Likewise.
3964 * cp-tree.h: Declare in_function_try_handler.
3965 * decl.c: Define it.
3966 (start_function): Clear it.
3967 (struct cp_function, push_cp_function_context): Save it.
3968 (pop_cp_function_context): Restore it.
3969 * parse.y (function_try_block): Set and clear it.
3970 * except.c (expand_end_catch_block): Rethrow if we reach the end
3971 of a function-try-block handler in a ctor or dtor.
3972 * typeck.c (c_expand_return): Complain about returning from a
3973 function-try-block handler of a ctor.
3975 * parse.y (function_try_block): Call end_protect_partials
3976 before expand_start_all_catch.
3978 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
3980 * decl.c (struct binding_level): Add eh_region field.
3981 (push_binding_level): Set it.
3982 (define_label): Complain about jumping into an EH block.
3984 * ptree.c (print_lang_type): Print the real type of a PMF.
3985 Print what exceptions a fn type throws.
3987 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3989 * class.c (count_fields, add_fields_to_vec): Add static prototype.
3991 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
3992 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
3995 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
3998 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
4001 * dump.c (queue_and_dump_index, dump_int, dump_string,
4002 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
4004 (dump_stmt): Add static prototype.
4006 * errfn.c (cp_thing): Constify a char*.
4008 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
4009 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
4010 dump_expr): Constify a char*.
4012 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
4013 read_line_number): Add static prototype.
4014 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
4015 (real_yylex): Move label `letter' into the scope where it is used.
4017 * method.c (build_mangled_template_parm_index, build_overload_int,
4018 build_decl_overload_real, get_id_2): Constify a char*.
4020 * search.c (check_final_overrider): Make static.
4022 * typeck.c (composite_pointer_type): Constify a char*.
4024 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
4026 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
4027 we're looking at a class.
4029 * decl.c (lookup_name_real): Set the complain flag if we're
4030 looking for a namespace member.
4032 * lex.c (real_yylex): We can have a number with no digits.
4034 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
4036 * search.c (binfo_from_vbase): New fn.
4037 * cp-tree.h: Declare it.
4038 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
4039 from pointer to member of virtual base.
4040 * typeck.c (get_delta_difference): Likewise.
4042 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
4044 * pt.c (tsubst): Use build_index_type to build in-template array
4045 index type. Fixes g++.oliva/dwarf1.C.
4046 * decl.c (grokdeclarator): Likewise, just for consistency, as it
4047 doesn't seem to trigger the bug without it.
4049 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
4051 * typeck2.c (add_exception_specifier): Use complete_type.
4053 1999-08-06 Mark Mitchell <mark@codesourcery.com>
4055 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
4056 (dump_binary_op): Bulletproof.
4057 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
4058 * tree.c (search_tree): Don't enumerate all the nodes of classes
4059 `1', `2', and `<'; handle them generically. Don't be sorry about
4060 "unrecognized tree codes"; just abort.
4061 (no_linkage_check): Don't do linkage checks for templates.
4063 * tree.c (cp_build_qualified_type_real): Handle
4064 pointer-to-member-function types correctly.
4066 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
4068 * decl.c (pushdecl): Only give an error for shadowing a parm
4069 from *this* function.
4071 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
4073 * typeck2.c: Update URLs and mail addresses.
4075 1999-08-04 Nathan Sidwell <nathan@acm.org>
4077 * cp-tree.h (empty_except_spec): New global var.
4078 (compexcepttypes): Remove prototype.
4079 (comp_except_specs): Prototype new global function.
4080 (add_exception_specifier): Prototype new global function.
4081 * decl.c (empty_except_spec): Define new global var.
4082 (duplicate_decls): Use comp_except_specs, reword error message.
4083 (init_decl_processing): Initialize empty_except_spec.
4084 Adjust build_exception_variant calls.
4085 * parse.y (exception_specification_opt): Use empty_except_spec.
4086 (ansi_raise_identifier): Call check_for_new_type.
4087 (ansi_raise_identifiers): Use add_exception_specifier.
4088 * pt.c (tsubst): Use add_exception_specifier to build exception
4090 * search.c (check_final_overrider): New static function, broken
4091 out of get_matching_virtual. Check throw specifiers, reword
4093 (get_matching_virtual): Use check_final_overrider.
4094 * tree.c (build_exception_variant): Use comp_except_specs.
4095 * typeck.c (compexcepttypes): Remove.
4096 (comp_except_types): New static function, helper for
4097 comp_except_specs. Compare two types as exception specifiers.
4098 (comp_except_specs): New global function, compare two exception
4100 (comptypes): Adjust for comp_except_specs.
4101 * typeck2.c (add_exception_specifier): New global function.
4103 * class.c (check_for_override): Reword error message.
4105 1999-08-03 Nathan Sidwell <nathan@acm.org>
4107 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
4108 * cp-tree.h (struct lang_type): Added non_pod_class flag.
4109 (CLASSTYPE_NON_POD_P): New macro to access it.
4110 * class.c (finish_struct_1): Determine non-PODness.
4111 Check for arrays of pointers (-Weffc++).
4112 Remove array inspection duplicated code.
4113 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
4114 Use CLASSTYPE_NON_POD_P.
4116 1999-08-03 Nathan Sidwell <nathan@acm.org>
4118 * class.c (duplicate_tag_error): Preserve template information.
4120 1999-08-03 Nathan Sidwell <nathan@acm.org>
4122 * decl.c (start_enum): Show location of previous definition.
4123 * parse.y (enumlist_opt): New reduction.
4124 (structsp): Simplify enum rules to use enumlist_opt.
4126 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
4128 * lex.c (yyprint): Handle PFUNCNAME.
4130 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
4131 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
4133 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
4135 * decl.c (start_decl): Set attributes before duplicate_decls call.
4137 1999-08-02 Mark Mitchell <mark@codesourcery.com>
4139 * Make-lang.in (CXX_SRCS): Add dump.c.
4140 * Makefile.in (CXX_OBJS): Add dump.o.
4141 (dump.o): New target.
4142 * cp-tree.h (DECL_CONV_FN_P): Document.
4143 (DECL_OVERLOADED_OPERATOR_P): New function.
4144 (TYPE_PTRMEM_CLASS_TYPE): New macro.
4145 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
4146 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
4147 (ASM_VOLATILE_P): New macro.
4148 (STMT_LINENO): Likewise.
4149 (cp_namespace_decls): New function.
4150 (dump_node_to_file): New function.
4151 * decl.c (cp_namespace_decls): New function.
4152 (walk_namespaces_r): Use it.
4153 (wrapup_globals_for_namespace): Likewise.
4154 * decl2.c (flag_dump_translation_unit): New variable.
4155 (lang_decode_option): Handle -fdump-translation-unit.
4156 (finish_file): If flag_dump_translation_unit is set, dump the
4159 * lang-options.h: Add -fdump-translation-unit.
4160 * pt.c (tsubst_template_parms): Robustify.
4161 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
4162 (tsubst_expr): Use STMT_LINENO.
4163 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
4164 for invalid cv-qualifiers even while building templates.
4166 1999-08-02 Richard Henderson <rth@cygnus.com>
4168 * call.c: Include defaults.h instead of expr.h.
4171 * typeck.c: Include defaults.h.
4173 1999-08-02 Mark Mitchell <mark@codesourcery.com>
4175 * lex.c (errorcount, sorrycount): Don't declare.
4176 * repo.c (errorcount, sorrycount): Likewise.
4177 * typeck2.c (errorcount, sorrycount): Likewise.
4179 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
4181 * call.c (convert_default_arg, build_over_call): Change all uses of
4182 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
4183 Ensure expr.h is included.
4184 * decl.c (grokparams): Ditto.
4185 * pt.c (tsubst_decl): Ditto.
4186 * typeck.c (convert_arguments): Ditto.
4188 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
4190 * class.c (mark_overriders): Fix order of args to overrides.
4191 (warn_hidden): Likewise. Fix for having virtual and non-virtual
4192 functions with the same name.
4194 1999-08-02 Richard Henderson <rth@cygnus.com>
4196 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
4198 1999-08-01 Mark Mitchell <mark@codesourcery.com>
4200 * call.c (build_conditional_expr): Fix typo in comment.
4202 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
4204 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
4205 case_stack; use in_control_zone_p.
4206 * typeck.c (c_expand_return): Likewise.
4208 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
4210 * except.c (catch_clauses): Delete declaration.
4212 1999-07-30 Mark Mitchell <mark@codesourcery.com>
4214 * call.c (build_conditional_expr): Call convert_from_reference to
4215 avoid reference/non-reference type confusion. Fix typo.
4217 1999-07-30 Richard Henderson <rth@cygnus.com>
4219 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
4220 * cp-tree.h (initializer_constant_valid_p): Remove.
4222 1999-07-28 Mark Mitchell <mark@codesourcery.com>
4224 * call.c (conditional_conversion): Don't build BASE_CONVs for
4225 conversions between things that have the same type.
4226 (build_conditional_expr): Tweak.
4227 (convert_like): Some BASE_CONVs really do require the generation
4230 * init.c (perform_member_init): Don't go through build_modify_expr
4231 for simple initializations.
4233 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
4235 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
4236 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
4237 virtual functions and MI. Simplify.
4239 * method.c: Remove prototype for largest_union_member.
4240 * pt.c (determine_specialization): Fix uninitialized warning.
4241 * lex.c (real_yylex): Likewise.
4243 1999-07-27 Mark Mitchell <mark@codesourcery.com>
4245 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
4248 * cp-tree.h (BINFO_VIRTUALS): Document new format.
4249 * class.c (modify_one_vtable): Change prototype accordingly.
4250 (modify_all_vtables): Likewise.
4251 (modify_all_direct_vtables): Likewise.
4252 (modify_all_indirect_vtables): Likewise.
4253 (build_vtable_entry_for_fn): New function.
4254 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
4255 (modify_vtable_entry): Likewise.
4256 (add_virtual_function): Likewise.
4257 (build_vtbl_initializer): New function.
4258 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
4259 (fixup_vtable_deltas1): Likewise.
4260 (fixup_vtable_deltas): Likewise.
4261 (override_one_vtable): Likewise.
4262 (finish_struct_1): Likewise.
4264 * error.c (dump_expr): Likewise.
4265 * search.c (get_abstract_virtuals_1): Likewise.
4266 (get_abstract_virtuals): Likewise.
4267 (expand_upcast_fixups): Likewise.
4268 * tree.c (debug_binfo): Likewise.
4269 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
4270 __pure_virtual here.
4272 1999-07-26 Mark Mitchell <mark@codesourcery.com>
4274 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
4275 as per 1999-07-26 change.
4277 * typeck.c (c_sizeof): Don't allow non-static data members.
4278 (expr_sizeof): Likewise.
4280 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
4282 * input.c (feed_input): Only touch lineno and input_filename
4283 if !USE_CPPLIB. Save the old values before setting the new ones.
4285 * input.c (feed_input): Add file, line parms.
4286 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
4287 (real_yylex): Check linemode before input_redirected().
4289 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
4290 from op new to warning.
4292 1999-07-26 Mark Mitchell <mark@codesourcery.com>
4294 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
4295 * call.c: All uses changed.
4296 * typeck.c: Likewise.
4298 1999-07-26 Nathan Sidwell <nathan@acm.org>
4300 * exception.cc (__cplus_type_matcher): Match __eh_matcher
4303 1999-07-26 Mark Mitchell <mark@codesourcery.com>
4305 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
4306 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
4307 (strip_top_quals): Declare.
4308 (ncp_convert): Likewise.
4309 (type_after_usual_arithmetic_converions): Likewise.
4310 (composite_pointer_type): Likewise.
4311 * call.c (strip_top_quals): Don't make it static.
4312 (promoted_arithmetic_type_p): New function.
4313 (conditional_conversion): Likewise.
4314 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
4315 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
4316 for converting a type to itself.
4317 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
4318 (implicit_conversion): Make sure the from and to types are
4320 (add_builtin_candidate): Correct handling of ?: operator.
4321 (add_builtin_candidates): Improve documentation.
4322 (build_conditional_expr): New function.
4323 (can_convert): Implement in terms of can_convert_arg.
4324 (ncp_convert): New function.
4325 * typeck.c (type_after_usual_arithmetic_conversions): New
4326 function, split out from common_type.
4327 (composite_pointer_type): New function, split out from
4328 build_conditional_expr.
4329 (common_type): Use type_after_usual_arithmetic_conversions.
4330 Remove redundant attribute merging.
4331 (comptypes): Tidy. Handle COMPLEX_TYPE.
4332 (build_binary_op_nodefault): Use null_ptr_cst_p.
4333 (build_conditional_expr): Remove.
4334 (convert_for_assignment): Use new conversion functions.
4336 * cp-tree.h (abstract_virtuals_error): Change declaration.
4337 * typeck2.c (abstract_virtuals_error): Check to see if an error
4338 ocurred, and return a boolean value accordingly.
4339 (build_functional_cast): Adjust accordingly.
4340 * class.c (finish_struct_1): Likewise.
4341 * cvt.c (ocp_convert): Likewise.
4342 * decl.c (cp_finish_decl): Likewise.
4343 (grokparams): Likewise.
4344 (grok_op_properties): Likewise.
4345 (start_function): Likewise.
4346 * init.c (build_new_1): Likewise.
4348 * pt.c (unify): Don't get confused by pointers-to-member functions.
4350 * search.c (build_cplus_new): Robustify.
4352 1999-07-24 Richard Henderson <rth@cygnus.com>
4354 * gxx.gperf (__builtin_va_arg): New.
4355 * parse.y (VA_ARG): New token.
4356 (unary_expr): Recognize it.
4358 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
4360 * g++FAQ.texi: Deleted per Joe Buck's request.
4361 * Makefile.in: Corresponding changes.
4363 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
4365 * lex.c: Sync with C frontend.
4366 (whitespace_cr): New fn.
4367 (skip_white_space): Use it.
4368 (init_parse): Reorder.
4369 (yyprint): Support CONSTANT.
4370 (pragma_getc, pragma_ungetc): Bring back.
4371 (read_line_number): Change in_system_header directly.
4372 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
4373 (parse_float): Update to C version.
4374 (yylex): Handle '$' under the letter case.
4375 Remove looking_for_typename handling.
4376 Support hex floating point constants.
4377 Follow C's lead for choosing type of integer constants.
4378 Rearrange stuff to match C frontend.
4379 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
4380 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
4382 1999-07-23 Mark Mitchell <mark@codesourcery.com>
4384 * call.c (reference_binding): Tweak.
4385 (mayble_handle_implicit_object): Use direct_reference_binding to
4386 create the right implicit conversion sequence.
4388 1999-07-22 Mark Mitchell <mark@codesourcery.com>
4390 * pt.c (convert_nontype_argument): Don't call decl_constant_value
4391 if we're converting to a reference type.
4393 * call.c (NEED_TEMPORARY_P): New macro.
4394 (standard_conversion): Set it, for derived-to-base conversions.
4395 (reference_related_p): New function.
4396 (reference_compatible_p): Likewise.
4397 (convert_class_to_reference): Likewise.
4398 (direct_reference_binding): Likewise.
4399 (reference_binding): Rework for standards-compliance.
4400 (convert_like): Adjust accordingly.
4401 (maybe_handle_ref_bind): Simplify; the right conversion sequences
4402 are now built up in reference_binding.
4403 (initialize_reference): New function.
4404 * cp-tree.h (ICS_USER_FLAG): Document.
4405 (ICS_THIS_FLAG): Likewise.
4406 (ICS_BAD_FLAG): Likewise.
4407 (NEED_TEMPORARY_P): Likewise.
4408 (cp_lvalue_kind): New type.
4409 (real_lvalue_p): Return it.
4410 * error.c (dump_expr): Provide more accurate representation for
4412 * init.c (expand_default_init): Do not try to perform implicit
4413 conversions for a brace-enclosed initializer.
4414 * search.c (lookup_conversions): Document.
4415 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
4417 (real_lvalue_p): Adjust accordingly.
4418 (lvalue_p): Likewise.
4419 (build_cplus_new): Don't allow the creation of an abstract class.
4420 * typeck.c (convert_for_initialization): Use initialize_reference.
4422 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
4424 * lex.c (real_yylex) : Correct the test for overflow when lexing
4427 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
4429 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
4430 not DECL_BUILT_IN, to determine if a function is internally declared.
4431 (duplicate_decls): Likewise. Improve handling of builtins.
4432 (push_overloaded_decl): Remove special handling of builtins.
4434 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
4436 * decl.c (grokdeclarator): Pull out decl_constant_value in
4439 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
4440 * cp-tree.h, pt.c, semantics.c: Adjust.
4441 * method.c (largest_union_member): Remove.
4443 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
4445 * lex.c (token_getch, token_put_back): New fns.
4446 (real_yylex): Use them.
4448 * lex.c (lang_init): Generalize.
4449 (lang_init_options): Tell cpplib this is C++.
4450 (nextchar): Remove. Replace uses with put_back.
4451 (skip_white_space): Handle linemode here. Optimize for cpplib.
4452 (extend_token_buffer_to): New fn.
4453 (extend_token_buffer): Use it.
4454 (read_line_number, check_newline): Just deal with tokens.
4455 (real_yylex): More cpplib optimizations. Simplify. Don't produce
4456 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
4457 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
4458 * parse.y (PAREN_STAR_PAREN): Remove.
4459 * input.c: Don't use the putback machinery with cpplib.
4460 (sub_getch): Fold back into getch.
4461 (getch): Don't handle linemode here.
4462 (feed_input): Unget any text in the token buffer.
4464 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
4465 nextyychar, nextyylval): Remove.
4467 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
4468 Jason Merrill <jason@yorick.cygnus.com>
4470 * lex.c (indent_level): New variable.
4471 (init_parse): Set cpp_token to CPP_DIRECTIVE.
4472 (consume_string): Make this smart about USE_CPPLIB.
4473 (yyungetc): Use put_back function.
4474 (pragma_getc, pragma_ungetc): Functions deleted.
4475 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
4476 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
4478 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
4479 Also, clean up cases where we redundantly set token_buffer[0].
4480 (read_line_number): New fn.
4481 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
4482 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
4483 (sub_getch): Conditionalize out code that's not appropriate if
4485 (put_back): Rewrite in case USE_CPPLIB is defined.
4486 (input_redirected): Ditto.
4488 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
4490 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
4491 c_global_trees and accessor macros defined in c-common.h.
4492 (cp_tree_index): New enumeration.
4493 (cp_global_trees): Declare new array. Add accessor macros for it, and
4494 delete declarations of tree nodes replaced by it.
4495 (builtin_function): Delete macro, add declaration for new function.
4497 * decl.c: Delete definitions for tree nodes that were replaced by
4498 cp_global_trees and c_global_trees.
4499 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
4500 to generate the common builtins here.
4501 (builtin_function): New function.
4502 * decl2.c (abort_fndecl): Delete declaration.
4503 * except.c (expand_builtin_return_address): Delete declaration.
4504 (builtin_return_address_fndecl): Delete variable.
4505 (const_ptr_type_node): Delete declaration.
4506 * lex.c (cons_up_default_function): Delete declaration of
4508 * parse.y (void_list_node): Delete declaration.
4509 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
4511 (const_string_type_node): Delete declaration.
4512 * search.c (abort_fndecl): Delete declaration.
4513 * Makefile.in: Update dependencies.
4515 1999-07-19 Mark Mitchell <mark@codesourcery.com>
4517 * pt.c (check_default_tmpl_args): Move test for missing default
4518 arguments here, from ...
4519 (end_template_parm_list): Here.
4521 1999-07-18 Mark Mitchell <mark@codesourcery.com>
4523 * decl.c (lookup_nested_type): Remove.
4524 (pushtag): Don't call it.
4526 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
4528 * Makefile.in (INTERFACE): Bump to 2.
4530 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
4532 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
4533 instructions to gcc.gnu.org. Removed e-mail address.
4535 1999-07-17 Mark Mitchell <mark@codesourcery.com>
4537 * pt.c (determine_specialization): Tighten error-checking.
4538 (end_template_parm_list): Likewise.
4540 1999-07-14 Mark Mitchell <mark@codesourcery.com>
4542 * pt.c (check_default_tmpl_args): Handle friends defined in the
4543 class just like member functions defined in the class.
4545 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
4546 Jason Merrill <jason@yorick.cygnus.com>
4548 * cp-tree.h (struct lang_decl): Added field for storing sorted
4549 FIELD_DECLs (used in TYPE_DECLs).
4550 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
4551 (DECL_SORTED_FIELDS): New macro.
4552 * class.c (method_name_cmp): New function.
4553 (finish_struct_methods): Modified to support sorting and searching
4555 (finish_struct_anon): Changed code in inner loop to use ELT rather
4556 than UELT (which required an extra indirection for every reference).
4557 (field_decl_cmp): New function to support sorting FIELD_DECLs.
4558 (finish_struct_1): Sort fields.
4559 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
4560 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
4561 Also, switch to using array indexing rather than a changing pointer.
4562 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
4565 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
4567 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
4568 casts in system headers or extern "C" blocks.
4570 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
4573 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
4575 * decl2.c (write_virtuals): Deleted declaration.
4576 * cp-tree.h (write_virtuals): Deleted extern declaration.
4577 * class.c (finish_struct_1): Removed #if 0'd code that mentions
4579 * semantics.c (begin_class_definition): Rewrite code to not depend
4582 * lex.c (cp_pragma_interface): New function.
4583 (cp_pragma_implementation): Likewise.
4584 (handle_cp_pragma): Call them.
4586 * typeck.c (comptypes): Simplify C code in look_hard.
4588 * xref.c (PALLOC): Use xcalloc, not calloc.
4589 (SALLOC): Use xmalloc, not malloc.
4591 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
4593 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
4596 * decl.c (duplicate_decls): If a redeclaration doesn't match the
4597 initial declaration, then don't save the inline info and by all
4598 means don't mark the function as a builtin function.
4600 * decl.c (lookup_name_real): Set NONCLASS to 1 if
4601 CURRENT_CLASS_TYPE is 0.
4603 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
4606 * ptree.c (print_lang_type): Added vtable-needs-writing.
4608 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
4610 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
4612 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
4614 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4615 Merged into c-common.
4617 1999-07-05 Dave Brolley <brolley@cygnus.com>
4619 * lex.c (errorcount): Declare it.
4620 (finish_parse): Update errorcount for when using CPPLIB.
4622 1999-07-05 Mark Mitchell <mark@codesourcery.com>
4624 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
4626 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
4627 * decl.c (push_class_binding): Use it.
4628 (lookup_name_real): Likewise.
4630 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
4632 * cp-tree.h (widest_integer_literal_type_node,
4633 widest_unsigned_literal_type) : New.
4634 * decl.c (widest_integer_literal_type_node,
4635 widest_unsigned_literal_type) : New.
4636 (init_decl_processing): Handle/use the two new types.
4637 * lex.c (real_yylex): Same.
4638 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4641 1999-07-01 Mark Mitchell <mark@codesourcery.com>
4643 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
4644 to anonymous cv-qualified types.
4646 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
4648 * lex.c (real_yylex) : Change integer literal overflow handling to
4651 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
4653 1999-06-28 Richard Henderson <rth@cygnus.com>
4655 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
4657 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
4659 * error.c (dump_type_real): Handle TREE_LIST again.
4661 * typeck.c (comp_target_parms): Don't complain about
4662 converting from () to (...) if !flag_strict_prototype.
4664 * decl.c (grokdeclarator): Update the names of all variants when
4667 1999-06-21 Mark Mitchell <mark@codesourcery.com>
4669 * init.c (expand_aggr_vbase_init): Rename to
4670 construct_virtual_bases. Conditionalize construction here,
4672 (emit_base_init): Here.
4674 1999-06-19 Mark Mitchell <mark@codesourcery.com>
4676 * semantics.c (finish_asm_statement): Apply decay conversions to
4679 * decl.c (expand_static_init): When building an anonymous function
4680 for use with atexit, compute its body before and after entering
4683 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
4686 1999-06-18 Mark Mitchell <mark@codesourcery.com>
4688 * init.c (expand_aggr_vbase_init): Add flag parameter.
4689 (build_partial_cleanup_for): Remove, inlining into ..
4690 (expand_cleanup_for_base): ... here. Take flag parameter.
4691 (emit_base_init): Pass the in_chrg parameter to
4692 emit_aggr_vbase_init.
4693 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
4695 1999-06-16 Mark Mitchell <mark@codesourcery.com>
4697 * decl2.c (import_export_decl): Use same_type_p, rather than
4698 relying on pointer-equality for types.
4700 * method.c (do_build_copy_constructor): Simplify.
4702 * call.c (build_method_call): Remove bogus code for two-argument
4704 * init.c (build_new_1): Expand on comment, and remove dead code.
4706 * init.c (expand_cleanup_for_base): New function, split out
4708 (emit_base_init): Here.
4709 (expand_aggr_vbase_init): Use it.
4711 1999-06-15 Mark Mitchell <mark@codesourcery.com>
4713 * cp-tree.h (class_cache_firstobj): Declare.
4714 (maybe_push_cache_obstack): Rename to push_cache_obstack.
4715 * class.c (permanent_obstack): Remove declaration.
4716 (class_cache_firstobj): Make it global.
4717 (add_method): Don't use permanent_obstack directly.
4718 (pushclass): Only free the class_cache_obstack if we know how far
4720 (maybe_push_cache_obstack): Rename to push_cache_obstack.
4721 * decl.c: Remove dead comment.
4722 (saved_scope): Add class_cache_firstobj.
4723 (push_to_top_level): Save it.
4724 (pop_from_top_level): Restore it.
4725 (push_class_level_binding): Use push_cache_obstack, not
4726 maybe_push_cache_obstack.
4727 * search.c (push_class_decls): Likewise.
4729 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
4731 * pt.c (tsubst_friend_function): Push into namespace of friend
4732 function before pushdecl'ing it.
4734 1999-06-14 Nathan Sidwell <nathan@acm.org>
4736 * call.c (build_new_op): Remove REF_BIND from all operands.
4738 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
4740 * init.c (build_new_1): Look up operator delete even if there was
4741 no explicit new placement.
4743 1999-06-08 Nathan Sidwell <nathan@acm.org>
4745 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
4747 (build_throw): ... here. Call it.
4748 (process_start_catch_block): Call it.
4750 1999-06-07 Mark Mitchell <mark@codesourcery.com>
4752 * search.c (convert_pointer_to_single_level): Reimplement without
4755 1999-06-06 Mark Mitchell <mark@codesourcery.com>
4757 * method.c (is_back_referenceable_type): Back-reference bools when
4760 1999-06-07 Dave Brolley <brolley@cygnus.com>
4762 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
4763 * input.c (putback_buffer): New structure type.
4764 (putback): Replaces putback_char member.
4765 (putback): Replaces putback_char static variable.
4766 (feed_input): Use putback.
4767 (end_input): Use putback.
4768 (sub_getch): Use putback.
4769 (put_back): Use putback.
4771 1999-06-05 Mark Mitchell <mark@codesourcery.com>
4773 * decl.c (grokdeclarator): Fix typo in last change.
4775 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
4777 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
4778 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
4780 1999-06-04 Nathan Sidwell <nathan@acm.org>
4782 * except.c (build_throw): Check throw expression validity.
4784 1999-06-03 Mark Mitchell <mark@codesourcery.com>
4786 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
4787 just because flag_signed_bitfields is false.
4789 1999-06-03 Nathan Sidwell <nathan@acm.org>
4791 * semantics.c (begin_class_definition): Update the struct's
4793 * class.c (finish_struct): ... rather than here.
4795 * decl.c (make_typename_type): Don't rely on uninitialized
4798 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4800 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
4802 1999-05-31 Mark Mitchell <mark@codesourcery.com>
4804 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
4805 and friends rather than messing with current_obstack directly.
4806 (cp_build_qualified_type_real): Rework ARRAY_TYPE
4807 allocation to match practice throughout the rest of the
4810 1999-05-30 Mark Mitchell <mark@codesourcery.com>
4812 * lex.c (make_lang_type): Create TYPE_BINFO for
4813 TEMPLATE_TYPE_PARMs just like for non-template types.
4815 * decl.c (start_decl): Move checks on initialization to ...
4816 (cp_finish_decl): Here. Tidy formatting slightly.
4818 1999-05-28 Mark Mitchell <mark@codesourcery.com>
4820 * decl.c (add_binding): Don't complain about a redeclaration of a
4821 semantically identical typedef in a local scope.
4823 1999-05-28 Nathan Sidwell <nathan@acm.org>
4825 * decl.c (complete_array_type): Allocate off same obstack. Fix
4826 DO_DEFAULT comment to match reality.
4828 * friend.c (make_friend_class): Fix diagnostic typo.
4830 1999-05-28 Mark Mitchell <mark@codesourcery.com>
4832 * decl.c (lookup_namespace_name): Handle getting a
4834 (expand_static_init): Don't call pushdecl for implicitly declared
4835 `atexit' used to register destructors.
4837 1999-05-25 Mark Mitchell <mark@codesourcery.com>
4839 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
4842 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
4843 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
4844 by combining TEMPLATE_INFO and LEVEL into a single union.
4845 (DECL_TEMPLATE_INFO): Reformat.
4846 (DECL_SAVED_TREE): Document.
4847 (DECL_TEMPLATE_INJECT): Remove.
4848 * class.c (finish_struct): Remove code to deal with
4849 DECL_TEMPLATE_INJECT.
4851 * decl.c (maybe_process_template_type_declaration): Handle all new
4852 types in templates uniformly.
4853 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
4855 * pt.c (lookup_template_class): Inject template instantiations of
4856 forward-declarations.
4857 (instantiate_class_template): Remove code processing
4858 DECL_TEMPLATE_INJECT.
4860 * pt.c (lookup_template_class): Tweak lookup to find member
4863 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
4865 * semantics.c (finish_asm_stmt): Make strings permanent if they're
4868 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
4870 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
4871 parts of pointer to data member types.
4873 1999-05-24 Mark Mitchell <mark@codesourcery.com>
4875 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
4876 and then make it look like `abort'. Just use `abort' instead.
4878 * typeck.c (build_static_cast): Don't allow static_casts that cast
4880 (casts_away_constness_r): New function.
4881 (casts_away_constness): Likewise.
4883 * decl.c (lookup_tag): Remove code no longer needed after
4884 name-lookup improvements.
4885 * decl2.c (handle_class_head): Make error-recovery more robust.
4886 * friend.c (make_friend_class): Reject templated typename types.
4887 * lex.c (is_global): A template parameter isn't global.
4888 * parse.y (class_head): Robustify.
4889 * parse.c: Regenerated.
4891 1999-05-22 Mark Mitchell <mark@codesourcery.com>
4893 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
4894 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
4896 * cp-tree.h (push_nested_namespace): Declare.
4897 (pop_nested_namespace): Likewise.
4898 * decl.c (push_nested_namespace): New function.
4899 (pop_nested_namespace): Likewise.
4900 * pt.c (instantiate_class_template): Use them.
4902 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
4904 * cp-tree.h (cplus_expand_constant): Declare.
4905 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
4906 converted from one pointer-to-object type to another.
4907 * expr.c (cplus_expand_constant): Don't make it static.
4908 * typeck.c (build_component_ref): Don't crash when presented with
4909 a component which is a TEMPLATE_DECL.
4910 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
4911 cast from a pointer-to-member constant to its own type does not
4912 result in a valid non-type template argument.
4914 1999-05-21 Mark Mitchell <mark@codesourcery.com>
4915 Nathan Sidwell <nathan@acm.org>
4917 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
4918 * cp-tree.h: Fix typo in documentation on pointers-to-members.
4919 (cp_build_qualified_type): Make it a macro.
4920 (cp_build_qualified_type_real): Declare.
4921 * decl.c (grokdeclarator): Remove misleading comment. Avoid
4922 problem with template parameters and restrict-qualification.
4923 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
4924 * hash.h: Regenerated.
4925 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
4927 (NORID): Remove definition.
4928 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
4929 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
4930 (fn_type_unification): Check that the function type resulting from
4931 the deduction is legal.
4932 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
4933 (unify): Use cp_build_qualified_type_real.
4934 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
4935 (cp_build_qualified_type): Rename to ...
4936 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
4937 and modify appropriately.
4939 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
4940 reveal optimization opportunities.
4942 * pt.c (tsubst): Don't issue error messages when we're not
4943 complaining, even if we see a qualified function type.
4944 (check_cv_quals_for_unify): Don't allow a qualified function
4947 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
4949 * class.c (instantiate_type): Downgrade errors for object-dependent
4950 memfn refs to pedwarn.
4952 1999-05-20 Mark Mitchell <mark@codesourcery.com>
4954 * decl.c (grokdeclarator): Don't treat [] as indicating a
4955 zero-sized array in a typedef.
4957 * call.c (build_object_call): Don't look at DECL_NAME for a type.
4958 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
4959 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
4961 * pt.c (for_each_template_parm): Rework to match documentation.
4962 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
4964 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
4966 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
4968 * class.c (finish_base_struct): Allow non-COM bases for COM classes
4969 except at the leftmost position.
4970 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
4971 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
4972 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
4974 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
4975 (build_cplus_new): Make sure that what we return is of the right type.
4977 1999-05-20 Mark Mitchell <mark@codesourcery.com>
4979 * cp-tree.h (make_ptrmem_cst): New function.
4980 * expr.c (cplus_expand_constant): Split out from ...
4981 (cplus_expand_expr): Here. Use cplus_expand_constant.
4982 (init_cplus_expand): Set lang_expand_constant.
4983 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
4985 * tree.c (make_ptrmem_cst): Define.
4986 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
4987 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
4989 1999-05-19 Mark Mitchell <mark@codesourcery.com>
4991 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
4993 * decl2.c (start_static_storage_duration_function): Fix comment.
4994 (finish_file): Create static storage duration functions lazily.
4996 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
4998 Implement anonymous structs.
4999 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
5000 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
5001 * class.c (finish_struct_1): Remove redundant check for anon struct.
5002 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
5003 (check_tag_decl): Check for anonymous struct here.
5004 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
5005 * init.c (sort_member_init, emit_base_init): Handle getting fields
5006 as well as names in current_member_init_list.
5007 (perform_member_init): Handle getting an anon aggr.
5008 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
5009 (do_build_copy_constructor): Likewise.
5011 1999-05-19 Mark Mitchell <mark@codesourcery.com>
5013 * tree.c (cp_build_qualified_type): Don't allow qualified function
5016 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
5018 * gxxint.texi: Fix typo.
5020 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
5022 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
5023 * class.c (finish_struct_1): Use CLASS_TYPE_P.
5024 * ptree.c (print_lang_type): Likewise.
5025 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
5027 * typeck2.c (digest_init): Likewise.
5029 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
5031 * call.c (joust): Compare the types of the conv ops, not the
5032 target types of the conversions.
5034 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
5036 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
5039 1999-05-17 Mark Mitchell <mark@codesourcery.com>
5041 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
5042 * decl.c (grokfndecl): Don't allow inline declarations of friend
5043 template specializations, or friend template specializations with
5045 * pt.c (tsubst): Handle substitution into array types that does
5046 not yield a fixed upper bound, even when not processing a
5048 (tsubst_copy): Deal with the fact that the second operand to a
5049 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
5050 * search.c (marked_pushdecls_p): Don't descend into
5051 TEMPLATE_TYPE_PARMs and the like.
5052 (unmarked_pushdecls_p): Likewise.
5054 * call.c (build_over_call): Don't throw away
5055 initializations/copies of empty classes; use MODIFY_EXPR and
5056 INIT_EXPR as for non-empty classes.
5057 * class.c (finish_struct_1): Put the padding byte for an empty
5058 class on the TYPE_NONCOPIED_PARTS list for the class.
5060 1999-05-16 Mark Mitchell <mark@codesourcery.com>
5062 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
5063 indicate a reference to a field that is a qualified name.
5065 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
5067 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
5068 ASM_OUTPUT_CONSTRUCTOR.
5070 * friend.c (do_friend): Add attrlist arg. Remove support for
5071 getting a non-decl as 'decl'.
5072 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
5074 (grokdeclarator): Adjust.
5075 * cp-tree.h: Adjust.
5077 1999-05-16 Mark Mitchell <mark@codesourcery.com>
5079 * cp-tree.h (permanent_p): New function.
5080 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
5081 possibly complex tree node.
5082 * tree.c (mapcar): Adjust comments, and follow coding standards in
5084 (permanent_p): New function.
5086 1999-05-13 Per Bothner <bothner@cygnus.com>
5088 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
5089 primitive Java types, if we actually see `extern "Java"'.
5091 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5093 * lang-specs.h: Pass -$ to the preprocessor.
5095 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
5097 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
5098 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
5099 (resolve_offset_ref): Don't handle a raw baselink.
5100 * cvt.c (build_expr_type_conversion): Likewise.
5101 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
5102 convert_for_initialization): Likewise.
5103 * class.c (instantiate_type): Handle seeing a baselink under an
5105 * error.c (dump_expr): Likewise.
5106 * pt.c (for_each_template_parm): Likewise.
5107 (resolve_overloaded_unification): Likewise.
5108 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
5109 * typeck.c (expr_sizeof): Also complain about other permutations
5110 of overloaded functions.
5112 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
5114 * init.c (resolve_offset_ref): Don't return a raw method.
5116 * typeck.c (decay_conversion): Don't handle a raw method.
5117 Resolve all OFFSET_REFs.
5118 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
5119 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
5120 same_type_p for pmf bits. Don't use build_binary_op to compare
5121 raw pointers to methods.
5122 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
5123 to decide when to call resolve_offset_ref.
5124 (build_c_cast, convert_for_initialization): Likewise.
5125 * cvt.c (build_expr_type_conversion): Likewise.
5127 1999-05-06 Nathan Sidwell <nathan@acm.org>
5129 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
5131 1999-05-05 Mark Mitchell <mark@codesourcery.com>
5133 * decl2.c (start_objects): Don't let static constructors and
5134 destructors get inlined.
5136 * parse.y (nested_name_specifier): Make sure ordinary types are
5137 complete, just like template types.
5138 * parse.c: Regenerated.
5140 * pt.c (check_explicit_specialization): Improve error messages.
5142 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
5144 * typeck.c (string_conv_p): Use same_type_p to check whether we
5145 try to convert between char and wchar_t.
5147 1999-05-03 Mark Mitchell <mark@codesourcery.com>
5149 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
5150 lookup to error_mark_node here.
5151 (lookup_member): Revise documentation. Add comments. Don't set
5152 the TREE_TYPE to error_mark_node here, and don't build up an extra
5153 TREE_LIST for ambiguous lookups.
5154 (setup_class_bindings): Adjust accordingly.
5155 (push_class_decls): Revise out-of-date comments.
5157 * typeck.c (build_const_cast): Tighten checks for legality.
5159 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
5161 * init.c (build_member_call): Lookup names coming from
5162 namespace-scoped LOOKUP_EXPR.
5164 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
5166 * gxxint.texi: Add documentation for 'I'.
5168 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
5170 * tinfo.cc (operator==): Qualify type_info with std::.
5172 1999-05-02 Mark Mitchell <mark@codesourcery.com>
5174 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
5175 (DECL_COMDAT): Remove definition.
5177 1999-05-01 Mark Mitchell <mark@codesourcery.com>
5179 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
5182 1999-04-30 Mark Mitchell <mark@codesourcery.com>
5184 * class.c (build_vtable): Use build_lang_decl when building
5185 vtables, not just build_decl.
5186 (prepare_fresh_vtable): Likewise.
5187 * decl.c (wrapup_globals_for_namespace): Mark vtables as
5188 DECL_EXTERNAL when calling wrapup_global_declarations.
5189 * decl2.c (priority_info_s): Add initializations_p and
5190 destructions_p members.
5191 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
5192 when deciding what vtables to write out.
5193 (ssdf_decls): New variable.
5194 (ssdf_decls_used): Likewise.
5195 (start_static_storage_duration_function): Deal with being called
5196 multiple times. Avoid inlining this function.
5197 (generate_inits_for_priority): Deal with reuse of priority map.
5198 (get_priority_info): Clear initializations_p and destructions_p.
5199 (do_static_initialization): Tweak comment.
5200 (do_static_destruction): Likewise. Fix condition on sentries for
5202 (generate_ctor_or_dtor_function): Call all of the static storage
5204 (generate_ctor_or_dtor_function_for_priority): Check
5205 initializations_p and destructions_p to see what priorities need
5206 initialization functions.
5207 (finish_file): Rework to generate multiple static storage duration
5208 functions, rather than just one.
5210 * typeck.c (build_const_cast): Tweak last change to handle
5211 templates correctly.
5213 * typeck.c (build_const_cast): Disallow use of const_cast to
5214 anything but a pointer or reference type.
5216 1999-04-30 Nathan Sidwell <nathan@acm.org>
5218 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
5221 1999-04-29 Mark Mitchell <mark@codesourcery.com>
5223 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
5224 (finish_file): Indent comments properly.
5226 1999-04-29 Richard Henderson <rth@cygnus.com>
5228 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
5229 (do_static_destruction): Likewise.
5231 1999-04-29 Nathan Sidwell <nathan@acm.org>
5233 * cp-tree.h (TYPE_NOTHROW_P): New macro.
5234 * decl2.c (delete_sanity): Warn on deleting void *.
5235 * init.c (build_new_1): Use TYPE_NOTHROW_P.
5236 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
5237 throwing operator new.
5239 1999-04-28 Nathan Sidwell <nathan@acm.org>
5241 * cp-tree.h (build_component_addr): Remove prototype.
5242 * typeck.c (build_component_addr): Make static. Remove MSG
5244 (build_component_addr): Remove MSG parameter, clean up
5246 (build_x_function_call): Use cp_error.
5247 (build_unary_op): Adjust call of build_component_addr.
5249 1999-04-28 Mark Mitchell <mark@codesourcery.com>
5251 * pt.c (tsubst_friend_class): Check for NULL.
5253 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5255 * search.c (binfo_for_vtable): Initialize bfvi.var.
5257 1999-04-27 Nathan Sidwell <nathan@acm.org>
5259 * rtti.c (build_x_typeid): Check rtti is enabled.
5261 1999-04-26 Mark Mitchell <mark@codesourcery.com>
5263 * search.c (is_subobject_of_p): Make sure we're looking at the
5266 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
5268 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
5270 1999-04-23 Mark Mitchell <mark@codesourcery.com>
5272 * decl2.c (finish_file): Tweak handling of extern inlines so that
5273 they are not unnecessarily put out.
5275 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
5276 such as base classes.
5278 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
5280 * tree.c (build_exception_variant): Fix typo: use the chain of U,
5281 not trying V, while cycling through U.
5283 1999-04-22 Mark Mitchell <mark@codesourcery.com>
5285 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
5286 preserves_first_arg. Enlarge dummy accordingly.
5287 (DECL_TINFO_FN_P): New macro.
5288 (SET_DECL_TINFO_FN_P): Likeiwse.
5289 (DECL_RETURNS_FIRST_ARG): Remove.
5290 (DECL_PRESERVES_THIS): Likewise.
5291 (DECL_INIT_PRIORITY): New macro.
5292 (finish_struct_1): Change prototype.
5293 (cat_namespace_levels): Remove prototype.
5294 (vtable_decl_p): New prototype.
5295 (vtype_decl_p): Likewise.
5296 (sigtable_decl_p): Likewise.
5297 (walk_globals_pred): New typedef.
5298 (walk_globals_fn): Likewise.
5299 (walk_globals): New prototype.
5300 (walk_namespaces_fn): New typedef.
5301 (walk_namespaces): New prototype.
5302 (wrapup_globals_for_namespace): Likewise.
5303 (walk_vtables): Remove prototype.
5304 (walk_sigtables): Likewise.
5305 (instantiate_pending_templates): New prototype.
5306 * class.c (finish_struct_1): Don't return a value.
5307 * decl.h (pending_statics): Remove declaration.
5308 * decl.c (walk_namespaces_r): New function.
5309 (walk_globals_r): Likewise.
5310 (vtable_decl_p): Likewise.
5311 (vtype_decl_p): Likewise.
5312 (sigtable_decl_p): Likewise.
5313 (walk_namespaces): Likewise.
5314 (walk_globals_data): New type.
5315 (walk_globals): New function.
5316 (wrapup_globals_for_namespace): Likewise.
5317 (expand_static_init): Remove assertion. Remove redundancy in
5318 conditional. Don't put static data members in static_aggregates
5320 (finish_function): Remove redundancy in conditional. Don't set
5321 DECL_RETURNS_FIRST_ARG.
5322 (cat_namespace_levels): Remove.
5323 * decl2.c: Include splay-tree.h and varray.h.
5324 (priority_info_s): New structure.
5325 (finish_vtable_vardecl): Change prototype. Adjust for new calling
5327 (prune_vtable_vardecl): Likewise.
5328 (finish_sigtable_vardecl): Likewise.
5329 (setup_initp): Remove.
5332 (start_static_storage_duration_function): New function.
5333 (generate_inits_for_priority): Likewise.
5334 (finish_static_storage_duration_function): Likewise.
5335 (get_priority_info): Likewise.
5336 (do_static_initialization): Likewise.
5337 (do_static_destruction): Likewise.
5338 (do_static_initialization_and_destruction): Likewise.
5339 (generate_ctor_or_dtor_function): Likewise.
5340 (generate_ctor_and_dtor_functions_for_priority): Likewise.
5341 (pending_statics): Make it a varray.
5342 (pending_statics_used): New variable.
5343 (saved_inlines): Make it a varray.
5344 (saved_inlines_used): New variable.
5345 (finish_static_data_member): Change method of updating
5347 (mark_inline_for_output): Remove #if 0'd code. Change method of
5348 updating saved_inlines.
5349 (walk_vtables): Remove.
5350 (walk_sigtables): Likewise.
5351 (import_export_decl): Use DECL_TINFO_FN_P.
5352 (pending_templates): Remove declaration.
5353 (maybe_templates): Likewise.
5354 (static_aggregates_initp): Likewise.
5355 (setup_initp): Likewise.
5356 (finish_objects): Simplify.
5357 (INITIALIZE_P_IDENTIFIER): New macro.
5358 (PRIORITY_IDENTIFIER): New macro.
5359 (SSDF_IDENTIFIER): New macro.
5360 (initialize_p_decl): New variable.
5361 (priority_decl): Likewise.
5362 (ssdf_decl): Likewise.
5363 (priority_info_map): Likewise.
5364 (finish_file): Recode output of static intializers and other
5365 file-scope finalization tasks.
5366 * error.c (OB_END_TEMPLATE_ID): New macro.
5367 (dump_type_real): Use it.
5368 (dump_decl): Likewise.
5369 (dump_function_name): Likewise.
5370 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
5372 (check_newline): Use walk_globals, not walk_vtables.
5373 * pt.c (pending_tempalte_expansions): Remove.
5374 (set_vardecl_interface_info): Likewise.
5375 (pending_templates): Make static.
5376 (maybe_templates): Likewise.
5377 (instantiate_class_template): Adjust call to finish_struct_1.
5378 (instantiate_pending_templates): New function.
5379 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
5380 * tree.c (static_aggregates_initp): Remove.
5381 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
5383 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
5385 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
5386 with the RTL code RETURN.
5387 * hash.h: Regenerated.
5388 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
5389 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
5390 * parse.c: Regenerated.
5391 * pt.c: Include varray.h. Include rtl.h since varray.h requires
5393 (inline_parm_levels): New variable.
5394 (inline_parm_levels_used): Likewise.
5395 (maybe_begin_member_template_processing): Update them.
5396 (maybe_end_member_template_processing): Use them, rather than
5397 guessing how many levels to pop.
5399 * decl.c (make_typename_type): Tighten error-checking.
5401 1999-04-20 Mark Mitchell <mark@codesourcery.com>
5403 * cp-tree.h (build_binary_op): Remove unneeded parameter.
5404 * class.c (build_vrable_entry_ref): Adjust call to
5406 * decl.c (expand_static_init): Likewise.
5407 (grokdeclarator): Likewise.
5408 (finish_function): Likewise.
5409 * decl2.c (delete_sanity): Likewise.
5410 (do_dtors): Likewise.
5411 (do_ctors): Likewise.
5412 * error.c (dump_type_suffix): Likewise.
5413 * expr.c (cplus_expand_expr): Likewise.
5414 * init.c (resolve_offset_ref): Likewise.
5415 (build_new): Likewise.
5416 (build_new_1): Likewise.
5417 (build_vec_delete_1): Likewise.
5418 (expand_vec_init_catch_clause): Likewise.
5419 (build_delete): Likewise.
5420 * pt.c (tsubst): Likewise.
5421 * rtti.c (synthesize_tinfo_fn): Likewise.
5422 * search.c (expand_upcast_fixups): Likewise.
5423 (expand_direct_vtbls_init): Likewise.
5424 * typeck.c (get_member_function_from_ptrfunc): Likewise.
5425 (build_binary_op_nodefault): Likewise.
5426 (point_int_sum): Likewise.
5427 (pointer_diff): Likewise.
5428 (build_unary_op): Likewise.
5429 (build_modify_expr): Likewise.
5430 (get_delta_difference): Likewise.
5431 (build_ptrmemfunc): Likewise.
5432 (expand_ptrmemfunc_cst): Likewise.
5434 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
5436 * decl.c (grokfndecl): Always call cplus_decl_attributes.
5437 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
5439 1999-04-19 Mark Mitchell <mark@codesourcery.com>
5441 * cp-tree.h (finish_static_data_member_decl): New function.
5442 * decl2.c (finish_static_data_member_decl): Split out from ...
5444 * pt.c (instantiate_class_template): Use it here instead of
5446 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
5447 finish_static_data_member_decl will do that. Explicit set
5448 DECL_EXTERNAL to match non-template processing.
5450 1999-04-18 Mark Mitchell <mark@codesourcery.com>
5452 * cp-tree.h (finish_class_definition): Add parameter.
5453 * parse.y (structsp): Use it. Don't call pop_scope here.
5454 * parse.c: Regenerated.
5455 * semantics.c (finish_class_definition): Pop it here.
5457 1999-04-17 Mark Mitchell <mark@codesourcery.com>
5459 * decl.c (xref_tag): Revise handling of nested template
5461 * pt.c (check_explicit_specialization): Tweak handling of friend
5462 templates in template classes.
5463 (tsubst_friend_class): Handle friend declarations for nested
5464 member template classes.
5466 1999-04-16 Mark Mitchell <mark@codesourcery.com>
5468 * class.c (finish_struct): Remove unused variable.
5469 (pushclass): Likewise.
5470 (invalidate_class_lookup_cache): Likewise.
5471 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
5472 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
5473 doesn't get obliterated.
5474 (make_typename_type): Handle template classes correctly.
5476 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
5477 (storetags): Declare.
5478 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
5479 (pushclass): Likewise. Use storetags to install tag declarations,
5481 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
5482 * decl.c (storetags): Make it global.
5483 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
5484 implicit typename declaration.
5485 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
5486 * method.c (hack_identifier): Likewise.
5487 * search.c (lookup_member): Likewise.
5489 * decl.c (warn_about_implicit_typename_lookup): New function.
5490 (lookup_name_real): Use it. Rework handling of implicit typename
5493 1999-04-15 Mark Mitchell <mark@codesourcery.com>
5495 * cp-tree.h (lookup_nested_field): Remove.
5496 * class.c (push_nested_class): Handle UNION_TYPEs.
5497 (pop_nested_class): Likewise.
5498 * decl.c (lookup_name_real): Don't call lookup_nested_field.
5499 (start_decl): Use push_nested_class, not just pushclass.
5500 (cp_finish_decl): Use pop_nested_class, not just popclass.
5501 * search.c (lookup_nested_field): Remove.
5503 * cp-tree.h (lang_type): Add documentation.
5504 * decl2.c (handle_class_head): Create template declarations here,
5506 * parse.y (class_head): Return whether or not we entered a new
5507 scope, as well as the type named.
5508 (named_class_head): Likewise.
5509 (named_complex_class_head_sans_basetype): Likewise.
5510 (structsp): Adjust accordingly. Pop scope when required.
5511 * parse.c: Regenerated.
5512 * pt.c (check_default_tmpl_args): Robustify.
5513 (redeclare_class_template): Likewise.
5514 (instantiate_class_template): An instantiation of an
5515 anonymous union is itself an anonymous union.
5516 * semantics.c (begin_class_definition): Don't create template
5519 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
5521 * parse.y (after_type_declarator_intern): New nonterminal.
5522 (after_type_declarator): Use it.
5523 (direct_after_type_declarator): Likewise. Move above
5524 nonnested_type to fix reduce/reduce conflict resolution.
5525 (declmods): Reducing from just 'attributes' has EMPTY precedence.
5526 * Makefile.in (CONFLICTS): Update.
5528 * decl.c (define_label): Downgrade error for jumping over a
5529 non-POD decl to pedwarn.
5531 1999-04-14 Mark Mitchell <mark@codesourcery.com>
5533 * cp-tree.h (popclass): Change declaration.
5534 (pop_nested_class): Likewise.
5535 (poplevel_class): Remove declaration.
5536 * call.c (convert_default_argument): Pass no arguments to
5538 * class.c (finish_struct_1): Likewise.
5539 (finish_struct): Likewise.
5540 (popclass): Remove argument. Simplify code accordingly.
5541 (pop_nested_class): Likewise.
5542 * decl.c (poplevel_class): Declare it here, and make it static.
5543 (poplevel): Handle class scopes.
5544 (poplevel_class): Don't take an rgument. Simplify.
5545 (pop_everything): Pass no arguments to pop_nested_class.
5546 (cp_finish_decl): Pass no arguments to popclass.
5547 (grokdeclarator): Pass no arguments to pop_nested_class.
5548 (finish_function): Likewise.
5549 * decl2.c (grokfield): Likewise.
5550 (pop_scope): Pass no arguments to popclass.
5551 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
5552 * pt.c (instantiate_class_template): Move call to pushclass, and
5553 document. Pass no arguments to popclass.
5554 (regenerate_decl_from_template): Likewise.
5556 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
5558 * typeck.c (build_unary_op): Handle taking the address of a unique
5559 bound non-static member function.
5561 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
5563 * lang-options.h (-Wdeprecated): New flag.
5564 * decl2.c (warn_deprecated): New flag.
5565 (lang_decode_option): Deprecated this-is-variable,
5566 external-templates, alt-external-templates.
5567 Support -Wdeprecated.
5568 * errfn.c (cp_deprecated): New function.
5570 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
5572 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
5573 of the decls themselves.
5575 * pt.c (tsubst_function_type): Copy attributes over.
5577 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
5579 * cp-tree.h: Add prototype.
5580 * decl.c (init_decl_processing): Set valid_lang_attribute.
5582 1999-04-13 Mark Mitchell <mark@codesourcery.com>
5584 * class.c (finish_struct_1): Look at the const-ness of the field's
5585 type, not the TREE_READONLY-ness of the declaration.
5586 * method.c (synthesize_method): Likewise.
5587 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
5588 creating new declarations.
5590 1999-04-13 Mike Stump <mrs@wrs.com>
5592 * decl2.c (import_export_decl): Because vtables always reference
5593 virtual functions, even if they are inlined, don't allow
5594 -fno-implement-inlines to not emit them, instead, emit them with
5596 * decl.c (start_function): Likewise.
5598 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
5600 * cp-tree.h (struct lang_type): Add com_interface.
5601 (CLASSTYPE_COM_INTERFACE): New macro.
5602 * class.c (set_rtti_entry): COM interface classes have no RTTI
5603 entries in their vtables; adjust.
5604 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
5605 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
5606 finish_struct_1): Likewise.
5607 * decl2.c (mark_vtable_entries): Likewise.
5608 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
5609 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
5610 expand_upcast_fixups): Likewise.
5611 * tree.c (debug_binfo): Likewise.
5613 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
5614 * typeck.c (comptypes): If we get it, ignore attributes.
5615 * class.c (instantiate_type): Use BASELINK_P. Change complain
5616 parameter to flags; 2 means ignore attributes.
5617 * call.c (build_op_delete_call): Pass it.
5619 * decl.c (xref_tag): Only complain once about using a typedef-name
5620 with 'struct'. Downgrade to pedwarn.
5622 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
5624 * parse.y (absdcl_intern): New nonterminal.
5625 (absdcl, direct_abstract_declarator): Use it.
5627 * pt.c (lookup_template_class): Look through implict typename.
5629 1999-04-11 Mark Mitchell <mark@codesourcery.com>
5631 * friend.c (add_friend): Deal gracefully with error_mark_node.
5632 * method.c (build_overload_value): Handle pointers-to-members as
5633 template parameters.
5635 * decl.c (push_binding): Fix typo in comment.
5637 1999-04-10 Mark Mitchell <mark@codesourcery.com>
5639 * error.c (dump_type_real): If a typename is a template-id, put
5640 out the template arguments.
5641 (dump_expr): Handle TEMPLATE_ID_EXPR.
5642 * pt.c (lookup_template_class): Now that full arguments are
5643 available everywhere, remove code that tried to guess them.
5645 1999-04-09 Mark Mitchell <mark@codesourcery.com>
5647 * decl.c (make_typename_type): Complain if we don't find a type
5648 when trying to make a typename type for a non-template type.
5650 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
5652 * decl.c (start_decl): Pass attributes to grokdeclarator.
5653 (grokdeclarator): Handle attributes on constructor-syntax
5656 1999-04-08 Mark Mitchell <mark@codesourcery.com>
5658 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
5661 * search.c (template_self_reference_p): Tweak.
5663 1999-04-07 Mark Mitchell <mark@codesourcery.com>
5665 * init.c (build_offset_ref): Don't build yet another weird data
5666 structure to describe overloaded functions.
5668 1999-04-06 Mark Mitchell <mark@codesourcery.com>
5670 * cp-tree.h (BASELINK_P): New macro.
5671 (SET_BASELINK_P): Likewise.
5672 * init.c (build_member_call): Remove needless assignment in if
5674 * search.c (lookup_field_r): Fix handling when we are looking
5675 specifically for a type; these are not hidden by functions and
5677 (lookup_member): Use SET_BASELINK_P.
5678 * tree.c (is_overloaded_fn): Use BASELINK_P.
5679 (really_overloaed_fn): Likewise.
5680 (get_first_fn): Likewise.
5682 1999-04-05 Mark Mitchell <mark@codesourcery.com>
5684 * decl.c (lookup_name_current_level): Tweak, and improve
5687 * class.c (maybe_fixup_vptrs): Remove declaration.
5688 (build_class_init_list): Likewise.
5689 * decl.c (pushdecl_class_level): Call check_template_shadow here
5691 (push_class_level_binding): ... not here.
5692 * search.c (dfs_push_type_decls): Only avoid
5693 template-self-reference TYPE_DECLs if they are from base classes.
5695 1999-04-04 Mark Mitchell <mark@codesourcery.com>
5697 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
5700 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
5702 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
5703 (finish_struct_1): Don't call build_class_init_list.
5705 1999-04-02 Mark Mitchell <mark@codesourcery.com>
5707 * tinfo.h (__class_type_info): Fix illegal declaration.
5709 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
5710 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
5711 (IDENTIFIER_CLASS_VALUE): Improve documentation.
5712 (is_properly_derived_from): Declare.
5713 (invalidate_class_lookup_cache): Likewise.
5714 (maybe_maybe_note_name_used_in_class): Likewise.
5715 (note_name_declared_in_class): Likewise.
5716 (push_using_decl): Remove duplicate declaration.
5717 (id_in_current_class): Remove declaration.
5718 (push_class_binding): Change prototype.
5719 (clear_identitifer_class_values): Declare.
5720 * call.c (is_properly_derived_from): Make it global.
5721 (build_new_function_call): Be careful about updating candidates.
5722 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
5723 asked to make illegal calls.
5724 * class.c: Include splay-tree.h.
5725 (class_stack_node): Add names_used slot.
5726 (check_member_decl_is_same_in_complete_scope): Remove.
5727 (add_method): Fix comment. Push the declaration into class
5729 (finish_struct_1): When popping the class, pop the bindings too.
5730 Remove check for data member/function member conflict.
5731 (finish_struct): Remove calls to
5732 check_member_decl_is_same_in_complete_scope. Change calls to
5734 (pushclass): Clear names_used in the class stack entry.
5735 Use invalidate_class_lookup_cache to remove cached entries, rather
5736 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
5737 before entering a new class. Remove dead code. Don't mess with
5738 current_function_decl when pushing declarations.
5739 (invalidate_class_lookup_cache): New function, split out from ...
5740 (popclass): Here. Clean up names_used on our way out.
5741 (instantiate_type): Adjust.
5742 (build_self_reference): Don't push the declaration here.
5743 (maybe_note_name_used_in_class): New function.
5744 (note_name_declared_in_class): Likewise.
5745 * decl.c (add_binding): Change prototype.
5746 (find_class_binding_level): New function.
5747 (innermost_nonclass_level): Likewise.
5748 (current_binding_level): Update documentation.
5749 (inner_binding_level): Remove. Replace with current_binding_level
5751 (push_binding_level): Remove special handling of
5752 class_binding_level.
5753 (pop_binding_level): Likewise. Use find_class_binding_level.
5754 (suspend_binding_level): Likewise.
5755 (global_bindings_p): Use innermost_nonclass_level.
5756 (toplevel_bindings_p): Likewise.
5757 (namespace_bindings_p): Likewise.
5758 (pseudo_global_level_p): Likewise.
5759 (push_binding): Clear INHERITED_VALUE_BINDING_P.
5760 (add_binding): Check for illegal multiple declarations. Return a
5761 value indicating whether or not the new binding was legal.
5762 (push_local_binding): Skip over class binding levels. Check
5763 return value from add_binding.
5764 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
5765 note_name_declared_in_class.
5766 (pushlevel_class): Remove "fake out the rest of the compiler"
5768 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
5769 (clear_identifier_class_values): New function.
5770 (pop_from_top_level): Use it.
5771 (pop_everything): Tweak.
5772 (maybe_process_template_type_declaration): Don't push the
5773 declaration for the template here.
5774 (pushtag): Don't push tag declarations into class scope here.
5775 (pushdecl): Apply DeMorgan's law for readability.
5776 (pushdecl_class_level): Remove special-case code for
5777 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
5778 (push_class_level_bindng): Deal with inherited bindings.
5779 (lookup_name_real): Remove special-case code for
5780 TYPE_BEING_DEFINED, and some implicit typename magic.
5781 (grokdeclarator): Handle COMPONENT_REF for a template function.
5782 (build_enumerator): Don't call pushdecl_class_level here.
5783 (id_in_current_class): Remove.
5784 * decl2.c (grokfield): Don't call pushdecl_class_level or
5785 check_template_shadow.
5786 * errfn.c (cp_file_of): Don't declare.
5787 (cp_line_of): Likewise.
5788 * error.c (dump_decl): Handle an OVERLOAD.
5789 (cp_file_of): Likewise.
5790 (cp_line_of): Likewise.
5791 * init.c (build_member_call): Handle a COMPONENT_REF.
5792 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
5793 pushdecl_class_level.
5794 * method.c (hack_identifier): Build COMPONENT_REFs for references
5795 to member templates as well as member functions. Remove dead
5797 * parse.y (left_curly): Remove.
5798 (nonnested_type): Call maybe_note_name_used_in_class, not
5799 pushdecl_class_level.
5800 * parse.c: Regenerated.
5801 (nested_name_specifier_1): Likewise.
5802 * pt.c (check_explicit_specialization): Adjust, for robustness.
5803 (check_template_shadow): Handle OVERLOADs.
5804 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
5805 TEMPLATE_DECL, if appropriate.
5806 * search.c (envelope_add_decl): Remove.
5807 (dfs_pushdecls): Likewise.
5808 (dfs_compress_decls): Likewise.
5809 (dfs_push_decls): New function.
5810 (dfs_push_type_decls): Likewise.
5811 (setup_class_bindings): Likewise.
5812 (template_self_reference_p): Likewise.
5813 (lookup_field_r): Use it.
5814 (looup_member): Remove old comment. Deal with ambiguity.
5815 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
5816 and remove envelope processing.
5817 * semantics.c (begin_class_definition): Let pushclass push
5818 declarations for base classes.
5819 (finish_member_declaration): Push declarations into class scope.
5820 * typeck.c (build_component_ref): Just put an OVERLOAD into the
5821 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
5822 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
5823 * Makefile.in (class.o): Depend on splay-tree.h.
5825 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
5827 * cvt.c (convert_pointer_to_real): Use same_type_p.
5828 * typeck.c (comp_target_types): Use same_type_p.
5830 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
5832 * semantics.c (begin_inline_definitions,
5833 finish_inline_definitions): Rename from finish_default_args and
5834 begin_inline_definitions, respectively, to something that isn't a
5836 * parse.y (structsp): Adjust.
5838 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
5839 (list_hash_lookup): Likewise.
5840 (hash_tree_chain): Adjust.
5841 * pt.c (tsubst): Adjust.
5842 (tsubst_arg_types): Use plain hash_tree_cons.
5843 * cp-tree.h (hash_tree_cons_simple): Lose.
5844 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
5846 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5848 * Makefile.in (hash.h): Generate using gperf language 'C', not
5849 'KR-C', so gperf uses the `const' keyword on strings.
5851 * gxx.gperf (resword): Const-ify a char*.
5853 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
5855 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
5856 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
5857 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
5858 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
5859 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
5860 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
5863 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
5865 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
5867 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
5869 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
5871 1999-03-27 Mark Mitchell <mark@codesourcery.com>
5873 * cp-tree.h (add_friend): Declare.
5874 (add_friends): Likewise.
5875 * friend.c (add_friend): Make it global. Don't add to
5876 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
5877 (add_friends): Make it global.
5878 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
5879 befriending class is a template.
5880 * parse.y (component_decl_1): Fix typo in comment.
5881 * parse.c: Regenerated.
5882 * pt.c (instantiate_class_template): Use add_friend and
5883 add_friends rather that duplicating some of their functionality
5886 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
5888 * call.c (build_field_call): Unify 'this' and non-'this' cases.
5890 * typeck.c (build_indirect_ref): Check for 'this' sooner.
5892 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5894 * call.c (op_error): Const-ify a char*.
5895 (add_candidate, source_type, add_warning): Add static prototype.
5896 (print_z_candidates): Const-ify a char*.
5898 * class.c (resolve_address_of_overloaded_function,
5899 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
5900 (get_vtable_name, finish_struct_1): Const-ify a char*.
5902 * cvt.c (convert_to_reference): Likewise.
5904 * decl.c (redeclaration_error_message, record_builtin_type,
5905 record_unknown_type, member_function_or_else, bad_specifiers):
5907 (find_binding, select_decl, unqualified_namespace_lookup,
5908 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
5909 Add static prototype.
5910 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
5911 implicitly_declare, record_builtin_java_type, define_function,
5912 grok_op_properties, tag_name): Const-ify a char*.
5914 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
5915 (define_function, finish_builtin_type): Const-ify a char*.
5916 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
5917 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
5918 (file_name_nondirectory): Const-ify a char*.
5919 (init_filename_times): Don't prototype.
5920 (compiler_error): Prototype.
5921 (yyerror, init_repo): Const-ify a char*.
5922 (build_srcloc): Don't prototype.
5923 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
5925 (warn_for_assignment): Don't prototype.
5926 (convert_for_initialization, readonly_error, check_for_new_type,
5927 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
5930 * decl2.c (acceptable_java_type, output_vtable_inherit,
5931 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
5932 merge_functions, decl_namespace, validate_nonmember_using_decl,
5933 do_nonmember_using_decl): Add static prototype.
5934 (lang_f_options): Const-ify a char*.
5935 (finish_builtin_type): Likewise.
5936 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
5939 * errfn.c: Include cp-tree.h.
5940 (cp_thing): Add static prototype.
5941 (compiler_error): Don't protoptype.
5942 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
5943 passing it to `cp_thing'.
5945 * error.c (interesting_scope_p): Add static prototype.
5947 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
5950 * init.c (compiler_error): Don't prototype.
5951 (member_init_ok_or_else): Const-ify a char*.
5952 (build_java_class_ref): Add static prototype.
5954 * lex.c (compiler_error): Don't prototype.
5955 (get_time_identifier, interface_strcmp, extend_token_buffer,
5956 handle_cp_pragma): Const-ify a char*.
5957 (is_global, init_filename_times): Add static prototype.
5958 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
5959 (compiler_error): Change from fixed args to variable args.
5960 (yyerror): Const-ify a char*.
5962 * parse.y (cond_stmt_keyword): Const-ify a char*.
5963 (parse_decl): Add static prototype.
5965 * pt.c (template_args_equal, print_template_context): Likewise.
5966 (print_candidates, check_default_tmpl_args): Const-ify a char*.
5967 (instantiate_class_template): Likewise.
5969 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
5971 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
5972 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
5974 * search.c (lookup_field_info, lookup_member): Likewise.
5975 (lookup_member): Cast the first argument of `bzero' to a PTR.
5977 * sig.c (compiler_error): Don't prototype.
5978 (build_signature_pointer_or_reference_nam): Const-ify a char*.
5979 (get_sigtable_name, build_member_function_pointer): Likewise.
5981 * tree.c (compiler_error): Don't prototype.
5982 (no_linkage_helper, build_srcloc): Add static prototype.
5983 (build_vbase_pointer_fields): Const-ify a char*.
5984 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
5986 * typeck.c (compiler_error): Don't prototype.
5987 (convert_for_assignment): Const-ify a char*.
5988 (comp_cv_target_types): Add static prototype.
5989 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
5990 build_component_addr, build_unary_op, convert_for_initialization):
5993 * typeck2.c (ack): Add static prototype and change from fixed args
5995 (readonly_error, check_for_new_type): Const-ify a char*.
5997 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
5998 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
5999 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
6000 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
6001 gen_assign, GNU_xref_member): Const-ify a char*.
6003 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
6005 * gxxint.texi: Remove old discussion on copying virtual bases.
6007 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
6009 * Make-lang.in: Remove all references to g++.o/g++.c.
6010 Link g++ from gcc.o.
6012 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
6014 * decl2.c (comdat_linkage): Treat vtables like functions.
6016 1999-03-25 Mark Mitchell <mark@codesourcery.com>
6018 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
6020 1999-03-25 Nathan Sidwell <nathan@acm.org>
6022 * decl.c (init_decl_processing): Add `signed' type as a synonym
6025 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
6027 * typeck.c (common_type): Handle cv-qual unification for pointers
6030 * decl.c (unqualified_namespace_lookup): Return error_mark_node
6032 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
6033 * lex.c (do_identifier): If we got error_mark_node, call
6036 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6038 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
6041 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
6043 * decl.c (lookup_name_real): Do nested field lookup regardless of
6046 1999-03-24 Mark Mitchell <mark@codesourcery.com>
6048 * cp-tree.h (lang_type): Remove has_assignment and
6049 has_real_assignment. Add befriending_classes.
6050 (TYPE_HAS_ASSIGNMENT): Remove.
6051 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
6052 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
6053 (lang_decl): Document.
6054 (DECL_BEFRIENDING_CLASSES): New macro.
6055 (FRIEND_NAME): Move declaration to more obvious location.
6056 (FRIEND_DECLS): Likewise.
6057 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
6058 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
6059 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
6060 (grok_op_properties): Likewise.
6061 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
6062 (add_friend): Likewise. Don't do weird things with assignment
6063 operators. Update DECL_BEFRIENDING_CLASSES.
6064 (add_friends): Don't do weird things with assignment operators.
6065 (make_friend_class): Likewise. Update
6066 CLASSTYPE_BEFRIENDING_CLASSES.
6067 * pt.c (instantiate_class_template): Don't set
6068 TYPE_HAS_ASSIGNMENT.
6069 (tsubst_copy): Substitute the TREE_TYPE for more unary
6071 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
6072 * search.c (protected_accessible_p): New function.
6073 (friend_accessible_p): Likewise.
6074 (accessible_p): Use them.
6076 1999-03-23 Mark Mitchell <mark@codesourcery.com>
6078 * pt.c (convert_nontype_argument): Don't create things that aren't
6079 PTRMEM_CSTs when applying a qualification conversion to a
6082 1999-03-23 Mark Mitchell <mark@codesourcery.com>
6084 * Makefile.in (OBJS): Don't mention hash.o.
6085 (OBJDEPS): Likewise.
6087 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
6089 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
6090 * decl.c (expand_static_init): Make sure we don't add any after
6093 * decl.c (cp_finish_decl): Move intelligence about handling
6094 DECL_COMDAT for variables from here...
6095 * decl2.c (comdat_linkage): ...to here.
6096 (maybe_make_one_only): Tweak.
6097 (import_export_decl): Call comdat_linkage for variables, too.
6098 (finish_file): Handle template statics properly.
6100 1999-03-22 Mark Mitchell <mark@codesourcery.com>
6102 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
6103 Document internals of pointer-to-member-functions.
6104 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
6105 (PFN_FROM_PTRMEMFUNC): Likewise.
6106 (build_type_conversion): Remove unused parameter.
6107 (build_ptrmemfunc1): Declare.
6108 (expand_ptrmemfunc_cst): New function.
6109 (delta2_from_ptrmemfunc): Likewise.
6110 (pfn_from_ptrmemfunc): Likewise.
6111 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
6112 build_type_conversion. Use TYPE_PTRMEM_P for readability.
6113 (convert_to_reference): Remove unused parameter to
6114 build_type_conversion.
6115 (ocp_convert): Likewise.
6116 (build_user_type_conversion): Likewise.
6117 * error.c (dump_expr): Handle NULL pointer-to-member functions.
6118 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
6119 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
6120 open when handling pointer-to-member functions.
6121 * pt.c (convert_nontype_argument): Clean up error messages. Be
6122 more stringent with pointers-to-members.
6123 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
6124 (build_unary_op): Tidy ever-so-slightly.
6125 (build_conditional_expr): Remove extra parameter to
6126 build_type_conversion.
6127 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
6129 (expand_ptrmemfunc_cst): Define.
6130 (delta2_from_ptrmemfunc): Likewise.
6131 (pfn_from_ptrmemfunc): Likewise.
6133 1999-03-19 Mark Mitchell <mark@codesourcery.com>
6135 * init.c (build_member_call): Handle template-id expressions
6137 * typeck.c (build_x_function_call): Likewise.
6139 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
6141 * friend.c (make_friend_class): Avoid core dump when
6142 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
6144 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
6146 * decl.c (start_function): Suppress normal linkage heuristics
6147 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
6149 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
6151 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
6152 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
6154 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
6156 * parse.y (named_complex_class_head_sans_basetype):
6157 Do not push a scope for error_mark_node.
6158 (maybe_base_class_list): Likewise.
6160 * decl.c (start_decl): Check for error_mark_node as a type.
6161 Detected by g++.brendan/array-refs.C.
6162 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
6163 (maybe_build_cleanup_1): Likewise. Detected by
6164 g++.jason/incomplete1.C.
6166 * tree.c (build_dummy_object): Use void_zero_node instead of the
6168 (is_dummy_object): Check for such a node.
6169 Detected by g++.bob/inherit1.C
6171 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
6173 * method.c (old_backref_index): Split out...
6174 (flush_repeats): From here. Rename back from try_old_backref.
6175 (build_mangled_name): Put back some old-style repeat handling.
6177 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6179 * lex.c: Don't include setjmp.h.
6180 (parse_float): New static function.
6181 (pf_args): New struct.
6182 (real_yylex): Use them in call to `do_float_handler'.
6184 1999-03-15 Mark Mitchell <mark@markmitchell.com>
6186 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
6187 * tree.c (layout_basetypes): Not here.
6188 * search.c (dfs_search): Remove; no longer used.
6190 1999-03-12 Mark Mitchell <mark@markmitchell.com>
6192 * decl2.c (validate_nonmember_using_decl): Issue sensible
6193 error-messages on bogus qualifiers.
6195 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
6197 * call.c (add_function_candidate): Fix uninitialized variable.
6199 * Makefile.in (search.o): Add dependency on varray.h.
6201 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
6203 * decl.c (duplicate_decls): Use same_type_p.
6204 * method.c (try_old_backref): Renamed from flush_repeats. Use
6205 same_type_p. Don't try to handle repeats. Return success.
6206 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
6207 calls from old-style code, too.
6208 (check_ktype): Use same_type_p.
6209 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
6210 (build_qualified_name): Simplify logic.
6211 (process_overload_item): Strip typedefs and quals at the top.
6212 (build_mangled_name_for_type_with_Gcode): Remove call to
6213 type_canonical_variant.
6214 (build_mangled_name): Likewise. Remove support for old-style
6215 repeats, which have been disabled since 2.7.2. Don't mess with
6217 (build_decl_overload_real): Don't mess with TREE_USED.
6219 1999-03-13 Nathan Sidwell <nathan@acm.org>
6221 * error.c (cp_printers): Add 'F' escape character.
6222 (dump_type_real): Remove TREE_LIST (fnargs) printing.
6223 Functionality moved to dump_parameters.
6224 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
6225 (dump_function_decl): Extend meaning of V parameter. Use
6226 dump_parameters and dump_exception_spec.
6227 (dump_parameters): New static function.
6228 (dump_exception_spec): New static function.
6229 (fndecl_as_string): Change argument semantics. Use
6230 dump_function_decl directly.
6232 * sig.c (build_signature_table_constructor): Use cp_error.
6234 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
6236 * semantics.c (finish_switch_cond): Handle error cases gracefully.
6237 Detected by g++.law/enum5.C.
6239 * typeck.c (build_modify_expr): Check for errors after resolving
6240 offsets. Detected by g++.brendan/static1.C.
6242 * decl.c (complete_array_type): Ignore initial_value if it is an
6243 error. Detected by g++.benjamin/17930.C.
6245 * typeck2.c (process_init_constructor): Return error if one argument
6246 is in error. Detected by g++.benjamin/13478.C.
6248 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
6250 * decl.c (select_decl): Allow class templates when we need types.
6251 * decl2.c (ambiguous_decl): Likewise.
6253 1999-03-12 Mark Mitchell <mark@markmitchell.com>
6255 * lex.c (do_identifier): Correct call to enforce_access.
6256 * search.c (accessible_p): Tweak comment.
6258 1999-03-10 Mark Mitchell <mark@markmitchell.com>
6260 * semantics.c (begin_class_definition): Call build_self_reference.
6261 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
6263 * search.c (assert_canonical_unmarked): Fix typo in prototype.
6265 * search.c (dfs_canonical_queue): New function.
6266 (dfs_assert_unmarked_p): Likewise.
6267 (assert_canonical_unmarked): Likewise.
6268 (access_in_type): Use it.
6269 (accessible_p): Likewise. Walk the whole tree when umarking.
6271 * sig.c (build_signature_table_constructor): Use accessible_p
6272 instead of compute_access.
6274 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
6276 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
6278 1999-03-09 Mark Mitchell <mark@markmitchell.com>
6280 * cp-tree.h (flag_access_control): Declare.
6281 (TREE_VIA_PPUBLIC): Document.
6282 (DECL_NONSTATIC_MEMBER_P): New macro.
6283 (enforce_access): Return an indication of whether or not access
6285 (build_self_reference): Change prototype.
6286 (compute_access): Replace with ...
6287 (accessible_p): New function.
6288 (dfs_walk): Change prototype.
6289 (dfs_unmark): Likewise.
6290 (markedp): Likewise.
6291 * call.c (enforce_access): Use accessible_p.
6292 * class.c (build_self_reference): Insert the declaration into the
6293 list of members for this type, and make it public.
6294 * decl.c (xref_basetypes): Avoid ill-timed recursion.
6295 * init.c (build_offset_ref): Use lookup_member, not three separate
6296 name-lookups. Call enforce_access rather than checking for
6297 illegal accesses here.
6298 (resolve_offset_ref): Likewise.
6299 * lex.c (do_identifier): Likewise.
6300 * method.c (hack_identifier): Likewise.
6301 * parse.y (self_reference): Remove.
6302 (opt_component_decl_list): Don't use it.
6303 * parse.c: Regenerated.
6304 * pt.c (print_candidates): Generalize to handle lists of
6305 overloaded functions.
6306 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
6308 (get_template_base): Use new calling convention for dfs_walk.
6309 * search.c: Include varray.h. Add prototypes.
6310 (dfs_walk): Accept a data pointer to pass to the work functions.
6311 All callers changed. All work functions changed.
6312 (breadth_first_search): Rename to bfs_walk, and make consistent
6314 (dfs_walk_real): New function.
6315 (canonical_binfo): New function.
6316 (context_for_name_lookup): Likewise.
6317 (shared_marked_p): Likewise.
6318 (shared_unmarked_p): Likewise.
6319 (lokup_field_queue_p): Likewise.
6320 (lookup_field_r): Generalize to handle both functions and fields.
6321 (lookup_field): Just call lookup_member.
6322 (lookup_fnfields): Likewise.
6323 (lookup_member): Move body of lookup_field here and generalize.
6324 (dfs_accessible_queue_p): Likewise.
6325 (dfs_accessible_p): Likewise.
6326 (dfs_access_in_type): Likewise.
6327 (access_in_type): Likewise.
6328 (compute_access): Remove, and replace with ...
6329 (accessible_p): New function.
6330 (vbase_types): Remove.
6331 (vbase_decl_ptr_intermediate): Likewise.
6332 (vbase_decl_ptr): Likewise.
6333 (vbase_init_result): Likewise.
6334 (closed_envelopes): Likewise.
6335 (bvtable): Likewise.
6337 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
6339 * call.c (add_function_candidate): Check for proper number of args
6340 before checking the validity of those args.
6342 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
6344 * cp-tree.h (struct lang_type): Add anon_union field.
6345 (ANON_UNION_TYPE_P): Use it instead of examining type.
6346 (SET_ANON_UNION_TYPE_P): New macro.
6347 * decl.c (check_tag_decl): Use it.
6349 * search.c (compute_access): Handle non-type contexts earlier, and
6352 * tree.c (build_exception_variant): Use copy_to_permanent.
6354 * decl2.c (setup_initp): Give statics with no priority the default
6356 (do_dtors, do_ctors, finish_file): Remove special handling of
6357 non-prioritized statics.
6359 1999-03-05 Mark Mitchell <mark@markmitchell.com>
6361 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
6362 * decl.c (make_typename_type): Don't issue an error if an
6363 immediate lookup fails; it migt be resolved later.
6364 * friend.c (is_friend): Add comment.
6365 * search.c (breadth_first_search): Add POSTFN and DATA
6366 parameters. Tidy. All callers changed.
6367 (lookup_field_queue_p): New function.
6368 (lookup_field_r): Likewise.
6369 (lookup_field_post): Likewise.
6370 (lookup_field): Use them, via breadth_first_search, instead of
6372 (compute_access): Robustify.
6373 (lookup_fnfield_info): New structure.
6375 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
6377 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
6379 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
6381 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
6384 * decl2.c (import_export_class): Also return if
6385 CLASSTYPE_INTERFACE_ONLY is set.
6387 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
6389 * decl.c (push_overloaded_decl): Only overwrite the old binding if
6391 * decl2.c (do_local_using_decl): Fix loop termination.
6393 1999-03-02 Mark Mitchell <mark@markmitchell.com>
6395 * cp-tree.h (determine_specialization): Don't declare.
6396 * pt.c (determine_specialization): Make it static. Eliminate
6397 complain parameter. Note that decl is always non-NULL now, and
6398 simplify accordingly.
6400 * decl.c (maybe_push_to_top_level): Always call
6401 push_cp_function_context.
6402 (pop_from_top_level): Always call pop_cp_function_context.
6404 1999-02-26 Nathan Sidwell <nathan@acm.org>
6406 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
6408 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
6409 * init.c (build_new_1): Extra arg to complete_type_or_else.
6410 (build_delete): Likewise.
6411 * typeck.c (require_complete_type): Likewise.
6412 (pointer_int_sum): Likewise.
6413 (pointer_diff): Likewise.
6414 (build_component_ref): Likewise.
6416 * typeck2.c (incomplete_type_error): Always use cp_error.
6417 Show declaration of undefined type, if appropriate.
6418 Deal with UNKNOWN_TYPE nodes.
6420 * typeck.c (require_complete_type): Use TYPE_SIZE as
6421 size_zero_node to mean incomplete type.
6422 (require_complete_type_in_void): New function.
6423 (build_compound_expr): Call complete_type_in_void for LHS.
6424 (build_c_cast): Call complete_type_in_void for void cast.
6425 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
6426 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
6427 require_complete_type_in_void. Call it.
6428 * cp-tree.h (require_complete_type_in_void): Prototype new function.
6430 * typeck.c (convert_arguments): Use alternative format for
6431 function decls. Don't require_complete_type here. Simplify
6432 diagnostic printing.
6433 (convert_for_initialization): Don't require_complete_type on RHS yet.
6434 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
6436 * call.c (build_over_call): Cope with qualified void return type.
6437 * semantics.c (finish_call_expr): Likewise.
6438 * typeck.c (build_function_call_real): Likewise.
6439 (c_expand_return): Likewise.
6440 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
6442 * call.c (print_z_candidates): Use alternate print format, to be
6443 consistent with (pt.c) print_candidates.
6444 * method.c (hack_identifier): List candidate members.
6445 * search.c (lookup_field): Build ambiguous list, and show it, if
6448 1999-02-26 Mark Mitchell <mark@markmitchell.com>
6450 * typeck.c (decay_conversion): Don't confuse constant array
6451 variables with their initializers.
6453 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
6455 * pt.c (regenerate_decl_from_template): Tweak for clarity.
6456 (instantiate_decl): Mark a decl instantiated before regenerating
6457 it to avoid recursion.
6458 * tree.c (mapcar): Don't call decl_constant_value unless we know
6459 something is TREE_READONLY_DECL_P.
6461 * class.c (check_for_override): Don't stop checking when we find
6462 the first overridden function. Delete #if 0'd code.
6463 * search.c (get_matching_virtual): Likewise.
6465 1999-02-25 Richard Henderson <rth@cygnus.com>
6467 * lang-specs.h: Define __FAST_MATH__ when appropriate.
6469 1999-02-24 Mike Stump <mrs@wrs.com>
6471 * typeck.c (convert_for_assignment): Allow boolean integral constant
6472 expressions to convert to null pointer.
6474 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
6476 * decl.c (lookup_namespace_name): Resolve namespace aliases.
6478 * class.c (push_nested_class): Allow namespaces.
6480 * decl2.c (set_decl_namespace): Add friendp parameter.
6481 * decl.c (grokfndecl): Pass it.
6482 (grokvardecl): Likewise.
6483 * cp-tree.h: Change declaration.
6485 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
6487 * pt.c (tsubst): Allow an array of explicit size zero.
6489 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
6491 * errfn.c: Change varargs code to look like toplev.c.
6493 * method.c (process_modifiers): Don't prepend 'U' for char or
6496 1999-02-20 Craig Burley <craig@jcb-sc.com>
6498 * Make-lang.in (cplib2.ready): Don't consider updating
6499 cplib2 stuff if the current directory isn't writable, as
6500 it won't work (such as during a `make install').
6502 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
6504 * decl2.c (start_objects): Make file scope constructors and
6505 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
6506 ASM_OUTPUT_DESTRUCTOR are defined.
6508 1999-02-19 Mark Mitchell <mark@markmitchell.com>
6510 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
6511 (fn_type_unification): Adjust prototype.
6512 (lookup_fnfields_1): Declare.
6513 * call.c (add_template_candidate_real): Adjust call to
6514 fn_type_unification.
6515 * class.c (add_method): Don't allow duplicate declarations of
6516 constructors or destructors.
6517 (resolve_address_of_overloaded_function): Remove unused variable.
6518 Adjust call to fn_type_unification.
6519 * decl.c (grokfndecl): Be more robust in the face of illegal
6521 * decl2.c (check_classfn): Remove hokey handling of member
6523 * pt.c (determine_specialization): Improve comments. Adjust to
6524 handle template argument deduction as per the standard.
6525 (check_explicit_specialization): Fix comment spacing. Handle
6526 type-conversion operators correctly. Improve error-recovery.
6527 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
6528 (get_bindings_real): Simplify handling of static members.
6529 * search.c (lookup_fnfields_1): Make it have external linkage.
6530 * typeck.c (compparms): Fix comment.
6531 (build_unary_op): Don't try to figure out which template
6532 specialization is being referred to when when the address-of
6533 operator is used with a template function.
6535 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6537 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
6538 keyword to match an analogous change at the top level.
6540 * tree.c (lvalue_or_else): Likewise.
6542 1999-02-17 Mark Mitchell <mark@markmitchell.com>
6544 * decl.c (xref_basetypes): Comment.
6545 * pt.c (instantiate_class_template): Use xref_basetypes.
6547 1999-02-16 Mark Mitchell <mark@markmitchell.com>
6549 * cp-tree.h (tsubst): Change prototype.
6550 (tsubst_expr): Likewise.
6551 (tsubst_copy): Likewise.
6552 (type_unification): Remove prototype.
6553 * call.c (convert_default_arg): Adjust call to tsubst_expr.
6554 * class.c (resolve_address_of_overloaded_function): Just use
6555 fn_type_unification.
6556 * decl.c (grokdeclarator): Adjust call to tsubst.
6557 * method.c (build_template_parm_names): Likewise.
6558 * pt.c (GTB_VIA_VIRTUAL): New macro.
6559 (GTB_IGNORE_TYPE): Likewise.
6560 (resolve_overloaded_unification): Add `complain' parameter.
6561 (try_one_overload): Likewise.
6562 (tsubst_template_arg_vector): Likewise.
6563 (tsubst_template_parms): Likewise.
6564 (tsubst_aggr_type): Likewise.
6565 (tsubst_arg_types): Likewise.
6566 (tsubst_call_declarator_parms): Likewise.
6567 (unify): Remove explicit_mask.
6568 (type_unification_real): Likewise.
6569 (get_template_base_recursive): Likewise.
6570 (coerce_template_template_parms): Provide prototype.
6571 (tsubst_function_type): Likewise.
6572 (try_class_unification): New function.
6573 All callers changed to use new complain parameter.
6574 (get_template_base): Use try_class_unification.
6575 (unify): Adjust handling of classes derived from template types.
6576 (fn_type_unification): Substitute explicit arguments before
6579 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6581 * decl.c (pushdecl): Remove dead code.
6583 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
6585 * decl2.c (finish_objects): Fix code I missed in previous change.
6587 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
6589 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
6590 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
6592 * pt.c (maybe_process_partial_specialization): Complain about
6593 'template <>' on non-specialization.
6595 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
6597 * decl.c (grokdeclarator): Catch wierd declarators.
6598 * decl2.c (finish_file): Don't abort because of namespace parsing
6600 (check_decl_namespace): Remove.
6602 1999-02-09 Mark Mitchell <mark@markmitchell.com>
6604 * cp-tree.h (get_template_base): Don't declare.
6605 (dfs_walk): Declare.
6606 (dfs_unmark): Likewise.
6607 (markedp): Likewise.
6608 * pt.c (unify): Remove duplicate declaration. Pass tparms and
6609 targs to get_template_base.
6610 (get_template_base_recursive): Move here from search.c. Check to
6611 see that the base found can be instantiated to form the desired
6613 (get_template_base): Likewise.
6614 (get_class_bindings): Simplify.
6615 * search.c (get_template_base_recursive): Move to pt.c.
6616 (get_template_base): Likewise.
6617 (markedp): Make it global.
6618 (dfs_walk): Likewise.
6619 (dfs_unmark): Likewise.
6621 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
6623 * pt.c (maybe_process_partial_specialization): Complain about
6624 specialization in wrong namespace.
6625 * tree.c (decl_namespace_context): New fn.
6627 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6629 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
6630 * pt.c (coerce_template_template_parms): Handle nested
6631 template template parameters.
6633 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
6635 * typeck2.c: Update email addresses.
6637 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6639 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
6642 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
6644 * lex.c (retrofit_lang_decl): Split out...
6645 (build_lang_decl): From here.
6646 * decl.c (pushdecl): Call it for functions generated by the middle
6647 end that don't have DECL_LANG_SPECIFIC.
6648 * cp-tree.h: Declare it.
6650 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
6651 (start_objects, finish_objects): Only use special
6652 init_priority code if the user specified a priority.
6653 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
6656 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
6658 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
6659 mkstemp.o. Get them from libiberty now.
6660 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
6662 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6664 * decl2.c (lang_decode_option): Use read_integral_parameter.
6666 1999-02-01 Mark Mitchell <mark@markmitchell.com>
6668 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
6669 before calling complete_type_or_else.
6671 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6673 * input.c (inline): Don't define, its handled by system.h.
6675 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
6677 * decl2.c: Don't define flag_no_ident here. Don't process
6679 * cp-tree.h: Don't declare flag_no_ident here.
6680 * lang-specs.h: Map -Qn to -fno-ident.
6682 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
6684 * cp-tree.h (struct tree_binding): Replace scope field with a union.
6685 (BINDING_SCOPE): Adjust.
6686 * decl.c (BINDING_LEVEL): Adjust.
6688 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
6690 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
6693 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
6696 * tree.c (equal_functions): Fix name in prototype.
6698 * decl.c (push_local_binding): Add FLAGS argument.
6699 (pushdecl, push_overloaded_decl): Pass it.
6700 * decl2.c (do_local_using_decl): Likewise.
6701 * cp-tree.h: Adjust prototype.
6702 * decl.c (poplevel): Fix logic.
6704 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
6705 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
6706 (cat_namespace_levels): Don't loop forever.
6708 1999-01-25 Richard Henderson <rth@cygnus.com>
6710 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
6712 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
6714 * class.c (resolve_address_of_overloaded_function): Mark the
6715 chosen function used.
6717 * call.c (build_call): Make sure that a function coming in has
6718 been marked used already.
6719 * decl.c (expand_static_init): Call mark_used instead of
6721 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
6722 alloc_eh_object, expand_throw): Likewise.
6723 * init.c (build_builtin_delete_call): Likewise.
6724 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
6725 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
6726 expand_generic_desc): Likewise.
6728 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
6730 * tree.c (equal_functions): New function.
6731 (ovl_member): Call it.
6733 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
6735 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
6737 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
6739 * decl.c (decls_match): Return 1 if old and new are identical.
6740 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
6742 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
6744 * decl.c (start_function): Make member functions one_only on windows.
6745 * decl2.c (import_export_decl): Likewise.
6747 * decl.c (grokdeclarator): Don't complain about implicit int in
6748 a system header. Change same-name field check to not complain in
6749 a system header instead of within extern "C".
6751 1999-01-21 Mark Mitchell <mark@markmitchell.com>
6753 * cp-tree.h (PUSH_GLOBAL): New macro.
6754 (PUSH_LOCAL): Likewise.
6755 (PUSH_USING): Likewise.
6756 (namespace_bindings_p): Declare.
6757 (push_overloaded_decl): Likewise.
6758 * decl.c (push_overloaded_decl): Don't make it static. Check for
6759 illegal declarations after using declarations here.
6760 (namespace_bindings_p): Likewise.
6761 (duplicate_decls): Don't consider declarations from different
6762 namespaces to be the same.
6763 (pushdecl): Use symbolic PUSH_ constants in calls to
6764 push_overloaded_decl.
6765 (push_overloaded_decl_1): Likewise.
6766 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
6767 (do_nonmember_using_decl): Check for illegal using declarations
6768 after ordinary declarations here.
6769 (do_local_using_decl): Call pushdecl to insert declarations.
6771 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
6773 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
6775 1999-01-21 Mark Mitchell <mark@markmitchell.com>
6777 * tree.c (build_cplus_array_type_1): Don't call build_array_type
6778 for types involving template parameters.
6780 * cp-tree.h (PARM_DECL_EXPR): Delete.
6781 (convert_default_arg): Change prototype.
6782 (check_default_argument): Declare.
6783 (search_tree): Likewise.
6784 * call.c (convert_default_arg): Take the function to which the
6785 default argument belongs as a parameter, and do any necessary
6786 instantiation here, instead of ...
6787 (build_over_call): Here.
6788 * decl.c (local_variable_p): New function.
6789 (check_default_argument): Likewise, split out and tidied from ...
6791 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
6792 * pt.c (tsubst_call_declarator_parms): New function.
6793 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
6794 with CALL_EXPRs, rather than trying to be clever.
6795 (tsubst): Use tsubst_call_declarator_parms.
6796 * tree.c (search_tree): Don't make it static.
6797 * typeck.c (convert_arguments): Use new interface to
6798 convert_default_arg.
6800 1999-01-20 Mark Mitchell <mark@markmitchell.com>
6802 * error.c (dump_function_decl): Don't print the argument types for
6803 a function when the verbosity level is negative.
6805 * call.c (build_over_call): Check format attributes at call-time.
6807 * pt.c (tsubst_copy): Fix comment.
6808 (unify): Don't allow unification with variable-sized arrays.
6810 * semantics.c (finish_stmt_expr): When processing a template make
6811 the BIND_EXPR long-lived.
6813 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
6815 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
6816 (import_export_vtable): Not here.
6818 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
6820 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
6821 non-static member function.
6823 1999-01-18 Nathan Sidwell <nathan@acm.org>
6825 * class.c (instantiate_type): Only diagnose illegal address of member
6826 function if complaining.
6828 * decl.c (lookup_name_real): Remove duplicate code.
6830 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
6832 * tree.c (copy_template_template_parm): Use permanent_obstack.
6834 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6836 * pt.c (unify): Remove restrictions on deduction of argument
6837 of template template parameters.
6839 1999-01-18 Nathan Sidwell <nathan@acm.org>
6841 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
6843 * class.c (resolve_address_of_overloaded_function): Show list of
6844 all candidates, when none of them match.
6846 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
6848 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
6849 definition of 'casting away const' in reinterpret_cast<>.
6851 1999-01-18 Graham <grahams@rcp.co.uk>
6853 * cvt.c: Add include for decl.h, remove extern for
6854 static_aggregates which is now provided by decl.h.
6856 * Makefile.in (cvt.o): Add dependency for decl.h and missing
6857 dependencies for convert.h and flags.h.
6859 1999-01-18 Nathan Sidwell <nathan@acm.org>
6861 * decl2.c (do_dtors): Set current location to that of the
6862 decl, for sensible diagnostics and debugging.
6863 (check_classfn): Issue `incomplete type' error, if
6864 class is not defined.
6866 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
6868 * cp-tree.h: Add prototype for bound_pmf_p.
6870 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
6871 Manfred Hollstein <manfred@s-direktnet.de>
6873 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
6876 1999-01-16 Nathan Sidwell <nathan@acm.org>
6878 * cp-tree.h (struct lang_type): Added has_mutable flag.
6879 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
6880 (TYPE_HAS_MUTABLE_P): New macro to read it.
6881 (cp_has_mutable_p): Prototype for new function.
6882 * class.c (finish_struct_1): Set has_mutable from members.
6883 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
6884 it contains a mutable.
6885 * typeck.c (cp_has_mutable_p): New function.
6887 1999-01-15 Mark Mitchell <mark@markmitchell.com>
6889 * pt.c (process_template_parm): Ignore top-level qualifiers on
6890 non-type parameters.
6892 * decl.c (start_function): Use current_function_parms in the call
6893 to require_complete_type_for_parms, not the probably empty
6896 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
6898 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
6900 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
6901 that we don't suppress the other copies.
6902 * lex.c (handle_cp_pragma): Likewise.
6904 1999-01-13 Mark Mitchell <mark@markmitchell.com>
6906 * decl.c (grokdeclarator): Undo 1998-12-14 change.
6907 * tree.c (build_cplus_array_type_1): Likewise.
6908 * pt.c (instantiate_class_template): Remove misleading comment.
6909 (tsubst_aggr_type): Substitute if there are template parameters,
6910 regardless of whether or not they use template arguments.
6911 (unify): Likewise, but for unification.
6913 1999-01-12 Richard Henderson <rth@cygnus.com>
6915 * cp-tree.h (flag_permissive): Declare extern.
6917 1999-01-06 Mark Mitchell <mark@markmitchell.com>
6919 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
6921 (lang_type): Add is_partial_instantiation. Decrease width of
6923 (PARTIAL_INSTANTIATION_P): New macro.
6924 (OPERATOR_TYPENAME_P): Remove.
6925 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
6926 OPERATOR_TYPENAME_P.
6927 (grok_op_properties): Likewise.
6928 * friend.c (do_friend): Handle friends that are member functions
6930 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
6931 * pt.c (instantiate_class_template): Rework for clarity. Avoid
6932 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
6933 any more partial instantiation than is absolutely necessary for
6934 implicit typename. Set PARTIAL_INSTANTIATION_P.
6935 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
6936 * semantics.c (begin_class_definition): Handle partial
6937 specializations of a type that was previously partially
6940 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
6942 * g++spec.c (LIBSTDCXX): Provide default definition.
6943 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
6945 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6947 * Make-lang.in (g++.o): Depend on prefix.h.
6949 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
6951 * tree.c (bound_pmf_p): New fn.
6952 * typeck.c (build_c_cast): Use it.
6954 * decl.c (grok_op_properties): Use same_type_p.
6956 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6958 * Makefile.in (cvt.o): Depend on toplev.h.
6960 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
6962 * cvt.c: Include toplev.h.
6964 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
6967 * init.c (expand_vec_init): Initialize variable `itype'.
6969 * lex.c (yyerror): Cast the argument passed to a ctype function to
6972 * method.c (build_mangled_C9x_name): Wrap prototype and definition
6973 in "HOST_BITS_PER_WIDE_INT >= 64".
6975 * typeck.c (build_binary_op): Mark parameter `convert_p' with
6978 1998-12-22 Mark Mitchell <mark@markmitchell.com>
6980 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
6981 * tree.c (build_exception_variant): Don't crash on empty throw
6984 1998-12-18 DJ Delorie <dj@cygnus.com>
6986 * cvt.c (convert_to_reference): Check for both error_mark_node
6987 and NULL_NODE after call to convert_for_initialization.
6989 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
6991 * error.c (interesting_scope_p): New fn.
6992 (dump_simple_decl): Use it.
6993 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
6994 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
6996 1998-12-16 Mark Mitchell <mark@markmitchell.com>
6998 * class.c (resolve_address_of_overloaded_function): Do conversion
6999 to correct type here, rather than ...
7000 (instantiate_type): Here.
7002 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
7003 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
7004 (decl_template_parm_p): Remove.
7005 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
7007 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
7008 * pt.c (push_inline_template_parms_recursive): Set it.
7009 (decl_template_parm_p): Remove.
7010 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
7011 (process_template_parm): Set it.
7013 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
7015 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
7016 if configured with cpplib.
7018 1998-12-15 Mark Mitchell <mark@markmitchell.com>
7020 * decl.c (poplevel): Make sure ns_binding is initialized.
7022 * decl.c (finish_function): Undo inadvertent change in previous
7025 1998-12-14 Mark Mitchell <mark@markmitchell.com>
7027 * class.c (pushclass): Tweak handling of class-level bindings.
7028 (resolve_address_of_overloaded_function): Update pointer-to-member
7030 (instantiate_type): Likewise.
7031 * cvt.c (cp_convert_to_pointer): Likewise.
7032 * decl.c (pop_binding): Take the DECL to pop, not just the name.
7033 Deal with `struct stat' hack.
7034 (binding_level): Add to documentation.
7035 (push_binding): Clear BINDING_TYPE.
7036 (add_binding): New function.
7037 (push_local_binding): Use it.
7038 (push_class_binding): Likewise.
7039 (poplevel): Adjust calls to pop_binding.
7040 (poplevel_class): Likewise.
7041 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
7042 declarations to current binding level.
7043 (push_class_level_binding): Likewise.
7044 (push_overloaded_decl): Adjust handling of OVERLOADs in local
7046 (lookup_namespace_name): Don't crash when confronted with a
7048 (lookup_name_real): Do `struct stat' hack in local binding
7050 (build_ptrmemfunc_type): Adjust documentation.
7051 (grokdeclarator): Don't avoid building real array types when
7052 processing templates unless really necessary.
7053 (finish_method): Adjust calls to pop_binding.
7054 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
7055 not reparse_decl_as_expr.
7056 (build_expr_from_tree): Deal with a template-id as the function to
7057 call in a METHOD_CALL_EXPR.
7058 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
7059 (maybe_adjust_types_For_deduction): Don't do peculiar things with
7061 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
7062 pointer-to-member types where necessary.
7063 * tree.c (build_cplus_array_type_1): Don't avoid building real
7064 array types when processing templates unless really necessary.
7065 (build_exception_variant): Compare the exception lists correctly.
7067 1998-12-13 Mark Mitchell <mark@markmitchell.com>
7069 * cp-tree.def (CPLUS_BINDING): Update documentation.
7070 * cp-tree.h (LOCAL_BINDING_P): New macro.
7071 (lang_identifier): Rename local_value to bindings.
7072 (tree_binding): Make `scope' of type `void*', not `tree'.
7073 (BINDING_SCOPE): Update documentation.
7074 (IDENTIFIER_LOCAL_VALUE): Remove.
7075 (IDENTIFIER_CLASS_VALUE): Document.
7076 (IDENTIFIER_BINDING): New macro.
7077 (IDENTIFIER_VALUE): Likewise.
7078 (TIME_IDENTIFIER_TIME): Likewise.
7079 (TIME_IDENTIFIER_FILEINFO): Likewise.
7080 (IMPLICIT_TYPENAME_P): Likewise.
7081 (set_identifier_local_value): Remove.
7082 (push_local_binding): New function.
7083 (push_class_binding): Likewise.
7084 * class.c (pushclass): Update comments; use push_class_binding.
7085 * decl.c (set_identifier_local_value_with_scope): Remove.
7086 (set_identifier_local_value): Likewise.
7087 (push_binding): New function.
7088 (pop_binding): Likewise.
7089 (binding_level): Update documentation. Remove shadowed.
7090 (BINDING_LEVEL): New macro.
7091 (free_binding_nodes): New variable.
7092 (poplevel): Adjust for new name-lookup scheme. Don't mess up
7093 BLOCK_VARs when doing for-scope extension. Remove effectively
7095 (pushlevel_class): Tweak formatting.
7096 (poplevel_class): Adjust for new name-lookup scheme.
7097 (print_binding_level): Likewise.
7098 (store_bindings): Likewise.
7099 (pushdecl): Likewise.
7100 (pushdecl_class_level): Likewise.
7101 (push_class_level_binding): Likewise.
7102 (push_overloaded_decl): Update comments. Adjust for new
7104 (lookup_name_real): Likewise.
7105 (lookup_name_current_level): Likewise.
7106 (cp_finish_decl): Likewise.
7107 (require_complete_types_for_parms): Likewise. Remove misleading
7109 (grok_parms): Likewise. Don't call
7110 require_complete_types_for_parms here.
7111 (grok_ctor_properties): Don't treat templates as copy
7113 (grop_op_properties): Or as assignment operators.
7114 (start_function): Document. Adjust for new name-lookup scheme.
7115 (finish_function): Likewise.
7116 * decl2.c (do_local_using_decl): Use push_local_binding.
7117 * lex.c (begin_definition_of_inclass_inline): New function, split
7119 (do_pending_inlines): Here, and ...
7120 (process_next_inline): Here.
7121 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
7122 (init_filename_times): Likewise.
7123 (extract_interface_info): Likewise.
7124 (ste_typedecl_interface_info): Likewise.
7125 (check_newline): Likewise.
7126 (dump_time_statistics): Likewise.
7127 (handle_cp_pragma): Likewise.
7128 (do_identifier): Adjust for new name-lookup scheme.
7129 * parse.y (function_try_block): Return ctor_initializer_opt value.
7131 (fn.defpen): Pass appropriate values to start_function.
7132 (pending_inline): Use functor_try_block value, and pass
7133 appropriate values to finish_function.
7134 * pt.c (is_member_template): Update documentation; remove handling
7135 of FUNCTION_DECLs. As per name, this function should deal only in
7137 (decl_template_parm_p): Change name of olddecl parameter to decl.
7138 (check_template_shadow): Adjust for new name-lookup scheme.
7139 (lookup_template_class): Likewise.
7140 (tsubst_decl): Tweak so as not to confuse member templates with
7141 copy constructors and assignment operators.
7142 (unify): Handle UNION_TYPEs.
7143 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
7144 (lang_print_xnode): Adjust for new name-lookup scheme.
7145 * typeck.c (mark_addressable): Likewise.
7146 (c_expand_return): Likewise.
7148 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
7150 * decl.c (grokdeclarator): Allow field with same name as class
7153 * decl.c (lookup_name_real): Don't limit field lookup to types.
7154 * class.c (check_member_decl_is_same_in_complete_scope): No error
7155 if icv and x are the same.
7156 * lex.c (do_identifier): Tweak error message.
7158 1998-12-10 Mark Mitchell <mark@markmitchell.com>
7160 * decl.c (start_enum): Use push_obstacks, not
7161 end_temporary_allocation.
7162 (finish_enum): Call pop_obstacks.
7164 1998-12-10 Mark Mitchell <mark@markmitchell.com>
7166 * class.c (instantiate_type): Return error_mark_node rather than
7169 1998-12-09 Mark Mitchell <mark@markmitchell.com>
7171 * cp-tree.h (most_specialized_instantiation): New function.
7172 (print_candidates): Likewise.
7173 * class.c (validate_lhs): Remove.
7174 (resolve_address_of_overloaded_function): New function, split out
7175 and then substantially reworked, from ...
7176 (instantiate_type): Use it. Simplify.
7177 * cvt.c (convert_to_reference): Complain when caller has indicated
7178 that's the right thing to do. Don't crash if instantiate_type
7180 * pt.c: Substitute `parameters' for `paramters' throughout.
7181 (print_candidates): Don't make it static.
7182 (most_specialized_instantiation): Split out from ...
7183 (most_specialized): Here.
7185 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
7187 * lex.c (lang_init_options): Initialize cpplib.
7188 * decl2.c (parse_options,cpp_initialized): Removed.
7189 (lang_decode_option): Move initialization of cpplib to
7192 1998-12-09 Mark Mitchell <mark@markmitchell.com>
7194 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
7195 well as the TYPE_DECL, when a typedef name is assigned to a
7196 previously anonymous type.
7198 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
7200 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
7201 __cp_eh_info for getting the eh info pointer. Add table_index to
7203 (push_eh_cleanup): Don't increment 'handlers' data field.
7204 (process_start_catch_block): Don't set the 'caught' field.
7206 * cp/exception.cc (CP_EH_INFO): New macro for getting the
7207 exception info pointer within library routines.
7208 (__cp_eh_info): Use CP_EH_INFO.
7209 (__start_cp_handler): Get exception info pointer, set caught field,
7210 and increment the handlers field. Avoids this being done by handlers.
7211 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
7212 (uncaught_exception): Use CP_EH_INFO macro.
7214 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
7216 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
7218 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
7220 * lex.c (check_newline): Add support for \ as `natural'
7221 characters in file names in #line to be consistent with #include
7222 handling. We support escape processing in the # 1 "..." version of
7223 the command. See also support in cp/lex.c.
7225 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
7227 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
7230 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
7232 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
7234 * error.c (dump_simple_decl): Also print namespace context.
7235 (dump_function_decl): Likewise.
7237 * decl2.c (ambiguous_decl): Don't print old value if it's
7240 * decl.c (lookup_name_real): Fix handling of local types shadowed
7241 by a non-type decl. Remove obsolete code.
7242 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
7244 * lang-options.h: Add -fpermissive.
7245 * decl2.c: Likewise.
7246 * cp-tree.h: Add flag_permissive.
7247 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
7248 were specified, set flag_pedantic_errors.
7249 * call.c (build_over_call): Turn dropped qualifier messages
7251 * cvt.c (convert_to_reference): Likewise.
7252 * typeck.c (convert_for_assignment): Likewise.
7254 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
7256 * decl2.c (coerce_new_type): Use same_type_p.
7257 (coerce_delete_type): Likewise.
7259 * call.c (check_dtor_name): Return 1, not error_mark_node.
7261 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
7263 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
7264 if MULTIPLE_SYMBOL_SPACES.
7266 * pt.c (check_template_shadow): New fn.
7267 * decl2.c (grokfield): Use it.
7268 * decl.c (pushdecl): Likewise.
7269 (pushdecl_class_level): Likewise.
7270 (start_method): Likewise.
7271 (xref_tag): Don't try to use 't' if we're defining.
7273 * call.c (check_dtor_name): Just return an error_mark_node.
7274 * pt.c (lookup_template_class): Complain about using non-template here.
7275 * parse.y (apparent_template_type): Not here.
7277 * pt.c (check_explicit_specialization): Complain about specialization
7280 * lang-options.h: Add -f{no-,}implicit-inline-templates.
7282 * pt.c (convert_nontype_argument): Don't assume that any integer
7283 argument is intended to be a constant-expression.
7285 1998-12-03 Mark Mitchell <mark@markmitchell.com>
7287 * class.c (handle_using_decl): Fix comment. Don't lookup
7288 constructors in base classes.
7289 (validate_lhs): Fix typo in comment.
7290 * search.c (lookup_field_1): Don't return a USING_DECL.
7292 * cp-tree.h (DECL_ACCESS): Improve documentation.
7294 * decl.c (expand_static_init): Don't set the initialization-done
7295 flag until the initialization is done.
7297 1998-12-02 Mark Mitchell <mark@markmitchell.com>
7299 * decl2.c (validate_nonmember_using_decl): Complain about using
7300 declarations for class members.
7302 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
7304 * typeck2.c (process_init_constructor): Use same_type_p.
7306 * decl.c (check_tag_decl): Don't warn about null decl inside a
7309 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
7311 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
7312 (resolve_overloaded_unification): Strip baselinks.
7314 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7316 * g++spec.c: Don't prototype xmalloc.
7318 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
7320 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
7322 * decl.c (check_tag_decl): Do complain about null friend decl at
7325 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
7327 * lex.c (make_lang_type): Clear the whole struct lang_type, not
7328 only the first multiple of sizeof (int).
7330 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
7332 * decl.c (start_decl): An explicit specialization of a static data
7333 member is only a definition if it has an initializer.
7335 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
7336 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
7338 * init.c (expand_default_init): Check for DIRECT_BIND instead of
7341 * call.c (build_over_call): Use build_decl.
7343 * except.c (expand_throw): Just use convert, not
7344 build_reinterpret_cast.
7346 * lex.c (handle_generic_pragma): Use token_buffer.
7348 * decl.c (check_tag_decl): Don't complain about null friend decl.
7350 1998-11-24 Dave Pitts <dpitts@cozx.com>
7352 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
7354 * lex.c (check_newline): Use ISALPHA.
7355 (readescape): Use ISGRAPH.
7356 (yyerror): Use ISGRAPH.
7358 1998-11-24 Nathan Sidwell <nathan@acm.org>
7360 * search.c (get_abstract_virtuals): Do not use initial
7361 CLASSTYPE_ABSTRACT_VIRTUALS.
7362 * typeck2.c (abstract_virtuals_error): Show location of abstract
7364 * call.c (build_new_method_call): Use
7365 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
7366 * class.c (finish_struct_bits): Don't bother working out whether
7367 get_abstract_virtuals will do anything, just do it.
7369 1998-11-24 Graham <grahams@rcp.co.uk>
7371 * typeck.c (build_component_ref): Remove unused statement.
7373 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
7375 * class.c (add_method): Catch invalid overloads.
7377 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
7378 * search.c (lookup_conversions): Handle getting real OVERLOADs.
7379 (add_conversions): Likewise. Revert last change.
7380 * call.c (add_conv_candidate): Pass totype to add_candidate instead
7381 of fn. Don't add a new candidate if the last one was for the same
7383 (print_z_candidates): Handle getting a type as a function.
7384 (joust): If we got two conversion candidates to the same type,
7386 (build_object_call): Lose 'templates'.
7387 (build_user_type_conversion_1): Handle getting real OVERLOADs.
7389 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
7391 * typeck2.c (process_init_constructor): If there are elements
7392 that don't have initializers and they need to have constructors
7393 run, supply them with initializers.
7395 * class.c (finish_struct_1): A class with a 0-width bitfield is
7398 1998-11-23 Mark Mitchell <mark@markmitchell.com>
7400 * pt.c (instantiate_class_template): Don't try to figure out what
7401 specialization to use for a partial instantiation. Correct
7402 typos in a couple of comments. Avoid calling uses_template_parms
7405 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
7407 * method.c (process_overload_item): Add call to
7408 build_mangled_C9x_name for intTI_type_nodes.
7409 (build_mangled_C9x_name): Add prototype, define.
7410 * decl.c (init_decl_processing): Add names for
7413 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
7415 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
7417 * class.c (finish_struct_1): Set things up for 0-width bitfields
7418 like we do for others.
7420 * decl.c (check_tag_decl): New fn.
7421 (shadow_tag): Split out from here.
7422 * decl2.c (grok_x_components): Call it.
7424 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
7426 * decl.c: Lose warn_about_return_type.
7427 (grokdeclarator): Always complain about implicit int, except for
7430 * decl.c (tag_name): New fn.
7431 (xref_tag): Complain about using typedef-name after class-key.
7433 * init.c (expand_vec_init): Also keep going if from_array.
7435 * tree.c (is_overloaded_fn): Also handle the output of
7438 * decl.c (grokdeclarator): Use constructor_name when comparing
7439 field name against enclosing class.
7440 * class.c (finish_struct_anon): Likewise.
7442 1998-11-22 Mark Mitchell <mark@markmitchell.com>
7444 * decl.c (poplevel): Remove code to handle KEEP == 2.
7445 (finish_function): Don't confuse BLOCK-order when
7446 processing a destructor.
7448 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
7450 * decl.c (require_complete_types_for_parms): Call layout_decl
7451 after we've completed the type.
7453 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
7455 * decl2.c (validate_nonmember_using_decl): Allow using templates
7456 from the global namespace.
7458 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
7460 Handle specifying template args to member function templates.
7461 * tree.c (build_overload): Always create an OVERLOAD for a template.
7462 * search.c (add_conversions): Handle finding an OVERLOAD.
7463 * decl2.c (check_classfn): Likewise.
7464 * lex.c (identifier_type): See through a baselink.
7465 * parse.y (do_id): Don't call do_identifier if we got a baselink.
7466 * class.c (instantiate_type, case TREE_LIST): Recurse.
7468 * decl.c (grokdeclarator): Allow a boolean constant for array
7469 bounds, odd as that sounds.
7471 * pt.c (unify): Be more strict about non-type parms, except for
7473 (UNIFY_ALLOW_INTEGER): New macro.
7475 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
7477 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
7479 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
7481 * semantics.c (begin_class_definition): Call
7482 maybe_process_partial_specialization before push_template_decl.
7483 Don't call push_template_decl for a specialization.
7484 * search.c (lookup_field): Do return a member template class.
7485 * decl2.c (handle_class_head): Handle member template classes.
7487 * decl.c (grokdeclarator): A parm type need not be complete.
7489 * pt.c (convert_nontype_argument): Fix thinko.
7491 1998-11-18 Mark Mitchell <mark@markmitchell.com>
7493 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
7494 (global_delete_fndecl): New variable.
7495 * decl.c (global_delete_fndecl): Define it.
7496 (init_decl_processing): Set it.
7497 * init.c (build_builtin_delete_call): Use it.
7498 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
7501 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
7503 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
7506 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
7507 * call.c (build_object_call): Also support references to functions.
7508 * typeck.c (convert_for_initialization): Don't decay a function
7509 if the target is a reference to function.
7511 * search.c (add_conversions): Get all the overloads from a class.
7513 * decl.c (grok_ctor_properties): Complain about any constructor
7514 that will take a single arg of the class type by value.
7516 * typeck2.c (build_functional_cast): Can't create objects of
7517 abstract classes this way.
7518 * cvt.c (ocp_convert): Likewise.
7520 * decl.c (grokfndecl): Member functions of local classes are not
7523 1998-11-18 Mark Mitchell <mark@markmitchell.com>
7525 * Make-lang.in (cc1plus): Add dependency on hash.o.
7527 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
7529 * search.c (get_abstract_virtuals): Complain about virtuals with
7531 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
7532 with no final overrider.
7533 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
7534 on virtuals with no final overrider.
7536 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
7538 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
7541 * friend.c (do_friend): Don't set_mangled_name_for_decl.
7543 * class.c (finish_struct_anon): Complain about non-fields.
7544 * decl2.c (build_anon_union_vars): Likewise.
7546 * decl.c (grokdeclarator): Normal data members can't have the same
7547 name as the class, either.
7548 * class.c (finish_struct_anon): Neither can members of an
7551 1998-11-17 Mark Mitchell <mark@markmitchell.com>
7553 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
7554 (TYPE_BINFO): Likewise.
7555 (IS_AGGR_TYPE): Tweak.
7556 (SET_IS_AGGR_TYPE): New macro.
7557 (CLASS_TYPE_P): Tweak.
7558 (lang_type): Group mark bitfields together. Remove linenum.
7559 (CLASSTYPE_SOURCE_LINE): Remove macro.
7560 (CLASSTYPE_MARKED_N): New macro.
7561 (SET_CLASSTYPE_MARKED_N): Likewise.
7562 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
7563 (CLASS_TYPE_MARKED_*): Use them.
7564 (SET_CLASSTYPE_MARKED_*): Likewise.
7565 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
7566 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
7567 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
7568 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
7569 * class.c (class_cache_obstack): New variable.
7570 (class_cache_firstobj): Likewise.
7571 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
7572 (pushclass): Free the cache, when appropriate.
7574 (maybe_push_cache_obstack): Use class_cache_obstack.
7575 * decl.c (include hash.h).
7576 (typename_hash): New function.
7577 (typename_compare): Likewise.
7578 (build_typename_type): Check the hash table to avoid creating
7580 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
7581 (grokdeclarator): Use CLASS_TYPE_P.
7582 (xref_basetypes): Likewise.
7583 (start_function): Likewise. Don't put current_class_ref on the
7585 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
7587 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
7588 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
7589 fields for types other than class types. Do clear TYPE_ALIAS_SET
7590 for types other than class types, though.
7591 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
7592 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7593 * pt.c (process_template_parm): Don't set
7594 CLASSTYPE_GOT_SEMICOLON.
7595 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7596 Coerce arguments on the momentary obstack.
7597 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7598 (instantiate_class_template): Calculate template arguments on the
7599 momentary obstack. Tidy.
7600 (tsubst_template_arg_vector): Use make_temp_vec.
7601 (tsubst_aggr_type): Put template arguments on the momentary
7603 (tsubst_decl): Likewise.
7604 (tsubst): Copy the array bounds index to the permanent obstack
7605 before building index types. Use new macros.
7606 (unify): Use new macros.
7607 (do_type_instantiation): Likewise.
7608 * search.c (lookup_fnfields_1): Use new macros.
7609 (dfs_pushdecls): Build envelopes on the cache obstack.
7610 (dfs_compress_decls): Use new macros.
7611 (push_class_decls): Build on the cache obstack.
7612 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
7613 * sign.c (build_signature_pointer_or_reference_type): Use
7615 * tree.c (make_binfo): Check CLASS_TYPE_P.
7616 (copy_template_template_parm): Adjust.
7617 (make_temp_vec): Use push_expression_obstack.
7618 * typeck.c (complete_type): Use new macros.
7619 (comptypes): Likewise.
7621 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
7623 * pt.c (tsubst): Add diagnostics for invalid array, reference
7624 and pointer to member types.
7626 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
7628 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
7630 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
7633 * parse.y (structsp): Fix cut-and-paste error.
7635 * init.c (build_new): Complain about non-integral size.
7637 * parse.y (unary_expr): Complain about defining types in sizeof.
7639 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
7641 * rtti.c (build_x_typeid): Complain about typeid without
7642 including <typeinfo>.
7643 (get_typeid): Likewise. Complain about typeid of incomplete type.
7644 (get_tinfo_fn_dynamic): Likewise.
7645 (get_typeid_1): Not static anymore.
7646 * except.c (build_eh_type_type): Use get_typeid_1.
7648 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
7649 ambiguous or private bases. Fix warning for reference cast.
7651 1998-11-16 Mark Mitchell <mark@markmitchell.com>
7653 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
7654 * decl.c (duplicate_decls): Remove special-case code to deal with
7655 template friends, and just do the obvious thing.
7656 * pt.c (register_specialization): Tweak for clarity, and also to
7657 clear DECL_INITIAL for an instantiation before it is merged with a
7659 (check_explicit_specialization): Fix indentation.
7660 (tsubst_friend_function): Handle both definitions in friend
7661 declaration and outside friend declarations.
7662 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
7663 (regenerate_decl_from_template): Tweak accordingly.
7664 (instantiate_decl): Likewise.
7666 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
7668 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
7669 member function reference to error.
7670 * cvt.c (ocp_convert): Complain about converting an overloaded
7673 * init.c (build_offset_ref): Just return a lone static member
7676 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
7679 * typeck.c (build_binary_op_nodefault): Improve error handling.
7681 * decl.c (grokfndecl): Complain about making 'main' a template.
7683 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
7685 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
7686 TYPE_DECL in a template.
7688 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
7690 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
7692 * decl.c (struct cp_function): Add named_label_uses.
7693 (push_cp_function_context): Save it.
7694 (pop_cp_function_context): Restore it.
7695 (define_label): Also complain about jumping into the scope of
7696 non-POD objects that don't have constructors.
7697 * tree.c (pod_type_p): New fn.
7699 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
7700 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
7701 (get_tinfo_fn): Not here.
7702 * repo.c (repo_get_id): Abort if we get called for an incomplete
7705 1998-11-13 Mark Mitchell <mark@markmitchell.com>
7707 * except.c (expand_throw): Make sure first argument to
7708 __cp_push_exception is of type `void*' to avoid spurious error
7711 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
7713 * pt.c (try_one_overload): Take orig_targs again. Only check for
7714 mismatches against them; we don't care what a previous call found.
7715 (resolve_overloaded_unification): Adjust.
7717 * search.c (lookup_field): Don't return anything for a non-type
7718 field from a dependent type.
7719 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
7720 in an array declarator.
7721 (start_decl): Push into the class before looking for the field.
7723 1998-11-08 Mark Mitchell <mark@markmitchell.com>
7725 * method.c (build_overload_value): Handle REFERENCE_TYPE.
7727 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
7729 * decl.c (grokdeclarator): Allow namespace-scoped members if they
7732 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
7734 * pt.c (tsubst_decl): Don't mess with the global value of an
7735 un-mangled DECL_ASSEMBLER_NAME.
7737 1998-11-03 Christopher Faylor <cgf@cygnus.com>
7739 * decl.c (init_decl_processing): Remove CYGWIN conditional
7740 since CYGWIN is now able to deal with trapping signals.
7742 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7744 * cp-tree.h: Don't include gansidecl.h.
7745 * exception.cc: Include gansidecl.h (since we don't include config.h)
7746 * g++spec.c: Don't include gansidecl.h.
7748 1998-11-06 Mark Mitchell <mark@markmitchell.com>
7750 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
7752 (DECL_DEFINED_IN_CLASS_P): New macro.
7753 (TEMPLATE_PARMS_FOR_INLINE): Document.
7754 (check_static_variable_definition): New function.
7755 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
7757 (check_static_variable_definition): Split out from ...
7758 (grokdeclarator): Here.
7759 * pt.c (check_default_tmpl_args): New function, split out from ...
7760 (push_template_decl_real): Here.
7761 (instantiate_template): Fix comment.
7763 1998-11-04 Mark Mitchell <mark@markmitchell.com>
7765 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
7766 (CP_TYPE_VOLATILE_P): Likewise.
7767 (CP_TYPE_RESTRICT_P): Likewise.
7769 1998-11-03 Mark Mitchell <mark@markmitchell.com>
7771 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
7773 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
7775 * class.c (instantiate_type): Be more helpful.
7777 * decl2.c (import_export_decl): Call import_export_class.
7779 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
7780 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
7781 * pt.c (tsubst_copy): Likewise.
7783 1998-11-02 Mark Mitchell <mark@markmitchell.com>
7785 * init.c (expand_vec_init): Fix off-by-one error.
7787 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
7789 * parse.y (apparent_template_type): New type.
7790 (named_complex_class_head_sans_basetype): Use it.
7791 * Makefile.in (CONFLICTS): One new conflict.
7792 * parse.c: Regenerated.
7794 1998-11-01 Mark Mitchell <mark@markmitchell.com>
7796 * cp-tree.h (COMPARE_STRICT): New macro.
7797 (COMPARE_BASE): Likewise.
7798 (COMPARE_RELAXED): Likewise.
7799 (COMPARE_REDECLARATION): Likewise.
7800 (same_type_p): Likewise.
7801 (same_or_base_type_p): Likewise.
7802 * call.c (standard_conversion): Use them, in place of comptypes
7803 with numeric arguments.
7804 (reference_binding): Likewise.
7805 (convert_like): Likewise.
7806 (build_over_call): Likewise.
7807 (is_subseq): Likewise.
7808 (is_properly_derived_from): Likewise.
7809 (compare_ics): Likewise.
7811 * class.c (delete_duplicate_fields_1): Likewise.
7812 (resolves_to_fixed_type_p): Likewise.
7813 (instantiate_type): Likewise. Remove #if 0'd code.
7814 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
7815 (pushdecl): Likewise.
7816 (lookup_name_real): Likewise.
7817 (grokdeclarator): Likewise. Check for illegal array declarations.
7818 (grokparms): Likewise.
7819 (grok_op_properties): Likewise.
7820 * decl2.c (check_classfn): Likewise.
7821 * friend.c (is_friend): Likewise.
7822 (make_friend_class): Likewise.
7823 * init.c (expand_aggr_init): Likewise.
7824 (expand_vec_init): Likewise.
7825 * pt.c (is_member_template_class): Remove declaration.
7826 (is_specialization_of): Use COMPARE_* and new macros.
7827 (comp_template_parms): Likewise.
7828 (convert_nontype_argument): Likewise.
7829 (coerce_template_template_parms): Likewise.
7830 (template_args_equal): Likewise.
7831 (lookup_template_class): Likewise.
7832 (type_unification_real): Likewise.
7834 (get_bindings_real): Likewise.
7835 * search.c (covariant_return_p): Likewise.
7836 (get_matching_virtual): Likewise.
7837 * sig.c (match_method_types): Likewise.
7838 * tree.c (vec_binfo_member): Likewise.
7839 (cp_tree_equal): Likewise.
7840 * typeck.c (common_type): Likewise.
7841 (comp_array_types): Likewise. Get issues involving unknown array
7843 (comptypes): Update comments. Use new flags.
7844 (comp_target_types): Use new macros.
7845 (compparms): Likewise.
7846 (comp_target_parms): Likewise.
7847 (string_conv_p): Likewise.
7848 (build_component_ref): Likewise.
7849 (build_indirect_ref): Likewise.
7850 (build_conditional_expr): Likewise.
7851 (build_static_cast): Likewise.
7852 (build_reinterpret_cast): Likewise.
7853 (build_const_cast): Likewise.
7854 (build_modify_expr): Likewise.
7855 (convert_for_assignment): Likewise.
7856 (comp_ptr_ttypes_real): Likewise.
7857 (ptr_reasonably_similar): Likewise.
7858 (comp_ptr_ttypes_const): Likewise.
7860 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
7862 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
7864 1998-10-30 Mark Mitchell <mark@markmitchell.com>
7866 * decl2.c (delete_sanity): Pass integer_zero_node, not
7867 integer_two_node, to build_vec_delete.
7868 * init.c (build_array_eh_cleanup): Remove.
7869 (expand_vec_init_try_block): New function.
7870 (expand_vec_init_catch_clause): Likewise.
7871 (build_vec_delete_1): Don't deal with case that auto_delete_vec
7872 might be integer_two_node anymore.
7873 (expand_vec_init): Rework for initialization-correctness and
7874 exception-correctness.
7875 * typeck2.c (process_init_constructor): Make mutual exclusivity
7876 of cases more obvious.
7878 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
7880 * decl.c (lookup_name_real): OK, only warn if not lexing.
7881 Simplify suggested fix.
7883 * cp-tree.h (IDENTIFIER_MARKED): New macro.
7884 * search.c (lookup_conversions): Use breadth_first_search.
7885 (add_conversions): Avoid adding two conversions to the same type.
7886 (breadth_first_search): Work with base binfos, rather
7887 than binfos and base indices.
7888 (get_virtual_destructor): Adjust.
7889 (tree_has_any_destructor_p): Adjust.
7890 (get_matching_virtual): Adjust.
7892 * pt.c (push_template_decl_real): Generalize check for incorrect
7893 number of template parms.
7894 (is_member_template_class): #if 0.
7896 1998-10-29 Richard Henderson <rth@cygnus.com>
7898 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
7901 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
7903 * lex.c: Call check_newline from lang_init always. After
7904 calling cpp_start_read, set yy_cur and yy_lim to read from the
7905 cpplib token buffer.
7907 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
7909 * class.c (instantiate_type): Don't consider templates for a normal
7912 * class.c (finish_struct_1): Don't complain about non-copy
7913 assignment ops in union members.
7915 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
7916 (prepare_fresh_vtable): Likewise.
7917 (finish_struct_1): Don't call import_export_class.
7918 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
7919 (finish_prevtable_vardecl): Lose.
7920 (finish_file): Don't call it.
7921 * pt.c (instantiate_class_template): Likewise.
7922 * cp-tree.h: Remove it.
7924 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
7925 * decl.c (finish_function): Not here.
7926 (start_function): Do set DECL_INITIAL.
7928 * pt.c (push_template_decl_real): Complain about default template
7929 args for enclosing classes.
7931 * call.c (add_function_candidate): Treat conversion functions
7932 as coming from the argument's class.
7933 * cp-tree.h (DECL_CONV_FN_P): New fn.
7934 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
7935 * class.c (add_method): Use DECL_CONV_FN_P.
7936 * decl2.c (check_classfn): Likewise.
7937 * error.c (dump_function_name): Likewise.
7938 (dump_function_decl): Likewise.
7939 * pt.c (fn_type_unification): Likewise.
7940 * search.c (add_conversions): Likewise.
7942 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
7944 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
7945 * method.c (hack_identifier): Also check for using RESULT_DECL
7948 1998-10-27 Mark Mitchell <mark@markmitchell.com>
7950 * decl.c (grokdeclarator): Use type_quals, rather than constp,
7953 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
7955 * call.c (standard_conversion): instantiate_type here.
7956 (reference_binding): And here.
7957 (implicit_conversion): Not here.
7958 (build_op_delete_call): No need to cons up an OVERLOAD.
7959 * cvt.c (cp_convert_to_pointer): instantiate_type here.
7960 (convert_to_reference): And here.
7961 * decl.c (grok_reference_init): Not here.
7962 (grokparms): Or here.
7963 * typeck2.c (digest_init): Or here.
7964 * typeck.c (decay_conversion): Take the address of overloaded
7966 (require_instantiated_type): Lose.
7967 (convert_arguments): Don't handle unknown types here.
7968 (build_c_cast): Likewise.
7969 (build_binary_op): Gut.
7970 (build_conditional_expr): Don't require_instantiated_type.
7971 (build_modify_expr): Likewise.
7972 (build_static_cast): Don't instantiate_type.
7973 (build_reinterpret_cast): Likewise.
7974 (build_const_cast): Likewise.
7975 (convert_for_initialization): Likewise.
7976 (build_ptrmemfunc): Use type_unknown_p.
7977 (convert_for_assignment): Also do default_conversion on overloaded
7978 functions. Hand them off to ocp_convert.
7980 1998-10-26 Mark Mitchell <mark@markmitchell.com>
7982 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
7983 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
7985 * class.c (finish_struct_1): Use build_cplus_array_type to build
7987 * decl.c (init_decl_processing): Likewise.
7988 * except.c (expand_end_eh_spec): Likewise.
7989 * search.c (expand_upcast_fixups): Simplify very slightly.
7991 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
7993 * decl.c (grokdeclarator): Complain about a variable using
7994 constructor syntax coming back null from start_decl.
7996 * friend.c (make_friend_class): Complain about trying to make
7997 a non-class type a friend.
7999 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
8000 (start_function): Not here.
8002 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
8004 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
8006 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
8008 * typeck2.c (process_init_constructor): Only skip anonymous fields
8009 if they are bitfields.
8011 * cp-tree.def (TYPEOF_TYPE): New code.
8012 * error.c (dump_type_real): Handle it.
8013 * pt.c (tsubst): Likewise.
8014 * tree.c (search_tree): Likewise.
8015 * semantics.c (finish_typeof): New fn.
8016 * parse.y (typespec): Use it.
8017 * cp-tree.h: Declare it.
8019 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
8021 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
8023 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
8025 * typeck.c (convert_arguments): Don't handle pmf references
8028 * init.c (build_member_call): Don't try to convert to the base type
8029 if it's ambiguous or pedantic.
8031 * typeck2.c (check_for_new_type): Only depend on pedantic for
8034 1998-10-25 Mark Mitchell <mark@markmitchell.com>
8036 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
8037 non-converting constructors.
8039 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
8041 * gxxint.texi: Correct documentation for n, N, Q, and B.
8043 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
8045 * parse.y (condition): Convert VAR_DECL from reference to indirect
8048 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
8050 * exception.cc (__cp_pop_exception): Free the original exception
8051 value, not the potentially coerced one.
8053 1998-10-23 Mark Mitchell <mark@markmitchell.com>
8055 * Makefile.in (hash.h): Run gperf when necessary.
8057 * cp-tree.h (CP_TYPE_READONLY): Remove.
8058 (CP_TYPE_VOLATILE): Likewise.
8059 (CP_TYPE_QUALS): New macro.
8060 (CP_TYPE_CONST_P): Likewise.
8061 (CP_TYPE_VOLATILE_P): Likewise.
8062 (CP_TYPE_RESTRICT_P): Likewise.
8063 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
8064 (cp_build_type_variant): Rename to ...
8065 (cp_build_qualified_type): New function.
8066 (c_apply_type_quals_to_decl): Declare.
8067 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
8068 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
8069 (cp_type_qual_from_rid): New function.
8070 (compparms): Remove unused parameter. All callers changed.
8071 (cp_type_quals): New function.
8072 (at_least_as_qualified_p): Likewise.
8073 (more_qualified_p): Likewise.
8075 * call.c (standard_conversion): Replace calls to
8076 cp_build_type_variant with cp_build_qualified_type. Use
8077 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
8078 compare them. Use CP_TYPE_* macros to check qualifiers.
8079 (reference_binding): Likewise.
8080 (implicit_conversion): Likewise.
8081 (add_builtin_candidates): Likewise.
8082 (build_over_call): Likewise.
8083 * class.c (overrides): Compare all qualifiers, not just `const',
8084 on method declarations.
8085 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
8086 (convert_pointer_to_real): Likewise.
8087 (type_promotes_to): Likewise.
8088 * decl.c (check_for_uninitialized_const_var): New function.
8089 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
8090 (cp_finish_decl): Use check_for_uninitialized_const_var.
8091 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
8093 (grok_ctor_properties): Likewise.
8094 (grok_op_properties): Likewise.
8095 (start_function): Likewise.
8096 (rever_static_member_fn): Likewise.
8097 * decl2.c (grok_method_quals): Likewise.
8098 (grokfield): Likewise.
8099 * error.c (dump_readonly_or_volatile): Rename to ...
8100 (dump_qualifiers): New function. Handle `restrict'.
8101 (dump_type_real): Use it.
8102 (dump_aggr_type): Likewise.
8103 (dump_type_prefix): Likewise.
8104 (dump_type_suffix): Likewise.
8105 (dump_function_decl): Likewise.
8106 (cv_as_string): Likewise.
8107 * gxx.gperf: Add __restrict and __restrict__.
8108 * gxxint.texi: Document `u' as used for `__restrict', and a few
8109 other previously undocumented codes.
8110 * hash.h: Regenerated.
8111 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
8112 (build_member_call): Likewise.
8113 (build_new_1): Likewise.
8114 * lex.c (init_parse): Add entry for RID_RESTRICT.
8115 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
8116 (cp_type_qual_from_rid): Define.
8117 * lex.h (enum rid): Add RID_RESTRICT.
8118 * method.c (process_modifiers): Deal with `restrict'.
8119 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
8120 * parse.c: Regenerated.
8121 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
8122 (tsubst_aggr_type): Likewise.
8124 (check_cv_quals_for_unify): Likewise.
8126 * rtti.c (init_rtti_processing): Likewise.
8127 (build_headof): Likewise.
8128 (get_tinfo_var): Likewise.
8129 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
8130 (expand_class_desc): Likewise.
8131 (expand_attr_desc): Likewise.
8132 (synthesize_tinfo_fn): Likewise.
8133 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
8134 (get_matching_virtual): Likewise.
8135 (expand_upcast_fixups): Likewise.
8136 * sig.c (build_signature_pointer_or_reference_name): Take
8137 type_quals, not constp and volatilep.
8138 (build_signature_pointer_or_reference_type): Likewise.
8139 (match_method_types): More CP_TYPE_QUALS conversion, etc.
8140 (build_signature_pointer_constructor): Likewise.
8141 (build_signature_method_call): Likewise.
8142 * tree.c (build_cplus_array_type): Likewise.
8143 (cp_build_type_variant): Rename to ...
8144 (cp_build_qualified_type): New function. Deal with `__restrict'.
8145 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
8146 (build_exception_variant): Likewise.
8148 * typeck.c (qualif_type): Likewise.
8149 (common_type): Likewise.
8150 (comptypes): Likewise.
8151 (comp_cv_target_types): Likewise.
8152 (at_least_as_qualified_p): Define.
8153 (more_qualified_p): Likewise.
8154 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
8155 (compparms): Likewise.
8156 (inline_conversion): Likewise.
8157 (string_conv_p): Likewise.
8158 (build_component_ref): Likewise.
8159 (build_indirect_ref): Likewise.
8160 (build_array_ref): Likewise.
8161 (build_unary_op): Likewise.
8162 (build_conditional_expr): Likewise.
8163 (build_static_cast): Likewise.
8164 (build_c_cast): Likewise.
8165 (build_modify_expr): Likewise.
8166 (convert_For_assignment): Likewise.
8167 (comp_ptr_ttypes_real): Likewise.
8168 (cp_type_quals): New function.
8170 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
8172 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
8173 (CP_TYPE_VOLATILE): Likewise.
8174 * decl.c (grokdeclarator): Use them.
8175 * tree.c (canonical_type_variant): Likewise.
8177 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
8179 * parse.y (named_class_head): Push into class while parsing the
8181 * decl2.c (push_scope, pop_scope): New functions.
8182 * cp-tree.h: Declare them.
8183 * init.c (build_new_1): Delay cleanup until end of full expression.
8185 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
8187 * typeck.c (build_component_ref): Use of a type here is an error.
8189 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
8191 Revamp references to member functions.
8192 * method.c (hack_identifier): Call build_component_ref for a
8193 reference to a member function.
8194 * typeck.c (build_component_ref): Only return a single function
8195 if it's static. Otherwise, return a COMPONENT_REF.
8196 (build_x_function_call): Handle a COMPONENT_REF.
8197 (build_unary_op): Handle all unknown-type things.
8198 * decl2.c (arg_assoc): Handle COMPONENT_REF.
8199 * class.c (instantiate_type): Complain if the function we get is a
8200 nonstatic member function. Remove code for finding "compatible"
8202 * pt.c (tsubst_copy): Handle NOP_EXPR.
8203 * tree.c (build_dummy_object): New fn.
8204 (maybe_dummy_object): New fn.
8205 (is_dummy_object): New fn.
8206 * cp-tree.h: Declare them.
8207 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
8208 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
8209 * init.c (build_member_call): Use maybe_dummy_object and
8211 (build_offset_ref): Use maybe_dummy_object.
8212 (resolve_offset_ref): Use is_dummy_object.
8213 * typeck.c (build_x_function_call): Call build_dummy_object.
8214 (unary_complex_lvalue): Call is_dummy_object.
8216 * typeck.c (build_component_addr): Make sure field is a field.
8218 * call.c (build_new_op): Delete obsolete code.
8220 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
8222 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
8224 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
8225 std if std is ignored.
8227 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
8229 * decl.c (grokvardecl): Fix thinko.
8231 * decl.c (grokdeclarator): Embedded attrs bind to the right,
8234 * parse.y (fn.def2): Fix 'attrs' format.
8236 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
8238 * Makefile.in (CONFLICTS): Update.
8239 * parse.y (expr_or_declarator_intern): New rule.
8240 (expr_or_declarator, direct_notype_declarator, primary,
8241 functional_cast): Use it.
8242 (notype_declarator_intern): New rule.
8243 (notype_declarator, complex_notype_declarator): Use it.
8245 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
8247 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
8248 (grokvardecl): Likewise.
8250 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8252 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
8253 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
8255 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
8257 * pt.c (process_partial_specialization): Cast 1st argument of
8260 * tree.c (build_base_fields): Cast `base_align' to (int) when
8261 comparing against one.
8263 1998-10-16 Mark Mitchell <mark@markmitchell.com>
8265 * decl.c (lookup_name_real): Handle template parameters for member
8266 templates where said parameters have the same name as the
8269 * decl.c (expand_static_init): Build cleanups before entering the
8270 anonymous function used to do them to avoid access-checking
8273 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
8274 accidentally removed by previous change, and make DECL_RTL here.
8275 * class.c (add_method): Don't make DECL_RTL here.
8277 * pt.c (for_each_template_parm): Don't examine uninstantiated
8280 1998-10-16 Dave Brolley <brolley@cygnus.com>
8282 * lex.c (real_yylex): Fix unaligned access of wchar_t.
8284 1998-10-16 Mark Mitchell <mark@markmitchell.com>
8286 * class.c (add_method): Fix documentation to reflect previous
8287 changes. Check for duplicate method declarations here.
8288 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
8289 correctly; such things never match.
8290 (grokfndecl): Don't look for duplicate methods here.
8291 * decl2.c (check_classfn): Don't assume names are mangled.
8292 Don't add bogus member function declarations to a class before the
8293 class type is complete.
8294 (grokfield): Reformat error message.
8295 * method.c (set_mangled_name_for_decl): Don't mangle names while
8296 processing_template_decl.
8298 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
8300 * typeck.c (build_indirect_ref): Complain about a pointer to data
8302 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
8304 * init.c (resolve_offset_ref): Don't undo the above.
8306 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
8307 (struct lang_decl_flags): Add `bitfield'.
8308 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
8310 * decl2.c (grokbitfield, grok_alignof): Likewise.
8311 * init.c (build_offset_ref): Likewise.
8312 * typeck.c (build_component_addr, expr_sizeof): Likewise.
8313 * cvt.c (build_up_reference): Don't crash if taking the address
8314 returns error_mark_node.
8316 * decl.c (grokfndecl): Also check ctype when checking for ::main().
8318 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
8320 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
8322 (grokdeclarator): Instead of here.
8323 * friend.c (do_friend): Lose special handling of ::main and
8325 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
8327 * spew.c (yylex): Clear looking_for_typename if we got
8330 1998-10-15 Mark Mitchell <mark@markmitchell.com>
8332 * class.c (maybe_warn_about_overly_private_class): Improve error
8333 messages for class with only private constructors.
8335 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
8336 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
8337 (build_typename_type): New function.
8338 * decl.c (build_typename_type): Broken out from ...
8339 (make_typename_type): Use it.
8340 * search.c (lookup_field): Likewise.
8342 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8344 * pt.c (convert_nontype_argument): Check against type_referred_to.
8345 * decl.c (grokvardecl): Check for declarator name before building
8346 DECL_ASSEMBLER_NAME.
8348 1998-10-14 Mark Mitchell <mark@markmitchell.com>
8350 * pt.c (lookup_template_class): Add comment.
8351 (instantiate_class_template): Don't mark the _TYPE node for
8352 member class templates as an instantiation.
8354 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
8356 * decl.c (grokfndecl): Fix my thinko.
8358 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
8360 * tinfo2.cc (fast_compare): Remove.
8361 (before): Just use strcmp.
8362 * tinfo.cc (operator==): Just use strcmp.
8364 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
8366 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
8369 1998-10-13 Mark Mitchell <mark@markmitchell.com>
8371 * cp-tree.h (specializations_of_same_template_p): Remove.
8372 * search.c (get_template_base): Don't use it.
8373 (get_template_base_recursive): Likewise.
8374 * pt.c (specializations_of_same_template_p): Remove.
8375 (unify): Don't use it.
8376 (lookup_template_class): Find the correct parent when setting
8377 CLASSTYPE_TI_TEMPLATE.
8379 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
8381 * tinfo.cc (operator==): Always compare names.
8383 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
8385 * decl.c (start_function): Fix cut-and-paste error.
8387 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
8389 * inc/typeinfo: Add #pragma interface.
8390 (operator!=): Just call operator==.
8391 * tinfo.cc: Add #pragma implementation.
8392 (operator==): Move from inc/typeinfo and tinfo2.cc.
8393 Check __COMMON_UNRELIABLE instead of _WIN32.
8395 * typeck2.c (my_friendly_abort): Add URL.
8397 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
8399 * decl.c (start_method): Added extra parameter for attributes.
8400 * cp-tree.h (start_method): Update prototype.
8401 * parse.y (fn.def2): Update start_method parameter list.
8403 1998-10-11 Mark Mitchell <mark@markmitchell.com>
8405 * cp-tree.h (specializations_of_same_template_p): Declare.
8406 * pt.c (specializations_of_same_template_p): New function.
8408 * search.c (get_template_base): Use it.
8409 (get_template_base_recursive): Likewise.
8411 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
8413 * decl2.c (start_objects): Add new variable `joiner' and
8414 initialize it properly.
8416 1998-10-09 Mark Mitchell <mark@markmitchell.com>
8418 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
8419 change to vtable types.
8421 * cvt.c (ocp_convert): Avoid infinite recursion caused by
8424 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
8426 * pt.c (resolve_overloaded_unification): New fn.
8427 (try_one_overload): Likewise.
8428 (unify): Don't fail on unknown type.
8429 (type_unification_real): Likewise. Use resolve_overloaded_unification
8430 to handle an overloaded argument.
8431 (template_args_equal): Split out...
8432 (comp_template_args): From here.
8433 (determine_specialization): Also allow a template with more
8434 parms than were explicitly specified.
8435 * cp-tree.h: Add template_args_equal.
8436 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
8438 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
8440 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
8443 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
8445 * typeck.c (unsigned_type): Only return TItype nodes when
8446 HOST_BITS_PER_WIDE_INT is >= 64 bits.
8447 (signed_type): Likewise.
8448 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
8449 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
8450 (init_decl_processing): Only create TItype nodes when
8451 HOST_BITS_PER_WIDE_INT is >= 64 bits.
8452 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
8453 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
8455 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8457 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
8458 (gxx.gperf): Update comments describing invocation flags.
8459 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
8461 1998-10-07 Mark Mitchell <mark@markmitchell.com>
8463 * class.c (finish_struct_1): Add commentary on previous change.
8465 * cp-tree.h (vtbl_ptr_type_node): New variable.
8466 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
8467 already of the right type.
8468 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
8469 Simplify code to grow vtable.
8470 * decl.c (vtbl_ptr_type_node): Define.
8471 (init_decl_processing): Initialize it.
8473 1998-10-06 Mark Mitchell <mark@markmitchell.com>
8475 * cp-tree.def (PTRMEM_CST): New tree node.
8476 * cp-tree.h (ptrmem_cst): New type.
8477 (lang_type): Remove local_typedecls.
8478 (dummy): Increase to 12 bits from 11.
8479 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
8480 (PTRMEM_CST_CLASS): New macro.
8481 (PTRMEM_CST_MEMBER): Likewise.
8482 (current_access_specifier): New variable.
8483 (current_class_type): Remove duplicate declaration.
8484 (finish_struct): Change prototype.
8485 (unreverse_member_declarations): New function.
8486 (pushdecl_class_level): Change prototype.
8487 (grok_enum_decls): Remove.
8488 (fixup_anonymous_union): New function.
8489 (grok_x_components): Change prototype.
8490 (tsubst_chain): Remove.
8491 (finish_member_template_decl): Likewise.
8492 (check_explicit_specialization): Fix indentation.
8493 (finish_class_definition): Change prototype.
8494 (finish_member_class_template): Likewise.
8495 (finish_member_declaration): New function.
8496 (check_multiple_declarators): Likewise.
8497 * class.c (class_stack_node_t): New type.
8498 (current_class_base): Remove.
8499 (current_class_stack): Change type.
8500 (current_access_specifier): New variable.
8501 (grow_method): Remove.
8502 (check_member_decl_is_same_in_complete_scope): Break out from
8504 (make_method_vec): New function.
8505 (free_method_vec): Likewise.
8506 (add_implicitly_declared_members): Break out from finish_struct_1.
8507 (free_method_vecs): New variable.
8508 (add_method): Rework for direct use from parser.
8509 (handle_using_decl): Watch for NULL_TREE while iterating through
8510 CLASSTYPE_METHOD_VEC.
8511 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
8512 just do some error-checking.
8513 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
8514 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
8515 (finish_struct): Change prototype. Simplify; fields and methods
8516 are already set up at this point.
8517 (init_class_processing): Set up current_class_stack.
8518 (pushclass): Save current_access_specifier.
8519 (popclass): Restore it.
8520 (currently_open_class): Simplify.
8521 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
8522 * decl.c (saved_scope): Add access_specifier.
8523 (maybe_push_to_top_level): Save it.
8524 (pop_from_top_level): Restore it.
8525 (maybe_process_template_type_declaration): Use
8526 finish_member_declaration.
8527 (pushtag): Likewise.
8528 (pushdecl_class_level): Don't return a value.
8529 (fixup_anonymous_union): Break out from grok_x_components.
8530 (shadow_tag): Use it.
8531 (xref_tag): Complain about using an elaborated type specifier to
8532 reference a template type parameter or typedef name.
8533 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
8534 (current_local_enum): Remove.
8535 (build_enumerator): Call finish_member_declaration.
8536 (grok_enum_decls): Remove.
8537 * decl2.c (grok_x_components): Simplify.
8538 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
8539 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
8540 (merge_functions): Add to comment.
8541 (arg_assoc_type): Prototype.
8542 (arg_assoc): Pass as many arguments as there are parameters.
8543 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
8545 * expr.c (cpls_expand_expr): Remove dead code. Handle
8547 * friend.c (do_friend): Lookup friends when in nested classes.
8549 * init.c (build_offset_ref): Do lookup even for classes that are
8550 only partially defined.
8551 (decl_constant_value): Remove dead code.
8552 * method.c (build_overload_value): Remove hack where by TYPE was
8553 not a TYPE. Handle PTRMEM_CST.
8554 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
8556 * parse.y (components, notype_components, component_decl,
8557 component_decl_1, component_declarator, component_declarator0):
8558 Now all are itype rather than ttype. Rework to add members to
8560 (typesqpecqual_reserved): Use check_multiple_declarators.
8561 (structsp): Update class to finish_class_definition.
8562 (do_xref_defn): Unsplit into named_class_head.
8563 (access_specifier): Set current_access_specifier.
8564 * pt.c (set_current_access_from_decl): New function.
8565 (finish_member_template_decl): Don't take the parameters.
8566 (comp_template_args): Make more robust.
8567 (lookup_template_class): Don't use current_local_enum.
8568 (for_each_template_parm): Handle PTRMEM_CST.
8569 (instantiate_class_template): Use set_current_access_from_decl,
8570 finish_member_declaration and unreverse_member_declarations. Set
8571 lineno/input_filename before generating implicit member functions.
8572 (type_unification_real): Don't assume back-unification happens
8573 only for the last argument.
8574 (regenerate_decl_from_template): Call pushclass a bit earlier.
8575 (tsubst_chain): Remove.
8576 (tsubst_enum): Use set_current_access_from_decl.
8577 (set_mangled_name_for_template_decl): Fix indentation.
8578 * search.c (lookup_fnfields_1): Change iteration through
8579 CLASSTYPE_METHOD_VEC.
8580 (dfs_pushdecls): Likewise.
8581 (dfs_compress_decls): Likewise.
8582 (add_conversions): Likewise.
8583 * semantics.c (finish_class_definition): Don't take components.
8584 Change call to finish_struct.
8585 (finish_member_declaration): New function.
8586 (finish_member_class_template): Don't take template parameters.
8587 Change call to grok_x_components. Call finish_member_template_decl.
8588 (check_multiple_declarators): New function.
8589 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
8590 a passed in fieldlist.
8591 * tree.c (search_tree): Handle PTRMEM_CST.
8593 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
8594 INTEGER_CSTs, for pointer-to-data members.
8596 * call.c (resolve_args): Resolve template specializations, if
8599 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8601 * Makefile.in (spew.o): Depend on toplev.h.
8603 * call.c (compare_ics): Initialize variables `deref_from_type2',
8604 `deref_to_type1' and `deref_to_type2'.
8606 * except.c (get_eh_type): Hide prototype and definition.
8607 (process_start_catch_block_old): Remove unused static prototype.
8609 * pt.c (tsubst_decl): Initialize variable `argvec'.
8611 * spew.c: Include toplev.h.
8613 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
8615 * pt.c (instantiate_decl): Do save and restore file position.
8617 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
8619 * method.c (build_decl_overload_real): Clear
8620 numeric_output_need_bar after __.
8622 1998-10-05 Nathan Sidwell <nathan@acm.org>
8624 * call.c (build_new_method_call): Issue 'incomplete type' error,
8625 if class is not defined.
8627 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8629 * call.c (build_object_call): Move declaration of variable
8630 `fn' into the scope where it is used. Don't access variable
8631 `fn' when it is uninitialized, instead use `fns'.
8633 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8635 * errfn.c (cp_thing): Print buf as a string not as a printf format
8636 to avoid problems with the operator%. Consequently, `%%' sequences
8637 in format are copied as `%' in buf.
8639 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
8641 * pt.c (pop_tinst_level): Call extract_interface_info.
8642 (instantiate_decl): Don't save and restore file position.
8644 * decl.c (cp_finish_decl): Make statics in extern inlines and
8645 templates common, if possible and the target doesn't support weak
8648 * decl.c (grokdeclarator): Remove redundant calls to
8649 build_type_variant and some duplicated code.
8650 * sig.c (build_signature_reference_type): Only take the type parm.
8651 (build_signature_pointer_type): Likewise.
8652 * tree.c (build_cplus_method_type): Adjust.
8653 * cp-tree.h: Update.
8655 1998-10-04 Mark Mitchell <mark@markmitchell.com>
8657 * call.c (build_over_call): Make pedwarns about dropped qualifiers
8658 into full-fledged errors.
8659 * cvt.c (convert_to_reference): Likewise.
8660 * typeck.c (convert_for_assignment): Likewise.
8662 * search.c (expand_upcast_vtables): In addition to unsetting
8663 TREE_READONLY, remove top-level const type qualifier.
8665 1998-10-03 Mark Mitchell <mark@markmitchell.com>
8667 * class.c (current_class_ptr, current_class_ref): Clarify
8669 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
8670 NOP type conversions.
8671 * decl.c (decls_match): Use comptypes directly; ignore
8672 qualifiers on the DECL.
8673 (duplicate_decls): Remove qualifier checks on DECL.
8674 (grokdeclarator): Make the type built up include top-level
8676 * decl2.c (do_dtors): Fix spelling error.
8677 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
8678 when printing type information.
8679 * init.c (build_new_1): Add documentation. Deal with the fact
8680 that type of allocated memory now contains qualifiers.
8681 * lex.c (is_global): Improve error-recovery.
8682 * sig.c (build_member_function_pointer): Don't cast away const
8683 on fields of sigtable_entry_type.
8684 * tree.c (lvalue_type): Don't look at top-level qualifiers on
8686 * typeck.c (decay_conversion): Likewise.
8687 (build_component_ref): Make sure the type of the COMPONENT_REF
8688 contains top-level qualifiers, as appropriate. Improve
8690 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
8691 (build_array_ref): Likewise.
8692 (build_unary_op): Improve error-recovery.
8693 (unary_complex_lvalue): Make taking the address a bound member
8694 function an error, not a sorry.
8695 (build_conditional_expr): Look at the type qualifiers, not the
8696 qualifiers on the expression itself.
8698 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
8700 * decl2.c (merge_functions): Remove duplicates.
8702 * decl2.c: Add -f{no-,}implicit-inline-templates.
8703 (import_export_decl): Check it.
8705 * decl.c (lookup_name_real): Template parms also take precedence
8706 over implicit typename. Only warn if yylex.
8708 * typeck.c (build_conditional_expr): Only fold if ifexp is an
8711 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
8714 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
8716 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
8717 * class.c (build_vbase_pointer): Use it.
8718 * rtti.c (expand_class_desc): Likewise.
8719 * tree.c (build_vbase_pointer_fields): Likewise.
8721 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
8723 * decl.c (start_decl): Add invocation of
8724 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8725 (start_function): Add invocation of
8726 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8728 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
8729 HANDLE_GENERIC_PRAGMAS.
8731 1998-09-28 Anthony Green <green@cygnus.com>
8733 * semantics.c (finish_asm_stmt): Always permit volatile asms.
8735 1998-09-28 Mark Mitchell <mark@markmitchell.com>
8737 * decl.c (grokdeclarator): Tighten checks for invalid
8738 destructors. Improve error-messages and error-recovery.
8739 * decl2.c (check_classfn): Don't assume that mangled destructor
8740 names contain type information.
8742 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
8744 * search.c (get_base_distance): Remove assert.
8746 * decl2.c (build_anon_union_vars): Don't process a field with no
8748 (finish_anon_union): Also complain about local anon unions with no
8751 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
8753 * decl.c (lookup_namespace_name): If the name is a namespace,
8754 return it immediately.
8756 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8758 * cp-tree.h (define_case_label): Remove unused parameter.
8759 (check_java_method): Likewise.
8760 (grokclassfn): Likewise.
8761 (expand_aggr_init): Likewise.
8762 (build_x_delete): Likewise.
8763 (maybe_end_member_template_processing): Likewise.
8764 (unshare_base_binfos): Add prototype.
8765 (string_conv_p): Likewise.
8766 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
8768 * cvt.c (build_up_reference): Remove unused parameter
8769 `checkconst', all callers changed.
8770 (build_type_conversion): Mark parameter `code' with
8772 (build_expr_type_conversion): Initialize variable `conv'.
8774 * decl.c (push_namespace): Initialize variable `d'.
8775 (define_case_label): Remove unused parameter `decl', all callers
8778 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
8779 `argc' with ATTRIBUTE_UNUSED.
8780 (grokclassfn): Remove unused parameter `cname', all callers
8782 (check_java_method): Likewise for parameter `ctype'.
8783 (copy_assignment_arg_p): Mark parameter `virtualp' with
8785 (finish_prevtable_vardecl): Likewise for parameter `prev'.
8787 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
8789 * init.c (expand_aggr_init_1): Remove unused parameter
8790 `alias_this', all callers changed.
8791 (expand_aggr_init): Likewise.
8792 (expand_default_init): Likewise.
8793 (build_new_1): Initialize variable `susp'.
8794 (build_x_delete): Remove unused parameter `type', all callers
8797 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
8799 (readescape): Use (unsigned) value in shift.
8800 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
8801 comparing to a signed quantity.
8803 * pt.c (maybe_end_member_template_processing): Remove unused
8804 parameter `decl', all callers changed.
8805 (check_explicit_specialization): Add braces around empty body in
8807 (current_template_args): Initialize variable `args'.
8808 (lookup_template_class): Likewise for variable `prev_local_enum'.
8809 (tsubst_decl): Likewise for variable `r'.
8810 (set_mangled_name_for_template_decl): Initialize variable
8813 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
8814 Likewise for variable `i'.
8815 (yylex): Initialize variable `trrr'.
8817 * typeck.c (compparms): Mark variable `strict' with
8820 * xref.c (simplify_type): Cast argument of ctype function to
8823 1998-09-24 Mark Mitchell <mark@markmitchell.com>
8825 * cp-tree.h (language_lvalue_valid): Remove.
8826 * decl.c (grokdeclarator): Don't disallow references to functions.
8827 * tree.c (lvalue_p_1): New function, combining duplicated
8830 (real_lvalue_p): Likewise.
8831 * typeck.c (language_lvalue_valid): Remove.
8832 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
8833 they don't have TREE_READONLY set.
8834 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
8836 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
8838 * spew.c (yylex): Give diagnostic.
8839 * hash.h (is_reserved_word): Add export.
8840 * gxx.gperf: Likewise.
8841 * lex.h (rid): Add RID_EXPORT.
8842 * lex.c (init_parse): Likewise.
8844 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
8846 * friend.c (do_friend): Make warning a full sentence.
8848 1998-09-22 Mark Mitchell <mark@markmitchell.com>
8850 * parse.y (component_decl_list): Improve error-recovery.
8852 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
8854 * decl.c (make_typename_type): Move error to point where name
8855 variable can be used by dump_type.
8857 1998-09-22 Mark Mitchell <mark@markmitchell.com>
8859 * decl.c (grokfndecl): Improve error-recovery.
8860 * decl2.c (grokfield): Likewise.
8861 * pt.c (finish_member_template_decl): Likewise.
8863 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
8865 * method.c (hack_identifier): Finding multiple members is always
8868 1998-09-21 Per Bothner <bothner@cygnus.com>
8870 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
8872 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
8874 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
8876 1998-09-20 Mark Mitchell <mark@markmitchell.com>
8878 * class.c (maybe_warn_about_overly_private_class): Reformat.
8880 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
8882 * exception.cc (__cplus_type_matcher): Realign some code.
8884 1998-09-16 Mark Mitchell <mark@markmitchell.com>
8886 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
8887 (tinfo2.o): Likewise.
8888 (exception.o): Likewise.
8890 (opnew.o): Likewise.
8891 (opnewnt.o): Likewise.
8892 (opvnew.o): Likewise.
8893 (opvnewnt.o): Likewise.
8894 (opdel.o): Likewise.
8895 (opdelnt.o): Likewise.
8896 (opvdel.o): Likewise.
8897 (opvdelnt.o): Likewise.
8899 1998-09-16 Richard Henderson <rth@cygnus.com>
8901 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
8903 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
8905 * call.c (build_field_call): Handle static data members too.
8907 * typeck.c (comptypes): When comparing pointer types, check
8908 whether referred types match even in strictest modes.
8910 1998-09-15 Mark Mitchell <mark@markmitchell.com>
8912 * cp-tree.h: Revert previous change.
8913 (finish_struct_methods): Remove declaration.
8914 * class.c: Revert previous change.
8915 (maybe_warn_about_overly_private_class): New function.
8916 (finish_struct_methods): Declare here, and make static. Remove
8917 unnecessary parameters. Tidy slightly. Use
8918 maybe_warn_about_overly_private_class.
8919 (finish_struct_1): Adjust. Remove check for private constructors,
8921 (finish_struct): Adjust.
8923 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
8925 * except.c (expand_start_catch_block): No need to check for new
8927 (process_start_catch_block_old): Deleted.
8928 (process_start_catch_block): Add call to start_decl_1().
8929 (expand_end_catch_block): Add call to end_catch_handler().
8930 * exception.cc (__cplus_type_matcher): Only check the exception
8931 language if there is an exception table.
8933 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
8935 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
8936 as used to prevent conflicts with virtual function tables.
8938 1998-09-14 Mark Mitchell <mark@markmitchell.com>
8940 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
8941 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
8942 * class.c (maybe_class_too_private_p): New function.
8943 (finish_struct_methods): Use it.
8944 (finish_struct_1): Likewise.
8945 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
8948 * pt.c (check_specialization_scope): Fix spelling error.
8949 (check_explicit_specialization): Remove code to handle explicit
8950 specializations in class scope; they are now correctly diagnosed
8953 1998-09-10 Mark Mitchell <mark@markmitchell.com>
8955 * decl.c (pushdecl): Don't copy types if the
8956 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
8959 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8961 * class.c (get_enclosing_class): New function.
8962 (is_base_of_enclosing_class): Likewise.
8963 * cp-tree.h (get_enclosing_class): Declare.
8964 (is_base_of_enclosing_class): Likewise.
8965 * pt.c (coerce_template_parms): Use them.
8967 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
8969 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
8970 null to decide whether to use it.
8972 * error.c (dump_type_real): Handle NAMESPACE_DECL.
8973 * parse.y (base_class.1): Avoid crash on error.
8975 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
8977 * decl.c (make_typename_type): If context is a namespace, the code
8980 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
8982 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
8984 1998-09-08 Mark Mitchell <mark@markmitchell.com>
8986 * cp-tree.h (anonymous_namespace_name): Declare.
8987 * decl.c: Define it.
8988 (push_namespace): Use anonymous_namespace_name, rather than local
8990 * error.c (dump_decl): If a namespace is named
8991 anonymous_namespace_name, call it {anonymous}.
8993 * decl.c (grokparms): Distinguish between references and pointers
8996 1998-09-08 Richard Henderson <rth@cygnus.com>
8997 Mark Mitchell <mark@markmitchell.com>
8999 * pt.c (process_partial_specialization): Consistently allocate
9000 and zero tpd.parms based on ntparms. Use tpd2.parms, not
9001 tpd.parms, where appropriate.
9003 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
9005 * Makefile.in (INCLUDES): Update after recent toplevel gcc
9008 1998-09-05 Mark Mitchell <mark@markmitchell.com>
9010 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
9011 * class.c (finish_struct): Remove hackery to deal with explicit
9012 specializations in class scope.
9013 * decl.c (grokfndecl): Improve error-recovery.
9014 * decl2.c (grokfield): Likewise.
9015 * pt.c (check_specialization_scope): New function.
9016 (begin_specialization): Call it.
9017 (process_partial_specialization): New function, split out from
9018 push_template_decl. Check partial specializations more
9020 (push_template_decl): Call it.
9021 (check_explicit_specialization): Don't attempt to handle explicit
9022 specializations in class scope.
9023 (template_parm_data): Document. Add current_arg and
9024 arg_uses_template_parms.
9025 (mark_template_parm): Set it.
9026 (tsubst_arg_types): Remove unused variable.
9027 * semantics.c (begin_class_definition): Tweak.
9029 1998-09-04 Mark Mitchell <mark@markmitchell.com>
9031 * inc/typeinfo (type_info::type_info(const char*)): Make
9034 * cp-tree.h (hash_tree_cons_simple): New macro.
9035 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
9036 (coerce_template_parms): Use make_temp_vec, instead of
9037 make_tree_vec. Document this behavior.
9038 (lookup_template_class): Likewise.
9039 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
9040 Remove dead code (and add assertion to check its deadness). Fix
9041 bug w.r.t. exception specifications.
9043 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
9045 * decl2.c (import_export_vtable): Always make artificials comdat.
9046 (import_export_decl): Likewise.
9047 * pt.c (mark_decl_instantiated): Likewise.
9049 1998-09-03 Mark Mitchell <mark@markmitchell.com>
9051 * cp-tree.h (finish_globally_qualified_member_call_expr):
9053 (finish_qualified_call_expr).
9054 * semantics.c: Likewise.
9055 * parse.y (primary): Use it.
9056 * method.c (hack_identifier): Remove redundant code.
9058 * init.c (resolve_offset_ref): Call convert_from_reference to
9059 handle members of reference type. Improve error recovery.
9061 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
9063 * cp-tree.h: Declare warn_nontemplate_friend.
9064 * decl2.c (lang_decode_option): Set.
9065 * lang-options.h: Add -Wnon-template-friend.
9066 * friend.c (do_friend): Use to toggle non-template function warning.
9068 1998-09-03 Mark Mitchell <mark@markmitchell.com>
9070 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
9071 corresponding INTEGER_CSTs when processing_template_decl.
9072 * pt.c (tsubst_enum): Tweak accordingly.
9074 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9076 * decl.c (pushdecl_class_level): Add warning here.
9079 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
9081 * cvt.c (convert_pointer_to_real): Tidy.
9082 * search.c (get_base_distance_recursive): Simplify.
9083 (get_base_distance): Likewise.
9085 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
9088 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
9090 * lex.c (check_newline): Call HANDLE_PRAGMA before
9091 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
9092 if unknown pragmas are encountered.
9093 (handle_sysv_pragma): Interpret return code from
9094 handle_pragma_token (). Return success/failure indication rather
9095 than next unprocessed character.
9096 (pragma_getc): New function: retrieves characters from the
9097 input stream. Defined when HANDLE_PRAGMA is defined.
9098 (pragma_ungetc): New function: replaces characters back into the
9099 input stream. Defined when HANDLE_PRAGMA is defined.
9101 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
9103 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
9104 * class.c (build_vtable_entry_ref): Likewise.
9106 1998-09-01 Mark Mitchell <mark@markmitchell.com>
9108 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
9109 * decl2.c (import_export_decl): Likewise.
9110 * pt.c (instantiate_decl): Use it.
9112 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
9114 * decl.c (lookup_name_real): Also do implicit typename thing for
9115 artificial TYPE_DECLs.
9116 * search.c (lookup_field): Likewise.
9117 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
9118 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
9119 (enter_scope_of): Extract type from implicit typename.
9120 (begin_class_definition): Likewise.
9121 * lex.c (identifier_type): Handle implicit typename when checking
9124 * cp-tree.h: Declare flag_strict_prototype.
9125 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
9127 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
9128 specified, set it to the value of pedantic.
9130 1998-09-01 Mark Mitchell <mark@markmitchell.com>
9132 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
9134 1998-08-31 Mark Mitchell <mark@markmitchell.com>
9136 * decl.c (finish_enum): Handle member enums of classes declared in
9139 * decl2.c (grok_x_components): Strip attributes before calling
9142 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
9144 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
9145 -fenum-int-equivalence and -fno-nonnull-objects.
9146 * class.c (check_for_override): Remove support for -fall-virtual.
9147 (finish_struct_1): Likewise.
9148 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
9149 * typeck.c (build_binary_op_nodefault): Likewise.
9150 * cvt.c (ocp_convert): Likewise.
9151 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
9152 * class.c (build_vbase_path): Likewise.
9154 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
9156 * Makefile.in (INTERFACE): New, set to 1.
9158 1998-08-30 Mark Mitchell <mark@markmitchell.com>
9160 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
9161 comparing with global_namespace.
9162 (dump_aggr_type): Likewise.
9164 * decl.c (grokfndecl): Issue error on declaration of friend
9165 templates with explicit template arguments.
9167 * pt.c (convert_template_argument): New function, split out
9169 (coerce_template_parms): Here.
9170 (tsubst): Attempt better error-recovery.
9172 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
9174 * pt.c (decl_template_parm_p): Add checks for
9175 TEMPLATE_TEMPLATE_PARM.
9177 1998-08-28 Mark Mitchell <mark@markmitchell.com>
9179 * lex.c (do_identifier): Fix thinko in previous change.
9181 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
9183 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
9184 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
9186 1998-08-28 Richard Henderson <rth@cygnus.com>
9188 Add support for discarding unused virtual functions.
9189 * lang-options.h: Add -fvtable-gc.
9190 * cp-tree.h: Add flag_vtable_gc.
9191 * decl2.c (output_vtable_inherit): New fn.
9192 (finish_vtable_vardecl): Call it.
9193 * class.c (build_vtable_entry_ref): New fn.
9194 (build_vtbl_ref): Call it.
9196 1998-08-28 Mark Mitchell <mark@markmitchell.com>
9198 * cp-tree.h (build_enumerator): Take the enumeration type as a
9200 * decl.c (finish_enum): Don't set the TREE_TYPE for the
9201 enumeration constant values if we're processing_template_decls.
9202 Don't set the type for the CONST_DECLs either; that's done in
9204 (build_enumerator): Take the enumeration type as a
9206 * lex.c (do_identifier): Don't resolve enumeration constants while
9207 processing template declarations, even if they happen to be
9208 TEMPLATE_PARM_INDEXs.
9210 * parse.y (current_enum_type): New variable.
9211 (primary): Don't allow statement-expression in local classes just
9212 as we don't in global classes.
9213 (structsp): Use current_enum_type.
9214 (enum_list): Likewise.
9215 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
9216 finish_enum; they no longer occur.
9218 * cp-tree.h (finish_base_specifier): New function.
9219 * parse.y (base_class): Use it.
9220 * semantics.c (finish_base_specifier): Define it.
9222 * parse.y (structsp): Warn on use of typename outside of template
9225 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
9227 * lex.c (handle_cp_pragma): Remove #pragma vtable.
9228 * lang-options.h: Remove +e options.
9229 * decl2.c (lang_decode_option): Likewise.
9230 (import_export_vtable): Don't check write_virtuals.
9231 (finish_vtable_vardecl, finish_file): Likewise.
9232 * search.c (dfs_debug_mark): Likewise.
9233 * semantics.c (begin_class_definition): Likewise.
9234 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
9236 * call.c (build_over_call): Check flag_elide_constructors.
9237 * decl2.c: flag_elide_constructors defaults to 1.
9238 * typeck.c (convert_arguments): Remove return_loc parm.
9239 (build_function_call_real): Adjust.
9241 * search.c: Tear out all mi_matrix and memoize code.
9242 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
9243 * lang-options.h: Remove documentation for -fhandle-exceptions,
9244 -fmemoize-lookups and -fsave-memoized.
9245 * cp-tree.h: Lose mi_matrix and memoize support.
9246 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
9247 * class.c: Lose struct class_level.
9248 (pushclass, popclass): Lose memoize support.
9249 * init.c (build_offset_ref): Likewise.
9251 Never change BINFO_INHERITANCE_CHAIN.
9252 * init.c (emit_base_init): Change modification of
9253 BINFO_INHERITANCE_CHAIN to an assert.
9254 * search.c (get_base_distance_recursive): Likewise.
9255 (get_base_distance): Likewise.
9256 (lookup_member): Likewise.
9257 (convert_pointer_to_single_level): Likewise.
9258 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
9259 (lookup_fnfields): Likewise.
9260 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
9261 (unshare_base_binfos): Don't call propagate_binfo_offsets.
9262 (layout_basetypes): Call propagate_binfo_offsets instead of
9263 unshare_base_binfos.
9264 * decl.c (xref_basetypes): Call unshare_base_binfos.
9265 * pt.c (instantiate_class_template): Likewise.
9266 * tree.c (reverse_path): Remove 'copy' parm; always make a
9268 * class.c (build_vbase_path): Just call it.
9269 * search.c (compute_access): Likewise. Don't re-reverse.
9271 1998-08-27 Mark Mitchell <mark@markmitchell.com>
9273 * class.c (build_vbase_path): Use reverse_path.
9274 (finish_base_struct): Move warnings for inaccessible bases to
9276 (modify_one_vtable): Remove check of TREE_USED (binfo).
9277 (fixup_vtable_deltas1): Likewise.
9278 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
9279 (xref_tag): Remove binfos parameter.
9280 (make_binfo): Remove chain parameter.
9281 (reverse_path): Add copy parameter.
9282 * decl.c (init_decl_processing): Change calls to xref_tag.
9283 (xref_tag): Remove binfos parameter.
9284 (xref_basetypes): Change calls to make_binfo.
9285 * decl2.c (grok_x_components): Change calls to xref_tag.
9286 (handle_class_head): Likewise.
9287 * friend.c (do_friend): Likewise.
9288 * lex.c (make_lang_type): Change calls to make_binfo.
9289 * parse.y (structsp): Change calls to xref_tag.
9290 (named_complex_class_head_sans_basetype): Likewise.
9291 (named_class_head): Likewise.
9292 * rtti.c (init_rtti_processing): Likewise.
9293 * search.c (compute_access): Change calls to reverse_path.
9294 (dfs_get_vbase_types): Change calls to make_binfo.
9295 (get_vbase_types): Remove dead code.
9296 * tree.c (unshare_base_binfos): Change calls to make_binfo.
9297 (layout_basetypes): Warn here about inaccessible bases.
9298 (make_binfo): Remove chain parameter.
9299 (reverse_path): Add copy parameter.
9301 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
9303 * class.c: #if 0 complete_type_p.
9304 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
9305 * method.c (process_overload_item): Likewise.
9306 * typeck.c (comp_target_types): Likewise.
9308 Stop sharing binfos for indirect virtual bases.
9309 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
9310 (layout_basetypes): Likewise.
9311 (unshare_base_binfos): Copy vbases, too.
9312 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
9313 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
9314 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
9315 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
9316 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
9317 reference to BINFO_VIA_PUBLIC.
9318 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
9319 (push_class_decls): Use them.
9320 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
9321 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
9323 1998-08-27 Mark Mitchell <mark@markmitchell.com>
9325 * decl.c (build_enumerator): Set DECL_CONTEXT for the
9328 1998-08-26 Mark Mitchell <mark@markmitchell.com>
9330 * cp-tree.h (finish_enum): Change prototype.
9331 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
9332 VALUES parameter. Don't try to compute mins/maxs if
9333 processing_template_decl.
9334 * parse.y (structsp): Use new calling sequence for finish_enum.
9335 * pt.c (tsubst_enum): Likewise. Take the new type as input.
9336 (lookup_template_class): Remove unused variables. Tweak.
9337 Register enums on instantiation list before substituting
9338 enumeration constants.
9339 (tsubst_decl): Remove unused variables.
9340 (regenerate_decl_from_template): Likewise.
9342 * decl.c (duplicate_decls): Don't obliterate the
9343 DECL_TEMPLATE_INFO for a template if we're not replacing it with
9346 * lex.c (do_identifier): Fix typo in comment.
9348 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9350 * errfn.c: Remove stdarg.h/varargs.h.
9353 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
9355 * pt.c (tsubst_copy): Only do typename overloading on an
9356 IDENTIFIER_NODE that happens to look like a typename if it actually
9357 has a type for us to use.
9359 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
9361 * typeck.c (comp_cv_target_types): Split out...
9362 (comp_target_types): From here. Don't allow cv-qual changes under
9363 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
9364 (build_ptrmemfunc): Pass 1 to nptrs.
9365 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
9367 1998-08-25 Mark Mitchell <mark@markmitchell.com>
9369 * search.c (dependent_base_p): Don't compare a binfo to
9370 current_class_type; use the TREE_TYPE of the binfo instead.
9372 * cp-tree.h (CLASS_TYPE_P): Revise definition.
9374 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
9376 * decl.c (duplicate_decls): Don't complain about different
9377 exceptions from an internal decl even if pedantic.
9379 * typeck.c (convert_for_assignment): Converting from pm of vbase
9380 to derived is an error, not a sorry.
9382 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
9383 * class.c (fixed_type_or_null): Rename from
9384 resolves_to_fixed_type_p. Return the dynamic type of the
9385 expression, if fixed, or null.
9386 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
9387 does not match the static type.
9388 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
9389 resolves_to_fixed_type_p again.
9391 1998-08-24 Mark Mitchell <mark@markmitchell.com>
9393 * pt.c (tsubst_decl): Move special case code for dealing with
9394 tricky friend templates here from ...
9395 (regenerate_decl_from_template): Here.
9397 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
9399 * decl.c (start_decl): Remove redundant linkage check.
9401 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
9403 * typeck.c (c_expand_return): Handle the case that valtype
9404 is wider than the functions return type.
9406 1998-08-24 Mark Mitchell <mark@markmitchell.com>
9408 * cp-tree.h (CLASS_TYPE_P): New macro.
9409 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
9410 * pt.c (process_template_parm): Undo previous change.
9412 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
9414 * cp-tree.h: Declare.
9415 * pt.c (decl_template_parm_p): New function.
9416 * decl.c (pushdecl): Check decls for redeclaring template parms.
9417 (xref_tag): Make redeclaration an error, print decl.
9418 * decl2.c (grokfield): Check field_decls for redeclaration as well.
9420 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
9422 * parse.y (primary): Fix up the type of string constants.
9424 1998-08-24 Mark Mitchell <mark@markmitchell.com>
9426 * typeck.c (convert_for_initialization): Move check for odd uses
9427 of NULL to avoid duplicate warnings.
9429 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
9431 * tree.c (lvalue_type): Fix for arrays.
9432 * typeck.c (string_conv_p): New fn.
9433 (convert_for_assignment): Use it.
9434 (build_unary_op): Use lvalue_type.
9435 * call.c (standard_conversion, convert_like): Use string_conv_p.
9436 (add_function_candidate): Use lvalue_type.
9437 * cvt.c (convert_to_reference): Likewise.
9438 * decl2.c (lang_decode_option): Ignore -traditional.
9439 * decl.c (init_decl_processing): flag_writable_strings inhibits
9442 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
9444 * lang-options.h (lang_options): Add fconst-strings to the list
9446 * decl2.c (lang_f_options, lang_decode_option): Likewise.
9448 1998-08-24 Nathan Sidwell <nathan@acm.org>
9450 * lex.c (real_yylex): Don't warn about long long constants if
9451 we're allowing long long.
9453 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9455 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
9456 accessing bindings directly.
9458 * search.c (my_tree_cons): Reimplement.
9460 * lang-specs.h: Remove __HONOR_STD.
9461 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
9463 1998-08-23 Mark Mitchell <mark@markmitchell.com>
9465 * decl.c (grokdeclarator): Complain about in-class initialization
9466 of aggregates and/or references.
9467 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
9468 TEMPLATE_TYPE_PARMs.
9470 * decl2.c (grok_array_decl): Add comment.
9471 (mark_used): Don't instantiate an explicit instantiation.
9472 * friend.c (make_friend_class): Remove bogus comment. Fix check
9473 for partial specializations.
9474 * pt.c (check_explicit_specialization): Don't
9475 SET_DECL_EXPLICIT_INSTANTIATION here.
9476 (mark_decl_instantiated): Or here.
9477 (do_decl_instantiation): Do it here, instead. Add checks for
9478 duplicate explicit instantiations, etc. Tidy.
9479 (do_type_instantiation): Likewise.
9480 (instantiate_decl): Improve comments. Complain about explicit
9481 instantiations where no definition is available.
9483 * cp-tree.h (ansi_null_node): Remove.
9484 * call.c (build_over_call): Warn about converting NULL to an
9486 * cvt.c (build_expr_type_conversion): Likewise. Use
9487 null_ptr_cst_p instead of expanding it inline.
9488 * decl.c (ansi_null_node): Remove.
9489 (init_decl_processing): Make null_node always have integral type.
9490 * except.c (build_throw): Warn about converting NULL to an
9492 * lex.c (init_parse): Remove handling of ansi_null_node.
9493 * pt.c (type_unification_real): Don't convert NULL to void* type.
9494 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
9495 (convert_for_assignment): Warn about converting NULL to an
9497 (convert_for_initialization): Likewise.
9499 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
9501 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
9502 * pt.c (coerce_template_parms): Use no_linkage_check.
9503 * decl.c (grokvardecl): Likewise.
9504 (grokfndecl): Likewise. Members of anonymous types have no linkage.
9506 * method.c (process_overload_item): Remove useless code.
9508 1998-08-20 Per Bothner <bothner@cygnus.com>
9510 Handle new'ing of Java classes.
9511 * init.c (build_class_classref): New function.
9512 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
9513 constructor does not return this; don't need to exception-protect.
9515 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
9516 * decl2.c (acceptable_java_type): Handle template-derived types.
9518 1998-08-20 Per Bothner <bothner@cygnus.com>
9520 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
9522 1998-08-20 Mark Mitchell <mark@markmitchell.com>
9524 * decl.c (duplicate_decls): Always merge the old and new patterns
9525 for templates, regardless of whether or not the new one has
9526 DECL_INITIAL. Don't throw away specializations. Merge
9528 * pt.c (tsubst_decl): Use the right pattern when calculating the
9529 complete args for a new template instance.
9530 (do_decl_instantiation): Fix typo in comment.
9531 (regenerate_decl_from_template): Deal with tricky friend template
9533 (instantiate_decl): Likewise.
9535 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
9537 * init.c (build_builtin_delete_call): Add missing assemble_external
9540 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
9542 * parse.y (notype_unqualified_id): Also accept ~A<int>.
9544 1998-08-19 Mark Mitchell <mark@markmitchell.com>
9546 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
9548 * except.c (build_throw): Warn when NULL is thrown, even with
9549 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
9552 * cp-tree.h (ansi_null_node): New variable.
9553 * decl.c (ansi_null_node): New variable.
9554 (init_decl_processing): Initialize its type.
9555 * lex.c (init_parse): Initialize its value. Use ansi_null_node
9556 for null_node in non-ANSI mode.
9557 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
9558 place of null_node to avoid spurious errors.
9560 1998-08-17 Mark Mitchell <mark@markmitchell.com>
9562 * cp-tree.h (enter_scope_of): New function.
9563 * parse.y (complex_direct_notype_declarator): Use it.
9564 * semantics.c (enter_scope_of): New function.
9566 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
9568 * decl.c (grokparms): No, here.
9570 * decl.c (grokdeclarator): Catch parm with pointer to array of
9571 unknown bound here...
9572 * method.c (process_overload_item): ...not here.
9574 * gxxint.texi: Remove obsolete documentation of overloading code.
9576 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
9577 * class.c (finish_struct_bits): Likewise.
9579 * tree.c (lvalue_type): Fix for arrays.
9580 * typeck.c (build_unary_op): Use lvalue_type.
9581 * call.c (add_function_candidate): Likewise.
9582 * cvt.c (convert_to_reference): Likewise.
9584 * decl2.c (lang_decode_option): Ignore -traditional.
9586 * init.c (build_offset_ref): Don't mess with error_mark_node.
9587 * lex.c (do_scoped_id): Use cp_error.
9589 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
9591 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
9593 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
9595 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
9597 * cp-tree.h (set_identifier_local_value): Provide prototype.
9599 * decl2.c (do_namespace_alias): Remove unused variables `binding'
9602 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
9604 * Makefile.in: Rename BBISON to BISON so that it can be properly
9605 inherited from the parent makefile.
9607 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
9609 * lang-options.h: Add -finit-priority.
9610 * decl2.c: Likewise. Check flag_init_priority instead of
9613 * decl2.c (setup_initp): New fn.
9614 (start_objects, finish_objects, do_ctors): Handle init_priority.
9615 (do_dtors, finish_file): Likewise.
9617 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
9619 * pt.c (tsubst_copy): Hush warning.
9621 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
9623 1998-08-12 Mark Mitchell <mark@markmitchell.com>
9625 * pt.c (print_template_context): Don't abort when instantiating a
9628 * decl.c (grokdeclarator): Issue errors on namespace qualified
9629 declarators in parameter lists or in class scope.
9631 1998-08-09 Mark Mitchell <mark@markmitchell.com>
9633 * pt.c (check_explicit_specialization): Don't abort on bogus
9634 explicit instantiations.
9636 1998-08-07 Mark Mitchell <mark@markmitchell.com>
9638 * typeck.c (require_complete_type): Use complete_type_or_else.
9639 (complete_type_or_else): Always return NULL_TREE on failure, as
9642 * pt.c (tsubst_aggr_type): Prototype.
9643 (tsubst_decl): New function, split out from tsubst. Set
9644 input_filename and lineno as appropriate.
9645 (pop_tinst_level): Restore the file and line number saved in
9647 (instantiate_class_template): Set input_filename and lineno as
9649 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
9650 context for a TYPENAME_TYPE is complete.
9652 * decl2.c (grokbitfield): Issue errors on bitfields declared with
9654 (do_dtors): As in do_ctors, pretend to be a member of the same
9655 class as a static data member while generating a call to its
9658 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
9659 conversions, even in complex virtual base class hierarchies.
9661 1998-08-06 Mark Mitchell <mark@markmitchell.com>
9663 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
9664 (TYPE_TEMPLATE_INFO): Likewise.
9665 (SET_TYPE_TEMPLATE_INFO): Likewise.
9666 (ENUM_TI_TEMPLATE): Likewise.
9667 (ENUM_TI_ARGS): Likewise.
9668 (lookup_nested_type_by_name): Remove.
9669 * decl.c (maybe_process_template_type_declaration): Handle enums.
9670 (start_enum): Don't check for primary-template enum declarations
9672 (finish_enum): Clean up, document. Make sure template enum
9673 constants get the correct type.
9674 (build_enumerator): Copy initializers for template enumerations,
9676 (grok_enum_decls): Document.
9677 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
9678 better. Build LOOKUP_EXPRs for local variables, even if they are
9680 * pt.c (tsubst_enum): Remove field_chain parameter.
9681 (template_class_depth): Include the depth of surrounding function
9683 (push_template_decl): Check for primary-template enum declarations
9684 here. Deal with enumeration templates.
9685 (lookup_template_class): Likewise.
9686 (for_each_template_parm): Likewise.
9687 (instantiate_class_template): Don't call tsubst_enum directly,
9688 call tsubst instead, to instantiate enums. Deal with all
9689 field_chain issues here, not in tsubst_enum.
9690 (lookup_nested_type_by_name): Remove.
9691 (tsubst_aggr_type): Revise handling of enumeration types.
9693 (tsubst_copy): Likewise.
9694 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
9696 1998-08-04 Mark Mitchell <mark@markmitchell.com>
9698 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
9699 uses template parameters.
9700 * method.c (build_template_parm_names): Use the full set of
9701 template arguments for tsubst'ing.
9702 (build_overload_identifier): Pass the full set of template
9703 arguments to build_template_parm_names, not just the
9705 * pt.c (TMPL_ARGS_DEPTH): Define using
9706 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
9707 (NUM_TMPL_ARGS): New macro.
9708 (add_outermost_template_args): Deal with the case where the outer
9709 args will be completely discarded.
9710 (coerce_template_parms): Use the full set of template arguments
9711 for tsubst'ing. Simplify. Add some asserts. Improve
9713 (lookup_template_class): Pass the full set of template arguments
9714 to coerce_template_parms.
9715 (tsubst): Add assertion.
9716 (do_type_instantiation): Don't instantiate member template
9719 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
9720 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
9722 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
9724 * method.c (set_mangled_name_for_decl): Change return type to void.
9726 * decl.c (lookup_name_real): A namespace-level decl takes priority
9727 over implicit typename. Avoid doing the same lookup twice.
9729 * search.c (dependent_base_p): New fn.
9730 (dfs_pushdecls, dfs_compress_decls): Use it.
9732 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
9733 virtual functions if the type doesn't have any.
9735 1998-08-03 Mark Mitchell <mark@markmitchell.com>
9737 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
9738 uses template parameters.
9740 1998-08-02 Mark Mitchell <mark@markmitchell.com>
9742 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
9743 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
9744 * lex.c (do_identifier): Don't use a second argument, or a type,
9745 when building LOOKUP_EXPRs.
9746 (do_identifier): Likewise.
9747 (do_scoped_id): Likewise.
9748 * method.c (hack_identifier): Improve error message.
9749 * pt.c (lookup_template_function): Don't needlessly call
9750 copy_to_permanent or build_min.
9751 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
9753 (do_decl_instantiation): Improve error message.
9754 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
9755 (build_min): Copy the type to the permanent obstack, too.
9757 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
9759 * init.c (init_init_processing): Remove BI* handling.
9760 (build_builtin_call): Remove.
9761 (build_builtin_delete_call): New fn.
9762 (build_delete): Use it.
9764 1998-07-31 Mark Mitchell <mark@markmitchell.com>
9766 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
9767 (maybe_check_template_type): New function.
9768 * decl.c (maybe_process_template_type_declaration): New function,
9769 split out from pushtag Call maybe_check_template_type.
9770 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
9771 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9772 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9773 * pt.c (template_class_depth_real): Generalization of ...
9774 (template_class_depth): Use it.
9775 (register_specialization): Use duplicate_decls for duplicate
9776 declarations of specializations.
9777 (maybe_check_template_type): New function.
9778 (push_template_decl_real): Fix comment.
9779 (convert_nontype_argument): Likewise.
9780 (lookup_template_class): Likewise. Avoid an infinite loop on
9782 (tsubst_friend_function): Fix comment.
9783 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
9785 * semantics.c (begin_function_definition): Use
9786 reset_specialization to note that template headers don't apply
9787 directly to declarations after the opening curly for a function.
9789 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
9791 * decl.c (push_overloaded_decl): Use current_namespace instead of
9792 DECL_CONTEXT (decl) to determine where we go.
9794 * decl.c (lookup_name_real): Fix typo.
9796 1998-07-28 Mark Mitchell <mark@markmitchell.com>
9798 * friend.c (is_friend): Be lenient with member functions to deal
9799 with nested friends.
9801 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
9803 * class.c (finish_struct_1): Convert integer_zero_node to
9804 ssizetype before passing it to set_rtti_entry.
9805 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
9806 of any size to a pointer.
9808 1998-07-27 Mark Mitchell <mark@markmitchell.com>
9810 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
9811 (build_template_decl_overload): Remove.
9812 (set_mangled_name_for_decl): New function.
9813 (innermost_args): Remove is_spec parameter.
9814 (most_specialized, most_specialized_class): Remove declarations.
9815 (lookup_template_class): Add entering_scope parameter.
9816 (maybe_process_partial_specialization): New function.
9817 (finish_template_decl): Likewise.
9818 (finish_template_type): Likewise.
9819 * class.c (finish_struct): Clean up processing of member template
9821 * decl.c (pushtag): Fix formatting.
9822 (lookup_tag): Improve handling of pseudo-global levels.
9823 (make_typename_type): Adjust call to lookup_template_class.
9824 (shadow_tag): Use maybe_process_partial_specialization.
9825 (xref_tag): Improve handling of member friends.
9826 (start_function): Call push_nested_class before
9827 push_template_decl. Don't call push_template_decl for
9829 * decl2.c (grok_x_components): Don't call xref_tag for
9830 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
9831 (grokclassfn): Use set_mangled_name_for_decl.
9832 (arg_assoc_class): Adjust call to innermost_args.
9833 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
9834 * error.c (dump_function_name): Improve printing of template
9836 * friend.c (is_friend): Don't compare types of decls to determine
9837 friendship, unless flag_guiding_decls.
9838 (make_friend_class): Partial specializations cannot be friends.
9839 (do_friend): Use set_mangled_name_for_decl. Call
9840 push_template_decl_real instead of push_template_decl.
9841 * method.c (build_decl_overload_real): Remove prototype. Give it
9843 (build_overload_identififer): Adjust call to innermost_args.
9844 (build_template_decl_overload): Remove.
9845 (set_mangled_name_for_decl): New function.
9846 * parse.y (.finish_template_type): New non-terminal.
9847 (template_def): Use finish_template_decl. Use template_extdef
9849 (template_extdef, template_datadef): New non-terminals, containing
9850 only those rules for things which can be templates.
9852 (template_type, self_template_type): Use .finish_template_type.
9853 (named_class_head): Use maybe_process_partial_specialization.
9854 * pt.c (mangle_class_name_for_template): Remove context parameter.
9855 (get_class_bindings): Remove outer_args parameter.
9856 (complete_template_args): Remove.
9857 (add_outermost_template_args): New function.
9858 (register_specialization): Return the specialization.
9859 (unregister_specialization): New function.
9860 (tsubst_template_parms): Likewise.
9861 (most_specialized, most_specialized_class): Prototype here as
9863 (original_template): Rename to most_general_template.
9864 (tsubst_template_parms): New function.
9865 (set_mangled_name_for_template_decl): Likewise.
9866 (TMPL_ARGS_DEPTH): New macro.
9867 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
9868 (TMPL_ARGS_LEVEL): New macro.
9869 (SET_TMPL_ARGS_LEVEL): Likewise.
9870 (TMPL_ARG): Likewise.
9871 (SET_TMPL_ARG): Likewise.
9872 (TMPL_ARGS_DEPTH): Likewise.
9873 (finish_member_template_decl): Use finish_template_decl.
9874 (maybe_process_partial_specialization): New function, split out
9876 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
9877 (maybe_begin_member_template_processing): Use new macros.
9878 (is_member_template): Likewise.
9879 (is_member_template_class): Likewise.
9880 (add_to_template_args): Likewise. Deal with multiple levels of
9882 (maybe_process_partial_specialization): New function.
9883 (retrieve_specialization): Add consistency check.
9884 (determine_specialization): Return full argument list.
9885 (check_explicit_specialization): Tweak friend handling. Use full
9886 argument lists. Simplify.
9887 (current_template_args): Use new macros.
9888 (push_template_decl_real): Change ill-named mainargs to specargs.
9889 Check that a partial specialization actually specializes at least
9890 one parameter. Improve friend handling. Modify for full
9892 (classtype_mangled_name): Don't mangle the names of
9894 (lookup_template_class): Add entering_scope parameter. Use it to
9895 avoid finding a template type when an instantiation is required.
9896 Simplify. Use full template arguments.
9897 (tsubst_friend_function): Use unregister_specialization. Use new
9898 macros. Use full template arguments.
9899 (tsubst_friend_class): Substitute, using tsubst_template_parms,
9900 into the template parameters before passing them to
9901 redeclare_class_template.
9902 (instantiate_class_template): Simplify. Use full template
9903 arguments. Adjust calls to get_class_bindings. Use
9904 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
9905 (innermost_args): Use new macros.
9906 (tsubst_aggr_type): New function, split out from tsubst.
9907 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
9908 conventions for lookup_template_class. Refine handling of partial
9909 instantiations. Remove calls to complete_template_args.
9910 Simplify. Add consistency checks. Use set_mangled_name_for_decl
9911 and set_mangled_name_for_template_decl.
9912 (tsubst_copy): Use tsubst_aggr_type.
9913 (instantiate_template): Use full template arguments.
9914 (more_specialized): Improve formatting.
9915 (more_specialized_class): Adjust calls to get_class_bindings.
9916 (get_bindings_real): Don't call complete_template_args.
9917 (most_specialized): Don't overwrite input; create a new list.
9918 (most_specialized_class): Use most_general_template.
9919 (regenerate_decl_from_template): Use unregister_specialization.
9920 Use full template arguments.
9921 (instantiate_decl): Use full template arguments.
9922 (set_mangled_name_for_template_decl): New function.
9923 * semantics.c (begin_class_definition): Use
9924 maybe_process_partial_specialization.
9925 (finish_member_class_template): New function.
9926 (finish_template_decl): Likewise.
9927 (finish_template_type): Likewise.
9928 (typeck.c): Don't crash after issuing a compiler_error.
9929 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
9931 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
9933 * typeck2.c (build_functional_cast): Handle default-initialization.
9935 * call.c (build_over_call): Pass 1 to popclass.
9937 * parse.y (direct_notype_declarator): Add precedence declaration
9938 to notype_unqualified_id case.
9939 * Makefile.in (EXPECT): Adjust.
9941 * tree.c (ovl_member): Fix for single function in OVL.
9943 1998-07-27 Dave Brolley <brolley@cygnus.com>
9945 * c-lex.c (yylex): Fix boundary conditions in character literal and
9946 string literal loops.
9948 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
9950 * decl.c (lookup_name_real): OK, do return the from_obj value
9951 unless got_object depends on template parms.
9953 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
9955 * pt.c (coerce_template_parms): Also complain about local enums.
9957 * cp-tree.h: Add prototype for set_identifier_local_value.
9958 * decl.c (set_identifier_local_value_with_scope): Make static,
9960 * search.c (covariant_return_p): Likewise.
9961 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
9963 * call.c (build_method_call): Only pull out the type of a destructor
9964 if it's a template type parm.
9965 * decl.c (lookup_name_real): Never return the from_obj value.
9967 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
9969 * except.c (process_start_catch_block_old): Call start_decl_1 for
9971 * decl.c (start_decl_1): Avoid duplicate error.
9973 * init.c (expand_default_init): Only perform the initialization if
9974 it will do something.
9976 1998-07-23 H.J. Lu (hjl@gnu.org)
9978 * parse.y (base_class): Check for invalid base class.
9980 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
9982 * decl2.c (import_export_template): Fold in...
9983 (import_export_class): ...to here. Handle dllimport/export.
9985 * class.c (build_vtable): Pass at_eof to import_export_vtable.
9986 (prepare_fresh_vtable): Likewise.
9987 * decl2.c (import_export_class): Split out...
9988 (finish_prevtable_vardecl): From here.
9989 * class.c (finish_struct_1): Call import_export_class if at_eof.
9991 * decl.c (start_function): #if 0 mysterious code I wrote and have
9993 * rtti.c (get_tinfo_fn): If this is for a class type, set
9996 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
9998 * inc/exception: Change terminate and unexpected to ().
10000 * parse.y (named_class_head_sans_basetype_defn): A
10001 named_class_head_sans_basetype followed by '{' or ':' is a defn.
10003 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
10005 * tree.c (canonical_type_variant): New fn to handle arrays.
10006 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
10007 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
10008 * method.c (process_overload_item): Use build_overload_value for
10011 1998-07-20 Dave Brolley <brolley@cygnus.com>
10013 * lex.c (mbchar.h): #include it.
10014 (GET_ENVIRONMENT): New macro.
10015 (init_parse): Set character set based on LANG environment variable.
10016 (real_yylex): Handle multibyte characters in character literals.
10017 (real_yylex): Handle multibyte characters in string literals.
10019 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
10021 * lex.c (do_identifier): Look for class value even if we don't
10022 have a global value. Do implicit declaration if parsing is 2.
10023 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
10026 1998-07-19 Mark Mitchell <mark@markmitchell.com>
10028 * decl.c (pushtag): Revert previous change.
10029 * pt.c (lookup_template_class): Don't put out debugging
10030 information for types that use template parameters.
10032 * decl.c (pushtag): Don't put out debugging information for
10033 compiler-generated typedefs.
10035 * error.c (dump_type_real): Don't crash when presented with
10036 intQI_type_node or the like.
10038 * semantics.c (finish_translation_unit): Fix spelling error in
10041 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
10043 * decl.c (lookup_name_real): Pull out single function here.
10044 (select_decl): Not here.
10045 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
10047 * decl.c (qualify_lookup): Tweak again.
10049 * pt.c (lookup_template_class): Don't mess with the context of the
10051 * decl2.c (current_decl_namespace): Remove special handling for
10054 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
10055 a member template specialization.
10057 * tree.c (ovl_member): Use decls_match to compare functions.
10058 * decl.c (decls_match): Check the context of a function.
10060 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
10061 in Koenig lookup support rules.
10062 * semantics.c (finish_call_expr): Handle the new cases.
10064 * typeck.c (build_x_function_call): Handle overloaded methods.
10066 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
10068 1998-07-16 Mark Mitchell <mark@markmitchell.com>
10070 * semantics.c (finish_object_call_expr): Revert previous change.
10071 * call.c (build_new_method_call): Likewise. Instead, convert
10072 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
10074 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
10076 * decl.c (qualify_lookup): Handle templates.
10078 * decl2.c (do_using_directive): Don't pass ancestor.
10079 * decl.c (push_using_directive): Calculate ancestor.
10081 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
10082 * decl.c (pushdecl): Move type shadowing handling from here...
10083 (duplicate_decls): ...to here.
10084 * decl.c (set_identifier_local_value_with_scope): New fn.
10085 (pushdecl): Use it.
10086 (set_identifier_local_value, lookup_type_current_level): New fns.
10087 * decl2.c (do_local_using_decl): Handle types and binding level
10090 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
10091 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
10092 (lookup_namespace_name): Likewise.
10093 * typeck.c (build_unary_op): Not here anymore.
10095 * decl2.c (do_class_using_decl): Make sure we get an identifier.
10096 * class.c (handle_using_decl): Ignore TYPE_DECLs.
10098 * decl.c (qualify_lookup): New fn.
10099 (lookup_name_real): Use it.
10101 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
10103 * decl2.c (add_using_namespace): When directly using a namespace
10104 that was indirect before, promote it.
10106 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
10107 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
10108 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
10109 * decl.c (select_decl): Replace two flag parameters by one.
10110 (unqualified_namespace_lookup): Likewise, pass flag.
10111 (lookup_flags): New function.
10112 (lookup_name_real): Compute flags, pass them.
10113 (lookup_namespace_name): Call with zero-flag.
10114 * decl2.c (ambiguous_decl): Add flag parameter, complain only
10115 according to flags.
10116 (lookup_using_namespace, qualified_lookup_using_namespace):
10117 Add flag parameter, pass them through.
10118 * lex.c (do_scoped_id): Call with zero-flag.
10120 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
10122 * typeck.c (convert_for_assignment): Use comptypes.
10124 1998-07-16 Mark Mitchell <mark@markmitchell.com>
10126 * semantics.c (finish_object_call_expr): Move test for the
10127 function called being a TYPE_DECL to ...
10128 * call.c (build_new_method_call): Here.
10130 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
10132 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
10133 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
10135 * lex.c (looking_for_typename): Don't initialize.
10137 * decl2.c (ambiguous_decl): Clarify error message.
10139 * decl.c (push_using_directive): Iterate over namespaces used
10142 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10144 * decl2.c (add_using_namespace): Iterate over namespaces used
10147 * decl.c (lookup_name_real): Accept namespace aliases as locals.
10148 (cat_namespace_levels): Ignore aliases.
10149 (duplicate_decls): Ignore duplicate aliases.
10150 * decl2.c (do_namespace_alias): Process block level namespace
10151 aliases. Store alias with pushdecl. Remove odr errors.
10152 * parse.y (namespace_alias): New non-terminal.
10155 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
10157 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
10158 Handle TEMPLATE_TYPE_PARM.
10159 (arg_assoc): Rewrite.
10161 * pt.c (complete_template_args): Don't look at the context unless
10164 * method.c (build_decl_overload_real): Fix namespace handling.
10166 * typeck.c (build_unary_op): Extract a lone function from an
10169 * call.c (build_scoped_method_call): Handle getting a namespace
10170 for basetype in a destructor call.
10171 (check_dtor_name): Handle enums.
10173 * parse.y (using_directive): New nonterminal.
10174 (extdef, simple_stmt): Use it.
10176 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
10178 * decl2.c (add_function): Move error message ...
10179 (arg_assoc_namespace): ... from here.
10181 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
10183 * parse.y (namespace_qualifier): Fix multiple level handling.
10184 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
10185 (arg_assoc): Don't skip the first argument of a function.
10187 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
10189 * search.c (my_tree_cons): Clean up.
10191 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
10193 * call.c (joust): Don't warn about "confusing" conversions to the
10196 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
10198 * class.c (push_nested_class): Complain about namespaces.
10199 * decl.c (start_decl): Enter the object's namespace.
10200 (cp_finish_decl): Leave it.
10201 (grokdeclarator): Likewise.
10202 * decl2.c (check_decl_namespace): New function.
10203 (finish_file): Call it.
10204 * parse.y (complex_direct_notype_declarator): Set complexity
10205 of namespace-qualified ids to -1, enter the namespace.
10207 * method.c (build_template_decl_overload): Expect _DECL as first
10208 parameter. Put context temporarily into current_namespace.
10209 * pt.c (check_explicit_specialization): Change caller.
10210 (tsubst): Likewise.
10212 * init.c (build_offset_ref): Call mark_used and
10213 convert_from_reference for namespace members.
10215 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
10217 * search.c (my_tree_cons): The bitfield is at index 2.
10219 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
10221 * lang-options.h: Format changed to work with new --help support
10224 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
10226 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
10227 Do Koenig lookup in CALL_EXPR.
10228 (arg_assoc): Handle error_mark.
10229 * lex.c (is_global): New function.
10230 (do_identifier): Expect arguments for Koenig lookup.
10231 * parse.y (primary): Add rules for calls of unqualified function calls.
10232 (do_id): Change call of do_identifier.
10233 * pt.c (finish_stmt_expr): Likewise.
10234 * semantics.c (finish_id_expr): Likewise.
10235 (finish_call_expr): Add integer parameter to indicate
10236 argument-dependent lookup.
10238 * decl.c (struct binding_level): New field using_directives.
10239 (push_using_decl): Not sorry anymore.
10240 (push_using_directive): New function.
10241 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
10242 (unqualified_namespace_lookup): New function, code from ...
10243 (lookup_name_real): ... here.
10244 * decl2.c (lookup_using_namespace): Pass using list instead of
10246 (validate_nonmember_using_decl): New function.
10247 (do_nonmember_using_decl): New function.
10248 (do_toplevel_using_decl): Use them.
10249 (do_local_using_decl): New function.
10250 (do_using_directive): Support block-level directives.
10251 * parse.y (simple_stmt): Support using declarations and
10253 (namespace_qualifier, namespace_using_decl): New non-terminals.
10255 * xref.c (classname): New function.
10256 (GNU_xref_hier): Change class and base parameters to tree.
10257 * decl.c (xref_baseypes): Change caller.
10258 * friend.c (make_friend_class): Likewise.
10260 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10262 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
10265 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
10266 template template parameter, record its use.
10267 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
10268 its template arguments if exists.
10270 * pt.c (coerce_template_template_parms): New function equivalent
10271 to coerce_template_parms when IS_TMPL_PARM is true.
10272 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
10273 all callers changed.
10275 (coerce_template_parms): Access ARGLIST properly when creating a
10276 new vector. Only accept implicit TYPE_DECL as valid argument for
10277 a template template parameter when it is a base class of
10278 current_class_type. Don't display error message when COMPLAIN is
10281 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
10283 * repo.c (get_base_filename): Use file_name_nondirectory.
10284 (open_repo_file): Likewise.
10285 * cp-tree.h (file_name_nondirectory): Add prototype.
10287 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
10289 * friend.c (do_friend): Pull the identifier out of declarator.
10290 Use cp_error and friends.
10291 * decl2.c (qualified_lookup_using_namespace): Fix call to
10293 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
10294 (grokvardecl): Use DECL_CLASS_SCOPE_P.
10295 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
10296 * class.c (warn_hidden): Fix for OVERLOAD.
10297 From grahams@rcp.co.uk:
10298 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
10299 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
10301 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
10303 * g++.1 (-traditional): Remove duplicated documentation.
10305 1998-07-11 Mark Mitchell <mark@markmitchell.com>
10307 * method.c (flush_repeats): Add nrepeats parameter.
10308 (issue_nrepeats): Likewise.
10309 (is_back_referenceable_type): New function. Don't back-reference
10310 TEMPLATE_TYPE_PARMs as well as simple types like integers.
10311 (build_mangled_name_for_type): Likewise.
10312 (build_mangled_name_for_type_with_Gcode): Likewise.
10313 (lasttype): Remove.
10314 (nrepeats): Likewise.
10315 (Nrepeats): Likewise.
10316 (start_squangling): Don't clear the variables removed above.
10317 (end_squangling): Likewise.
10318 (flush_repeats): Tidy. Use nrepeats parameter rather than
10320 (issue_nrepeats): Likewise, but with nrepeats global. Use
10321 is_backreferenceable_type.
10322 (build_overload_nested_name): Tidy. Add comment. Use
10323 build_mangled_name_for_type.
10324 (build_underscore_int): Comment.
10325 (build_overload_scope_ref): Use build_mangled_name_for_type.
10326 (build_overload_int): Likewise.
10327 (build_template_template_parm_names): Tidy.
10328 (build_template_parm_names): Use build_mangled_name_for_type.
10329 (build_overload_identifier): Add comments.
10330 (build_mangled_name_for_type_with_Gcode): Split out from
10331 build_mangled_name.
10332 (build_mangled_name_for_type): Use it.
10333 (build_mangled_name): Rework to use build_mangled_name_for_type
10334 and to not use global nrepeats/Nrepeats. Tidy.
10335 (process_modifiers): Tidy.
10336 (check_btype): Use is_backreferenceable_type. Add comment.
10337 Rename `node' to `type'.
10338 (process_overload_item): Set numeric_output_need_bar here.
10339 Use build_mangled_name_for_type. Tidy.
10340 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
10341 build_mangled_name_for_type.
10343 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
10346 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
10348 * cp-tree.h (warn_long_long): Define.
10349 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
10350 warning "ANSI C++ does not support `long long'".
10351 * decl2.c (warn_long_long): Define.
10352 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
10354 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
10356 * decl.c (xref_tag): Handle attributes between 'class' and name.
10357 * parse.y (aggr): Likewise.
10358 * semantics.c (finish_class_definition): Likewise.
10359 * Makefile.in (EXPECTED): Adjust.
10361 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
10362 * decl2.c: Define them.
10363 (lang_decode_option): Handle them.
10364 * lang-options.h: Add -foptional-diags.
10365 * class.c (finish_struct): Don't complain about multiple meanings of
10366 name if -fno-optional-diags.
10367 * decl.c (pushdecl_class_level): Likewise.
10368 * lex.c (real_yylex): Check warn_multichar.
10370 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
10372 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
10374 * tree.c (make_binfo): Fix length.
10376 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
10378 * decl2.c (lang_decode_option): Remove warn_template_debugging.
10379 * lang-options.h: Likewise.
10381 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10383 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
10384 (process_start_catch_block): Likewise for variables
10385 `false_label_rtx', `call_rtx' and `return_value_rtx'.
10387 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
10389 * tree.c (build_srcloc): Make sure we allocate this node on the
10392 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
10394 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
10395 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
10396 (lang_specific_driver): Only add -lm automatically if need_math is
10399 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
10401 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
10403 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10405 * Makefile.in (EXPR_H): New dependency variable.
10406 (decl2.o): Depend on $(EXPR_H).
10407 (typeck.o): Likewise.
10408 (init.o): Likewise.
10409 (expr.o): Likewise.
10411 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
10413 * decl.c (start_enum): Put local enums on permanent_obstack.
10415 1998-06-25 Mark Mitchell <mark@markmitchell.com>
10417 * cp-tree.h (c_get_alias_set): Declare.
10418 * decl.c (init_decl_processing): Set lang_get_alias_set.
10420 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
10422 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
10423 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
10424 flag for all function decls which are in the exception table.
10425 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
10426 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
10427 code is emitted for any referenced rtti function.
10429 1998-06-25 Dave Brolley <brolley@cygnus.com>
10431 * lang-specs.h: Use new | syntax to eliminate
10432 string concatenation.
10434 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
10436 * cp-tree.h (CP_DECL_CONTEXT): New macro.
10437 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
10438 * method.c (build_overload_nested_name): Likewise.
10439 * sig.c (build_signature_pointer_or_reference_type): Don't set
10442 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10444 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
10445 * cp-tree.h (FROB_CONTEXT): New macro.
10446 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
10447 * decl.c (namespace_binding): Replace NULL_TREE with
10449 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
10450 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
10452 * decl.c (pushtag): Use FROB_CONTEXT.
10453 (pushdecl, make_typename_type, define_function, grokdeclarator):
10455 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
10456 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
10458 * decl2.c (decl_namespace): Return global_namespace if no context.
10459 * method.c (build_overload_nested_name): Expect null as context.
10460 * pt.c (mangle_class_name_for_template): Do nothing for null
10462 (lookup_template_class): Allow for null id_context.
10464 1998-06-25 Richard Henderson <rth@cygnus.com>
10466 * method.c (emit_thunk): Set current_function_is_thunk for the
10467 ASM_OUTPUT_MI_THUNK case as well.
10469 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
10471 * exception.cc (__cplus_type_matcher): Get a match_info pointer
10472 instead of an exception table entry as a parameter.
10474 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
10476 * parse.y (function_try_block): Don't call start_catch_handler.
10477 * except.c (call_eh_info): Remove coerced field from declaration.
10478 (build_eh_type_type_ref): New function to create an address of a
10479 rtti function for the new style exception tables.
10480 (expand_start_catch_block): Split function, this contains the
10482 (process_start_catch_block_old): New function to perform the rest
10483 of expand_start_catch_block under old style exceptions.
10484 (process_start_catch_block_old): New function to perform the rest
10485 of expand_start_catch_block under new style exceptions.
10486 (expand_end_catch_block): Only pop the false label off the stack under
10487 the old style of exceptions.
10488 * semantics.c (finish_try_block): Don't call start_catch_handler.
10489 * exception.cc (struct cp_eh_info): Add original_value field.
10490 (__cplus_type_matcher): Perform type matching on the original exception
10491 value, and if we have a match, set the current value.
10492 (__cp_push_exception): Set the original exception value.
10494 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
10496 * call.c (joust): Fix confusing conversion warning.
10498 * call.c (build_op_delete_call): Add placement parm. Check
10499 LOOKUP_SPECULATIVELY.
10500 * cp-tree.h, decl2.c, init.c: Adjust.
10501 * decl.c (finish_function): Use it.
10503 * pt.c (tsubst): Diagnose creating void fields or variables.
10505 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10507 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
10509 * cp-tree.h (check_dtor_name): Add prototype.
10511 * init.c (expand_member_init): Remove unused variables
10512 `ptr_type_node', `parm' and `rval'.
10514 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
10515 in call to fprintf.
10516 (lang_print_xnode): Likewise.
10518 * typeck2.c (enum_name_string): Cast argument to sprintf to long
10519 and use %ld specifier.
10521 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
10522 specifier in call to fprintf.
10523 (GNU_xref_member): Cast argument to sprintf to int.
10525 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10527 * typeck2.c (pop_init_level): Warn about implicit zero initialization
10530 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10532 * cp-tree.h: Prototype function `check_java_method'.
10534 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
10536 * class.c (finish_struct): Make conflicting use of id a pedwarn.
10537 * decl.c (pushdecl_class_level): Likewise.
10539 1998-06-17 Mark Mitchell <mark@markmitchell.com>
10541 * pt.c (convert_nontype_argument): Issue an error when presented
10542 with an integer (real) constant that cannot be simplified to an
10543 INT_CST (REAL_CST).
10545 * cp-tree.h (c_get_alias_set): Remove declaration added in
10546 1998-06-13 change that should never have been checked in.
10548 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
10550 * typeck.c (build_binary_op_nodefault): Change % in format strings
10553 * decl.c (grokvardecl): Don't build_static_name for decls that
10554 aren't at namespace scope.
10556 * init.c (perform_member_init): Catch default-initialization of
10559 1998-06-17 Mark Mitchell <mark@markmitchell.com>
10561 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
10563 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
10565 * method.c (hack_identifier): Complain about getting a namespace
10567 * typeck.c (decay_conversion): Remove check for namespaces.
10568 * typeck2.c (incomplete_type_error): Likewise.
10569 * parse.y (template_arg): Add PTYPENAME expansion.
10571 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
10573 * decl.c (grokvardecl): Don't build external assembler names for
10574 TYPENAMEs in other namespaces as there is no declarator.
10575 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
10576 info from DECL_CONTEXT if it is NULL.
10578 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
10580 * call.c (check_dtor_name): Split out.
10581 (build_scoped_method_call): Use it.
10582 (build_method_call): Use it.
10583 * init.c (build_offset_ref): Use it.
10585 * typeck.c (build_static_cast): Fix handling of pointers to members.
10587 * decl.c (finish_function): Just return nothing from a constructor.
10588 * typeck.c (c_expand_return): Complain about returning a void
10589 expression from a destructor.
10591 1998-06-13 Mark Mitchell <mark@markmitchell.com>
10593 * class.c (alter_access): Accept a BINFO explaining how to get
10594 from the entity whose accessed is being altered to the type doing
10596 (handle_using_decl): New function containing code split out from ...
10597 (finish_struct_1): Here.
10599 * cp-tree.h (complete_type_or_else): Declare.
10600 * init.c (build_new_1, build_delete): Use it.
10601 * typeck.c (require_complete_type): Use complete_type, rather than
10602 expanding it inline.
10603 (complete_type_or_else): New function.
10604 (build_component_ref): Use it.
10605 (pointer_int_sum): Make sure the type pointed to is complete.
10606 (pointer_diff): Likewise.
10608 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
10611 * search.c (get_matching_virtual): Note that member templates
10612 cannot override virtual functions.
10614 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
10616 * pt.c (check_explicit_specialization): If DECLARATOR turned into
10617 an error_mark_node from lookup_template_function, return the same.
10618 (determine_specialization): Also make sure TEMPLATE_ID isn't an
10619 error_mark_node, before we try to read its operands.
10620 * decl.c (grokdeclarator): If we got an error_mark_node from
10621 check_explicit_specialization, just return it right back.
10623 1998-06-12 Mark Mitchell <mark@markmitchell.com>
10625 * class.c (instantiate_type): Don't treat template-ids that don't
10626 specify any template arguments as equivalent to ordinary
10627 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
10628 pointer-to-members for member templates. Tidy slightly.
10629 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
10630 * init.c (build_offset_ref): Handle template-ids like ordinary
10631 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
10632 offset part of the OFFSET_REF.
10633 * typeck.c (build_unary_op): Change check for unknown types to
10634 look for OFFSET_REFs, not SCOPE_REFs.
10636 1998-06-11 Mark Mitchell <mark@markmitchell.com>
10638 * pt.c (is_member_template_class): New function.
10639 (push_template_decl_real): Use it.
10641 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
10643 * friend.c (do_friend): Add support for nested classes using
10644 member functions of the enclosing class as friends.
10646 1998-06-10 Mark Mitchell <mark@markmitchell.com>
10648 * call.c (convert_default_arg): Make global, not static.
10649 (convert_arg_for_ellipsis): Split out from ...
10650 (build_over_call): Here.
10651 * cp-tree.h (convert_default_arg); Declare.
10652 (convert_arg_to_ellipsis): Likewise.
10653 (do_member_init): Remove.
10654 * init.c (do_member_init): Remove; this code is dead.
10655 (expand_member_init): Remove much of this code; it is dead.
10656 * typeck.c (convert_arguments): Use convert_default_arg and
10657 convert_arg_for_ellipsis, rather than duplicating here.
10659 * call.c (convert_like): Don't fail silently if
10660 build_user_type_conversion fails. Always return error_mark_node
10663 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
10665 * search.c (covariant_return_p): Complain about ambiguous base.
10667 * typeck.c (build_component_ref): Diagnose ref to nested type.
10669 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
10671 * decl.c (grokparms): Check that INIT isn't an error_mark_node
10672 before giving error about invalid type for default arg.
10674 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
10676 * call.c (build_method_call): Fix thinko.
10678 1998-06-10 Dave Brolley <brolley@cygnus.com>
10680 * decl2.c (lang_decode_option): New argc/argv interface.
10681 * cp-tree.h (lang_decode_option): New argc/argv interface.
10682 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
10683 specified for cpplib-enabled compilers.
10684 * lex.c (lang_init): Don't check_newline for cpplib.
10685 (init_parse): Don't initialize cpplib here.
10687 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
10689 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
10690 piece before checking DECL_MUTABLE_P.
10692 1998-06-10 John Carr <jfc@mit.edu>
10694 * tree.c (debug_binfo): Make printf format match arguments.
10696 * error.c (OB_PUTI): Make printf format match arguments.
10698 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
10700 * init.c (perform_member_init): Handle default-initialization.
10702 * except.c (build_throw): Handle throwing NULL.
10704 * typeck.c (build_x_function_call): Use resolve_offset_ref.
10706 * search.c (compute_access): Only strip an anonymous union
10709 * call.c (add_builtin_candidates): Tweak.
10711 * cvt.c (build_expr_type_conversion): Restore code for conversion
10713 * decl2.c (delete_sanity): Use it. Clean up.
10715 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
10717 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
10719 * typeck.c (c_expand_return): Don't warn about void expressions on
10720 return statements in functions returning void.
10722 1998-06-09 Mark Mitchell <mark@markmitchell.com>
10724 * pt.c (fn_type_unification): Revise documentation. Tidy.
10725 (type_unification): Likewise.
10727 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
10729 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
10731 * parse.y (function_try_block): Rename expand_start_catch, and delete
10733 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
10736 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
10738 * search.c (lookup_member): New fn.
10739 * class.c (finish_struct_1): Use it.
10740 * decl.c (lookup_name_real): Use it.
10742 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10744 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
10746 * cp-tree.h: Add prototype for `maybe_print_template_context' and
10747 `maybe_make_one_only'.
10749 * decl.c (auto_function): Remove unused variable `decl'.
10751 * decl2.c: Include dwarf2out.h and dwarfout.h.
10753 * lex.c: Remove redundant declarations of `set_float_handler' and
10756 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
10758 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
10759 time flag. Call __cp_eh_info instead of __cp_exception_info.
10760 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
10761 (__cp_exception_info): Return offset into cp_eh_info structure to
10762 match what use to be the start of this structure.
10763 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
10764 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
10766 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
10767 __cp_eh_info instead of __cp_exception_info.
10769 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
10771 * decl.c (cp_finish_decl): Disable inlining of extern inlines
10772 with static variables.
10774 1998-06-08 Mark Mitchell <mark@markmitchell.com>
10776 * init.c (build_offset_ref): Correct previous change to use build,
10779 1998-06-07 Mark Mitchell <mark@markmitchell.com>
10781 * class.c (instantiate_type): Handle pointer-to-members where the
10782 member is a template.
10783 * init.c (build_offset_ref): Likewise.
10784 * typeck.c (build_unary_op): Likewise.
10786 1998-06-07 Richard Henderson <rth@cygnus.com>
10788 * lex.c (lang_init_options): New function.
10789 (lang_init): Remove flag_exceptions == 2 hack.
10791 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
10793 * search.c (envelope_add_decl): Tweak for implicit typename.
10795 * call.c (joust): Also warn about confusing conversion op/constructor
10796 overload resolution.
10798 * spew.c (yylex): Also return the TYPE_DECL if got_object.
10799 Don't clear got_object after '~'.
10800 * call.c (build_scoped_method_call): Tweak destructor handling.
10801 (build_method_call): Likewise.
10802 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
10803 TYPE_MAIN_VARIANT for destructors.
10804 * semantics.c (finish_object_call_expr): Complain about calling a
10807 1998-06-05 Per Bothner <bothner@cygnus.com>
10809 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
10810 Define - update needed by gcc.c change.
10812 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
10814 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
10816 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
10818 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
10819 * decl.c (lookup_name_real): Add namespaces_only parameter.
10820 If set, return only NAMESPACE_DECLs.
10821 (select_decl): Likewise.
10822 (identifier_type_value): Give additional parameter.
10823 (lookup_name_nonclass): Likewise.
10824 (lookup_name): Likewise.
10825 (find_binding): Skip namespace aliases.
10826 (binding_for_name): Likewise.
10827 (push_namespace): Check for namespace aliases.
10828 (lookup_name_namespace_only): New function.
10829 (begin_only_namespace_names, end_only_namespace_names): New functions.
10830 * decl2.c (set_decl_namespace): Skip namespace aliases.
10831 (do_using_directive): Likewise.
10832 (do_namespace_alias): Produce namespace aliases, fix alias
10834 * error.c (dump_decl): Support SCOPE_REF.
10835 * parse.y (extdef): Wrap lookup with namespace_only for namespace
10836 aliases and using declarations.
10838 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
10840 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
10842 * error.c (dump_expr): Clean up NEW_EXPR case.
10844 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
10846 Suggested by Brendan Kehoe
10847 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
10848 treat it as using ::decl.
10850 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
10852 * tree.c (mapcar): Support NEW_EXPR.
10854 * error.c (dump_expr): Support NEW_EXPR.
10856 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
10858 * method.c (make_thunk): Use overload machinery to make name.
10859 * search.c (covariant_return_p): New fn.
10860 (get_matching_virtual): Use it.
10862 * init.c (build_new_1): Fix check for void.
10864 1998-06-01 Per Bothner <bothner@cygnus.com>
10866 * cp-tree.h (TYPE_FOR_JAVA): New macro.
10867 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
10868 java_int_type_node, java_long_type_node, java_float_type_node,
10869 java_double_type_node, java_char_type_node, java_boolean_type_node):
10870 New "primitive" types, with predefined names __java_byte etc.
10871 (record_builtin_java_type): New function.
10872 (init_decl_processing): Make Java types with record_builtin_java_type.
10873 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
10874 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
10875 (grokfndecl): Call check_java_method for Java classes.
10876 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
10877 (process_overload_item): Match types against specific
10878 java_XX_type_node types, rather than using is_java_type.
10879 * class.c (finish_struct_1): Don't add default copy constructor
10880 or operator= if TYPE_FOR_JAVA.
10881 (pop_lang_conext): Restore strict_prototyp proper if Java.
10882 * decl2.c (acceptable_java_type, check_java_method): New functions.
10883 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
10884 (tsubst): Move common statement after if statement.
10885 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
10887 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
10889 * pt.c (for_each_template_parm): Use first_rtl_op.
10891 * tree.c (build_cplus_array_type_1): Also check index_type for
10894 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
10896 * pt.c (tsubst): Always copy BINFO_BASETYPES.
10898 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
10900 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
10901 TYPE_SIZE_UNIT too.
10903 1998-05-29 Mark Mitchell <mark@markmitchell.com>
10905 * decl.c (grokdeclarator): Don't complain about in-class
10906 initialization of static consts if we don't really know the type
10909 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
10911 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
10912 * method.c (build_destructor_name): New fn.
10913 * decl2.c (maybe_retrofit_in_chrg): Split out...
10914 (grokclassfn): From here. Reorganize.
10915 * decl.c (grok_ctor_properties): Make sure ctors for types with
10916 vbases have the in_chrg parm.
10917 * pt.c (instantiate_class_template): Update
10918 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
10920 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
10922 1998-05-28 Mark Mitchell <mark@markmitchell.com>
10924 * pt.c (instantiate_decl): Make test for whether or not static
10925 variables should be instantiated early match its comment.
10927 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
10929 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
10931 (start_function): Call check_default_args.
10932 * decl2.c (grokfield): Don't call check_default_args.
10933 (check_default_args): Use cp_error_at.
10934 * lex.c (do_pending_defargs): Call check_default_args.
10936 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
10938 * call.c (build_method_call): Make sure get_type_value returns
10939 something before we try to use its TYPE_MAIN_VARIANT.
10940 (build_scoped_method_call): Likewise.
10942 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
10944 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
10945 initialize an array.
10947 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
10950 * friend.c (do_friend): Clarify template warning.
10952 1998-05-27 Mark Mitchell <mark@markmitchell.com>
10954 * decl.c (shadow_label): Don't treat decls as identifiers.
10955 (maybe_push_to_top_level): Clear shadowed_labels.
10957 * pt.c (instantiate_decl): Reset lineno and filename after calling
10958 regenerate_decl_from_template.
10960 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
10963 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
10965 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
10967 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10969 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
10970 (convert_nontype_argument): Handle cases when nontype template
10971 parameters become classes after substitution.
10973 1998-05-26 Mark Mitchell <mark@markmitchell.com>
10975 * friend.c (is_friend): Use comptypes, rather than == to compare
10976 types. Modify for new representation of template friends.
10977 (make_friend_class): Likewise.
10978 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
10979 (instantiate_class_template): Deal with template friends.
10981 * decl.c (store_parm_decls): Remove redundant call to
10982 expand_main_function.
10984 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
10986 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
10989 1998-05-26 Per Bothner <bothner@cygnus.com>
10991 * language_as_string: Handle lang_java.
10993 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
10995 * decl.c (pushdecl): Don't copy the type_decl.
10997 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10999 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
11000 current_class_type.
11001 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
11003 * parse.y (complex_direct_notype_declarator): Use $1 to access
11004 scope of notype_qualified_id.
11006 1998-05-26 Dave Brolley <brolley@cygnus.com>
11008 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
11009 (init_parse): Initialize cpplib interface.
11011 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
11012 empty continuation.
11014 1998-05-26 Mark Mitchell <mark@markmitchell.com>
11016 * decl.c (pushtag): Avoid crashing on erroneous input.
11018 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11020 * decl.c (push_namespace): Only produce one unique name for
11021 anonymous namespaces.
11022 (get_unique_name): Remove.
11024 1998-05-25 Mark Mitchell <mark@markmitchell.com>
11026 * call.c (tourney): Don't do any extra comparisons.
11028 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
11030 * cp-tree.h (processing_template_parmlist): Declare.
11031 * decl.c (pushtag): Don't call push_template_decl when we
11033 * pt.c (processing_template_parmlist): New variable.
11034 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
11035 (complete_template_args): Use it.
11036 (add_to_template_args): Likewise.
11037 (innermost_args): Likewise.
11038 (tsubst): Likewise.
11039 (begin_template_parm_list): Use processing_template_parmlist.
11040 (end_template_parm_list): Likewise.
11042 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
11043 * decl.c (grokdeclarator): Use it.
11044 * decl2.c (grok_x_components): Likewise.
11045 * init.c (initializing_context): Likewise.
11046 * method.c (do_build_copy_constructor): Likewise.
11047 (do_build_assign_ref): Likewise.
11048 * search.c (compute_access): Likewise.
11049 * typeck.c (build_component_ref): Likewise.
11051 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
11052 unnamed type a typedef name "for linkage purposes".
11054 * pt.c (lookup_template_class): Don't look at
11055 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
11057 * method.c (build_overload_int): Handle error cases gracefully.
11059 * pt.c (instantiate_decl): Handle static member variables
11062 * pt.c (tsubst): Use the tsubst'd type when producing new
11063 TEMPLATE_PARM_INDEX nodes.
11065 1998-05-24 Mark Mitchell <mark@markmitchell.com>
11067 * tree.c (cp_tree_equal): Handle pointers to member functions.
11069 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
11070 sure the type of the REF_BIND is a reference type.
11071 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
11072 target_type for clarity.
11074 * parse.y (xcond): Move call to condition_conversion ...
11075 * semantics.c (finish_for_cond): Here.
11076 * parse.c: Regenerated.
11078 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
11080 * decl.c (push_namespace): Namespaces have type void.
11081 * typeck2.c (incomplete_type_error): Complain about namespace
11082 used as expression.
11083 * typeck.c (decay_conversion): Likewise.
11085 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
11087 * error.c (dump_expr): Support namespaces.
11089 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
11091 * cp-tree.def: Add SRCLOC.
11092 * cp-tree.h: Add struct tree_srcloc and accessor macros.
11093 * tree.c (build_srcloc, build_srcloc_here): New fns.
11094 * pt.c (add_pending_template): Use build_srcloc_here.
11095 (push_tinst_level): Update last_template_error_tick before erroring.
11096 (instantiate_decl): Restore lineno and input_filename before
11097 calling add_pending_template.
11098 * decl2.c (finish_file): Set up lineno and input_filename for
11101 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
11103 * decl.c (lang_print_error_function): New fn.
11104 (init_decl_processing): Set print_error_function to use it.
11105 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
11107 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
11110 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
11111 copy-initialization.
11113 * class.c (build_vtable_entry): Use int_fits_type_p.
11114 (build_vtable): Pass a signed offset to build_vtable_entry.
11115 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
11116 set_rtti_entry): Likewise.
11118 1998-05-22 Per Bothner <bothner@cygnus.com>
11120 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
11121 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
11123 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
11125 * pt.c (print_template_context): Use fprintf instead of cp_error.
11127 * pt.c (determine_specialization): Just return an error_mark_node.
11128 Also print the decl we want in error messages. If we complain,
11129 return error_mark_node.
11130 (tsubst_friend_function): Set lineno and input_filename so
11131 error messages will be useful.
11132 (instantiate_template): Just return an error_mark_node.
11133 (check_explicit_specialization): Don't mess with a returned
11136 * pt.c (print_template_context): Add new argument.
11137 (maybe_print_template_context): New fn.
11138 (push_tinst_level): Increment tinst_level_tick.
11139 (pop_tinst_level): Likewise.
11140 * errfn.c (cp_thing): Call maybe_print_template_context. Use
11141 xrealloc instead of xmalloc.
11143 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
11145 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
11147 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
11148 if the template we looked up is the same as the one we already
11151 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
11153 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
11154 (cpp_reader,parse_in): Add for cpplib.
11155 (check_newline): Call handle_sysv_pragma with new interface.
11156 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
11158 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
11159 (sub_getch): Call GETC for cpplib.
11161 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
11162 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
11164 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
11166 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
11168 * decl2.c (maybe_make_one_only): New fn.
11169 (import_export_vtable): Use it.
11170 (import_export_decl): Likewise.
11171 * pt.c (mark_decl_instantiated): Likewise.
11173 1998-05-21 Mark Mitchell <mmitchell@usa.net>
11175 * decl2.c (find_representative_member): Rename to ...
11176 (build_anon_union_vars): New function.
11177 (finish_anon_union): Fix stupidity of previous change.
11179 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
11181 * decl.c (grokfndecl): Handle definition of specialization in
11182 friend declaration.
11184 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
11186 1998-05-20 Mark Mitchell <mmitchell@usa.net>
11188 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
11189 to look for type declarations.
11190 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
11191 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
11192 (finish_member_class_template): Declare.
11193 * decl.c (pushtag): Put member class templates on the
11194 CLASSTYPE_TAGS list, just as for ordinary member classes.
11195 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
11196 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
11197 IDENTIFIER_NAMESPACE_VALUEs.
11198 * parse.y (component_decl): Move code to ...
11199 * semantics.c (finish_member_class_template): New function.
11200 Don't put member class templates on the list of components for a
11202 * parse.c: Regenerated.
11203 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
11204 In fact, don't use DECL_CONTEXT at all here.
11206 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
11208 * decl.c (record_unknown_type): New function.
11209 (init_decl_processing): Call it for the unknown and global type
11212 1998-05-20 Mark Mitchell <mmitchell@usa.net>
11214 * decl2.c (find_representative_member): New function.
11215 (finish_anon_union): Use it.
11217 * cp-tree.h (MAIN_NAME_P): New macro.
11218 (DECL_MAIN_P): Likwise.
11219 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
11220 (grokfndecl): Use the new macros.
11221 (grokdeclarator): Likewise.
11222 (start_function): Likewise.
11223 (store_parm_decls): Likewise.
11224 (finsh_function): Likewise.
11225 * friend.c (do_friend): Likewise.
11226 * typeck.c (build_function_call_real): Likewise.
11227 (build_unary_op): Likewise.
11229 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
11231 * decl2.c (start_objects, finish_objects, do_dtors,
11232 do_ctors): Split out from...
11233 (finish_file): ...here.
11235 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
11237 * tree.c (is_overloaded_fn): Don't abort on placeholders from
11240 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
11242 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
11244 * error.c (dump_expr): Handle an ARROW_EXPR.
11246 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
11248 * decl.c (saveable_obstack): Declare.
11249 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
11250 declare, if necessary.
11252 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
11254 * call.c (compare_qual): Remove.
11255 (is_subseq): Tweak.
11256 (is_properly_derived_from): New function.
11257 (maybe_handle_ref_bind): Likewise.
11258 (maybe_handle_implicit_object): Likewise.
11259 (compare_ics): Modify substantially to bring into conformance with
11261 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
11262 (comp_cv_qualification): Declare.
11263 (comp_cv_qual_signature): Likewise.
11264 * typeck.c (comp_cv_qualification): Likewise.
11265 (comp_cv_qual_signature): Likewise.
11267 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11269 * Makefile.in (parse.o): Depend on toplev.h.
11271 * class.c (typecode_p): Remove prototype and definition.
11273 * cp-tree.h (currently_open_class, is_empty_class, member_p):
11276 * decl.c (push_overloaded_decl_top_level): Remove prototype and
11279 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
11280 in call to `cp_thing'.
11281 (cp_warning): Likewise for function pointer `warning'.
11283 * except.c (do_function_call): Remove prototype and definition.
11284 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
11286 * method.c (is_java_type): Add prototype and make it static.
11288 * parse.y: Include toplev.h.
11290 * pt.c (type_unification): Remove unused variable `arg'.
11291 (instantiate_decl): Likewise for `save_ti'.
11293 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
11295 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
11297 * init.c (build_member_call): Handle template_ids.
11298 * parse.y (primary): Add global_scope template_id.
11300 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
11302 * decl2.c (get_sentry): Use end_temporary_allocation.
11303 Don't declare permanent_obstack.
11305 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
11307 * parse.y (.finish_new_placement): New non-terminal.
11308 (unary_expr, new_type_id): Use it.
11309 * parse.c: Regenerated.
11311 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
11313 * pt.c (redeclare_class_template): Say where the original definition
11314 of the template-parameter's default argument appeared.
11316 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
11318 * call.c (build_over_call): Tweak empty class handling.
11320 * decl.c (make_typename_type): Use currently_open_class.
11322 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
11324 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
11326 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
11327 for a type unless it is one.
11329 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
11331 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
11333 * Makefile.in (program_transform_name, objdir): Define.
11335 * Makefile.in (BISON): Use bison from the build tree if it exists.
11338 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
11340 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
11342 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
11344 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
11346 * call.c (build_scoped_method_call): Likewise.
11348 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
11350 * init.c (build_new_1): Call suspend_momentary around the creation
11351 of values that must be saved for exception handling.
11352 * parse.y (.build_new_placement): New non-terminal.
11353 (unary_expr, new_placement): Use it.
11354 * parse.c: Regenerated.
11356 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
11358 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
11361 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
11364 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
11366 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
11368 * decl.c (start_decl): Revert problem change.
11370 * Makefile.in (CONFLICTS): Fix.
11372 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11374 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
11376 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
11378 * class.c (finish_struct_1): Use BINFO_SIZE.
11380 * decl.c (start_decl): Use 'tem'.
11382 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
11384 * exception.cc: Include eh-common.h.
11385 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
11386 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
11387 (__cp_push_exception): Initialize eh_info struct as well.
11388 * except.c: Remove local structs and include eh-common.h.
11389 (init_exception_processing): Set language and version codes.
11390 (call_eh_info): Add presence of eh_info to runtime description of
11392 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
11393 * semantics.c (finish_try_block): Call start_catch_block() and
11395 * parse.y (function_try_block): Call start_catch_block() and
11398 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
11400 * typeck.c (original_type): New function.
11401 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
11402 to see if they're actually the same.
11403 * cp-tree.h (original_type): Declare.
11405 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11407 * Makefile.in (lex.o): Depend on output.h.
11409 * call.c (add_function_candidate): Remove unused variable `cand'.
11410 (add_conv_candidate): Likewise.
11411 (build_builtin_candidate): Likewise.
11413 * cp-tree.h: Add prototype for `types_overlap_p'.
11415 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
11417 * decl2.c (merge_functions): Remove unused variables `tmp' and
11420 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
11421 (code_as_string): Likewise.
11422 (language_as_string): Likewise.
11423 (parm_as_string): Likewise.
11424 (op_as_string): Likewise.
11425 (assop_as_string): Likewise.
11426 (cv_as_string): Likewise.
11428 * lex.c: Include output.h.
11430 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
11432 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
11435 * tinfo.cc (__class_type_info::dcast): Change the type of variable
11436 `i' from int to size_t.
11438 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
11441 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
11443 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
11444 DECL_NAMESPACE_SCOPE_P.
11445 (lang_decl_name): Likewise.
11446 * pt.c (tsubst_friend_function, tsubst): Likewise.
11447 * decl.c (pushdecl, redeclaration_error_message, start_decl,
11448 cp_finish_decl, start_function): Likewise.
11449 * class.c (finish_struct_1): Likewise.
11450 * call.c (build_over_call): Likewise.
11451 (compare_ics): Use DERIVED_FROM_P.
11453 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
11455 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
11456 * method.c (build_mangled_name): Use it.
11457 (build_decl_overload_real): Likewise.
11459 * error.c (dump_simple_decl): New function, broken out from ...
11460 (dump_decl): Use it.
11462 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
11464 * ptree.c (lang_print_xnode): Add missing `break'.
11466 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
11468 * call.c (add_template_candidate): Adjust for changes to
11469 fn_type_unification.
11470 (add_template_candidate_real): Likewise.
11471 (add_template_conv_candidate): Likewise.
11472 (build_user_type_conversion_1): Likewise.
11473 (build_new_function_call): Likewise.
11474 (build_object_call): Likewise.
11475 (build_new_op): Likewise.
11476 (build_new_method_call): Likewise.
11477 * class.c (instantiate_type): Likewise.
11478 * cp-tree.h (unification_kind_t): New type.
11479 (fn_type_unification): Adjust prototype.
11480 (type_unificaiton): Likewise.
11481 * pt.c (UNIFY_ALLOW_NONE): New macro.
11482 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
11483 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
11484 (UNIFY_ALLOW_DERIVED): Likewise.
11485 (unify): Change prototype.
11486 (maybe_adjust_types_for_deduction): New function.
11487 (check_cv_quals_for_unify): Likewise.
11488 (determine_specialization): Adjust.
11489 (fn_type_unification): Likewise.
11490 (type_unification): Likewise.
11491 (type_unification_real): Likewise. Use
11492 maybe_adjust_types_for_deduction. Fix mishandling of
11493 back-unification of template functions passed as arguments. Pass
11494 appropriate combination of UNIFY_ALLOW_* to unify.
11495 (unify): Remove unused NTPARMS parameter. Use
11496 check_cv_quals_for_unify. Remove bogus code that allowed
11497 too-generous unification in order to adhere more closely to standard.
11498 (get_bindings_real): Adjust.
11499 (get_class_bindings): Likewise.
11501 * method.c (build_overload_identifier): Only use the innermost
11502 template arguments when mangling.
11503 * pt.c (tsubst_template_argument_vector): New function.
11504 (complete_template_args): Deal with the situation where the
11505 extra_args contain more than one level of arguments.
11506 (lookup_template_class): Deal with member template classes, which
11507 may have more than one level of arguments.
11508 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
11509 Improve handling of member template classes. Use
11510 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
11511 tsubst_template_argument_vector where appropriate.
11512 (regenerate_decl_from_template): Break out from ...
11513 (instantiate_decl): Here.
11515 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
11516 * parse.h: Regenerated.
11517 * parse.c: Really regenerated.
11519 * cp-tree.h (finish_unary_op_expr): New function.
11520 (finish_id_expr): Likewise.
11521 (begin_new_placement): Likewise.
11522 (finish_new_placement): Likewise.
11523 (finish_declarator): Likewise.
11524 (finish_translation_unit): Likewise.
11525 (finish_parmlist): Likewise.
11526 (begin_class_definition): Likewise.
11527 (finish_class_definition): Likewise.
11528 (finish_default_args): Likewise.
11529 (finish_inline_definitions): Likewise.
11530 * parse.y (GCC_ASM_KEYWORD): Remove.
11531 (TYPENAME_ELLIPSIS): Likewise.
11532 * parse.c: Regenerated.
11533 Use new functions in semantics.c in the actions for many rules.
11534 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
11535 * hash.h: Regenerated.
11536 * semantics.c (finish_expr_stmt): Allow NULL expr.
11537 (finish_unary_op_expr): New function, containing
11538 code previously in parse.y.
11539 (finish_id_expr): Likewise.
11540 (begin_new_placement): Likewise.
11541 (finish_new_placement): Likewise.
11542 (finish_declarator): Likewise.
11543 (finish_translation_unit): Likewise.
11544 (finish_parmlist): Likewise.
11545 (begin_class_definition): Likewise.
11546 (finish_class_definition): Likewise.
11547 (finish_default_args): Likewise.
11548 (finish_inline_definitions): Likewise.
11550 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
11552 * typeck.c (build_c_cast): Don't decay arrays and functions to
11553 pointer type when converting to a class type.
11555 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
11557 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
11558 (DECL_CLASS_SCOPE_P): Likewise.
11560 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
11562 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
11563 * decl2.c (constructor_name_full): Likewise.
11565 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
11567 * tree.c (mapcar): Add OVERLOAD support.
11569 * init.c (resolve_offset_ref): We must use basetype_path before we
11570 destroy it with a call to convert_pointer_to.
11572 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
11574 * class.c (currently_open_class): New fn.
11575 * decl.c (lookup_name_real): Use it.
11576 * search.c (lookup_field): Likewise.
11578 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
11580 * cp-tree.def (OVERLOAD): New node.
11581 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
11582 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
11583 (NAMESPACE_BINDING): Remove.
11584 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
11586 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
11588 (tree_overload): New struct.
11589 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
11590 (REAL_IDENTIFIER_TYPE_VALUE): Define.
11591 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
11592 (lang_decl_flags): Remove in_namespace.
11593 (lang_decl): Remove chain.
11594 (DECL_CHAIN, DECL_NAMESPACE): Remove.
11595 (flag_honor_std): Declare extern.
11596 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
11597 namespace_binding, set_namespace_binding,
11598 lookup_function_nonclass, cat_namespace_levels,
11599 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
11600 scratch_ovl_cons, ovl_member, build_overload): Declare.
11601 (decl_list_length, get_namespace_id, current_namespace_id,
11602 overloaded_globals_p): Remove.
11603 (lookup_using_namespace, qualified_lookup_using_namespace): Change
11605 (push_scratch_obstack): New macro.
11606 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
11607 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
11609 (build_new_function_call): Iterate using OVL_CHAIN.
11610 Print DECL_NAME in when reporting ambiguities.
11611 (build_object_call): Iterate using OVL_NEXT for fns, convs.
11612 (build_new_op): Call lookup_function_nonclass.
11613 Iterate using OVL_NEXT.
11614 (build_op_delete_call): Change detection of members.
11615 Do not wrap TREE_LIST around fields and single global functions.
11616 (build_over_call): Don't push a class level if the context is a
11618 (build_new_method_call): Iterate using OVL_NEXT.
11619 * class.c (add_method): Chain overloaded members using
11620 build_overload. Remove copying of method.
11621 (grow_method): When iterating through the obstack, expect OVERLOAD
11622 nodes. Chain overload members.
11623 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
11624 nodes in call to get_baselinks.
11625 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
11626 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
11627 fdecls that are OVERLOAD nodes.
11628 (validate_lhs): New function.
11629 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
11630 code. Use DECL_NAME in error messages. Split code between global
11631 and member function processing.
11632 * decl.c (global_type_node): New static variable.
11633 (in_std): New global.
11634 (struct binding_level): New field usings.
11635 (resume_binding_level): Assert that we are not in a class.
11636 (toplevel_bindings_p): Just check for namespace_p or
11638 (resume_level): Remove.
11639 (find_binding): New function.
11640 (binding_for_name): Call it.
11641 (namespace_binding, set_namespace_binding): New functions.
11642 (push_namespace): Associate binding level with new namespace,
11643 resume_binding_level for existing namespace. Remove old code.
11644 Fake std by counting.
11645 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
11646 (maybe_push_to_top_level): Save current namespace.
11647 (pop_from_top_level): Restore saved namespace.
11648 (pop_namespace): Call suspend_binding_level. Remove old code.
11649 (cat_namespace_levels): New function.
11650 (set_identifier_type_value_with_scope): For namespace bindings,
11651 set BINDING_TYPE, and use global_type_node.
11652 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
11653 (identifier_type_value): New function.
11654 (pushtag): If no context, use current_namespace.
11655 (duplicate_decls): Don't process DECL_CHAIN.
11656 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
11657 already set. Never reset it to NULL_TREE. Lookup global variables
11658 in their namespace. Push overloaded templates if they are on
11660 (pushdecl_namespace_level): New function.
11661 (pushdecl_top_level): Implement using pushdecl_namespace_level.
11662 (pushdecl_using_decl): New function.
11663 (overloaded_globals_p): Remove.
11664 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
11665 them. Use namespace_binding and set_namespace_value.
11666 (redeclaration_error_message): Complain if the declarations come
11667 from different namespaces.
11668 (lookup_tag): On namespace level, look in the BINDING_TYPE.
11669 (lookup_namespace_name): Pass tree_bindings from stack. Remove
11671 (select_decl): New function.
11672 (lookup_name_real): Call it for qualified and unqualified lookup.
11673 Pass tree_bindings from the stack.
11674 If prefer_type is 1, also accept namespaces.
11675 (lookup_function_nonclass): New function.
11676 (init_decl_processing): Set the binding level of the global
11677 namespace to global_binding_level.
11678 Build a proper type list for __builtin_apply.
11679 Initialize std_node to "fake std" if flag_honor_std is set.
11680 Initialize global_type_node.
11681 Allocated bad_alloc in namespace std if flag_honor_std.
11682 (define_function): Set the DECL_CONTEXT to the current_namespace.
11683 (start_decl): A namespace is not considered as a context here. If
11684 the DECL_CONTEXT is a namespace, push the decl.
11685 (cp_finish_decl): Check for namespaces used as initializers.
11686 (grokfndecl): Add namespace parameter. Remove processing of
11688 (grokvardecl): Add namespace parameter.
11689 (grokdeclarator): Process SCOPEs that are namespaces. For
11690 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
11691 (start_function): Check for contexts that are namespaces.
11692 Set context for declarations that have not been pushed.
11693 (store_parm_decls): Check for ::main only.
11694 (finish_function): Likewise.
11695 (start_method): Check for contexts that are namespaces.
11696 (start_method): Remove DECL_CHAIN processing.
11697 * decl2.c (flag_honor_std): Declare.
11698 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
11699 (decl_namespace_list): New static global.
11700 (grok_x_components): Ignore namespaces as type contexts.
11701 (check_classfn): Expect OVERLOAD nodes.
11702 (grokfield): Remove DECL_CHAIN processing.
11703 (finish_file): Call cat_namespace_levels.
11704 (merge_functions): New function.
11705 (ambiguous_decl): Rewrite.
11706 (lookup_using_namespace): Produce tree_bindings.
11707 (qualified_lookup_using_namespace): Likewise.
11708 (set_decl_namespace, decl_namespace, current_decl_namespace,
11709 push_decl_namespace, pop_decl_namespace): New functions.
11710 (arg_lookup): New struct.
11711 (add_function, arg_assoc_namespace, arg_assoc_class,
11712 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
11714 (get_namespace_id, current_namespace_id): Remove.
11715 (do_toplevel_using_decl): Rewrite.
11716 (do_class_using_decl): Complain about namespace qualifiers.
11717 (do_using_directive): Sorry if not on namespace level. Complain
11718 about unknown namespaces.
11719 * error.c (dump_aggr_type): Check for namespace contexts.
11720 * except.c (init_exception_processing): Push terminate into std.
11721 * friend.c (is_friend): A namespace is not a context, here.
11722 * init.c (expand_member_init): Remove DECL_CHAIN processing.
11723 (build_offset_ref): Process OVERLOAD nodes.
11724 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
11725 * lex.c (identifier_type): Loop using OVL_CHAIN.
11726 (see_typename): Set looking_for_typename to 2.
11727 (real_yylex): Likewise.
11728 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
11729 (do_scoped_id): Expect OVERLOAD nodes.
11730 Change calling convention for qualified_lookup_using_namespace.
11731 (build_lang_decl): Don't set in_namespace anymore.
11732 * method.c (typevec_size): New global.
11733 (build_overload_nested_name): Return if global_namespace.
11734 Otherwise, always expect a declaration context.
11735 (build_qualified_name): Likewise.
11736 Make sure we don't write beyond typevec_size.
11737 (build_decl_overload_real): Likewise.
11738 Allocate one extra slot for the namespace.
11739 (hack_identifier): Mark code dead.
11740 Process OVERLOAD and NAMESPACE_DECL nodes.
11741 * parse.y (program): Pop namespaces until in global namespace.
11742 (extdef): In a using-declaration, don't discard the identifier if
11743 there is no declaration.
11744 (left_curly): Ignore type contexts which are namespaces.
11745 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
11747 * pt.c (template_class_depth): Expect types to be namespaces.
11748 (determine_specialization): Simplify by expecting OVERLOAD nodes.
11749 (push_template_decl): Push into namespace level.
11750 Reset ctx if it is a namespace.
11751 Set DECL_CONTEXT to current_namespace if not set already.
11752 Ignore real contexts that are namespaces.
11753 (mangle_class_name_for_template): Skip global_namespace.
11754 Mangle other namespaces as declarations.
11755 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
11756 (lookup_template_class): Push into namespace of context.
11757 If the context is a namespace, set it to global_namespace.
11758 Use id_context for mangling.
11759 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
11760 (tsubst_friend_function): Ignore namespace contexts.
11761 Push into namespace level.
11762 (tsubst): Handle NAMESPACE_DECL nodes.
11763 Remove DECL_CHAIN processing.
11764 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
11765 * ptree.c (print_lang_identifier): Print bindings.
11766 (lang_print_xnode): Print OVERLOAD nodes.
11767 * rtti.c (init_rtti_processing): Push type_info into std.
11768 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
11769 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
11770 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
11771 lookup_fnfields_here): Likewise.
11772 Process all nodes, instead of going through TREE_CHAIN.
11773 * sig.c (build_signature_pointer_or_reference_type): Set context
11774 to global_namespace.
11775 (build_signature_table_constructor): Expect OVERLOAD nodes.
11776 * spew.c (yylex): Save old setting of looking_for_typename.
11777 * tree.c (decl_list_length): Remove.
11778 (binding_init): New function.
11779 (count_functions): Rewrite.
11780 (is_overloaded_fn): Expect OVERLOAD nodes.
11781 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
11782 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
11783 ovl_member): New functions.
11784 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
11785 (type_unknown_p): Likewise.
11786 (require_instantiated_type): Likewise.
11787 (build_component_ref): Declare code dead.
11788 (build_x_function_call): Create and expect OVERLOAD nodes.
11789 (build_function_call_real): Check for ::main only.
11790 (build_unary_op): Likewise. Expect OVERLOAD nodes.
11791 (convert_for_assignment): Check for TREE_LIST before accessing
11793 * decl.c (duplicate_decls): Check for namespace bindings instead
11794 of global bindings.
11795 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
11796 lookup_name_current_level, start_decl, xref_tag,
11797 finish_enum): Likewise.
11798 * init.c (build_offset_ref): Likewise.
11799 * search.c (lookup_field): Likewise.
11800 (lookup_fnfields): Likewise.
11801 (dfs_debug_mark): Likewise.
11802 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
11803 (poplevel_class, pop_from_top_level): Likewise.
11804 * decl2.c (finish_method): Likewise.
11805 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
11806 * decl.c (record_builtin_type): Likewise.
11807 (init_decl_processing, grokfndecl): Likewise.
11808 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
11809 (make_lang_type): Likewise.
11810 * parse.y (make_thunk): Likewise.
11811 * pt.c (tsubst): Likewise.
11812 * tree.c (debug_binfo): Likewise.
11813 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
11814 tinfo2.cc, inc/new.h: Add std qualifications.
11815 * inc/new: Wrap with namespace std if __HONOR_STD.
11816 * inc/typeinfo: Likewise.
11818 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
11820 * call.c (build_user_type_conversion_1): Handle second_conv
11821 properly for templates.
11823 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
11825 * method.c (build_decl_overload_real): Set TREE_USED flag to
11826 zero for build_type_variants nodes as well.
11828 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
11830 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
11832 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
11834 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
11835 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
11836 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
11837 xref.o): Add toplev.h dependencies.
11839 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
11841 * errfn.c (cp_error, cp_warning): Remove declarations for
11842 error and warning respectively.
11844 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11846 * error.c: Convert to using ctype macros defined in system.h.
11847 * method.c: Likewise.
11848 * xref.c: Likewise.
11849 * lex.c: Likewise. Also remove redundant system header stuff.
11851 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
11853 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
11854 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
11855 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
11856 xref.c: Add include of toplev.h.
11858 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
11860 * tree.c (perm_manip): Also regenerate the RTL of an extern.
11861 (copy_to_permanent): Use end_temporary_allocation.
11863 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
11865 * init.c (expand_vec_init): The initialization of each array
11866 element is a full-expression.
11868 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
11870 * method.c (build_mangled_name): Add a call to build_type_variant
11871 to get the right type.
11873 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
11875 * Makefile.in: Add .SUFFIXES.
11877 * cp-tree.def: Remove NAMESPACE_DECL.
11879 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
11881 * call.c (build_over_call): Do evaluate arg even if it has empty
11883 * decl.c (start_function): Don't push a member function.
11885 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
11887 * Makefile.in (g++FAQ.info): Put -o option before input file.
11889 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
11891 * gxxint.texi: Add info for squangling codes K and B.
11893 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
11895 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
11896 the expression in templates.
11897 (finish_stmt_expr): Likewise.
11899 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
11901 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
11903 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
11905 * decl.c (maybe_push_to_top_level): Always clear
11906 current_template_parms and processing_template_decl.
11907 (pushtag): Remove check of current_class_type and some comments,
11908 since maybe_push_to_top_level no longer creates confusion.
11910 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
11912 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
11913 (DECL_CLASS_TEMPLATE_P): Likewise.
11914 (DECL_PRIMARY_TEMPLATE): Likewise.
11915 (PRIMARY_TEMPLATE_P): Use it.
11916 (push_template_decl_real): New function.
11917 (redeclare_class_template): Take new template parameters as
11919 (is_specialization_of): New function.
11920 (comp_template_args): Declare.
11921 * decl.c (pushtag): Handle friend template classes.
11922 (xref_tag): Likewise. Use new calling convention for
11923 redeclare_class_template.
11924 * decl2.c (grok_x_components): Handle friend templates.
11925 * friend.c (is_friend): Use is_specialization_of where
11926 appropriate. Deal with friend class templates.
11927 (make_friend_class): Let a class template be friends with itself.
11928 * pt.c (comp_template_args): Remove declaration.
11929 (tsubst_friend_class): New function.
11930 (push_template_decl_real): New function.
11931 (push_template_decl): Use it.
11932 (redeclare_class_template): Adjust for new calling convention.
11933 (comp_template_args): Give it external linkage.
11934 (instantiate_class_type): Use tsubst_friend_class to deal
11935 with friend templates.
11936 * typeck.c (comptypes): Use comp_template_args, rather than
11937 expanding it inline.
11938 * parse.y (component_decl): Handle a nested template type
11939 like other component type declarations.
11941 * pt.c (check_explicit_specialization): Handle overloaded
11942 constructors correctly.
11944 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
11945 (lookup_template_class): Use it.
11947 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
11949 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
11950 * cp-tree.h: Add WRAPPER support.
11951 * call.c (add_candidate): Split out from add_*_candidate fns.
11952 (build_over_call): Take the candidate instead of function and args.
11953 Enforce access control here. Emit overload warnings here.
11954 (add_warning): New fn.
11955 (joust): Add WARN parm. If not set, call add_warning instead of
11956 printing a warning. Re-enable some warnings.
11957 (tourney): Pass it.
11958 (convert_like): Adjust.
11959 (build_new_op): Adjust.
11960 (build_new_function_call): Adjust.
11961 (build_user_type_conversion_1): Adjust.
11962 (USER_CONV_FN): Adjust.
11963 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
11964 build_int_wrapper): New fns.
11966 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
11968 * pt.c (unify): Fix typo in previous change.
11970 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
11972 * error.c (dump_type_real): Declare canonical_name.
11974 * typeck.c (comp_target_types): Fix PMFs.
11976 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
11978 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
11979 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
11982 * pt.c (tsubst): Decrease the template-level of
11983 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
11984 TEMPLATE_PARM_INDEX.
11985 (template_decl_level): New function.
11986 (unify): Make sure to record unifications for template
11987 parameters, even when the parameters exactly match the arguments.
11988 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
11989 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
11990 aren't from the level we're currently working on.
11992 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
11994 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
11996 * decl2.c (check_member_template): Set DECL_IGNORED for member
11997 class templates, too.
11999 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
12001 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12003 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
12005 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
12007 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
12008 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
12009 (init_decl_processing): Handle TI types.
12010 * typeck.c (unsigned_type, signed_type): Handle TI types.
12012 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
12014 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
12015 New local added_libraries. Increment count when add library to
12018 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
12020 * cp-tree.h (type_as_string_real): New function.
12021 * pt.c (mangle_class_name_for_template): Use it.
12022 * error.c (dump_aggr_type): Change prototype.
12023 (dump_type_prefix): Likewise.
12024 (dump_type_suffix): Likewise.
12025 (dump_type_real): Convert from dump_type. If desired, the
12026 "canonica" name of a typedef, i.e., the name of the underlying
12027 type, can be printed.
12028 (dump_type): Call dump_type_real.
12030 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
12032 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
12034 * typeck.c (comp_target_types): Tweak pedantic case.
12035 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
12036 Return -1 or 1 instead of 1 or 2.
12037 (compparms): Remove STRICT handling.
12038 (convert_for_assignment): Fix handling of pmfs.
12040 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
12042 * typeck.c (comp_target_types): Handle references like pointers.
12043 (comp_target_parms): Note that return code from comp_target_types
12044 can be negative to indicate failure.
12046 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12048 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
12049 which requires a working target compiler to build.
12051 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
12053 * tree.c (avoid_overlap): Add prototype.
12055 * spew.c (num_tokens): Add prototype.
12056 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
12058 * search.c (dfs_check_overlap): Add prototype.
12059 (dfs_no_overlap_yet): Likewise.
12061 * pt.c (original_template): Add prototype.
12062 (inline_needs_template_parms): Likewise.
12063 (push_inline_template_parms_recursive): Likewise.
12064 (retrieve_specialization, register_specialization): Likewise.
12065 (print_candidates, reduce_template_parm_level): Likewise.
12066 (build_template_decl, mark_template_parm): Likewise.
12067 (tsubst_friend_function, get_bindings_real): Likewise.
12069 * method.c (start_squangling): Add prototype.
12070 (end_squangling, check_ktype, issue_ktype): Likewise.
12071 (build_overloaded_scope_ref, check_btype): Likewise.
12072 (build_mangled_template_parm_index): Likewise.
12074 * lex.c (init_cpp_parse): Add prototype.
12075 (handle_cp_pragma, handle_sysv_pragma): Likewise.
12076 (reduce_cmp, token_cmp): Likewise.
12078 * except.c (call_eh_info): Add prototype.
12079 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
12080 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
12082 * decl2.c (is_namespace_ancestor): Add prototype.
12083 (namespace_ancestor, add_using_namespace): Likewise.
12084 (ambiguous_decl): Likewise.
12086 * decl.c (indent): Add prototype.
12088 * call.c (add_template_candidate_real): Add prototype.
12090 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
12092 * decl2.c (build_expr_from_tree): Just return a PMF.
12094 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
12096 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
12097 when doing initializations.
12099 * pt.c (unify): Use comptypes to compare type args.
12101 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
12103 * decl.c (duplicate_decls): Fix check for when it's safe to free
12106 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
12109 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
12111 * pt.c (build_template_parm_index): Add prototype.
12113 * search.c (my_tree_cons): Don't clear words outside the
12114 newly allocated node.
12116 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
12118 * lex.c (init_parse): Now returns char* containing the filename.
12120 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
12121 Jeff Law <law@cygnus.com>
12123 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
12126 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12128 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
12130 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
12132 * decl.c (duplicate_decls): Don't warn for redundant decls if
12133 friend: let add_friend take care of it.
12135 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
12137 * sig.c (build_signature_pointer_constructor): Don't set
12138 TREE_HAS_CONSTRUCTOR for a signature pointer.
12139 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
12140 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
12142 * typeck.c (build_unary_op): Only allow taking the address of a
12144 * typeck2.c (digest_init): Simplify.
12145 (store_init_value): Don't pedwarn about using { } for pmfs.
12147 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
12149 * cp-tree.h (start_decl): Update prototype.
12150 * decl.c (start_decl): Like the C version, new parameters
12151 for the attributes. Call cplus_decl_attributes here,
12152 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
12153 (grokdeclarator): Pass NULL for new start_decl arguments.
12154 * pt.c (tsubst_expr): Likewise.
12155 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
12156 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
12157 * lex.c (build_lang_decl): Add lang_name_java.
12158 * class.c (push_lang_context): Add lang_name_java.
12159 * method.c (build_mangled_name): Check for is_java_type.
12161 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
12163 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
12164 * call.c (build_scoped_method_call): Check for TREE_CODE for
12165 VOID_TYPE instead of type == void_type_node.
12166 (build_method_call): Likewise.
12167 * decl.c (lookup_name_real): Likewise.
12168 (grokdeclarator): Likewise.
12169 (start_decl): Likewise.
12170 (grokparms): Likewise.
12171 (start_function): Likewise.
12172 (finish_function): Likewise.
12173 (start_method): Likewise.
12175 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
12177 * lex.c (finput): New variable.
12178 (init_cpp_parse): Renamed from init_parse.
12179 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
12180 (finish_parse): New function.
12181 * cp-tree.h (init_lex, init_parse): Remove declarations.
12183 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
12185 * call.c (build_call): Still evaluate the actual argument.
12186 * class.c (is_empty_class): Update for -fnew-abi.
12188 * decl2.c: -fnew-abi implies -fsquangle.
12190 * method.c (do_build_assign_ref): Don't do anything to copy
12192 (do_build_copy_constructor): Likewise.
12193 * call.c (build_over_call): Likewise.
12195 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
12197 * tree.c (avoid_overlap): Return a value.
12199 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
12201 * method.c (check_btype): Add missing argument to xrealloc.
12202 (check_ktype): Likewise.
12204 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
12206 Implement empty base optimization.
12207 * class.c (finish_struct_1): Add vbase fields earlier. Set
12208 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
12209 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
12210 (types_overlap_p): New fn.
12211 * tree.c (avoid_overlap): New fn.
12212 (build_base_fields): Use it to avoid overlapping empty bases.
12213 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
12215 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
12217 Re-implement allocation of base class subobjects.
12218 * tree.c (unshare_base_binfos): New fn.
12219 (layout_basetypes): Use it. Now handles offsets of both virtual and
12220 non-virtual bases, after layout_type.
12221 (layout_vbasetypes): Remove.
12222 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
12223 (build_vbase_pointer_fields): Split out from old layout_basetypes.
12224 * class.c (finish_base_struct): Lose offset handling code.
12225 Move nonvdtor warning here. Don't mess with t_binfo anymore.
12226 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
12227 * cp-tree.h: Adjust.
12229 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
12231 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
12232 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
12233 * class.c (duplicate_tag_error): Likewise.
12234 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
12235 * tree.c (layout_vbasetypes): Update from layout_record, remove
12236 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
12237 (layout_basetypes): Likewise.
12239 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
12241 * class.c, Make sure system.h is included just after config.h.
12242 Delete lingering stdio and errno references too.
12243 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
12245 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
12247 * friend.c (is_friend): Fix access control for local classes.
12249 * class.c (is_empty_class): New fn.
12250 * call.c (build_call): Don't pass empty class objects to a function.
12252 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
12254 * call.c (build_over_call): Do name resolution for default
12255 arguments of function templates in the scope of the templates.
12257 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
12259 * call.c: Include system.h. Remove includes, declarations and
12260 defines provided by system.h.
12261 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
12262 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
12263 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
12264 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
12265 * typeck2.c, xref.c: Likewise.
12266 * Makefile.in: Dependencies updated as appropriate.
12267 * Make-lang.in: Likewise.
12269 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
12271 * pt.c (fn_type_unification): Allow incomplete unification without
12272 an immediate error message.
12274 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
12276 * tree.c (member_p): New fn.
12277 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
12278 initializing class members.
12280 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
12281 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
12283 * call.c (build_method_call): Handle non-scoped destructors, too.
12284 * pt.c (tsubst_copy): Likewise.
12286 * pt.c (print_template_context): Split out...
12287 (push_tinst_level): ...from here.
12289 * friend.c (is_friend): Don't pass a type to decl_function_context.
12291 * typeck.c (convert_for_initialization): Always hand off
12292 conversions to class type.
12294 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
12296 * friend.c (is_friend): Local classes have the same access as the
12297 enclosing function.
12299 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
12301 * typeck.c (expand_target_expr): Delete dead function.
12303 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
12305 * repo.c (save_string): Delete dead function.
12307 * method.c (thunk_printable_name): Delete dead function.
12309 * lex.c (yynextch): Delete dead function.
12311 * expr.c (tree_extract_aggr_init): #if 0 out.
12313 * except.c (do_unwind): Delete dead function.
12314 (easy_expand_asm): Likewise.
12316 * cvt.c (build_conversion_type_1): Delete dead function.
12318 * cp-tree.h (push_expression_obstack): Declare.
12320 * call.c (source_type): #if 0 out.
12322 * class.c (alter_access): Remove unused label. Add braces
12323 around empty else clause.
12325 * lex.c (yyprint): Fix argument to printf.
12327 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
12329 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
12331 * pt.c (instantiate_class_template): Make sure template
12332 arguments are permanent.
12333 * init.c (resolve_offset_ref): Don't go looking around in
12336 * semantics.c: Add routines to handle expressions, and some
12337 declaration processing.
12338 * parse.y: Use them.
12339 (current_class_depth): Move declaration to cp-tree.h.
12340 * parse.c: Regenerated.
12341 * cp-tree.h: Use them.
12342 (current_class_depth): Declare.
12343 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
12345 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
12347 * error.c (dump_decl): Be a bit more explicit with template
12348 type arguments, when verbose.
12350 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
12352 * inc/exception: Reorder closing braces.
12354 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
12356 * pt.c (redeclare_class_template): New function.
12357 * cp_tree.h (redeclare_class_template): Declare it.
12358 * decl.c (xref_tag): Use it.
12360 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
12362 * call.c (build_over_call): Check IS_AGGR_TYPE, not
12363 TYPE_LANG_SPECIFIC.
12364 * typeck.c (convert_arguments): Likewise.
12366 * decl.c (grokdeclarator): Remove const and volatile from type after
12367 setting constp and volatilep.
12369 * class.c (finish_struct_1): Don't warn about bool bitfield larger
12372 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
12374 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
12376 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
12378 * call.c (build_object_call): Complain about ambiguous operator(),
12379 rather that crashing.
12380 (build_new_op): Likewise.
12381 (build_op_delete_call): Likewise.
12383 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
12385 * cvt.c (perform_qualification_conversions): Use comp_target_types
12386 instead of comp_ptr_ttypes.
12388 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
12390 * cp-tree.h (enforce_access): Declare.
12391 * call.c (enforce_access): Make it extern, not static.
12392 * class.c (alter_access): Use enforce_access; modify code for ISO
12393 compliance, rather than ARM rules.
12395 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12397 * cp-tree.h: Fix typo.
12399 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
12401 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
12402 if (aggregate_value_p (type)).
12404 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
12406 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
12408 * tree.c (mapcar): When dealing with a DECL, use it's constant
12410 * pt.c (lookup_template_class): Don't mangle the names of template
12411 classes whose arguments are unknown.
12413 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
12415 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
12417 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
12419 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
12421 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
12422 boolean_type_node to 1.
12424 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
12426 * error.c (dump_expr): Remove unused variable `l'.
12428 * pt.c (for_each_template_parm): New function, created by
12429 converting uses_template_parms.
12430 (tree_fn_t): New typedef.
12431 (uses_template_parms): Use it.
12432 (mark_template_parm): New function.
12433 (push_template_decl): Check that the argument list of a partial
12434 specialization uses all the template parameters.
12436 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
12437 with it; we might want it for debugging.
12438 * cp-tree.h (type_unification): Change interface.
12439 * class.c (finish_struct_1): Skip nested template types, just like
12440 ordinary nested types.
12441 (instantiate_type): Use new interface to type_unification.
12442 * lex.c (init_lex): Add __sz as opname for sizeof.
12443 * method.c (build_overload_scope_ref): New function.
12444 (build_overload_int): Handle complex expressions. Set
12445 numeric_output_need_bar if necessary.
12446 (build_overload_value): Handle non-PARM_DECL nodes; this
12447 routine is now used by build_overload_int. Remove some
12448 assignments to numeric_output_need_bar. Use
12449 build_overload_scope_ref.
12450 (build_qualified_name): Note that some template mangled names end
12451 with digits, and set numeric_output_need_bar appropriately. Use
12452 build_underscore_int.
12453 * pt.c (unify): Change interface.
12454 (type_unification_real): Likewise.
12455 (determine_specialization): Use new interfaces.
12456 (tsubst): Deal gracefully with situations in which the argument
12457 vector is not fully filled.
12458 (fn_type_unification): Use new interfaces.
12459 (type_unification): Likewise. Remove NOP_EXPR hack.
12460 (type_unification_real): Likewise.
12461 (unify): Likewise. Deal with unification of complex expressions.
12463 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
12465 * pt.c (complete_template_args): Initialize skip properly.
12467 * decl.c (make_typename_type): Revert.
12468 (make_implicit_typename): Remove.
12469 (lookup_name_real): Don't call it. Call lookup_field if we see a
12470 TYPE_DECL from a template base.
12471 * search.c (lookup_field): Do implicit typename stuff.
12473 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
12474 Geoff Noer <noer@cygnus.com>
12476 * Makefile.in: Various fixes for building cygwin32 native toolchains.
12477 * Make-lang.in: Likewise.
12479 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12481 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
12483 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
12485 * decl.c (make_implicit_typename): Rewrite removed code.
12486 (make_typename_type): Call it if the type we look up comes from
12487 a base that uses template parms.
12489 * pt.c (complete_template_args): Rewrite.
12490 (tsubst, FUNCTION_DECL): Use it.
12492 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
12494 * semantics.c (finish_asm_stmt): Fix combine strings. Call
12495 c_expand_asm_operands () if output_operands, input_operands or
12496 clobbers is not NULL_TREE.
12498 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12500 * pt.c (complete_template_args): New function.
12501 (get_bindings): Deal with specializations of function templates
12502 with return type containing parameters from outer class
12504 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
12505 substitute arguments and compose a new type.
12507 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
12509 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
12512 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
12514 * decl.c (make_implicit_typename): Lose useless code.
12516 * call.c (standard_conversion): Handle A* -> const A* properly.
12518 * pt.c (get_bindings_real): Rename from get_bindings. Add
12519 check_rettype parm.
12520 (get_bindings): Pass 1.
12521 (get_bindings_overload): Pass 0.
12523 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
12525 * pt.c (check_explicit_specialization): When reverting a static
12526 member function, also remove the `this' parameter from
12527 last_function_parms.
12529 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
12531 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
12532 a function context.
12534 * decl.c (store_bindings): Use free_binding_vecs.
12535 (pop_from_top_level): Likewise.
12537 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
12539 * decl.c (make_implicit_typename): Only change the type of a
12542 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
12544 * semantics.c: New file, containing routines to perform the
12545 semantic phase of parsing.
12547 * pt.c (tsubst_expr): Likewise.
12548 * cp-tree.h: Declare the various functions in semantics.c.
12549 Provide macros to access _STMT tree nodes.
12550 * cp-tree.def: Add ASM_STMT tree node.
12551 * Makefile.in, Make-lang.in: Add dependencies on and for
12554 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
12556 * pt.c (push_template_decl): Only check primary templates.
12558 * pt.c (check_explicit_specialization): Complain about default args
12559 in explicit specialization.
12561 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
12562 constructor_declarator.
12564 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
12566 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
12567 has no overloaded operator ->.
12569 * call.c (build_field_call): Don't crash when presented with a
12570 field that is actually a nested type.
12572 * decl.c (pushtag): Deal with friend class injection in local
12575 * call.c (build_object_call): Don't crash if OBJ is a
12576 pointer-to-member-function.
12578 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
12580 * pt.c (push_template_decl): Complain about template with C linkage,
12581 anonymous template class.
12583 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
12585 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
12586 * search.c: Likewise.
12588 * lex.c (do_pending_defargs): Only call
12589 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
12591 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
12593 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
12595 * parse.y: Deal with CONSTRUCTORS in new_initializers.
12597 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
12599 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
12600 closely mimics the behavior in parse.y.
12601 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
12602 into a compound statement.
12604 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
12606 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
12607 * pt.c (inline_needs_template_parms): New fn.
12608 (original_template): New fn.
12609 (push_inline_template_parms_recursive): New fn.
12610 (maybe_begin_member_template_processing): Use them.
12611 (maybe_end_member_template_processing): Likewise.
12612 (is_member_or_friend_template): Rename to is_member_template.
12613 Member functions of local classes are never member templates.
12615 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12617 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
12618 added in the class scope to catch redefinition error.
12620 * pt.c (reduce_template_parm_level): Also copy
12621 the DECL_TEMPLATE_PARMS field.
12623 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
12625 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
12626 reduced-level template type parameter.
12628 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
12630 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
12631 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
12632 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
12633 * decl.c (duplicate_decls): Propagate it.
12634 * typeck2.c (abstract_virtuals_error): Use two loops to emit
12635 abstract virtual functions and virtual functions which need a
12636 final overrider separately.
12638 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
12640 * lang-specs.h: Properly put brackets around array elements in
12643 * typeck.c (build_binary_op_nodefault): Correctly place parens around
12644 && and || in expression.
12646 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
12648 * call.c (default_parm_conversions): Remove prototype definition.
12649 (build_method_call): Remove unused variable result.
12651 * cvt.c (ocp_convert): Remove unused variable conversion.
12653 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
12655 * except.c (do_unwind): #if 0 definition of unused variables fcall
12658 * expr.c (extract_scalar_init): #if 0 prototype and function
12661 * init.c (expand_aggr_init_1): Remove unused variable init_type.
12662 (build_new_1): Remove unused variable t.
12664 * pt.c (instantiate_class_template): Remove unused variable newtag;
12665 cast called function return value to void.
12666 (do_decl_instantiation): Remove unused variables name and fn.
12668 * tree.c (get_type_decl): Add default return to shut up compiler from
12669 complaining control reaches end of non-void function.
12671 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
12673 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
12675 * call.c (default_parm_conversions): Remove prototype definition.
12676 (build_method_call): Remove unused variable result.
12677 (build_over_call): Add default case in enumeration switch.
12679 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
12681 * decl2.c (lang_decode_option): Change j's type to size_t.
12683 * tree.c (layout_vbasetypes): record_align and desired_align are of
12684 type unsigned int; const_size and nonvirtual_const_size likewise.
12686 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
12688 * parse.y (new_initializer): Make sure all initializers are
12691 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
12693 * decl2.c (import_export_decl): Mark tinfo functions for
12694 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
12696 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
12698 * method.c: Fix typo.
12700 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12702 * method.c: Include "system.h" to get stdlib.h, stdio.h,
12703 ctype.h, string.h, etc.
12704 (issue_nrepeats): Add default case in enumeration switch.
12705 (check_btype): Likewise.
12706 (process_overload_item): Likewise.
12708 * Makefile.in (method.o): Depend on system.h.
12710 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12712 * lex.c (do_scoped_id): Fix parenthesizing.
12714 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
12716 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
12717 FLAG_RTTI is unset, initialize type info machinery and continue
12718 with FLAG_RTTI enabled.
12719 (get_typeid): Likewise.
12721 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
12723 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
12726 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
12728 * pt.c (finish_member_template_decl): Deal more gracefully with
12729 invalid declarations.
12731 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
12733 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
12734 cp-tree.h: Clean up more old overloading code, old RTTI code, and
12735 some formatting quirks.
12737 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
12738 method.c, pt.c, ptree.c, typeck.c: Remove support for
12739 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
12741 * Makefile.in: Adjust.
12743 * pt.c (unify): Don't allow reduced cv-quals when strict.
12745 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
12746 *type_unification* and unify.
12748 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
12750 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
12751 (nested_name_specifier): And add it before this use.
12752 (typename_sub0): And this use. Also add use without the keyword.
12753 (typename_sub1): Likewise.
12754 * pt.c (instantiate_class_template): Don't actually instantiate
12755 anything if our type uses template parms.
12757 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
12759 * decl.c (start_function): Don't call temporary_allocation for a
12762 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
12764 * pt.c (instantiate_class_template): Don't mess with friends if
12765 our type uses template parms.
12767 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
12769 * parse.y (nested_name_specifier): Use explicit_template_type.
12770 (typename_sub): Allow a template_type, an explicit_template_type,
12771 or an implicit template type at the end.
12772 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
12773 * decl.c (make_typename_type): Handle template-id where the name
12774 is a TEMPLATE_DECL.
12775 * call.c (build_scoped_method_call): Handle member template
12777 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
12778 destructor is represented by the type.
12780 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
12781 * parse.y (nested_name_specifier): Add 'template' case.
12782 (explicit_template_type): New rule.
12783 (typename_sub): Use it.
12784 * decl.c (make_typename_type): Handle getting a template-id for NAME.
12785 * pt.c (tsubst): Likewise.
12787 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
12789 * pt.c (add_to_template_args): Fix thinko.
12790 (instantiate_class_template): Call it later.
12792 * pt.c (get_class_bindings): Add outer_args parm.
12793 (most_specialized_class): Likewise.
12794 (instantiate_class_template): Pass it.
12795 (more_specialized_class): Likewise.
12796 (lookup_template_class): Get context from template if none
12798 (finish_member_template_decl): Don't do anything with a
12799 partial specialization.
12800 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
12802 * class.c (finish_struct): Member class templates have already been
12803 checked for name clashes.
12804 * decl.c (pushdecl_with_scope): Handle pushing at class level.
12806 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
12808 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
12809 (tsubst, *_PARM): Support multiple levels of template classes.
12810 (instantiate_class_template): Look up the pattern from the
12812 (lookup_template_class): Handle getting a template for d1.
12813 (push_template_decl): Correct setting of 'primary'.
12814 (reduce_template_parm_level): Add 'levels' parm.
12815 (finish_member_template_decl): Support member class templates.
12816 (template_class_depth): Handle multiple levels.
12817 * parse.y (component_decl_1, fn.def2): Remove member template case.
12818 (component_decl): Add member template cases.
12819 * decl2.c (check_member_template): We now handle member template
12821 * decl.c (pushtag): Handle member templates.
12822 * method.c (do_inline_function_hair): Don't touch
12823 IDENTIFIER_GLOBAL_VALUE.
12824 * init.c (build_offset_ref): If name isn't an identifier, just
12826 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
12828 * typeck.c (get_delta_difference): Do adjust for conversions to
12829 and from virtual base.
12831 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
12833 * typeck.c (get_delta_difference): Give hard error for conversion
12836 * cp-tree.h: Tweak formatting.
12838 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
12840 * decl.c (push_namespace): Handle redeclaration error.
12842 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
12843 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
12844 (NAMESPACE_BINDING): New macro.
12845 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
12848 * pt.c (push_template_decl): Use innermost_args.
12850 * decl.c (get_unique_name): Tweak from earlier in the name.
12852 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
12854 * cp-tree.def: Add CPLUS_BINDING node.
12855 * cp-tree.h (tree_binding): New struct.
12856 (BINDING_SCOPE, BINDING_VALUE): New macros.
12857 (current_namespace, global_namespace): Declare extern.
12858 (struct lang_decl_flags): New field in_namespace.
12859 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
12860 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
12861 (TREE_INDIRECT_USING): New macro.
12862 * decl2.c (current_namespace, global_namespace): Declare. The
12863 value is a NAMESPACE_DECL now, not a TREE_LIST.
12864 (is_namespace_ancestor, namespace_ancestor): New static functions.
12865 (add_using_namespace, ambiguous_decl): Likewise.
12866 (lookup_using_namespace): New support function for lookup_name.
12867 (qualified_lookup_using_namespace): New support function for
12868 do_scoped_id and lookup_namespace_name.
12869 (get_namespace_id): Mark as obsolete.
12870 (current_namespace_id): Likewise.
12871 (do_namespace_alias): Implement.
12872 (do_using_directive): Implement as call to add_using_namespace.
12873 * decl.c (binding_for_name): New function.
12874 (push_namespace, pop_namespace): Implement.
12875 (push_decl): Don't install a FUNCTION_DECL in the global branch.
12876 (lookup_namespace_name): Implement using qualified lookup.
12877 (lookup_name_real): For global scoping, lookup in
12878 global_namespace. For namespace scoping, lookup in given
12879 namespace. For unscoped lookup, iterate over namespace,
12880 considering using directives.
12881 (init_decl_processing): Initialize global_namespace.
12882 (grokvardecl): Build assembler name as static name for globals.
12883 (grokdeclarator): Remove old namespace mangling.
12884 (xref_tag): When installing a global binding for the
12885 tag, make sure we have an identifier.
12886 * method.c (build_overload_nested_name): Mangle namespaces.
12887 (build_qualified_name): Likewise.
12888 (build_decl_overload_real): Likewise.
12889 * lex.c (build_lang_decl): Set namespace for new declaration to
12891 (do_scoped_id): Find global names in global or current
12892 namespace, or using qualified namespace lookup, depending on
12894 * init.c (build_member_call): When scope is namespace, use
12895 build_x_function_call instead.
12896 (build_offset_ref): When scope is namespace, collapse processing
12897 to lookup_namespace_name instead.
12898 * error.c (dump_decl): Support NAMESPACE_DECL.
12899 * decl.c (pushdecl): Bind globals to current namespace.
12900 (push_overloaded_decl): Likewise.
12901 (lookup_tag): Likewise.
12902 (lookup_name_current_level): Likewise.
12903 (xref_tag): Likewise.
12904 (start_function): Likewise.
12905 * lex.c (do_identifier): Likewise.
12906 (identifier_typedecl_value): Likewise.
12907 (real_yylex): Likewise.
12908 * method.c (do_inline_function_hair): Likewise.
12909 * parse.y (unscoped): Likewise.
12910 * pt.c (check_explicit_specialization): Likewise.
12911 (lookup_template_class): Likewise.
12912 * rtti.c (call_void_fn): Likewise.
12913 * sig.c (build_sigtable): Likewise.
12914 * ptree.c (lang_print_xnode): New function.
12916 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
12918 * pt.c (instantiate_class_template): Don't instantiate if pedantic
12919 and the args use template parms.
12921 * pt.c (push_tinst_level): If the instantiation uses template parms,
12923 * decl.c (xref_basetypes): Do call complete_type for basetypes
12924 that involve template parameters.
12926 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
12928 * typeck2.c (process_init_constructor): Fix labeled init check.
12930 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
12932 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
12933 argument to tsubst and friends.
12935 * pt.c (tsubst, FUNCTION_DECL): Tidy.
12937 * typeck.c (build_x_function_call): Handle static member function
12938 templates like non-templates. Handle friend templates like normal
12939 function templates.
12940 * pt.c (tsubst, *_PARM): Don't use orig_level.
12941 (get_bindings): Don't call add_to_template_args.
12942 (instantiate_template): Likewise.
12943 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
12944 * ptree.c (print_lang_type): Print index/level for template parms.
12946 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
12948 * Make-lang.in (cc1plus): Note that cc1plus depends on
12949 cp/cp-tree.h and cp/cp-tree.def.
12951 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
12952 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
12953 position in a template parameter list.
12954 * cp-tree.h (template_parm_index): New structure, used as the tree
12955 structure for a TEMPLATE_PARM_INDEX.
12956 (TEMPLATE_PARM_IDX): New macro.
12957 (TEMPLATE_PARM_LEVEL): Likewise.
12958 (TEMPLATE_PARM_DESCENDANTS): Likewise.
12959 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
12960 (TEMPLATE_PARM_DECL): Likewise.
12961 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12962 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
12963 (TEMPLATE_TYPE_DECL): Likewise.
12964 (TEMPLATE_CONST_IDX): Remove.
12965 (TEMPLATE_CONST_LEVEL): Likewise.
12966 (TEMPLATE_CONST_SET_INFO): Likewise.
12967 (TEMPLATE_TYPE_SET_INFO): Likewise.
12968 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
12970 (TEMPLATE_TYPE_LEVEL): Likewise.
12971 * decl.c (decls_match): Call comp_template_parms, rather than
12972 expanding it inline.
12973 (duplicate_decls): If two template declarations are being merged,
12974 then their TEMPLATE_INFOs should be merged as well.
12975 (grokfndecl): Save template-id information when declaring a friend
12976 with explicit template arguments. Pass arguments to
12977 check_explicit_specialization via correct convention; at some
12978 point check_explicit_specialization changed, but these call-sites
12980 (grokdeclarator): Tidy up slightly.
12981 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
12982 two template functions with the same DECL_ASSEMBLER_NAME the same,
12983 since the names are not yet mangled.
12984 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
12985 TEMPLATE_CONST_PARM.
12986 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
12987 decl for a non-type parameter, rather than printing `<tparm ...>'.
12988 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
12989 (do_friend): Deal with template friends.
12990 * lex.c (do_pending_inlines): Call
12991 maybe_begin_member_template_processing, rather than
12992 conditionally calling begin_member_template_processing.
12993 (process_next_inline): Likewise. Call
12994 maybe_end_member_template_processing, rather than
12995 conditionally calling end_member_template_processing.
12996 (do_pending_defargs): Likewise.
12997 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
12998 TEMPLATE_CONST_PARM.
12999 * method.c (build_mangled_template_parm_index): New function.
13000 (build_overload_value): Use it.
13001 (build_overload_name): Likewise.
13002 * pt.c (finish_member_template_decl): Allow friend declarations.
13003 (template_class_depth): New function.
13004 (is_member_template): Rename, and modify, to become...
13005 (is_member_or_friend_template): New function.
13006 (end_member_template_processing): Rename, and modify, to become...
13007 (maybe_end_member_template_processing).
13008 (build_template_parm_index): New function.
13009 (reduce_template_parm_level): New function.
13010 (process_template_parm): Modify to use build_template_parm_index.
13011 (push_template_decl): Deal with friend templates.
13012 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
13013 TEMPLATE_CONST_PARM.
13014 (tsubst_friend_function): New function.
13015 (instantiate_class_template): Generate the DECL_FRIENDLIST
13016 for a new instantiation by using tsubst_friend_function rather
13018 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
13019 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
13020 appropriate new macros. Use reduce_template_parm_level to
13021 generate lower-level template parameters. Handle tsubst'ing into
13022 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
13023 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
13024 templates. Similarly for the template parameters for a new
13026 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
13027 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
13028 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
13029 (get_bindings): Call add_to_template_args if necessary.
13030 (instantiate_decl): Handle instantiations of friend templates.
13031 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
13032 TEMPLATE_TYPE_PARM as a list of fields; it's not!
13033 * spew.c (yylex): Do a little manual constant propagation to
13036 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
13038 * error.c: Include sys/types.h.
13040 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
13042 * method.c (build_mangled_name): Start CPP directives in column zero.
13044 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
13046 * typeck2.c (process_init_constructor): Sorry about non-trivial
13047 labeled initializers.
13048 * parse.y (initlist): Re-enable labeled initializers.
13050 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13052 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
13053 all callers changed. Rely on the new parameter instead of arg
13054 being a TREE_LIST when determine whether we are working inside
13055 template template parameter. Clean up is_type test.
13057 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
13059 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
13060 * typeck2.c (initializer_constant_valid_p): Allow conversions
13061 between pointers and references.
13063 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
13065 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
13066 if pedantic || warn_pointer_arith.
13068 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13070 * pt.c (unify): Handle TEMPLATE_DECL.
13072 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
13074 * cp-tree.h (strip_attrs): Remove decl.
13076 1998-02-18 Doug Evans <devans@cygnus.com>
13078 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
13079 Update olddecl's attributes too.
13080 (strip_attrs): Remove function.
13081 * typeck.c (common_type): Call merge_machine_type_attributes.
13083 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
13085 * parse.y (initdcl0_innards): New grammar symbol.
13086 (nomods_initdecls, nomods_initdcl0): Change type from itype to
13087 none, since the resulting value is never used.
13088 (parse_decl): New function.
13089 (datadef): Remove redundant actions.
13090 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
13091 * parse.c: Regenerated.
13093 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
13095 * parse.y (simple_stmt): Use getdecls() to check for decl.
13097 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
13099 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
13101 (c++.install-common): Install c++filt properly as native or as cross
13103 (c++.uninstall): Add c++filt.
13105 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
13107 * call.c (standard_conversion): Fix multi-level ptr conversions.
13109 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
13111 * init.c (build_new): Propagate error_mark_node up.
13113 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
13115 * parse.y (simple_stmt): If the condition isn't a declaration,
13116 start the controlled block after the test.
13118 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13120 * call.c (build_over_call): Convert builtin abs, labs and fabs to
13122 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
13125 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13127 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
13129 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
13131 * cp-tree.h: Add access_protected_virtual_node.
13132 * class.c (init_class_processing): Initialize it.
13133 * decl.c (xref_basetypes): Use it.
13134 * parse.y (base_class_access_list): Likewise.
13136 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
13137 (c++.install-common): Install c++filt.
13139 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13141 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
13143 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
13145 * call.c (reference_binding): Use comptypes when comparing
13146 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
13148 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
13150 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
13151 (really_overloaded_fn): Move check here from is_overloaded_fn.
13152 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
13154 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
13156 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
13159 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
13161 * cp-tree.h (push_template_decl): Return the decl passed in, or an
13162 equivalent duplicate.
13163 * decl.c (pushtag): Use the return value from push_template_decl.
13164 (duplicate_decls): When duplicating a template declaration, merge
13165 the DECL_TEMPLATE_RESULTs as well.
13166 (make_implicit_typename): Don't try to dive into typename types to
13167 find a context for making a new implicit typename.
13168 (start_decl): Use the return value from push_template_decl.
13169 (grokdeclarator): Complain about declarations list `const operator
13170 int'. Since we don't correctly handle in-class initializations of
13171 non-static data members, complain about this (now illegal)
13172 practice. Issue an error for initializations of non-const statics
13173 since that is illegal as well, and since we don't handle that case
13175 (start_function): Use the return value from push_template_decl.
13176 (start_method): Likewise.
13177 * decl2.c (grokfield): Likewise. Since the change to
13178 grokdeclarator ensures that all initialized fields are in fact
13179 static, remove a redundant test for TREE_PUBLIC.
13180 * parse.y (initlist): Disable labeled initializers since they do
13181 not work as per the documentation, and since they do not use the
13182 same syntax as the C front end.
13183 * pt.c (push_template_decl): Return the decl passed in, or an
13184 equivalent duplicate.
13185 (lookup_template_class): When searching in a nested context,
13186 use the right arguments.
13187 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
13188 * typeck.c (build_component_ref): Assign the correct type to the
13189 result of build_vfn_ref.
13191 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
13193 * pt.c (convert_nontype_argument): Fix typo.
13194 (check_explicit_specialization): Allow old-style specialization
13195 of class template members.
13197 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
13198 Manfred Hollstein <manfred@s-direktnet.de>
13200 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
13201 when deciding to override DECL_ASSEMBLER_NAME.
13203 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
13205 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
13206 * cp-tree.h (flag_do_squangling): Add declaration.
13207 * lang-options.h: Add -fsquangle and -fno-squangle.
13208 * method.c: Add macros and static variables for squangling.
13209 (build_overload_name): Rename to build_mangled_name, add logic for B
13210 compression, and split into process_modifiers and
13211 process_overload_item.
13212 (process_modifiers): New function, to handle constant, reference,
13214 (process_overload_item): New function, handles issue of type codes.
13215 (build_overload_name): New function, start squangling and call
13216 build_mangled_name.
13217 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
13218 (start_squangling): New function to initialize squangling structs.
13219 (end_squangling): New function to destroy squangling structs.
13220 (nrepeats): Rename variable to Nrepeats.
13221 (issue_nrepeats): New function for issuing 'n' type repeats.
13222 (check_ktype): New function to check for type K name compression.
13223 (build_overload_nested_name): Add a check for K name compression.
13224 (build_qualified_name): Add a check for K name compression and don't
13225 use DECL_ASSEMBLER_NAME when squangling is on.
13226 (check_btype): New function, checks for B type compression.
13227 (build_static_name, build_decl_overload_real): Initiate squangling.
13228 (build_typename_overload, build_overload_with_type): Initiate
13231 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
13233 * method.c (make_thunk): Avoid name buffer overflow.
13235 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
13237 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
13238 don't define them yet.
13240 * parse.y (nomods_initdcl0): Add constructor_declarator case.
13242 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13244 * config-lang.in (diff_excludes): Use basename only.
13246 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
13248 * tinfo2.cc: Add tinfo for signed char.
13250 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
13252 * search.c (compute_access): Handle protected constructors in derived
13253 classes as accessible.
13255 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
13257 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
13258 Call convert_from_reference sooner.
13260 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
13262 * cvt.c (ocp_convert): Obtain the constant values from constant
13263 decls even if the destination type is the same as the type of the
13266 * decl2.c (finish_file): Make sure that static inlines with
13267 definitions are not marked DECL_EXTERNAL before returning.
13269 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
13271 * decl.c: Lose arg_looking_for_template.
13272 (lookup_name_real): Likewise.
13273 * parse.y: Lose processing_template_arg, template_arg1.
13274 (primary): Likewise.
13275 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
13277 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13279 * error.c (dump_decl): Fix type of default arguments for template
13280 template parameters and nontype template parameters.
13281 * parse.y (template_parm): Handle invalid default template
13282 template arguments here.
13284 * parse.y (template_parm): Use template_arg instead of PTYPENAME
13285 for default template template argument.
13286 * pt.c (coerce_template_parms): Merge default template argument
13287 codes. Can treat RECORD_TYPE as template name if it is implicitly
13288 created. Fix argument index in error message.
13289 * typeck.c (comptypes): Merge template argument comparison codes in
13290 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
13292 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
13294 * lex.c (file_name_nondirectory): Also check for '/'.
13296 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
13298 * parse.y (primary): Deal with statement-expressions in
13300 * pt.c (tsubst_copy): Handle BIND_EXPR.
13301 * tree.c (mapcar): Likewise.
13303 * call.c (add_template_candidate_real): Pass extra parameter to
13304 fn_type_unification.
13305 * cp-tree.h (fn_type_unification): Add parameter.
13306 * pt.c (fn_type_unification): Add additional parameter to deal with
13307 static member functions.
13308 (get_bindings): Deal with static member functions.
13310 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
13311 (revert_static_member_fn): Declare.
13312 * decl.c (revert_static_member_fn): Remove declaration. Change
13313 linkage from internal to external.
13314 (cp_finish_decl): Deal with virtual functions in classes local to
13315 template functions.
13316 * decl2.c (finish_file): Don't forget to emit increment/decrement
13317 expressions in initializers for file-scope variables.
13318 * parse.y (typename_sub2): If the typename doesn't names a
13319 template, rather than a type, issue an error message.
13320 * pt.c (check_explicit_specialization): Handle specializations of
13321 static member functions.
13322 (coerce_template_parms): Handle offset references to lists of
13324 * search.c (note_debug_info_needed): Don't crash when handed a
13325 type which is being defined.
13326 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
13327 that can happen with some illegal code.
13329 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13331 * call.c (user_harshness): Initialize `code' to 0.
13332 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
13333 (null_ptr_cst_p): Add parentheses around && within ||.
13334 (standard_conversion): Likewise.
13335 (z_candidate): Likewise.
13336 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
13337 (build_object_call): Likewise for `mem_args'.
13338 (build_new_op): Likewise for `mem_arglist'. Add `return' from
13339 default case in enumeration switch.
13341 * class.c (build_vtable_entry): Add explicit braces to avoid
13343 (build_class_init_list): Likewise.
13344 (finish_struct_1): Initialize `width' to 0.
13345 (instantiate_type): Initialize `name' to NULL_TREE. Add
13346 explicit braces to avoid ambiguous `else'.
13348 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
13351 * decl.c (grok_reference_init): Eliminate unused parameter, all
13353 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
13354 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
13355 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
13356 (grokdeclarator): Add parentheses around && within ||. Add
13357 explicit braces to avoid ambiguous `else'.
13358 (grokparms): Initialize `type' to NULL_TREE.
13359 (xref_tag): Remove unused label `just_return'.
13360 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
13361 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
13362 (hack_incomplete_structures): Add parentheses around assignment
13363 used as truth value.
13365 * decl2.c (coerce_delete_type): Hide definition of `e3'.
13367 * error.c: Include <stdlib.h>.
13368 (dump_expr): Change the type of `i' to size_t. Remove unused
13371 * except.c (init_exception_processing): Remove unused variable `d'.
13372 (expand_throw): Likewise for `label'.
13374 * friend.c (add_friends): Add explicit braces to avoid ambiguous
13377 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
13378 (sort_base_init): Likewise for `binfo'.
13379 (expand_member_init): Likewise for `rval'.
13380 (build_member_call): Add parentheses around assignment used as
13382 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
13383 (build_new): Initialize `nelts' to NULL_TREE. Initialize
13384 `old_immediate_size_expand' to 0.
13385 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
13386 (build_vec_delete_1): Remove unused variable `block'.
13387 (expand_vec_init): Initialize `itype' to NULL_TREE.
13389 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
13390 declaration of `index' and `rindex' with autoconf macros.
13391 (reinit_parse_for_expr): Remove unused variables
13392 `look_for_semicolon' and `look_for_lbrac'.
13393 (cons_up_default_function): Initialize `args' to NULL_TREE.
13394 (readescape): Initialize `firstdig' to 0.
13395 (real_yylex): Add parentheses around assignment used as truth value.
13397 * method.c: Include <strings.h> if we don't have <string.h>.
13398 Protect declaration of `index' with autoconf macro.
13400 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
13401 Initialize `type' to NULL_TREE.
13402 (structsp): Remove unused variable `id'.
13404 * pt.c (coerce_template_parms): Add explicit braces to avoid
13406 (lookup_template_class): Initialize `template' to NULL_TREE.
13407 (instantiate_class_template): Remove unused variable `name' and `e'.
13408 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
13409 (do_poplevel): Initialize `saved_warn_unused' to 0.
13410 (type_unification): Remove unused varable `parm'.
13411 (unify): Likewise for `j'.
13413 * repo.c (init_repo): Add parentheses around assignment used as
13415 (finish_repo): Remove unused varable `p'.
13417 * search.c (get_binfo): Initialize `type' to NULL_TREE.
13418 (get_base_distance): Likewise.
13419 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
13420 and `new_v' to NULL_TREE.
13421 (lookup_fnfields): Likewise for `rval_binfo_h'.
13422 (breadth_first_search): Add parentheses around assignment used as
13424 (get_template_base): Initialize `type' to NULL_TREE.
13426 * sig.c (append_signature_fields): Initialize `last_mfptr' to
13428 (build_signature_table_constructor): Likewise for
13429 `last_rhs_field', `pfn' and `vt_off'.
13430 (build_sigtable): Likewise for `init'.
13432 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
13433 (propagate_binfo_offsets): Likewise for `delta'.
13434 (hash_tree_cons): Initialize hashcode to 0.
13435 (can_free): Likewise for `size'.
13436 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
13438 * typeck.c (convert_sequence): Hide prototype.
13439 (common_type): Add explicit braces to avoid ambiguous `else'.
13440 (comp_target_types): Likewise.
13441 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
13442 (build_function_call_real): Add explicit braces to avoid ambiguous
13444 (convert_arguments): Initialize `called_thing' to 0.
13445 (convert_for_initialization): Initialize `savew' and `savee' to 0.
13447 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
13448 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
13449 (build_x_arrow): Likewise for `last_rval'.
13451 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
13453 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
13455 * decl.c (init_decl_processing): Use set_sizetype.
13456 * decl2.c (sizetype): Don't declare.
13457 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
13458 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
13459 (build_component_addr, unary_complex_lvalue): Likewise.
13460 * rtti.c (expand_class_desc): Likewise.
13461 * class.c (get_vfield_offset): Likewise.
13463 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
13465 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
13466 early to avoid bogus error. Handle overloaded function
13467 names provided as template arguments correctly.
13468 (coerce_template_parms): Don't mishandle overloaded functions when
13469 dealing with template template parameters.
13470 (lookup_template_class): Issue an error message, rather than
13471 crashing, when the TYPE_DECL provided is not a template type.
13473 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
13475 * class.c (instantiate_type): Don't just return a known type if
13478 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
13480 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
13481 since that code could never be reached.
13483 * error.c (dump_decl): Avoid aborting in the midst of printing an
13484 error message about an illegal template declaration.
13486 * parse.y (structsp): Print an error message, rather than crashing,
13487 when a class-head does not name a class.
13489 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
13490 template arguments as a g++ extension.
13492 * cp-tree.def (ALIGNOF_EXPR): New tree code.
13493 * decl2.c (grok_alignof): If processing_template_decl, just store
13495 * typeck.c (c_alignof): Likewise.
13496 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
13497 * error.c (dump_expr): Likewise.
13498 * pt.c (tsubst_copy): Likewise.
13499 * tree.c (cp_tree_equal): Likewise.
13500 * pt.c (uses_template_parms): Correctly determine whether or not a
13501 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
13502 folding can be done.
13504 * cp-tree.h (grok_enum_decls): Remove type parameter.
13505 * decl.c (grok_enum_decls): Likewise.
13506 * decl2.c (grok_x_components): Call grok_enum_decls
13507 unconditionally, since it will do nothing if there is no
13508 current_local_enum. Use the new calling sequence.
13509 * pt.c (tsubst_enum): Use the new calling sequence for
13512 * decl.c (start_function): Make member functions of local classes
13513 in extern inline functions have comdat linkage here...
13514 (grokdeclarator): Rather than here.
13516 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
13518 * pt.c (convert_nontype_argument): Use decl_constant_value.
13520 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
13522 * call.c (add_template_candidate_real): New function.
13523 (add_template_candidate): Use it.
13524 (add_template_conv_candidate): Likewise.
13525 (joust): Pass extra argument to more_specialized.
13526 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
13527 (is_local_class): Remove.
13528 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
13529 * cp-tree.h (is_local_class): Remove.
13530 (perform_array_to_pointer_conversion): Likewise.
13531 (finish_member_template_decl): Add.
13532 (check_explicit_specialization): Return a tree, not an int.
13533 (more_specialized): Take additional argument.
13534 (get_bindings): Likewise.
13535 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
13536 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13537 (perform_array_to_pointer_conversion): Remove.
13538 * decl.c (saved_scope): Add processing_specialization,
13539 processing_explicit_instantiation fields.
13540 (maybe_push_to_top_level): Save them.
13541 (pop_from_top_level): Restore them.
13542 (grokfndecl): Use new return value from
13543 check_explicit_specialization.
13544 (start_decl): Don't check flag_guiding_decls before pushing
13546 (cp_finish_decl): Remove previous (bogus) change.
13547 (grok_declarator): Use decl_function_context rather than
13549 * decl2.c (finish_file): Pass extra argument to get_bindings.
13550 (build_expr_from_tree): Let build_x_component_ref check
13551 validity of arguments rather than doing it here.
13552 * lex.c (cons_up_default_function): Remove code fooling with
13553 processing_specialization, processing_explicit_instantiation
13554 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
13555 * method.c (build_overload_identifier): Mangle local classes in
13556 template functions correctly.
13557 * parse.y (finish_member_template_decl): Move to pt.c.
13558 * pt.c (finish_member_template_decl): Moved here from parse.y.
13559 (print_candidates): New function.
13560 (determine_specialization): Change interface. Properly look for
13561 most specialized versions of template candidates.
13562 (check_explicit_specialization): Fully process explicit
13564 (push_template_decl): Avoid looking at CLASSTYPE fields in
13566 (determine_overloaded_function): Remove.
13567 (convert_nontype_argument): Change name from
13568 convert_nontype_parameter. Use determine_overloaded_function
13569 instead of instantiate_type.
13570 (mangle_class_name_for_template): Handle type contexts as well as
13572 (classtype_mangled_name): Likewise.
13573 (lookup_template_class): Likewise.
13574 (tsubst): Likewise.
13575 (more_specialized): Take explict template arguments as a
13577 (most_specialized): Likewise.
13578 (get_bindings): Likewise. Check that return types match before
13579 proclaiming a function a match.
13580 (do_decl_instantiation): Remove code searching for function to
13581 instantiate; that is now done in check_explicit_specialization.
13582 (add_maybe_template): Pass extra argument to get_bindings.
13583 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
13585 * typeck.c (build_component_ref): Check for invalid arguments.
13587 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
13589 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
13590 return_target and call_target are equivalent.
13592 * pt.c (type_unification_real): Just accept function parms that
13593 don't use any template parms.
13595 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
13597 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
13598 unset DECL_NOT_REALLY_EXTERN.
13600 * parse.y (typename_sub*): Fix std::.
13602 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
13604 * error.c (dump_decl): Fix type default template args.
13605 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
13607 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
13609 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
13610 (file_name_nondirectory): Use.
13612 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13614 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
13615 that are not really present. Substitute default arguments in
13616 template template arguments. Correctly convert TEMPLATE_DECL to
13617 TEMPLATE_TEMPLATE_PARM.
13618 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
13619 are no longer treated specially here.
13620 * parse.y (template_template_parm): Fix copy error.
13621 * decl.c (grokdeclarator): Warn about missing `typename' for nested
13622 type created from template template parameters.
13623 * parse.y (bad_parm): Likewise
13625 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
13626 (push_nested_class): Likewise.
13627 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
13628 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
13629 (copy_template_template_parm): Declare.
13630 * decl.c (arg_looking_for_template): New variable.
13631 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
13632 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
13633 node if arg_looking_for_template is nonzero.
13634 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
13635 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
13636 (grokdeclarator): Handle TEMPLATE_DECL.
13637 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
13638 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
13639 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
13640 (dump_decl): Handle unnamed template type parameters.
13641 Handle template template parameters.
13642 (dump_function_name): Handle template template parameters.
13643 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
13644 Handle TEMPLATE_TEMPLATE_PARM.
13645 * method.c (build_template_template_parm_names): New function.
13646 (build_template_parm_names): Handle TEMPLATE_DECL.
13647 (build_overload_nested_name, build_overload_name):
13648 Handle TEMPLATE_TEMPLATE_PARM.
13649 * parse.y (maybe_identifier): New nonterminal.
13650 (template_type_parm): Use it.
13651 (template_template_parm, template_arg1): New nonterminal.
13652 (template_parm): Add template_template_parm rules.
13653 (template_arg): Set processing_template_arg.
13654 (template_arg1): Rules moved from template_arg.
13655 (primary, nonnested_type): Set arg_looking_for_template if we are
13656 processing template arguments.
13657 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
13658 (process_template_parm): Handle template template parameters.
13659 (coerce_template_parms, comp_template_args): Likewise.
13660 (mangle_class_name_for_template, lookup_template_class): Likewise.
13661 (uses_template_parms): Handle TEMPLATE_DECL and
13662 TEMPLATE_TEMPLATE_PARM.
13663 (current_template_args): Handle TEMPLATE_DECL.
13664 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
13665 * search.c (dfs_walk, dfs_record_inheritance):
13666 Handle TEMPLATE_TEMPLATE_PARM.
13667 * tree.c (copy_template_template_parm): New function.
13668 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
13669 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
13671 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
13673 * decl.c (start_decl): Don't allow duplicate definitions of static
13676 * call.c (build_user_type_conversion_1): Handle user-defined
13677 template conversion operators correctly.
13679 * decl2.c (build_expr_from_tree): Issue an error message if the
13680 object in a COMPONENT_REF is a TEMPLATE_DECL.
13682 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
13684 * class.c (is_local_class): New function.
13685 * cp-tree.h (is_local_class): Declare it.
13686 (last_tree): Likewise.
13687 (begin_tree): Likewise.
13688 (end_tree): Likewise.
13689 (lookup_template_class): Change prototype.
13690 * decl.c (cp_finish_decl): Check for NULL where necessary.
13691 Consider FUNCTION_DECLS to declare objects with top-level binding,
13692 when calling make_decl_rtl.
13693 (grokdeclarator): Give members of local classes internal linkage.
13694 (start_function): Remove declaration of last_tree.
13695 (finish_function): Set flag_keep_inline_functions around call to
13696 rest_of_compilation if we are processing a member function in a
13698 (start_method): Call push_template_decl for member functions of
13699 local classes in template functions.
13700 * decl2.c (import_export_decl): Don't give external linkage to
13701 instantiations of templates with internal linkage.
13702 * parse.y (last_tree): Remove declaration.
13703 (template_type): Pass extra parameter to lookup_template_class.
13704 (self_template_type): Likewise.
13705 (structsp): Move call to reset_specialization into left_curly.
13706 (left_curly): Call reset_specialization, and begin_tree.
13707 * pt.c (saved_trees): New variable.
13708 (mangle_class_name_for_template): Change prototype. Use
13709 additional function context to name local classes in templates
13711 (classtype_mangled_name): Pass the context.
13712 (push_template_decl): Handle local classes and templates, and
13713 member functions for such classes.
13714 (convert_nontype_parameter): Fix handling of pointer-to-member
13716 (lookup_template_class): Handle local classes in templates.
13717 (tsubst): Likewise. Don't assume that template instantiations
13718 have external linkage; pay attention to the template declaration.
13719 (mark_decl_instantiated): Likewise.
13720 (begin_tree): New function.
13721 (end_tree): Likewise.
13723 * decl.c (xref_basetypes): Don't call complete_type for basetypes
13724 that involve template parameters; that can lead to infinite
13725 recursion unnecessarily.
13727 * pt.c (register_specialization): Do not register specializations
13728 that aren't ready to be registered yet.
13729 (check_explicit_specialization): Handle explicit specialization of
13730 constructors and destructors.
13731 (build_template_decl): New function.
13732 (push_template_delc): Handle out-of-class specializations of
13735 * pt.c (check_explicit_specialization): Set up the template
13736 information before registering the specialization.
13737 (coerce_template_parms): Fix thinko.
13738 (tsubst): Handle specializations of member templates correctly.
13740 * class.c (finish_struct_methods): Remove calls to
13741 check_explicit_specialization from here.
13742 (finish_struct): And insert them here.
13743 * cp-tree.h (perform_qualification_conversions): New function.
13744 (perform_array_to_pointer_conversion): Likewise.
13745 (begin_explicit_instantiation): Likewise.
13746 (end_explicit_instantiation): Likewise.
13747 (determine_specialization): Renamed from
13748 determine_explicit_specialization.
13749 (comp_template_parms): New function.
13750 (processing_explicit_instantiation): New variable.
13751 * cvt.c (perform_qualification_conversions): New function.
13752 (perform_array_to_pointer_conversion): Likewise.
13753 * decl.c (duplicate_decls): Don't consider template functions
13754 alike unless they have the same parameters. Refine handling of
13755 instantiation/specialization mismatches.
13756 (start_decl): Don't call pushdecl for template specializations,
13757 since they don't affect overloading.
13758 (start_function): Likewise.
13759 (grokfndecl): Call check_explicit_specialization a little later.
13760 Don't call duplicate_decls for memberm template specializations.
13761 (grokdeclarator): Don't update template_count for classes that are
13762 themselves specializations. Remove use of `2' as parameter to
13763 grokfndecl since that value isn't used.
13764 * lex.c (cons_up_default_function): Save and restore
13765 processing_explicit_instantiation around calls to grokfield.
13766 * parse.y (finish_member_template_decl): New function.
13767 (component_decl_1): Use it.
13768 (fn.def2): Likewise.
13769 (template_arg_list_opt): New nonterminal.
13770 (template_type): Use it.
13771 (self_template_type): Likewise.
13772 (template_id): Likewise.
13773 (object_template_id): Likewise.
13774 (notype_template_declarator): Likwise.
13775 (begin_explicit_instantiation): Likewise.
13776 (end_explicit_instantiation): Likewise.
13777 (explicit_instantiation): Use them.
13778 * pt.c (coerce_template_parms): Add parameters.
13779 (processing_explicit_instantiation): New variable.
13780 (convert_nontype_parameter): New function.
13781 (determine_overloaded_function): Likewise.
13782 (begin_explicit_instantiation): Likewise.
13783 (end_explicit_instantiation): Likewise.
13784 (retrieve_specialization): Likewise.
13785 (register_specialization): Likewise.
13786 (processing_explicit_specialization): Removed.
13787 (determine_specialization): Handle specializations of member
13788 functions of template class instantiations.
13789 (check_explicit_specialization): Refine to conform to standard.
13790 (comp_template_parms): New function.
13791 (coerce_template_parms): Call convert_nontype_parameter.
13792 (tsubst): Refine handling of member templates. Use
13793 register_specialization.
13794 (instantiate_template): Use retrieve_specialization.
13795 (do_decl_instantiation): Likewise.
13796 (instantiate_decl): Likewise.
13797 (type_unification): Improve handling of explict template
13799 * tree.c (mapcar): Return error_mark_node, rather than aborting,
13800 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
13801 * typeck.c (build_unary_op): Call determine_specialization, rather
13802 than determine_explicit_specialization.
13804 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
13806 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
13808 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13810 * error.c (dump_decl): For enum tags, output the tag, not its value.
13812 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
13814 * decl.c (init_decl_processing): Only call init_rtti_processing
13817 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
13819 * init.c (build_new_1): Split out from build_new.
13820 (build_new): Just return a NEW_EXPR.
13821 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
13823 * decl2.c (get_temp_regvar): Tweak.
13825 * cp-tree.h (TREE_CALLS_NEW): Comment out.
13826 * class.c (resolves_to_fixed_type_p): Remove use.
13827 * method.c (build_opfncall): Likewise.
13828 * call.c (build_new_op): Likewise.
13830 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
13832 * exception.cc (__eh_alloc, __eh_free): New fns.
13833 (__cp_push_exception, __cp_pop_exception): Use them.
13834 (__uncatch_exception): Call terminate here if no exception.
13835 * except.c (build_terminate_handler): New fn.
13836 (expand_start_catch_block): Use it.
13837 (expand_exception_blocks): Likewise.
13838 (alloc_eh_object): New fn.
13839 (expand_throw): Use it. Protect exception init with terminate.
13840 * typeck.c (build_modify_expr): Remove code that ignores trivial
13843 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13845 * call.c (add_builtin_candidate): Add default case in enumeration
13847 (build_new_op): Likewise.
13848 (convert_like): Likewise.
13849 * cvt.c (build_expr_type_conversion): Likewise.
13850 * tree.c (real_lvalue_p): Likewise.
13851 (lvalue_p): Likewise.
13852 (cp_tree_equal): Likewise.
13853 * typeck.c (comptypes): Likewise.
13854 (build_component_ref): Likewise.
13855 (build_function_call_real): Likewise.
13856 (build_binary_op_nodefault): Likewise.
13857 (build_unary_op): Likewise.
13858 (build_modify_expr): Likewise.
13859 * typeck2.c (initializer_constant_valid_p): Likewise.
13861 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
13863 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
13865 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
13867 * pt.c (coerce_template_parms): Make sure to digest_init if
13870 * decl.c (duplicate_decls): Make the newdecl virtual if the
13871 olddecl was, just as is done with other attributes of olddecl.
13873 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
13875 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
13876 address of an OFFSET_REF.
13878 * cp-tree.def: Add AGGR_INIT_EXPR.
13879 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
13880 AGGR_INIT_EXPR where appropriate.
13881 * expr.c (cplus_expand_expr): Likewise. Simplify.
13883 * decl2.c (finish_file): Remove call to register_exception_table.
13885 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13887 * pt.c (instantiate_class_template): Don't do injection when
13888 processing_template_decl is true, as pollutes current_binding_level
13891 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
13893 * pt.c (maybe_fold_nontype_arg): Add prototype.
13895 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13897 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
13898 * error.c (dump_expr): Likewise.
13900 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
13902 * typeck.c (build_function_call_real): Remove "inline called before
13903 definition" pedwarn.
13905 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
13907 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13909 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
13911 * pt.c (type_unification_real): Change __null to type void* with
13914 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
13916 * call.c (implicit_conversion): Don't call
13917 build_user_type_conversion_1 with a NULL expr, since it will
13920 * pt.c (unify): Don't try to unify array bounds if either array is
13923 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
13925 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
13926 Replace extern decls with casts.
13928 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
13929 Update last_parm_cleanup_insn.
13930 (store_after_parms): Remove.
13931 * cp-tree.h: Adjust.
13933 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13935 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
13936 (finish_file): Check DECL_COMDAT instead of weak|one_only.
13937 (import_export_vtable): Use make_decl_one_only instead of
13938 comdat_linkage for win32 tweak.
13939 (import_export_decl): Likewise.
13940 * pt.c (mark_decl_instantiated): Likewise.
13942 * decl2.c (finish_file): Lose handling of templates in pending_statics.
13944 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
13946 * decl2.c (finish_file): Lose call to expand_builtin_throw.
13947 * except.c (expand_builtin_throw): Remove.
13948 * cp-tree.h: Remove ptr_ptr_type_node.
13949 * decl.c: Likewise.
13951 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
13953 * decl.c (ptr_ptr_type_node): Define.
13954 (init_decl_processing): Initialize it.
13955 * cp-tree.h: Declare it.
13956 * exception.cc (__cp_exception_info): Use __get_eh_info.
13957 (__cp_push_exception): Likewise.
13958 (__cp_pop_exception): Likewise.
13960 From Scott Snyder <snyder@d0sgif.fnal.gov>:
13961 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
13963 (init_exception_processing): Removed saved_pc initialization.
13965 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
13967 * pt.c (instantiate_decl): Defer all templates but inline functions.
13969 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
13971 * init.c (expand_vec_init): Don't fold a list of parameters.
13973 * decl.c (copy_args_p): Handle copy elision for types with virtual
13975 * call.c (build_over_call): Likewise.
13977 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
13979 * pt.c (lookup_template_function): Copy the template arguments,
13980 not just the list containing them, to the permanent obstack.
13982 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13984 * except.c (expand_start_catch_block): suspend_momentary for the
13987 * error.c (dump_decl): Handle LOOKUP_EXPR.
13989 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
13991 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
13992 permanent obstack if we are processing a template decl.
13993 * typeck.c (build_static_cast): Likewise.
13994 (build_const_cast): Likewise.
13995 (build_reinterpret_cast): Likewise.
13997 * pt.c (coerce_template_parms): Coerce some expressions, even
13998 when processing_template_decl.
14000 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14002 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
14003 handling of pointer difference expressions.
14005 * typeck.c (comp_target_types): Comparison of function/method types
14006 is independent of nptrs.
14008 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
14010 * pt.c (tsubst): Avoid creating pointer to reference and
14011 reference to reference types.
14013 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
14015 * parse.y (do_id): New nonterminal.
14016 (template_id): Use it.
14018 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
14020 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
14021 * spew.c (yylex): Don't do_identifier here.
14022 * decl2.c (build_expr_from_tree): Revert last change.
14024 * decl2.c (build_expr_from_tree): Expand the name for a method call.
14025 * parse.y (object_template_id): Don't try to take the DECL_NAME.
14027 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
14029 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
14031 * call.c (build_op_delete_call): Adjust.
14033 * except.c (expand_end_catch_block): Lose rethrow region.
14034 (expand_start_catch_block): Likewise.
14035 (expand_end_catch_block): Don't expand_leftover_cleanups.
14037 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14039 * pt.c (tsubst): Remove tree_cons call (places redundant info into
14040 DECL_TEMPLATE_INSTANTIATION).
14042 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
14044 * tree.c (is_overloaded_fn): Handle getting a fn template.
14045 (really_overloaded_fn): Likewise.
14046 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
14047 * pt.c (check_explicit_specialization): Tweak.
14048 (determine_explicit_specialization): Tweak.
14050 * tree.c, cp-tree.h (get_target_expr): New fn.
14052 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
14054 * pt.c (check_explicit_specialization): Fix misspelling in
14055 diagnostic: `preceeded'.
14056 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
14059 1997-12-02 Mark Mitchell <mmitchell@usa.net>
14061 * pt.c (determine_explicit_specialization): Avoid an internal
14062 error for bad specializations.
14064 * method.c (build_overload_value): Handle SCOPE_REF.
14066 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
14068 * class.c (prepare_fresh_vtable): Enable even more complex MI
14071 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
14073 * exception.cc (__check_eh_spec): Optimize a bit.
14075 * exception.cc (__cp_pop_exception): Lose handler arg.
14076 * except.c (do_pop_exception): Likewise.
14077 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
14078 (expand_end_catch_block): Likewise.
14080 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14082 * pt.c (check_explicit_specialization): Complain about using a
14083 template-id for a non-specialization.
14085 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
14087 * repo.c: Prototype rindex only if needed.
14088 * xref.c: Likewise.
14090 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14092 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
14094 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
14096 * typeck.c (build_const_cast): Handle references here instead of
14097 handing off to convert_to_reference.
14099 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
14100 TerminateFunctionCall.
14101 (init_exception_processing): Likewise. Terminate et al are now
14102 the fns, not ADDR_EXPRs.
14103 (various): Lose redundant assemble_external calls.
14104 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
14106 * cp-tree.h (struct lang_decl_flags): Add comdat.
14107 (DECL_COMDAT): New macro.
14108 * decl.c (duplicate_decls): Propagate it.
14109 (cp_finish_decl): Handle it.
14110 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
14112 * class.c: Remove static pending_hard_virtuals.
14113 (add_virtual_function): Take pointers to pending_virtuals
14114 and pending_hard_virtuals.
14115 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
14117 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
14119 * decl2.c (import_export_vtable): If we support one_only but not
14120 weak symbols, mark instantiated template vtables one_only.
14121 (import_export_decl): Likewise for tinfo functions.
14122 (finish_vtable_vardecl): Also write out vtables from explicitly
14123 instantiated template classes.
14124 * pt.c (mark_class_instantiated): Revert last change.
14126 * except.c (expand_throw): Call mark_used on the destructor.
14128 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
14130 * lex.c (lang_init): Enable flag_exceptions by default if no
14131 command line switch was specified.
14133 1997-11-26 Mark Mitchell <mmitchell@usa.net>
14135 * pt.c (unify): Handle `void' template parameters in
14138 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
14140 * rtti.c (build_dynamic_cast): Handle template case here.
14141 (build_dynamic_cast_1): Not here.
14143 * typeck2.c (digest_init): Make copies where appropriate.
14145 * decl2.c (delete_sanity): resolve_offset_ref.
14147 * except.c: Call terminate without caching so many bits.
14149 * except.c (expand_start_catch_block): Fix catching a reference
14152 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
14154 * init.c (build_new): Copy size to the saveable obstack.
14156 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
14157 TRY_CATCH_EXPR for now.
14159 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
14161 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
14162 has DECL_LANG_SPECIFIC.
14164 * exception.cc (struct cp_eh_info): Add handlers field.
14165 (__cp_push_exception): Initialize it.
14166 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
14167 (__throw_bad_exception): Remove.
14168 * except.c (call_eh_info): Add handlers field.
14169 (get_eh_handlers): New fn.
14170 (push_eh_cleanup): Increment handlers.
14172 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
14174 * except.c (expand_start_eh_spec): Use the try/catch code.
14175 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
14176 doing everything inline.
14177 (init_exception_processing): throw_type_match now takes
14178 const void pointers.
14179 * exception.cc (__check_eh_spec): New fn.
14180 * inc/exception: Neither terminate nor unexpected return.
14181 * decl.c: Make const_ptr_type_node public.
14182 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
14184 * except.c (expand_start_catch_block): We only need the rethrow
14185 region for non-sjlj exceptions.
14186 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
14188 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
14190 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
14191 (various.o): Likewise.
14192 * inc/new: Add placement deletes. Add throw specs for default new.
14193 * new.cc (set_new_handler): Move here from libgcc2.
14194 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
14195 (new): Move from libgcc2. Throw bad_alloc.
14196 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
14197 * decl.c (init_decl_processing): Update exception specs on new and
14200 * method.c (build_decl_overload_real): Don't mess with global
14203 * init.c (build_new): Check for null throw spec, not nothrow_t.
14205 * decl.c (duplicate_decls): Don't complain about different exceptions
14206 from an internal declaration.
14208 * call.c (build_op_delete_call): Fix check for member fns again.
14210 * decl2.c (import_export_decl): Interface hackery affects
14211 virtual synthesized methods.
14213 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14215 * decl.c (start_decl): Don't just complain about a mismatched
14218 * decl.c (make_implicit_typename): Handle case where t is not
14219 actually from context.
14220 * tree.c (get_type_decl): Lose identifier case.
14221 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
14222 * parse.y (nonnested_type): Just use lookup_name.
14223 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
14225 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
14227 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
14228 T was built in C language context (for example, by
14229 output_func_start_profiler).
14231 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
14233 * decl.c (make_implicit_typename): New fn.
14234 (lookup_name_real): Use it. Use current_class_type as the context.
14236 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
14238 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
14240 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14242 * friend.c (do_friend): Warn about non-template friends in templates.
14244 * call.c (build_op_delete_call): Fix handling of inherited delete.
14246 * search.c (dfs_record_inheritance): Ignore template type parms.
14248 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
14250 * call.c (build_new_op): Fix copy error.
14251 (build_op_new_call): New fn.
14252 (build_op_delete_call): New fn.
14253 * cp-tree.h: Declare them.
14254 * init.c (build_new): Use them. Support placement delete.
14255 (build_x_delete): Use build_op_delete_call.
14256 (build_delete): Likewise.
14257 * decl2.c (delete_sanity): Likewise.
14258 (coerce_delete_type): Don't complain about placement delete.
14260 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
14262 * call.c (build_new_function_call): Remove unused 'obj' parm.
14263 * cp-tree.h, typeck.c: Adjust.
14265 * init.c (build_new): Make the cleanup last longer.
14266 (expand_vec_init): Call do_pending_stack_adjust.
14268 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
14270 * pt.c (do_type_instantiation): Fix typo.
14271 (mark_class_instantiated): If we support one_only but not weak
14272 symbols, don't mark this as known.
14274 * init.c (build_new): Handle vec delete in EH cleanup.
14276 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14278 * call.c (build_method_call): Call complete_type before checking
14281 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
14283 * decl.c (add_block_current_level): Delete.
14284 * init.c (build_vec_delete_1): Delete build_block and
14285 add_block_current_level calls.
14287 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
14289 * init.c (build_new): Handle freeing allocated memory when the
14290 constructor throws.
14292 * call.c (build_new_method_call): Fix flags arg.
14294 * pt.c (do_type_instantiation): Don't try to instantiate
14296 (mark_decl_instantiated): If we support one_only but not
14297 weak symbols, mark this one_only.
14298 * decl2.c (import_export_vtable): Don't defer handling of vtables
14299 if MULTIPLE_SYMBOL_SPACES.
14301 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14303 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
14305 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
14307 * except.c (do_pop_exception): Return a value.
14309 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
14311 * call.c (build_new_method_call): Handle getting a
14312 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
14313 if we got template parms.
14314 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
14316 * decl2.c (build_expr_from_tree): Tweak last change.
14317 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
14318 (maybe_fold_nontype_arg): Split out from tsubst_copy.
14319 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
14321 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14323 * pt.c (tsubst_copy): Handle explicit template arguments in
14325 * typeck.c (build_x_function_call): Likewise.
14326 * decl2.c (build_expr_from_tree): Lookup function name if it
14329 * pt.c (tsubst): Instantiate template functions properly when
14330 template parameter does not appear in function arguments and return
14332 (comp_template_args): Handle member templates required by tsubst.
14334 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
14336 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
14339 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14341 * pt.c (coerce_template_parms): Tweak error message.
14343 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
14344 return type defaults to `int', even if there are storage-class
14347 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
14349 Complete nested exception support.
14350 * except.c (do_pop_exception): Split out...
14351 (push_eh_cleanup): From here. Handle the EH region by hand.
14352 (expand_start_catch_block): Add a new level for the catch parm.
14353 Move the rethrow region outside the two cleanup regions.
14354 Protect the initializer for the catch parm with terminate.
14355 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
14356 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
14357 popping off the middle of the stack.
14358 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
14359 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
14360 (build_cplus_new): Only wrap CALL_EXPRs.
14361 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
14362 the constructor call.
14364 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14366 * Make-lang.in (c++.distdir): Make inc subdirectory.
14368 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14370 * decl2.c (finish_file): Put back some code.
14372 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14374 * decl2.c (finish_file): Remove redundant code.
14375 * method.c (emit_thunk): Don't let the backend defer generic thunks.
14377 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
14379 * except.c (call_eh_info): Split out...
14380 (push_eh_info): From here.
14381 (expand_builtin_throw): Use it.
14382 (expand_start_catch_block): Move region start back.
14384 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
14386 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
14387 (real_yylex): Record wide strings using target endianness, not host.
14389 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
14391 * repo.c (rindex): Add decl unconditionally.
14392 (get_base_filename, open_repo_file): Don't cast rindex.
14393 * xref.c (rindex): Add decl unconditionally.
14394 (index): Remove unused decl.
14395 (open_xref_file): Don't cast rindex.
14397 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
14399 * class.c (build_vbase_path): Propagate the result type properly.
14401 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
14403 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
14404 remaining use of saved_throw_type with a call to get_eh_type.
14406 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
14408 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
14409 (file_name_nondirectory): New function, doing the same as the macro.
14410 (set_typedecl_interface_info): Use it instead of the macro.
14411 (check_newline): Likewise.
14412 (handle_cp_pragma): Likewise.
14414 * repo.c (get_base_filename): Cast result of rindex to char*.
14415 (open_repo_file): Likewise.
14416 * xref.c (open_xref_file): Likewise.
14417 * error.c (dump_char): Make its arg int, not char.
14419 * except.c (push_eh_info): Pass the number of fields - 1 down, not
14420 the exact number of fields.
14422 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
14424 Support for nested exceptions.
14425 * tinfo2.cc (__is_pointer): New fn.
14426 * exception.cc (struct cp_eh_info): Define.
14427 (__cp_exception_info, __uncatch_exception): New fns.
14428 (__cp_push_exception, __cp_pop_exception): New fns.
14429 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
14431 (init_exception_processing): Likewise. __eh_pc is now external.
14432 (push_eh_info): New fn.
14433 (get_eh_{info,value,type,caught}): New fns.
14434 (push_eh_cleanup): Just call __cp_pop_exception.
14435 (expand_start_catch_block): Use push_eh_info. Start the eh region
14437 (expand_end_eh_spec): Use push_eh_info.
14438 (expand_throw): Call __cp_push_exception to set up the exception info.
14439 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
14441 (expand_builtin_throw): Don't refer to empty_fndecl.
14443 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
14445 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
14447 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
14449 * method.c (build_template_parm_names, build_decl_overload_real):
14450 Add static to definitions.
14451 * pt.c (add_to_template_args, note_template_header,
14452 processing_explicit_specialization, type_unification_real): Likewise.
14453 ({determine,check}_explicit_specialization): Use a single string for
14456 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
14458 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
14459 (expand_end_catch_block): Likewise.
14460 (expand_end_eh_spec): Likewise.
14462 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
14464 * decl.c (duplicate_decls): Handle template specializations
14466 * error.c (dump_function_name): Fix printing of specializations of
14467 member functions that are not member templates.
14468 * cp-tree.h (processing_specialization): Make global.
14469 * pt.c (processing_specialization): Likewise.
14470 * lex.c (cons_up_default_function): Save and restore
14471 processing_specialization to avoid confusion.
14473 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
14475 * decl.c (init_decl_processing): Give null_node unknown* type.
14476 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
14477 (common_type): Likewise.
14478 * error.c (args_as_string): Recognize null_node.
14480 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14482 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
14483 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
14485 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
14487 * Make-lang.in (g++): Include prefix.o.
14489 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
14491 * pt.c (determine_explicit_specialization): Initialize "dummy"
14492 to keep Purify quiet.
14494 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
14496 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
14497 (build_overload_int): Not here.
14499 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
14501 * class.c (build_type_pathname): Remove.
14502 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
14504 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
14506 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
14507 &&label GNU extension.
14509 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
14511 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
14512 so as to avoid incorrect manglings.
14513 * method.c (build_decl_overload_real): Don't mangle return types
14516 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14518 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
14519 scratch_tree_cons): Define as macros for now.
14520 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
14521 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
14522 typeck2.c: Use them and the expression_obstack variants.
14524 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14526 * decl.c (store_return_init): Allow classes with explicit ctors to
14527 be used with the named return values extension.
14529 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
14531 * pt.c (instantiate_decl): Fix previous change.
14533 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
14535 * pt.c (tsubst): Fix thinko.
14536 (instantiate_decl): Really use the original template.
14538 * call.c (build_new_method_call): Use simple constructor_name for
14541 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
14543 * method.c (build_underscore_int): Don't use ANSI specific
14546 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
14548 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
14549 for our key method; it might have been inlined by -O3.
14551 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
14553 * decl.c (make_typename_type): Do not try to call lookup_field for
14554 non-aggregate types.
14556 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
14558 * typeck.c (build_reinterpret_cast): Tweak.
14560 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
14562 * typeck.c (build_reinterpret_cast): Converting a void pointer
14563 to function pointer with a reinterpret_cast produces a warning
14564 if -pedantic is issued.
14566 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
14568 * typeck.c (c_expand_return): Don't warn about returning a
14569 reference-type variable as a reference.
14571 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
14573 * method.c (build_static_name): Fix typo.
14575 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
14577 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
14578 OLDDECL before we try to do DECL_USE_TEMPLATE.
14580 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
14582 * decl.c (duplicate_decls): Don't warn about template instances.
14584 * typeck.c (mark_addressable): Lose ancient code that unsets
14587 * pt.c (do_decl_instantiation): Lose support for instantiating
14590 * call.c (build_new_function_call): Fix handling of null explicit
14592 (build_new_method_call): Likewise.
14594 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
14596 * method.c (build_underscore_int): Fix typo.
14598 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
14600 * tree.c (print_lang_statistics): #if 0 call to
14601 print_inline_obstack_statistics until its definition is checked in.
14603 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
14605 * decl2.c (finish_file): Move dump_tree_statistics to end.
14607 * pt.c (instantiate_decl): Look for the original template.
14608 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
14609 of member templates.
14611 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
14613 * Makefile.in (g++FAQ.*): New rules.
14614 (CONFLICTS): Update.
14615 * g++FAQ.texi: Moved from libg++.
14617 * parse.y (PFUNCNAME): Only specify the type once.
14619 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
14621 * lex.c (real_yylex): Clean up the code to fully behave the way
14622 the c-lex.c parser does for complex and real numbers.
14624 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
14626 * method.c (build_decl_overload_real): Reformat.
14628 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
14630 * method.c (synthesize_method): If at_eof, determine our linkage.
14632 1997-09-29 Paul Eggert <eggert@twinsun.com>
14634 * lex.c (real_yylex): Treat `$' just like `_', except issue a
14635 diagnostic if !dollars_in_ident or if pedantic.
14637 * lang-specs.h (@c++): -ansi no longer implies -$.
14639 * decl2.c (lang_decode_option):
14640 -traditional and -ansi now do not mess with
14643 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
14645 * Makefile.in (parse.o, decl.o): Also depend on
14646 $(srcdir)/../except.h $(srcdir)/../output.h.
14647 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
14648 $(srcdir)/../except.h $(srcdir)/../output.h.
14649 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
14652 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
14654 * expr.c (cplus_expand_expr): Make it static.
14656 * decl2.c, init.c, typeck.c: Include "expr.h".
14657 (expand_expr): Use proper values when calling the function.
14659 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
14661 * lang-options.h: New -Wold-style-cast flag.
14662 * cp-tree.h (warn_old_style_cast): New variable.
14663 * decl2.c (warn_old_style_cast): Likewise.
14664 (lang_decode_option): Support -Wold-style-cast.
14665 (reparse_absdcl_as_casts): Produce old-style-cast warning.
14667 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14669 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
14670 TREE_USED, reset value based on already_used.
14672 * init.c (expand_member_init): Revert change.
14674 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
14676 * cp-tree.h, decl.c, decl2.c, pt.c:
14677 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
14679 * decl2.c (lang_decode_option): Add missing ;.
14681 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
14683 * friend.c (do_friend): Disable injection for all template-derived
14685 * decl2.c (lang_decode_option): Handle -fguiding-decls.
14686 * parse.y (notype_template_declarator): New nonterminal.
14687 (direct_notype_declarator): Use it.
14688 (complex_direct_notype_declarator): Likewise.
14689 (object_template_id): Accept any kind of identifier after TEMPLATE.
14690 (notype_qualified_id): Don't add template declarators here.
14692 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
14694 * call.c (add_template_candidate): Add explicit_targs parameter.
14695 (build_scoped_method_call): Use it.
14696 (build_overload_call_real): Likewise.
14697 (build_user_type_conversion_1): Likewise.
14698 (build_new_function_call): Likewise.
14699 (build_object_call): Likewise.
14700 (build_new_op): Likewise.
14701 (build_new_method_call): Likewise.
14702 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
14703 (build_new_method_call): Likewise.
14705 * class.c (finish_struct_methods): Add specialization pass to
14706 determine which methods were specializing which other methods.
14707 (instantiate_type): Handle TEMPLATE_ID_EXPR.
14709 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
14711 * cp-tree.h (name_mangling_version): New variable.
14712 (flag_guiding_decls): Likewise.
14713 (build_template_decl_overload): New function.
14714 (begin_specialization): Likewise.
14715 (reset_specialization): Likewise.
14716 (end_specialization): Likewise.
14717 (determine_explicit_specialization): Likewise.
14718 (check_explicit_specialization): Likewise.
14719 (lookup_template_function): Likewise.
14720 (fn_type_unification): Add explicit_targs parameter.
14721 (type_unification): Likewise.
14723 * decl.c (duplicate_decls): Add smarts for explicit
14725 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
14727 (grokfndecl): Call check_explicit_specialization.
14729 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
14730 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
14731 (check_classfn): Handle specializations.
14733 * error.c (dump_function_name): Print specialization arguments.
14735 * friend.c (do_friend): Don't call pushdecl for template
14738 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
14740 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
14741 and -fno-guiding-decls.
14743 * lex.c (identifier_type): Return PFUNCNAME for template function
14746 * method.c (build_decl_overload_real): New function.
14747 (build_template_parm_names): New function.
14748 (build_overload_identifier): Use it.
14749 (build_underscore_int): New function.
14750 (build_overload_int): Use it. Add levels for template
14752 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
14753 (build_overload_nested_names): Handle template type parameters.
14754 (build_template_decl_overload): New function.
14756 * parse.y (YYSTYPE): New ntype member.
14757 (nested_name_specifier): Use it.
14758 (nested_name_specifier_1): Likewise.
14759 (PFUNCNAME): New token.
14760 (template_id, object_template_id): New non-terminals.
14761 (template_parm_list): Note specializations.
14762 (template_def): Likewise.
14763 (structsp): Likewise.
14764 (fn.def2): Handle member template specializations.
14765 (component_decl_1): Likewise.
14766 (direct_notype_declarator): Handle template-ids.
14767 (component_decl_1): Likewise.
14768 (direct_notype_declarator): Handle template-ids.
14769 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
14771 * pt.c (processing_specializations): New variable.
14772 (template_header_count): Likewise.
14773 (type_unification_real): New function.
14774 (processing_explicit_specialization): Likewise.
14775 (note_template_header): Likewise.
14776 (is_member_template): Handle specializations.
14777 (end_template_decl): Call reset_specialization.
14778 (push_template_decl): Handle member template specializations.
14779 (tsubst): Likewise.
14780 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
14781 (instantiate_template): Handle specializations.
14782 (instantiate_decl): Likewise.
14783 (fn_type_unification): Handle explicit_targs.
14784 (type_unification): Likewise. Allow incomplete unification
14785 without an error message, if allow_incomplete.
14786 (get_bindings): Use new calling sequence for fn_type_unification.
14788 * spew.c (yylex): Handle PFUNCNAME.
14790 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
14791 (really_overloaded_fn): Likewise.
14792 (get_first_fn): Handle function templates.
14794 * typeck.c (build_x_function_call): Use really_overloaded_fn.
14795 Handle TEMPLATE_ID_EXPR.
14796 (build_x_unary_op): Likewise.
14797 (build_unary_op): Likewise.
14798 (mark_addressable): Templates whose address is taken are marked
14801 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
14803 * decl.c (init_decl_processing): Declare __builtin_constant_p as
14804 accepting any kind of type, not only int.
14806 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
14808 * search.c (get_matching_virtual): Notice virtual bases when sorrying
14809 about covariant returns.
14811 * parse.y (member_init): Also imply typename here. Remove ancient
14812 extension for initializing base members.
14814 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
14816 Handle multi-level typenames and implicit typename in base list.
14817 * parse.y (typename_sub{,[0-2]}): New rules.
14818 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
14819 (nonnested_type): New rule.
14820 (complete_type_name): Use it.
14821 (base_class.1): Use typename_sub and nonnested_type.
14822 (nested_name_specifier): Don't elide std:: here.
14823 * decl.c (make_typename_type): Handle getting a type for NAME.
14824 (lookup_name_real): Turn std:: into :: here.
14826 Rvalue conversions were removed in London.
14827 * call.c (is_subseq): Don't consider lvalue transformations.
14828 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
14829 (joust): Re-enable ?: kludge.
14831 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
14833 * decl.c (start_function): Up warning of no return type to be a
14836 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14838 * init.c (expand_member_init): Don't set TREE_USED.
14839 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
14840 set,don't clear TREE_USED wholesale.
14842 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
14844 * call.c (build_over_call): Do require_complete_type before
14847 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
14849 * search.c (lookup_field): Call complete_type in all cases.
14851 * decl.c (finish_function): Just warn about flowing off the end.
14853 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
14855 * decl.c (grokparms): Don't bash a permanent list node if we're
14858 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
14860 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
14862 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
14864 * call.c (build_new_op): Give better error for syntactically
14865 correct, but semantically invalid, use of undeclared template.
14867 * call.c (compare_qual): Handle pmfs.
14869 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
14870 after the exception spec.
14872 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
14874 * call.c (null_ptr_cst_p): Integer type, not integral type.
14876 * call.c (joust): Disable warnings until they can be moved to the
14879 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
14881 * Makefile.in, config-lang.in: Convert to autoconf.
14883 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
14885 * decl.c (lookup_name_real): Add implicit 'typename' to types from
14888 * pt.c (most_specialized_class): Fix typo.
14889 (tsubst): Move constant folding to TREE_VEC case.
14891 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
14893 * pt.c (do_poplevel): Don't warn about unused local variables
14894 while processing_template_decl since we don't always know whether
14895 or not they will need constructing/destructing.
14897 * pt.c (uses_template_parms): Check the values of an enumeration
14898 type to make sure they don't depend on template parms.
14900 * decl.c (make_typename_type): Don't lookup the field if the
14901 context uses template parms, even if we're not
14902 processing_template_decl at the moment.
14904 * pt.c (coerce_template_parms): Avoid looking at the
14905 TYPE_LANG_DECL portion of a typename type, since there won't be
14907 (tsubst): Do constant folding as necessary to make sure that
14908 arguments passed to lookup_template_class really are constants.
14910 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
14912 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
14913 * decl2.c (finish_file): Only register exception tables if we
14916 * decl.c (init_decl_processing): Add __builtin_[fs]p.
14918 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
14920 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
14922 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
14924 * error.c (dump_decl): Avoid crashing when presented with a
14925 uninitialized constant, as can occur with a template parameter.
14926 (dump_expr): Make sure that there are enough levels of
14927 current_template_parms before we start diving through them.
14929 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
14931 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
14934 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14936 * except.c (expand_throw): Call build_delete for all
14937 exception types, not just objects with destructors.
14939 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
14941 * decl.c (current_local_enum): Remove static.
14942 * pt.c (tsubst_enum): Save and restore value of current_local_enum
14943 in case template is expanded in enum decl.
14944 (instantiate_class_template): Use new tsubst_enum signature.
14945 (tsubst_expr): Likewise.
14947 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
14949 * pt.c (begin_member_template_processing): Take a function as
14950 argument, not a set of template arguments. Use the template
14951 parameters, rather than the arguments. Handle non-type parameters
14952 correctly. Push a binding level for the parameters so that multiple
14953 member templates using the same parameter names can be declared.
14954 (end_member_template_processing): Pop the binding level.
14955 (push_template_decl): Mark member templates as static when
14958 * lex.c (do_pending_inlines): Pass the function, not its template
14959 arguments, to begin_member_template_processing.
14960 (process_next_inline): Likewise.
14961 (do_pending_defargs): Likewise.
14963 * error.c (dump_expr): Obtain the correct declaration for a
14964 TEMPLATE_CONST_PARM.
14966 * call.c (add_template_conv_candidate): New function.
14967 (build_object_call): Handle member templates, as done in the other
14970 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
14972 * decl.c (replace_defag): Undo previous change.
14973 * lex.c (do_pending_defargs): Deal with member templates.
14975 * pt.c (is_member_template): Avoid crashing when passed a
14976 non-function argument.
14978 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
14980 * class.c (grow_method): Remove check for redeclaration.
14982 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
14984 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
14985 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
14986 (PRIMARY_TEMPLATE_P): Use it.
14987 * call.c (build_overload_call_real): Use it.
14988 * class.c (instantiate_type): Likewise.
14989 * decl.c (decls_match): Likewise.
14990 * method.c (build_overload_identifier): Likewise.
14991 * pt.c (push_template_decl): Likewise.
14992 (classtype_mangled_name): Likewise.
14993 (lookup_template_class): Likewise.
14995 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
14996 DECL_NTPARMS to conform to usage elsewhere.
14997 * call.c (add_template_candidate): Likewise.
14998 * class.c (instantiate_type): Likewise.
14999 * pt.c (instantiate_template): Likewise.
15000 (get_bindings): Likewise.
15002 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
15003 is_member_template.
15005 * pt.c (unify): Undo changes to allow multiple levels of template
15007 (type_unification): Likewise.
15008 (fn_type_unification): Likewise.
15009 (get_class_bindings): Likewise.
15010 * cp-tree.h (Likewise).
15012 * decl.c (replace_defarg): Check that the type of the default
15013 parameter does not invlove a template type before complaining
15014 about the initialization.
15016 * error.c (dump_expr): Deal with template constant parameters in
15017 member templates correctly.
15019 * pt.c (is_member_template): Deal with class specializations
15021 (tsubst): Handle "partial instantiation" of member templates
15024 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
15026 * pt.c (type_unification): Change calling sequence to allow for
15027 multiple levels of template parameters.
15028 (tsubst_expr): Likewise.
15029 (tsubst): Likewise.
15030 (tsubst_copy): Likewise.
15031 (instantiate_template): Likewise.
15033 * call.c (build_overload_call_real): Use it.
15034 (add_builtin_candidate): Use it.
15035 (build_new_method_call): Use it.
15036 * class.c (instantiate_type): Use it.
15037 * decl.c (grokdeclarator): Use it.
15038 * decl2.c (finish_file): Use it.
15039 * method.c (build_overload_identifier): Use it.
15041 * call.c (add_template_candidate): Add additional parameter for
15042 the function return type. Call fn_type_unification istead of
15044 (build_user_type_conversion_1): Handle member templates.
15045 (build_new_function_call): Likewise.
15046 (build_new_op): Likewise.
15047 (build_new_method_call): Likewise.
15049 * class.c (grow_method): Don't give an error message indicating
15050 that two member templates with the same name are ambiguous.
15051 (finish_struct): Treat member template functions just like member
15054 * cp-tree.h (check_member_template): Add declaration.
15055 (begin_member_template_processing): Likewise.
15056 (end_member_template_processing): Likewise.
15057 (fn_type_unification): Likewise.
15058 (is_member_template): Likewise.
15059 (tsubst): Change prototype.
15060 (tsubst_expr): Likewise.
15061 (tsubst_copy): Likewise.
15062 (instantiate_template): Likewise.
15063 (get_bindings): Likewise.
15065 * decl.c (decls_match): Handle multiple levels of template
15067 (pushdecl): Handle template type params just like other type
15069 (push_class_level_binding): Return immediately if the
15070 class_binding_level is NULL.
15071 (grokfndecl): If check_classfn() returns a member_template, use
15072 the result of the template, not the template itself.
15074 * decl2.c (check_member_template): New function. Check to see
15075 that the entity declared to be a member template can be one.
15076 (check_classfn): Allow redeclaration of member template functions
15077 with different types; the new functions can be specializations or
15078 explicit instantiations.
15080 * error.c (dump_decl): Handle multiple levels of template
15082 (dump_function_decl): Update to handle function templates.
15084 * lex.c (do_pending_inlines): Set up template parameter context
15085 for member templates.
15086 (process_next_inline): Likewise.
15088 * method.c (build_overload_identifier): Adjust for multiple levels
15089 of template parameters.
15091 * parse.y (fn.def2): Add member templates.
15092 (component_decl_1): Likewise.
15094 * pt.c (begin_member_template_processing): New function.
15095 (end_member_template_processing): Likewise.
15096 (is_member_template): Likewise.
15097 (fn_type_unification): Likewise.
15098 (current_template_parms): Return a vector of all the template
15099 parms, not just the innermost level of parms.
15100 (push_template_decl): Deal with the possibility of member
15102 (lookup_template_class): Likewise.
15103 (uses_template_parms): Likewise.
15104 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
15105 TEMPLATE_CONST_PARM to deal with multiple levels of template
15106 arguments. Add processing of TEMPLATE_DECL to produce new
15107 TEMPLATE_DECLs from old ones.
15108 (do_decl_instantiation): Handle member templates.
15110 * search.c (lookup_fnfields_1): Handle member template conversion
15113 * tree.c (cp_tree_equal): Check the levels, as well as the
15114 indices, of TEMPLATE_CONST_PARMs.
15116 * typeck.c (comptypes): Check the levels, as well as the indices,
15117 fo TEMPLATE_TYPE_PARMs.
15118 (build_x_function_call): Treat member templates like member
15121 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
15123 * typeck.c (c_expand_return): Always convert_for_initialization
15124 before checking for returning a pointer to local.
15126 * pt.c (type_unification): If strict and the function parm doesn't
15127 use template parms, just compare types.
15129 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
15131 * method.c (build_overloaded_value): Replace direct call
15132 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
15134 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
15136 * typeck.c (convert_arguments): Don't arbitrarily choose the first
15137 of a set of overloaded functions.
15139 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
15141 * lex.c (real_yylex): Don't elide __FUNCTION__.
15143 * method.c (build_overload_value): Add in_template parm.
15144 (build_overload_int): Likewise.
15145 (build_overload_identifier): Pass it.
15147 * decl.c (duplicate_decls): Don't bash a previous template
15148 definition with a redeclaration.
15150 * pt.c (unify): float doesn't match double.
15152 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
15153 TYPE_DECL. Handle getting non-template types.
15154 * parse.y (explicit_instantiation): Use typespec instead of
15155 aggr template_type.
15157 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
15159 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
15161 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
15163 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
15164 (compare_ics): Likewise.
15166 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
15168 * call.c (joust): Warn about choosing one conversion op over
15169 another because of 'this' argument when the other return type is
15171 (source_type): New fn.
15173 * call.c (build_new_op): Strip leading REF_BIND from first operand
15174 to builtin operator.
15176 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
15179 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
15181 * call.c (null_ptr_cst_p): Remove support for (void*)0.
15183 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
15185 * typeck.c (expand_target_expr): Make definition match declaration.
15187 * class.c (get_basefndecls): Make definition match declaration.
15189 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
15191 * input.c (sub_getch): Eventually give up and release the input file.
15193 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
15196 * call.c (joust): Tweak message.
15198 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
15200 * error.c (type_as_string): Put const/volatile on template type
15201 parameters where appropriate.
15203 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
15205 * call.c (strictly_better): Make arguments unsigned ints.
15207 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
15209 * lex.c (real_yylex): Refer to __complex instead of complex.
15211 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
15213 * lex.c (real_yylex): Don't use getc directly.
15215 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
15217 * call.c (is_subseq): Don't try to be clever.
15219 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
15221 * parse.y, pt.c: Include "except.h".
15222 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
15223 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
15224 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
15225 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
15228 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
15230 * decl2.c (mark_vtable_entries): Instead of replacing pure
15231 virtuals with a reference to __pure_virtual, copy the decl and
15234 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
15236 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
15238 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
15240 * pt.c (instantiate_class_template): Call repo_template_used
15241 before finish_prevtable_vardecl.
15243 * call.c (is_subseq): New fn.
15244 (compare_ics): Use it.
15246 * repo.c (finish_repo): Don't crash on no args.
15248 * parse.y (named_complex_class_head_sans_basetype): Handle
15249 explicit global scope.
15250 * decl2.c (handle_class_head): New fn.
15252 * pt.c (unify): Add CONST_DECL case.
15254 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15256 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
15258 * cp-tree.h (report_type_mismatch): Add prototype.
15259 * call.c (build_overload_call_real): Remove erroneous fourth
15260 argument to report_type_mismatch.
15261 (build_user_type_conversion_1): Remove erroneous second arg to
15263 (build_new_function_call): Likewise.
15264 (build_object_call): Likewise.
15265 (build_new_op): Likewise.
15266 (build_new_method_call): Likewise.
15268 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
15270 * error.c (dump_decl): Don't bother processing a function with no
15271 DECL_LANG_SPECIFIC.
15273 * method.c (emit_thunk): Call init_function_start in the macro case.
15275 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
15277 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
15278 defined and used to set flag_vtable_thunks.
15280 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
15282 * parse.y: Don't clear the inlines from their obstack until they've
15283 all been processed.
15285 * decl.c (duplicate_decls): Don't complain about exception
15286 specification mismatch if flag_exceptions is off.
15288 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
15290 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
15292 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
15294 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
15295 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
15296 Include <stdio.h> before include files that formerly used STDIO_PROTO.
15298 * decl.c, g++spec.c, lex.c, method.c, repo.c:
15299 Include "config.h" first, as per autoconf manual.
15301 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
15303 * decl.c (duplicate_decls): Tweak wording.
15304 * lex.c (do_pending_defargs): Don't die if we see a default arg
15305 that isn't a DEFAULT_ARG.
15306 * error.c (dump_expr): Handle DEFAULT_ARG.
15308 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
15309 * lang-options.h: Add -fhandle-exceptions.
15311 * class.c (build_vtable): Vtables are artificial.
15312 (prepare_fresh_vtable): Likewise.
15314 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15316 * cvt.c (ocp_convert): After converting to the target type, set
15317 LOOKUP_NO_CONVERSION.
15319 * call.c (joust): Warn about potentially confusing promotion rules
15321 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
15323 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
15325 * exception.cc: Declare __terminate_func with noreturn attribute.
15327 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
15329 * parse.y: Break out eat_saved_input, handle errors.
15330 (function_try_block): Use compstmt instead of compstmt_or_error.
15332 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
15334 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
15336 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15338 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
15339 existence of cc1plus check whether $(LANGUAGES) contains C++.
15341 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15343 * method.c (do_build_copy_constructor): When copying an anonymous
15344 union member loop around to handle nested anonymous unions. Use
15345 the offset of the member relative to the outer structure, not the
15348 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
15350 * call.c (resolve_args): New fn.
15351 (build_new_function_call): Use it.
15352 (build_object_call): Likewise.
15353 (build_new_method_call): Likewise.
15355 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
15357 * call.c (build_over_call): tsubst all default parms from templates.
15359 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
15361 * decl.c (struct cp_function): Add static_labelno.
15362 (push_cp_function_context): Save it.
15363 (pop_cp_function_context): Restore it.
15365 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
15367 * typeck.c (build_component_ref_1): Convert from reference.
15369 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15371 * parse.y (current_declspecs, prefix_attributes): Initialize to
15374 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
15375 before we try to force it to be a TREE_LIST.
15376 (decl): Make sure $1.t is non-nil.
15378 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
15380 * pt.c (uses_template_parms): Handle template first-parse codes.
15382 * decl.c (cp_finish_decl): Only warn about user-defined statics.
15384 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
15386 * pt.c (unify): Handle BOOLEAN_TYPE.
15388 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
15389 * pt.c (tsubst): Don't set it.
15390 * call.c (build_over_call): Use uses_template_parms.
15392 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
15394 * method.c (build_overload_nested_name): Use static_labelno
15395 instead of var_labelno.
15396 (build_qualified_name): New fn.
15397 (build_overload_name): Split out from here.
15398 (build_static_name): Use build_qualified_name.
15399 * decl.c (cp_finish_decl): Statics in extern inline functions
15400 have comdat linkage.
15401 (start_function): Initialize static_labelno.
15403 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15405 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
15406 before "all member functions in class [] are private".
15408 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
15410 * lex.c (do_scoped_id): convert_from_reference.
15411 * init.c (build_offset_ref): Likewise.
15413 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
15415 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
15417 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
15419 * typeck.c (get_member_function_from_ptrfunc): Promote index
15422 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
15424 * tree.c (layout_basetypes): Move non-virtual destructor warning.
15425 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
15427 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15429 * decl.c (grokdeclarator): Call add_defarg_fn for the function
15431 * lex.c (add_defarg_fn): Adjust.
15432 (do_pending_defargs): Adjust. Don't skip the first parm.
15434 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
15436 * decl.c (build_enumerator): Global enumerators are also readonly.
15438 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
15439 (build_dynamic_cast): Call it and convert_from_reference.
15441 * lex.c (add_defarg_fn): New fn.
15442 (snarf_defarg): Don't add to defarg_types.
15443 (do_pending_defargs): Lose defarg_types. All fns we process now
15445 * decl.c (grokfndecl): Call add_defarg_fn.
15447 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
15448 * cp-tree.def: Add DEFAULT_ARG.
15449 * spew.c (yylex): Call snarf_defarg as appropriate.
15450 * parse.y: New tokens DEFARG and DEFARG_MARKER.
15451 (defarg_again, pending_defargs, defarg, defarg1): New rules.
15452 (structsp): Use pending_defargs.
15453 (parms, full_parm): Use defarg.
15454 * lex.c (init_lex): Initialize inline_text_firstobj.
15455 (do_pending_inlines): Never pass the obstack to feed_input.
15456 (process_next_inline): Call end_input instead of restore_pending_input.
15457 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
15458 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
15459 * input.c (end_input): New fn.
15460 (sub_getch): At the end of some fed input, just keep returning EOF
15461 until someone calls end_input.
15462 Remove 'obstack' field from struct input_source.
15463 * decl.c (grokparms): Handle DEFAULT_ARG.
15464 (replace_defarg): New fn.
15465 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
15467 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
15469 * call.c (implicit_conversion): If nothing else works, try binding
15470 an rvalue to a reference.
15472 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
15474 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
15475 ifndef for Cygwin32 to include SIGSEGV.
15477 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
15479 * class.c (finish_struct_1): Only complain about pointers without
15480 copy stuff if there are any constructors.
15482 * rtti.c (build_dynamic_cast): Call complete_type on the types.
15484 * decl.c (grokfndecl): If the function we chose doesn't actually
15487 * decl2.c (grokclassfn): Don't specify 'const int' for the
15488 artificial destructor parm.
15490 * pt.c (type_unification): If we are called recursively, nothing
15493 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
15495 * decl.c (init_decl_processing): Stop trying to catch signals
15496 other than SIGABRT since the Cygwin32 library doesn't support
15497 them correctly yet. This fixes a situation in which g++ causes
15498 a hang on SIGSEGVs and other such signals in our Win32-hosted
15501 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
15503 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
15505 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
15507 * typeck2.c (store_init_value): Always return the value if our
15508 type needs constructing.
15510 * method.c (hack_identifier): Convert class statics from
15513 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
15515 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
15517 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
15519 * typeck.c (c_expand_return): Make sure we clean up temporaries at
15520 the end of return x;
15522 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15524 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
15526 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
15528 * except.c (expand_builtin_throw): Add support
15529 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
15531 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
15533 * repo.c (extract_string): Null-terminate.
15535 * cp-tree.h (TI_SPEC_INFO): New macro.
15536 (CLASSTYPE_TI_SPEC_INFO): New macro.
15537 * pt.c (push_template_decl): Correctly determine # of template parms
15540 * call.c (compare_ics): Really fix 'this' conversions.
15542 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
15545 * pt.c (push_template_decl): Complain about mismatch in # of
15546 template parms between a class template and a member template.
15548 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
15550 * method.c (synthesize_method): You can't call
15551 function_cannot_inline_p after finish_function.
15552 * decl.c (finish_function): Turn on flag_inline_functions and turn
15553 off DECL_INLINE before handing a synthesized method to the
15556 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15558 * method.c (synthesize_method): Remove July 30 change to never set
15559 DECL_INLINE if at_eof.
15561 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
15563 * xref.c (GNU_xref_member): Ensure that the node has a
15564 decl_lang_specific part before checking DECL_FRIEND_P.
15566 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
15568 * pt.c (instantiate_class_template): Diagnose non-class types used
15571 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
15573 * typeck.c (build_conditional_expr): Use convert_for_initialization
15574 instead of convert_and_check.
15576 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15578 * parse.y (typespec): Don't pedwarn for typeof.
15580 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
15582 * repo.c (finish_repo): Only check changes if we would write a
15585 * call.c (compare_ics): Fix handling of 'this' conversions.
15587 * pt.c (do_decl_instantiation): Support static data too. Rename
15588 from do_function_instantiation.
15589 * cp-tree.h: Adjust.
15592 * repo.c (extract_string): New fn.
15593 (get_base_filename): Use it.
15594 (init_repo): Compare old args with current args.
15596 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
15598 * Makefile.in, Make-lang.in: Protect C-ls with a comment
15599 character, idea from Paul Eggert <eggert@twinsun.com>.
15601 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
15603 * typeck.c (c_expand_return): Be more persistent in looking for
15606 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
15607 pointer to reference.
15609 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
15611 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
15613 * init.c (build_member_call, build_offset_ref):
15614 Use do_scoped_id instead of do_identifier.
15616 * cvt.c (convert): Remove bogosity.
15618 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15620 * cvt.c (build_up_reference): Do checks of ARGTYPE and
15621 TARGET_TYPE before trying to use get_binfo.
15623 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
15625 * cvt.c (build_up_reference): Call get_binfo to get access control.
15627 * decl2.c (import_export_decl): If we don't support weaks, leave
15630 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
15632 * except.c (expand_builtin_throw): Add support for machines that
15633 cannot access globals after throw's epilogue when
15634 -fno-sjlj-exceptions is used.
15636 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
15638 * parse.y: 'std::' becomes '::'.
15639 * lex.c (real_yylex): Remove 'namespace' warning.
15640 * init.c (build_member_call): Ignore 'std::'.
15641 (build_offset_ref): Likewise.
15642 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
15643 (do_toplevel_using_decl): Ignore 'using std::whatever'.
15644 * decl.c (push_namespace): Just sorry.
15645 (pop_namespace): Nop.
15646 (init_decl_processing): Declare std namespace.
15648 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
15650 * search.c (push_class_decls): A name which ambiguously refers to
15651 several instantiations of the same template just refers to the
15654 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
15656 * decl.c (build_enumerator): Fix problem with unsigned long
15657 enumerated values being smashed to ints, causing overflow
15658 when computing next enumerated value (for enum values around
15661 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
15663 * typeck.c (build_component_ref): Only call mark_used on a decl.
15665 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15667 * typeck.c (build_c_cast): Make the check for a ptr to function
15668 more specific before possible default_conversion call.
15670 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
15672 * except.c (expand_exception_blocks): Simplify and fix and make
15673 sure we don't end a region in a sequence, as expand_end_bindings
15676 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
15678 * except.c (init_exception_processing): Mark terminate as not
15679 returning so that the optimizer can optimize better.
15681 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
15683 * cvt.c (convert): Don't do any extra work, if we can avoid it
15686 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
15688 * *.[chy]: Change cp_convert to ocp_convert, change convert to
15689 cp_convert. convert is now reserved for the backend, and doesn't
15690 have the semantics a frontend person should ever want.
15692 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
15694 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
15695 Lose -traditional support.
15697 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
15699 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
15701 * parse.y (self_reference): Do it for templates, too.
15702 * class.c (pushclass): Don't overload_template_name; the alias
15703 generated by build_self_reference serves the same purpose.
15705 * tree.c (list_hash): Make static, take more args.
15706 (list_hash_lookup): Likewise.
15707 (list_hash_add): Make static.
15708 (list_hash_canon): Lose.
15709 (hash_tree_cons): Only build a new node if one isn't already in the
15711 (hash_tree_chain): Use hash_tree_cons.
15712 * cp-tree.h: Adjust.
15713 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
15714 of calling lookup_name.
15716 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
15718 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
15719 doesn't refer to the CONST_DECLs.
15721 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
15723 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
15725 (expand_class_desc): Convert the last argument to a sizetype.
15727 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
15729 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
15730 __real__): Add reswords.
15731 * hash.h: Regenerate.
15732 * lex.h (rid): Add RID_COMPLEX.
15733 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
15734 * lex.c (init_lex): Add building of RID_COMPLEX.
15735 (real_yylex): General cleanup in line with what c-lex.c also has,
15736 sans the cruft for traditional; add handling of SPEC_IMAG, complex
15737 types, and imaginary numeric constants.
15738 * parse.y (REALPART, IMAGPART): Add tokens.
15739 (unary_expr): Add REALPART and IMAGPART rules.
15740 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
15741 * decl.c (complex_{integer,float,double,long}_type_node): Define
15743 (init_decl_processing): Set up the types.
15744 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
15745 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
15746 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15747 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
15748 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
15750 * method.c (build_overload_name): Add handling of the different
15751 COMPLEX_TYPEs, prefixing them with `J'.
15752 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
15753 as a template parm.
15754 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
15755 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
15756 (mapcar): Handle COMPLEX_CST.
15757 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
15758 (common_type): Add code for complex types.
15759 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15760 (convert_for_assignment): Likewise.
15761 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
15763 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
15765 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
15766 tsubst_expr, as it might try to do overload resolution.
15768 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
15770 * pt.c (instantiate_class_template): Oops.
15772 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
15774 * cp-tree.def: Add TAG_DEFN.
15775 * pt.c (tsubst_enum): New fn.
15776 (instantiate_class_template): Use it.
15777 (tsubst_expr): Support TAG_DEFN.
15778 (tsubst): Support local enums.
15779 (tsubst_copy): Likewise.
15780 * decl.c (finish_enum): Likewise.
15781 (start_enum): If this is a local enum, switch to permanent_obstack.
15783 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
15785 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
15786 (finish_function): Put the base init code for constructors just
15787 after the parm cleanup insns.
15788 (struct cp_function): Add last_parm_cleanup_insn.