1 1999-09-13 Nathan Sidwell <nathan@acm.org>
3 * typeck.c (expr_sizeof): Don't decay arrays and functions.
4 Remove misleading comment.
5 (build_compound_expr): Don't decay arrays.
7 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
9 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
12 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
16 * g++spec.c: Include gcc.h.
17 (lang_specific_driver): Constify a char*. Call xcalloc, not
18 xmalloc/bzero. All calls to the function pointer parameter now
19 explicitly call `fatal'.
21 1999-09-12 Mark Mitchell <mark@codesourcery.com>
23 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
24 * cvt.c (ocp_convert): Complete the from and destination types.
25 Adjust warning about functions always being `true' in conditionals.
26 * decl.c (duplicate_decls): Don't play funny games with abort.
27 * error.c (dump_expr): Handle OVERLOADs.
28 * spew.c (probe_obstack): Remove.
29 * typeck.c (condition_conversion): Use perform_implicit_conversion.
31 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
33 * cp-tree.h (auto_function, define_function): Adjust prototypes.
34 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
36 (auto_function): Likewise, for CODE arg.
37 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
38 (builtin_function): ... here.
40 1999-09-11 Mark Mitchell <mark@codesourcery.com>
42 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
43 (init_decl_processing): Don't set TREE_PERMANENT for the
45 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
46 (grokdeclarator): Likewise.
47 (grokparms): Don't check TREE_PERMANENT when building up lists.
48 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
49 (mark_inline_for_output): Likewise.
50 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
51 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
52 * lex.c (check_newline): Don't check ggc_p; it is always one.
53 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
54 * spew.c (yylex): Don't copy_node or probe_obstacks for
55 non-permanent CONSTANTs and STRINGs.
56 * tree.c (build_cplus_array_type_1): Don't fuss with
57 TREE_PERMANENT on ARRAY_TYPEs.
59 * cp-tree.def (CLEANUP_STMT): New node.
60 * cp-tree.h (language_function): Add name_declared.
61 (current_function_name_declared): New macro.
62 (CLEANUP_DECL): New macro.
63 (CLEANUP_EXPR): Likewise.
64 (emit_local_var): Likewise.
65 (finish_decl_cleanup): New function.
66 * cvt.c (build_up_reference): Simplify.
67 (ocp_convert): Remove dead code.
68 * decl.c (start_decl): Remove call to add_decl_stmt.
69 (grok_reference_init): Adjust, to handle bindings temporaries to
70 references. Remove dead code.
71 (initialize_local_var): Don't generate RTL for
72 declarations here, or build cleanups here. Don't fuss with
73 obstacks. Replace expand_start_target_temps calls with explicit
74 setting of stms_are_full_exprs_p.
75 (destroy_local_var): New function.
76 (emit_local_var): Likewise.
77 (cp_finish_decl): Use them, as appropriate.
78 (start_function): Announce template functions.
79 (store_parm_decls): Don't call declare_function_name here.
80 (finish_stmt): Don't start emit base-initialization code when just
81 building the statement-tree.
82 * init.c (create_temporary_var): Move add_decl_stmt call ...
83 (get_temp_regvar): Here.
84 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
85 cp_finish_decl would expect. Don't call add_decl_stmt.
86 * semantics.c (begin_compound_stmt): Call declare_function_name,
88 (finish_decl_cleanup): New function.
89 (expand_stmt): Use emit_local_var to output variables.
90 (expand_body): Set current_funtion_name_declared.
92 1999-09-10 Mark Mitchell <mark@codesourcery.com>
94 * cp-tree.h (finish_cleanup_try_block): New function.
95 * semantics.c (finish_cleanup_try_block): Add comment.
97 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
99 * cp-tree.h: Delete declarations for all tree nodes now moved to
101 * decl.c: Delete their definitions.
102 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
103 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
105 (init_decl_processing): Call build_common_tree_nodes and
106 build_common_tree_nodes_2 instead of building their nodes here.
107 Don't add gc roots for them.
109 1999-09-10 Mark Mitchell <mark@codesourcery.com>
111 * cp-tree.h (language_function): Rename expanding_p to
112 x_expanding_p. Rename named_label_uses to x_named_label_uses.
113 (expanding_p): Adjust accordingly.
114 (TREE_VIA_PRIVATE): Fix typo in comment.
115 (DECL_REFERENCE_SLOT): Remove.
116 (SET_DECL_REFERENCE_SLOT): Likewise.
117 * decl.c (named_label_uses): Adjust. Remove chicken comment.
118 (push_overloaded_decl): Don't truncate the chain of bindings when
119 adding an overloaded function.
120 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
121 (initialize_local_var): Fix typo in comment.
122 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
123 * decl2.c (start_objects): Make the fact that we are expanding
124 the generated function right away explicit.
125 (start_static_storage_duration_function): Likewise.
126 (finish_file): Fix typo in comment.
127 * init.c (build_vec_init): Correct bugs in handling cleanups.
128 * semantics.c (maybe_convert_cond): New function.
129 (FINISH_COND): Always store the condition, even if there's
131 (finish_if_stmt_cond): Use maybe_convert_cond.
132 (finish_while_stmt_cond): Likewise.
133 (finish_do_stmt): Likewise.
134 (finish_for_cond): Likewise.
135 (expand_cond): Adjust.
137 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
138 * init.c (perform_member_init): Remove obstack machinations.
139 (expand_cleanup_for_base): Likewise.
140 (finish_init_stmts): Mark the statement-expression as used.
141 * method.c (emit_thunk): Use tree-generating functions, not
143 (do_build_copy_constructor): Likewise.
144 (do_build_assign_ref): Likewise.
145 (synthesize_method): Likewise. Keep track of line numbers.
146 * pt.c (tsubst_expr): Handle various kinds of try blocks.
147 * semantics.c (expand_stmts): Remove.
148 (begin_function_try_block): Set FN_TRY_BLOCK_P.
149 (finish_function_try_block): Be careful rechaining
151 (expand_stmt): Loop through all the statements at a given level.
152 (exapnd_body): Be careful with line-numbers here too. Prepare for
153 being called directly from the parser.
155 * cp-tree.h (finish_function): Adjust prototype.
156 * decl.c (finish_function): Return the function compiled.
157 * pt.c (instantiate_decl): Don't play games with obstacks.
158 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
159 (search_tree): Likewise.
160 * typeck.c: Fix typo in comment.
161 * typeck2.c (store_init_value): Add comment.
163 * cp-tree.h (CPTI_ATEXIT): New macro.
164 (atexit_node): Likewise.
165 * decl.c (destroy_local_static): New function, broken out from ...
166 (expand_static_init): Here.
168 * rtti.c (get_tinfo_var): These should always be global
169 (expand_si_desc): Use tree, not RTL, functions to generate code.
170 (expand_class_desc): Likewise.
171 (expand_ptr_desc): Likewise.
172 (expand_attr_desc): Likewise.
173 (expand_generic_desc): Likewise.
174 (synthesize_tinfo_fn): Likewise.
176 1999-09-09 Mark Mitchell <mark@codesourcery.com>
178 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
179 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
181 (RECHAIN_STMST_FROM_CHAIN): Likewise.
183 * parse.y (simple_stmt): Fix typo in last change.
185 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
186 (STMT_IS_FULL_EXPR_P): Likewise.
187 (STMT_LINENO_FOR_FN_P): Likewise.
188 (prep_stmt): New function.
189 (building_stmt_tree): Tweak for safety.
190 * pt.c (tsubst_expr): Use prep_stmt throughout.
191 (add_tree): Move it to semantics.c
192 * semantics.c (add_tree): Move it here.
193 (finish_expr_stmt_real): New function.
194 (finish_expr_stmt): Use it.
195 (finish_if_stmt_cond): Use FINISH_COND.
196 (finish_while_stmt_cond): Likewise.
197 (finish_for_cond): Likewise.
198 (finish_stmt_tree): Tweak line-number handling.
199 (prep_stmt): New function.
200 (expand_stmt): Use it.
202 * cp-tree.h (begin_switch_stmt): Adjust prototype.
203 (finish_switch_cond): Likewise.
204 * parse.y (simple_stmt): Adjust accordingly.
205 * parse.c: Regenerated.
206 * pt.c (tsubst_expr): Adjust accordingly.
207 * semantics.c (expand_cond): New function.
208 (FINISH_COND): New macro.
209 (begin_switch_stmt): Build the SWITCH_STMT here.
210 (finish_switch_stmt_cond): Not here.
211 (expand_stmt): Adjust calls to begin_switch_stmt and
212 finish_switch_cond. Use expand_cond throughout.
214 * dump.c (dequeue_and_dump): Dump types for constants.
215 Describe DECL_ARG_TYPE more intuitively.
218 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
219 (lang_cleanup_tree): Remove.
220 * lex.c (make_lang_type): Use ggc_alloc to allocate
223 Reorganize per-function data.
224 * cp-tree.h (saved_scope): Add function_decl, bindings.
225 (language_function): Rename binding_level to bindings.
226 (cp_function_chain): Use the current_function, not the
227 outer_function_chain.
228 (current_class_ptr): Make it work, even when there's no
230 (current_class_ref): Likewise.
231 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
233 (clear_temp_name): Remove.
234 * decl.c (check_function_type): New function, broken out from
236 (current_binding_level): Adjust definition.
237 (pushlevel): Simplify.
238 (poplevel): Don't use named_label_uses when we're outside
240 (mark_saved_scope): Mark function_decl and bindings.
241 (maybe_push_to_top_level): Don't unconditionally push a new
242 function context. Save bindings and the current_function_decl.
243 Don't clear named_labels.
244 (pop_from_top_level): Pop function context if appropriate.
245 (init_decl_processing): Set init_lang_status and free_lang_status,
246 rather than save_lang_status and restore_lang_status.
247 (start_function): Take SF_* flags. Don't clear per-function data.
248 Reorder and simplify to use new per-function data code. Add
250 (store_parm_decls): Don't call init_function_start here.
251 (finish_function): Adjust for new handling of per-function data.
252 (push_cp_function_context): Simplify.
253 (mark_cp_function_context): Change binding_level to bindings.
254 * decl2.c (clear_temp_name): Remove.
255 (start_objects): Use SF flags to start_function.
256 (start_static_storage_duration_function): Likewise.
257 * except.c (start_anon_func): Remove redundant calls to
258 push_function_context_to. Use SF flags to start function.
259 (end_anon_func): Remove redundant call to pop_function_context
261 * lex.c (reinit_parse_for_function): Don't initialize per-function
263 * method.c (emit_thunk): Clear current_function after calling
264 assemble_end_function. Use SF flags for start_function.
265 (synthesize_method): Use SF flags for start_function.
266 * parse.c: Regenerated.
267 * parse.y (fn.defpen): Likewise.
268 (pending_inline): Clear current_function, even if something goes
270 * pt.c (instantiate_decl): Use SF flags to start_function.
271 Don't save and restore expanding_p.
272 (add_tree): Handle the case where we are outside any function.
273 (end_tree): Likewise.
274 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
275 * semantics.c (begin_function_definition): Likewise.
276 (expand_body): Likewise.
278 1999-09-09 Nathan Sidwell <nathan@acm.org>
280 * cp-tree.h (convert_to_void): Prototype new function.
281 (require_complete_type_in_void): Remove prototype.
282 * cvt.c (convert_to_void): New function.
283 (ocp_convert): Use convert_to_void.
284 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
286 * typeck.c (require_complete_type_in_void): Remove function.
287 (build_compound_expr): Use convert_to_void.
288 (build_static_cast): Likewise.
289 (build_c_cast): Likewise.
290 * semantics.c (finish_expr_stmt): Do not decay full expressions.
292 * typeck.c (build_x_compound_expr): Add FIXME.
294 1999-09-08 Mark Mitchell <mark@codesourcery.com>
296 * cp-tree.h (scratch_tree_cons): Remove.
297 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
298 and perm_tree_cons with plain tree_cons.
302 * except.c: Likewise.
306 * method.c: Likewise.
311 * search.c: Likewise.
312 * typeck.c: Likewise.
313 * parse.c: Regenerated.
314 * tree.c (build_srcloc): Simplify.
316 1999-09-08 Mark Mitchell <mark@codesourcery.com>
318 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
320 (LANG_DECL_PERMANENT): Remove.
321 * decl.c (duplicate_decls): Don't mess about with obstacks trying
323 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
324 * lex.c (free_lang_decl_chain): Remove.
325 (build_lang_decl): Don't use obstacks.
326 (retrofit_lang_decl): Likewise.
327 (copy_lang_decl): Likewise.
329 * cp-tree.h (saved_scope): Remove old_binding_level and
330 function_decl. Tidy up.
331 * decl.c (mark_saved_scope): Don't set them.
332 (maybe_push_to_top_level): Clear memory.
334 * decl.c (layout_var_decl): Change prototype. Don't complete
335 types for external objects.
336 (check_initializer): Likewise. Tidy.
337 (initialize_local_var): Complete types here.
338 (cp_finish_decl): Not here. Reorganize a little.
339 (grokvardecl): Don't complete types here.
341 * decl.c (start_function): Clear last_dtor_insn and
342 last_parm_cleanup_insn.
343 (push_cp_function_context): Just copy over a little of
344 the old context, not all of it.
346 * cp-tree.h (copy_to_permanent): Remove.
347 (permanent_p): Likewise.
348 * decl.c (building_typename_type): Don't use copy_to_permanent.
349 (start_decl): Likewise.
350 (grok_reference_init): Likewise.
351 (cp_finish_decl): Likewise.
352 * init.c (build_new_1): Don't use mapcar.
353 (build_vec_delete_1): Don't use copy_to_permanent.
354 (build_vec_init): Likewise.
355 * parse.y (primary): Likewise.
356 * parse.c: Regenerated.
357 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
358 (lookup_template_class): Likewise.
359 (tsubst_friend_function): Likewise.
360 (instantiate_class_template): Likewise.
361 (tsubst_decl): Likewise.
363 (instantiate_template): Likewise.
365 * rtti.c (get_tinfo_fn): Likewise.
366 (build_dynamic_cast): Likewise.
367 * semantics.c (finish_if_stmt_cond): Likewise.
368 (finish_while_stmt_cond): Likewise.
369 (finish_do_stmt): Likewise.
370 (finish_for_cond): Likewise.
371 (finish_for_expr): Likewise.
372 (finish_cleanup): Likewise.
373 (add_decl_stmt): Likewise.
374 (finish_named_return_value): Likewise.
375 (finish_qualified_call_expr): Likewise.
376 * tree.c (perm_manip): Remove.
377 (build_exception_variant): Don't use copy_to_permanent.
378 (permanent_p): Remove.
379 (copy_to_permament): Remove.
380 (build_min_nt): Don't use copy_to_permanent.
381 (build_min): Likewise.
382 (min_tree_cons): Likewise.
383 * typeckc.c (build_static_cast): Likewise.
384 (build_reinterpret_cast): Likewise.
385 (build_const_cast): Likewise.
387 1999-09-07 Mark Mitchell <mark@codesourcery.com>
389 * decl.c (ggc_p): Set it to 1.
390 (mark_saved_scope): Add prototype.
392 1999-09-07 Richard Henderson <rth@cygnus.com>
394 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
395 * typeck.c (self_promoting_args_p): Delete.
397 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
399 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
400 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
402 1999-09-07 Mark Mitchell <mark@codesourcery.com>
404 * Makefile.in (tree.o): Depend on ggc.h.
405 * class.c (make_method_vec): Remove.
406 (free_method_vec): Likewise.
407 (free_method_vecs): Remove.
408 (add_method): Don't use them.
409 * cp-tree.def (PTRMEM_CST): Make it longer.
410 (TEMPLATE_PARM_INDEX): Make it shorter.
411 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
412 (template_parm_index): Remove RTL field.
413 (ptrmem_cst): Add RTL field.
414 (finish_function): Removed parameter.
415 (process_next_inline): Change prototype.
416 (init_cplus_unsave): Rename to init_tree.
417 (binding_init): Remove.
418 * decl.c (free_binding_nodes): Remove.
419 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
420 (pop_binding): Don't use free_binding_nodes.
421 (free_binding_vecs): Remove.
422 (store_bindings): Don't use them.
423 (pop_from_top_level): Likewise.
424 (lookup_namespace_name): Simplify.
425 (build_typename_type): Don't use obstack_free.
426 (unqualified_namespace_lookup): Simplify.
427 (lookup_name_real): Simplify.
428 (start_function): Remove comment about leaks.
429 (finish_function): Removed nested parameter. Call
430 expand_end_bindings even when building_stmt_tree.
431 Call ggc_push_context and ggc_pop_context around
432 rest_of_compilation, if necessary.
433 (mark_cp_function_context): Handle a NULL language-context.
434 (lang_mark_false_label_stack): Fix typo.
435 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
436 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
437 pointer to method types.
438 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
439 * decl2.c (finish_objects): Adjust call to finish_function.
440 (finish_static_store_duration_function): Likewise.
441 (do_nonmember_using_decl): Remove call to binding_init.
442 * except.c (end_anon_func): Adjust call to finish_function.
443 * lex.c (mark_impl_file_chain): New function.
444 (init_parse): Call init_tree, not init_cplus_unsave.
446 (cp_pramga_interface): Use xmalloc, not permalloc.
447 (cp_pragma_implementation): Likewise.
448 (begin_definition_of_inclass_inline): Simplify.
449 (process_next_inline): Adjust prototype.
450 (do_scoped_id): Don't call binding_init.
451 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
452 * method.c (emit_thunk): Adjust call to finish_function.
453 (synthesize_method): Likewise.
454 * parse.y (%union): Add a new `pi' variant.
455 (PRE_PARSED_FUNCTION_DECL): Use it.
456 (fn.defpen): Likewise.
457 (fndef): Adjust call to finish_function.
458 * pt.c (instantiate_decl): Likewise.
459 * rtti.c (syntheisze_tinfo_fn): Likewise.
460 * semantics.c (expand_body): Likewise.
461 * tree.c: Include ggc.h.
462 (mark_list_hash): New function.
463 (binding_init): Remove.
464 (init_cplus_unsave): Rename to ...
465 (init_tree): This. Add GC roots.
467 1999-09-05 Mark Mitchell <mark@codesourcery.com>
469 Get ready for garbage collection.
470 * Makefile.in (CXX_TREE_H): Add varray.h
471 (lex.o): Depend on ggc.h.
474 (method.o): Likewise.
475 (search.o): Likewise.
478 * class.c: Include ggc.h.
479 (current_class_name): Remove.
480 (current_class_type): Likewise.
481 (current_access_specifier): Likewise.
482 (previous_class_type): Likewise.
483 (previous_class_values): Likewise.
484 (class_cache_firstobj): Likewise.
485 (current_lang_base): Likewise.
486 (current_lang_stack): Likewise.
487 (current_lang_stacksize): Likewise.
488 (lang_name_c): Likewise.
489 (lang_name_cplusplus): Likewise.
490 (lang_name_java): Likewise.
491 (current_lang_name): Likewise.
492 (base_layout_decl): Likewise.
493 (access_default_node): Likewise.
494 (access_public_node): Likewise.
495 (access_protected_node): Likewise.
496 (access_private_node): Likewise.
497 (access_default_virtual_node): Likewise.
498 (access_public_virtual_node): Likewise.
499 (access_protected_virtual_node): Likewise.
500 (access_private_virtual_node): Likewise.
501 (signed_zero_node): Likewise.
502 (init_class_processing): Don't build base_layout_decl.
503 (push_lang_context): Adjust now that current_lang_base is a varray.
504 (pop_lang_context): Likewise.
505 * cp-tree.h: Include varray.h.
506 (cp_global_trees): Add access_default, access_public,
507 access_protected, access_private, access_default_virtual,
508 access_public_virtual, access_protected_virtual,
509 access_private_virtual, ctor_identifier, delta2_identifier,
510 delta_identifier, dtor_identifier, in_charge_identifier,
511 index_identifier, nelts_identifier, this_identifier,
512 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
513 lang_name_c, lang_name_cplusplus, lang_name_java,
514 empty_except_spec, null, jclass, minus_one, terminate.
515 (saved_scope): Move here from decl.c. Define globals in terms of
516 saved_scope: current_namespace, current_class_name,
517 current_class_type, current_access_specifier, current_lang_stack,
518 current_lang_base, current_lang_name, current_function_parms,
519 current_template_parms, processing_template_decl,
520 processing_specialization, processing_explicit_instantiation,
521 previous_class_type, previous_class_values, class_cache_firstobj.
522 (scope_chain): New variable.
523 (init_pt): New function.
524 * decl.c (current_namespace): Remove.
525 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
526 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
527 (delta_identifier, delta2_identifier): Likewise.
528 (pfn_or_delta2_identifier, tag_identifier): Likewise
529 (vt_off_identifier, empty_except_spec, null_node): Likewise.
530 (current_function_parms, current_lang_base): Remove.
531 (current_lang_stack, previous_class_values): Remove.
532 (class_binding_level): Macroize.
533 (saved_scope): Remove.
534 (current_saved_scope): Rename to scope_chain.
535 (mark_saved_scope): Adjust for new scope structure.
536 (maybe_push_to_top_level): Likewise.
537 (pop_from_top_level): Likewise.
538 (duplicate_decls): Adjust now that current_lang_base is a varray.
539 (build_typename_type): Call ggc_add_tree_hash_table_root.
540 (init_decl_processing): Call init_pt. Call push_to_top_level to
541 set up globals. Add GC roots.
542 (xref_basetypes): Adjust now that current_lang_base is a varray.
543 * decl.h (this_identifier): Remove.
544 (in_charge_identifier): Likewise.
545 * decl2.c: Don't include varray.h.
546 (current_namespace): Remove.
547 (init_decl2): Add GC roots.
548 * except.c (Terminate): Remove.
549 (init_exception_processing): Use terminate_node instead.
550 (build_terminate_handler): Likewise.
551 * init.c (nc_nelts_field_id): Remove.
552 (minus_one): Likewise.
553 (init_init_processing): Use minus_one_node and nelts_identifier
554 instead. Add GC roots.
555 (jclass_node): Remove.
556 (build_new_1): Use nelts_identifier.
557 (build_vec_init): Likewise.
558 (build_vec_delete): Likewise.
559 * lex.c: Include ggc.h.
560 (defarg_fn): Move declaration early.
561 (defarg_parms): Likewise.
562 (init_parse): Add GC roots.
563 (handle_cp_pragma): Remove redundant declaration of
565 * method.c: Include ggc.h.
566 (btypelist): Make it a varray. All uses changed.
567 (ktypelist): Likewise.
568 (init_method): Add GC roots.
569 * pt.c: Don't include varray.h. Include ggc.h.
570 (current_template_parms): Remove.
571 (processing_template_decl): Likewise.
572 (processing_specialization): Likewise.
573 (processing_explicit_instantiation): Likewise.
574 (init_pt): New function.
575 * repo.c: Include ggc.h.
576 (init_repo): Add GC roots.
577 * search.c: Don't include varray.h.
578 (_vptr_name): Remove.
579 (lookup_field_1): Use vtpr_identifier instead.
580 (expand_indirect_vtbls_init): Remove redundant declaration of
581 in_charge_identifier.
582 (init_search_processing): Use vptr_identifier.
584 1999-09-05 Richard Henderson <rth@cygnus.com>
585 Bernd Schmidt <bernds@cygnus.co.uk>
586 Mark Mitchell <mark@codesourcery.com>
588 * Makefile.in (parse.o): Depend on ggc.h.
589 (decl2.o): Depend on ggc.h.
590 (init.o): Depend on ggc.h.
591 * cp-tree.h (init_decl2): Declare.
592 (cp_parse_init): Likewise.
593 * decl.c (ggc_p): Define to zero.
594 (mark_saved_scope): New function.
595 (init_decl_processing): Call cp_parse_init, and cp_decl2.
597 (expand_static_init): Add GC roots.
598 * decl2.c: Include ggc.h.
599 (init_decl2): New function.
600 * init.c: Include ggc.h.
601 (init_init_processing): Add GC roots.
602 * parse.y: Include ggc.h.
603 (cp_parse_init): New function.
605 1999-09-04 Mark Mitchell <mark@codesourcery.com>
607 * decl.c (init_decl_processing): Set mark_lang_status.
608 (lang_mark_false_label_stack): Adjust prototype.
609 * decl2.c (grok_function_init): Remove extraneous declaration of
612 * Make-lang.in (cc1plus): Remove dependency on GGC.
613 * Makefile.in (OBJS): Don't mention ggc-simple.o.
614 (OBJDEPS): Don't mention ggc-simple.o.
616 * Make-lang.in (cc1plus): Depend on $(GGC).
617 * Makefile.in (OBJS): Add ggc-simple.o.
619 * cp-tree.h (language_function): Rename members to `x_' versions;
620 we now have x_named_labels, x_ctor_label, x_dtor_label,
621 x_base_init_list, x_member_init_list, x_base_init_expr,
622 x_current_class_ptr, x_current_class_ref, x_last_tree,
623 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
625 (dtor_label, ctor_label, current_base_init_list,
626 current_member_init_list, base_init_expr, current_class_ptr,
627 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
628 * decl.c: Include ggc.h.
629 (last_dtor_insn): Adjust to use x_ names.
630 (last_parm_cleanup_insn): Likewise.
631 (original_result_rtx): Likewise.
632 (named_labels): Likewise.
633 (mark_binding_level): New function.
634 (mark_cp_function_context): Likewise.
635 (mark_false_label_stack): Likewise.
636 (lang_mark_tree): Likewise.
637 (lang_cleanup_tree): Likewise.
639 1999-09-03 Mark Mitchell <mark@codesourcery.com>
641 * Makefile.in (CXX_TREE_H): Include function.h.
642 (decl.o): Don't depend on function.h.
644 (typeck.o): Likewise.
646 (method.o): Likewise.
647 * cp-tree.h: Include function.h.
648 (cp_function): Rename to language_function. Remove next.
649 (cp_function_chain): Make it a macro, not a variable.
650 (push_cp_function_context): Don't declare.
651 (pop_cp_function_context): Likewise.
652 * decl.c: Don't include function.h.
653 (push_cp_function_context): Make it static. Make it suitable for
654 a save_lang_status callback.
655 (pop_cp_function_context): Likewise.
656 (maybe_push_to_top_level): Call push_function_context_to, not
657 push_cp_function_context.
658 (pop_from_top_level): Call pop_function_context_from, not
659 pop_cp_function_context.
660 (init_decl_processing): Set save_lang_status and
661 restore_lang_status. Call push_function_context_to, not
662 push_cp_function_context.
663 (cp_function_chain): Remove.
664 * decl2.c: Don't include function.h.
665 * except.c: Don't include function.h.
666 (start_anon_func): Call push_function_context_to, not
667 push_cp_function_context.
668 (end_anon_func): Call pop_function_context_from, not
669 pop_cp_function_context.
670 * init.c: Don't include function.h.
671 * lex.c (begin_definition_of_inclass_inline): Call
672 push_function_context_to, not push_cp_function_context.
673 (process_next_inline): Call pop_function_context_from, not
674 pop_cp_function_context.
675 * method.c: Don't include function.h.
676 (synthesize_method): Call push_function_context_to, not
677 push_cp_function_context. Call pop_function_context_from, not
678 pop_cp_function_context.
679 * typeck.c: Don't include function.h.
681 * decl.c (expand_static_init): Tweak handling of static
682 initializations for objects without constructors.
684 1999-09-03 Nathan Sidwell <nathan@acm.org>
686 * typeck.c (build_indirect_ref): Reject dereference of pointer to
689 1999-09-02 Mark Mitchell <mark@codesourcery.com>
691 * cp-tree.h (cp_function): Move here, from decl.c.
692 (cp_function_chain): Declare.
693 (dtor_label): New macro, instead of variable.
694 (ctor_label): Likewise.
695 (current_base_init_list): Likewise.
696 (current_member_init_list): Likewise.
697 (base_init_expr): Likewise.
698 (current_class_ptr): Likewise.
699 (current_class_ref): Likewise.
700 (last_tree): Likewise.
701 (last_expr_type): Likewise.
702 (current_function_returns_value): Likewise.
703 (current_function_returns_null): Likewise.
704 (current_function_just_assigned_this): Likewise.
705 (current_function_parms_stored): Likewise.
706 (temp_name_counter): Likewise.
707 (static_labelno): Likewise.
708 (expanding_p): Likewise.
709 (stmts_are_full_exprs_p): Likewise.
710 (in_function_try_handler): Likewise.
711 (lang_type): Remove nested type_flags. All uses changed.
712 * call.c (ctor_label): Remove.
713 (dtor_label): Likewise.
714 * class.c (current_class_ptr): Remove.
715 (current_class_ref): Likewise.
716 * decl.c (static_labelno): Remove.
717 (dtor_label): Likewise.
718 (last_dtor_insn): New macro, instead of variable.
719 (last_parm_cleanup_insn): Likewise.
720 (original_result_rtx): Likewise.
721 (in_function_try_handler): Remove.
722 (named_label_uses): New macro, instead of variable.
723 (named_labels): Likewise.
724 (current_function_returns_value): Remove.
725 (current_function_returns_null): Likewise.
726 (current_function_assigns_this): New macro, instead of variable.
727 (current_function_just_assigned_this): Likewise.
728 (current_binding_level): Likewise.
729 (init_decl_processing): Call push_cp_function_context.
730 (cp_function): Move to cp-tree.h
731 (cp_function_chain): Make it global.
732 (temp_name_counter): Remove.
733 (push_cp_function_context): Simplify.
734 (pop_cp_function_context): Likewise.
735 * decl2.c (temp_name_counter): Remove.
736 * init_c (current_base_init_list): Likewise.
737 (current_member_init_list): Likewise.
738 (base_init_expr): Likewise.
739 * method.c (static_labelno): Likewise.
740 * pt.c (last_tree): Likewise.
741 * semantics.c (expanding_p): Likewise.
742 (stmts_are_full_exprs_p): Likewise.
743 (last_expr_type): Likewise.
744 * typeck.c (dtor_label): Likewise.
745 (ctor_label): Likewise.
747 1999-09-01 Alex Samuel <samuel@codesourcery.com>
749 * decl2.c (arg_assoc_template_arg): New prototype. New function.
750 (arg_assoc_class): Use arg_assoc_template_arg for template
752 (arg_assoc): Likewise.
753 * pt.c (mangle_class_name_for_template): Allow member template
756 1999-09-02 Nathan Sidwell <nathan@acm.org>
758 * call.c (build_conditional_expr): Warn on enum mismatches.
759 (convert_arg_to_ellipsis): Move non-pod check to after
762 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
764 * gxx.gperf (hash, is_reserved_word): Add prototypes.
766 * init.c (build_vec_init): Initialize variable `try_block'.
768 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
769 Likewise for bzero/memset.
770 (token_getch, token_put_back): Add static prototypes. Remove
771 `inline' from the definitions.
772 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
774 1999-09-01 Mark Mitchell <mark@codesourcery.com>
776 * cp-tree.h (lang_type): Move align into type_flags.
777 (CLASSTYPE_ALIGN): Adjust accordingly.
778 * call.c (direct_reference_binding): Remove misleading comment.
780 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
782 * parse.y (language_string): Constify.
784 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
786 * repo.c (getpwd): Don't prototype.
787 * xref.c (getpwd): Likewise
789 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
791 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
792 Remove hacks for stuff which now comes from libiberty.
794 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
796 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
798 1999-08-30 Mark Mitchell <mark@codesourcery.com>
800 * cp-tree.h (begin_init_stmts): Declare.
801 (finish_init_stmts): Likewise.
802 * cvt.c (build_up_reference): Wrap the declaration of a temporary
803 in a statement-expression so that we will see it when expanding
804 tree structure later.
805 * init.c (begin_init_stmts): Don't make it static.
806 (finish_init_stmts): Likewise.
808 * cp-tree.h (start_handler_parms): New function.
809 (expand_start_catch_block): Take only one parameter.
810 (start_handler_parms): New function.
811 * decl.c (start_handler_parms): Define it.
812 * except.c (process_start_catch_block): Take only one parameter.
813 Don't call grokdeclarator here.
814 (expand_start_catch_block): Don't call grokdeclarator here,
816 * parse.y (handler_args): Adjust call to
817 expand_start_catch_block. Use start_handler_parms.
818 * pt.c (push_template_decl_real): Make permanent lists have
820 (tsubst_expr): Adjust calls to expand_start_catch_block
822 * semantics.c (expand_stmt): Likewise.
824 1999-08-29 Alex Samuel <samuel@codesourcery.com>
826 * pt.c (push_template_decl_real): Use template declaration from
827 class type if it exists.
829 1999-08-29 Mark Mitchell <mark@codesourcery.com>
831 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
832 (maybe_inject_for_scope_var): Declare it.
833 (initialize_local_var): Likewise.
834 * decl.c (maybe_inject_for_scope_var): Make it global.
835 (initialize_local_var): Likewise. Move cleanup handling here,
837 (make_rtl_for_nonlocal_decl): Use
838 push_obstacks_nochange/pop_obstacks, rather than
839 end_temporary_allocation/resume_temporary_allocation.
840 (cp_finish_decl): Try to complete the type of a variable when it
841 is declared. Move cleanup-handling to initialize_local_var.
842 (expand_static_init): Use tree-building code, rather than
844 * decl2.c (get_temp_name): Assert non-initializedness of
846 * init.c (create_temporary_var): Move RTL-assigning code to ...
847 (get_temp_regvar): Here.
848 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
849 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
850 call initialize_local_var to generate initialization code.
852 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
854 * cp-tree.h (fndecl_as_string, type_as_string,
855 type_as_string_real, args_as_string, decl_as_string,
856 expr_as_string, code_as_string, language_as_string,
857 parm_as_string, op_as_string, assop_as_string, cv_as_string,
858 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
860 * errfn.c (cp_printer): Likewise.
862 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
863 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
864 cp_file_of, code_as_string, language_as_string, parm_as_string,
865 op_as_string, assop_as_string, args_as_string, cv_as_string):
868 * tree.c (lang_printable_name): Likewise.
870 1999-08-28 Richard Henderson <rth@cygnus.com>
872 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
874 1999-08-28 Mark Mitchell <mark@codesourcery.com>
876 * cp-tree.h (strip_array_types): New function.
877 * decl.c (maybe_deduce_size_from_array_init): New function, split
878 out from cp_finish_decl.
879 (layout_var_decl): Likewise.
880 (maybe_commonize_var): Likewise.
881 (maybe_inject_for_scope_var): Likewise.
882 (initialize_local_var): Likewise.
883 (build_cleanup_on_safe_obstack): Likewise.
884 (check_initializer): Likewise.
885 (make_rtl_for_nonlocal_decl): Likewise.
886 (cp_finish_decl): Use them.
887 * typeck.c (strip_array_types): New function.
889 * cp-tree.def (LABEL_STMT): New tree node.
890 * cp-tree.h (LABEL_STMT_LABEL): New macro.
891 (shadow_label): Remove.
892 (declare_local_label): New function.
893 (finish_label_decl): Likewise.
894 * decl.c (make_label_decl): New function, split out from
896 (shadowed_labels): Remove.
897 (binding_level): Add shadowed_labels.
898 (clear_binding_level): Remove.
899 (push_binding_level): Just bzero the new binding level.
900 (pushlevel): Fix indentation.
901 (pop_label): New function.
902 (pop_labels): Likewise, split out from poplevel.
903 (poplevel): Pop local labels. Use pop_labels.
904 (maybe_push_to_top_level): Don't clear shadowed_labels.
905 (lookup_label): Use make_label_decl.
906 (shadow_label): Remove.
907 (declare_local_label): New function.
908 (define_label): Simplify.
909 (start_function): Don't clear shadowed_labels.
910 (cp_function): Remove shadowed_labels.
911 (push_cp_function_context): Don't save shadowed_labels.
912 (pop_cp_function_context): Don't restore it.
913 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
914 * parse.y (label_decl): Use finish_label_decl.
915 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
917 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
919 (finish_label_decl): New function.
920 (expand_stmt): Handle LABEL_STMTs and local label declarations.
922 1999-08-26 Mark Mitchell <mark@codesourcery.com>
924 * decl.c (lookup_label): Build labels on the permanent obstack
925 when building statement trees. Don't build RTL for labels when
926 building statement trees.
927 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
928 building statement trees.
929 (finish_label_stmt): Likewise.
930 (expand_stmt): Adjust accordingly.
931 * pt.c (tsubst_expr); Likewise.
932 (do_decl_instantiation): Robustify.
934 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
935 * tree.c (build_cplus_new): Set it.
936 * expr.c (cplus_expand_expr): Use it.
937 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
939 * decl.c (store_parm_decls): Reset immediate_size_expand.
940 (finish_function): Likewise.
942 * tree.c (cplus_unsave_expr_now): Don't return a value.
944 * semantics.c (do_poplevel): Always initialize the return value.
946 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
948 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
949 * tree.h (cplus_unsave_expr_now) : Same.
951 1999-08-25 Mark Mitchell <mark@codesourcery.com>
953 * decl.c (grokdeclarator): Amend comment.
954 * except.c (expand_start_catch_block): Call push_template_decl for
955 catch-block parameters.
956 * method.c (synthesize_method): Build an empty compound statement
957 for the body of a constructor.
959 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
961 * tree.c (cp_build_qualified_type_real): If we're asking for the
962 same quals we already have, just return.
964 1999-08-25 Mark Mitchell <mark@codesourcery.com>
966 * cp-tree.def (SUBOBJECT): New tree node.
967 * cp-tree.h (CLEANUP_P): New macro.
968 (SUBOBJECT_CLEANUP): Likewise.
969 (keep_next_level): Add parameter.
970 (get_temp_regvar): Don't declare.
971 (emit_base_init): Remove parameter.
972 (expand_aggr_init): Rename to build_aggr_init.
973 (expand_vec_init): Rename to build_vec_init.
974 (do_pushlevel): Remove.
975 (do_poplevel): Likewise.
976 (finish_cleanup): New function.
977 (finish_subobject): Likewise.
978 (stmts_are_full_exprs_p): New variable.
979 * decl.c (keep_next_level): Add parameter.
980 (cp_finish_decl): Use build_aggr_init, not
981 expand_aggr_init. Use finish_expr_stmt to expand the code.
982 (expand_static_init): Use tree-generating, not RTL-generating,
983 functions to handle the initialization.
984 (start_function): Remove dead code. Always have a momentary
985 obstack inside the function, even before hitting the first curly
987 (cplus_expand_expr_stmt): Move calls to
988 expand_{start,end}_target_temps into semantics.c.
989 (cp_function): Add stmts_are_full_exprs_p.
990 (push_cp_function_context): Save it.
991 (pop_cp_function_context): Restore it.
992 * decl2.c (get_temp_regvar): Move to init.c.
993 (do_static_initialization): Use build_{aggr,vec}_init.
994 (do_static_destruction): Fix typo in comment.
995 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
996 * except.c (expand_throw): Use create_temporary_var.
997 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
998 * init.c (expand_vec_init_try_block): Remove.
999 (expand_vec_init_catch_clause): Likewise.
1000 (get_temp_regvar): New function.
1001 (begin_init_stmts): Likewise.
1002 (finish_init_stmts): Likewise.
1003 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
1005 (emit_base_init): Likewise. Remove unused parameter.
1006 (expand_virtual_init): Likewise.
1007 (expand_cleanup_for_base): Use finish_subobject.
1008 (expand_aggr_vbase_init_1): Simplify.
1009 (construct_virtual_bases): Use tree-generating functions to build
1011 (expand_aggr_init): Likewise. Rename to build_aggr_init.
1012 (expand_default_init): Likewise.
1013 (expand_aggr_init_1): Likewise.
1014 (expand_vec_init): Rename to build_vec_init.
1015 * method.c (do_build_copy_constructor): Use tree-generating
1016 functions. Don't call clear_last_expr.
1017 (do_build_assign_ref): Likewise.
1018 (synthesize_method): Call clear_last_expr here.
1019 * parse.y (base_init): Don't call clear_last_expr here.
1020 (nodecls): Likewise.
1021 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
1022 * semantics.c (do_pushlevel): Move to here.
1023 (do_poplevel): Likewise.
1024 (stmts_are_full_exprs_p): New variable.
1025 (finish_expr_stmt): Handle logic for temoprary cleanup here.
1026 (finish_for_stmt): Use finish_expr_stmt.
1027 (finish_cleanup): New function.
1028 (finish_function_try_block): Fix indentation.
1029 (finish_subobject): New function.
1030 (setup_vtbl_ptr): Call keep_next_level here.
1031 (finish_stmt_expr): Handle a block with no scope inside the
1032 statement-expression.
1033 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
1035 * tree.c (search_tree): Handle INIT_EXPR.
1037 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
1038 * typeck2.c (store_init_value): Change expand_aggr_init to
1039 build_aggr_init in comment.
1041 1999-08-25 Mark Mitchell <mark@codesourcery.com>
1043 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
1045 1999-08-25 Nathan Sidwell <nathan@acm.org>
1047 * decl2.c (handle_class_head): Be graceful about additional
1048 scope qualifiers. Adjust comments to reflect reality.
1050 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
1052 * call.c (build_conditional_expr): Fix typo.
1053 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
1054 lvalue before trying to mess with the sides.
1056 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
1058 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
1060 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
1062 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
1064 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
1065 Return arbitrary pointer or NULL.
1066 (check_eh_spec): Call __throw_type_match_rtti_2.
1067 * tinfo.h (*::dcast): Return int. Add valp parm.
1068 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
1069 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
1070 (__throw_type_match_rtti): Now just a wrapper.
1072 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
1073 (init_exception_processing): Don't initialize them.
1075 1999-08-23 Paul Burchard <burchard@pobox.com>
1077 * decl.c (check_default_argument): Fix typo.
1079 1999-08-22 Mark Mitchell <mark@codesourcery.com>
1081 * cp-tree.def (STMT_EXPR): Fix typo in node name.
1083 * dump.c (dump_next_stmt): New function.
1084 (dequeue_and_dump): Use it.
1086 * pt.c (tsubst_copy): Make sure to initialize return value for a
1087 STMT_EXPR, even when processing_template_decl.
1088 * semantics.c (finish_stmt_expr): A statement-expression whose
1089 last statement is not an expression-statement has type `void'.
1091 1999-08-20 Mark Mitchell <mark@codesourcery.com>
1093 * semantics.c (finish_stmt_expr): Fix typo in comment.
1094 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
1096 * init.c (build_vec_delete_1): Make the children of a permanent
1097 BIND_EXPR permanent.
1098 * pt.c (register_specialization): Don't register a specialization
1101 1999-08-18 Andrew Haley <aph@cygnus.com>
1103 * method.c (process_overload_item): Call build_mangled_C9x_name ()
1104 for all integer parameter types larger than long long.
1106 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1108 * pt.c (redeclare_class_template): Merge default template
1109 arguments in both directions.
1111 * typeck.c (common_type): Undo 1999-08-18 change. Remove
1112 compiler_error message.
1114 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
1116 * cp-tree.h: Declare flag_use_repository.
1117 * pt.c (do_decl_instantiation): Don't complain about duplicate
1118 instantiation with -frepo.
1119 (do_type_instantiation): Likewise.
1121 * pt.c (push_template_decl_real): Complain about everything
1122 that isn't a valid template.
1124 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
1127 1999-08-19 Mark Mitchell <mark@codesourcery.com>
1129 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
1130 * decl2.c (build_expr_from_tree): Handle it.
1131 * error.c (dump_expr): Likewise.
1132 * pt.c (for_each_template_parm): Likewise.
1133 (tsubst_copy): Likewise.
1134 * tree.c (search_tree): Likewise.
1135 * semantics.c (finish_pseudo_destructor_call): Create it.
1137 1999-08-18 Mark Mitchell <mark@codesourcery.com>
1139 * search.c (setup_class_bindings): Robustify.
1140 * typeck.c (common_type): Use same_type_p, not pointer equality,
1143 * cp-tree.h (build_lang_field_decl): Remove.
1144 * class.c (build_vtable): Replace calls to build_lang_field_decl
1145 with build_lang_decl.
1146 (prepare_fresh_vtable): Likewise.
1147 (finish_struct_1): Likewise.
1148 (init_class_processing): Likewise.
1149 * decl.c (push_using_decl): Likewise.
1150 (init_decl_processsing): Likewise.
1151 (grokvardecl): Likewise.
1152 (build_ptrmemfunc_type): Likewise.
1153 (grokdeclarator): Likewise.
1154 (build_enumerator): Likewise.
1155 * decl2.c (grok_x_components): Likewise.
1156 (do_class_using_decl): Likewise.
1157 * except.c (call_eh_info): Likewise.
1158 * init.c (init_init_processing): Likewise.
1159 * rtti.c (expand_class_decl): Likewise.
1160 * tree.c (build_base_fields): Likewise.
1161 (build_vbase_pointer_fields): Likewise.
1162 * lex.c (build_lang_decl): Build declarations on the permanent
1163 obstack if we're building statmeent trees.
1164 (retrofit_lang_decl): Handle both the full lang_decl and also the
1165 smaller lang_decl_flags here.
1166 (build_lang_field_decl): Remove.
1167 * pt.c (push_template_decl_real): Issue errors for variable
1168 declarations that are not static members.
1170 1999-08-18 Richard Henderson <rth@cygnus.com>
1172 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
1175 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1177 * cp-tree.h (back_end_hook): New variable.
1178 * decl2.c (back_end_hook): Define it.
1179 (finish_file): If it's non-NULL, call it.
1181 * decl.c (add_decl_to_level): New function.
1182 (push_local_binding): Use it.
1183 (find_binding): Fix typo in comment.
1184 (pushdecl): Use add_decl_to_level. Put templates on the
1185 corresponding namespace-scope binding levels.
1186 * dump.c (dequeue_and_dump): Print the specializations of a
1188 * pt.c (push_template_decl_real): Don't push a template multiple
1191 1999-08-17 Mark Mitchell <mark@codesourcery.com>
1193 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
1194 (CALL_DECLARATOR_QUALS): Likewise.
1195 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
1196 * decl.c (grokdeclarator): Adjust to use them.
1197 * decl2.c (grokfield): Likewise.
1198 (reparse_absdcl_as_casts): Likewise.
1199 * lex.c (make_call_declarator): Likewise.
1200 (set_quals_and_spec): Likewise.
1201 * pt.c (tsubst): Likewise.
1202 * tree.c (mapcar): Remove special hack to handle third operand of
1205 1999-08-16 Mark Mitchell <mark@codesourcery.com>
1207 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1208 * class.c (build_vtable): Use build_lang_field_decl to build the
1209 VAR_DECLs for vtables.
1210 (prepare_fresh_vtable): Likewise.
1211 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1212 CAN_HAVE_FULL_LANG_DECL_P.
1213 (push_using_decl): Use build_lang_decl to build USING_DECLs.
1214 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1215 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1216 (build_lang_field_decl): Likewise.
1217 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1220 * cp-tree.def (STMT_EXPR): New tree node.
1221 * cp-tree.h (STMT_EXPR_STMT): New macro.
1222 (store_return_init): Change prototype.
1223 (finish_named_return_value): New function.
1224 (expand_stmt): Likewise.
1225 (expand_body): Likewise.
1226 (begin_stmt_tree): Likewise.
1227 (finish_stmt_tree): Likewise.
1228 (expanding_p): New variable.
1229 (last_expr_type): Likewise.
1230 (building_stmt_tree): New macro.
1231 * decl.c (start_function): Use building_stmt_tree, not
1232 processing_template_decl, where appropriate.
1233 (store_parm_decls): Likewise.
1234 (store_return_init): Move most of the body to semantics.c.
1235 (finish_function): Use building_stmt_tree.
1236 (finish_stmt): Clear last_expr_type here.
1237 (cp_function): Add expanding_p, last_tree, last_expr_type.
1238 (push_cp_function_context): Save them.
1239 (pop_cp_function_context): Restore them.
1240 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
1241 * error.c (dump_expr): Handle STMT_EXPR.
1242 * except.c (expand_start_catch_block): Use building_stmt_tree.
1244 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
1245 (do_case): Move add_tree call to semantics.c.
1246 * parse.y (return_init): Use finish_named_return_value.
1247 (for.init.statement): Use finish_expr_stmt.
1248 * parse.c: Regenerated.
1249 * pt.c (do_pushlevel): Move to semantics.c.
1250 (do_poplevel): Likewise.
1251 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
1252 (tsubst_expr): Don't expand all the way to RTL here. Handle
1253 RETURN_INIT and CTOR_INITIALIZER.
1254 (instantiate_decl): Call expand_body after tsubst'ing into
1256 * semantics.c (expand_stmts): New function.
1257 (expanding_p): New variable.
1258 (last_expr_type): Likewise.
1259 (finish_expr_stmt): Use building_stmt_tree.
1260 (begin_if_stmt): Likewise.
1261 (finish_if_stmt_cond): Likewise.
1262 (finish_then_clause): Likewise.
1263 (begin_else_clause): Likewise.
1264 (finish_else_clause): Likewise.
1265 (begin_while_stmt): Likewise.
1266 (finish_while_stmt_cond): Likewise.
1267 (finish_while_stmt): Likewise.
1268 (finish_do_body): Likewise.
1269 (finish_do_stmt): Likewise.
1270 (finish_return_stmt): Likewise.
1271 (begin_for_stmt): Likewise.
1272 (fnish_for_init_stmt): Likewise.
1273 (finish_for_cond): Likewise.
1274 (finish_for_expr): Likewise.
1275 (finish_for_stmt): Likewise.
1276 (finish_break_stmt): Likewise.
1277 (finish_continue_stmt): Likewise.
1278 (finish_switch_cond): Likewise.
1279 (finish_switch_stmt): Likewise.
1280 (finish_case_label): Call add_tree here if necessary.
1281 (finish_goto_statement): Use building_stmt_tree.
1282 (begin_try_block): Likewise.
1283 (begin_function_try_block): Likewise.
1284 (finish_try_block): Likewise.
1285 (finish_function_try_block): Likewise.
1286 (finish_handler_sequence): Likewise.
1287 (finish_function_handler_sequence): Likewise.
1288 (begin_handler): Likewise.
1289 (finish_handler_parms): Likewise.
1290 (finish_handler): Likewise.
1291 (begin_compound_stmt): Likewise.
1292 (finish_compound_stmt): Likewise.
1293 (finish_asm_stmt): Likewise.
1294 (finish_label_stmt): Likewise.
1295 (finish_named_return_value): New function.
1296 (setup_vtbl_ptr): Moved here from decl2.c.
1297 (do_pushlevel): Moved here from pt.c.
1298 (do_poplevel): Likewise.
1299 (begin_stmt_expr): Use building_stmt_tree.
1300 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
1301 when building_stmt_tree.
1302 (begin_stmt_tree): New function.
1303 (finish_stmt_tree): Likewise.
1304 (expand_stmt): Likewise.
1305 (expand_body): Likewise.
1306 * tree.c (build_cplus_method_type): Make sure the argument types
1307 end up on the same obstack as the METHOD_TYPE.
1308 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
1309 THROW_EXPR, STMT_EXPR.
1310 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
1311 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
1312 sorry, if an unsupported node is encountered.
1313 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
1314 (c_expand_return): Don't call add_tree here.
1316 1999-08-15 Mark Mitchell <mark@codesourcery.com>
1318 * pt.c (check_default_tmpl_args): Don't check in local scopes.
1319 (tsubst_decl): Make sure the declaration is on a saveable
1320 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
1322 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
1324 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
1326 Speed up Koenig lookup.
1327 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
1328 to return namespaces we've looked at.
1329 * decl2.c (lookup_using_namespace): Likewise.
1330 (add_function): Don't call ovl_member.
1331 (lookup_arg_dependent): Initialize k.namespaces to the list of
1332 namespaces seen in unqualified lookup.
1333 * call.c (equal_functions): Move here from tree.c.
1334 (joust): Use it to handle duplicate candidates.
1335 * tree.c (ovl_member): Use ==.
1337 1999-08-13 Mark Mitchell <mark@codesourcery.com>
1339 * cp-tree.def (DECL_STMT): Make it smaller.
1340 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
1341 (lang_decl): ... here. Add next.
1342 (DECL_SAVED_TREE): Adjust accordingly.
1343 (DECL_IMPLICIT_TYPEDEF_P): New macro.
1344 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1345 (DECL_STMT_DECL): Likewise.
1346 (create_implicit_typedef): New function.
1347 (maybe_push_decl): Likewise.
1348 (tsubst_default_argument): New function.
1349 (at_function_scope_p): Likewise.
1350 (add_decl_stmt): Likewise.
1351 (push_permanent_obstack): Likewise.
1352 * call.c (convert_default_arg): Use tsubst_default_argument.
1353 * class.c (add_method): Use push_permanent_obstack.
1354 (build_self_reference): Create a TEMPLATE_DECL for the
1355 self-reference, if necessary.
1356 * decl.c (pseudo_global_level_p): Only look at the current binding
1358 (push_binding): Use push_permanent_obstack.
1359 (create_implicit_typedef): New function.
1361 (duplicate_decls): Use push_permanent_obstack.
1362 (maybe_push_decl): New function.
1363 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
1364 (start_decl_1): Remove dead code.
1365 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
1366 pseudo_global_level_p.
1367 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
1369 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
1370 pseudo_global_level_p.
1371 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
1373 (get_sentry): Use push_permanent_obstack.
1374 * dump.c (dequeue_and_dump): Enable DECL_STMT.
1375 * except.c (call_eh_info): Use push_permanent_obstack.
1376 (build_eh_type_ref): Likewise.
1377 (do_pop_exception): Likewise.
1378 (expand_eh_spec): Likewise.
1379 (alloc_eh_object): Likewise.
1380 (expand_throw): Likewise.
1381 * init.c (build_java_class_ref): Likewise.
1382 * lex.c (get_time_identifier): Likewise.
1383 (free_lang_decl_chain): Correct type.
1384 (retrofit_lang_decl): Adjust accordingly.
1385 (build_lang_field_decl): Likewise.
1386 * lex.h (free_lang_decl_chain): Likewise.
1387 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
1388 * parse.c: Regenerated.
1389 * pt.c (tsubst_default_arguments): New function.
1390 (retrieve_local_specialization): Likewise.
1391 (register_local_specialization): Likewise.
1392 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
1393 pseudo_global_level_p to determine whether or not a template is
1395 (lookup_template_class): Likewise. Use create_implicit_typedef.
1396 (instantiate_class_template): Call tsubst_default_arguments for
1397 member functions, if appropriate.
1398 (tsubst_default_argument): New function.
1399 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
1400 * search.c (at_function_scope_p): New function.
1401 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
1402 (finish_label_stmt): Likewise.
1403 (add_decl_stmt): New function.
1404 (begin_class_definition): Likewise.
1405 (finish_typeof): Likewise.
1406 * tree.c (copy_template_template_parm): Likewise.
1407 (copy_to_permanent): Likewise.
1408 (push_permanent_obstack): Define.
1409 (mark_addressable): Use it.
1410 * typeck.c (mark_addressable): Likewise.
1412 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
1414 * cp-tree.h (init_cplus_unsave): New.
1415 (cplus_unsave_expr_now): New.
1416 * lex.c (init_parse): Call init_cplus_unsave.
1417 * tree.c (init_cplus_unsave): New.
1418 (cplus_unsave_expr_now): New.
1420 1999-08-13 Mark Mitchell <mark@codesourcery.com>
1422 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
1423 decl_constant_value to simplify array bounds.
1425 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
1427 * lang-options.h: Add -fms-extensions.
1428 * cp-tree.h: Declare flag_ms_extensions.
1429 * decl2.c: Define it.
1430 * class.c (instantiate_type): Don't complain about taking the address
1431 of a bound member function if -fms-extensions.
1432 * typeck.c (build_unary_op): Likewise.
1433 * decl.c (grokdeclarator): Or about implicit int.
1434 * init.c (resolve_offset_ref): Or about implicit '&'.
1436 1999-08-11 Mark Mitchell <mark@codesourcery.com>
1438 * cp-tree.h (minimal_parse_mode): Remove.
1439 (finish_label_stmt): New function.
1440 * decl.c (saved_scope): Remove minimal parse mode.
1441 (maybe_push_to_top_level): Don't save it.
1442 (pop_from_top_level): Don't restore it.
1443 (define_label): Split out template-handling code to semantics.c.
1444 (start_decl): Don't use minimal_parse_mode.
1445 (cp_finish_decl): Likewise.
1446 (start_function): Don't increment it.
1447 (store_return_init): Don't use it.
1448 (finish_function): Don't decrement it.
1449 * parse.y (label_colon): Use finish_label_stmt throughout.
1450 * parse.c: Regenerated.
1451 * pt.c (minimal_parse_mode): Don't define it.
1452 (tsubst_expr): Use finish_label_stmt.
1453 * semantics.c (finish_label_stmt): New function.
1455 * dump.c (queue): Be careful when computing bitmasks.
1456 (dequeue_and_dump): Describe binfos as binfos, not as
1459 * parse.y (pedantic): Give it itype. Adjust usage accordingly
1461 * parse.c: Regenerated.
1463 * Make-lang.in (CXX_SRCS): Remove sig.c.
1464 * Makefile.in (CXX_OBJS): Remove sig.o.
1466 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
1467 (CPTI_SIGNATURE_TYPE): Likewise.
1468 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
1469 (opaque_type_node): Likewise.
1470 (signature_type_node): Likewise.
1471 (sigtable_entry_type): Likewise.
1472 (flag_handle_signatures): Likewise.
1473 (lang_type): Remove is_signature, is_signature_pointer,
1474 is_signature_reference, has_opaque_typedecls,
1475 sigtables_has_been_generated. Adjust dummy. Remove signature,
1476 signature_pointer_to, signature_reference_to.
1477 (IS_SIGNATURE): Remove.
1478 (SET_SIGNATURE): Remove.
1479 (CLEAR_SIGNATURE): Remove.
1480 (IS_SIGNATURE_POINTER): Remove.
1481 (IS_SIGNATURE_REFERENCE): Remove.
1482 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
1483 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
1484 (CLASSTYPE_SIGNATURE): Remove.
1485 (SIGNATURE_TYPE): Remove.
1486 (SIGNATURE_METHOD_VEC): Remove.
1487 (SIGNATURE_POINTER_TO): Remove.
1488 (SIGNATURE_REFERENCE_TO): Remove.
1489 (lang_decl_flags): Remove is_default_implementation. Rename
1490 memfunc_pointer_to to saved_tree.
1491 (IS_DEFAULT_IMPLEMENTATION): Remove.
1492 (DECL_MEMFUNC_POINTER_TO): Remove.
1493 (DECL_MEMFUNC_POINTING_TO): Remove.
1494 (DECL_SAVED_TREE): Adjust definition.
1495 (tag_types): Remove signature_type_node.
1496 (SIGNATURE_FIELD_NAME): Remove.
1497 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
1498 (SIGNATURE_OPTR_NAME): Likewise.
1499 (SIGNATURE_SPTR_NAME): Likewise.
1500 (SIGNATURE_POINTER_NAME): Likewise.
1501 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
1502 (SIGNATURE_REFERENCE_NAME): Likewise.
1503 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
1504 (SIGTABLE_PTR_TYPE): Likewise.
1505 (SIGTABLE_NAME_FORMAT): Likewise.
1506 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
1507 (SIGTABLE_TAG_NAME): Likewise.
1508 (SIGTABLE_VB_OFF_NAME): Likewise.
1509 (SIGTABLE_VT_OFF_NAME): Likewise.
1510 (finish_base_specifiers): Change prototype.
1511 (build_signature_pointer_type): Remove.
1512 (build_signature_reference_type): Remove.
1513 (build_signature_pointer_constructor): Remove.
1514 (build_signature_method_call): Remove.
1515 (build_optr_ref): Likewise.
1516 (append_signature_fields): Likewise.
1517 (signature_error): Likewise.
1518 * call.c (build_this): Remove signature support.
1519 (build_over_call): Likewise.
1520 (build_new_method_call): Likewise.
1521 * class.c (add_implicitly_declared_members): Likewise.
1522 (finish_struct_1): Likewise.
1523 (finish_struct): Likewise.
1524 * cvt.c (cp_convert_to_pointer): Likewise.
1525 (convert_to_pointer_force): Likewise.
1526 (ocp_convert): Likewise.
1527 * decl.c (sigtable_decl_p): Remove.
1528 (init_decl_processing): Remove support for signatures.
1529 (cp_finish_decl): Likewise.
1530 (grokdeclarator): Likewise.
1531 (grokparms): Likewise.
1532 (xref_tag): Likewise.
1533 (start_function): Likewise.
1534 (start_method): Likewise.
1535 * decl2.c (finish_sigtable_vardecl): Remove.
1536 (flag_handle_signatures): Remove.
1537 (lang_f_options): Remove handle-signatures.
1538 (grokfield): Remove support for signatures.
1539 (grokbitfield): Likewise.
1540 (finish_file): Likewise.
1541 (reparse_absdcl_as_casts): Likewise.
1542 * error.c (dump_type_real): Likewise.
1543 (dump_function_decl): Likewise.
1544 * friend.c (make_friend_class): Likewise.
1545 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
1546 * hash.h: Regenerated.
1547 * init.c (build_new_1): Remove support for signatures.
1548 * lang-options.h: Remove -fhandle-signatures,
1549 -fno-handle-signatures.
1550 * lex.c (init_parse): Remove support for signatures.
1551 (yyprint): Likewise.
1552 * lex.h (rid): Remove RID_SIGNATURE.
1553 * method.c (build_decl_overload_real): Remove support for
1555 (hack_identifier): Likewise.
1556 * parse.y (base_class): Likewise.
1557 (base_class.1): Likewise.
1558 (access_specifier): Likewise.
1559 * search.c (lookup_member): Likewise.
1560 * semantics.c (finish_qualified_object_call_expr): Likewise.
1561 (finish_template_type_parm): Likewise.
1562 (begin_class_definition): Likewise.
1563 (finish_base_specifier): Likewise.
1565 * tree.c (build_cplus_method_type): Remove support for signatures.
1566 * typeck.c (require_complete_type): Likewise.
1567 (c_sizeof): Likewise.
1568 (c_alignof): Likewise.
1569 (build_object_ref): Likewise.
1570 (build_component_ref): Likewise.
1571 (build_indirect_ref): Likewise.
1572 (build_c_cast): Likewise.
1573 (build_modify_expr): Likewise.
1574 (convert_for_initialization): Likewise.
1575 * typeck2.c (signature_error): Remove.
1576 (store_init_value): Remove support for signatures.
1577 (digest_init): Likewise.
1578 (build_x_arrow): Likewise.
1579 (build_functional_cast): Likewise.
1580 * xref.c (GNU_xref_decl): Likewise.
1582 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
1584 * lex.c (do_identifier): Remove unnecessary lookup of class field.
1586 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
1588 * decl2.c (set_decl_namespace): Do not complain about non-matching
1589 decls if processing a template.
1591 1999-08-09 Mark Mitchell <mark@codesourcery.com>
1593 * decl.c (build_ptrmemfunc_type): Handle qualified
1594 pointer-to-member types here.
1595 * tree.c (cp_build_qualified_type_real): Simplify handling here.
1597 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1599 * lex.c (lang_identify): Likewise.
1601 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
1603 * Makefile.in: Update dependencies.
1604 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
1606 * decl.c: Include "function.h"
1607 (cleanup_label, return_label): Delete declarations.
1608 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
1609 (finish_function): Rename last_parm_insn variable to
1610 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
1611 * decl2.c: Include "function.h".
1612 (rtl_expr_chain): Delete declaration.
1613 * method.c: Include "function.h"
1614 * tree.c (build_vbase_pointer_fields): Don't initialize
1615 DECL_SAVED_INSNS with NULL_RTX.
1616 * typeck.c: Include "function.h"
1618 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
1620 * semantics.c (begin_function_try_block, finish_function_try_block,
1621 finish_function_handler_sequence): New fns.
1622 * parse.y (function_try_block): Use them.
1623 * pt.c (instantiate_decl): Likewise.
1625 * cp-tree.h: Declare in_function_try_handler.
1626 * decl.c: Define it.
1627 (start_function): Clear it.
1628 (struct cp_function, push_cp_function_context): Save it.
1629 (pop_cp_function_context): Restore it.
1630 * parse.y (function_try_block): Set and clear it.
1631 * except.c (expand_end_catch_block): Rethrow if we reach the end
1632 of a function-try-block handler in a ctor or dtor.
1633 * typeck.c (c_expand_return): Complain about returning from a
1634 function-try-block handler of a ctor.
1636 * parse.y (function_try_block): Call end_protect_partials
1637 before expand_start_all_catch.
1639 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
1641 * decl.c (struct binding_level): Add eh_region field.
1642 (push_binding_level): Set it.
1643 (define_label): Complain about jumping into an EH block.
1645 * ptree.c (print_lang_type): Print the real type of a PMF.
1646 Print what exceptions a fn type throws.
1648 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1650 * class.c (count_fields, add_fields_to_vec): Add static prototype.
1652 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
1653 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
1656 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
1659 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
1662 * dump.c (queue_and_dump_index, dump_int, dump_string,
1663 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
1665 (dump_stmt): Add static prototype.
1667 * errfn.c (cp_thing): Constify a char*.
1669 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
1670 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
1671 dump_expr): Constify a char*.
1673 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
1674 read_line_number): Add static prototype.
1675 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
1676 (real_yylex): Move label `letter' into the scope where it is used.
1678 * method.c (build_mangled_template_parm_index, build_overload_int,
1679 build_decl_overload_real, get_id_2): Constify a char*.
1681 * search.c (check_final_overrider): Make static.
1683 * typeck.c (composite_pointer_type): Constify a char*.
1685 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
1687 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
1688 we're looking at a class.
1690 * decl.c (lookup_name_real): Set the complain flag if we're
1691 looking for a namespace member.
1693 * lex.c (real_yylex): We can have a number with no digits.
1695 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
1697 * search.c (binfo_from_vbase): New fn.
1698 * cp-tree.h: Declare it.
1699 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
1700 from pointer to member of virtual base.
1701 * typeck.c (get_delta_difference): Likewise.
1703 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
1705 * pt.c (tsubst): Use build_index_type to build in-template array
1706 index type. Fixes g++.oliva/dwarf1.C.
1707 * decl.c (grokdeclarator): Likewise, just for consistency, as it
1708 doesn't seem to trigger the bug without it.
1710 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
1712 * typeck2.c (add_exception_specifier): Use complete_type.
1714 1999-08-06 Mark Mitchell <mark@codesourcery.com>
1716 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
1717 (dump_binary_op): Bulletproof.
1718 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
1719 * tree.c (search_tree): Don't enumerate all the nodes of classes
1720 `1', `2', and `<'; handle them generically. Don't be sorry about
1721 "unrecognized tree codes"; just abort.
1722 (no_linkage_check): Don't do linkage checks for templates.
1724 * tree.c (cp_build_qualified_type_real): Handle
1725 pointer-to-member-function types correctly.
1727 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
1729 * decl.c (pushdecl): Only give an error for shadowing a parm
1730 from *this* function.
1732 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
1734 * typeck2.c: Update URLs and mail addresses.
1736 1999-08-04 Nathan Sidwell <nathan@acm.org>
1738 * cp-tree.h (empty_except_spec): New global var.
1739 (compexcepttypes): Remove prototype.
1740 (comp_except_specs): Prototype new global function.
1741 (add_exception_specifier): Prototype new global function.
1742 * decl.c (empty_except_spec): Define new global var.
1743 (duplicate_decls): Use comp_except_specs, reword error message.
1744 (init_decl_processing): Initialize empty_except_spec.
1745 Adjust build_exception_variant calls.
1746 * parse.y (exception_specification_opt): Use empty_except_spec.
1747 (ansi_raise_identifier): Call check_for_new_type.
1748 (ansi_raise_identifiers): Use add_exception_specifier.
1749 * pt.c (tsubst): Use add_exception_specifier to build exception
1751 * search.c (check_final_overrider): New static function, broken
1752 out of get_matching_virtual. Check throw specifiers, reword
1754 (get_matching_virtual): Use check_final_overrider.
1755 * tree.c (build_exception_variant): Use comp_except_specs.
1756 * typeck.c (compexcepttypes): Remove.
1757 (comp_except_types): New static function, helper for
1758 comp_except_specs. Compare two types as exception specifiers.
1759 (comp_except_specs): New global function, compare two exception
1761 (comptypes): Adjust for comp_except_specs.
1762 * typeck2.c (add_exception_specifier): New global function.
1764 * class.c (check_for_override): Reword error message.
1766 1999-08-03 Nathan Sidwell <nathan@acm.org>
1768 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
1769 * cp-tree.h (struct lang_type): Added non_pod_class flag.
1770 (CLASSTYPE_NON_POD_P): New macro to access it.
1771 * class.c (finish_struct_1): Determine non-PODness.
1772 Check for arrays of pointers (-Weffc++).
1773 Remove array inspection duplicated code.
1774 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
1775 Use CLASSTYPE_NON_POD_P.
1777 1999-08-03 Nathan Sidwell <nathan@acm.org>
1779 * class.c (duplicate_tag_error): Preserve template information.
1781 1999-08-03 Nathan Sidwell <nathan@acm.org>
1783 * decl.c (start_enum): Show location of previous definition.
1784 * parse.y (enumlist_opt): New reduction.
1785 (structsp): Simplify enum rules to use enumlist_opt.
1787 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
1789 * lex.c (yyprint): Handle PFUNCNAME.
1791 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
1792 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
1794 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
1796 * decl.c (start_decl): Set attributes before duplicate_decls call.
1798 1999-08-02 Mark Mitchell <mark@codesourcery.com>
1800 * Make-lang.in (CXX_SRCS): Add dump.c.
1801 * Makefile.in (CXX_OBJS): Add dump.o.
1802 (dump.o): New target.
1803 * cp-tree.h (DECL_CONV_FN_P): Document.
1804 (DECL_OVERLOADED_OPERATOR_P): New function.
1805 (TYPE_PTRMEM_CLASS_TYPE): New macro.
1806 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1807 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
1808 (ASM_VOLATILE_P): New macro.
1809 (STMT_LINENO): Likewise.
1810 (cp_namespace_decls): New function.
1811 (dump_node_to_file): New function.
1812 * decl.c (cp_namespace_decls): New function.
1813 (walk_namespaces_r): Use it.
1814 (wrapup_globals_for_namespace): Likewise.
1815 * decl2.c (flag_dump_translation_unit): New variable.
1816 (lang_decode_option): Handle -fdump-translation-unit.
1817 (finish_file): If flag_dump_translation_unit is set, dump the
1820 * lang-options.h: Add -fdump-translation-unit.
1821 * pt.c (tsubst_template_parms): Robustify.
1822 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
1823 (tsubst_expr): Use STMT_LINENO.
1824 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
1825 for invalid cv-qualifiers even while building templates.
1827 1999-08-02 Richard Henderson <rth@cygnus.com>
1829 * call.c: Include defaults.h instead of expr.h.
1832 * typeck.c: Include defaults.h.
1834 1999-08-02 Mark Mitchell <mark@codesourcery.com>
1836 * lex.c (errorcount, sorrycount): Don't declare.
1837 * repo.c (errorcount, sorrycount): Likewise.
1838 * typeck2.c (errorcount, sorrycount): Likewise.
1840 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
1842 * call.c (convert_default_arg, build_over_call): Change all uses of
1843 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
1844 Ensure expr.h is included.
1845 * decl.c (grokparams): Ditto.
1846 * pt.c (tsubst_decl): Ditto.
1847 * typeck.c (convert_arguments): Ditto.
1849 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
1851 * class.c (mark_overriders): Fix order of args to overrides.
1852 (warn_hidden): Likewise. Fix for having virtual and non-virtual
1853 functions with the same name.
1855 1999-08-02 Richard Henderson <rth@cygnus.com>
1857 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
1859 1999-08-01 Mark Mitchell <mark@codesourcery.com>
1861 * call.c (build_conditional_expr): Fix typo in comment.
1863 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
1865 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
1866 case_stack; use in_control_zone_p.
1867 * typeck.c (c_expand_return): Likewise.
1869 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
1871 * except.c (catch_clauses): Delete declaration.
1873 1999-07-30 Mark Mitchell <mark@codesourcery.com>
1875 * call.c (build_conditional_expr): Call convert_from_reference to
1876 avoid reference/non-reference type confusion. Fix typo.
1878 1999-07-30 Richard Henderson <rth@cygnus.com>
1880 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
1881 * cp-tree.h (initializer_constant_valid_p): Remove.
1883 1999-07-28 Mark Mitchell <mark@codesourcery.com>
1885 * call.c (conditional_conversion): Don't build BASE_CONVs for
1886 conversions between things that have the same type.
1887 (build_conditional_expr): Tweak.
1888 (convert_like): Some BASE_CONVs really do require the generation
1891 * init.c (perform_member_init): Don't go through build_modify_expr
1892 for simple initializations.
1894 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
1896 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
1897 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
1898 virtual functions and MI. Simplify.
1900 * method.c: Remove prototype for largest_union_member.
1901 * pt.c (determine_specialization): Fix uninitialized warning.
1902 * lex.c (real_yylex): Likewise.
1904 1999-07-27 Mark Mitchell <mark@codesourcery.com>
1906 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
1909 * cp-tree.h (BINFO_VIRTUALS): Document new format.
1910 * class.c (modify_one_vtable): Change prototype accordingly.
1911 (modify_all_vtables): Likewise.
1912 (modify_all_direct_vtables): Likewise.
1913 (modify_all_indirect_vtables): Likewise.
1914 (build_vtable_entry_for_fn): New function.
1915 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
1916 (modify_vtable_entry): Likewise.
1917 (add_virtual_function): Likewise.
1918 (build_vtbl_initializer): New function.
1919 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
1920 (fixup_vtable_deltas1): Likewise.
1921 (fixup_vtable_deltas): Likewise.
1922 (override_one_vtable): Likewise.
1923 (finish_struct_1): Likewise.
1925 * error.c (dump_expr): Likewise.
1926 * search.c (get_abstract_virtuals_1): Likewise.
1927 (get_abstract_virtuals): Likewise.
1928 (expand_upcast_fixups): Likewise.
1929 * tree.c (debug_binfo): Likewise.
1930 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
1931 __pure_virtual here.
1933 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1935 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
1936 as per 1999-07-26 change.
1938 * typeck.c (c_sizeof): Don't allow non-static data members.
1939 (expr_sizeof): Likewise.
1941 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
1943 * input.c (feed_input): Only touch lineno and input_filename
1944 if !USE_CPPLIB. Save the old values before setting the new ones.
1946 * input.c (feed_input): Add file, line parms.
1947 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
1948 (real_yylex): Check linemode before input_redirected().
1950 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
1951 from op new to warning.
1953 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1955 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
1956 * call.c: All uses changed.
1957 * typeck.c: Likewise.
1959 1999-07-26 Nathan Sidwell <nathan@acm.org>
1961 * exception.cc (__cplus_type_matcher): Match __eh_matcher
1964 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1966 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
1967 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
1968 (strip_top_quals): Declare.
1969 (ncp_convert): Likewise.
1970 (type_after_usual_arithmetic_converions): Likewise.
1971 (composite_pointer_type): Likewise.
1972 * call.c (strip_top_quals): Don't make it static.
1973 (promoted_arithmetic_type_p): New function.
1974 (conditional_conversion): Likewise.
1975 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
1976 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
1977 for converting a type to itself.
1978 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
1979 (implicit_conversion): Make sure the from and to types are
1981 (add_builtin_candidate): Correct handling of ?: operator.
1982 (add_builtin_candidates): Improve documentation.
1983 (build_conditional_expr): New function.
1984 (can_convert): Implement in terms of can_convert_arg.
1985 (ncp_convert): New function.
1986 * typeck.c (type_after_usual_arithmetic_conversions): New
1987 function, split out from common_type.
1988 (composite_pointer_type): New function, split out from
1989 build_conditional_expr.
1990 (common_type): Use type_after_usual_arithmetic_conversions.
1991 Remove redundant attribute merging.
1992 (comptypes): Tidy. Handle COMPLEX_TYPE.
1993 (build_binary_op_nodefault): Use null_ptr_cst_p.
1994 (build_conditional_expr): Remove.
1995 (convert_for_assignment): Use new conversion functions.
1997 * cp-tree.h (abstract_virtuals_error): Change declaration.
1998 * typeck2.c (abstract_virtuals_error): Check to see if an error
1999 ocurred, and return a boolean value accordingly.
2000 (build_functional_cast): Adjust accordingly.
2001 * class.c (finish_struct_1): Likewise.
2002 * cvt.c (ocp_convert): Likewise.
2003 * decl.c (cp_finish_decl): Likewise.
2004 (grokparams): Likewise.
2005 (grok_op_properties): Likewise.
2006 (start_function): Likewise.
2007 * init.c (build_new_1): Likewise.
2009 * pt.c (unify): Don't get confused by pointers-to-member functions.
2011 * search.c (build_cplus_new): Robustify.
2013 1999-07-24 Richard Henderson <rth@cygnus.com>
2015 * gxx.gperf (__builtin_va_arg): New.
2016 * parse.y (VA_ARG): New token.
2017 (unary_expr): Recognize it.
2019 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
2021 * g++FAQ.texi: Deleted per Joe Buck's request.
2022 * Makefile.in: Corresponding changes.
2024 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
2026 * lex.c: Sync with C frontend.
2027 (whitespace_cr): New fn.
2028 (skip_white_space): Use it.
2029 (init_parse): Reorder.
2030 (yyprint): Support CONSTANT.
2031 (pragma_getc, pragma_ungetc): Bring back.
2032 (read_line_number): Change in_system_header directly.
2033 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
2034 (parse_float): Update to C version.
2035 (yylex): Handle '$' under the letter case.
2036 Remove looking_for_typename handling.
2037 Support hex floating point constants.
2038 Follow C's lead for choosing type of integer constants.
2039 Rearrange stuff to match C frontend.
2040 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
2041 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
2043 1999-07-23 Mark Mitchell <mark@codesourcery.com>
2045 * call.c (reference_binding): Tweak.
2046 (mayble_handle_implicit_object): Use direct_reference_binding to
2047 create the right implicit conversion sequence.
2049 1999-07-22 Mark Mitchell <mark@codesourcery.com>
2051 * pt.c (convert_nontype_argument): Don't call decl_constant_value
2052 if we're converting to a reference type.
2054 * call.c (NEED_TEMPORARY_P): New macro.
2055 (standard_conversion): Set it, for derived-to-base conversions.
2056 (reference_related_p): New function.
2057 (reference_compatible_p): Likewise.
2058 (convert_class_to_reference): Likewise.
2059 (direct_reference_binding): Likewise.
2060 (reference_binding): Rework for standards-compliance.
2061 (convert_like): Adjust accordingly.
2062 (maybe_handle_ref_bind): Simplify; the right conversion sequences
2063 are now built up in reference_binding.
2064 (initialize_reference): New function.
2065 * cp-tree.h (ICS_USER_FLAG): Document.
2066 (ICS_THIS_FLAG): Likewise.
2067 (ICS_BAD_FLAG): Likewise.
2068 (NEED_TEMPORARY_P): Likewise.
2069 (cp_lvalue_kind): New type.
2070 (real_lvalue_p): Return it.
2071 * error.c (dump_expr): Provide more accurate representation for
2073 * init.c (expand_default_init): Do not try to perform implicit
2074 conversions for a brace-enclosed initializer.
2075 * search.c (lookup_conversions): Document.
2076 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
2078 (real_lvalue_p): Adjust accordingly.
2079 (lvalue_p): Likewise.
2080 (build_cplus_new): Don't allow the creation of an abstract class.
2081 * typeck.c (convert_for_initialization): Use initialize_reference.
2083 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
2085 * lex.c (real_yylex) : Correct the test for overflow when lexing
2088 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
2090 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
2091 not DECL_BUILT_IN, to determine if a function is internally declared.
2092 (duplicate_decls): Likewise. Improve handling of builtins.
2093 (push_overloaded_decl): Remove special handling of builtins.
2095 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
2097 * decl.c (grokdeclarator): Pull out decl_constant_value in
2100 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
2101 * cp-tree.h, pt.c, semantics.c: Adjust.
2102 * method.c (largest_union_member): Remove.
2104 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
2106 * lex.c (token_getch, token_put_back): New fns.
2107 (real_yylex): Use them.
2109 * lex.c (lang_init): Generalize.
2110 (lang_init_options): Tell cpplib this is C++.
2111 (nextchar): Remove. Replace uses with put_back.
2112 (skip_white_space): Handle linemode here. Optimize for cpplib.
2113 (extend_token_buffer_to): New fn.
2114 (extend_token_buffer): Use it.
2115 (read_line_number, check_newline): Just deal with tokens.
2116 (real_yylex): More cpplib optimizations. Simplify. Don't produce
2117 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
2118 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
2119 * parse.y (PAREN_STAR_PAREN): Remove.
2120 * input.c: Don't use the putback machinery with cpplib.
2121 (sub_getch): Fold back into getch.
2122 (getch): Don't handle linemode here.
2123 (feed_input): Unget any text in the token buffer.
2125 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
2126 nextyychar, nextyylval): Remove.
2128 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
2129 Jason Merrill <jason@yorick.cygnus.com>
2131 * lex.c (indent_level): New variable.
2132 (init_parse): Set cpp_token to CPP_DIRECTIVE.
2133 (consume_string): Make this smart about USE_CPPLIB.
2134 (yyungetc): Use put_back function.
2135 (pragma_getc, pragma_ungetc): Functions deleted.
2136 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
2137 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
2139 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
2140 Also, clean up cases where we redundantly set token_buffer[0].
2141 (read_line_number): New fn.
2142 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
2143 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
2144 (sub_getch): Conditionalize out code that's not appropriate if
2146 (put_back): Rewrite in case USE_CPPLIB is defined.
2147 (input_redirected): Ditto.
2149 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
2151 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
2152 c_global_trees and accessor macros defined in c-common.h.
2153 (cp_tree_index): New enumeration.
2154 (cp_global_trees): Declare new array. Add accessor macros for it, and
2155 delete declarations of tree nodes replaced by it.
2156 (builtin_function): Delete macro, add declaration for new function.
2158 * decl.c: Delete definitions for tree nodes that were replaced by
2159 cp_global_trees and c_global_trees.
2160 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
2161 to generate the common builtins here.
2162 (builtin_function): New function.
2163 * decl2.c (abort_fndecl): Delete declaration.
2164 * except.c (expand_builtin_return_address): Delete declaration.
2165 (builtin_return_address_fndecl): Delete variable.
2166 (const_ptr_type_node): Delete declaration.
2167 * lex.c (cons_up_default_function): Delete declaration of
2169 * parse.y (void_list_node): Delete declaration.
2170 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
2172 (const_string_type_node): Delete declaration.
2173 * search.c (abort_fndecl): Delete declaration.
2174 * Makefile.in: Update dependencies.
2176 1999-07-19 Mark Mitchell <mark@codesourcery.com>
2178 * pt.c (check_default_tmpl_args): Move test for missing default
2179 arguments here, from ...
2180 (end_template_parm_list): Here.
2182 1999-07-18 Mark Mitchell <mark@codesourcery.com>
2184 * decl.c (lookup_nested_type): Remove.
2185 (pushtag): Don't call it.
2187 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
2189 * Makefile.in (INTERFACE): Bump to 2.
2191 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
2193 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
2194 instructions to gcc.gnu.org. Removed e-mail address.
2196 1999-07-17 Mark Mitchell <mark@codesourcery.com>
2198 * pt.c (determine_specialization): Tighten error-checking.
2199 (end_template_parm_list): Likewise.
2201 1999-07-14 Mark Mitchell <mark@codesourcery.com>
2203 * pt.c (check_default_tmpl_args): Handle friends defined in the
2204 class just like member functions defined in the class.
2206 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2207 Jason Merrill <jason@yorick.cygnus.com>
2209 * cp-tree.h (struct lang_decl): Added field for storing sorted
2210 FIELD_DECLs (used in TYPE_DECLs).
2211 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2212 (DECL_SORTED_FIELDS): New macro.
2213 * class.c (method_name_cmp): New function.
2214 (finish_struct_methods): Modified to support sorting and searching
2216 (finish_struct_anon): Changed code in inner loop to use ELT rather
2217 than UELT (which required an extra indirection for every reference).
2218 (field_decl_cmp): New function to support sorting FIELD_DECLs.
2219 (finish_struct_1): Sort fields.
2220 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2221 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2222 Also, switch to using array indexing rather than a changing pointer.
2223 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2226 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
2228 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
2229 casts in system headers or extern "C" blocks.
2231 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
2234 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2236 * decl2.c (write_virtuals): Deleted declaration.
2237 * cp-tree.h (write_virtuals): Deleted extern declaration.
2238 * class.c (finish_struct_1): Removed #if 0'd code that mentions
2240 * semantics.c (begin_class_definition): Rewrite code to not depend
2243 * lex.c (cp_pragma_interface): New function.
2244 (cp_pragma_implementation): Likewise.
2245 (handle_cp_pragma): Call them.
2247 * typeck.c (comptypes): Simplify C code in look_hard.
2249 * xref.c (PALLOC): Use xcalloc, not calloc.
2250 (SALLOC): Use xmalloc, not malloc.
2252 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
2254 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
2257 * decl.c (duplicate_decls): If a redeclaration doesn't match the
2258 initial declaration, then don't save the inline info and by all
2259 means don't mark the function as a builtin function.
2261 * decl.c (lookup_name_real): Set NONCLASS to 1 if
2262 CURRENT_CLASS_TYPE is 0.
2264 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
2267 * ptree.c (print_lang_type): Added vtable-needs-writing.
2269 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
2271 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
2273 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
2275 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2276 Merged into c-common.
2278 1999-07-05 Dave Brolley <brolley@cygnus.com>
2280 * lex.c (errorcount): Declare it.
2281 (finish_parse): Update errorcount for when using CPPLIB.
2283 1999-07-05 Mark Mitchell <mark@codesourcery.com>
2285 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
2287 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
2288 * decl.c (push_class_binding): Use it.
2289 (lookup_name_real): Likewise.
2291 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
2293 * cp-tree.h (widest_integer_literal_type_node,
2294 widest_unsigned_literal_type) : New.
2295 * decl.c (widest_integer_literal_type_node,
2296 widest_unsigned_literal_type) : New.
2297 (init_decl_processing): Handle/use the two new types.
2298 * lex.c (real_yylex): Same.
2299 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2302 1999-07-01 Mark Mitchell <mark@codesourcery.com>
2304 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
2305 to anonymous cv-qualified types.
2307 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
2309 * lex.c (real_yylex) : Change integer literal overflow handling to
2312 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
2314 1999-06-28 Richard Henderson <rth@cygnus.com>
2316 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
2318 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
2320 * error.c (dump_type_real): Handle TREE_LIST again.
2322 * typeck.c (comp_target_parms): Don't complain about
2323 converting from () to (...) if !flag_strict_prototype.
2325 * decl.c (grokdeclarator): Update the names of all variants when
2328 1999-06-21 Mark Mitchell <mark@codesourcery.com>
2330 * init.c (expand_aggr_vbase_init): Rename to
2331 construct_virtual_bases. Conditionalize construction here,
2333 (emit_base_init): Here.
2335 1999-06-19 Mark Mitchell <mark@codesourcery.com>
2337 * semantics.c (finish_asm_statement): Apply decay conversions to
2340 * decl.c (expand_static_init): When building an anonymous function
2341 for use with atexit, compute its body before and after entering
2344 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
2347 1999-06-18 Mark Mitchell <mark@codesourcery.com>
2349 * init.c (expand_aggr_vbase_init): Add flag parameter.
2350 (build_partial_cleanup_for): Remove, inlining into ..
2351 (expand_cleanup_for_base): ... here. Take flag parameter.
2352 (emit_base_init): Pass the in_chrg parameter to
2353 emit_aggr_vbase_init.
2354 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
2356 1999-06-16 Mark Mitchell <mark@codesourcery.com>
2358 * decl2.c (import_export_decl): Use same_type_p, rather than
2359 relying on pointer-equality for types.
2361 * method.c (do_build_copy_constructor): Simplify.
2363 * call.c (build_method_call): Remove bogus code for two-argument
2365 * init.c (build_new_1): Expand on comment, and remove dead code.
2367 * init.c (expand_cleanup_for_base): New function, split out
2369 (emit_base_init): Here.
2370 (expand_aggr_vbase_init): Use it.
2372 1999-06-15 Mark Mitchell <mark@codesourcery.com>
2374 * cp-tree.h (class_cache_firstobj): Declare.
2375 (maybe_push_cache_obstack): Rename to push_cache_obstack.
2376 * class.c (permanent_obstack): Remove declaration.
2377 (class_cache_firstobj): Make it global.
2378 (add_method): Don't use permanent_obstack directly.
2379 (pushclass): Only free the class_cache_obstack if we know how far
2381 (maybe_push_cache_obstack): Rename to push_cache_obstack.
2382 * decl.c: Remove dead comment.
2383 (saved_scope): Add class_cache_firstobj.
2384 (push_to_top_level): Save it.
2385 (pop_from_top_level): Restore it.
2386 (push_class_level_binding): Use push_cache_obstack, not
2387 maybe_push_cache_obstack.
2388 * search.c (push_class_decls): Likewise.
2390 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
2392 * pt.c (tsubst_friend_function): Push into namespace of friend
2393 function before pushdecl'ing it.
2395 1999-06-14 Nathan Sidwell <nathan@acm.org>
2397 * call.c (build_new_op): Remove REF_BIND from all operands.
2399 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
2401 * init.c (build_new_1): Look up operator delete even if there was
2402 no explicit new placement.
2404 1999-06-08 Nathan Sidwell <nathan@acm.org>
2406 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
2408 (build_throw): ... here. Call it.
2409 (process_start_catch_block): Call it.
2411 1999-06-07 Mark Mitchell <mark@codesourcery.com>
2413 * search.c (convert_pointer_to_single_level): Reimplement without
2416 1999-06-06 Mark Mitchell <mark@codesourcery.com>
2418 * method.c (is_back_referenceable_type): Back-reference bools when
2421 1999-06-07 Dave Brolley <brolley@cygnus.com>
2423 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
2424 * input.c (putback_buffer): New structure type.
2425 (putback): Replaces putback_char member.
2426 (putback): Replaces putback_char static variable.
2427 (feed_input): Use putback.
2428 (end_input): Use putback.
2429 (sub_getch): Use putback.
2430 (put_back): Use putback.
2432 1999-06-05 Mark Mitchell <mark@codesourcery.com>
2434 * decl.c (grokdeclarator): Fix typo in last change.
2436 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
2438 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
2439 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
2441 1999-06-04 Nathan Sidwell <nathan@acm.org>
2443 * except.c (build_throw): Check throw expression validity.
2445 1999-06-03 Mark Mitchell <mark@codesourcery.com>
2447 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
2448 just because flag_signed_bitfields is false.
2450 1999-06-03 Nathan Sidwell <nathan@acm.org>
2452 * semantics.c (begin_class_definition): Update the struct's
2454 * class.c (finish_struct): ... rather than here.
2456 * decl.c (make_typename_type): Don't rely on uninitialized
2459 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2461 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
2463 1999-05-31 Mark Mitchell <mark@codesourcery.com>
2465 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
2466 and friends rather than messing with current_obstack directly.
2467 (cp_build_qualified_type_real): Rework ARRAY_TYPE
2468 allocation to match practice throughout the rest of the
2471 1999-05-30 Mark Mitchell <mark@codesourcery.com>
2473 * lex.c (make_lang_type): Create TYPE_BINFO for
2474 TEMPLATE_TYPE_PARMs just like for non-template types.
2476 * decl.c (start_decl): Move checks on initialization to ...
2477 (cp_finish_decl): Here. Tidy formatting slightly.
2479 1999-05-28 Mark Mitchell <mark@codesourcery.com>
2481 * decl.c (add_binding): Don't complain about a redeclaration of a
2482 semantically identical typedef in a local scope.
2484 1999-05-28 Nathan Sidwell <nathan@acm.org>
2486 * decl.c (complete_array_type): Allocate off same obstack. Fix
2487 DO_DEFAULT comment to match reality.
2489 * friend.c (make_friend_class): Fix diagnostic typo.
2491 1999-05-28 Mark Mitchell <mark@codesourcery.com>
2493 * decl.c (lookup_namespace_name): Handle getting a
2495 (expand_static_init): Don't call pushdecl for implicitly declared
2496 `atexit' used to register destructors.
2498 1999-05-25 Mark Mitchell <mark@codesourcery.com>
2500 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
2503 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
2504 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
2505 by combining TEMPLATE_INFO and LEVEL into a single union.
2506 (DECL_TEMPLATE_INFO): Reformat.
2507 (DECL_SAVED_TREE): Document.
2508 (DECL_TEMPLATE_INJECT): Remove.
2509 * class.c (finish_struct): Remove code to deal with
2510 DECL_TEMPLATE_INJECT.
2512 * decl.c (maybe_process_template_type_declaration): Handle all new
2513 types in templates uniformly.
2514 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
2516 * pt.c (lookup_template_class): Inject template instantiations of
2517 forward-declarations.
2518 (instantiate_class_template): Remove code processing
2519 DECL_TEMPLATE_INJECT.
2521 * pt.c (lookup_template_class): Tweak lookup to find member
2524 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
2526 * semantics.c (finish_asm_stmt): Make strings permanent if they're
2529 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
2531 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
2532 parts of pointer to data member types.
2534 1999-05-24 Mark Mitchell <mark@codesourcery.com>
2536 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
2537 and then make it look like `abort'. Just use `abort' instead.
2539 * typeck.c (build_static_cast): Don't allow static_casts that cast
2541 (casts_away_constness_r): New function.
2542 (casts_away_constness): Likewise.
2544 * decl.c (lookup_tag): Remove code no longer needed after
2545 name-lookup improvements.
2546 * decl2.c (handle_class_head): Make error-recovery more robust.
2547 * friend.c (make_friend_class): Reject templated typename types.
2548 * lex.c (is_global): A template parameter isn't global.
2549 * parse.y (class_head): Robustify.
2550 * parse.c: Regenerated.
2552 1999-05-22 Mark Mitchell <mark@codesourcery.com>
2554 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
2555 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
2557 * cp-tree.h (push_nested_namespace): Declare.
2558 (pop_nested_namespace): Likewise.
2559 * decl.c (push_nested_namespace): New function.
2560 (pop_nested_namespace): Likewise.
2561 * pt.c (instantiate_class_template): Use them.
2563 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
2565 * cp-tree.h (cplus_expand_constant): Declare.
2566 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
2567 converted from one pointer-to-object type to another.
2568 * expr.c (cplus_expand_constant): Don't make it static.
2569 * typeck.c (build_component_ref): Don't crash when presented with
2570 a component which is a TEMPLATE_DECL.
2571 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
2572 cast from a pointer-to-member constant to its own type does not
2573 result in a valid non-type template argument.
2575 1999-05-21 Mark Mitchell <mark@codesourcery.com>
2576 Nathan Sidwell <nathan@acm.org>
2578 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
2579 * cp-tree.h: Fix typo in documentation on pointers-to-members.
2580 (cp_build_qualified_type): Make it a macro.
2581 (cp_build_qualified_type_real): Declare.
2582 * decl.c (grokdeclarator): Remove misleading comment. Avoid
2583 problem with template parameters and restrict-qualification.
2584 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
2585 * hash.h: Regenerated.
2586 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
2588 (NORID): Remove definition.
2589 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
2590 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
2591 (fn_type_unification): Check that the function type resulting from
2592 the deduction is legal.
2593 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
2594 (unify): Use cp_build_qualified_type_real.
2595 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
2596 (cp_build_qualified_type): Rename to ...
2597 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
2598 and modify appropriately.
2600 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
2601 reveal optimization opportunities.
2603 * pt.c (tsubst): Don't issue error messages when we're not
2604 complaining, even if we see a qualified function type.
2605 (check_cv_quals_for_unify): Don't allow a qualified function
2608 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
2610 * class.c (instantiate_type): Downgrade errors for object-dependent
2611 memfn refs to pedwarn.
2613 1999-05-20 Mark Mitchell <mark@codesourcery.com>
2615 * decl.c (grokdeclarator): Don't treat [] as indicating a
2616 zero-sized array in a typedef.
2618 * call.c (build_object_call): Don't look at DECL_NAME for a type.
2619 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
2620 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
2622 * pt.c (for_each_template_parm): Rework to match documentation.
2623 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
2625 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
2627 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
2629 * class.c (finish_base_struct): Allow non-COM bases for COM classes
2630 except at the leftmost position.
2631 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
2632 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
2633 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
2635 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
2636 (build_cplus_new): Make sure that what we return is of the right type.
2638 1999-05-20 Mark Mitchell <mark@codesourcery.com>
2640 * cp-tree.h (make_ptrmem_cst): New function.
2641 * expr.c (cplus_expand_constant): Split out from ...
2642 (cplus_expand_expr): Here. Use cplus_expand_constant.
2643 (init_cplus_expand): Set lang_expand_constant.
2644 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
2646 * tree.c (make_ptrmem_cst): Define.
2647 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
2648 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
2650 1999-05-19 Mark Mitchell <mark@codesourcery.com>
2652 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
2654 * decl2.c (start_static_storage_duration_function): Fix comment.
2655 (finish_file): Create static storage duration functions lazily.
2657 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
2659 Implement anonymous structs.
2660 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
2661 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
2662 * class.c (finish_struct_1): Remove redundant check for anon struct.
2663 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
2664 (check_tag_decl): Check for anonymous struct here.
2665 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
2666 * init.c (sort_member_init, emit_base_init): Handle getting fields
2667 as well as names in current_member_init_list.
2668 (perform_member_init): Handle getting an anon aggr.
2669 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
2670 (do_build_copy_constructor): Likewise.
2672 1999-05-19 Mark Mitchell <mark@codesourcery.com>
2674 * tree.c (cp_build_qualified_type): Don't allow qualified function
2677 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
2679 * gxxint.texi: Fix typo.
2681 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
2683 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
2684 * class.c (finish_struct_1): Use CLASS_TYPE_P.
2685 * ptree.c (print_lang_type): Likewise.
2686 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
2688 * typeck2.c (digest_init): Likewise.
2690 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
2692 * call.c (joust): Compare the types of the conv ops, not the
2693 target types of the conversions.
2695 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
2697 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
2700 1999-05-17 Mark Mitchell <mark@codesourcery.com>
2702 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
2703 * decl.c (grokfndecl): Don't allow inline declarations of friend
2704 template specializations, or friend template specializations with
2706 * pt.c (tsubst): Handle substitution into array types that does
2707 not yield a fixed upper bound, even when not processing a
2709 (tsubst_copy): Deal with the fact that the second operand to a
2710 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
2711 * search.c (marked_pushdecls_p): Don't descend into
2712 TEMPLATE_TYPE_PARMs and the like.
2713 (unmarked_pushdecls_p): Likewise.
2715 * call.c (build_over_call): Don't throw away
2716 initializations/copies of empty classes; use MODIFY_EXPR and
2717 INIT_EXPR as for non-empty classes.
2718 * class.c (finish_struct_1): Put the padding byte for an empty
2719 class on the TYPE_NONCOPIED_PARTS list for the class.
2721 1999-05-16 Mark Mitchell <mark@codesourcery.com>
2723 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
2724 indicate a reference to a field that is a qualified name.
2726 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
2728 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
2729 ASM_OUTPUT_CONSTRUCTOR.
2731 * friend.c (do_friend): Add attrlist arg. Remove support for
2732 getting a non-decl as 'decl'.
2733 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
2735 (grokdeclarator): Adjust.
2736 * cp-tree.h: Adjust.
2738 1999-05-16 Mark Mitchell <mark@codesourcery.com>
2740 * cp-tree.h (permanent_p): New function.
2741 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
2742 possibly complex tree node.
2743 * tree.c (mapcar): Adjust comments, and follow coding standards in
2745 (permanent_p): New function.
2747 1999-05-13 Per Bothner <bothner@cygnus.com>
2749 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
2750 primitive Java types, if we actually see `extern "Java"'.
2752 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2754 * lang-specs.h: Pass -$ to the preprocessor.
2756 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
2758 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
2759 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
2760 (resolve_offset_ref): Don't handle a raw baselink.
2761 * cvt.c (build_expr_type_conversion): Likewise.
2762 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
2763 convert_for_initialization): Likewise.
2764 * class.c (instantiate_type): Handle seeing a baselink under an
2766 * error.c (dump_expr): Likewise.
2767 * pt.c (for_each_template_parm): Likewise.
2768 (resolve_overloaded_unification): Likewise.
2769 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
2770 * typeck.c (expr_sizeof): Also complain about other permutations
2771 of overloaded functions.
2773 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
2775 * init.c (resolve_offset_ref): Don't return a raw method.
2777 * typeck.c (decay_conversion): Don't handle a raw method.
2778 Resolve all OFFSET_REFs.
2779 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
2780 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
2781 same_type_p for pmf bits. Don't use build_binary_op to compare
2782 raw pointers to methods.
2783 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
2784 to decide when to call resolve_offset_ref.
2785 (build_c_cast, convert_for_initialization): Likewise.
2786 * cvt.c (build_expr_type_conversion): Likewise.
2788 1999-05-06 Nathan Sidwell <nathan@acm.org>
2790 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
2792 1999-05-05 Mark Mitchell <mark@codesourcery.com>
2794 * decl2.c (start_objects): Don't let static constructors and
2795 destructors get inlined.
2797 * parse.y (nested_name_specifier): Make sure ordinary types are
2798 complete, just like template types.
2799 * parse.c: Regenerated.
2801 * pt.c (check_explicit_specialization): Improve error messages.
2803 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
2805 * typeck.c (string_conv_p): Use same_type_p to check whether we
2806 try to convert between char and wchar_t.
2808 1999-05-03 Mark Mitchell <mark@codesourcery.com>
2810 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
2811 lookup to error_mark_node here.
2812 (lookup_member): Revise documentation. Add comments. Don't set
2813 the TREE_TYPE to error_mark_node here, and don't build up an extra
2814 TREE_LIST for ambiguous lookups.
2815 (setup_class_bindings): Adjust accordingly.
2816 (push_class_decls): Revise out-of-date comments.
2818 * typeck.c (build_const_cast): Tighten checks for legality.
2820 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
2822 * init.c (build_member_call): Lookup names coming from
2823 namespace-scoped LOOKUP_EXPR.
2825 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
2827 * gxxint.texi: Add documentation for 'I'.
2829 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
2831 * tinfo.cc (operator==): Qualify type_info with std::.
2833 1999-05-02 Mark Mitchell <mark@codesourcery.com>
2835 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
2836 (DECL_COMDAT): Remove definition.
2838 1999-05-01 Mark Mitchell <mark@codesourcery.com>
2840 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
2843 1999-04-30 Mark Mitchell <mark@codesourcery.com>
2845 * class.c (build_vtable): Use build_lang_decl when building
2846 vtables, not just build_decl.
2847 (prepare_fresh_vtable): Likewise.
2848 * decl.c (wrapup_globals_for_namespace): Mark vtables as
2849 DECL_EXTERNAL when calling wrapup_global_declarations.
2850 * decl2.c (priority_info_s): Add initializations_p and
2851 destructions_p members.
2852 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
2853 when deciding what vtables to write out.
2854 (ssdf_decls): New variable.
2855 (ssdf_decls_used): Likewise.
2856 (start_static_storage_duration_function): Deal with being called
2857 multiple times. Avoid inlining this function.
2858 (generate_inits_for_priority): Deal with reuse of priority map.
2859 (get_priority_info): Clear initializations_p and destructions_p.
2860 (do_static_initialization): Tweak comment.
2861 (do_static_destruction): Likewise. Fix condition on sentries for
2863 (generate_ctor_or_dtor_function): Call all of the static storage
2865 (generate_ctor_or_dtor_function_for_priority): Check
2866 initializations_p and destructions_p to see what priorities need
2867 initialization functions.
2868 (finish_file): Rework to generate multiple static storage duration
2869 functions, rather than just one.
2871 * typeck.c (build_const_cast): Tweak last change to handle
2872 templates correctly.
2874 * typeck.c (build_const_cast): Disallow use of const_cast to
2875 anything but a pointer or reference type.
2877 1999-04-30 Nathan Sidwell <nathan@acm.org>
2879 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
2882 1999-04-29 Mark Mitchell <mark@codesourcery.com>
2884 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
2885 (finish_file): Indent comments properly.
2887 1999-04-29 Richard Henderson <rth@cygnus.com>
2889 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
2890 (do_static_destruction): Likewise.
2892 1999-04-29 Nathan Sidwell <nathan@acm.org>
2894 * cp-tree.h (TYPE_NOTHROW_P): New macro.
2895 * decl2.c (delete_sanity): Warn on deleting void *.
2896 * init.c (build_new_1): Use TYPE_NOTHROW_P.
2897 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
2898 throwing operator new.
2900 1999-04-28 Nathan Sidwell <nathan@acm.org>
2902 * cp-tree.h (build_component_addr): Remove prototype.
2903 * typeck.c (build_component_addr): Make static. Remove MSG
2905 (build_component_addr): Remove MSG parameter, clean up
2907 (build_x_function_call): Use cp_error.
2908 (build_unary_op): Adjust call of build_component_addr.
2910 1999-04-28 Mark Mitchell <mark@codesourcery.com>
2912 * pt.c (tsubst_friend_class): Check for NULL.
2914 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2916 * search.c (binfo_for_vtable): Initialize bfvi.var.
2918 1999-04-27 Nathan Sidwell <nathan@acm.org>
2920 * rtti.c (build_x_typeid): Check rtti is enabled.
2922 1999-04-26 Mark Mitchell <mark@codesourcery.com>
2924 * search.c (is_subobject_of_p): Make sure we're looking at the
2927 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
2929 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
2931 1999-04-23 Mark Mitchell <mark@codesourcery.com>
2933 * decl2.c (finish_file): Tweak handling of extern inlines so that
2934 they are not unnecessarily put out.
2936 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
2937 such as base classes.
2939 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
2941 * tree.c (build_exception_variant): Fix typo: use the chain of U,
2942 not trying V, while cycling through U.
2944 1999-04-22 Mark Mitchell <mark@codesourcery.com>
2946 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
2947 preserves_first_arg. Enlarge dummy accordingly.
2948 (DECL_TINFO_FN_P): New macro.
2949 (SET_DECL_TINFO_FN_P): Likeiwse.
2950 (DECL_RETURNS_FIRST_ARG): Remove.
2951 (DECL_PRESERVES_THIS): Likewise.
2952 (DECL_INIT_PRIORITY): New macro.
2953 (finish_struct_1): Change prototype.
2954 (cat_namespace_levels): Remove prototype.
2955 (vtable_decl_p): New prototype.
2956 (vtype_decl_p): Likewise.
2957 (sigtable_decl_p): Likewise.
2958 (walk_globals_pred): New typedef.
2959 (walk_globals_fn): Likewise.
2960 (walk_globals): New prototype.
2961 (walk_namespaces_fn): New typedef.
2962 (walk_namespaces): New prototype.
2963 (wrapup_globals_for_namespace): Likewise.
2964 (walk_vtables): Remove prototype.
2965 (walk_sigtables): Likewise.
2966 (instantiate_pending_templates): New prototype.
2967 * class.c (finish_struct_1): Don't return a value.
2968 * decl.h (pending_statics): Remove declaration.
2969 * decl.c (walk_namespaces_r): New function.
2970 (walk_globals_r): Likewise.
2971 (vtable_decl_p): Likewise.
2972 (vtype_decl_p): Likewise.
2973 (sigtable_decl_p): Likewise.
2974 (walk_namespaces): Likewise.
2975 (walk_globals_data): New type.
2976 (walk_globals): New function.
2977 (wrapup_globals_for_namespace): Likewise.
2978 (expand_static_init): Remove assertion. Remove redundancy in
2979 conditional. Don't put static data members in static_aggregates
2981 (finish_function): Remove redundancy in conditional. Don't set
2982 DECL_RETURNS_FIRST_ARG.
2983 (cat_namespace_levels): Remove.
2984 * decl2.c: Include splay-tree.h and varray.h.
2985 (priority_info_s): New structure.
2986 (finish_vtable_vardecl): Change prototype. Adjust for new calling
2988 (prune_vtable_vardecl): Likewise.
2989 (finish_sigtable_vardecl): Likewise.
2990 (setup_initp): Remove.
2993 (start_static_storage_duration_function): New function.
2994 (generate_inits_for_priority): Likewise.
2995 (finish_static_storage_duration_function): Likewise.
2996 (get_priority_info): Likewise.
2997 (do_static_initialization): Likewise.
2998 (do_static_destruction): Likewise.
2999 (do_static_initialization_and_destruction): Likewise.
3000 (generate_ctor_or_dtor_function): Likewise.
3001 (generate_ctor_and_dtor_functions_for_priority): Likewise.
3002 (pending_statics): Make it a varray.
3003 (pending_statics_used): New variable.
3004 (saved_inlines): Make it a varray.
3005 (saved_inlines_used): New variable.
3006 (finish_static_data_member): Change method of updating
3008 (mark_inline_for_output): Remove #if 0'd code. Change method of
3009 updating saved_inlines.
3010 (walk_vtables): Remove.
3011 (walk_sigtables): Likewise.
3012 (import_export_decl): Use DECL_TINFO_FN_P.
3013 (pending_templates): Remove declaration.
3014 (maybe_templates): Likewise.
3015 (static_aggregates_initp): Likewise.
3016 (setup_initp): Likewise.
3017 (finish_objects): Simplify.
3018 (INITIALIZE_P_IDENTIFIER): New macro.
3019 (PRIORITY_IDENTIFIER): New macro.
3020 (SSDF_IDENTIFIER): New macro.
3021 (initialize_p_decl): New variable.
3022 (priority_decl): Likewise.
3023 (ssdf_decl): Likewise.
3024 (priority_info_map): Likewise.
3025 (finish_file): Recode output of static intializers and other
3026 file-scope finalization tasks.
3027 * error.c (OB_END_TEMPLATE_ID): New macro.
3028 (dump_type_real): Use it.
3029 (dump_decl): Likewise.
3030 (dump_function_name): Likewise.
3031 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
3033 (check_newline): Use walk_globals, not walk_vtables.
3034 * pt.c (pending_tempalte_expansions): Remove.
3035 (set_vardecl_interface_info): Likewise.
3036 (pending_templates): Make static.
3037 (maybe_templates): Likewise.
3038 (instantiate_class_template): Adjust call to finish_struct_1.
3039 (instantiate_pending_templates): New function.
3040 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
3041 * tree.c (static_aggregates_initp): Remove.
3042 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
3044 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
3046 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
3047 with the RTL code RETURN.
3048 * hash.h: Regenerated.
3049 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
3050 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
3051 * parse.c: Regenerated.
3052 * pt.c: Include varray.h. Include rtl.h since varray.h requires
3054 (inline_parm_levels): New variable.
3055 (inline_parm_levels_used): Likewise.
3056 (maybe_begin_member_template_processing): Update them.
3057 (maybe_end_member_template_processing): Use them, rather than
3058 guessing how many levels to pop.
3060 * decl.c (make_typename_type): Tighten error-checking.
3062 1999-04-20 Mark Mitchell <mark@codesourcery.com>
3064 * cp-tree.h (build_binary_op): Remove unneeded parameter.
3065 * class.c (build_vrable_entry_ref): Adjust call to
3067 * decl.c (expand_static_init): Likewise.
3068 (grokdeclarator): Likewise.
3069 (finish_function): Likewise.
3070 * decl2.c (delete_sanity): Likewise.
3071 (do_dtors): Likewise.
3072 (do_ctors): Likewise.
3073 * error.c (dump_type_suffix): Likewise.
3074 * expr.c (cplus_expand_expr): Likewise.
3075 * init.c (resolve_offset_ref): Likewise.
3076 (build_new): Likewise.
3077 (build_new_1): Likewise.
3078 (build_vec_delete_1): Likewise.
3079 (expand_vec_init_catch_clause): Likewise.
3080 (build_delete): Likewise.
3081 * pt.c (tsubst): Likewise.
3082 * rtti.c (synthesize_tinfo_fn): Likewise.
3083 * search.c (expand_upcast_fixups): Likewise.
3084 (expand_direct_vtbls_init): Likewise.
3085 * typeck.c (get_member_function_from_ptrfunc): Likewise.
3086 (build_binary_op_nodefault): Likewise.
3087 (point_int_sum): Likewise.
3088 (pointer_diff): Likewise.
3089 (build_unary_op): Likewise.
3090 (build_modify_expr): Likewise.
3091 (get_delta_difference): Likewise.
3092 (build_ptrmemfunc): Likewise.
3093 (expand_ptrmemfunc_cst): Likewise.
3095 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
3097 * decl.c (grokfndecl): Always call cplus_decl_attributes.
3098 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
3100 1999-04-19 Mark Mitchell <mark@codesourcery.com>
3102 * cp-tree.h (finish_static_data_member_decl): New function.
3103 * decl2.c (finish_static_data_member_decl): Split out from ...
3105 * pt.c (instantiate_class_template): Use it here instead of
3107 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
3108 finish_static_data_member_decl will do that. Explicit set
3109 DECL_EXTERNAL to match non-template processing.
3111 1999-04-18 Mark Mitchell <mark@codesourcery.com>
3113 * cp-tree.h (finish_class_definition): Add parameter.
3114 * parse.y (structsp): Use it. Don't call pop_scope here.
3115 * parse.c: Regenerated.
3116 * semantics.c (finish_class_definition): Pop it here.
3118 1999-04-17 Mark Mitchell <mark@codesourcery.com>
3120 * decl.c (xref_tag): Revise handling of nested template
3122 * pt.c (check_explicit_specialization): Tweak handling of friend
3123 templates in template classes.
3124 (tsubst_friend_class): Handle friend declarations for nested
3125 member template classes.
3127 1999-04-16 Mark Mitchell <mark@codesourcery.com>
3129 * class.c (finish_struct): Remove unused variable.
3130 (pushclass): Likewise.
3131 (invalidate_class_lookup_cache): Likewise.
3132 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
3133 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
3134 doesn't get obliterated.
3135 (make_typename_type): Handle template classes correctly.
3137 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
3138 (storetags): Declare.
3139 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
3140 (pushclass): Likewise. Use storetags to install tag declarations,
3142 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
3143 * decl.c (storetags): Make it global.
3144 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
3145 implicit typename declaration.
3146 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
3147 * method.c (hack_identifier): Likewise.
3148 * search.c (lookup_member): Likewise.
3150 * decl.c (warn_about_implicit_typename_lookup): New function.
3151 (lookup_name_real): Use it. Rework handling of implicit typename
3154 1999-04-15 Mark Mitchell <mark@codesourcery.com>
3156 * cp-tree.h (lookup_nested_field): Remove.
3157 * class.c (push_nested_class): Handle UNION_TYPEs.
3158 (pop_nested_class): Likewise.
3159 * decl.c (lookup_name_real): Don't call lookup_nested_field.
3160 (start_decl): Use push_nested_class, not just pushclass.
3161 (cp_finish_decl): Use pop_nested_class, not just popclass.
3162 * search.c (lookup_nested_field): Remove.
3164 * cp-tree.h (lang_type): Add documentation.
3165 * decl2.c (handle_class_head): Create template declarations here,
3167 * parse.y (class_head): Return whether or not we entered a new
3168 scope, as well as the type named.
3169 (named_class_head): Likewise.
3170 (named_complex_class_head_sans_basetype): Likewise.
3171 (structsp): Adjust accordingly. Pop scope when required.
3172 * parse.c: Regenerated.
3173 * pt.c (check_default_tmpl_args): Robustify.
3174 (redeclare_class_template): Likewise.
3175 (instantiate_class_template): An instantiation of an
3176 anonymous union is itself an anonymous union.
3177 * semantics.c (begin_class_definition): Don't create template
3180 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
3182 * parse.y (after_type_declarator_intern): New nonterminal.
3183 (after_type_declarator): Use it.
3184 (direct_after_type_declarator): Likewise. Move above
3185 nonnested_type to fix reduce/reduce conflict resolution.
3186 (declmods): Reducing from just 'attributes' has EMPTY precedence.
3187 * Makefile.in (CONFLICTS): Update.
3189 * decl.c (define_label): Downgrade error for jumping over a
3190 non-POD decl to pedwarn.
3192 1999-04-14 Mark Mitchell <mark@codesourcery.com>
3194 * cp-tree.h (popclass): Change declaration.
3195 (pop_nested_class): Likewise.
3196 (poplevel_class): Remove declaration.
3197 * call.c (convert_default_argument): Pass no arguments to
3199 * class.c (finish_struct_1): Likewise.
3200 (finish_struct): Likewise.
3201 (popclass): Remove argument. Simplify code accordingly.
3202 (pop_nested_class): Likewise.
3203 * decl.c (poplevel_class): Declare it here, and make it static.
3204 (poplevel): Handle class scopes.
3205 (poplevel_class): Don't take an rgument. Simplify.
3206 (pop_everything): Pass no arguments to pop_nested_class.
3207 (cp_finish_decl): Pass no arguments to popclass.
3208 (grokdeclarator): Pass no arguments to pop_nested_class.
3209 (finish_function): Likewise.
3210 * decl2.c (grokfield): Likewise.
3211 (pop_scope): Pass no arguments to popclass.
3212 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
3213 * pt.c (instantiate_class_template): Move call to pushclass, and
3214 document. Pass no arguments to popclass.
3215 (regenerate_decl_from_template): Likewise.
3217 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
3219 * typeck.c (build_unary_op): Handle taking the address of a unique
3220 bound non-static member function.
3222 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
3224 * lang-options.h (-Wdeprecated): New flag.
3225 * decl2.c (warn_deprecated): New flag.
3226 (lang_decode_option): Deprecated this-is-variable,
3227 external-templates, alt-external-templates.
3228 Support -Wdeprecated.
3229 * errfn.c (cp_deprecated): New function.
3231 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
3233 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
3234 of the decls themselves.
3236 * pt.c (tsubst_function_type): Copy attributes over.
3238 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
3240 * cp-tree.h: Add prototype.
3241 * decl.c (init_decl_processing): Set valid_lang_attribute.
3243 1999-04-13 Mark Mitchell <mark@codesourcery.com>
3245 * class.c (finish_struct_1): Look at the const-ness of the field's
3246 type, not the TREE_READONLY-ness of the declaration.
3247 * method.c (synthesize_method): Likewise.
3248 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
3249 creating new declarations.
3251 1999-04-13 Mike Stump <mrs@wrs.com>
3253 * decl2.c (import_export_decl): Because vtables always reference
3254 virtual functions, even if they are inlined, don't allow
3255 -fno-implement-inlines to not emit them, instead, emit them with
3257 * decl.c (start_function): Likewise.
3259 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
3261 * cp-tree.h (struct lang_type): Add com_interface.
3262 (CLASSTYPE_COM_INTERFACE): New macro.
3263 * class.c (set_rtti_entry): COM interface classes have no RTTI
3264 entries in their vtables; adjust.
3265 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
3266 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
3267 finish_struct_1): Likewise.
3268 * decl2.c (mark_vtable_entries): Likewise.
3269 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
3270 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
3271 expand_upcast_fixups): Likewise.
3272 * tree.c (debug_binfo): Likewise.
3274 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
3275 * typeck.c (comptypes): If we get it, ignore attributes.
3276 * class.c (instantiate_type): Use BASELINK_P. Change complain
3277 parameter to flags; 2 means ignore attributes.
3278 * call.c (build_op_delete_call): Pass it.
3280 * decl.c (xref_tag): Only complain once about using a typedef-name
3281 with 'struct'. Downgrade to pedwarn.
3283 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
3285 * parse.y (absdcl_intern): New nonterminal.
3286 (absdcl, direct_abstract_declarator): Use it.
3288 * pt.c (lookup_template_class): Look through implict typename.
3290 1999-04-11 Mark Mitchell <mark@codesourcery.com>
3292 * friend.c (add_friend): Deal gracefully with error_mark_node.
3293 * method.c (build_overload_value): Handle pointers-to-members as
3294 template parameters.
3296 * decl.c (push_binding): Fix typo in comment.
3298 1999-04-10 Mark Mitchell <mark@codesourcery.com>
3300 * error.c (dump_type_real): If a typename is a template-id, put
3301 out the template arguments.
3302 (dump_expr): Handle TEMPLATE_ID_EXPR.
3303 * pt.c (lookup_template_class): Now that full arguments are
3304 available everywhere, remove code that tried to guess them.
3306 1999-04-09 Mark Mitchell <mark@codesourcery.com>
3308 * decl.c (make_typename_type): Complain if we don't find a type
3309 when trying to make a typename type for a non-template type.
3311 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
3313 * decl.c (start_decl): Pass attributes to grokdeclarator.
3314 (grokdeclarator): Handle attributes on constructor-syntax
3317 1999-04-08 Mark Mitchell <mark@codesourcery.com>
3319 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
3322 * search.c (template_self_reference_p): Tweak.
3324 1999-04-07 Mark Mitchell <mark@codesourcery.com>
3326 * init.c (build_offset_ref): Don't build yet another weird data
3327 structure to describe overloaded functions.
3329 1999-04-06 Mark Mitchell <mark@codesourcery.com>
3331 * cp-tree.h (BASELINK_P): New macro.
3332 (SET_BASELINK_P): Likewise.
3333 * init.c (build_member_call): Remove needless assignment in if
3335 * search.c (lookup_field_r): Fix handling when we are looking
3336 specifically for a type; these are not hidden by functions and
3338 (lookup_member): Use SET_BASELINK_P.
3339 * tree.c (is_overloaded_fn): Use BASELINK_P.
3340 (really_overloaed_fn): Likewise.
3341 (get_first_fn): Likewise.
3343 1999-04-05 Mark Mitchell <mark@codesourcery.com>
3345 * decl.c (lookup_name_current_level): Tweak, and improve
3348 * class.c (maybe_fixup_vptrs): Remove declaration.
3349 (build_class_init_list): Likewise.
3350 * decl.c (pushdecl_class_level): Call check_template_shadow here
3352 (push_class_level_binding): ... not here.
3353 * search.c (dfs_push_type_decls): Only avoid
3354 template-self-reference TYPE_DECLs if they are from base classes.
3356 1999-04-04 Mark Mitchell <mark@codesourcery.com>
3358 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
3361 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
3363 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
3364 (finish_struct_1): Don't call build_class_init_list.
3366 1999-04-02 Mark Mitchell <mark@codesourcery.com>
3368 * tinfo.h (__class_type_info): Fix illegal declaration.
3370 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
3371 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
3372 (IDENTIFIER_CLASS_VALUE): Improve documentation.
3373 (is_properly_derived_from): Declare.
3374 (invalidate_class_lookup_cache): Likewise.
3375 (maybe_maybe_note_name_used_in_class): Likewise.
3376 (note_name_declared_in_class): Likewise.
3377 (push_using_decl): Remove duplicate declaration.
3378 (id_in_current_class): Remove declaration.
3379 (push_class_binding): Change prototype.
3380 (clear_identitifer_class_values): Declare.
3381 * call.c (is_properly_derived_from): Make it global.
3382 (build_new_function_call): Be careful about updating candidates.
3383 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
3384 asked to make illegal calls.
3385 * class.c: Include splay-tree.h.
3386 (class_stack_node): Add names_used slot.
3387 (check_member_decl_is_same_in_complete_scope): Remove.
3388 (add_method): Fix comment. Push the declaration into class
3390 (finish_struct_1): When popping the class, pop the bindings too.
3391 Remove check for data member/function member conflict.
3392 (finish_struct): Remove calls to
3393 check_member_decl_is_same_in_complete_scope. Change calls to
3395 (pushclass): Clear names_used in the class stack entry.
3396 Use invalidate_class_lookup_cache to remove cached entries, rather
3397 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
3398 before entering a new class. Remove dead code. Don't mess with
3399 current_function_decl when pushing declarations.
3400 (invalidate_class_lookup_cache): New function, split out from ...
3401 (popclass): Here. Clean up names_used on our way out.
3402 (instantiate_type): Adjust.
3403 (build_self_reference): Don't push the declaration here.
3404 (maybe_note_name_used_in_class): New function.
3405 (note_name_declared_in_class): Likewise.
3406 * decl.c (add_binding): Change prototype.
3407 (find_class_binding_level): New function.
3408 (innermost_nonclass_level): Likewise.
3409 (current_binding_level): Update documentation.
3410 (inner_binding_level): Remove. Replace with current_binding_level
3412 (push_binding_level): Remove special handling of
3413 class_binding_level.
3414 (pop_binding_level): Likewise. Use find_class_binding_level.
3415 (suspend_binding_level): Likewise.
3416 (global_bindings_p): Use innermost_nonclass_level.
3417 (toplevel_bindings_p): Likewise.
3418 (namespace_bindings_p): Likewise.
3419 (pseudo_global_level_p): Likewise.
3420 (push_binding): Clear INHERITED_VALUE_BINDING_P.
3421 (add_binding): Check for illegal multiple declarations. Return a
3422 value indicating whether or not the new binding was legal.
3423 (push_local_binding): Skip over class binding levels. Check
3424 return value from add_binding.
3425 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
3426 note_name_declared_in_class.
3427 (pushlevel_class): Remove "fake out the rest of the compiler"
3429 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
3430 (clear_identifier_class_values): New function.
3431 (pop_from_top_level): Use it.
3432 (pop_everything): Tweak.
3433 (maybe_process_template_type_declaration): Don't push the
3434 declaration for the template here.
3435 (pushtag): Don't push tag declarations into class scope here.
3436 (pushdecl): Apply DeMorgan's law for readability.
3437 (pushdecl_class_level): Remove special-case code for
3438 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
3439 (push_class_level_bindng): Deal with inherited bindings.
3440 (lookup_name_real): Remove special-case code for
3441 TYPE_BEING_DEFINED, and some implicit typename magic.
3442 (grokdeclarator): Handle COMPONENT_REF for a template function.
3443 (build_enumerator): Don't call pushdecl_class_level here.
3444 (id_in_current_class): Remove.
3445 * decl2.c (grokfield): Don't call pushdecl_class_level or
3446 check_template_shadow.
3447 * errfn.c (cp_file_of): Don't declare.
3448 (cp_line_of): Likewise.
3449 * error.c (dump_decl): Handle an OVERLOAD.
3450 (cp_file_of): Likewise.
3451 (cp_line_of): Likewise.
3452 * init.c (build_member_call): Handle a COMPONENT_REF.
3453 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
3454 pushdecl_class_level.
3455 * method.c (hack_identifier): Build COMPONENT_REFs for references
3456 to member templates as well as member functions. Remove dead
3458 * parse.y (left_curly): Remove.
3459 (nonnested_type): Call maybe_note_name_used_in_class, not
3460 pushdecl_class_level.
3461 * parse.c: Regenerated.
3462 (nested_name_specifier_1): Likewise.
3463 * pt.c (check_explicit_specialization): Adjust, for robustness.
3464 (check_template_shadow): Handle OVERLOADs.
3465 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
3466 TEMPLATE_DECL, if appropriate.
3467 * search.c (envelope_add_decl): Remove.
3468 (dfs_pushdecls): Likewise.
3469 (dfs_compress_decls): Likewise.
3470 (dfs_push_decls): New function.
3471 (dfs_push_type_decls): Likewise.
3472 (setup_class_bindings): Likewise.
3473 (template_self_reference_p): Likewise.
3474 (lookup_field_r): Use it.
3475 (looup_member): Remove old comment. Deal with ambiguity.
3476 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
3477 and remove envelope processing.
3478 * semantics.c (begin_class_definition): Let pushclass push
3479 declarations for base classes.
3480 (finish_member_declaration): Push declarations into class scope.
3481 * typeck.c (build_component_ref): Just put an OVERLOAD into the
3482 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
3483 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
3484 * Makefile.in (class.o): Depend on splay-tree.h.
3486 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
3488 * cvt.c (convert_pointer_to_real): Use same_type_p.
3489 * typeck.c (comp_target_types): Use same_type_p.
3491 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
3493 * semantics.c (begin_inline_definitions,
3494 finish_inline_definitions): Rename from finish_default_args and
3495 begin_inline_definitions, respectively, to something that isn't a
3497 * parse.y (structsp): Adjust.
3499 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
3500 (list_hash_lookup): Likewise.
3501 (hash_tree_chain): Adjust.
3502 * pt.c (tsubst): Adjust.
3503 (tsubst_arg_types): Use plain hash_tree_cons.
3504 * cp-tree.h (hash_tree_cons_simple): Lose.
3505 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
3507 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3509 * Makefile.in (hash.h): Generate using gperf language 'C', not
3510 'KR-C', so gperf uses the `const' keyword on strings.
3512 * gxx.gperf (resword): Const-ify a char*.
3514 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
3516 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
3517 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
3518 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
3519 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
3520 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
3521 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
3524 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
3526 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
3528 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
3530 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
3532 1999-03-27 Mark Mitchell <mark@codesourcery.com>
3534 * cp-tree.h (add_friend): Declare.
3535 (add_friends): Likewise.
3536 * friend.c (add_friend): Make it global. Don't add to
3537 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
3538 (add_friends): Make it global.
3539 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
3540 befriending class is a template.
3541 * parse.y (component_decl_1): Fix typo in comment.
3542 * parse.c: Regenerated.
3543 * pt.c (instantiate_class_template): Use add_friend and
3544 add_friends rather that duplicating some of their functionality
3547 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
3549 * call.c (build_field_call): Unify 'this' and non-'this' cases.
3551 * typeck.c (build_indirect_ref): Check for 'this' sooner.
3553 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3555 * call.c (op_error): Const-ify a char*.
3556 (add_candidate, source_type, add_warning): Add static prototype.
3557 (print_z_candidates): Const-ify a char*.
3559 * class.c (resolve_address_of_overloaded_function,
3560 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
3561 (get_vtable_name, finish_struct_1): Const-ify a char*.
3563 * cvt.c (convert_to_reference): Likewise.
3565 * decl.c (redeclaration_error_message, record_builtin_type,
3566 record_unknown_type, member_function_or_else, bad_specifiers):
3568 (find_binding, select_decl, unqualified_namespace_lookup,
3569 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
3570 Add static prototype.
3571 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
3572 implicitly_declare, record_builtin_java_type, define_function,
3573 grok_op_properties, tag_name): Const-ify a char*.
3575 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
3576 (define_function, finish_builtin_type): Const-ify a char*.
3577 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
3578 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
3579 (file_name_nondirectory): Const-ify a char*.
3580 (init_filename_times): Don't prototype.
3581 (compiler_error): Prototype.
3582 (yyerror, init_repo): Const-ify a char*.
3583 (build_srcloc): Don't prototype.
3584 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
3586 (warn_for_assignment): Don't prototype.
3587 (convert_for_initialization, readonly_error, check_for_new_type,
3588 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
3591 * decl2.c (acceptable_java_type, output_vtable_inherit,
3592 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
3593 merge_functions, decl_namespace, validate_nonmember_using_decl,
3594 do_nonmember_using_decl): Add static prototype.
3595 (lang_f_options): Const-ify a char*.
3596 (finish_builtin_type): Likewise.
3597 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
3600 * errfn.c: Include cp-tree.h.
3601 (cp_thing): Add static prototype.
3602 (compiler_error): Don't protoptype.
3603 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
3604 passing it to `cp_thing'.
3606 * error.c (interesting_scope_p): Add static prototype.
3608 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
3611 * init.c (compiler_error): Don't prototype.
3612 (member_init_ok_or_else): Const-ify a char*.
3613 (build_java_class_ref): Add static prototype.
3615 * lex.c (compiler_error): Don't prototype.
3616 (get_time_identifier, interface_strcmp, extend_token_buffer,
3617 handle_cp_pragma): Const-ify a char*.
3618 (is_global, init_filename_times): Add static prototype.
3619 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
3620 (compiler_error): Change from fixed args to variable args.
3621 (yyerror): Const-ify a char*.
3623 * parse.y (cond_stmt_keyword): Const-ify a char*.
3624 (parse_decl): Add static prototype.
3626 * pt.c (template_args_equal, print_template_context): Likewise.
3627 (print_candidates, check_default_tmpl_args): Const-ify a char*.
3628 (instantiate_class_template): Likewise.
3630 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
3632 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
3633 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
3635 * search.c (lookup_field_info, lookup_member): Likewise.
3636 (lookup_member): Cast the first argument of `bzero' to a PTR.
3638 * sig.c (compiler_error): Don't prototype.
3639 (build_signature_pointer_or_reference_nam): Const-ify a char*.
3640 (get_sigtable_name, build_member_function_pointer): Likewise.
3642 * tree.c (compiler_error): Don't prototype.
3643 (no_linkage_helper, build_srcloc): Add static prototype.
3644 (build_vbase_pointer_fields): Const-ify a char*.
3645 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
3647 * typeck.c (compiler_error): Don't prototype.
3648 (convert_for_assignment): Const-ify a char*.
3649 (comp_cv_target_types): Add static prototype.
3650 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
3651 build_component_addr, build_unary_op, convert_for_initialization):
3654 * typeck2.c (ack): Add static prototype and change from fixed args
3656 (readonly_error, check_for_new_type): Const-ify a char*.
3658 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
3659 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
3660 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
3661 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
3662 gen_assign, GNU_xref_member): Const-ify a char*.
3664 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
3666 * gxxint.texi: Remove old discussion on copying virtual bases.
3668 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
3670 * Make-lang.in: Remove all references to g++.o/g++.c.
3671 Link g++ from gcc.o.
3673 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
3675 * decl2.c (comdat_linkage): Treat vtables like functions.
3677 1999-03-25 Mark Mitchell <mark@codesourcery.com>
3679 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
3681 1999-03-25 Nathan Sidwell <nathan@acm.org>
3683 * decl.c (init_decl_processing): Add `signed' type as a synonym
3686 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
3688 * typeck.c (common_type): Handle cv-qual unification for pointers
3691 * decl.c (unqualified_namespace_lookup): Return error_mark_node
3693 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
3694 * lex.c (do_identifier): If we got error_mark_node, call
3697 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
3699 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
3702 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
3704 * decl.c (lookup_name_real): Do nested field lookup regardless of
3707 1999-03-24 Mark Mitchell <mark@codesourcery.com>
3709 * cp-tree.h (lang_type): Remove has_assignment and
3710 has_real_assignment. Add befriending_classes.
3711 (TYPE_HAS_ASSIGNMENT): Remove.
3712 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
3713 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
3714 (lang_decl): Document.
3715 (DECL_BEFRIENDING_CLASSES): New macro.
3716 (FRIEND_NAME): Move declaration to more obvious location.
3717 (FRIEND_DECLS): Likewise.
3718 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
3719 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
3720 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
3721 (grok_op_properties): Likewise.
3722 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
3723 (add_friend): Likewise. Don't do weird things with assignment
3724 operators. Update DECL_BEFRIENDING_CLASSES.
3725 (add_friends): Don't do weird things with assignment operators.
3726 (make_friend_class): Likewise. Update
3727 CLASSTYPE_BEFRIENDING_CLASSES.
3728 * pt.c (instantiate_class_template): Don't set
3729 TYPE_HAS_ASSIGNMENT.
3730 (tsubst_copy): Substitute the TREE_TYPE for more unary
3732 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
3733 * search.c (protected_accessible_p): New function.
3734 (friend_accessible_p): Likewise.
3735 (accessible_p): Use them.
3737 1999-03-23 Mark Mitchell <mark@codesourcery.com>
3739 * pt.c (convert_nontype_argument): Don't create things that aren't
3740 PTRMEM_CSTs when applying a qualification conversion to a
3743 1999-03-23 Mark Mitchell <mark@codesourcery.com>
3745 * Makefile.in (OBJS): Don't mention hash.o.
3746 (OBJDEPS): Likewise.
3748 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
3750 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
3751 * decl.c (expand_static_init): Make sure we don't add any after
3754 * decl.c (cp_finish_decl): Move intelligence about handling
3755 DECL_COMDAT for variables from here...
3756 * decl2.c (comdat_linkage): ...to here.
3757 (maybe_make_one_only): Tweak.
3758 (import_export_decl): Call comdat_linkage for variables, too.
3759 (finish_file): Handle template statics properly.
3761 1999-03-22 Mark Mitchell <mark@codesourcery.com>
3763 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
3764 Document internals of pointer-to-member-functions.
3765 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
3766 (PFN_FROM_PTRMEMFUNC): Likewise.
3767 (build_type_conversion): Remove unused parameter.
3768 (build_ptrmemfunc1): Declare.
3769 (expand_ptrmemfunc_cst): New function.
3770 (delta2_from_ptrmemfunc): Likewise.
3771 (pfn_from_ptrmemfunc): Likewise.
3772 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
3773 build_type_conversion. Use TYPE_PTRMEM_P for readability.
3774 (convert_to_reference): Remove unused parameter to
3775 build_type_conversion.
3776 (ocp_convert): Likewise.
3777 (build_user_type_conversion): Likewise.
3778 * error.c (dump_expr): Handle NULL pointer-to-member functions.
3779 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
3780 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
3781 open when handling pointer-to-member functions.
3782 * pt.c (convert_nontype_argument): Clean up error messages. Be
3783 more stringent with pointers-to-members.
3784 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
3785 (build_unary_op): Tidy ever-so-slightly.
3786 (build_conditional_expr): Remove extra parameter to
3787 build_type_conversion.
3788 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
3790 (expand_ptrmemfunc_cst): Define.
3791 (delta2_from_ptrmemfunc): Likewise.
3792 (pfn_from_ptrmemfunc): Likewise.
3794 1999-03-19 Mark Mitchell <mark@codesourcery.com>
3796 * init.c (build_member_call): Handle template-id expressions
3798 * typeck.c (build_x_function_call): Likewise.
3800 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
3802 * friend.c (make_friend_class): Avoid core dump when
3803 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
3805 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
3807 * decl.c (start_function): Suppress normal linkage heuristics
3808 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
3810 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
3812 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
3813 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
3815 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
3817 * parse.y (named_complex_class_head_sans_basetype):
3818 Do not push a scope for error_mark_node.
3819 (maybe_base_class_list): Likewise.
3821 * decl.c (start_decl): Check for error_mark_node as a type.
3822 Detected by g++.brendan/array-refs.C.
3823 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
3824 (maybe_build_cleanup_1): Likewise. Detected by
3825 g++.jason/incomplete1.C.
3827 * tree.c (build_dummy_object): Use void_zero_node instead of the
3829 (is_dummy_object): Check for such a node.
3830 Detected by g++.bob/inherit1.C
3832 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
3834 * method.c (old_backref_index): Split out...
3835 (flush_repeats): From here. Rename back from try_old_backref.
3836 (build_mangled_name): Put back some old-style repeat handling.
3838 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3840 * lex.c: Don't include setjmp.h.
3841 (parse_float): New static function.
3842 (pf_args): New struct.
3843 (real_yylex): Use them in call to `do_float_handler'.
3845 1999-03-15 Mark Mitchell <mark@markmitchell.com>
3847 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
3848 * tree.c (layout_basetypes): Not here.
3849 * search.c (dfs_search): Remove; no longer used.
3851 1999-03-12 Mark Mitchell <mark@markmitchell.com>
3853 * decl2.c (validate_nonmember_using_decl): Issue sensible
3854 error-messages on bogus qualifiers.
3856 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
3858 * call.c (add_function_candidate): Fix uninitialized variable.
3860 * Makefile.in (search.o): Add dependency on varray.h.
3862 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
3864 * decl.c (duplicate_decls): Use same_type_p.
3865 * method.c (try_old_backref): Renamed from flush_repeats. Use
3866 same_type_p. Don't try to handle repeats. Return success.
3867 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
3868 calls from old-style code, too.
3869 (check_ktype): Use same_type_p.
3870 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
3871 (build_qualified_name): Simplify logic.
3872 (process_overload_item): Strip typedefs and quals at the top.
3873 (build_mangled_name_for_type_with_Gcode): Remove call to
3874 type_canonical_variant.
3875 (build_mangled_name): Likewise. Remove support for old-style
3876 repeats, which have been disabled since 2.7.2. Don't mess with
3878 (build_decl_overload_real): Don't mess with TREE_USED.
3880 1999-03-13 Nathan Sidwell <nathan@acm.org>
3882 * error.c (cp_printers): Add 'F' escape character.
3883 (dump_type_real): Remove TREE_LIST (fnargs) printing.
3884 Functionality moved to dump_parameters.
3885 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
3886 (dump_function_decl): Extend meaning of V parameter. Use
3887 dump_parameters and dump_exception_spec.
3888 (dump_parameters): New static function.
3889 (dump_exception_spec): New static function.
3890 (fndecl_as_string): Change argument semantics. Use
3891 dump_function_decl directly.
3893 * sig.c (build_signature_table_constructor): Use cp_error.
3895 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
3897 * semantics.c (finish_switch_cond): Handle error cases gracefully.
3898 Detected by g++.law/enum5.C.
3900 * typeck.c (build_modify_expr): Check for errors after resolving
3901 offsets. Detected by g++.brendan/static1.C.
3903 * decl.c (complete_array_type): Ignore initial_value if it is an
3904 error. Detected by g++.benjamin/17930.C.
3906 * typeck2.c (process_init_constructor): Return error if one argument
3907 is in error. Detected by g++.benjamin/13478.C.
3909 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
3911 * decl.c (select_decl): Allow class templates when we need types.
3912 * decl2.c (ambiguous_decl): Likewise.
3914 1999-03-12 Mark Mitchell <mark@markmitchell.com>
3916 * lex.c (do_identifier): Correct call to enforce_access.
3917 * search.c (accessible_p): Tweak comment.
3919 1999-03-10 Mark Mitchell <mark@markmitchell.com>
3921 * semantics.c (begin_class_definition): Call build_self_reference.
3922 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
3924 * search.c (assert_canonical_unmarked): Fix typo in prototype.
3926 * search.c (dfs_canonical_queue): New function.
3927 (dfs_assert_unmarked_p): Likewise.
3928 (assert_canonical_unmarked): Likewise.
3929 (access_in_type): Use it.
3930 (accessible_p): Likewise. Walk the whole tree when umarking.
3932 * sig.c (build_signature_table_constructor): Use accessible_p
3933 instead of compute_access.
3935 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
3937 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
3939 1999-03-09 Mark Mitchell <mark@markmitchell.com>
3941 * cp-tree.h (flag_access_control): Declare.
3942 (TREE_VIA_PPUBLIC): Document.
3943 (DECL_NONSTATIC_MEMBER_P): New macro.
3944 (enforce_access): Return an indication of whether or not access
3946 (build_self_reference): Change prototype.
3947 (compute_access): Replace with ...
3948 (accessible_p): New function.
3949 (dfs_walk): Change prototype.
3950 (dfs_unmark): Likewise.
3951 (markedp): Likewise.
3952 * call.c (enforce_access): Use accessible_p.
3953 * class.c (build_self_reference): Insert the declaration into the
3954 list of members for this type, and make it public.
3955 * decl.c (xref_basetypes): Avoid ill-timed recursion.
3956 * init.c (build_offset_ref): Use lookup_member, not three separate
3957 name-lookups. Call enforce_access rather than checking for
3958 illegal accesses here.
3959 (resolve_offset_ref): Likewise.
3960 * lex.c (do_identifier): Likewise.
3961 * method.c (hack_identifier): Likewise.
3962 * parse.y (self_reference): Remove.
3963 (opt_component_decl_list): Don't use it.
3964 * parse.c: Regenerated.
3965 * pt.c (print_candidates): Generalize to handle lists of
3966 overloaded functions.
3967 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
3969 (get_template_base): Use new calling convention for dfs_walk.
3970 * search.c: Include varray.h. Add prototypes.
3971 (dfs_walk): Accept a data pointer to pass to the work functions.
3972 All callers changed. All work functions changed.
3973 (breadth_first_search): Rename to bfs_walk, and make consistent
3975 (dfs_walk_real): New function.
3976 (canonical_binfo): New function.
3977 (context_for_name_lookup): Likewise.
3978 (shared_marked_p): Likewise.
3979 (shared_unmarked_p): Likewise.
3980 (lokup_field_queue_p): Likewise.
3981 (lookup_field_r): Generalize to handle both functions and fields.
3982 (lookup_field): Just call lookup_member.
3983 (lookup_fnfields): Likewise.
3984 (lookup_member): Move body of lookup_field here and generalize.
3985 (dfs_accessible_queue_p): Likewise.
3986 (dfs_accessible_p): Likewise.
3987 (dfs_access_in_type): Likewise.
3988 (access_in_type): Likewise.
3989 (compute_access): Remove, and replace with ...
3990 (accessible_p): New function.
3991 (vbase_types): Remove.
3992 (vbase_decl_ptr_intermediate): Likewise.
3993 (vbase_decl_ptr): Likewise.
3994 (vbase_init_result): Likewise.
3995 (closed_envelopes): Likewise.
3996 (bvtable): Likewise.
3998 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
4000 * call.c (add_function_candidate): Check for proper number of args
4001 before checking the validity of those args.
4003 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
4005 * cp-tree.h (struct lang_type): Add anon_union field.
4006 (ANON_UNION_TYPE_P): Use it instead of examining type.
4007 (SET_ANON_UNION_TYPE_P): New macro.
4008 * decl.c (check_tag_decl): Use it.
4010 * search.c (compute_access): Handle non-type contexts earlier, and
4013 * tree.c (build_exception_variant): Use copy_to_permanent.
4015 * decl2.c (setup_initp): Give statics with no priority the default
4017 (do_dtors, do_ctors, finish_file): Remove special handling of
4018 non-prioritized statics.
4020 1999-03-05 Mark Mitchell <mark@markmitchell.com>
4022 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
4023 * decl.c (make_typename_type): Don't issue an error if an
4024 immediate lookup fails; it migt be resolved later.
4025 * friend.c (is_friend): Add comment.
4026 * search.c (breadth_first_search): Add POSTFN and DATA
4027 parameters. Tidy. All callers changed.
4028 (lookup_field_queue_p): New function.
4029 (lookup_field_r): Likewise.
4030 (lookup_field_post): Likewise.
4031 (lookup_field): Use them, via breadth_first_search, instead of
4033 (compute_access): Robustify.
4034 (lookup_fnfield_info): New structure.
4036 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
4038 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
4040 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
4042 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
4045 * decl2.c (import_export_class): Also return if
4046 CLASSTYPE_INTERFACE_ONLY is set.
4048 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
4050 * decl.c (push_overloaded_decl): Only overwrite the old binding if
4052 * decl2.c (do_local_using_decl): Fix loop termination.
4054 1999-03-02 Mark Mitchell <mark@markmitchell.com>
4056 * cp-tree.h (determine_specialization): Don't declare.
4057 * pt.c (determine_specialization): Make it static. Eliminate
4058 complain parameter. Note that decl is always non-NULL now, and
4059 simplify accordingly.
4061 * decl.c (maybe_push_to_top_level): Always call
4062 push_cp_function_context.
4063 (pop_from_top_level): Always call pop_cp_function_context.
4065 1999-02-26 Nathan Sidwell <nathan@acm.org>
4067 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
4069 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
4070 * init.c (build_new_1): Extra arg to complete_type_or_else.
4071 (build_delete): Likewise.
4072 * typeck.c (require_complete_type): Likewise.
4073 (pointer_int_sum): Likewise.
4074 (pointer_diff): Likewise.
4075 (build_component_ref): Likewise.
4077 * typeck2.c (incomplete_type_error): Always use cp_error.
4078 Show declaration of undefined type, if appropriate.
4079 Deal with UNKNOWN_TYPE nodes.
4081 * typeck.c (require_complete_type): Use TYPE_SIZE as
4082 size_zero_node to mean incomplete type.
4083 (require_complete_type_in_void): New function.
4084 (build_compound_expr): Call complete_type_in_void for LHS.
4085 (build_c_cast): Call complete_type_in_void for void cast.
4086 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
4087 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
4088 require_complete_type_in_void. Call it.
4089 * cp-tree.h (require_complete_type_in_void): Prototype new function.
4091 * typeck.c (convert_arguments): Use alternative format for
4092 function decls. Don't require_complete_type here. Simplify
4093 diagnostic printing.
4094 (convert_for_initialization): Don't require_complete_type on RHS yet.
4095 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
4097 * call.c (build_over_call): Cope with qualified void return type.
4098 * semantics.c (finish_call_expr): Likewise.
4099 * typeck.c (build_function_call_real): Likewise.
4100 (c_expand_return): Likewise.
4101 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
4103 * call.c (print_z_candidates): Use alternate print format, to be
4104 consistent with (pt.c) print_candidates.
4105 * method.c (hack_identifier): List candidate members.
4106 * search.c (lookup_field): Build ambiguous list, and show it, if
4109 1999-02-26 Mark Mitchell <mark@markmitchell.com>
4111 * typeck.c (decay_conversion): Don't confuse constant array
4112 variables with their initializers.
4114 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
4116 * pt.c (regenerate_decl_from_template): Tweak for clarity.
4117 (instantiate_decl): Mark a decl instantiated before regenerating
4118 it to avoid recursion.
4119 * tree.c (mapcar): Don't call decl_constant_value unless we know
4120 something is TREE_READONLY_DECL_P.
4122 * class.c (check_for_override): Don't stop checking when we find
4123 the first overridden function. Delete #if 0'd code.
4124 * search.c (get_matching_virtual): Likewise.
4126 1999-02-25 Richard Henderson <rth@cygnus.com>
4128 * lang-specs.h: Define __FAST_MATH__ when appropriate.
4130 1999-02-24 Mike Stump <mrs@wrs.com>
4132 * typeck.c (convert_for_assignment): Allow boolean integral constant
4133 expressions to convert to null pointer.
4135 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
4137 * decl.c (lookup_namespace_name): Resolve namespace aliases.
4139 * class.c (push_nested_class): Allow namespaces.
4141 * decl2.c (set_decl_namespace): Add friendp parameter.
4142 * decl.c (grokfndecl): Pass it.
4143 (grokvardecl): Likewise.
4144 * cp-tree.h: Change declaration.
4146 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
4148 * pt.c (tsubst): Allow an array of explicit size zero.
4150 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
4152 * errfn.c: Change varargs code to look like toplev.c.
4154 * method.c (process_modifiers): Don't prepend 'U' for char or
4157 1999-02-20 Craig Burley <craig@jcb-sc.com>
4159 * Make-lang.in (cplib2.ready): Don't consider updating
4160 cplib2 stuff if the current directory isn't writable, as
4161 it won't work (such as during a `make install').
4163 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
4165 * decl2.c (start_objects): Make file scope constructors and
4166 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
4167 ASM_OUTPUT_DESTRUCTOR are defined.
4169 1999-02-19 Mark Mitchell <mark@markmitchell.com>
4171 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
4172 (fn_type_unification): Adjust prototype.
4173 (lookup_fnfields_1): Declare.
4174 * call.c (add_template_candidate_real): Adjust call to
4175 fn_type_unification.
4176 * class.c (add_method): Don't allow duplicate declarations of
4177 constructors or destructors.
4178 (resolve_address_of_overloaded_function): Remove unused variable.
4179 Adjust call to fn_type_unification.
4180 * decl.c (grokfndecl): Be more robust in the face of illegal
4182 * decl2.c (check_classfn): Remove hokey handling of member
4184 * pt.c (determine_specialization): Improve comments. Adjust to
4185 handle template argument deduction as per the standard.
4186 (check_explicit_specialization): Fix comment spacing. Handle
4187 type-conversion operators correctly. Improve error-recovery.
4188 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
4189 (get_bindings_real): Simplify handling of static members.
4190 * search.c (lookup_fnfields_1): Make it have external linkage.
4191 * typeck.c (compparms): Fix comment.
4192 (build_unary_op): Don't try to figure out which template
4193 specialization is being referred to when when the address-of
4194 operator is used with a template function.
4196 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4198 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4199 keyword to match an analogous change at the top level.
4201 * tree.c (lvalue_or_else): Likewise.
4203 1999-02-17 Mark Mitchell <mark@markmitchell.com>
4205 * decl.c (xref_basetypes): Comment.
4206 * pt.c (instantiate_class_template): Use xref_basetypes.
4208 1999-02-16 Mark Mitchell <mark@markmitchell.com>
4210 * cp-tree.h (tsubst): Change prototype.
4211 (tsubst_expr): Likewise.
4212 (tsubst_copy): Likewise.
4213 (type_unification): Remove prototype.
4214 * call.c (convert_default_arg): Adjust call to tsubst_expr.
4215 * class.c (resolve_address_of_overloaded_function): Just use
4216 fn_type_unification.
4217 * decl.c (grokdeclarator): Adjust call to tsubst.
4218 * method.c (build_template_parm_names): Likewise.
4219 * pt.c (GTB_VIA_VIRTUAL): New macro.
4220 (GTB_IGNORE_TYPE): Likewise.
4221 (resolve_overloaded_unification): Add `complain' parameter.
4222 (try_one_overload): Likewise.
4223 (tsubst_template_arg_vector): Likewise.
4224 (tsubst_template_parms): Likewise.
4225 (tsubst_aggr_type): Likewise.
4226 (tsubst_arg_types): Likewise.
4227 (tsubst_call_declarator_parms): Likewise.
4228 (unify): Remove explicit_mask.
4229 (type_unification_real): Likewise.
4230 (get_template_base_recursive): Likewise.
4231 (coerce_template_template_parms): Provide prototype.
4232 (tsubst_function_type): Likewise.
4233 (try_class_unification): New function.
4234 All callers changed to use new complain parameter.
4235 (get_template_base): Use try_class_unification.
4236 (unify): Adjust handling of classes derived from template types.
4237 (fn_type_unification): Substitute explicit arguments before
4240 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4242 * decl.c (pushdecl): Remove dead code.
4244 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
4246 * decl2.c (finish_objects): Fix code I missed in previous change.
4248 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
4250 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
4251 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
4253 * pt.c (maybe_process_partial_specialization): Complain about
4254 'template <>' on non-specialization.
4256 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
4258 * decl.c (grokdeclarator): Catch wierd declarators.
4259 * decl2.c (finish_file): Don't abort because of namespace parsing
4261 (check_decl_namespace): Remove.
4263 1999-02-09 Mark Mitchell <mark@markmitchell.com>
4265 * cp-tree.h (get_template_base): Don't declare.
4266 (dfs_walk): Declare.
4267 (dfs_unmark): Likewise.
4268 (markedp): Likewise.
4269 * pt.c (unify): Remove duplicate declaration. Pass tparms and
4270 targs to get_template_base.
4271 (get_template_base_recursive): Move here from search.c. Check to
4272 see that the base found can be instantiated to form the desired
4274 (get_template_base): Likewise.
4275 (get_class_bindings): Simplify.
4276 * search.c (get_template_base_recursive): Move to pt.c.
4277 (get_template_base): Likewise.
4278 (markedp): Make it global.
4279 (dfs_walk): Likewise.
4280 (dfs_unmark): Likewise.
4282 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
4284 * pt.c (maybe_process_partial_specialization): Complain about
4285 specialization in wrong namespace.
4286 * tree.c (decl_namespace_context): New fn.
4288 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4290 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
4291 * pt.c (coerce_template_template_parms): Handle nested
4292 template template parameters.
4294 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
4296 * typeck2.c: Update email addresses.
4298 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4300 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
4303 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
4305 * lex.c (retrofit_lang_decl): Split out...
4306 (build_lang_decl): From here.
4307 * decl.c (pushdecl): Call it for functions generated by the middle
4308 end that don't have DECL_LANG_SPECIFIC.
4309 * cp-tree.h: Declare it.
4311 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
4312 (start_objects, finish_objects): Only use special
4313 init_priority code if the user specified a priority.
4314 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
4317 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
4319 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
4320 mkstemp.o. Get them from libiberty now.
4321 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
4323 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4325 * decl2.c (lang_decode_option): Use read_integral_parameter.
4327 1999-02-01 Mark Mitchell <mark@markmitchell.com>
4329 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
4330 before calling complete_type_or_else.
4332 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4334 * input.c (inline): Don't define, its handled by system.h.
4336 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
4338 * decl2.c: Don't define flag_no_ident here. Don't process
4340 * cp-tree.h: Don't declare flag_no_ident here.
4341 * lang-specs.h: Map -Qn to -fno-ident.
4343 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
4345 * cp-tree.h (struct tree_binding): Replace scope field with a union.
4346 (BINDING_SCOPE): Adjust.
4347 * decl.c (BINDING_LEVEL): Adjust.
4349 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
4351 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
4354 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
4357 * tree.c (equal_functions): Fix name in prototype.
4359 * decl.c (push_local_binding): Add FLAGS argument.
4360 (pushdecl, push_overloaded_decl): Pass it.
4361 * decl2.c (do_local_using_decl): Likewise.
4362 * cp-tree.h: Adjust prototype.
4363 * decl.c (poplevel): Fix logic.
4365 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
4366 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
4367 (cat_namespace_levels): Don't loop forever.
4369 1999-01-25 Richard Henderson <rth@cygnus.com>
4371 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
4373 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
4375 * class.c (resolve_address_of_overloaded_function): Mark the
4376 chosen function used.
4378 * call.c (build_call): Make sure that a function coming in has
4379 been marked used already.
4380 * decl.c (expand_static_init): Call mark_used instead of
4382 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
4383 alloc_eh_object, expand_throw): Likewise.
4384 * init.c (build_builtin_delete_call): Likewise.
4385 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
4386 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4387 expand_generic_desc): Likewise.
4389 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
4391 * tree.c (equal_functions): New function.
4392 (ovl_member): Call it.
4394 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
4396 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
4398 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
4400 * decl.c (decls_match): Return 1 if old and new are identical.
4401 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
4403 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
4405 * decl.c (start_function): Make member functions one_only on windows.
4406 * decl2.c (import_export_decl): Likewise.
4408 * decl.c (grokdeclarator): Don't complain about implicit int in
4409 a system header. Change same-name field check to not complain in
4410 a system header instead of within extern "C".
4412 1999-01-21 Mark Mitchell <mark@markmitchell.com>
4414 * cp-tree.h (PUSH_GLOBAL): New macro.
4415 (PUSH_LOCAL): Likewise.
4416 (PUSH_USING): Likewise.
4417 (namespace_bindings_p): Declare.
4418 (push_overloaded_decl): Likewise.
4419 * decl.c (push_overloaded_decl): Don't make it static. Check for
4420 illegal declarations after using declarations here.
4421 (namespace_bindings_p): Likewise.
4422 (duplicate_decls): Don't consider declarations from different
4423 namespaces to be the same.
4424 (pushdecl): Use symbolic PUSH_ constants in calls to
4425 push_overloaded_decl.
4426 (push_overloaded_decl_1): Likewise.
4427 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
4428 (do_nonmember_using_decl): Check for illegal using declarations
4429 after ordinary declarations here.
4430 (do_local_using_decl): Call pushdecl to insert declarations.
4432 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
4434 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
4436 1999-01-21 Mark Mitchell <mark@markmitchell.com>
4438 * tree.c (build_cplus_array_type_1): Don't call build_array_type
4439 for types involving template parameters.
4441 * cp-tree.h (PARM_DECL_EXPR): Delete.
4442 (convert_default_arg): Change prototype.
4443 (check_default_argument): Declare.
4444 (search_tree): Likewise.
4445 * call.c (convert_default_arg): Take the function to which the
4446 default argument belongs as a parameter, and do any necessary
4447 instantiation here, instead of ...
4448 (build_over_call): Here.
4449 * decl.c (local_variable_p): New function.
4450 (check_default_argument): Likewise, split out and tidied from ...
4452 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
4453 * pt.c (tsubst_call_declarator_parms): New function.
4454 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
4455 with CALL_EXPRs, rather than trying to be clever.
4456 (tsubst): Use tsubst_call_declarator_parms.
4457 * tree.c (search_tree): Don't make it static.
4458 * typeck.c (convert_arguments): Use new interface to
4459 convert_default_arg.
4461 1999-01-20 Mark Mitchell <mark@markmitchell.com>
4463 * error.c (dump_function_decl): Don't print the argument types for
4464 a function when the verbosity level is negative.
4466 * call.c (build_over_call): Check format attributes at call-time.
4468 * pt.c (tsubst_copy): Fix comment.
4469 (unify): Don't allow unification with variable-sized arrays.
4471 * semantics.c (finish_stmt_expr): When processing a template make
4472 the BIND_EXPR long-lived.
4474 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
4476 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
4477 (import_export_vtable): Not here.
4479 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
4481 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
4482 non-static member function.
4484 1999-01-18 Nathan Sidwell <nathan@acm.org>
4486 * class.c (instantiate_type): Only diagnose illegal address of member
4487 function if complaining.
4489 * decl.c (lookup_name_real): Remove duplicate code.
4491 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
4493 * tree.c (copy_template_template_parm): Use permanent_obstack.
4495 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4497 * pt.c (unify): Remove restrictions on deduction of argument
4498 of template template parameters.
4500 1999-01-18 Nathan Sidwell <nathan@acm.org>
4502 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
4504 * class.c (resolve_address_of_overloaded_function): Show list of
4505 all candidates, when none of them match.
4507 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
4509 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
4510 definition of 'casting away const' in reinterpret_cast<>.
4512 1999-01-18 Graham <grahams@rcp.co.uk>
4514 * cvt.c: Add include for decl.h, remove extern for
4515 static_aggregates which is now provided by decl.h.
4517 * Makefile.in (cvt.o): Add dependency for decl.h and missing
4518 dependencies for convert.h and flags.h.
4520 1999-01-18 Nathan Sidwell <nathan@acm.org>
4522 * decl2.c (do_dtors): Set current location to that of the
4523 decl, for sensible diagnostics and debugging.
4524 (check_classfn): Issue `incomplete type' error, if
4525 class is not defined.
4527 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
4529 * cp-tree.h: Add prototype for bound_pmf_p.
4531 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
4532 Manfred Hollstein <manfred@s-direktnet.de>
4534 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
4537 1999-01-16 Nathan Sidwell <nathan@acm.org>
4539 * cp-tree.h (struct lang_type): Added has_mutable flag.
4540 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
4541 (TYPE_HAS_MUTABLE_P): New macro to read it.
4542 (cp_has_mutable_p): Prototype for new function.
4543 * class.c (finish_struct_1): Set has_mutable from members.
4544 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
4545 it contains a mutable.
4546 * typeck.c (cp_has_mutable_p): New function.
4548 1999-01-15 Mark Mitchell <mark@markmitchell.com>
4550 * pt.c (process_template_parm): Ignore top-level qualifiers on
4551 non-type parameters.
4553 * decl.c (start_function): Use current_function_parms in the call
4554 to require_complete_type_for_parms, not the probably empty
4557 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
4559 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
4561 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
4562 that we don't suppress the other copies.
4563 * lex.c (handle_cp_pragma): Likewise.
4565 1999-01-13 Mark Mitchell <mark@markmitchell.com>
4567 * decl.c (grokdeclarator): Undo 1998-12-14 change.
4568 * tree.c (build_cplus_array_type_1): Likewise.
4569 * pt.c (instantiate_class_template): Remove misleading comment.
4570 (tsubst_aggr_type): Substitute if there are template parameters,
4571 regardless of whether or not they use template arguments.
4572 (unify): Likewise, but for unification.
4574 1999-01-12 Richard Henderson <rth@cygnus.com>
4576 * cp-tree.h (flag_permissive): Declare extern.
4578 1999-01-06 Mark Mitchell <mark@markmitchell.com>
4580 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
4582 (lang_type): Add is_partial_instantiation. Decrease width of
4584 (PARTIAL_INSTANTIATION_P): New macro.
4585 (OPERATOR_TYPENAME_P): Remove.
4586 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
4587 OPERATOR_TYPENAME_P.
4588 (grok_op_properties): Likewise.
4589 * friend.c (do_friend): Handle friends that are member functions
4591 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
4592 * pt.c (instantiate_class_template): Rework for clarity. Avoid
4593 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
4594 any more partial instantiation than is absolutely necessary for
4595 implicit typename. Set PARTIAL_INSTANTIATION_P.
4596 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
4597 * semantics.c (begin_class_definition): Handle partial
4598 specializations of a type that was previously partially
4601 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
4603 * g++spec.c (LIBSTDCXX): Provide default definition.
4604 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
4606 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4608 * Make-lang.in (g++.o): Depend on prefix.h.
4610 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
4612 * tree.c (bound_pmf_p): New fn.
4613 * typeck.c (build_c_cast): Use it.
4615 * decl.c (grok_op_properties): Use same_type_p.
4617 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4619 * Makefile.in (cvt.o): Depend on toplev.h.
4621 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
4623 * cvt.c: Include toplev.h.
4625 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
4628 * init.c (expand_vec_init): Initialize variable `itype'.
4630 * lex.c (yyerror): Cast the argument passed to a ctype function to
4633 * method.c (build_mangled_C9x_name): Wrap prototype and definition
4634 in "HOST_BITS_PER_WIDE_INT >= 64".
4636 * typeck.c (build_binary_op): Mark parameter `convert_p' with
4639 1998-12-22 Mark Mitchell <mark@markmitchell.com>
4641 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
4642 * tree.c (build_exception_variant): Don't crash on empty throw
4645 1998-12-18 DJ Delorie <dj@cygnus.com>
4647 * cvt.c (convert_to_reference): Check for both error_mark_node
4648 and NULL_NODE after call to convert_for_initialization.
4650 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
4652 * error.c (interesting_scope_p): New fn.
4653 (dump_simple_decl): Use it.
4654 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
4655 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
4657 1998-12-16 Mark Mitchell <mark@markmitchell.com>
4659 * class.c (resolve_address_of_overloaded_function): Do conversion
4660 to correct type here, rather than ...
4661 (instantiate_type): Here.
4663 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
4664 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
4665 (decl_template_parm_p): Remove.
4666 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
4668 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
4669 * pt.c (push_inline_template_parms_recursive): Set it.
4670 (decl_template_parm_p): Remove.
4671 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
4672 (process_template_parm): Set it.
4674 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
4676 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
4677 if configured with cpplib.
4679 1998-12-15 Mark Mitchell <mark@markmitchell.com>
4681 * decl.c (poplevel): Make sure ns_binding is initialized.
4683 * decl.c (finish_function): Undo inadvertent change in previous
4686 1998-12-14 Mark Mitchell <mark@markmitchell.com>
4688 * class.c (pushclass): Tweak handling of class-level bindings.
4689 (resolve_address_of_overloaded_function): Update pointer-to-member
4691 (instantiate_type): Likewise.
4692 * cvt.c (cp_convert_to_pointer): Likewise.
4693 * decl.c (pop_binding): Take the DECL to pop, not just the name.
4694 Deal with `struct stat' hack.
4695 (binding_level): Add to documentation.
4696 (push_binding): Clear BINDING_TYPE.
4697 (add_binding): New function.
4698 (push_local_binding): Use it.
4699 (push_class_binding): Likewise.
4700 (poplevel): Adjust calls to pop_binding.
4701 (poplevel_class): Likewise.
4702 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
4703 declarations to current binding level.
4704 (push_class_level_binding): Likewise.
4705 (push_overloaded_decl): Adjust handling of OVERLOADs in local
4707 (lookup_namespace_name): Don't crash when confronted with a
4709 (lookup_name_real): Do `struct stat' hack in local binding
4711 (build_ptrmemfunc_type): Adjust documentation.
4712 (grokdeclarator): Don't avoid building real array types when
4713 processing templates unless really necessary.
4714 (finish_method): Adjust calls to pop_binding.
4715 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
4716 not reparse_decl_as_expr.
4717 (build_expr_from_tree): Deal with a template-id as the function to
4718 call in a METHOD_CALL_EXPR.
4719 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
4720 (maybe_adjust_types_For_deduction): Don't do peculiar things with
4722 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
4723 pointer-to-member types where necessary.
4724 * tree.c (build_cplus_array_type_1): Don't avoid building real
4725 array types when processing templates unless really necessary.
4726 (build_exception_variant): Compare the exception lists correctly.
4728 1998-12-13 Mark Mitchell <mark@markmitchell.com>
4730 * cp-tree.def (CPLUS_BINDING): Update documentation.
4731 * cp-tree.h (LOCAL_BINDING_P): New macro.
4732 (lang_identifier): Rename local_value to bindings.
4733 (tree_binding): Make `scope' of type `void*', not `tree'.
4734 (BINDING_SCOPE): Update documentation.
4735 (IDENTIFIER_LOCAL_VALUE): Remove.
4736 (IDENTIFIER_CLASS_VALUE): Document.
4737 (IDENTIFIER_BINDING): New macro.
4738 (IDENTIFIER_VALUE): Likewise.
4739 (TIME_IDENTIFIER_TIME): Likewise.
4740 (TIME_IDENTIFIER_FILEINFO): Likewise.
4741 (IMPLICIT_TYPENAME_P): Likewise.
4742 (set_identifier_local_value): Remove.
4743 (push_local_binding): New function.
4744 (push_class_binding): Likewise.
4745 * class.c (pushclass): Update comments; use push_class_binding.
4746 * decl.c (set_identifier_local_value_with_scope): Remove.
4747 (set_identifier_local_value): Likewise.
4748 (push_binding): New function.
4749 (pop_binding): Likewise.
4750 (binding_level): Update documentation. Remove shadowed.
4751 (BINDING_LEVEL): New macro.
4752 (free_binding_nodes): New variable.
4753 (poplevel): Adjust for new name-lookup scheme. Don't mess up
4754 BLOCK_VARs when doing for-scope extension. Remove effectively
4756 (pushlevel_class): Tweak formatting.
4757 (poplevel_class): Adjust for new name-lookup scheme.
4758 (print_binding_level): Likewise.
4759 (store_bindings): Likewise.
4760 (pushdecl): Likewise.
4761 (pushdecl_class_level): Likewise.
4762 (push_class_level_binding): Likewise.
4763 (push_overloaded_decl): Update comments. Adjust for new
4765 (lookup_name_real): Likewise.
4766 (lookup_name_current_level): Likewise.
4767 (cp_finish_decl): Likewise.
4768 (require_complete_types_for_parms): Likewise. Remove misleading
4770 (grok_parms): Likewise. Don't call
4771 require_complete_types_for_parms here.
4772 (grok_ctor_properties): Don't treat templates as copy
4774 (grop_op_properties): Or as assignment operators.
4775 (start_function): Document. Adjust for new name-lookup scheme.
4776 (finish_function): Likewise.
4777 * decl2.c (do_local_using_decl): Use push_local_binding.
4778 * lex.c (begin_definition_of_inclass_inline): New function, split
4780 (do_pending_inlines): Here, and ...
4781 (process_next_inline): Here.
4782 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
4783 (init_filename_times): Likewise.
4784 (extract_interface_info): Likewise.
4785 (ste_typedecl_interface_info): Likewise.
4786 (check_newline): Likewise.
4787 (dump_time_statistics): Likewise.
4788 (handle_cp_pragma): Likewise.
4789 (do_identifier): Adjust for new name-lookup scheme.
4790 * parse.y (function_try_block): Return ctor_initializer_opt value.
4792 (fn.defpen): Pass appropriate values to start_function.
4793 (pending_inline): Use functor_try_block value, and pass
4794 appropriate values to finish_function.
4795 * pt.c (is_member_template): Update documentation; remove handling
4796 of FUNCTION_DECLs. As per name, this function should deal only in
4798 (decl_template_parm_p): Change name of olddecl parameter to decl.
4799 (check_template_shadow): Adjust for new name-lookup scheme.
4800 (lookup_template_class): Likewise.
4801 (tsubst_decl): Tweak so as not to confuse member templates with
4802 copy constructors and assignment operators.
4803 (unify): Handle UNION_TYPEs.
4804 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
4805 (lang_print_xnode): Adjust for new name-lookup scheme.
4806 * typeck.c (mark_addressable): Likewise.
4807 (c_expand_return): Likewise.
4809 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
4811 * decl.c (grokdeclarator): Allow field with same name as class
4814 * decl.c (lookup_name_real): Don't limit field lookup to types.
4815 * class.c (check_member_decl_is_same_in_complete_scope): No error
4816 if icv and x are the same.
4817 * lex.c (do_identifier): Tweak error message.
4819 1998-12-10 Mark Mitchell <mark@markmitchell.com>
4821 * decl.c (start_enum): Use push_obstacks, not
4822 end_temporary_allocation.
4823 (finish_enum): Call pop_obstacks.
4825 1998-12-10 Mark Mitchell <mark@markmitchell.com>
4827 * class.c (instantiate_type): Return error_mark_node rather than
4830 1998-12-09 Mark Mitchell <mark@markmitchell.com>
4832 * cp-tree.h (most_specialized_instantiation): New function.
4833 (print_candidates): Likewise.
4834 * class.c (validate_lhs): Remove.
4835 (resolve_address_of_overloaded_function): New function, split out
4836 and then substantially reworked, from ...
4837 (instantiate_type): Use it. Simplify.
4838 * cvt.c (convert_to_reference): Complain when caller has indicated
4839 that's the right thing to do. Don't crash if instantiate_type
4841 * pt.c: Substitute `parameters' for `paramters' throughout.
4842 (print_candidates): Don't make it static.
4843 (most_specialized_instantiation): Split out from ...
4844 (most_specialized): Here.
4846 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
4848 * lex.c (lang_init_options): Initialize cpplib.
4849 * decl2.c (parse_options,cpp_initialized): Removed.
4850 (lang_decode_option): Move initialization of cpplib to
4853 1998-12-09 Mark Mitchell <mark@markmitchell.com>
4855 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
4856 well as the TYPE_DECL, when a typedef name is assigned to a
4857 previously anonymous type.
4859 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
4861 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
4862 __cp_eh_info for getting the eh info pointer. Add table_index to
4864 (push_eh_cleanup): Don't increment 'handlers' data field.
4865 (process_start_catch_block): Don't set the 'caught' field.
4867 * cp/exception.cc (CP_EH_INFO): New macro for getting the
4868 exception info pointer within library routines.
4869 (__cp_eh_info): Use CP_EH_INFO.
4870 (__start_cp_handler): Get exception info pointer, set caught field,
4871 and increment the handlers field. Avoids this being done by handlers.
4872 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
4873 (uncaught_exception): Use CP_EH_INFO macro.
4875 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
4877 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
4879 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
4881 * lex.c (check_newline): Add support for \ as `natural'
4882 characters in file names in #line to be consistent with #include
4883 handling. We support escape processing in the # 1 "..." version of
4884 the command. See also support in cp/lex.c.
4886 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
4888 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
4891 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
4893 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
4895 * error.c (dump_simple_decl): Also print namespace context.
4896 (dump_function_decl): Likewise.
4898 * decl2.c (ambiguous_decl): Don't print old value if it's
4901 * decl.c (lookup_name_real): Fix handling of local types shadowed
4902 by a non-type decl. Remove obsolete code.
4903 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
4905 * lang-options.h: Add -fpermissive.
4906 * decl2.c: Likewise.
4907 * cp-tree.h: Add flag_permissive.
4908 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
4909 were specified, set flag_pedantic_errors.
4910 * call.c (build_over_call): Turn dropped qualifier messages
4912 * cvt.c (convert_to_reference): Likewise.
4913 * typeck.c (convert_for_assignment): Likewise.
4915 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
4917 * decl2.c (coerce_new_type): Use same_type_p.
4918 (coerce_delete_type): Likewise.
4920 * call.c (check_dtor_name): Return 1, not error_mark_node.
4922 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
4924 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
4925 if MULTIPLE_SYMBOL_SPACES.
4927 * pt.c (check_template_shadow): New fn.
4928 * decl2.c (grokfield): Use it.
4929 * decl.c (pushdecl): Likewise.
4930 (pushdecl_class_level): Likewise.
4931 (start_method): Likewise.
4932 (xref_tag): Don't try to use 't' if we're defining.
4934 * call.c (check_dtor_name): Just return an error_mark_node.
4935 * pt.c (lookup_template_class): Complain about using non-template here.
4936 * parse.y (apparent_template_type): Not here.
4938 * pt.c (check_explicit_specialization): Complain about specialization
4941 * lang-options.h: Add -f{no-,}implicit-inline-templates.
4943 * pt.c (convert_nontype_argument): Don't assume that any integer
4944 argument is intended to be a constant-expression.
4946 1998-12-03 Mark Mitchell <mark@markmitchell.com>
4948 * class.c (handle_using_decl): Fix comment. Don't lookup
4949 constructors in base classes.
4950 (validate_lhs): Fix typo in comment.
4951 * search.c (lookup_field_1): Don't return a USING_DECL.
4953 * cp-tree.h (DECL_ACCESS): Improve documentation.
4955 * decl.c (expand_static_init): Don't set the initialization-done
4956 flag until the initialization is done.
4958 1998-12-02 Mark Mitchell <mark@markmitchell.com>
4960 * decl2.c (validate_nonmember_using_decl): Complain about using
4961 declarations for class members.
4963 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
4965 * typeck2.c (process_init_constructor): Use same_type_p.
4967 * decl.c (check_tag_decl): Don't warn about null decl inside a
4970 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
4972 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
4973 (resolve_overloaded_unification): Strip baselinks.
4975 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4977 * g++spec.c: Don't prototype xmalloc.
4979 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
4981 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
4983 * decl.c (check_tag_decl): Do complain about null friend decl at
4986 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4988 * lex.c (make_lang_type): Clear the whole struct lang_type, not
4989 only the first multiple of sizeof (int).
4991 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
4993 * decl.c (start_decl): An explicit specialization of a static data
4994 member is only a definition if it has an initializer.
4996 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
4997 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
4999 * init.c (expand_default_init): Check for DIRECT_BIND instead of
5002 * call.c (build_over_call): Use build_decl.
5004 * except.c (expand_throw): Just use convert, not
5005 build_reinterpret_cast.
5007 * lex.c (handle_generic_pragma): Use token_buffer.
5009 * decl.c (check_tag_decl): Don't complain about null friend decl.
5011 1998-11-24 Dave Pitts <dpitts@cozx.com>
5013 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
5015 * lex.c (check_newline): Use ISALPHA.
5016 (readescape): Use ISGRAPH.
5017 (yyerror): Use ISGRAPH.
5019 1998-11-24 Nathan Sidwell <nathan@acm.org>
5021 * search.c (get_abstract_virtuals): Do not use initial
5022 CLASSTYPE_ABSTRACT_VIRTUALS.
5023 * typeck2.c (abstract_virtuals_error): Show location of abstract
5025 * call.c (build_new_method_call): Use
5026 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
5027 * class.c (finish_struct_bits): Don't bother working out whether
5028 get_abstract_virtuals will do anything, just do it.
5030 1998-11-24 Graham <grahams@rcp.co.uk>
5032 * typeck.c (build_component_ref): Remove unused statement.
5034 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
5036 * class.c (add_method): Catch invalid overloads.
5038 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
5039 * search.c (lookup_conversions): Handle getting real OVERLOADs.
5040 (add_conversions): Likewise. Revert last change.
5041 * call.c (add_conv_candidate): Pass totype to add_candidate instead
5042 of fn. Don't add a new candidate if the last one was for the same
5044 (print_z_candidates): Handle getting a type as a function.
5045 (joust): If we got two conversion candidates to the same type,
5047 (build_object_call): Lose 'templates'.
5048 (build_user_type_conversion_1): Handle getting real OVERLOADs.
5050 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
5052 * typeck2.c (process_init_constructor): If there are elements
5053 that don't have initializers and they need to have constructors
5054 run, supply them with initializers.
5056 * class.c (finish_struct_1): A class with a 0-width bitfield is
5059 1998-11-23 Mark Mitchell <mark@markmitchell.com>
5061 * pt.c (instantiate_class_template): Don't try to figure out what
5062 specialization to use for a partial instantiation. Correct
5063 typos in a couple of comments. Avoid calling uses_template_parms
5066 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
5068 * method.c (process_overload_item): Add call to
5069 build_mangled_C9x_name for intTI_type_nodes.
5070 (build_mangled_C9x_name): Add prototype, define.
5071 * decl.c (init_decl_processing): Add names for
5074 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
5076 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
5078 * class.c (finish_struct_1): Set things up for 0-width bitfields
5079 like we do for others.
5081 * decl.c (check_tag_decl): New fn.
5082 (shadow_tag): Split out from here.
5083 * decl2.c (grok_x_components): Call it.
5085 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
5087 * decl.c: Lose warn_about_return_type.
5088 (grokdeclarator): Always complain about implicit int, except for
5091 * decl.c (tag_name): New fn.
5092 (xref_tag): Complain about using typedef-name after class-key.
5094 * init.c (expand_vec_init): Also keep going if from_array.
5096 * tree.c (is_overloaded_fn): Also handle the output of
5099 * decl.c (grokdeclarator): Use constructor_name when comparing
5100 field name against enclosing class.
5101 * class.c (finish_struct_anon): Likewise.
5103 1998-11-22 Mark Mitchell <mark@markmitchell.com>
5105 * decl.c (poplevel): Remove code to handle KEEP == 2.
5106 (finish_function): Don't confuse BLOCK-order when
5107 processing a destructor.
5109 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
5111 * decl.c (require_complete_types_for_parms): Call layout_decl
5112 after we've completed the type.
5114 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
5116 * decl2.c (validate_nonmember_using_decl): Allow using templates
5117 from the global namespace.
5119 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
5121 Handle specifying template args to member function templates.
5122 * tree.c (build_overload): Always create an OVERLOAD for a template.
5123 * search.c (add_conversions): Handle finding an OVERLOAD.
5124 * decl2.c (check_classfn): Likewise.
5125 * lex.c (identifier_type): See through a baselink.
5126 * parse.y (do_id): Don't call do_identifier if we got a baselink.
5127 * class.c (instantiate_type, case TREE_LIST): Recurse.
5129 * decl.c (grokdeclarator): Allow a boolean constant for array
5130 bounds, odd as that sounds.
5132 * pt.c (unify): Be more strict about non-type parms, except for
5134 (UNIFY_ALLOW_INTEGER): New macro.
5136 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
5138 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
5140 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
5142 * semantics.c (begin_class_definition): Call
5143 maybe_process_partial_specialization before push_template_decl.
5144 Don't call push_template_decl for a specialization.
5145 * search.c (lookup_field): Do return a member template class.
5146 * decl2.c (handle_class_head): Handle member template classes.
5148 * decl.c (grokdeclarator): A parm type need not be complete.
5150 * pt.c (convert_nontype_argument): Fix thinko.
5152 1998-11-18 Mark Mitchell <mark@markmitchell.com>
5154 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
5155 (global_delete_fndecl): New variable.
5156 * decl.c (global_delete_fndecl): Define it.
5157 (init_decl_processing): Set it.
5158 * init.c (build_builtin_delete_call): Use it.
5159 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
5162 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
5164 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
5167 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
5168 * call.c (build_object_call): Also support references to functions.
5169 * typeck.c (convert_for_initialization): Don't decay a function
5170 if the target is a reference to function.
5172 * search.c (add_conversions): Get all the overloads from a class.
5174 * decl.c (grok_ctor_properties): Complain about any constructor
5175 that will take a single arg of the class type by value.
5177 * typeck2.c (build_functional_cast): Can't create objects of
5178 abstract classes this way.
5179 * cvt.c (ocp_convert): Likewise.
5181 * decl.c (grokfndecl): Member functions of local classes are not
5184 1998-11-18 Mark Mitchell <mark@markmitchell.com>
5186 * Make-lang.in (cc1plus): Add dependency on hash.o.
5188 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
5190 * search.c (get_abstract_virtuals): Complain about virtuals with
5192 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
5193 with no final overrider.
5194 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
5195 on virtuals with no final overrider.
5197 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5199 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5202 * friend.c (do_friend): Don't set_mangled_name_for_decl.
5204 * class.c (finish_struct_anon): Complain about non-fields.
5205 * decl2.c (build_anon_union_vars): Likewise.
5207 * decl.c (grokdeclarator): Normal data members can't have the same
5208 name as the class, either.
5209 * class.c (finish_struct_anon): Neither can members of an
5212 1998-11-17 Mark Mitchell <mark@markmitchell.com>
5214 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
5215 (TYPE_BINFO): Likewise.
5216 (IS_AGGR_TYPE): Tweak.
5217 (SET_IS_AGGR_TYPE): New macro.
5218 (CLASS_TYPE_P): Tweak.
5219 (lang_type): Group mark bitfields together. Remove linenum.
5220 (CLASSTYPE_SOURCE_LINE): Remove macro.
5221 (CLASSTYPE_MARKED_N): New macro.
5222 (SET_CLASSTYPE_MARKED_N): Likewise.
5223 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
5224 (CLASS_TYPE_MARKED_*): Use them.
5225 (SET_CLASSTYPE_MARKED_*): Likewise.
5226 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
5227 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5228 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
5229 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
5230 * class.c (class_cache_obstack): New variable.
5231 (class_cache_firstobj): Likewise.
5232 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
5233 (pushclass): Free the cache, when appropriate.
5235 (maybe_push_cache_obstack): Use class_cache_obstack.
5236 * decl.c (include hash.h).
5237 (typename_hash): New function.
5238 (typename_compare): Likewise.
5239 (build_typename_type): Check the hash table to avoid creating
5241 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
5242 (grokdeclarator): Use CLASS_TYPE_P.
5243 (xref_basetypes): Likewise.
5244 (start_function): Likewise. Don't put current_class_ref on the
5246 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
5248 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
5249 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
5250 fields for types other than class types. Do clear TYPE_ALIAS_SET
5251 for types other than class types, though.
5252 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
5253 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5254 * pt.c (process_template_parm): Don't set
5255 CLASSTYPE_GOT_SEMICOLON.
5256 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5257 Coerce arguments on the momentary obstack.
5258 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5259 (instantiate_class_template): Calculate template arguments on the
5260 momentary obstack. Tidy.
5261 (tsubst_template_arg_vector): Use make_temp_vec.
5262 (tsubst_aggr_type): Put template arguments on the momentary
5264 (tsubst_decl): Likewise.
5265 (tsubst): Copy the array bounds index to the permanent obstack
5266 before building index types. Use new macros.
5267 (unify): Use new macros.
5268 (do_type_instantiation): Likewise.
5269 * search.c (lookup_fnfields_1): Use new macros.
5270 (dfs_pushdecls): Build envelopes on the cache obstack.
5271 (dfs_compress_decls): Use new macros.
5272 (push_class_decls): Build on the cache obstack.
5273 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
5274 * sign.c (build_signature_pointer_or_reference_type): Use
5276 * tree.c (make_binfo): Check CLASS_TYPE_P.
5277 (copy_template_template_parm): Adjust.
5278 (make_temp_vec): Use push_expression_obstack.
5279 * typeck.c (complete_type): Use new macros.
5280 (comptypes): Likewise.
5282 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
5284 * pt.c (tsubst): Add diagnostics for invalid array, reference
5285 and pointer to member types.
5287 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
5289 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
5291 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
5294 * parse.y (structsp): Fix cut-and-paste error.
5296 * init.c (build_new): Complain about non-integral size.
5298 * parse.y (unary_expr): Complain about defining types in sizeof.
5300 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
5302 * rtti.c (build_x_typeid): Complain about typeid without
5303 including <typeinfo>.
5304 (get_typeid): Likewise. Complain about typeid of incomplete type.
5305 (get_tinfo_fn_dynamic): Likewise.
5306 (get_typeid_1): Not static anymore.
5307 * except.c (build_eh_type_type): Use get_typeid_1.
5309 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
5310 ambiguous or private bases. Fix warning for reference cast.
5312 1998-11-16 Mark Mitchell <mark@markmitchell.com>
5314 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
5315 * decl.c (duplicate_decls): Remove special-case code to deal with
5316 template friends, and just do the obvious thing.
5317 * pt.c (register_specialization): Tweak for clarity, and also to
5318 clear DECL_INITIAL for an instantiation before it is merged with a
5320 (check_explicit_specialization): Fix indentation.
5321 (tsubst_friend_function): Handle both definitions in friend
5322 declaration and outside friend declarations.
5323 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
5324 (regenerate_decl_from_template): Tweak accordingly.
5325 (instantiate_decl): Likewise.
5327 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
5329 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
5330 member function reference to error.
5331 * cvt.c (ocp_convert): Complain about converting an overloaded
5334 * init.c (build_offset_ref): Just return a lone static member
5337 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
5340 * typeck.c (build_binary_op_nodefault): Improve error handling.
5342 * decl.c (grokfndecl): Complain about making 'main' a template.
5344 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
5346 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
5347 TYPE_DECL in a template.
5349 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
5351 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
5353 * decl.c (struct cp_function): Add named_label_uses.
5354 (push_cp_function_context): Save it.
5355 (pop_cp_function_context): Restore it.
5356 (define_label): Also complain about jumping into the scope of
5357 non-POD objects that don't have constructors.
5358 * tree.c (pod_type_p): New fn.
5360 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
5361 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
5362 (get_tinfo_fn): Not here.
5363 * repo.c (repo_get_id): Abort if we get called for an incomplete
5366 1998-11-13 Mark Mitchell <mark@markmitchell.com>
5368 * except.c (expand_throw): Make sure first argument to
5369 __cp_push_exception is of type `void*' to avoid spurious error
5372 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
5374 * pt.c (try_one_overload): Take orig_targs again. Only check for
5375 mismatches against them; we don't care what a previous call found.
5376 (resolve_overloaded_unification): Adjust.
5378 * search.c (lookup_field): Don't return anything for a non-type
5379 field from a dependent type.
5380 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
5381 in an array declarator.
5382 (start_decl): Push into the class before looking for the field.
5384 1998-11-08 Mark Mitchell <mark@markmitchell.com>
5386 * method.c (build_overload_value): Handle REFERENCE_TYPE.
5388 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
5390 * decl.c (grokdeclarator): Allow namespace-scoped members if they
5393 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
5395 * pt.c (tsubst_decl): Don't mess with the global value of an
5396 un-mangled DECL_ASSEMBLER_NAME.
5398 1998-11-03 Christopher Faylor <cgf@cygnus.com>
5400 * decl.c (init_decl_processing): Remove CYGWIN conditional
5401 since CYGWIN is now able to deal with trapping signals.
5403 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5405 * cp-tree.h: Don't include gansidecl.h.
5406 * exception.cc: Include gansidecl.h (since we don't include config.h)
5407 * g++spec.c: Don't include gansidecl.h.
5409 1998-11-06 Mark Mitchell <mark@markmitchell.com>
5411 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
5413 (DECL_DEFINED_IN_CLASS_P): New macro.
5414 (TEMPLATE_PARMS_FOR_INLINE): Document.
5415 (check_static_variable_definition): New function.
5416 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
5418 (check_static_variable_definition): Split out from ...
5419 (grokdeclarator): Here.
5420 * pt.c (check_default_tmpl_args): New function, split out from ...
5421 (push_template_decl_real): Here.
5422 (instantiate_template): Fix comment.
5424 1998-11-04 Mark Mitchell <mark@markmitchell.com>
5426 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
5427 (CP_TYPE_VOLATILE_P): Likewise.
5428 (CP_TYPE_RESTRICT_P): Likewise.
5430 1998-11-03 Mark Mitchell <mark@markmitchell.com>
5432 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
5434 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
5436 * class.c (instantiate_type): Be more helpful.
5438 * decl2.c (import_export_decl): Call import_export_class.
5440 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
5441 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
5442 * pt.c (tsubst_copy): Likewise.
5444 1998-11-02 Mark Mitchell <mark@markmitchell.com>
5446 * init.c (expand_vec_init): Fix off-by-one error.
5448 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
5450 * parse.y (apparent_template_type): New type.
5451 (named_complex_class_head_sans_basetype): Use it.
5452 * Makefile.in (CONFLICTS): One new conflict.
5453 * parse.c: Regenerated.
5455 1998-11-01 Mark Mitchell <mark@markmitchell.com>
5457 * cp-tree.h (COMPARE_STRICT): New macro.
5458 (COMPARE_BASE): Likewise.
5459 (COMPARE_RELAXED): Likewise.
5460 (COMPARE_REDECLARATION): Likewise.
5461 (same_type_p): Likewise.
5462 (same_or_base_type_p): Likewise.
5463 * call.c (standard_conversion): Use them, in place of comptypes
5464 with numeric arguments.
5465 (reference_binding): Likewise.
5466 (convert_like): Likewise.
5467 (build_over_call): Likewise.
5468 (is_subseq): Likewise.
5469 (is_properly_derived_from): Likewise.
5470 (compare_ics): Likewise.
5472 * class.c (delete_duplicate_fields_1): Likewise.
5473 (resolves_to_fixed_type_p): Likewise.
5474 (instantiate_type): Likewise. Remove #if 0'd code.
5475 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
5476 (pushdecl): Likewise.
5477 (lookup_name_real): Likewise.
5478 (grokdeclarator): Likewise. Check for illegal array declarations.
5479 (grokparms): Likewise.
5480 (grok_op_properties): Likewise.
5481 * decl2.c (check_classfn): Likewise.
5482 * friend.c (is_friend): Likewise.
5483 (make_friend_class): Likewise.
5484 * init.c (expand_aggr_init): Likewise.
5485 (expand_vec_init): Likewise.
5486 * pt.c (is_member_template_class): Remove declaration.
5487 (is_specialization_of): Use COMPARE_* and new macros.
5488 (comp_template_parms): Likewise.
5489 (convert_nontype_argument): Likewise.
5490 (coerce_template_template_parms): Likewise.
5491 (template_args_equal): Likewise.
5492 (lookup_template_class): Likewise.
5493 (type_unification_real): Likewise.
5495 (get_bindings_real): Likewise.
5496 * search.c (covariant_return_p): Likewise.
5497 (get_matching_virtual): Likewise.
5498 * sig.c (match_method_types): Likewise.
5499 * tree.c (vec_binfo_member): Likewise.
5500 (cp_tree_equal): Likewise.
5501 * typeck.c (common_type): Likewise.
5502 (comp_array_types): Likewise. Get issues involving unknown array
5504 (comptypes): Update comments. Use new flags.
5505 (comp_target_types): Use new macros.
5506 (compparms): Likewise.
5507 (comp_target_parms): Likewise.
5508 (string_conv_p): Likewise.
5509 (build_component_ref): Likewise.
5510 (build_indirect_ref): Likewise.
5511 (build_conditional_expr): Likewise.
5512 (build_static_cast): Likewise.
5513 (build_reinterpret_cast): Likewise.
5514 (build_const_cast): Likewise.
5515 (build_modify_expr): Likewise.
5516 (convert_for_assignment): Likewise.
5517 (comp_ptr_ttypes_real): Likewise.
5518 (ptr_reasonably_similar): Likewise.
5519 (comp_ptr_ttypes_const): Likewise.
5521 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
5523 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
5525 1998-10-30 Mark Mitchell <mark@markmitchell.com>
5527 * decl2.c (delete_sanity): Pass integer_zero_node, not
5528 integer_two_node, to build_vec_delete.
5529 * init.c (build_array_eh_cleanup): Remove.
5530 (expand_vec_init_try_block): New function.
5531 (expand_vec_init_catch_clause): Likewise.
5532 (build_vec_delete_1): Don't deal with case that auto_delete_vec
5533 might be integer_two_node anymore.
5534 (expand_vec_init): Rework for initialization-correctness and
5535 exception-correctness.
5536 * typeck2.c (process_init_constructor): Make mutual exclusivity
5537 of cases more obvious.
5539 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
5541 * decl.c (lookup_name_real): OK, only warn if not lexing.
5542 Simplify suggested fix.
5544 * cp-tree.h (IDENTIFIER_MARKED): New macro.
5545 * search.c (lookup_conversions): Use breadth_first_search.
5546 (add_conversions): Avoid adding two conversions to the same type.
5547 (breadth_first_search): Work with base binfos, rather
5548 than binfos and base indices.
5549 (get_virtual_destructor): Adjust.
5550 (tree_has_any_destructor_p): Adjust.
5551 (get_matching_virtual): Adjust.
5553 * pt.c (push_template_decl_real): Generalize check for incorrect
5554 number of template parms.
5555 (is_member_template_class): #if 0.
5557 1998-10-29 Richard Henderson <rth@cygnus.com>
5559 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
5562 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
5564 * lex.c: Call check_newline from lang_init always. After
5565 calling cpp_start_read, set yy_cur and yy_lim to read from the
5566 cpplib token buffer.
5568 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
5570 * class.c (instantiate_type): Don't consider templates for a normal
5573 * class.c (finish_struct_1): Don't complain about non-copy
5574 assignment ops in union members.
5576 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
5577 (prepare_fresh_vtable): Likewise.
5578 (finish_struct_1): Don't call import_export_class.
5579 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
5580 (finish_prevtable_vardecl): Lose.
5581 (finish_file): Don't call it.
5582 * pt.c (instantiate_class_template): Likewise.
5583 * cp-tree.h: Remove it.
5585 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
5586 * decl.c (finish_function): Not here.
5587 (start_function): Do set DECL_INITIAL.
5589 * pt.c (push_template_decl_real): Complain about default template
5590 args for enclosing classes.
5592 * call.c (add_function_candidate): Treat conversion functions
5593 as coming from the argument's class.
5594 * cp-tree.h (DECL_CONV_FN_P): New fn.
5595 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
5596 * class.c (add_method): Use DECL_CONV_FN_P.
5597 * decl2.c (check_classfn): Likewise.
5598 * error.c (dump_function_name): Likewise.
5599 (dump_function_decl): Likewise.
5600 * pt.c (fn_type_unification): Likewise.
5601 * search.c (add_conversions): Likewise.
5603 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
5605 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
5606 * method.c (hack_identifier): Also check for using RESULT_DECL
5609 1998-10-27 Mark Mitchell <mark@markmitchell.com>
5611 * decl.c (grokdeclarator): Use type_quals, rather than constp,
5614 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
5616 * call.c (standard_conversion): instantiate_type here.
5617 (reference_binding): And here.
5618 (implicit_conversion): Not here.
5619 (build_op_delete_call): No need to cons up an OVERLOAD.
5620 * cvt.c (cp_convert_to_pointer): instantiate_type here.
5621 (convert_to_reference): And here.
5622 * decl.c (grok_reference_init): Not here.
5623 (grokparms): Or here.
5624 * typeck2.c (digest_init): Or here.
5625 * typeck.c (decay_conversion): Take the address of overloaded
5627 (require_instantiated_type): Lose.
5628 (convert_arguments): Don't handle unknown types here.
5629 (build_c_cast): Likewise.
5630 (build_binary_op): Gut.
5631 (build_conditional_expr): Don't require_instantiated_type.
5632 (build_modify_expr): Likewise.
5633 (build_static_cast): Don't instantiate_type.
5634 (build_reinterpret_cast): Likewise.
5635 (build_const_cast): Likewise.
5636 (convert_for_initialization): Likewise.
5637 (build_ptrmemfunc): Use type_unknown_p.
5638 (convert_for_assignment): Also do default_conversion on overloaded
5639 functions. Hand them off to ocp_convert.
5641 1998-10-26 Mark Mitchell <mark@markmitchell.com>
5643 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
5644 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
5646 * class.c (finish_struct_1): Use build_cplus_array_type to build
5648 * decl.c (init_decl_processing): Likewise.
5649 * except.c (expand_end_eh_spec): Likewise.
5650 * search.c (expand_upcast_fixups): Simplify very slightly.
5652 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
5654 * decl.c (grokdeclarator): Complain about a variable using
5655 constructor syntax coming back null from start_decl.
5657 * friend.c (make_friend_class): Complain about trying to make
5658 a non-class type a friend.
5660 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
5661 (start_function): Not here.
5663 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
5665 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
5667 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
5669 * typeck2.c (process_init_constructor): Only skip anonymous fields
5670 if they are bitfields.
5672 * cp-tree.def (TYPEOF_TYPE): New code.
5673 * error.c (dump_type_real): Handle it.
5674 * pt.c (tsubst): Likewise.
5675 * tree.c (search_tree): Likewise.
5676 * semantics.c (finish_typeof): New fn.
5677 * parse.y (typespec): Use it.
5678 * cp-tree.h: Declare it.
5680 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
5682 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
5684 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
5686 * typeck.c (convert_arguments): Don't handle pmf references
5689 * init.c (build_member_call): Don't try to convert to the base type
5690 if it's ambiguous or pedantic.
5692 * typeck2.c (check_for_new_type): Only depend on pedantic for
5695 1998-10-25 Mark Mitchell <mark@markmitchell.com>
5697 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
5698 non-converting constructors.
5700 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
5702 * gxxint.texi: Correct documentation for n, N, Q, and B.
5704 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
5706 * parse.y (condition): Convert VAR_DECL from reference to indirect
5709 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
5711 * exception.cc (__cp_pop_exception): Free the original exception
5712 value, not the potentially coerced one.
5714 1998-10-23 Mark Mitchell <mark@markmitchell.com>
5716 * Makefile.in (hash.h): Run gperf when necessary.
5718 * cp-tree.h (CP_TYPE_READONLY): Remove.
5719 (CP_TYPE_VOLATILE): Likewise.
5720 (CP_TYPE_QUALS): New macro.
5721 (CP_TYPE_CONST_P): Likewise.
5722 (CP_TYPE_VOLATILE_P): Likewise.
5723 (CP_TYPE_RESTRICT_P): Likewise.
5724 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
5725 (cp_build_type_variant): Rename to ...
5726 (cp_build_qualified_type): New function.
5727 (c_apply_type_quals_to_decl): Declare.
5728 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
5729 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
5730 (cp_type_qual_from_rid): New function.
5731 (compparms): Remove unused parameter. All callers changed.
5732 (cp_type_quals): New function.
5733 (at_least_as_qualified_p): Likewise.
5734 (more_qualified_p): Likewise.
5736 * call.c (standard_conversion): Replace calls to
5737 cp_build_type_variant with cp_build_qualified_type. Use
5738 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
5739 compare them. Use CP_TYPE_* macros to check qualifiers.
5740 (reference_binding): Likewise.
5741 (implicit_conversion): Likewise.
5742 (add_builtin_candidates): Likewise.
5743 (build_over_call): Likewise.
5744 * class.c (overrides): Compare all qualifiers, not just `const',
5745 on method declarations.
5746 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
5747 (convert_pointer_to_real): Likewise.
5748 (type_promotes_to): Likewise.
5749 * decl.c (check_for_uninitialized_const_var): New function.
5750 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
5751 (cp_finish_decl): Use check_for_uninitialized_const_var.
5752 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
5754 (grok_ctor_properties): Likewise.
5755 (grok_op_properties): Likewise.
5756 (start_function): Likewise.
5757 (rever_static_member_fn): Likewise.
5758 * decl2.c (grok_method_quals): Likewise.
5759 (grokfield): Likewise.
5760 * error.c (dump_readonly_or_volatile): Rename to ...
5761 (dump_qualifiers): New function. Handle `restrict'.
5762 (dump_type_real): Use it.
5763 (dump_aggr_type): Likewise.
5764 (dump_type_prefix): Likewise.
5765 (dump_type_suffix): Likewise.
5766 (dump_function_decl): Likewise.
5767 (cv_as_string): Likewise.
5768 * gxx.gperf: Add __restrict and __restrict__.
5769 * gxxint.texi: Document `u' as used for `__restrict', and a few
5770 other previously undocumented codes.
5771 * hash.h: Regenerated.
5772 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
5773 (build_member_call): Likewise.
5774 (build_new_1): Likewise.
5775 * lex.c (init_parse): Add entry for RID_RESTRICT.
5776 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
5777 (cp_type_qual_from_rid): Define.
5778 * lex.h (enum rid): Add RID_RESTRICT.
5779 * method.c (process_modifiers): Deal with `restrict'.
5780 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
5781 * parse.c: Regenerated.
5782 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
5783 (tsubst_aggr_type): Likewise.
5785 (check_cv_quals_for_unify): Likewise.
5787 * rtti.c (init_rtti_processing): Likewise.
5788 (build_headof): Likewise.
5789 (get_tinfo_var): Likewise.
5790 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
5791 (expand_class_desc): Likewise.
5792 (expand_attr_desc): Likewise.
5793 (synthesize_tinfo_fn): Likewise.
5794 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
5795 (get_matching_virtual): Likewise.
5796 (expand_upcast_fixups): Likewise.
5797 * sig.c (build_signature_pointer_or_reference_name): Take
5798 type_quals, not constp and volatilep.
5799 (build_signature_pointer_or_reference_type): Likewise.
5800 (match_method_types): More CP_TYPE_QUALS conversion, etc.
5801 (build_signature_pointer_constructor): Likewise.
5802 (build_signature_method_call): Likewise.
5803 * tree.c (build_cplus_array_type): Likewise.
5804 (cp_build_type_variant): Rename to ...
5805 (cp_build_qualified_type): New function. Deal with `__restrict'.
5806 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
5807 (build_exception_variant): Likewise.
5809 * typeck.c (qualif_type): Likewise.
5810 (common_type): Likewise.
5811 (comptypes): Likewise.
5812 (comp_cv_target_types): Likewise.
5813 (at_least_as_qualified_p): Define.
5814 (more_qualified_p): Likewise.
5815 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
5816 (compparms): Likewise.
5817 (inline_conversion): Likewise.
5818 (string_conv_p): Likewise.
5819 (build_component_ref): Likewise.
5820 (build_indirect_ref): Likewise.
5821 (build_array_ref): Likewise.
5822 (build_unary_op): Likewise.
5823 (build_conditional_expr): Likewise.
5824 (build_static_cast): Likewise.
5825 (build_c_cast): Likewise.
5826 (build_modify_expr): Likewise.
5827 (convert_For_assignment): Likewise.
5828 (comp_ptr_ttypes_real): Likewise.
5829 (cp_type_quals): New function.
5831 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
5833 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
5834 (CP_TYPE_VOLATILE): Likewise.
5835 * decl.c (grokdeclarator): Use them.
5836 * tree.c (canonical_type_variant): Likewise.
5838 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
5840 * parse.y (named_class_head): Push into class while parsing the
5842 * decl2.c (push_scope, pop_scope): New functions.
5843 * cp-tree.h: Declare them.
5844 * init.c (build_new_1): Delay cleanup until end of full expression.
5846 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
5848 * typeck.c (build_component_ref): Use of a type here is an error.
5850 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
5852 Revamp references to member functions.
5853 * method.c (hack_identifier): Call build_component_ref for a
5854 reference to a member function.
5855 * typeck.c (build_component_ref): Only return a single function
5856 if it's static. Otherwise, return a COMPONENT_REF.
5857 (build_x_function_call): Handle a COMPONENT_REF.
5858 (build_unary_op): Handle all unknown-type things.
5859 * decl2.c (arg_assoc): Handle COMPONENT_REF.
5860 * class.c (instantiate_type): Complain if the function we get is a
5861 nonstatic member function. Remove code for finding "compatible"
5863 * pt.c (tsubst_copy): Handle NOP_EXPR.
5864 * tree.c (build_dummy_object): New fn.
5865 (maybe_dummy_object): New fn.
5866 (is_dummy_object): New fn.
5867 * cp-tree.h: Declare them.
5868 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
5869 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
5870 * init.c (build_member_call): Use maybe_dummy_object and
5872 (build_offset_ref): Use maybe_dummy_object.
5873 (resolve_offset_ref): Use is_dummy_object.
5874 * typeck.c (build_x_function_call): Call build_dummy_object.
5875 (unary_complex_lvalue): Call is_dummy_object.
5877 * typeck.c (build_component_addr): Make sure field is a field.
5879 * call.c (build_new_op): Delete obsolete code.
5881 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
5883 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
5885 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
5886 std if std is ignored.
5888 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
5890 * decl.c (grokvardecl): Fix thinko.
5892 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5895 * parse.y (fn.def2): Fix 'attrs' format.
5897 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
5899 * Makefile.in (CONFLICTS): Update.
5900 * parse.y (expr_or_declarator_intern): New rule.
5901 (expr_or_declarator, direct_notype_declarator, primary,
5902 functional_cast): Use it.
5903 (notype_declarator_intern): New rule.
5904 (notype_declarator, complex_notype_declarator): Use it.
5906 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
5908 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
5909 (grokvardecl): Likewise.
5911 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5913 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
5914 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
5916 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
5918 * pt.c (process_partial_specialization): Cast 1st argument of
5921 * tree.c (build_base_fields): Cast `base_align' to (int) when
5922 comparing against one.
5924 1998-10-16 Mark Mitchell <mark@markmitchell.com>
5926 * decl.c (lookup_name_real): Handle template parameters for member
5927 templates where said parameters have the same name as the
5930 * decl.c (expand_static_init): Build cleanups before entering the
5931 anonymous function used to do them to avoid access-checking
5934 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
5935 accidentally removed by previous change, and make DECL_RTL here.
5936 * class.c (add_method): Don't make DECL_RTL here.
5938 * pt.c (for_each_template_parm): Don't examine uninstantiated
5941 1998-10-16 Dave Brolley <brolley@cygnus.com>
5943 * lex.c (real_yylex): Fix unaligned access of wchar_t.
5945 1998-10-16 Mark Mitchell <mark@markmitchell.com>
5947 * class.c (add_method): Fix documentation to reflect previous
5948 changes. Check for duplicate method declarations here.
5949 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
5950 correctly; such things never match.
5951 (grokfndecl): Don't look for duplicate methods here.
5952 * decl2.c (check_classfn): Don't assume names are mangled.
5953 Don't add bogus member function declarations to a class before the
5954 class type is complete.
5955 (grokfield): Reformat error message.
5956 * method.c (set_mangled_name_for_decl): Don't mangle names while
5957 processing_template_decl.
5959 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
5961 * typeck.c (build_indirect_ref): Complain about a pointer to data
5963 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
5965 * init.c (resolve_offset_ref): Don't undo the above.
5967 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
5968 (struct lang_decl_flags): Add `bitfield'.
5969 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
5971 * decl2.c (grokbitfield, grok_alignof): Likewise.
5972 * init.c (build_offset_ref): Likewise.
5973 * typeck.c (build_component_addr, expr_sizeof): Likewise.
5974 * cvt.c (build_up_reference): Don't crash if taking the address
5975 returns error_mark_node.
5977 * decl.c (grokfndecl): Also check ctype when checking for ::main().
5979 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
5981 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
5983 (grokdeclarator): Instead of here.
5984 * friend.c (do_friend): Lose special handling of ::main and
5986 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
5988 * spew.c (yylex): Clear looking_for_typename if we got
5991 1998-10-15 Mark Mitchell <mark@markmitchell.com>
5993 * class.c (maybe_warn_about_overly_private_class): Improve error
5994 messages for class with only private constructors.
5996 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
5997 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
5998 (build_typename_type): New function.
5999 * decl.c (build_typename_type): Broken out from ...
6000 (make_typename_type): Use it.
6001 * search.c (lookup_field): Likewise.
6003 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6005 * pt.c (convert_nontype_argument): Check against type_referred_to.
6006 * decl.c (grokvardecl): Check for declarator name before building
6007 DECL_ASSEMBLER_NAME.
6009 1998-10-14 Mark Mitchell <mark@markmitchell.com>
6011 * pt.c (lookup_template_class): Add comment.
6012 (instantiate_class_template): Don't mark the _TYPE node for
6013 member class templates as an instantiation.
6015 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
6017 * decl.c (grokfndecl): Fix my thinko.
6019 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
6021 * tinfo2.cc (fast_compare): Remove.
6022 (before): Just use strcmp.
6023 * tinfo.cc (operator==): Just use strcmp.
6025 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
6027 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
6030 1998-10-13 Mark Mitchell <mark@markmitchell.com>
6032 * cp-tree.h (specializations_of_same_template_p): Remove.
6033 * search.c (get_template_base): Don't use it.
6034 (get_template_base_recursive): Likewise.
6035 * pt.c (specializations_of_same_template_p): Remove.
6036 (unify): Don't use it.
6037 (lookup_template_class): Find the correct parent when setting
6038 CLASSTYPE_TI_TEMPLATE.
6040 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
6042 * tinfo.cc (operator==): Always compare names.
6044 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
6046 * decl.c (start_function): Fix cut-and-paste error.
6048 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
6050 * inc/typeinfo: Add #pragma interface.
6051 (operator!=): Just call operator==.
6052 * tinfo.cc: Add #pragma implementation.
6053 (operator==): Move from inc/typeinfo and tinfo2.cc.
6054 Check __COMMON_UNRELIABLE instead of _WIN32.
6056 * typeck2.c (my_friendly_abort): Add URL.
6058 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
6060 * decl.c (start_method): Added extra parameter for attributes.
6061 * cp-tree.h (start_method): Update prototype.
6062 * parse.y (fn.def2): Update start_method parameter list.
6064 1998-10-11 Mark Mitchell <mark@markmitchell.com>
6066 * cp-tree.h (specializations_of_same_template_p): Declare.
6067 * pt.c (specializations_of_same_template_p): New function.
6069 * search.c (get_template_base): Use it.
6070 (get_template_base_recursive): Likewise.
6072 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
6074 * decl2.c (start_objects): Add new variable `joiner' and
6075 initialize it properly.
6077 1998-10-09 Mark Mitchell <mark@markmitchell.com>
6079 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
6080 change to vtable types.
6082 * cvt.c (ocp_convert): Avoid infinite recursion caused by
6085 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
6087 * pt.c (resolve_overloaded_unification): New fn.
6088 (try_one_overload): Likewise.
6089 (unify): Don't fail on unknown type.
6090 (type_unification_real): Likewise. Use resolve_overloaded_unification
6091 to handle an overloaded argument.
6092 (template_args_equal): Split out...
6093 (comp_template_args): From here.
6094 (determine_specialization): Also allow a template with more
6095 parms than were explicitly specified.
6096 * cp-tree.h: Add template_args_equal.
6097 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
6099 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
6101 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
6104 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
6106 * typeck.c (unsigned_type): Only return TItype nodes when
6107 HOST_BITS_PER_WIDE_INT is >= 64 bits.
6108 (signed_type): Likewise.
6109 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
6110 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6111 (init_decl_processing): Only create TItype nodes when
6112 HOST_BITS_PER_WIDE_INT is >= 64 bits.
6113 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
6114 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
6116 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6118 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
6119 (gxx.gperf): Update comments describing invocation flags.
6120 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
6122 1998-10-07 Mark Mitchell <mark@markmitchell.com>
6124 * class.c (finish_struct_1): Add commentary on previous change.
6126 * cp-tree.h (vtbl_ptr_type_node): New variable.
6127 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
6128 already of the right type.
6129 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
6130 Simplify code to grow vtable.
6131 * decl.c (vtbl_ptr_type_node): Define.
6132 (init_decl_processing): Initialize it.
6134 1998-10-06 Mark Mitchell <mark@markmitchell.com>
6136 * cp-tree.def (PTRMEM_CST): New tree node.
6137 * cp-tree.h (ptrmem_cst): New type.
6138 (lang_type): Remove local_typedecls.
6139 (dummy): Increase to 12 bits from 11.
6140 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
6141 (PTRMEM_CST_CLASS): New macro.
6142 (PTRMEM_CST_MEMBER): Likewise.
6143 (current_access_specifier): New variable.
6144 (current_class_type): Remove duplicate declaration.
6145 (finish_struct): Change prototype.
6146 (unreverse_member_declarations): New function.
6147 (pushdecl_class_level): Change prototype.
6148 (grok_enum_decls): Remove.
6149 (fixup_anonymous_union): New function.
6150 (grok_x_components): Change prototype.
6151 (tsubst_chain): Remove.
6152 (finish_member_template_decl): Likewise.
6153 (check_explicit_specialization): Fix indentation.
6154 (finish_class_definition): Change prototype.
6155 (finish_member_class_template): Likewise.
6156 (finish_member_declaration): New function.
6157 (check_multiple_declarators): Likewise.
6158 * class.c (class_stack_node_t): New type.
6159 (current_class_base): Remove.
6160 (current_class_stack): Change type.
6161 (current_access_specifier): New variable.
6162 (grow_method): Remove.
6163 (check_member_decl_is_same_in_complete_scope): Break out from
6165 (make_method_vec): New function.
6166 (free_method_vec): Likewise.
6167 (add_implicitly_declared_members): Break out from finish_struct_1.
6168 (free_method_vecs): New variable.
6169 (add_method): Rework for direct use from parser.
6170 (handle_using_decl): Watch for NULL_TREE while iterating through
6171 CLASSTYPE_METHOD_VEC.
6172 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
6173 just do some error-checking.
6174 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
6175 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
6176 (finish_struct): Change prototype. Simplify; fields and methods
6177 are already set up at this point.
6178 (init_class_processing): Set up current_class_stack.
6179 (pushclass): Save current_access_specifier.
6180 (popclass): Restore it.
6181 (currently_open_class): Simplify.
6182 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
6183 * decl.c (saved_scope): Add access_specifier.
6184 (maybe_push_to_top_level): Save it.
6185 (pop_from_top_level): Restore it.
6186 (maybe_process_template_type_declaration): Use
6187 finish_member_declaration.
6188 (pushtag): Likewise.
6189 (pushdecl_class_level): Don't return a value.
6190 (fixup_anonymous_union): Break out from grok_x_components.
6191 (shadow_tag): Use it.
6192 (xref_tag): Complain about using an elaborated type specifier to
6193 reference a template type parameter or typedef name.
6194 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6195 (current_local_enum): Remove.
6196 (build_enumerator): Call finish_member_declaration.
6197 (grok_enum_decls): Remove.
6198 * decl2.c (grok_x_components): Simplify.
6199 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6200 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6201 (merge_functions): Add to comment.
6202 (arg_assoc_type): Prototype.
6203 (arg_assoc): Pass as many arguments as there are parameters.
6204 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
6206 * expr.c (cpls_expand_expr): Remove dead code. Handle
6208 * friend.c (do_friend): Lookup friends when in nested classes.
6210 * init.c (build_offset_ref): Do lookup even for classes that are
6211 only partially defined.
6212 (decl_constant_value): Remove dead code.
6213 * method.c (build_overload_value): Remove hack where by TYPE was
6214 not a TYPE. Handle PTRMEM_CST.
6215 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
6217 * parse.y (components, notype_components, component_decl,
6218 component_decl_1, component_declarator, component_declarator0):
6219 Now all are itype rather than ttype. Rework to add members to
6221 (typesqpecqual_reserved): Use check_multiple_declarators.
6222 (structsp): Update class to finish_class_definition.
6223 (do_xref_defn): Unsplit into named_class_head.
6224 (access_specifier): Set current_access_specifier.
6225 * pt.c (set_current_access_from_decl): New function.
6226 (finish_member_template_decl): Don't take the parameters.
6227 (comp_template_args): Make more robust.
6228 (lookup_template_class): Don't use current_local_enum.
6229 (for_each_template_parm): Handle PTRMEM_CST.
6230 (instantiate_class_template): Use set_current_access_from_decl,
6231 finish_member_declaration and unreverse_member_declarations. Set
6232 lineno/input_filename before generating implicit member functions.
6233 (type_unification_real): Don't assume back-unification happens
6234 only for the last argument.
6235 (regenerate_decl_from_template): Call pushclass a bit earlier.
6236 (tsubst_chain): Remove.
6237 (tsubst_enum): Use set_current_access_from_decl.
6238 (set_mangled_name_for_template_decl): Fix indentation.
6239 * search.c (lookup_fnfields_1): Change iteration through
6240 CLASSTYPE_METHOD_VEC.
6241 (dfs_pushdecls): Likewise.
6242 (dfs_compress_decls): Likewise.
6243 (add_conversions): Likewise.
6244 * semantics.c (finish_class_definition): Don't take components.
6245 Change call to finish_struct.
6246 (finish_member_declaration): New function.
6247 (finish_member_class_template): Don't take template parameters.
6248 Change call to grok_x_components. Call finish_member_template_decl.
6249 (check_multiple_declarators): New function.
6250 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
6251 a passed in fieldlist.
6252 * tree.c (search_tree): Handle PTRMEM_CST.
6254 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
6255 INTEGER_CSTs, for pointer-to-data members.
6257 * call.c (resolve_args): Resolve template specializations, if
6260 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6262 * Makefile.in (spew.o): Depend on toplev.h.
6264 * call.c (compare_ics): Initialize variables `deref_from_type2',
6265 `deref_to_type1' and `deref_to_type2'.
6267 * except.c (get_eh_type): Hide prototype and definition.
6268 (process_start_catch_block_old): Remove unused static prototype.
6270 * pt.c (tsubst_decl): Initialize variable `argvec'.
6272 * spew.c: Include toplev.h.
6274 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
6276 * pt.c (instantiate_decl): Do save and restore file position.
6278 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
6280 * method.c (build_decl_overload_real): Clear
6281 numeric_output_need_bar after __.
6283 1998-10-05 Nathan Sidwell <nathan@acm.org>
6285 * call.c (build_new_method_call): Issue 'incomplete type' error,
6286 if class is not defined.
6288 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6290 * call.c (build_object_call): Move declaration of variable
6291 `fn' into the scope where it is used. Don't access variable
6292 `fn' when it is uninitialized, instead use `fns'.
6294 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6296 * errfn.c (cp_thing): Print buf as a string not as a printf format
6297 to avoid problems with the operator%. Consequently, `%%' sequences
6298 in format are copied as `%' in buf.
6300 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
6302 * pt.c (pop_tinst_level): Call extract_interface_info.
6303 (instantiate_decl): Don't save and restore file position.
6305 * decl.c (cp_finish_decl): Make statics in extern inlines and
6306 templates common, if possible and the target doesn't support weak
6309 * decl.c (grokdeclarator): Remove redundant calls to
6310 build_type_variant and some duplicated code.
6311 * sig.c (build_signature_reference_type): Only take the type parm.
6312 (build_signature_pointer_type): Likewise.
6313 * tree.c (build_cplus_method_type): Adjust.
6314 * cp-tree.h: Update.
6316 1998-10-04 Mark Mitchell <mark@markmitchell.com>
6318 * call.c (build_over_call): Make pedwarns about dropped qualifiers
6319 into full-fledged errors.
6320 * cvt.c (convert_to_reference): Likewise.
6321 * typeck.c (convert_for_assignment): Likewise.
6323 * search.c (expand_upcast_vtables): In addition to unsetting
6324 TREE_READONLY, remove top-level const type qualifier.
6326 1998-10-03 Mark Mitchell <mark@markmitchell.com>
6328 * class.c (current_class_ptr, current_class_ref): Clarify
6330 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
6331 NOP type conversions.
6332 * decl.c (decls_match): Use comptypes directly; ignore
6333 qualifiers on the DECL.
6334 (duplicate_decls): Remove qualifier checks on DECL.
6335 (grokdeclarator): Make the type built up include top-level
6337 * decl2.c (do_dtors): Fix spelling error.
6338 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
6339 when printing type information.
6340 * init.c (build_new_1): Add documentation. Deal with the fact
6341 that type of allocated memory now contains qualifiers.
6342 * lex.c (is_global): Improve error-recovery.
6343 * sig.c (build_member_function_pointer): Don't cast away const
6344 on fields of sigtable_entry_type.
6345 * tree.c (lvalue_type): Don't look at top-level qualifiers on
6347 * typeck.c (decay_conversion): Likewise.
6348 (build_component_ref): Make sure the type of the COMPONENT_REF
6349 contains top-level qualifiers, as appropriate. Improve
6351 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
6352 (build_array_ref): Likewise.
6353 (build_unary_op): Improve error-recovery.
6354 (unary_complex_lvalue): Make taking the address a bound member
6355 function an error, not a sorry.
6356 (build_conditional_expr): Look at the type qualifiers, not the
6357 qualifiers on the expression itself.
6359 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
6361 * decl2.c (merge_functions): Remove duplicates.
6363 * decl2.c: Add -f{no-,}implicit-inline-templates.
6364 (import_export_decl): Check it.
6366 * decl.c (lookup_name_real): Template parms also take precedence
6367 over implicit typename. Only warn if yylex.
6369 * typeck.c (build_conditional_expr): Only fold if ifexp is an
6372 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
6375 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
6377 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
6378 * class.c (build_vbase_pointer): Use it.
6379 * rtti.c (expand_class_desc): Likewise.
6380 * tree.c (build_vbase_pointer_fields): Likewise.
6382 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
6384 * decl.c (start_decl): Add invocation of
6385 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6386 (start_function): Add invocation of
6387 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6389 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
6390 HANDLE_GENERIC_PRAGMAS.
6392 1998-09-28 Anthony Green <green@cygnus.com>
6394 * semantics.c (finish_asm_stmt): Always permit volatile asms.
6396 1998-09-28 Mark Mitchell <mark@markmitchell.com>
6398 * decl.c (grokdeclarator): Tighten checks for invalid
6399 destructors. Improve error-messages and error-recovery.
6400 * decl2.c (check_classfn): Don't assume that mangled destructor
6401 names contain type information.
6403 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
6405 * search.c (get_base_distance): Remove assert.
6407 * decl2.c (build_anon_union_vars): Don't process a field with no
6409 (finish_anon_union): Also complain about local anon unions with no
6412 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
6414 * decl.c (lookup_namespace_name): If the name is a namespace,
6415 return it immediately.
6417 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6419 * cp-tree.h (define_case_label): Remove unused parameter.
6420 (check_java_method): Likewise.
6421 (grokclassfn): Likewise.
6422 (expand_aggr_init): Likewise.
6423 (build_x_delete): Likewise.
6424 (maybe_end_member_template_processing): Likewise.
6425 (unshare_base_binfos): Add prototype.
6426 (string_conv_p): Likewise.
6427 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
6429 * cvt.c (build_up_reference): Remove unused parameter
6430 `checkconst', all callers changed.
6431 (build_type_conversion): Mark parameter `code' with
6433 (build_expr_type_conversion): Initialize variable `conv'.
6435 * decl.c (push_namespace): Initialize variable `d'.
6436 (define_case_label): Remove unused parameter `decl', all callers
6439 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
6440 `argc' with ATTRIBUTE_UNUSED.
6441 (grokclassfn): Remove unused parameter `cname', all callers
6443 (check_java_method): Likewise for parameter `ctype'.
6444 (copy_assignment_arg_p): Mark parameter `virtualp' with
6446 (finish_prevtable_vardecl): Likewise for parameter `prev'.
6448 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
6450 * init.c (expand_aggr_init_1): Remove unused parameter
6451 `alias_this', all callers changed.
6452 (expand_aggr_init): Likewise.
6453 (expand_default_init): Likewise.
6454 (build_new_1): Initialize variable `susp'.
6455 (build_x_delete): Remove unused parameter `type', all callers
6458 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
6460 (readescape): Use (unsigned) value in shift.
6461 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
6462 comparing to a signed quantity.
6464 * pt.c (maybe_end_member_template_processing): Remove unused
6465 parameter `decl', all callers changed.
6466 (check_explicit_specialization): Add braces around empty body in
6468 (current_template_args): Initialize variable `args'.
6469 (lookup_template_class): Likewise for variable `prev_local_enum'.
6470 (tsubst_decl): Likewise for variable `r'.
6471 (set_mangled_name_for_template_decl): Initialize variable
6474 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
6475 Likewise for variable `i'.
6476 (yylex): Initialize variable `trrr'.
6478 * typeck.c (compparms): Mark variable `strict' with
6481 * xref.c (simplify_type): Cast argument of ctype function to
6484 1998-09-24 Mark Mitchell <mark@markmitchell.com>
6486 * cp-tree.h (language_lvalue_valid): Remove.
6487 * decl.c (grokdeclarator): Don't disallow references to functions.
6488 * tree.c (lvalue_p_1): New function, combining duplicated
6491 (real_lvalue_p): Likewise.
6492 * typeck.c (language_lvalue_valid): Remove.
6493 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
6494 they don't have TREE_READONLY set.
6495 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
6497 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
6499 * spew.c (yylex): Give diagnostic.
6500 * hash.h (is_reserved_word): Add export.
6501 * gxx.gperf: Likewise.
6502 * lex.h (rid): Add RID_EXPORT.
6503 * lex.c (init_parse): Likewise.
6505 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
6507 * friend.c (do_friend): Make warning a full sentence.
6509 1998-09-22 Mark Mitchell <mark@markmitchell.com>
6511 * parse.y (component_decl_list): Improve error-recovery.
6513 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
6515 * decl.c (make_typename_type): Move error to point where name
6516 variable can be used by dump_type.
6518 1998-09-22 Mark Mitchell <mark@markmitchell.com>
6520 * decl.c (grokfndecl): Improve error-recovery.
6521 * decl2.c (grokfield): Likewise.
6522 * pt.c (finish_member_template_decl): Likewise.
6524 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
6526 * method.c (hack_identifier): Finding multiple members is always
6529 1998-09-21 Per Bothner <bothner@cygnus.com>
6531 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
6533 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
6535 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
6537 1998-09-20 Mark Mitchell <mark@markmitchell.com>
6539 * class.c (maybe_warn_about_overly_private_class): Reformat.
6541 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
6543 * exception.cc (__cplus_type_matcher): Realign some code.
6545 1998-09-16 Mark Mitchell <mark@markmitchell.com>
6547 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
6548 (tinfo2.o): Likewise.
6549 (exception.o): Likewise.
6551 (opnew.o): Likewise.
6552 (opnewnt.o): Likewise.
6553 (opvnew.o): Likewise.
6554 (opvnewnt.o): Likewise.
6555 (opdel.o): Likewise.
6556 (opdelnt.o): Likewise.
6557 (opvdel.o): Likewise.
6558 (opvdelnt.o): Likewise.
6560 1998-09-16 Richard Henderson <rth@cygnus.com>
6562 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
6564 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
6566 * call.c (build_field_call): Handle static data members too.
6568 * typeck.c (comptypes): When comparing pointer types, check
6569 whether referred types match even in strictest modes.
6571 1998-09-15 Mark Mitchell <mark@markmitchell.com>
6573 * cp-tree.h: Revert previous change.
6574 (finish_struct_methods): Remove declaration.
6575 * class.c: Revert previous change.
6576 (maybe_warn_about_overly_private_class): New function.
6577 (finish_struct_methods): Declare here, and make static. Remove
6578 unnecessary parameters. Tidy slightly. Use
6579 maybe_warn_about_overly_private_class.
6580 (finish_struct_1): Adjust. Remove check for private constructors,
6582 (finish_struct): Adjust.
6584 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
6586 * except.c (expand_start_catch_block): No need to check for new
6588 (process_start_catch_block_old): Deleted.
6589 (process_start_catch_block): Add call to start_decl_1().
6590 (expand_end_catch_block): Add call to end_catch_handler().
6591 * exception.cc (__cplus_type_matcher): Only check the exception
6592 language if there is an exception table.
6594 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
6596 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
6597 as used to prevent conflicts with virtual function tables.
6599 1998-09-14 Mark Mitchell <mark@markmitchell.com>
6601 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
6602 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
6603 * class.c (maybe_class_too_private_p): New function.
6604 (finish_struct_methods): Use it.
6605 (finish_struct_1): Likewise.
6606 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
6609 * pt.c (check_specialization_scope): Fix spelling error.
6610 (check_explicit_specialization): Remove code to handle explicit
6611 specializations in class scope; they are now correctly diagnosed
6614 1998-09-10 Mark Mitchell <mark@markmitchell.com>
6616 * decl.c (pushdecl): Don't copy types if the
6617 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
6620 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6622 * class.c (get_enclosing_class): New function.
6623 (is_base_of_enclosing_class): Likewise.
6624 * cp-tree.h (get_enclosing_class): Declare.
6625 (is_base_of_enclosing_class): Likewise.
6626 * pt.c (coerce_template_parms): Use them.
6628 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
6630 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
6631 null to decide whether to use it.
6633 * error.c (dump_type_real): Handle NAMESPACE_DECL.
6634 * parse.y (base_class.1): Avoid crash on error.
6636 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
6638 * decl.c (make_typename_type): If context is a namespace, the code
6641 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
6643 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
6645 1998-09-08 Mark Mitchell <mark@markmitchell.com>
6647 * cp-tree.h (anonymous_namespace_name): Declare.
6648 * decl.c: Define it.
6649 (push_namespace): Use anonymous_namespace_name, rather than local
6651 * error.c (dump_decl): If a namespace is named
6652 anonymous_namespace_name, call it {anonymous}.
6654 * decl.c (grokparms): Distinguish between references and pointers
6657 1998-09-08 Richard Henderson <rth@cygnus.com>
6658 Mark Mitchell <mark@markmitchell.com>
6660 * pt.c (process_partial_specialization): Consistently allocate
6661 and zero tpd.parms based on ntparms. Use tpd2.parms, not
6662 tpd.parms, where appropriate.
6664 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
6666 * Makefile.in (INCLUDES): Update after recent toplevel gcc
6669 1998-09-05 Mark Mitchell <mark@markmitchell.com>
6671 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
6672 * class.c (finish_struct): Remove hackery to deal with explicit
6673 specializations in class scope.
6674 * decl.c (grokfndecl): Improve error-recovery.
6675 * decl2.c (grokfield): Likewise.
6676 * pt.c (check_specialization_scope): New function.
6677 (begin_specialization): Call it.
6678 (process_partial_specialization): New function, split out from
6679 push_template_decl. Check partial specializations more
6681 (push_template_decl): Call it.
6682 (check_explicit_specialization): Don't attempt to handle explicit
6683 specializations in class scope.
6684 (template_parm_data): Document. Add current_arg and
6685 arg_uses_template_parms.
6686 (mark_template_parm): Set it.
6687 (tsubst_arg_types): Remove unused variable.
6688 * semantics.c (begin_class_definition): Tweak.
6690 1998-09-04 Mark Mitchell <mark@markmitchell.com>
6692 * inc/typeinfo (type_info::type_info(const char*)): Make
6695 * cp-tree.h (hash_tree_cons_simple): New macro.
6696 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
6697 (coerce_template_parms): Use make_temp_vec, instead of
6698 make_tree_vec. Document this behavior.
6699 (lookup_template_class): Likewise.
6700 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
6701 Remove dead code (and add assertion to check its deadness). Fix
6702 bug w.r.t. exception specifications.
6704 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
6706 * decl2.c (import_export_vtable): Always make artificials comdat.
6707 (import_export_decl): Likewise.
6708 * pt.c (mark_decl_instantiated): Likewise.
6710 1998-09-03 Mark Mitchell <mark@markmitchell.com>
6712 * cp-tree.h (finish_globally_qualified_member_call_expr):
6714 (finish_qualified_call_expr).
6715 * semantics.c: Likewise.
6716 * parse.y (primary): Use it.
6717 * method.c (hack_identifier): Remove redundant code.
6719 * init.c (resolve_offset_ref): Call convert_from_reference to
6720 handle members of reference type. Improve error recovery.
6722 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
6724 * cp-tree.h: Declare warn_nontemplate_friend.
6725 * decl2.c (lang_decode_option): Set.
6726 * lang-options.h: Add -Wnon-template-friend.
6727 * friend.c (do_friend): Use to toggle non-template function warning.
6729 1998-09-03 Mark Mitchell <mark@markmitchell.com>
6731 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
6732 corresponding INTEGER_CSTs when processing_template_decl.
6733 * pt.c (tsubst_enum): Tweak accordingly.
6735 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6737 * decl.c (pushdecl_class_level): Add warning here.
6740 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
6742 * cvt.c (convert_pointer_to_real): Tidy.
6743 * search.c (get_base_distance_recursive): Simplify.
6744 (get_base_distance): Likewise.
6746 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
6749 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
6751 * lex.c (check_newline): Call HANDLE_PRAGMA before
6752 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
6753 if unknown pragmas are encountered.
6754 (handle_sysv_pragma): Interpret return code from
6755 handle_pragma_token (). Return success/failure indication rather
6756 than next unprocessed character.
6757 (pragma_getc): New function: retrieves characters from the
6758 input stream. Defined when HANDLE_PRAGMA is defined.
6759 (pragma_ungetc): New function: replaces characters back into the
6760 input stream. Defined when HANDLE_PRAGMA is defined.
6762 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
6764 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
6765 * class.c (build_vtable_entry_ref): Likewise.
6767 1998-09-01 Mark Mitchell <mark@markmitchell.com>
6769 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
6770 * decl2.c (import_export_decl): Likewise.
6771 * pt.c (instantiate_decl): Use it.
6773 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
6775 * decl.c (lookup_name_real): Also do implicit typename thing for
6776 artificial TYPE_DECLs.
6777 * search.c (lookup_field): Likewise.
6778 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
6779 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
6780 (enter_scope_of): Extract type from implicit typename.
6781 (begin_class_definition): Likewise.
6782 * lex.c (identifier_type): Handle implicit typename when checking
6785 * cp-tree.h: Declare flag_strict_prototype.
6786 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
6788 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
6789 specified, set it to the value of pedantic.
6791 1998-09-01 Mark Mitchell <mark@markmitchell.com>
6793 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
6795 1998-08-31 Mark Mitchell <mark@markmitchell.com>
6797 * decl.c (finish_enum): Handle member enums of classes declared in
6800 * decl2.c (grok_x_components): Strip attributes before calling
6803 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
6805 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
6806 -fenum-int-equivalence and -fno-nonnull-objects.
6807 * class.c (check_for_override): Remove support for -fall-virtual.
6808 (finish_struct_1): Likewise.
6809 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
6810 * typeck.c (build_binary_op_nodefault): Likewise.
6811 * cvt.c (ocp_convert): Likewise.
6812 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
6813 * class.c (build_vbase_path): Likewise.
6815 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
6817 * Makefile.in (INTERFACE): New, set to 1.
6819 1998-08-30 Mark Mitchell <mark@markmitchell.com>
6821 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
6822 comparing with global_namespace.
6823 (dump_aggr_type): Likewise.
6825 * decl.c (grokfndecl): Issue error on declaration of friend
6826 templates with explicit template arguments.
6828 * pt.c (convert_template_argument): New function, split out
6830 (coerce_template_parms): Here.
6831 (tsubst): Attempt better error-recovery.
6833 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
6835 * pt.c (decl_template_parm_p): Add checks for
6836 TEMPLATE_TEMPLATE_PARM.
6838 1998-08-28 Mark Mitchell <mark@markmitchell.com>
6840 * lex.c (do_identifier): Fix thinko in previous change.
6842 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
6844 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
6845 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
6847 1998-08-28 Richard Henderson <rth@cygnus.com>
6849 Add support for discarding unused virtual functions.
6850 * lang-options.h: Add -fvtable-gc.
6851 * cp-tree.h: Add flag_vtable_gc.
6852 * decl2.c (output_vtable_inherit): New fn.
6853 (finish_vtable_vardecl): Call it.
6854 * class.c (build_vtable_entry_ref): New fn.
6855 (build_vtbl_ref): Call it.
6857 1998-08-28 Mark Mitchell <mark@markmitchell.com>
6859 * cp-tree.h (build_enumerator): Take the enumeration type as a
6861 * decl.c (finish_enum): Don't set the TREE_TYPE for the
6862 enumeration constant values if we're processing_template_decls.
6863 Don't set the type for the CONST_DECLs either; that's done in
6865 (build_enumerator): Take the enumeration type as a
6867 * lex.c (do_identifier): Don't resolve enumeration constants while
6868 processing template declarations, even if they happen to be
6869 TEMPLATE_PARM_INDEXs.
6871 * parse.y (current_enum_type): New variable.
6872 (primary): Don't allow statement-expression in local classes just
6873 as we don't in global classes.
6874 (structsp): Use current_enum_type.
6875 (enum_list): Likewise.
6876 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
6877 finish_enum; they no longer occur.
6879 * cp-tree.h (finish_base_specifier): New function.
6880 * parse.y (base_class): Use it.
6881 * semantics.c (finish_base_specifier): Define it.
6883 * parse.y (structsp): Warn on use of typename outside of template
6886 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
6888 * lex.c (handle_cp_pragma): Remove #pragma vtable.
6889 * lang-options.h: Remove +e options.
6890 * decl2.c (lang_decode_option): Likewise.
6891 (import_export_vtable): Don't check write_virtuals.
6892 (finish_vtable_vardecl, finish_file): Likewise.
6893 * search.c (dfs_debug_mark): Likewise.
6894 * semantics.c (begin_class_definition): Likewise.
6895 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
6897 * call.c (build_over_call): Check flag_elide_constructors.
6898 * decl2.c: flag_elide_constructors defaults to 1.
6899 * typeck.c (convert_arguments): Remove return_loc parm.
6900 (build_function_call_real): Adjust.
6902 * search.c: Tear out all mi_matrix and memoize code.
6903 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
6904 * lang-options.h: Remove documentation for -fhandle-exceptions,
6905 -fmemoize-lookups and -fsave-memoized.
6906 * cp-tree.h: Lose mi_matrix and memoize support.
6907 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
6908 * class.c: Lose struct class_level.
6909 (pushclass, popclass): Lose memoize support.
6910 * init.c (build_offset_ref): Likewise.
6912 Never change BINFO_INHERITANCE_CHAIN.
6913 * init.c (emit_base_init): Change modification of
6914 BINFO_INHERITANCE_CHAIN to an assert.
6915 * search.c (get_base_distance_recursive): Likewise.
6916 (get_base_distance): Likewise.
6917 (lookup_member): Likewise.
6918 (convert_pointer_to_single_level): Likewise.
6919 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
6920 (lookup_fnfields): Likewise.
6921 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
6922 (unshare_base_binfos): Don't call propagate_binfo_offsets.
6923 (layout_basetypes): Call propagate_binfo_offsets instead of
6924 unshare_base_binfos.
6925 * decl.c (xref_basetypes): Call unshare_base_binfos.
6926 * pt.c (instantiate_class_template): Likewise.
6927 * tree.c (reverse_path): Remove 'copy' parm; always make a
6929 * class.c (build_vbase_path): Just call it.
6930 * search.c (compute_access): Likewise. Don't re-reverse.
6932 1998-08-27 Mark Mitchell <mark@markmitchell.com>
6934 * class.c (build_vbase_path): Use reverse_path.
6935 (finish_base_struct): Move warnings for inaccessible bases to
6937 (modify_one_vtable): Remove check of TREE_USED (binfo).
6938 (fixup_vtable_deltas1): Likewise.
6939 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
6940 (xref_tag): Remove binfos parameter.
6941 (make_binfo): Remove chain parameter.
6942 (reverse_path): Add copy parameter.
6943 * decl.c (init_decl_processing): Change calls to xref_tag.
6944 (xref_tag): Remove binfos parameter.
6945 (xref_basetypes): Change calls to make_binfo.
6946 * decl2.c (grok_x_components): Change calls to xref_tag.
6947 (handle_class_head): Likewise.
6948 * friend.c (do_friend): Likewise.
6949 * lex.c (make_lang_type): Change calls to make_binfo.
6950 * parse.y (structsp): Change calls to xref_tag.
6951 (named_complex_class_head_sans_basetype): Likewise.
6952 (named_class_head): Likewise.
6953 * rtti.c (init_rtti_processing): Likewise.
6954 * search.c (compute_access): Change calls to reverse_path.
6955 (dfs_get_vbase_types): Change calls to make_binfo.
6956 (get_vbase_types): Remove dead code.
6957 * tree.c (unshare_base_binfos): Change calls to make_binfo.
6958 (layout_basetypes): Warn here about inaccessible bases.
6959 (make_binfo): Remove chain parameter.
6960 (reverse_path): Add copy parameter.
6962 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
6964 * class.c: #if 0 complete_type_p.
6965 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
6966 * method.c (process_overload_item): Likewise.
6967 * typeck.c (comp_target_types): Likewise.
6969 Stop sharing binfos for indirect virtual bases.
6970 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
6971 (layout_basetypes): Likewise.
6972 (unshare_base_binfos): Copy vbases, too.
6973 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
6974 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
6975 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
6976 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
6977 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
6978 reference to BINFO_VIA_PUBLIC.
6979 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
6980 (push_class_decls): Use them.
6981 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
6982 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
6984 1998-08-27 Mark Mitchell <mark@markmitchell.com>
6986 * decl.c (build_enumerator): Set DECL_CONTEXT for the
6989 1998-08-26 Mark Mitchell <mark@markmitchell.com>
6991 * cp-tree.h (finish_enum): Change prototype.
6992 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
6993 VALUES parameter. Don't try to compute mins/maxs if
6994 processing_template_decl.
6995 * parse.y (structsp): Use new calling sequence for finish_enum.
6996 * pt.c (tsubst_enum): Likewise. Take the new type as input.
6997 (lookup_template_class): Remove unused variables. Tweak.
6998 Register enums on instantiation list before substituting
6999 enumeration constants.
7000 (tsubst_decl): Remove unused variables.
7001 (regenerate_decl_from_template): Likewise.
7003 * decl.c (duplicate_decls): Don't obliterate the
7004 DECL_TEMPLATE_INFO for a template if we're not replacing it with
7007 * lex.c (do_identifier): Fix typo in comment.
7009 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7011 * errfn.c: Remove stdarg.h/varargs.h.
7014 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
7016 * pt.c (tsubst_copy): Only do typename overloading on an
7017 IDENTIFIER_NODE that happens to look like a typename if it actually
7018 has a type for us to use.
7020 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
7022 * typeck.c (comp_cv_target_types): Split out...
7023 (comp_target_types): From here. Don't allow cv-qual changes under
7024 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
7025 (build_ptrmemfunc): Pass 1 to nptrs.
7026 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
7028 1998-08-25 Mark Mitchell <mark@markmitchell.com>
7030 * search.c (dependent_base_p): Don't compare a binfo to
7031 current_class_type; use the TREE_TYPE of the binfo instead.
7033 * cp-tree.h (CLASS_TYPE_P): Revise definition.
7035 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
7037 * decl.c (duplicate_decls): Don't complain about different
7038 exceptions from an internal decl even if pedantic.
7040 * typeck.c (convert_for_assignment): Converting from pm of vbase
7041 to derived is an error, not a sorry.
7043 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
7044 * class.c (fixed_type_or_null): Rename from
7045 resolves_to_fixed_type_p. Return the dynamic type of the
7046 expression, if fixed, or null.
7047 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
7048 does not match the static type.
7049 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
7050 resolves_to_fixed_type_p again.
7052 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7054 * pt.c (tsubst_decl): Move special case code for dealing with
7055 tricky friend templates here from ...
7056 (regenerate_decl_from_template): Here.
7058 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7060 * decl.c (start_decl): Remove redundant linkage check.
7062 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
7064 * typeck.c (c_expand_return): Handle the case that valtype
7065 is wider than the functions return type.
7067 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7069 * cp-tree.h (CLASS_TYPE_P): New macro.
7070 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
7071 * pt.c (process_template_parm): Undo previous change.
7073 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
7075 * cp-tree.h: Declare.
7076 * pt.c (decl_template_parm_p): New function.
7077 * decl.c (pushdecl): Check decls for redeclaring template parms.
7078 (xref_tag): Make redeclaration an error, print decl.
7079 * decl2.c (grokfield): Check field_decls for redeclaration as well.
7081 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7083 * parse.y (primary): Fix up the type of string constants.
7085 1998-08-24 Mark Mitchell <mark@markmitchell.com>
7087 * typeck.c (convert_for_initialization): Move check for odd uses
7088 of NULL to avoid duplicate warnings.
7090 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
7092 * tree.c (lvalue_type): Fix for arrays.
7093 * typeck.c (string_conv_p): New fn.
7094 (convert_for_assignment): Use it.
7095 (build_unary_op): Use lvalue_type.
7096 * call.c (standard_conversion, convert_like): Use string_conv_p.
7097 (add_function_candidate): Use lvalue_type.
7098 * cvt.c (convert_to_reference): Likewise.
7099 * decl2.c (lang_decode_option): Ignore -traditional.
7100 * decl.c (init_decl_processing): flag_writable_strings inhibits
7103 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
7105 * lang-options.h (lang_options): Add fconst-strings to the list
7107 * decl2.c (lang_f_options, lang_decode_option): Likewise.
7109 1998-08-24 Nathan Sidwell <nathan@acm.org>
7111 * lex.c (real_yylex): Don't warn about long long constants if
7112 we're allowing long long.
7114 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7116 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
7117 accessing bindings directly.
7119 * search.c (my_tree_cons): Reimplement.
7121 * lang-specs.h: Remove __HONOR_STD.
7122 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
7124 1998-08-23 Mark Mitchell <mark@markmitchell.com>
7126 * decl.c (grokdeclarator): Complain about in-class initialization
7127 of aggregates and/or references.
7128 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
7129 TEMPLATE_TYPE_PARMs.
7131 * decl2.c (grok_array_decl): Add comment.
7132 (mark_used): Don't instantiate an explicit instantiation.
7133 * friend.c (make_friend_class): Remove bogus comment. Fix check
7134 for partial specializations.
7135 * pt.c (check_explicit_specialization): Don't
7136 SET_DECL_EXPLICIT_INSTANTIATION here.
7137 (mark_decl_instantiated): Or here.
7138 (do_decl_instantiation): Do it here, instead. Add checks for
7139 duplicate explicit instantiations, etc. Tidy.
7140 (do_type_instantiation): Likewise.
7141 (instantiate_decl): Improve comments. Complain about explicit
7142 instantiations where no definition is available.
7144 * cp-tree.h (ansi_null_node): Remove.
7145 * call.c (build_over_call): Warn about converting NULL to an
7147 * cvt.c (build_expr_type_conversion): Likewise. Use
7148 null_ptr_cst_p instead of expanding it inline.
7149 * decl.c (ansi_null_node): Remove.
7150 (init_decl_processing): Make null_node always have integral type.
7151 * except.c (build_throw): Warn about converting NULL to an
7153 * lex.c (init_parse): Remove handling of ansi_null_node.
7154 * pt.c (type_unification_real): Don't convert NULL to void* type.
7155 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
7156 (convert_for_assignment): Warn about converting NULL to an
7158 (convert_for_initialization): Likewise.
7160 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
7162 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
7163 * pt.c (coerce_template_parms): Use no_linkage_check.
7164 * decl.c (grokvardecl): Likewise.
7165 (grokfndecl): Likewise. Members of anonymous types have no linkage.
7167 * method.c (process_overload_item): Remove useless code.
7169 1998-08-20 Per Bothner <bothner@cygnus.com>
7171 Handle new'ing of Java classes.
7172 * init.c (build_class_classref): New function.
7173 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
7174 constructor does not return this; don't need to exception-protect.
7176 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
7177 * decl2.c (acceptable_java_type): Handle template-derived types.
7179 1998-08-20 Per Bothner <bothner@cygnus.com>
7181 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
7183 1998-08-20 Mark Mitchell <mark@markmitchell.com>
7185 * decl.c (duplicate_decls): Always merge the old and new patterns
7186 for templates, regardless of whether or not the new one has
7187 DECL_INITIAL. Don't throw away specializations. Merge
7189 * pt.c (tsubst_decl): Use the right pattern when calculating the
7190 complete args for a new template instance.
7191 (do_decl_instantiation): Fix typo in comment.
7192 (regenerate_decl_from_template): Deal with tricky friend template
7194 (instantiate_decl): Likewise.
7196 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
7198 * init.c (build_builtin_delete_call): Add missing assemble_external
7201 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
7203 * parse.y (notype_unqualified_id): Also accept ~A<int>.
7205 1998-08-19 Mark Mitchell <mark@markmitchell.com>
7207 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7209 * except.c (build_throw): Warn when NULL is thrown, even with
7210 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
7213 * cp-tree.h (ansi_null_node): New variable.
7214 * decl.c (ansi_null_node): New variable.
7215 (init_decl_processing): Initialize its type.
7216 * lex.c (init_parse): Initialize its value. Use ansi_null_node
7217 for null_node in non-ANSI mode.
7218 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
7219 place of null_node to avoid spurious errors.
7221 1998-08-17 Mark Mitchell <mark@markmitchell.com>
7223 * cp-tree.h (enter_scope_of): New function.
7224 * parse.y (complex_direct_notype_declarator): Use it.
7225 * semantics.c (enter_scope_of): New function.
7227 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
7229 * decl.c (grokparms): No, here.
7231 * decl.c (grokdeclarator): Catch parm with pointer to array of
7232 unknown bound here...
7233 * method.c (process_overload_item): ...not here.
7235 * gxxint.texi: Remove obsolete documentation of overloading code.
7237 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
7238 * class.c (finish_struct_bits): Likewise.
7240 * tree.c (lvalue_type): Fix for arrays.
7241 * typeck.c (build_unary_op): Use lvalue_type.
7242 * call.c (add_function_candidate): Likewise.
7243 * cvt.c (convert_to_reference): Likewise.
7245 * decl2.c (lang_decode_option): Ignore -traditional.
7247 * init.c (build_offset_ref): Don't mess with error_mark_node.
7248 * lex.c (do_scoped_id): Use cp_error.
7250 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
7252 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
7254 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
7256 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
7258 * cp-tree.h (set_identifier_local_value): Provide prototype.
7260 * decl2.c (do_namespace_alias): Remove unused variables `binding'
7263 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
7265 * Makefile.in: Rename BBISON to BISON so that it can be properly
7266 inherited from the parent makefile.
7268 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
7270 * lang-options.h: Add -finit-priority.
7271 * decl2.c: Likewise. Check flag_init_priority instead of
7274 * decl2.c (setup_initp): New fn.
7275 (start_objects, finish_objects, do_ctors): Handle init_priority.
7276 (do_dtors, finish_file): Likewise.
7278 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
7280 * pt.c (tsubst_copy): Hush warning.
7282 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
7284 1998-08-12 Mark Mitchell <mark@markmitchell.com>
7286 * pt.c (print_template_context): Don't abort when instantiating a
7289 * decl.c (grokdeclarator): Issue errors on namespace qualified
7290 declarators in parameter lists or in class scope.
7292 1998-08-09 Mark Mitchell <mark@markmitchell.com>
7294 * pt.c (check_explicit_specialization): Don't abort on bogus
7295 explicit instantiations.
7297 1998-08-07 Mark Mitchell <mark@markmitchell.com>
7299 * typeck.c (require_complete_type): Use complete_type_or_else.
7300 (complete_type_or_else): Always return NULL_TREE on failure, as
7303 * pt.c (tsubst_aggr_type): Prototype.
7304 (tsubst_decl): New function, split out from tsubst. Set
7305 input_filename and lineno as appropriate.
7306 (pop_tinst_level): Restore the file and line number saved in
7308 (instantiate_class_template): Set input_filename and lineno as
7310 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
7311 context for a TYPENAME_TYPE is complete.
7313 * decl2.c (grokbitfield): Issue errors on bitfields declared with
7315 (do_dtors): As in do_ctors, pretend to be a member of the same
7316 class as a static data member while generating a call to its
7319 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
7320 conversions, even in complex virtual base class hierarchies.
7322 1998-08-06 Mark Mitchell <mark@markmitchell.com>
7324 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
7325 (TYPE_TEMPLATE_INFO): Likewise.
7326 (SET_TYPE_TEMPLATE_INFO): Likewise.
7327 (ENUM_TI_TEMPLATE): Likewise.
7328 (ENUM_TI_ARGS): Likewise.
7329 (lookup_nested_type_by_name): Remove.
7330 * decl.c (maybe_process_template_type_declaration): Handle enums.
7331 (start_enum): Don't check for primary-template enum declarations
7333 (finish_enum): Clean up, document. Make sure template enum
7334 constants get the correct type.
7335 (build_enumerator): Copy initializers for template enumerations,
7337 (grok_enum_decls): Document.
7338 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
7339 better. Build LOOKUP_EXPRs for local variables, even if they are
7341 * pt.c (tsubst_enum): Remove field_chain parameter.
7342 (template_class_depth): Include the depth of surrounding function
7344 (push_template_decl): Check for primary-template enum declarations
7345 here. Deal with enumeration templates.
7346 (lookup_template_class): Likewise.
7347 (for_each_template_parm): Likewise.
7348 (instantiate_class_template): Don't call tsubst_enum directly,
7349 call tsubst instead, to instantiate enums. Deal with all
7350 field_chain issues here, not in tsubst_enum.
7351 (lookup_nested_type_by_name): Remove.
7352 (tsubst_aggr_type): Revise handling of enumeration types.
7354 (tsubst_copy): Likewise.
7355 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
7357 1998-08-04 Mark Mitchell <mark@markmitchell.com>
7359 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
7360 uses template parameters.
7361 * method.c (build_template_parm_names): Use the full set of
7362 template arguments for tsubst'ing.
7363 (build_overload_identifier): Pass the full set of template
7364 arguments to build_template_parm_names, not just the
7366 * pt.c (TMPL_ARGS_DEPTH): Define using
7367 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
7368 (NUM_TMPL_ARGS): New macro.
7369 (add_outermost_template_args): Deal with the case where the outer
7370 args will be completely discarded.
7371 (coerce_template_parms): Use the full set of template arguments
7372 for tsubst'ing. Simplify. Add some asserts. Improve
7374 (lookup_template_class): Pass the full set of template arguments
7375 to coerce_template_parms.
7376 (tsubst): Add assertion.
7377 (do_type_instantiation): Don't instantiate member template
7380 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
7381 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
7383 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
7385 * method.c (set_mangled_name_for_decl): Change return type to void.
7387 * decl.c (lookup_name_real): A namespace-level decl takes priority
7388 over implicit typename. Avoid doing the same lookup twice.
7390 * search.c (dependent_base_p): New fn.
7391 (dfs_pushdecls, dfs_compress_decls): Use it.
7393 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
7394 virtual functions if the type doesn't have any.
7396 1998-08-03 Mark Mitchell <mark@markmitchell.com>
7398 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
7399 uses template parameters.
7401 1998-08-02 Mark Mitchell <mark@markmitchell.com>
7403 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
7404 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
7405 * lex.c (do_identifier): Don't use a second argument, or a type,
7406 when building LOOKUP_EXPRs.
7407 (do_identifier): Likewise.
7408 (do_scoped_id): Likewise.
7409 * method.c (hack_identifier): Improve error message.
7410 * pt.c (lookup_template_function): Don't needlessly call
7411 copy_to_permanent or build_min.
7412 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
7414 (do_decl_instantiation): Improve error message.
7415 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
7416 (build_min): Copy the type to the permanent obstack, too.
7418 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
7420 * init.c (init_init_processing): Remove BI* handling.
7421 (build_builtin_call): Remove.
7422 (build_builtin_delete_call): New fn.
7423 (build_delete): Use it.
7425 1998-07-31 Mark Mitchell <mark@markmitchell.com>
7427 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
7428 (maybe_check_template_type): New function.
7429 * decl.c (maybe_process_template_type_declaration): New function,
7430 split out from pushtag Call maybe_check_template_type.
7431 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
7432 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7433 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7434 * pt.c (template_class_depth_real): Generalization of ...
7435 (template_class_depth): Use it.
7436 (register_specialization): Use duplicate_decls for duplicate
7437 declarations of specializations.
7438 (maybe_check_template_type): New function.
7439 (push_template_decl_real): Fix comment.
7440 (convert_nontype_argument): Likewise.
7441 (lookup_template_class): Likewise. Avoid an infinite loop on
7443 (tsubst_friend_function): Fix comment.
7444 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
7446 * semantics.c (begin_function_definition): Use
7447 reset_specialization to note that template headers don't apply
7448 directly to declarations after the opening curly for a function.
7450 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
7452 * decl.c (push_overloaded_decl): Use current_namespace instead of
7453 DECL_CONTEXT (decl) to determine where we go.
7455 * decl.c (lookup_name_real): Fix typo.
7457 1998-07-28 Mark Mitchell <mark@markmitchell.com>
7459 * friend.c (is_friend): Be lenient with member functions to deal
7460 with nested friends.
7462 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
7464 * class.c (finish_struct_1): Convert integer_zero_node to
7465 ssizetype before passing it to set_rtti_entry.
7466 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
7467 of any size to a pointer.
7469 1998-07-27 Mark Mitchell <mark@markmitchell.com>
7471 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
7472 (build_template_decl_overload): Remove.
7473 (set_mangled_name_for_decl): New function.
7474 (innermost_args): Remove is_spec parameter.
7475 (most_specialized, most_specialized_class): Remove declarations.
7476 (lookup_template_class): Add entering_scope parameter.
7477 (maybe_process_partial_specialization): New function.
7478 (finish_template_decl): Likewise.
7479 (finish_template_type): Likewise.
7480 * class.c (finish_struct): Clean up processing of member template
7482 * decl.c (pushtag): Fix formatting.
7483 (lookup_tag): Improve handling of pseudo-global levels.
7484 (make_typename_type): Adjust call to lookup_template_class.
7485 (shadow_tag): Use maybe_process_partial_specialization.
7486 (xref_tag): Improve handling of member friends.
7487 (start_function): Call push_nested_class before
7488 push_template_decl. Don't call push_template_decl for
7490 * decl2.c (grok_x_components): Don't call xref_tag for
7491 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
7492 (grokclassfn): Use set_mangled_name_for_decl.
7493 (arg_assoc_class): Adjust call to innermost_args.
7494 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
7495 * error.c (dump_function_name): Improve printing of template
7497 * friend.c (is_friend): Don't compare types of decls to determine
7498 friendship, unless flag_guiding_decls.
7499 (make_friend_class): Partial specializations cannot be friends.
7500 (do_friend): Use set_mangled_name_for_decl. Call
7501 push_template_decl_real instead of push_template_decl.
7502 * method.c (build_decl_overload_real): Remove prototype. Give it
7504 (build_overload_identififer): Adjust call to innermost_args.
7505 (build_template_decl_overload): Remove.
7506 (set_mangled_name_for_decl): New function.
7507 * parse.y (.finish_template_type): New non-terminal.
7508 (template_def): Use finish_template_decl. Use template_extdef
7510 (template_extdef, template_datadef): New non-terminals, containing
7511 only those rules for things which can be templates.
7513 (template_type, self_template_type): Use .finish_template_type.
7514 (named_class_head): Use maybe_process_partial_specialization.
7515 * pt.c (mangle_class_name_for_template): Remove context parameter.
7516 (get_class_bindings): Remove outer_args parameter.
7517 (complete_template_args): Remove.
7518 (add_outermost_template_args): New function.
7519 (register_specialization): Return the specialization.
7520 (unregister_specialization): New function.
7521 (tsubst_template_parms): Likewise.
7522 (most_specialized, most_specialized_class): Prototype here as
7524 (original_template): Rename to most_general_template.
7525 (tsubst_template_parms): New function.
7526 (set_mangled_name_for_template_decl): Likewise.
7527 (TMPL_ARGS_DEPTH): New macro.
7528 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
7529 (TMPL_ARGS_LEVEL): New macro.
7530 (SET_TMPL_ARGS_LEVEL): Likewise.
7531 (TMPL_ARG): Likewise.
7532 (SET_TMPL_ARG): Likewise.
7533 (TMPL_ARGS_DEPTH): Likewise.
7534 (finish_member_template_decl): Use finish_template_decl.
7535 (maybe_process_partial_specialization): New function, split out
7537 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
7538 (maybe_begin_member_template_processing): Use new macros.
7539 (is_member_template): Likewise.
7540 (is_member_template_class): Likewise.
7541 (add_to_template_args): Likewise. Deal with multiple levels of
7543 (maybe_process_partial_specialization): New function.
7544 (retrieve_specialization): Add consistency check.
7545 (determine_specialization): Return full argument list.
7546 (check_explicit_specialization): Tweak friend handling. Use full
7547 argument lists. Simplify.
7548 (current_template_args): Use new macros.
7549 (push_template_decl_real): Change ill-named mainargs to specargs.
7550 Check that a partial specialization actually specializes at least
7551 one parameter. Improve friend handling. Modify for full
7553 (classtype_mangled_name): Don't mangle the names of
7555 (lookup_template_class): Add entering_scope parameter. Use it to
7556 avoid finding a template type when an instantiation is required.
7557 Simplify. Use full template arguments.
7558 (tsubst_friend_function): Use unregister_specialization. Use new
7559 macros. Use full template arguments.
7560 (tsubst_friend_class): Substitute, using tsubst_template_parms,
7561 into the template parameters before passing them to
7562 redeclare_class_template.
7563 (instantiate_class_template): Simplify. Use full template
7564 arguments. Adjust calls to get_class_bindings. Use
7565 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
7566 (innermost_args): Use new macros.
7567 (tsubst_aggr_type): New function, split out from tsubst.
7568 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
7569 conventions for lookup_template_class. Refine handling of partial
7570 instantiations. Remove calls to complete_template_args.
7571 Simplify. Add consistency checks. Use set_mangled_name_for_decl
7572 and set_mangled_name_for_template_decl.
7573 (tsubst_copy): Use tsubst_aggr_type.
7574 (instantiate_template): Use full template arguments.
7575 (more_specialized): Improve formatting.
7576 (more_specialized_class): Adjust calls to get_class_bindings.
7577 (get_bindings_real): Don't call complete_template_args.
7578 (most_specialized): Don't overwrite input; create a new list.
7579 (most_specialized_class): Use most_general_template.
7580 (regenerate_decl_from_template): Use unregister_specialization.
7581 Use full template arguments.
7582 (instantiate_decl): Use full template arguments.
7583 (set_mangled_name_for_template_decl): New function.
7584 * semantics.c (begin_class_definition): Use
7585 maybe_process_partial_specialization.
7586 (finish_member_class_template): New function.
7587 (finish_template_decl): Likewise.
7588 (finish_template_type): Likewise.
7589 (typeck.c): Don't crash after issuing a compiler_error.
7590 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
7592 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
7594 * typeck2.c (build_functional_cast): Handle default-initialization.
7596 * call.c (build_over_call): Pass 1 to popclass.
7598 * parse.y (direct_notype_declarator): Add precedence declaration
7599 to notype_unqualified_id case.
7600 * Makefile.in (EXPECT): Adjust.
7602 * tree.c (ovl_member): Fix for single function in OVL.
7604 1998-07-27 Dave Brolley <brolley@cygnus.com>
7606 * c-lex.c (yylex): Fix boundary conditions in character literal and
7607 string literal loops.
7609 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
7611 * decl.c (lookup_name_real): OK, do return the from_obj value
7612 unless got_object depends on template parms.
7614 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
7616 * pt.c (coerce_template_parms): Also complain about local enums.
7618 * cp-tree.h: Add prototype for set_identifier_local_value.
7619 * decl.c (set_identifier_local_value_with_scope): Make static,
7621 * search.c (covariant_return_p): Likewise.
7622 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
7624 * call.c (build_method_call): Only pull out the type of a destructor
7625 if it's a template type parm.
7626 * decl.c (lookup_name_real): Never return the from_obj value.
7628 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
7630 * except.c (process_start_catch_block_old): Call start_decl_1 for
7632 * decl.c (start_decl_1): Avoid duplicate error.
7634 * init.c (expand_default_init): Only perform the initialization if
7635 it will do something.
7637 1998-07-23 H.J. Lu (hjl@gnu.org)
7639 * parse.y (base_class): Check for invalid base class.
7641 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
7643 * decl2.c (import_export_template): Fold in...
7644 (import_export_class): ...to here. Handle dllimport/export.
7646 * class.c (build_vtable): Pass at_eof to import_export_vtable.
7647 (prepare_fresh_vtable): Likewise.
7648 * decl2.c (import_export_class): Split out...
7649 (finish_prevtable_vardecl): From here.
7650 * class.c (finish_struct_1): Call import_export_class if at_eof.
7652 * decl.c (start_function): #if 0 mysterious code I wrote and have
7654 * rtti.c (get_tinfo_fn): If this is for a class type, set
7657 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
7659 * inc/exception: Change terminate and unexpected to ().
7661 * parse.y (named_class_head_sans_basetype_defn): A
7662 named_class_head_sans_basetype followed by '{' or ':' is a defn.
7664 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
7666 * tree.c (canonical_type_variant): New fn to handle arrays.
7667 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
7668 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
7669 * method.c (process_overload_item): Use build_overload_value for
7672 1998-07-20 Dave Brolley <brolley@cygnus.com>
7674 * lex.c (mbchar.h): #include it.
7675 (GET_ENVIRONMENT): New macro.
7676 (init_parse): Set character set based on LANG environment variable.
7677 (real_yylex): Handle multibyte characters in character literals.
7678 (real_yylex): Handle multibyte characters in string literals.
7680 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
7682 * lex.c (do_identifier): Look for class value even if we don't
7683 have a global value. Do implicit declaration if parsing is 2.
7684 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
7687 1998-07-19 Mark Mitchell <mark@markmitchell.com>
7689 * decl.c (pushtag): Revert previous change.
7690 * pt.c (lookup_template_class): Don't put out debugging
7691 information for types that use template parameters.
7693 * decl.c (pushtag): Don't put out debugging information for
7694 compiler-generated typedefs.
7696 * error.c (dump_type_real): Don't crash when presented with
7697 intQI_type_node or the like.
7699 * semantics.c (finish_translation_unit): Fix spelling error in
7702 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
7704 * decl.c (lookup_name_real): Pull out single function here.
7705 (select_decl): Not here.
7706 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
7708 * decl.c (qualify_lookup): Tweak again.
7710 * pt.c (lookup_template_class): Don't mess with the context of the
7712 * decl2.c (current_decl_namespace): Remove special handling for
7715 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
7716 a member template specialization.
7718 * tree.c (ovl_member): Use decls_match to compare functions.
7719 * decl.c (decls_match): Check the context of a function.
7721 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
7722 in Koenig lookup support rules.
7723 * semantics.c (finish_call_expr): Handle the new cases.
7725 * typeck.c (build_x_function_call): Handle overloaded methods.
7727 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
7729 1998-07-16 Mark Mitchell <mark@markmitchell.com>
7731 * semantics.c (finish_object_call_expr): Revert previous change.
7732 * call.c (build_new_method_call): Likewise. Instead, convert
7733 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
7735 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
7737 * decl.c (qualify_lookup): Handle templates.
7739 * decl2.c (do_using_directive): Don't pass ancestor.
7740 * decl.c (push_using_directive): Calculate ancestor.
7742 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
7743 * decl.c (pushdecl): Move type shadowing handling from here...
7744 (duplicate_decls): ...to here.
7745 * decl.c (set_identifier_local_value_with_scope): New fn.
7747 (set_identifier_local_value, lookup_type_current_level): New fns.
7748 * decl2.c (do_local_using_decl): Handle types and binding level
7751 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
7752 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
7753 (lookup_namespace_name): Likewise.
7754 * typeck.c (build_unary_op): Not here anymore.
7756 * decl2.c (do_class_using_decl): Make sure we get an identifier.
7757 * class.c (handle_using_decl): Ignore TYPE_DECLs.
7759 * decl.c (qualify_lookup): New fn.
7760 (lookup_name_real): Use it.
7762 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
7764 * decl2.c (add_using_namespace): When directly using a namespace
7765 that was indirect before, promote it.
7767 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
7768 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
7769 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
7770 * decl.c (select_decl): Replace two flag parameters by one.
7771 (unqualified_namespace_lookup): Likewise, pass flag.
7772 (lookup_flags): New function.
7773 (lookup_name_real): Compute flags, pass them.
7774 (lookup_namespace_name): Call with zero-flag.
7775 * decl2.c (ambiguous_decl): Add flag parameter, complain only
7777 (lookup_using_namespace, qualified_lookup_using_namespace):
7778 Add flag parameter, pass them through.
7779 * lex.c (do_scoped_id): Call with zero-flag.
7781 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
7783 * typeck.c (convert_for_assignment): Use comptypes.
7785 1998-07-16 Mark Mitchell <mark@markmitchell.com>
7787 * semantics.c (finish_object_call_expr): Move test for the
7788 function called being a TYPE_DECL to ...
7789 * call.c (build_new_method_call): Here.
7791 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
7793 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
7794 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
7796 * lex.c (looking_for_typename): Don't initialize.
7798 * decl2.c (ambiguous_decl): Clarify error message.
7800 * decl.c (push_using_directive): Iterate over namespaces used
7803 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7805 * decl2.c (add_using_namespace): Iterate over namespaces used
7808 * decl.c (lookup_name_real): Accept namespace aliases as locals.
7809 (cat_namespace_levels): Ignore aliases.
7810 (duplicate_decls): Ignore duplicate aliases.
7811 * decl2.c (do_namespace_alias): Process block level namespace
7812 aliases. Store alias with pushdecl. Remove odr errors.
7813 * parse.y (namespace_alias): New non-terminal.
7816 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
7818 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
7819 Handle TEMPLATE_TYPE_PARM.
7820 (arg_assoc): Rewrite.
7822 * pt.c (complete_template_args): Don't look at the context unless
7825 * method.c (build_decl_overload_real): Fix namespace handling.
7827 * typeck.c (build_unary_op): Extract a lone function from an
7830 * call.c (build_scoped_method_call): Handle getting a namespace
7831 for basetype in a destructor call.
7832 (check_dtor_name): Handle enums.
7834 * parse.y (using_directive): New nonterminal.
7835 (extdef, simple_stmt): Use it.
7837 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7839 * decl2.c (add_function): Move error message ...
7840 (arg_assoc_namespace): ... from here.
7842 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
7844 * parse.y (namespace_qualifier): Fix multiple level handling.
7845 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
7846 (arg_assoc): Don't skip the first argument of a function.
7848 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
7850 * search.c (my_tree_cons): Clean up.
7852 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
7854 * call.c (joust): Don't warn about "confusing" conversions to the
7857 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7859 * class.c (push_nested_class): Complain about namespaces.
7860 * decl.c (start_decl): Enter the object's namespace.
7861 (cp_finish_decl): Leave it.
7862 (grokdeclarator): Likewise.
7863 * decl2.c (check_decl_namespace): New function.
7864 (finish_file): Call it.
7865 * parse.y (complex_direct_notype_declarator): Set complexity
7866 of namespace-qualified ids to -1, enter the namespace.
7868 * method.c (build_template_decl_overload): Expect _DECL as first
7869 parameter. Put context temporarily into current_namespace.
7870 * pt.c (check_explicit_specialization): Change caller.
7873 * init.c (build_offset_ref): Call mark_used and
7874 convert_from_reference for namespace members.
7876 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
7878 * search.c (my_tree_cons): The bitfield is at index 2.
7880 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
7882 * lang-options.h: Format changed to work with new --help support
7885 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7887 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
7888 Do Koenig lookup in CALL_EXPR.
7889 (arg_assoc): Handle error_mark.
7890 * lex.c (is_global): New function.
7891 (do_identifier): Expect arguments for Koenig lookup.
7892 * parse.y (primary): Add rules for calls of unqualified function calls.
7893 (do_id): Change call of do_identifier.
7894 * pt.c (finish_stmt_expr): Likewise.
7895 * semantics.c (finish_id_expr): Likewise.
7896 (finish_call_expr): Add integer parameter to indicate
7897 argument-dependent lookup.
7899 * decl.c (struct binding_level): New field using_directives.
7900 (push_using_decl): Not sorry anymore.
7901 (push_using_directive): New function.
7902 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
7903 (unqualified_namespace_lookup): New function, code from ...
7904 (lookup_name_real): ... here.
7905 * decl2.c (lookup_using_namespace): Pass using list instead of
7907 (validate_nonmember_using_decl): New function.
7908 (do_nonmember_using_decl): New function.
7909 (do_toplevel_using_decl): Use them.
7910 (do_local_using_decl): New function.
7911 (do_using_directive): Support block-level directives.
7912 * parse.y (simple_stmt): Support using declarations and
7914 (namespace_qualifier, namespace_using_decl): New non-terminals.
7916 * xref.c (classname): New function.
7917 (GNU_xref_hier): Change class and base parameters to tree.
7918 * decl.c (xref_baseypes): Change caller.
7919 * friend.c (make_friend_class): Likewise.
7921 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7923 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
7926 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
7927 template template parameter, record its use.
7928 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
7929 its template arguments if exists.
7931 * pt.c (coerce_template_template_parms): New function equivalent
7932 to coerce_template_parms when IS_TMPL_PARM is true.
7933 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
7934 all callers changed.
7936 (coerce_template_parms): Access ARGLIST properly when creating a
7937 new vector. Only accept implicit TYPE_DECL as valid argument for
7938 a template template parameter when it is a base class of
7939 current_class_type. Don't display error message when COMPLAIN is
7942 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
7944 * repo.c (get_base_filename): Use file_name_nondirectory.
7945 (open_repo_file): Likewise.
7946 * cp-tree.h (file_name_nondirectory): Add prototype.
7948 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
7950 * friend.c (do_friend): Pull the identifier out of declarator.
7951 Use cp_error and friends.
7952 * decl2.c (qualified_lookup_using_namespace): Fix call to
7954 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
7955 (grokvardecl): Use DECL_CLASS_SCOPE_P.
7956 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
7957 * class.c (warn_hidden): Fix for OVERLOAD.
7958 From grahams@rcp.co.uk:
7959 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
7960 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
7962 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
7964 * g++.1 (-traditional): Remove duplicated documentation.
7966 1998-07-11 Mark Mitchell <mark@markmitchell.com>
7968 * method.c (flush_repeats): Add nrepeats parameter.
7969 (issue_nrepeats): Likewise.
7970 (is_back_referenceable_type): New function. Don't back-reference
7971 TEMPLATE_TYPE_PARMs as well as simple types like integers.
7972 (build_mangled_name_for_type): Likewise.
7973 (build_mangled_name_for_type_with_Gcode): Likewise.
7975 (nrepeats): Likewise.
7976 (Nrepeats): Likewise.
7977 (start_squangling): Don't clear the variables removed above.
7978 (end_squangling): Likewise.
7979 (flush_repeats): Tidy. Use nrepeats parameter rather than
7981 (issue_nrepeats): Likewise, but with nrepeats global. Use
7982 is_backreferenceable_type.
7983 (build_overload_nested_name): Tidy. Add comment. Use
7984 build_mangled_name_for_type.
7985 (build_underscore_int): Comment.
7986 (build_overload_scope_ref): Use build_mangled_name_for_type.
7987 (build_overload_int): Likewise.
7988 (build_template_template_parm_names): Tidy.
7989 (build_template_parm_names): Use build_mangled_name_for_type.
7990 (build_overload_identifier): Add comments.
7991 (build_mangled_name_for_type_with_Gcode): Split out from
7993 (build_mangled_name_for_type): Use it.
7994 (build_mangled_name): Rework to use build_mangled_name_for_type
7995 and to not use global nrepeats/Nrepeats. Tidy.
7996 (process_modifiers): Tidy.
7997 (check_btype): Use is_backreferenceable_type. Add comment.
7998 Rename `node' to `type'.
7999 (process_overload_item): Set numeric_output_need_bar here.
8000 Use build_mangled_name_for_type. Tidy.
8001 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
8002 build_mangled_name_for_type.
8004 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
8007 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
8009 * cp-tree.h (warn_long_long): Define.
8010 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
8011 warning "ANSI C++ does not support `long long'".
8012 * decl2.c (warn_long_long): Define.
8013 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
8015 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
8017 * decl.c (xref_tag): Handle attributes between 'class' and name.
8018 * parse.y (aggr): Likewise.
8019 * semantics.c (finish_class_definition): Likewise.
8020 * Makefile.in (EXPECTED): Adjust.
8022 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
8023 * decl2.c: Define them.
8024 (lang_decode_option): Handle them.
8025 * lang-options.h: Add -foptional-diags.
8026 * class.c (finish_struct): Don't complain about multiple meanings of
8027 name if -fno-optional-diags.
8028 * decl.c (pushdecl_class_level): Likewise.
8029 * lex.c (real_yylex): Check warn_multichar.
8031 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
8033 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
8035 * tree.c (make_binfo): Fix length.
8037 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
8039 * decl2.c (lang_decode_option): Remove warn_template_debugging.
8040 * lang-options.h: Likewise.
8042 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8044 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
8045 (process_start_catch_block): Likewise for variables
8046 `false_label_rtx', `call_rtx' and `return_value_rtx'.
8048 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
8050 * tree.c (build_srcloc): Make sure we allocate this node on the
8053 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
8055 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
8056 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
8057 (lang_specific_driver): Only add -lm automatically if need_math is
8060 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
8062 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
8064 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8066 * Makefile.in (EXPR_H): New dependency variable.
8067 (decl2.o): Depend on $(EXPR_H).
8068 (typeck.o): Likewise.
8072 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
8074 * decl.c (start_enum): Put local enums on permanent_obstack.
8076 1998-06-25 Mark Mitchell <mark@markmitchell.com>
8078 * cp-tree.h (c_get_alias_set): Declare.
8079 * decl.c (init_decl_processing): Set lang_get_alias_set.
8081 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
8083 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
8084 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
8085 flag for all function decls which are in the exception table.
8086 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
8087 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
8088 code is emitted for any referenced rtti function.
8090 1998-06-25 Dave Brolley <brolley@cygnus.com>
8092 * lang-specs.h: Use new | syntax to eliminate
8093 string concatenation.
8095 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
8097 * cp-tree.h (CP_DECL_CONTEXT): New macro.
8098 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
8099 * method.c (build_overload_nested_name): Likewise.
8100 * sig.c (build_signature_pointer_or_reference_type): Don't set
8103 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8105 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
8106 * cp-tree.h (FROB_CONTEXT): New macro.
8107 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
8108 * decl.c (namespace_binding): Replace NULL_TREE with
8110 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
8111 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
8113 * decl.c (pushtag): Use FROB_CONTEXT.
8114 (pushdecl, make_typename_type, define_function, grokdeclarator):
8116 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
8117 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
8119 * decl2.c (decl_namespace): Return global_namespace if no context.
8120 * method.c (build_overload_nested_name): Expect null as context.
8121 * pt.c (mangle_class_name_for_template): Do nothing for null
8123 (lookup_template_class): Allow for null id_context.
8125 1998-06-25 Richard Henderson <rth@cygnus.com>
8127 * method.c (emit_thunk): Set current_function_is_thunk for the
8128 ASM_OUTPUT_MI_THUNK case as well.
8130 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
8132 * exception.cc (__cplus_type_matcher): Get a match_info pointer
8133 instead of an exception table entry as a parameter.
8135 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
8137 * parse.y (function_try_block): Don't call start_catch_handler.
8138 * except.c (call_eh_info): Remove coerced field from declaration.
8139 (build_eh_type_type_ref): New function to create an address of a
8140 rtti function for the new style exception tables.
8141 (expand_start_catch_block): Split function, this contains the
8143 (process_start_catch_block_old): New function to perform the rest
8144 of expand_start_catch_block under old style exceptions.
8145 (process_start_catch_block_old): New function to perform the rest
8146 of expand_start_catch_block under new style exceptions.
8147 (expand_end_catch_block): Only pop the false label off the stack under
8148 the old style of exceptions.
8149 * semantics.c (finish_try_block): Don't call start_catch_handler.
8150 * exception.cc (struct cp_eh_info): Add original_value field.
8151 (__cplus_type_matcher): Perform type matching on the original exception
8152 value, and if we have a match, set the current value.
8153 (__cp_push_exception): Set the original exception value.
8155 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
8157 * call.c (joust): Fix confusing conversion warning.
8159 * call.c (build_op_delete_call): Add placement parm. Check
8160 LOOKUP_SPECULATIVELY.
8161 * cp-tree.h, decl2.c, init.c: Adjust.
8162 * decl.c (finish_function): Use it.
8164 * pt.c (tsubst): Diagnose creating void fields or variables.
8166 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8168 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
8170 * cp-tree.h (check_dtor_name): Add prototype.
8172 * init.c (expand_member_init): Remove unused variables
8173 `ptr_type_node', `parm' and `rval'.
8175 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
8177 (lang_print_xnode): Likewise.
8179 * typeck2.c (enum_name_string): Cast argument to sprintf to long
8180 and use %ld specifier.
8182 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
8183 specifier in call to fprintf.
8184 (GNU_xref_member): Cast argument to sprintf to int.
8186 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
8188 * typeck2.c (pop_init_level): Warn about implicit zero initialization
8191 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8193 * cp-tree.h: Prototype function `check_java_method'.
8195 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8197 * class.c (finish_struct): Make conflicting use of id a pedwarn.
8198 * decl.c (pushdecl_class_level): Likewise.
8200 1998-06-17 Mark Mitchell <mark@markmitchell.com>
8202 * pt.c (convert_nontype_argument): Issue an error when presented
8203 with an integer (real) constant that cannot be simplified to an
8206 * cp-tree.h (c_get_alias_set): Remove declaration added in
8207 1998-06-13 change that should never have been checked in.
8209 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8211 * typeck.c (build_binary_op_nodefault): Change % in format strings
8214 * decl.c (grokvardecl): Don't build_static_name for decls that
8215 aren't at namespace scope.
8217 * init.c (perform_member_init): Catch default-initialization of
8220 1998-06-17 Mark Mitchell <mark@markmitchell.com>
8222 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
8224 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8226 * method.c (hack_identifier): Complain about getting a namespace
8228 * typeck.c (decay_conversion): Remove check for namespaces.
8229 * typeck2.c (incomplete_type_error): Likewise.
8230 * parse.y (template_arg): Add PTYPENAME expansion.
8232 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
8234 * decl.c (grokvardecl): Don't build external assembler names for
8235 TYPENAMEs in other namespaces as there is no declarator.
8236 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
8237 info from DECL_CONTEXT if it is NULL.
8239 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
8241 * call.c (check_dtor_name): Split out.
8242 (build_scoped_method_call): Use it.
8243 (build_method_call): Use it.
8244 * init.c (build_offset_ref): Use it.
8246 * typeck.c (build_static_cast): Fix handling of pointers to members.
8248 * decl.c (finish_function): Just return nothing from a constructor.
8249 * typeck.c (c_expand_return): Complain about returning a void
8250 expression from a destructor.
8252 1998-06-13 Mark Mitchell <mark@markmitchell.com>
8254 * class.c (alter_access): Accept a BINFO explaining how to get
8255 from the entity whose accessed is being altered to the type doing
8257 (handle_using_decl): New function containing code split out from ...
8258 (finish_struct_1): Here.
8260 * cp-tree.h (complete_type_or_else): Declare.
8261 * init.c (build_new_1, build_delete): Use it.
8262 * typeck.c (require_complete_type): Use complete_type, rather than
8263 expanding it inline.
8264 (complete_type_or_else): New function.
8265 (build_component_ref): Use it.
8266 (pointer_int_sum): Make sure the type pointed to is complete.
8267 (pointer_diff): Likewise.
8269 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
8272 * search.c (get_matching_virtual): Note that member templates
8273 cannot override virtual functions.
8275 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
8277 * pt.c (check_explicit_specialization): If DECLARATOR turned into
8278 an error_mark_node from lookup_template_function, return the same.
8279 (determine_specialization): Also make sure TEMPLATE_ID isn't an
8280 error_mark_node, before we try to read its operands.
8281 * decl.c (grokdeclarator): If we got an error_mark_node from
8282 check_explicit_specialization, just return it right back.
8284 1998-06-12 Mark Mitchell <mark@markmitchell.com>
8286 * class.c (instantiate_type): Don't treat template-ids that don't
8287 specify any template arguments as equivalent to ordinary
8288 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
8289 pointer-to-members for member templates. Tidy slightly.
8290 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
8291 * init.c (build_offset_ref): Handle template-ids like ordinary
8292 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
8293 offset part of the OFFSET_REF.
8294 * typeck.c (build_unary_op): Change check for unknown types to
8295 look for OFFSET_REFs, not SCOPE_REFs.
8297 1998-06-11 Mark Mitchell <mark@markmitchell.com>
8299 * pt.c (is_member_template_class): New function.
8300 (push_template_decl_real): Use it.
8302 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
8304 * friend.c (do_friend): Add support for nested classes using
8305 member functions of the enclosing class as friends.
8307 1998-06-10 Mark Mitchell <mark@markmitchell.com>
8309 * call.c (convert_default_arg): Make global, not static.
8310 (convert_arg_for_ellipsis): Split out from ...
8311 (build_over_call): Here.
8312 * cp-tree.h (convert_default_arg); Declare.
8313 (convert_arg_to_ellipsis): Likewise.
8314 (do_member_init): Remove.
8315 * init.c (do_member_init): Remove; this code is dead.
8316 (expand_member_init): Remove much of this code; it is dead.
8317 * typeck.c (convert_arguments): Use convert_default_arg and
8318 convert_arg_for_ellipsis, rather than duplicating here.
8320 * call.c (convert_like): Don't fail silently if
8321 build_user_type_conversion fails. Always return error_mark_node
8324 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8326 * search.c (covariant_return_p): Complain about ambiguous base.
8328 * typeck.c (build_component_ref): Diagnose ref to nested type.
8330 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
8332 * decl.c (grokparms): Check that INIT isn't an error_mark_node
8333 before giving error about invalid type for default arg.
8335 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8337 * call.c (build_method_call): Fix thinko.
8339 1998-06-10 Dave Brolley <brolley@cygnus.com>
8341 * decl2.c (lang_decode_option): New argc/argv interface.
8342 * cp-tree.h (lang_decode_option): New argc/argv interface.
8343 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
8344 specified for cpplib-enabled compilers.
8345 * lex.c (lang_init): Don't check_newline for cpplib.
8346 (init_parse): Don't initialize cpplib here.
8348 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
8350 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
8351 piece before checking DECL_MUTABLE_P.
8353 1998-06-10 John Carr <jfc@mit.edu>
8355 * tree.c (debug_binfo): Make printf format match arguments.
8357 * error.c (OB_PUTI): Make printf format match arguments.
8359 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8361 * init.c (perform_member_init): Handle default-initialization.
8363 * except.c (build_throw): Handle throwing NULL.
8365 * typeck.c (build_x_function_call): Use resolve_offset_ref.
8367 * search.c (compute_access): Only strip an anonymous union
8370 * call.c (add_builtin_candidates): Tweak.
8372 * cvt.c (build_expr_type_conversion): Restore code for conversion
8374 * decl2.c (delete_sanity): Use it. Clean up.
8376 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
8378 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
8380 * typeck.c (c_expand_return): Don't warn about void expressions on
8381 return statements in functions returning void.
8383 1998-06-09 Mark Mitchell <mark@markmitchell.com>
8385 * pt.c (fn_type_unification): Revise documentation. Tidy.
8386 (type_unification): Likewise.
8388 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
8390 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
8392 * parse.y (function_try_block): Rename expand_start_catch, and delete
8394 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
8397 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
8399 * search.c (lookup_member): New fn.
8400 * class.c (finish_struct_1): Use it.
8401 * decl.c (lookup_name_real): Use it.
8403 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8405 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
8407 * cp-tree.h: Add prototype for `maybe_print_template_context' and
8408 `maybe_make_one_only'.
8410 * decl.c (auto_function): Remove unused variable `decl'.
8412 * decl2.c: Include dwarf2out.h and dwarfout.h.
8414 * lex.c: Remove redundant declarations of `set_float_handler' and
8417 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
8419 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
8420 time flag. Call __cp_eh_info instead of __cp_exception_info.
8421 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
8422 (__cp_exception_info): Return offset into cp_eh_info structure to
8423 match what use to be the start of this structure.
8424 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
8425 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
8427 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
8428 __cp_eh_info instead of __cp_exception_info.
8430 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
8432 * decl.c (cp_finish_decl): Disable inlining of extern inlines
8433 with static variables.
8435 1998-06-08 Mark Mitchell <mark@markmitchell.com>
8437 * init.c (build_offset_ref): Correct previous change to use build,
8440 1998-06-07 Mark Mitchell <mark@markmitchell.com>
8442 * class.c (instantiate_type): Handle pointer-to-members where the
8443 member is a template.
8444 * init.c (build_offset_ref): Likewise.
8445 * typeck.c (build_unary_op): Likewise.
8447 1998-06-07 Richard Henderson <rth@cygnus.com>
8449 * lex.c (lang_init_options): New function.
8450 (lang_init): Remove flag_exceptions == 2 hack.
8452 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
8454 * search.c (envelope_add_decl): Tweak for implicit typename.
8456 * call.c (joust): Also warn about confusing conversion op/constructor
8457 overload resolution.
8459 * spew.c (yylex): Also return the TYPE_DECL if got_object.
8460 Don't clear got_object after '~'.
8461 * call.c (build_scoped_method_call): Tweak destructor handling.
8462 (build_method_call): Likewise.
8463 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
8464 TYPE_MAIN_VARIANT for destructors.
8465 * semantics.c (finish_object_call_expr): Complain about calling a
8468 1998-06-05 Per Bothner <bothner@cygnus.com>
8470 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
8471 Define - update needed by gcc.c change.
8473 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
8475 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
8477 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8479 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
8480 * decl.c (lookup_name_real): Add namespaces_only parameter.
8481 If set, return only NAMESPACE_DECLs.
8482 (select_decl): Likewise.
8483 (identifier_type_value): Give additional parameter.
8484 (lookup_name_nonclass): Likewise.
8485 (lookup_name): Likewise.
8486 (find_binding): Skip namespace aliases.
8487 (binding_for_name): Likewise.
8488 (push_namespace): Check for namespace aliases.
8489 (lookup_name_namespace_only): New function.
8490 (begin_only_namespace_names, end_only_namespace_names): New functions.
8491 * decl2.c (set_decl_namespace): Skip namespace aliases.
8492 (do_using_directive): Likewise.
8493 (do_namespace_alias): Produce namespace aliases, fix alias
8495 * error.c (dump_decl): Support SCOPE_REF.
8496 * parse.y (extdef): Wrap lookup with namespace_only for namespace
8497 aliases and using declarations.
8499 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
8501 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
8503 * error.c (dump_expr): Clean up NEW_EXPR case.
8505 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
8507 Suggested by Brendan Kehoe
8508 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
8509 treat it as using ::decl.
8511 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
8513 * tree.c (mapcar): Support NEW_EXPR.
8515 * error.c (dump_expr): Support NEW_EXPR.
8517 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
8519 * method.c (make_thunk): Use overload machinery to make name.
8520 * search.c (covariant_return_p): New fn.
8521 (get_matching_virtual): Use it.
8523 * init.c (build_new_1): Fix check for void.
8525 1998-06-01 Per Bothner <bothner@cygnus.com>
8527 * cp-tree.h (TYPE_FOR_JAVA): New macro.
8528 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
8529 java_int_type_node, java_long_type_node, java_float_type_node,
8530 java_double_type_node, java_char_type_node, java_boolean_type_node):
8531 New "primitive" types, with predefined names __java_byte etc.
8532 (record_builtin_java_type): New function.
8533 (init_decl_processing): Make Java types with record_builtin_java_type.
8534 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
8535 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
8536 (grokfndecl): Call check_java_method for Java classes.
8537 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
8538 (process_overload_item): Match types against specific
8539 java_XX_type_node types, rather than using is_java_type.
8540 * class.c (finish_struct_1): Don't add default copy constructor
8541 or operator= if TYPE_FOR_JAVA.
8542 (pop_lang_conext): Restore strict_prototyp proper if Java.
8543 * decl2.c (acceptable_java_type, check_java_method): New functions.
8544 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
8545 (tsubst): Move common statement after if statement.
8546 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
8548 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
8550 * pt.c (for_each_template_parm): Use first_rtl_op.
8552 * tree.c (build_cplus_array_type_1): Also check index_type for
8555 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
8557 * pt.c (tsubst): Always copy BINFO_BASETYPES.
8559 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
8561 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
8564 1998-05-29 Mark Mitchell <mark@markmitchell.com>
8566 * decl.c (grokdeclarator): Don't complain about in-class
8567 initialization of static consts if we don't really know the type
8570 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
8572 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
8573 * method.c (build_destructor_name): New fn.
8574 * decl2.c (maybe_retrofit_in_chrg): Split out...
8575 (grokclassfn): From here. Reorganize.
8576 * decl.c (grok_ctor_properties): Make sure ctors for types with
8577 vbases have the in_chrg parm.
8578 * pt.c (instantiate_class_template): Update
8579 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
8581 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
8583 1998-05-28 Mark Mitchell <mark@markmitchell.com>
8585 * pt.c (instantiate_decl): Make test for whether or not static
8586 variables should be instantiated early match its comment.
8588 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
8590 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
8592 (start_function): Call check_default_args.
8593 * decl2.c (grokfield): Don't call check_default_args.
8594 (check_default_args): Use cp_error_at.
8595 * lex.c (do_pending_defargs): Call check_default_args.
8597 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
8599 * call.c (build_method_call): Make sure get_type_value returns
8600 something before we try to use its TYPE_MAIN_VARIANT.
8601 (build_scoped_method_call): Likewise.
8603 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
8605 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
8606 initialize an array.
8608 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
8611 * friend.c (do_friend): Clarify template warning.
8613 1998-05-27 Mark Mitchell <mark@markmitchell.com>
8615 * decl.c (shadow_label): Don't treat decls as identifiers.
8616 (maybe_push_to_top_level): Clear shadowed_labels.
8618 * pt.c (instantiate_decl): Reset lineno and filename after calling
8619 regenerate_decl_from_template.
8621 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
8624 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
8626 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
8628 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8630 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
8631 (convert_nontype_argument): Handle cases when nontype template
8632 parameters become classes after substitution.
8634 1998-05-26 Mark Mitchell <mark@markmitchell.com>
8636 * friend.c (is_friend): Use comptypes, rather than == to compare
8637 types. Modify for new representation of template friends.
8638 (make_friend_class): Likewise.
8639 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
8640 (instantiate_class_template): Deal with template friends.
8642 * decl.c (store_parm_decls): Remove redundant call to
8643 expand_main_function.
8645 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
8647 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
8650 1998-05-26 Per Bothner <bothner@cygnus.com>
8652 * language_as_string: Handle lang_java.
8654 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
8656 * decl.c (pushdecl): Don't copy the type_decl.
8658 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8660 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
8662 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
8664 * parse.y (complex_direct_notype_declarator): Use $1 to access
8665 scope of notype_qualified_id.
8667 1998-05-26 Dave Brolley <brolley@cygnus.com>
8669 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
8670 (init_parse): Initialize cpplib interface.
8672 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
8675 1998-05-26 Mark Mitchell <mark@markmitchell.com>
8677 * decl.c (pushtag): Avoid crashing on erroneous input.
8679 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8681 * decl.c (push_namespace): Only produce one unique name for
8682 anonymous namespaces.
8683 (get_unique_name): Remove.
8685 1998-05-25 Mark Mitchell <mark@markmitchell.com>
8687 * call.c (tourney): Don't do any extra comparisons.
8689 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
8691 * cp-tree.h (processing_template_parmlist): Declare.
8692 * decl.c (pushtag): Don't call push_template_decl when we
8694 * pt.c (processing_template_parmlist): New variable.
8695 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
8696 (complete_template_args): Use it.
8697 (add_to_template_args): Likewise.
8698 (innermost_args): Likewise.
8700 (begin_template_parm_list): Use processing_template_parmlist.
8701 (end_template_parm_list): Likewise.
8703 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
8704 * decl.c (grokdeclarator): Use it.
8705 * decl2.c (grok_x_components): Likewise.
8706 * init.c (initializing_context): Likewise.
8707 * method.c (do_build_copy_constructor): Likewise.
8708 (do_build_assign_ref): Likewise.
8709 * search.c (compute_access): Likewise.
8710 * typeck.c (build_component_ref): Likewise.
8712 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
8713 unnamed type a typedef name "for linkage purposes".
8715 * pt.c (lookup_template_class): Don't look at
8716 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
8718 * method.c (build_overload_int): Handle error cases gracefully.
8720 * pt.c (instantiate_decl): Handle static member variables
8723 * pt.c (tsubst): Use the tsubst'd type when producing new
8724 TEMPLATE_PARM_INDEX nodes.
8726 1998-05-24 Mark Mitchell <mark@markmitchell.com>
8728 * tree.c (cp_tree_equal): Handle pointers to member functions.
8730 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
8731 sure the type of the REF_BIND is a reference type.
8732 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
8733 target_type for clarity.
8735 * parse.y (xcond): Move call to condition_conversion ...
8736 * semantics.c (finish_for_cond): Here.
8737 * parse.c: Regenerated.
8739 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
8741 * decl.c (push_namespace): Namespaces have type void.
8742 * typeck2.c (incomplete_type_error): Complain about namespace
8744 * typeck.c (decay_conversion): Likewise.
8746 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
8748 * error.c (dump_expr): Support namespaces.
8750 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
8752 * cp-tree.def: Add SRCLOC.
8753 * cp-tree.h: Add struct tree_srcloc and accessor macros.
8754 * tree.c (build_srcloc, build_srcloc_here): New fns.
8755 * pt.c (add_pending_template): Use build_srcloc_here.
8756 (push_tinst_level): Update last_template_error_tick before erroring.
8757 (instantiate_decl): Restore lineno and input_filename before
8758 calling add_pending_template.
8759 * decl2.c (finish_file): Set up lineno and input_filename for
8762 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
8764 * decl.c (lang_print_error_function): New fn.
8765 (init_decl_processing): Set print_error_function to use it.
8766 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
8768 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
8771 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
8772 copy-initialization.
8774 * class.c (build_vtable_entry): Use int_fits_type_p.
8775 (build_vtable): Pass a signed offset to build_vtable_entry.
8776 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
8777 set_rtti_entry): Likewise.
8779 1998-05-22 Per Bothner <bothner@cygnus.com>
8781 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
8782 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
8784 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
8786 * pt.c (print_template_context): Use fprintf instead of cp_error.
8788 * pt.c (determine_specialization): Just return an error_mark_node.
8789 Also print the decl we want in error messages. If we complain,
8790 return error_mark_node.
8791 (tsubst_friend_function): Set lineno and input_filename so
8792 error messages will be useful.
8793 (instantiate_template): Just return an error_mark_node.
8794 (check_explicit_specialization): Don't mess with a returned
8797 * pt.c (print_template_context): Add new argument.
8798 (maybe_print_template_context): New fn.
8799 (push_tinst_level): Increment tinst_level_tick.
8800 (pop_tinst_level): Likewise.
8801 * errfn.c (cp_thing): Call maybe_print_template_context. Use
8802 xrealloc instead of xmalloc.
8804 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
8806 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
8808 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
8809 if the template we looked up is the same as the one we already
8812 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
8814 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
8815 (cpp_reader,parse_in): Add for cpplib.
8816 (check_newline): Call handle_sysv_pragma with new interface.
8817 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
8819 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
8820 (sub_getch): Call GETC for cpplib.
8822 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
8823 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
8825 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
8827 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
8829 * decl2.c (maybe_make_one_only): New fn.
8830 (import_export_vtable): Use it.
8831 (import_export_decl): Likewise.
8832 * pt.c (mark_decl_instantiated): Likewise.
8834 1998-05-21 Mark Mitchell <mmitchell@usa.net>
8836 * decl2.c (find_representative_member): Rename to ...
8837 (build_anon_union_vars): New function.
8838 (finish_anon_union): Fix stupidity of previous change.
8840 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
8842 * decl.c (grokfndecl): Handle definition of specialization in
8845 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
8847 1998-05-20 Mark Mitchell <mmitchell@usa.net>
8849 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
8850 to look for type declarations.
8851 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
8852 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
8853 (finish_member_class_template): Declare.
8854 * decl.c (pushtag): Put member class templates on the
8855 CLASSTYPE_TAGS list, just as for ordinary member classes.
8856 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
8857 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
8858 IDENTIFIER_NAMESPACE_VALUEs.
8859 * parse.y (component_decl): Move code to ...
8860 * semantics.c (finish_member_class_template): New function.
8861 Don't put member class templates on the list of components for a
8863 * parse.c: Regenerated.
8864 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
8865 In fact, don't use DECL_CONTEXT at all here.
8867 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
8869 * decl.c (record_unknown_type): New function.
8870 (init_decl_processing): Call it for the unknown and global type
8873 1998-05-20 Mark Mitchell <mmitchell@usa.net>
8875 * decl2.c (find_representative_member): New function.
8876 (finish_anon_union): Use it.
8878 * cp-tree.h (MAIN_NAME_P): New macro.
8879 (DECL_MAIN_P): Likwise.
8880 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
8881 (grokfndecl): Use the new macros.
8882 (grokdeclarator): Likewise.
8883 (start_function): Likewise.
8884 (store_parm_decls): Likewise.
8885 (finsh_function): Likewise.
8886 * friend.c (do_friend): Likewise.
8887 * typeck.c (build_function_call_real): Likewise.
8888 (build_unary_op): Likewise.
8890 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
8892 * decl2.c (start_objects, finish_objects, do_dtors,
8893 do_ctors): Split out from...
8894 (finish_file): ...here.
8896 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
8898 * tree.c (is_overloaded_fn): Don't abort on placeholders from
8901 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
8903 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
8905 * error.c (dump_expr): Handle an ARROW_EXPR.
8907 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
8909 * decl.c (saveable_obstack): Declare.
8910 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
8911 declare, if necessary.
8913 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
8915 * call.c (compare_qual): Remove.
8917 (is_properly_derived_from): New function.
8918 (maybe_handle_ref_bind): Likewise.
8919 (maybe_handle_implicit_object): Likewise.
8920 (compare_ics): Modify substantially to bring into conformance with
8922 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
8923 (comp_cv_qualification): Declare.
8924 (comp_cv_qual_signature): Likewise.
8925 * typeck.c (comp_cv_qualification): Likewise.
8926 (comp_cv_qual_signature): Likewise.
8928 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8930 * Makefile.in (parse.o): Depend on toplev.h.
8932 * class.c (typecode_p): Remove prototype and definition.
8934 * cp-tree.h (currently_open_class, is_empty_class, member_p):
8937 * decl.c (push_overloaded_decl_top_level): Remove prototype and
8940 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
8941 in call to `cp_thing'.
8942 (cp_warning): Likewise for function pointer `warning'.
8944 * except.c (do_function_call): Remove prototype and definition.
8945 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
8947 * method.c (is_java_type): Add prototype and make it static.
8949 * parse.y: Include toplev.h.
8951 * pt.c (type_unification): Remove unused variable `arg'.
8952 (instantiate_decl): Likewise for `save_ti'.
8954 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
8956 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
8958 * init.c (build_member_call): Handle template_ids.
8959 * parse.y (primary): Add global_scope template_id.
8961 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
8963 * decl2.c (get_sentry): Use end_temporary_allocation.
8964 Don't declare permanent_obstack.
8966 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
8968 * parse.y (.finish_new_placement): New non-terminal.
8969 (unary_expr, new_type_id): Use it.
8970 * parse.c: Regenerated.
8972 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
8974 * pt.c (redeclare_class_template): Say where the original definition
8975 of the template-parameter's default argument appeared.
8977 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
8979 * call.c (build_over_call): Tweak empty class handling.
8981 * decl.c (make_typename_type): Use currently_open_class.
8983 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
8985 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8987 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
8988 for a type unless it is one.
8990 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
8992 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
8994 * Makefile.in (program_transform_name, objdir): Define.
8996 * Makefile.in (BISON): Use bison from the build tree if it exists.
8999 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9001 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
9003 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
9005 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
9007 * call.c (build_scoped_method_call): Likewise.
9009 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
9011 * init.c (build_new_1): Call suspend_momentary around the creation
9012 of values that must be saved for exception handling.
9013 * parse.y (.build_new_placement): New non-terminal.
9014 (unary_expr, new_placement): Use it.
9015 * parse.c: Regenerated.
9017 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
9019 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
9022 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
9025 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
9027 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
9029 * decl.c (start_decl): Revert problem change.
9031 * Makefile.in (CONFLICTS): Fix.
9033 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9035 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
9037 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
9039 * class.c (finish_struct_1): Use BINFO_SIZE.
9041 * decl.c (start_decl): Use 'tem'.
9043 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
9045 * exception.cc: Include eh-common.h.
9046 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
9047 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
9048 (__cp_push_exception): Initialize eh_info struct as well.
9049 * except.c: Remove local structs and include eh-common.h.
9050 (init_exception_processing): Set language and version codes.
9051 (call_eh_info): Add presence of eh_info to runtime description of
9053 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
9054 * semantics.c (finish_try_block): Call start_catch_block() and
9056 * parse.y (function_try_block): Call start_catch_block() and
9059 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
9061 * typeck.c (original_type): New function.
9062 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
9063 to see if they're actually the same.
9064 * cp-tree.h (original_type): Declare.
9066 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9068 * Makefile.in (lex.o): Depend on output.h.
9070 * call.c (add_function_candidate): Remove unused variable `cand'.
9071 (add_conv_candidate): Likewise.
9072 (build_builtin_candidate): Likewise.
9074 * cp-tree.h: Add prototype for `types_overlap_p'.
9076 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
9078 * decl2.c (merge_functions): Remove unused variables `tmp' and
9081 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
9082 (code_as_string): Likewise.
9083 (language_as_string): Likewise.
9084 (parm_as_string): Likewise.
9085 (op_as_string): Likewise.
9086 (assop_as_string): Likewise.
9087 (cv_as_string): Likewise.
9089 * lex.c: Include output.h.
9091 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
9093 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
9096 * tinfo.cc (__class_type_info::dcast): Change the type of variable
9097 `i' from int to size_t.
9099 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
9102 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
9104 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
9105 DECL_NAMESPACE_SCOPE_P.
9106 (lang_decl_name): Likewise.
9107 * pt.c (tsubst_friend_function, tsubst): Likewise.
9108 * decl.c (pushdecl, redeclaration_error_message, start_decl,
9109 cp_finish_decl, start_function): Likewise.
9110 * class.c (finish_struct_1): Likewise.
9111 * call.c (build_over_call): Likewise.
9112 (compare_ics): Use DERIVED_FROM_P.
9114 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
9116 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
9117 * method.c (build_mangled_name): Use it.
9118 (build_decl_overload_real): Likewise.
9120 * error.c (dump_simple_decl): New function, broken out from ...
9121 (dump_decl): Use it.
9123 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
9125 * ptree.c (lang_print_xnode): Add missing `break'.
9127 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
9129 * call.c (add_template_candidate): Adjust for changes to
9130 fn_type_unification.
9131 (add_template_candidate_real): Likewise.
9132 (add_template_conv_candidate): Likewise.
9133 (build_user_type_conversion_1): Likewise.
9134 (build_new_function_call): Likewise.
9135 (build_object_call): Likewise.
9136 (build_new_op): Likewise.
9137 (build_new_method_call): Likewise.
9138 * class.c (instantiate_type): Likewise.
9139 * cp-tree.h (unification_kind_t): New type.
9140 (fn_type_unification): Adjust prototype.
9141 (type_unificaiton): Likewise.
9142 * pt.c (UNIFY_ALLOW_NONE): New macro.
9143 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
9144 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
9145 (UNIFY_ALLOW_DERIVED): Likewise.
9146 (unify): Change prototype.
9147 (maybe_adjust_types_for_deduction): New function.
9148 (check_cv_quals_for_unify): Likewise.
9149 (determine_specialization): Adjust.
9150 (fn_type_unification): Likewise.
9151 (type_unification): Likewise.
9152 (type_unification_real): Likewise. Use
9153 maybe_adjust_types_for_deduction. Fix mishandling of
9154 back-unification of template functions passed as arguments. Pass
9155 appropriate combination of UNIFY_ALLOW_* to unify.
9156 (unify): Remove unused NTPARMS parameter. Use
9157 check_cv_quals_for_unify. Remove bogus code that allowed
9158 too-generous unification in order to adhere more closely to standard.
9159 (get_bindings_real): Adjust.
9160 (get_class_bindings): Likewise.
9162 * method.c (build_overload_identifier): Only use the innermost
9163 template arguments when mangling.
9164 * pt.c (tsubst_template_argument_vector): New function.
9165 (complete_template_args): Deal with the situation where the
9166 extra_args contain more than one level of arguments.
9167 (lookup_template_class): Deal with member template classes, which
9168 may have more than one level of arguments.
9169 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
9170 Improve handling of member template classes. Use
9171 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
9172 tsubst_template_argument_vector where appropriate.
9173 (regenerate_decl_from_template): Break out from ...
9174 (instantiate_decl): Here.
9176 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
9177 * parse.h: Regenerated.
9178 * parse.c: Really regenerated.
9180 * cp-tree.h (finish_unary_op_expr): New function.
9181 (finish_id_expr): Likewise.
9182 (begin_new_placement): Likewise.
9183 (finish_new_placement): Likewise.
9184 (finish_declarator): Likewise.
9185 (finish_translation_unit): Likewise.
9186 (finish_parmlist): Likewise.
9187 (begin_class_definition): Likewise.
9188 (finish_class_definition): Likewise.
9189 (finish_default_args): Likewise.
9190 (finish_inline_definitions): Likewise.
9191 * parse.y (GCC_ASM_KEYWORD): Remove.
9192 (TYPENAME_ELLIPSIS): Likewise.
9193 * parse.c: Regenerated.
9194 Use new functions in semantics.c in the actions for many rules.
9195 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
9196 * hash.h: Regenerated.
9197 * semantics.c (finish_expr_stmt): Allow NULL expr.
9198 (finish_unary_op_expr): New function, containing
9199 code previously in parse.y.
9200 (finish_id_expr): Likewise.
9201 (begin_new_placement): Likewise.
9202 (finish_new_placement): Likewise.
9203 (finish_declarator): Likewise.
9204 (finish_translation_unit): Likewise.
9205 (finish_parmlist): Likewise.
9206 (begin_class_definition): Likewise.
9207 (finish_class_definition): Likewise.
9208 (finish_default_args): Likewise.
9209 (finish_inline_definitions): Likewise.
9211 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
9213 * typeck.c (build_c_cast): Don't decay arrays and functions to
9214 pointer type when converting to a class type.
9216 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
9218 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
9219 (DECL_CLASS_SCOPE_P): Likewise.
9221 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
9223 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
9224 * decl2.c (constructor_name_full): Likewise.
9226 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
9228 * tree.c (mapcar): Add OVERLOAD support.
9230 * init.c (resolve_offset_ref): We must use basetype_path before we
9231 destroy it with a call to convert_pointer_to.
9233 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9235 * class.c (currently_open_class): New fn.
9236 * decl.c (lookup_name_real): Use it.
9237 * search.c (lookup_field): Likewise.
9239 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
9241 * cp-tree.def (OVERLOAD): New node.
9242 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
9243 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
9244 (NAMESPACE_BINDING): Remove.
9245 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
9247 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
9249 (tree_overload): New struct.
9250 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
9251 (REAL_IDENTIFIER_TYPE_VALUE): Define.
9252 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
9253 (lang_decl_flags): Remove in_namespace.
9254 (lang_decl): Remove chain.
9255 (DECL_CHAIN, DECL_NAMESPACE): Remove.
9256 (flag_honor_std): Declare extern.
9257 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
9258 namespace_binding, set_namespace_binding,
9259 lookup_function_nonclass, cat_namespace_levels,
9260 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
9261 scratch_ovl_cons, ovl_member, build_overload): Declare.
9262 (decl_list_length, get_namespace_id, current_namespace_id,
9263 overloaded_globals_p): Remove.
9264 (lookup_using_namespace, qualified_lookup_using_namespace): Change
9266 (push_scratch_obstack): New macro.
9267 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
9268 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
9270 (build_new_function_call): Iterate using OVL_CHAIN.
9271 Print DECL_NAME in when reporting ambiguities.
9272 (build_object_call): Iterate using OVL_NEXT for fns, convs.
9273 (build_new_op): Call lookup_function_nonclass.
9274 Iterate using OVL_NEXT.
9275 (build_op_delete_call): Change detection of members.
9276 Do not wrap TREE_LIST around fields and single global functions.
9277 (build_over_call): Don't push a class level if the context is a
9279 (build_new_method_call): Iterate using OVL_NEXT.
9280 * class.c (add_method): Chain overloaded members using
9281 build_overload. Remove copying of method.
9282 (grow_method): When iterating through the obstack, expect OVERLOAD
9283 nodes. Chain overload members.
9284 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
9285 nodes in call to get_baselinks.
9286 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
9287 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
9288 fdecls that are OVERLOAD nodes.
9289 (validate_lhs): New function.
9290 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
9291 code. Use DECL_NAME in error messages. Split code between global
9292 and member function processing.
9293 * decl.c (global_type_node): New static variable.
9294 (in_std): New global.
9295 (struct binding_level): New field usings.
9296 (resume_binding_level): Assert that we are not in a class.
9297 (toplevel_bindings_p): Just check for namespace_p or
9299 (resume_level): Remove.
9300 (find_binding): New function.
9301 (binding_for_name): Call it.
9302 (namespace_binding, set_namespace_binding): New functions.
9303 (push_namespace): Associate binding level with new namespace,
9304 resume_binding_level for existing namespace. Remove old code.
9305 Fake std by counting.
9306 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
9307 (maybe_push_to_top_level): Save current namespace.
9308 (pop_from_top_level): Restore saved namespace.
9309 (pop_namespace): Call suspend_binding_level. Remove old code.
9310 (cat_namespace_levels): New function.
9311 (set_identifier_type_value_with_scope): For namespace bindings,
9312 set BINDING_TYPE, and use global_type_node.
9313 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
9314 (identifier_type_value): New function.
9315 (pushtag): If no context, use current_namespace.
9316 (duplicate_decls): Don't process DECL_CHAIN.
9317 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
9318 already set. Never reset it to NULL_TREE. Lookup global variables
9319 in their namespace. Push overloaded templates if they are on
9321 (pushdecl_namespace_level): New function.
9322 (pushdecl_top_level): Implement using pushdecl_namespace_level.
9323 (pushdecl_using_decl): New function.
9324 (overloaded_globals_p): Remove.
9325 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
9326 them. Use namespace_binding and set_namespace_value.
9327 (redeclaration_error_message): Complain if the declarations come
9328 from different namespaces.
9329 (lookup_tag): On namespace level, look in the BINDING_TYPE.
9330 (lookup_namespace_name): Pass tree_bindings from stack. Remove
9332 (select_decl): New function.
9333 (lookup_name_real): Call it for qualified and unqualified lookup.
9334 Pass tree_bindings from the stack.
9335 If prefer_type is 1, also accept namespaces.
9336 (lookup_function_nonclass): New function.
9337 (init_decl_processing): Set the binding level of the global
9338 namespace to global_binding_level.
9339 Build a proper type list for __builtin_apply.
9340 Initialize std_node to "fake std" if flag_honor_std is set.
9341 Initialize global_type_node.
9342 Allocated bad_alloc in namespace std if flag_honor_std.
9343 (define_function): Set the DECL_CONTEXT to the current_namespace.
9344 (start_decl): A namespace is not considered as a context here. If
9345 the DECL_CONTEXT is a namespace, push the decl.
9346 (cp_finish_decl): Check for namespaces used as initializers.
9347 (grokfndecl): Add namespace parameter. Remove processing of
9349 (grokvardecl): Add namespace parameter.
9350 (grokdeclarator): Process SCOPEs that are namespaces. For
9351 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
9352 (start_function): Check for contexts that are namespaces.
9353 Set context for declarations that have not been pushed.
9354 (store_parm_decls): Check for ::main only.
9355 (finish_function): Likewise.
9356 (start_method): Check for contexts that are namespaces.
9357 (start_method): Remove DECL_CHAIN processing.
9358 * decl2.c (flag_honor_std): Declare.
9359 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
9360 (decl_namespace_list): New static global.
9361 (grok_x_components): Ignore namespaces as type contexts.
9362 (check_classfn): Expect OVERLOAD nodes.
9363 (grokfield): Remove DECL_CHAIN processing.
9364 (finish_file): Call cat_namespace_levels.
9365 (merge_functions): New function.
9366 (ambiguous_decl): Rewrite.
9367 (lookup_using_namespace): Produce tree_bindings.
9368 (qualified_lookup_using_namespace): Likewise.
9369 (set_decl_namespace, decl_namespace, current_decl_namespace,
9370 push_decl_namespace, pop_decl_namespace): New functions.
9371 (arg_lookup): New struct.
9372 (add_function, arg_assoc_namespace, arg_assoc_class,
9373 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
9375 (get_namespace_id, current_namespace_id): Remove.
9376 (do_toplevel_using_decl): Rewrite.
9377 (do_class_using_decl): Complain about namespace qualifiers.
9378 (do_using_directive): Sorry if not on namespace level. Complain
9379 about unknown namespaces.
9380 * error.c (dump_aggr_type): Check for namespace contexts.
9381 * except.c (init_exception_processing): Push terminate into std.
9382 * friend.c (is_friend): A namespace is not a context, here.
9383 * init.c (expand_member_init): Remove DECL_CHAIN processing.
9384 (build_offset_ref): Process OVERLOAD nodes.
9385 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
9386 * lex.c (identifier_type): Loop using OVL_CHAIN.
9387 (see_typename): Set looking_for_typename to 2.
9388 (real_yylex): Likewise.
9389 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
9390 (do_scoped_id): Expect OVERLOAD nodes.
9391 Change calling convention for qualified_lookup_using_namespace.
9392 (build_lang_decl): Don't set in_namespace anymore.
9393 * method.c (typevec_size): New global.
9394 (build_overload_nested_name): Return if global_namespace.
9395 Otherwise, always expect a declaration context.
9396 (build_qualified_name): Likewise.
9397 Make sure we don't write beyond typevec_size.
9398 (build_decl_overload_real): Likewise.
9399 Allocate one extra slot for the namespace.
9400 (hack_identifier): Mark code dead.
9401 Process OVERLOAD and NAMESPACE_DECL nodes.
9402 * parse.y (program): Pop namespaces until in global namespace.
9403 (extdef): In a using-declaration, don't discard the identifier if
9404 there is no declaration.
9405 (left_curly): Ignore type contexts which are namespaces.
9406 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
9408 * pt.c (template_class_depth): Expect types to be namespaces.
9409 (determine_specialization): Simplify by expecting OVERLOAD nodes.
9410 (push_template_decl): Push into namespace level.
9411 Reset ctx if it is a namespace.
9412 Set DECL_CONTEXT to current_namespace if not set already.
9413 Ignore real contexts that are namespaces.
9414 (mangle_class_name_for_template): Skip global_namespace.
9415 Mangle other namespaces as declarations.
9416 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
9417 (lookup_template_class): Push into namespace of context.
9418 If the context is a namespace, set it to global_namespace.
9419 Use id_context for mangling.
9420 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
9421 (tsubst_friend_function): Ignore namespace contexts.
9422 Push into namespace level.
9423 (tsubst): Handle NAMESPACE_DECL nodes.
9424 Remove DECL_CHAIN processing.
9425 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
9426 * ptree.c (print_lang_identifier): Print bindings.
9427 (lang_print_xnode): Print OVERLOAD nodes.
9428 * rtti.c (init_rtti_processing): Push type_info into std.
9429 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
9430 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
9431 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
9432 lookup_fnfields_here): Likewise.
9433 Process all nodes, instead of going through TREE_CHAIN.
9434 * sig.c (build_signature_pointer_or_reference_type): Set context
9435 to global_namespace.
9436 (build_signature_table_constructor): Expect OVERLOAD nodes.
9437 * spew.c (yylex): Save old setting of looking_for_typename.
9438 * tree.c (decl_list_length): Remove.
9439 (binding_init): New function.
9440 (count_functions): Rewrite.
9441 (is_overloaded_fn): Expect OVERLOAD nodes.
9442 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
9443 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
9444 ovl_member): New functions.
9445 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
9446 (type_unknown_p): Likewise.
9447 (require_instantiated_type): Likewise.
9448 (build_component_ref): Declare code dead.
9449 (build_x_function_call): Create and expect OVERLOAD nodes.
9450 (build_function_call_real): Check for ::main only.
9451 (build_unary_op): Likewise. Expect OVERLOAD nodes.
9452 (convert_for_assignment): Check for TREE_LIST before accessing
9454 * decl.c (duplicate_decls): Check for namespace bindings instead
9456 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
9457 lookup_name_current_level, start_decl, xref_tag,
9458 finish_enum): Likewise.
9459 * init.c (build_offset_ref): Likewise.
9460 * search.c (lookup_field): Likewise.
9461 (lookup_fnfields): Likewise.
9462 (dfs_debug_mark): Likewise.
9463 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
9464 (poplevel_class, pop_from_top_level): Likewise.
9465 * decl2.c (finish_method): Likewise.
9466 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
9467 * decl.c (record_builtin_type): Likewise.
9468 (init_decl_processing, grokfndecl): Likewise.
9469 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
9470 (make_lang_type): Likewise.
9471 * parse.y (make_thunk): Likewise.
9472 * pt.c (tsubst): Likewise.
9473 * tree.c (debug_binfo): Likewise.
9474 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
9475 tinfo2.cc, inc/new.h: Add std qualifications.
9476 * inc/new: Wrap with namespace std if __HONOR_STD.
9477 * inc/typeinfo: Likewise.
9479 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
9481 * call.c (build_user_type_conversion_1): Handle second_conv
9482 properly for templates.
9484 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
9486 * method.c (build_decl_overload_real): Set TREE_USED flag to
9487 zero for build_type_variants nodes as well.
9489 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
9491 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
9493 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
9495 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
9496 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
9497 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
9498 xref.o): Add toplev.h dependencies.
9500 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
9502 * errfn.c (cp_error, cp_warning): Remove declarations for
9503 error and warning respectively.
9505 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9507 * error.c: Convert to using ctype macros defined in system.h.
9508 * method.c: Likewise.
9510 * lex.c: Likewise. Also remove redundant system header stuff.
9512 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
9514 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
9515 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
9516 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
9517 xref.c: Add include of toplev.h.
9519 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
9521 * tree.c (perm_manip): Also regenerate the RTL of an extern.
9522 (copy_to_permanent): Use end_temporary_allocation.
9524 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
9526 * init.c (expand_vec_init): The initialization of each array
9527 element is a full-expression.
9529 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
9531 * method.c (build_mangled_name): Add a call to build_type_variant
9532 to get the right type.
9534 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
9536 * Makefile.in: Add .SUFFIXES.
9538 * cp-tree.def: Remove NAMESPACE_DECL.
9540 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
9542 * call.c (build_over_call): Do evaluate arg even if it has empty
9544 * decl.c (start_function): Don't push a member function.
9546 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
9548 * Makefile.in (g++FAQ.info): Put -o option before input file.
9550 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
9552 * gxxint.texi: Add info for squangling codes K and B.
9554 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
9556 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
9557 the expression in templates.
9558 (finish_stmt_expr): Likewise.
9560 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
9562 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
9564 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
9566 * decl.c (maybe_push_to_top_level): Always clear
9567 current_template_parms and processing_template_decl.
9568 (pushtag): Remove check of current_class_type and some comments,
9569 since maybe_push_to_top_level no longer creates confusion.
9571 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
9573 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
9574 (DECL_CLASS_TEMPLATE_P): Likewise.
9575 (DECL_PRIMARY_TEMPLATE): Likewise.
9576 (PRIMARY_TEMPLATE_P): Use it.
9577 (push_template_decl_real): New function.
9578 (redeclare_class_template): Take new template parameters as
9580 (is_specialization_of): New function.
9581 (comp_template_args): Declare.
9582 * decl.c (pushtag): Handle friend template classes.
9583 (xref_tag): Likewise. Use new calling convention for
9584 redeclare_class_template.
9585 * decl2.c (grok_x_components): Handle friend templates.
9586 * friend.c (is_friend): Use is_specialization_of where
9587 appropriate. Deal with friend class templates.
9588 (make_friend_class): Let a class template be friends with itself.
9589 * pt.c (comp_template_args): Remove declaration.
9590 (tsubst_friend_class): New function.
9591 (push_template_decl_real): New function.
9592 (push_template_decl): Use it.
9593 (redeclare_class_template): Adjust for new calling convention.
9594 (comp_template_args): Give it external linkage.
9595 (instantiate_class_type): Use tsubst_friend_class to deal
9596 with friend templates.
9597 * typeck.c (comptypes): Use comp_template_args, rather than
9598 expanding it inline.
9599 * parse.y (component_decl): Handle a nested template type
9600 like other component type declarations.
9602 * pt.c (check_explicit_specialization): Handle overloaded
9603 constructors correctly.
9605 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
9606 (lookup_template_class): Use it.
9608 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
9610 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
9611 * cp-tree.h: Add WRAPPER support.
9612 * call.c (add_candidate): Split out from add_*_candidate fns.
9613 (build_over_call): Take the candidate instead of function and args.
9614 Enforce access control here. Emit overload warnings here.
9615 (add_warning): New fn.
9616 (joust): Add WARN parm. If not set, call add_warning instead of
9617 printing a warning. Re-enable some warnings.
9619 (convert_like): Adjust.
9620 (build_new_op): Adjust.
9621 (build_new_function_call): Adjust.
9622 (build_user_type_conversion_1): Adjust.
9623 (USER_CONV_FN): Adjust.
9624 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
9625 build_int_wrapper): New fns.
9627 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
9629 * pt.c (unify): Fix typo in previous change.
9631 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9633 * error.c (dump_type_real): Declare canonical_name.
9635 * typeck.c (comp_target_types): Fix PMFs.
9637 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
9639 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
9640 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
9643 * pt.c (tsubst): Decrease the template-level of
9644 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
9645 TEMPLATE_PARM_INDEX.
9646 (template_decl_level): New function.
9647 (unify): Make sure to record unifications for template
9648 parameters, even when the parameters exactly match the arguments.
9649 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
9650 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
9651 aren't from the level we're currently working on.
9653 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
9655 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
9657 * decl2.c (check_member_template): Set DECL_IGNORED for member
9658 class templates, too.
9660 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
9662 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9664 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
9666 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
9668 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
9669 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
9670 (init_decl_processing): Handle TI types.
9671 * typeck.c (unsigned_type, signed_type): Handle TI types.
9673 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
9675 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
9676 New local added_libraries. Increment count when add library to
9679 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
9681 * cp-tree.h (type_as_string_real): New function.
9682 * pt.c (mangle_class_name_for_template): Use it.
9683 * error.c (dump_aggr_type): Change prototype.
9684 (dump_type_prefix): Likewise.
9685 (dump_type_suffix): Likewise.
9686 (dump_type_real): Convert from dump_type. If desired, the
9687 "canonica" name of a typedef, i.e., the name of the underlying
9688 type, can be printed.
9689 (dump_type): Call dump_type_real.
9691 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
9693 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
9695 * typeck.c (comp_target_types): Tweak pedantic case.
9696 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
9697 Return -1 or 1 instead of 1 or 2.
9698 (compparms): Remove STRICT handling.
9699 (convert_for_assignment): Fix handling of pmfs.
9701 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
9703 * typeck.c (comp_target_types): Handle references like pointers.
9704 (comp_target_parms): Note that return code from comp_target_types
9705 can be negative to indicate failure.
9707 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9709 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
9710 which requires a working target compiler to build.
9712 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
9714 * tree.c (avoid_overlap): Add prototype.
9716 * spew.c (num_tokens): Add prototype.
9717 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
9719 * search.c (dfs_check_overlap): Add prototype.
9720 (dfs_no_overlap_yet): Likewise.
9722 * pt.c (original_template): Add prototype.
9723 (inline_needs_template_parms): Likewise.
9724 (push_inline_template_parms_recursive): Likewise.
9725 (retrieve_specialization, register_specialization): Likewise.
9726 (print_candidates, reduce_template_parm_level): Likewise.
9727 (build_template_decl, mark_template_parm): Likewise.
9728 (tsubst_friend_function, get_bindings_real): Likewise.
9730 * method.c (start_squangling): Add prototype.
9731 (end_squangling, check_ktype, issue_ktype): Likewise.
9732 (build_overloaded_scope_ref, check_btype): Likewise.
9733 (build_mangled_template_parm_index): Likewise.
9735 * lex.c (init_cpp_parse): Add prototype.
9736 (handle_cp_pragma, handle_sysv_pragma): Likewise.
9737 (reduce_cmp, token_cmp): Likewise.
9739 * except.c (call_eh_info): Add prototype.
9740 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
9741 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
9743 * decl2.c (is_namespace_ancestor): Add prototype.
9744 (namespace_ancestor, add_using_namespace): Likewise.
9745 (ambiguous_decl): Likewise.
9747 * decl.c (indent): Add prototype.
9749 * call.c (add_template_candidate_real): Add prototype.
9751 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
9753 * decl2.c (build_expr_from_tree): Just return a PMF.
9755 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
9757 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
9758 when doing initializations.
9760 * pt.c (unify): Use comptypes to compare type args.
9762 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
9764 * decl.c (duplicate_decls): Fix check for when it's safe to free
9767 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
9770 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
9772 * pt.c (build_template_parm_index): Add prototype.
9774 * search.c (my_tree_cons): Don't clear words outside the
9775 newly allocated node.
9777 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
9779 * lex.c (init_parse): Now returns char* containing the filename.
9781 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
9782 Jeff Law <law@cygnus.com>
9784 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
9787 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9789 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
9791 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
9793 * decl.c (duplicate_decls): Don't warn for redundant decls if
9794 friend: let add_friend take care of it.
9796 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9798 * sig.c (build_signature_pointer_constructor): Don't set
9799 TREE_HAS_CONSTRUCTOR for a signature pointer.
9800 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
9801 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
9803 * typeck.c (build_unary_op): Only allow taking the address of a
9805 * typeck2.c (digest_init): Simplify.
9806 (store_init_value): Don't pedwarn about using { } for pmfs.
9808 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
9810 * cp-tree.h (start_decl): Update prototype.
9811 * decl.c (start_decl): Like the C version, new parameters
9812 for the attributes. Call cplus_decl_attributes here,
9813 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
9814 (grokdeclarator): Pass NULL for new start_decl arguments.
9815 * pt.c (tsubst_expr): Likewise.
9816 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
9817 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
9818 * lex.c (build_lang_decl): Add lang_name_java.
9819 * class.c (push_lang_context): Add lang_name_java.
9820 * method.c (build_mangled_name): Check for is_java_type.
9822 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
9824 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
9825 * call.c (build_scoped_method_call): Check for TREE_CODE for
9826 VOID_TYPE instead of type == void_type_node.
9827 (build_method_call): Likewise.
9828 * decl.c (lookup_name_real): Likewise.
9829 (grokdeclarator): Likewise.
9830 (start_decl): Likewise.
9831 (grokparms): Likewise.
9832 (start_function): Likewise.
9833 (finish_function): Likewise.
9834 (start_method): Likewise.
9836 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
9838 * lex.c (finput): New variable.
9839 (init_cpp_parse): Renamed from init_parse.
9840 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
9841 (finish_parse): New function.
9842 * cp-tree.h (init_lex, init_parse): Remove declarations.
9844 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
9846 * call.c (build_call): Still evaluate the actual argument.
9847 * class.c (is_empty_class): Update for -fnew-abi.
9849 * decl2.c: -fnew-abi implies -fsquangle.
9851 * method.c (do_build_assign_ref): Don't do anything to copy
9853 (do_build_copy_constructor): Likewise.
9854 * call.c (build_over_call): Likewise.
9856 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9858 * tree.c (avoid_overlap): Return a value.
9860 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
9862 * method.c (check_btype): Add missing argument to xrealloc.
9863 (check_ktype): Likewise.
9865 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9867 Implement empty base optimization.
9868 * class.c (finish_struct_1): Add vbase fields earlier. Set
9869 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
9870 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
9871 (types_overlap_p): New fn.
9872 * tree.c (avoid_overlap): New fn.
9873 (build_base_fields): Use it to avoid overlapping empty bases.
9874 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
9876 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
9878 Re-implement allocation of base class subobjects.
9879 * tree.c (unshare_base_binfos): New fn.
9880 (layout_basetypes): Use it. Now handles offsets of both virtual and
9881 non-virtual bases, after layout_type.
9882 (layout_vbasetypes): Remove.
9883 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
9884 (build_vbase_pointer_fields): Split out from old layout_basetypes.
9885 * class.c (finish_base_struct): Lose offset handling code.
9886 Move nonvdtor warning here. Don't mess with t_binfo anymore.
9887 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
9888 * cp-tree.h: Adjust.
9890 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
9892 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
9893 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
9894 * class.c (duplicate_tag_error): Likewise.
9895 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
9896 * tree.c (layout_vbasetypes): Update from layout_record, remove
9897 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
9898 (layout_basetypes): Likewise.
9900 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
9902 * class.c, Make sure system.h is included just after config.h.
9903 Delete lingering stdio and errno references too.
9904 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
9906 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
9908 * friend.c (is_friend): Fix access control for local classes.
9910 * class.c (is_empty_class): New fn.
9911 * call.c (build_call): Don't pass empty class objects to a function.
9913 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
9915 * call.c (build_over_call): Do name resolution for default
9916 arguments of function templates in the scope of the templates.
9918 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
9920 * call.c: Include system.h. Remove includes, declarations and
9921 defines provided by system.h.
9922 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
9923 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
9924 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
9925 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
9926 * typeck2.c, xref.c: Likewise.
9927 * Makefile.in: Dependencies updated as appropriate.
9928 * Make-lang.in: Likewise.
9930 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
9932 * pt.c (fn_type_unification): Allow incomplete unification without
9933 an immediate error message.
9935 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
9937 * tree.c (member_p): New fn.
9938 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
9939 initializing class members.
9941 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
9942 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
9944 * call.c (build_method_call): Handle non-scoped destructors, too.
9945 * pt.c (tsubst_copy): Likewise.
9947 * pt.c (print_template_context): Split out...
9948 (push_tinst_level): ...from here.
9950 * friend.c (is_friend): Don't pass a type to decl_function_context.
9952 * typeck.c (convert_for_initialization): Always hand off
9953 conversions to class type.
9955 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9957 * friend.c (is_friend): Local classes have the same access as the
9960 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
9962 * typeck.c (expand_target_expr): Delete dead function.
9964 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
9966 * repo.c (save_string): Delete dead function.
9968 * method.c (thunk_printable_name): Delete dead function.
9970 * lex.c (yynextch): Delete dead function.
9972 * expr.c (tree_extract_aggr_init): #if 0 out.
9974 * except.c (do_unwind): Delete dead function.
9975 (easy_expand_asm): Likewise.
9977 * cvt.c (build_conversion_type_1): Delete dead function.
9979 * cp-tree.h (push_expression_obstack): Declare.
9981 * call.c (source_type): #if 0 out.
9983 * class.c (alter_access): Remove unused label. Add braces
9984 around empty else clause.
9986 * lex.c (yyprint): Fix argument to printf.
9988 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
9990 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
9992 * pt.c (instantiate_class_template): Make sure template
9993 arguments are permanent.
9994 * init.c (resolve_offset_ref): Don't go looking around in
9997 * semantics.c: Add routines to handle expressions, and some
9998 declaration processing.
9999 * parse.y: Use them.
10000 (current_class_depth): Move declaration to cp-tree.h.
10001 * parse.c: Regenerated.
10002 * cp-tree.h: Use them.
10003 (current_class_depth): Declare.
10004 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
10006 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
10008 * error.c (dump_decl): Be a bit more explicit with template
10009 type arguments, when verbose.
10011 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
10013 * inc/exception: Reorder closing braces.
10015 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
10017 * pt.c (redeclare_class_template): New function.
10018 * cp_tree.h (redeclare_class_template): Declare it.
10019 * decl.c (xref_tag): Use it.
10021 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
10023 * call.c (build_over_call): Check IS_AGGR_TYPE, not
10024 TYPE_LANG_SPECIFIC.
10025 * typeck.c (convert_arguments): Likewise.
10027 * decl.c (grokdeclarator): Remove const and volatile from type after
10028 setting constp and volatilep.
10030 * class.c (finish_struct_1): Don't warn about bool bitfield larger
10033 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
10035 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
10037 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
10039 * call.c (build_object_call): Complain about ambiguous operator(),
10040 rather that crashing.
10041 (build_new_op): Likewise.
10042 (build_op_delete_call): Likewise.
10044 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
10046 * cvt.c (perform_qualification_conversions): Use comp_target_types
10047 instead of comp_ptr_ttypes.
10049 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
10051 * cp-tree.h (enforce_access): Declare.
10052 * call.c (enforce_access): Make it extern, not static.
10053 * class.c (alter_access): Use enforce_access; modify code for ISO
10054 compliance, rather than ARM rules.
10056 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10058 * cp-tree.h: Fix typo.
10060 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
10062 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
10063 if (aggregate_value_p (type)).
10065 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
10067 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
10069 * tree.c (mapcar): When dealing with a DECL, use it's constant
10071 * pt.c (lookup_template_class): Don't mangle the names of template
10072 classes whose arguments are unknown.
10074 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
10076 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
10078 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
10080 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
10082 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
10083 boolean_type_node to 1.
10085 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
10087 * error.c (dump_expr): Remove unused variable `l'.
10089 * pt.c (for_each_template_parm): New function, created by
10090 converting uses_template_parms.
10091 (tree_fn_t): New typedef.
10092 (uses_template_parms): Use it.
10093 (mark_template_parm): New function.
10094 (push_template_decl): Check that the argument list of a partial
10095 specialization uses all the template parameters.
10097 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
10098 with it; we might want it for debugging.
10099 * cp-tree.h (type_unification): Change interface.
10100 * class.c (finish_struct_1): Skip nested template types, just like
10101 ordinary nested types.
10102 (instantiate_type): Use new interface to type_unification.
10103 * lex.c (init_lex): Add __sz as opname for sizeof.
10104 * method.c (build_overload_scope_ref): New function.
10105 (build_overload_int): Handle complex expressions. Set
10106 numeric_output_need_bar if necessary.
10107 (build_overload_value): Handle non-PARM_DECL nodes; this
10108 routine is now used by build_overload_int. Remove some
10109 assignments to numeric_output_need_bar. Use
10110 build_overload_scope_ref.
10111 (build_qualified_name): Note that some template mangled names end
10112 with digits, and set numeric_output_need_bar appropriately. Use
10113 build_underscore_int.
10114 * pt.c (unify): Change interface.
10115 (type_unification_real): Likewise.
10116 (determine_specialization): Use new interfaces.
10117 (tsubst): Deal gracefully with situations in which the argument
10118 vector is not fully filled.
10119 (fn_type_unification): Use new interfaces.
10120 (type_unification): Likewise. Remove NOP_EXPR hack.
10121 (type_unification_real): Likewise.
10122 (unify): Likewise. Deal with unification of complex expressions.
10124 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10126 * pt.c (complete_template_args): Initialize skip properly.
10128 * decl.c (make_typename_type): Revert.
10129 (make_implicit_typename): Remove.
10130 (lookup_name_real): Don't call it. Call lookup_field if we see a
10131 TYPE_DECL from a template base.
10132 * search.c (lookup_field): Do implicit typename stuff.
10134 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
10135 Geoff Noer <noer@cygnus.com>
10137 * Makefile.in: Various fixes for building cygwin32 native toolchains.
10138 * Make-lang.in: Likewise.
10140 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10142 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
10144 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
10146 * decl.c (make_implicit_typename): Rewrite removed code.
10147 (make_typename_type): Call it if the type we look up comes from
10148 a base that uses template parms.
10150 * pt.c (complete_template_args): Rewrite.
10151 (tsubst, FUNCTION_DECL): Use it.
10153 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
10155 * semantics.c (finish_asm_stmt): Fix combine strings. Call
10156 c_expand_asm_operands () if output_operands, input_operands or
10157 clobbers is not NULL_TREE.
10159 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10161 * pt.c (complete_template_args): New function.
10162 (get_bindings): Deal with specializations of function templates
10163 with return type containing parameters from outer class
10165 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
10166 substitute arguments and compose a new type.
10168 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
10170 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
10173 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
10175 * decl.c (make_implicit_typename): Lose useless code.
10177 * call.c (standard_conversion): Handle A* -> const A* properly.
10179 * pt.c (get_bindings_real): Rename from get_bindings. Add
10180 check_rettype parm.
10181 (get_bindings): Pass 1.
10182 (get_bindings_overload): Pass 0.
10184 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
10186 * pt.c (check_explicit_specialization): When reverting a static
10187 member function, also remove the `this' parameter from
10188 last_function_parms.
10190 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
10192 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
10193 a function context.
10195 * decl.c (store_bindings): Use free_binding_vecs.
10196 (pop_from_top_level): Likewise.
10198 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
10200 * decl.c (make_implicit_typename): Only change the type of a
10203 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
10205 * semantics.c: New file, containing routines to perform the
10206 semantic phase of parsing.
10208 * pt.c (tsubst_expr): Likewise.
10209 * cp-tree.h: Declare the various functions in semantics.c.
10210 Provide macros to access _STMT tree nodes.
10211 * cp-tree.def: Add ASM_STMT tree node.
10212 * Makefile.in, Make-lang.in: Add dependencies on and for
10215 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
10217 * pt.c (push_template_decl): Only check primary templates.
10219 * pt.c (check_explicit_specialization): Complain about default args
10220 in explicit specialization.
10222 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
10223 constructor_declarator.
10225 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
10227 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
10228 has no overloaded operator ->.
10230 * call.c (build_field_call): Don't crash when presented with a
10231 field that is actually a nested type.
10233 * decl.c (pushtag): Deal with friend class injection in local
10236 * call.c (build_object_call): Don't crash if OBJ is a
10237 pointer-to-member-function.
10239 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
10241 * pt.c (push_template_decl): Complain about template with C linkage,
10242 anonymous template class.
10244 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
10246 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
10247 * search.c: Likewise.
10249 * lex.c (do_pending_defargs): Only call
10250 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
10252 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
10254 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
10256 * parse.y: Deal with CONSTRUCTORS in new_initializers.
10258 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
10260 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
10261 closely mimics the behavior in parse.y.
10262 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
10263 into a compound statement.
10265 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
10267 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
10268 * pt.c (inline_needs_template_parms): New fn.
10269 (original_template): New fn.
10270 (push_inline_template_parms_recursive): New fn.
10271 (maybe_begin_member_template_processing): Use them.
10272 (maybe_end_member_template_processing): Likewise.
10273 (is_member_or_friend_template): Rename to is_member_template.
10274 Member functions of local classes are never member templates.
10276 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10278 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
10279 added in the class scope to catch redefinition error.
10281 * pt.c (reduce_template_parm_level): Also copy
10282 the DECL_TEMPLATE_PARMS field.
10284 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
10286 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
10287 reduced-level template type parameter.
10289 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
10291 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
10292 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
10293 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
10294 * decl.c (duplicate_decls): Propagate it.
10295 * typeck2.c (abstract_virtuals_error): Use two loops to emit
10296 abstract virtual functions and virtual functions which need a
10297 final overrider separately.
10299 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
10301 * lang-specs.h: Properly put brackets around array elements in
10304 * typeck.c (build_binary_op_nodefault): Correctly place parens around
10305 && and || in expression.
10307 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
10309 * call.c (default_parm_conversions): Remove prototype definition.
10310 (build_method_call): Remove unused variable result.
10312 * cvt.c (ocp_convert): Remove unused variable conversion.
10314 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
10316 * except.c (do_unwind): #if 0 definition of unused variables fcall
10319 * expr.c (extract_scalar_init): #if 0 prototype and function
10322 * init.c (expand_aggr_init_1): Remove unused variable init_type.
10323 (build_new_1): Remove unused variable t.
10325 * pt.c (instantiate_class_template): Remove unused variable newtag;
10326 cast called function return value to void.
10327 (do_decl_instantiation): Remove unused variables name and fn.
10329 * tree.c (get_type_decl): Add default return to shut up compiler from
10330 complaining control reaches end of non-void function.
10332 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
10334 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
10336 * call.c (default_parm_conversions): Remove prototype definition.
10337 (build_method_call): Remove unused variable result.
10338 (build_over_call): Add default case in enumeration switch.
10340 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
10342 * decl2.c (lang_decode_option): Change j's type to size_t.
10344 * tree.c (layout_vbasetypes): record_align and desired_align are of
10345 type unsigned int; const_size and nonvirtual_const_size likewise.
10347 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
10349 * parse.y (new_initializer): Make sure all initializers are
10352 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
10354 * decl2.c (import_export_decl): Mark tinfo functions for
10355 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
10357 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
10359 * method.c: Fix typo.
10361 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10363 * method.c: Include "system.h" to get stdlib.h, stdio.h,
10364 ctype.h, string.h, etc.
10365 (issue_nrepeats): Add default case in enumeration switch.
10366 (check_btype): Likewise.
10367 (process_overload_item): Likewise.
10369 * Makefile.in (method.o): Depend on system.h.
10371 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10373 * lex.c (do_scoped_id): Fix parenthesizing.
10375 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
10377 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
10378 FLAG_RTTI is unset, initialize type info machinery and continue
10379 with FLAG_RTTI enabled.
10380 (get_typeid): Likewise.
10382 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
10384 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
10387 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
10389 * pt.c (finish_member_template_decl): Deal more gracefully with
10390 invalid declarations.
10392 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
10394 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
10395 cp-tree.h: Clean up more old overloading code, old RTTI code, and
10396 some formatting quirks.
10398 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
10399 method.c, pt.c, ptree.c, typeck.c: Remove support for
10400 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
10402 * Makefile.in: Adjust.
10404 * pt.c (unify): Don't allow reduced cv-quals when strict.
10406 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
10407 *type_unification* and unify.
10409 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
10411 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
10412 (nested_name_specifier): And add it before this use.
10413 (typename_sub0): And this use. Also add use without the keyword.
10414 (typename_sub1): Likewise.
10415 * pt.c (instantiate_class_template): Don't actually instantiate
10416 anything if our type uses template parms.
10418 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
10420 * decl.c (start_function): Don't call temporary_allocation for a
10423 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10425 * pt.c (instantiate_class_template): Don't mess with friends if
10426 our type uses template parms.
10428 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
10430 * parse.y (nested_name_specifier): Use explicit_template_type.
10431 (typename_sub): Allow a template_type, an explicit_template_type,
10432 or an implicit template type at the end.
10433 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
10434 * decl.c (make_typename_type): Handle template-id where the name
10435 is a TEMPLATE_DECL.
10436 * call.c (build_scoped_method_call): Handle member template
10438 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
10439 destructor is represented by the type.
10441 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
10442 * parse.y (nested_name_specifier): Add 'template' case.
10443 (explicit_template_type): New rule.
10444 (typename_sub): Use it.
10445 * decl.c (make_typename_type): Handle getting a template-id for NAME.
10446 * pt.c (tsubst): Likewise.
10448 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
10450 * pt.c (add_to_template_args): Fix thinko.
10451 (instantiate_class_template): Call it later.
10453 * pt.c (get_class_bindings): Add outer_args parm.
10454 (most_specialized_class): Likewise.
10455 (instantiate_class_template): Pass it.
10456 (more_specialized_class): Likewise.
10457 (lookup_template_class): Get context from template if none
10459 (finish_member_template_decl): Don't do anything with a
10460 partial specialization.
10461 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
10463 * class.c (finish_struct): Member class templates have already been
10464 checked for name clashes.
10465 * decl.c (pushdecl_with_scope): Handle pushing at class level.
10467 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
10469 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
10470 (tsubst, *_PARM): Support multiple levels of template classes.
10471 (instantiate_class_template): Look up the pattern from the
10473 (lookup_template_class): Handle getting a template for d1.
10474 (push_template_decl): Correct setting of 'primary'.
10475 (reduce_template_parm_level): Add 'levels' parm.
10476 (finish_member_template_decl): Support member class templates.
10477 (template_class_depth): Handle multiple levels.
10478 * parse.y (component_decl_1, fn.def2): Remove member template case.
10479 (component_decl): Add member template cases.
10480 * decl2.c (check_member_template): We now handle member template
10482 * decl.c (pushtag): Handle member templates.
10483 * method.c (do_inline_function_hair): Don't touch
10484 IDENTIFIER_GLOBAL_VALUE.
10485 * init.c (build_offset_ref): If name isn't an identifier, just
10487 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
10489 * typeck.c (get_delta_difference): Do adjust for conversions to
10490 and from virtual base.
10492 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
10494 * typeck.c (get_delta_difference): Give hard error for conversion
10497 * cp-tree.h: Tweak formatting.
10499 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
10501 * decl.c (push_namespace): Handle redeclaration error.
10503 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
10504 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
10505 (NAMESPACE_BINDING): New macro.
10506 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
10509 * pt.c (push_template_decl): Use innermost_args.
10511 * decl.c (get_unique_name): Tweak from earlier in the name.
10513 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
10515 * cp-tree.def: Add CPLUS_BINDING node.
10516 * cp-tree.h (tree_binding): New struct.
10517 (BINDING_SCOPE, BINDING_VALUE): New macros.
10518 (current_namespace, global_namespace): Declare extern.
10519 (struct lang_decl_flags): New field in_namespace.
10520 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
10521 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
10522 (TREE_INDIRECT_USING): New macro.
10523 * decl2.c (current_namespace, global_namespace): Declare. The
10524 value is a NAMESPACE_DECL now, not a TREE_LIST.
10525 (is_namespace_ancestor, namespace_ancestor): New static functions.
10526 (add_using_namespace, ambiguous_decl): Likewise.
10527 (lookup_using_namespace): New support function for lookup_name.
10528 (qualified_lookup_using_namespace): New support function for
10529 do_scoped_id and lookup_namespace_name.
10530 (get_namespace_id): Mark as obsolete.
10531 (current_namespace_id): Likewise.
10532 (do_namespace_alias): Implement.
10533 (do_using_directive): Implement as call to add_using_namespace.
10534 * decl.c (binding_for_name): New function.
10535 (push_namespace, pop_namespace): Implement.
10536 (push_decl): Don't install a FUNCTION_DECL in the global branch.
10537 (lookup_namespace_name): Implement using qualified lookup.
10538 (lookup_name_real): For global scoping, lookup in
10539 global_namespace. For namespace scoping, lookup in given
10540 namespace. For unscoped lookup, iterate over namespace,
10541 considering using directives.
10542 (init_decl_processing): Initialize global_namespace.
10543 (grokvardecl): Build assembler name as static name for globals.
10544 (grokdeclarator): Remove old namespace mangling.
10545 (xref_tag): When installing a global binding for the
10546 tag, make sure we have an identifier.
10547 * method.c (build_overload_nested_name): Mangle namespaces.
10548 (build_qualified_name): Likewise.
10549 (build_decl_overload_real): Likewise.
10550 * lex.c (build_lang_decl): Set namespace for new declaration to
10552 (do_scoped_id): Find global names in global or current
10553 namespace, or using qualified namespace lookup, depending on
10555 * init.c (build_member_call): When scope is namespace, use
10556 build_x_function_call instead.
10557 (build_offset_ref): When scope is namespace, collapse processing
10558 to lookup_namespace_name instead.
10559 * error.c (dump_decl): Support NAMESPACE_DECL.
10560 * decl.c (pushdecl): Bind globals to current namespace.
10561 (push_overloaded_decl): Likewise.
10562 (lookup_tag): Likewise.
10563 (lookup_name_current_level): Likewise.
10564 (xref_tag): Likewise.
10565 (start_function): Likewise.
10566 * lex.c (do_identifier): Likewise.
10567 (identifier_typedecl_value): Likewise.
10568 (real_yylex): Likewise.
10569 * method.c (do_inline_function_hair): Likewise.
10570 * parse.y (unscoped): Likewise.
10571 * pt.c (check_explicit_specialization): Likewise.
10572 (lookup_template_class): Likewise.
10573 * rtti.c (call_void_fn): Likewise.
10574 * sig.c (build_sigtable): Likewise.
10575 * ptree.c (lang_print_xnode): New function.
10577 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
10579 * pt.c (instantiate_class_template): Don't instantiate if pedantic
10580 and the args use template parms.
10582 * pt.c (push_tinst_level): If the instantiation uses template parms,
10584 * decl.c (xref_basetypes): Do call complete_type for basetypes
10585 that involve template parameters.
10587 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
10589 * typeck2.c (process_init_constructor): Fix labeled init check.
10591 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
10593 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
10594 argument to tsubst and friends.
10596 * pt.c (tsubst, FUNCTION_DECL): Tidy.
10598 * typeck.c (build_x_function_call): Handle static member function
10599 templates like non-templates. Handle friend templates like normal
10600 function templates.
10601 * pt.c (tsubst, *_PARM): Don't use orig_level.
10602 (get_bindings): Don't call add_to_template_args.
10603 (instantiate_template): Likewise.
10604 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
10605 * ptree.c (print_lang_type): Print index/level for template parms.
10607 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
10609 * Make-lang.in (cc1plus): Note that cc1plus depends on
10610 cp/cp-tree.h and cp/cp-tree.def.
10612 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
10613 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
10614 position in a template parameter list.
10615 * cp-tree.h (template_parm_index): New structure, used as the tree
10616 structure for a TEMPLATE_PARM_INDEX.
10617 (TEMPLATE_PARM_IDX): New macro.
10618 (TEMPLATE_PARM_LEVEL): Likewise.
10619 (TEMPLATE_PARM_DESCENDANTS): Likewise.
10620 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
10621 (TEMPLATE_PARM_DECL): Likewise.
10622 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10623 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
10624 (TEMPLATE_TYPE_DECL): Likewise.
10625 (TEMPLATE_CONST_IDX): Remove.
10626 (TEMPLATE_CONST_LEVEL): Likewise.
10627 (TEMPLATE_CONST_SET_INFO): Likewise.
10628 (TEMPLATE_TYPE_SET_INFO): Likewise.
10629 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
10631 (TEMPLATE_TYPE_LEVEL): Likewise.
10632 * decl.c (decls_match): Call comp_template_parms, rather than
10633 expanding it inline.
10634 (duplicate_decls): If two template declarations are being merged,
10635 then their TEMPLATE_INFOs should be merged as well.
10636 (grokfndecl): Save template-id information when declaring a friend
10637 with explicit template arguments. Pass arguments to
10638 check_explicit_specialization via correct convention; at some
10639 point check_explicit_specialization changed, but these call-sites
10641 (grokdeclarator): Tidy up slightly.
10642 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
10643 two template functions with the same DECL_ASSEMBLER_NAME the same,
10644 since the names are not yet mangled.
10645 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
10646 TEMPLATE_CONST_PARM.
10647 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
10648 decl for a non-type parameter, rather than printing `<tparm ...>'.
10649 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
10650 (do_friend): Deal with template friends.
10651 * lex.c (do_pending_inlines): Call
10652 maybe_begin_member_template_processing, rather than
10653 conditionally calling begin_member_template_processing.
10654 (process_next_inline): Likewise. Call
10655 maybe_end_member_template_processing, rather than
10656 conditionally calling end_member_template_processing.
10657 (do_pending_defargs): Likewise.
10658 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
10659 TEMPLATE_CONST_PARM.
10660 * method.c (build_mangled_template_parm_index): New function.
10661 (build_overload_value): Use it.
10662 (build_overload_name): Likewise.
10663 * pt.c (finish_member_template_decl): Allow friend declarations.
10664 (template_class_depth): New function.
10665 (is_member_template): Rename, and modify, to become...
10666 (is_member_or_friend_template): New function.
10667 (end_member_template_processing): Rename, and modify, to become...
10668 (maybe_end_member_template_processing).
10669 (build_template_parm_index): New function.
10670 (reduce_template_parm_level): New function.
10671 (process_template_parm): Modify to use build_template_parm_index.
10672 (push_template_decl): Deal with friend templates.
10673 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
10674 TEMPLATE_CONST_PARM.
10675 (tsubst_friend_function): New function.
10676 (instantiate_class_template): Generate the DECL_FRIENDLIST
10677 for a new instantiation by using tsubst_friend_function rather
10679 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
10680 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
10681 appropriate new macros. Use reduce_template_parm_level to
10682 generate lower-level template parameters. Handle tsubst'ing into
10683 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
10684 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
10685 templates. Similarly for the template parameters for a new
10687 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
10688 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
10689 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
10690 (get_bindings): Call add_to_template_args if necessary.
10691 (instantiate_decl): Handle instantiations of friend templates.
10692 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
10693 TEMPLATE_TYPE_PARM as a list of fields; it's not!
10694 * spew.c (yylex): Do a little manual constant propagation to
10697 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
10699 * error.c: Include sys/types.h.
10701 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
10703 * method.c (build_mangled_name): Start CPP directives in column zero.
10705 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
10707 * typeck2.c (process_init_constructor): Sorry about non-trivial
10708 labeled initializers.
10709 * parse.y (initlist): Re-enable labeled initializers.
10711 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10713 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
10714 all callers changed. Rely on the new parameter instead of arg
10715 being a TREE_LIST when determine whether we are working inside
10716 template template parameter. Clean up is_type test.
10718 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
10720 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
10721 * typeck2.c (initializer_constant_valid_p): Allow conversions
10722 between pointers and references.
10724 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
10726 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
10727 if pedantic || warn_pointer_arith.
10729 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10731 * pt.c (unify): Handle TEMPLATE_DECL.
10733 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
10735 * cp-tree.h (strip_attrs): Remove decl.
10737 1998-02-18 Doug Evans <devans@cygnus.com>
10739 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
10740 Update olddecl's attributes too.
10741 (strip_attrs): Remove function.
10742 * typeck.c (common_type): Call merge_machine_type_attributes.
10744 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
10746 * parse.y (initdcl0_innards): New grammar symbol.
10747 (nomods_initdecls, nomods_initdcl0): Change type from itype to
10748 none, since the resulting value is never used.
10749 (parse_decl): New function.
10750 (datadef): Remove redundant actions.
10751 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
10752 * parse.c: Regenerated.
10754 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
10756 * parse.y (simple_stmt): Use getdecls() to check for decl.
10758 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
10760 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
10762 (c++.install-common): Install c++filt properly as native or as cross
10764 (c++.uninstall): Add c++filt.
10766 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10768 * call.c (standard_conversion): Fix multi-level ptr conversions.
10770 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
10772 * init.c (build_new): Propagate error_mark_node up.
10774 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
10776 * parse.y (simple_stmt): If the condition isn't a declaration,
10777 start the controlled block after the test.
10779 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10781 * call.c (build_over_call): Convert builtin abs, labs and fabs to
10783 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
10786 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10788 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
10790 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
10792 * cp-tree.h: Add access_protected_virtual_node.
10793 * class.c (init_class_processing): Initialize it.
10794 * decl.c (xref_basetypes): Use it.
10795 * parse.y (base_class_access_list): Likewise.
10797 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
10798 (c++.install-common): Install c++filt.
10800 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10802 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
10804 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
10806 * call.c (reference_binding): Use comptypes when comparing
10807 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
10809 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
10811 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
10812 (really_overloaded_fn): Move check here from is_overloaded_fn.
10813 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
10815 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
10817 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
10820 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
10822 * cp-tree.h (push_template_decl): Return the decl passed in, or an
10823 equivalent duplicate.
10824 * decl.c (pushtag): Use the return value from push_template_decl.
10825 (duplicate_decls): When duplicating a template declaration, merge
10826 the DECL_TEMPLATE_RESULTs as well.
10827 (make_implicit_typename): Don't try to dive into typename types to
10828 find a context for making a new implicit typename.
10829 (start_decl): Use the return value from push_template_decl.
10830 (grokdeclarator): Complain about declarations list `const operator
10831 int'. Since we don't correctly handle in-class initializations of
10832 non-static data members, complain about this (now illegal)
10833 practice. Issue an error for initializations of non-const statics
10834 since that is illegal as well, and since we don't handle that case
10836 (start_function): Use the return value from push_template_decl.
10837 (start_method): Likewise.
10838 * decl2.c (grokfield): Likewise. Since the change to
10839 grokdeclarator ensures that all initialized fields are in fact
10840 static, remove a redundant test for TREE_PUBLIC.
10841 * parse.y (initlist): Disable labeled initializers since they do
10842 not work as per the documentation, and since they do not use the
10843 same syntax as the C front end.
10844 * pt.c (push_template_decl): Return the decl passed in, or an
10845 equivalent duplicate.
10846 (lookup_template_class): When searching in a nested context,
10847 use the right arguments.
10848 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
10849 * typeck.c (build_component_ref): Assign the correct type to the
10850 result of build_vfn_ref.
10852 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
10854 * pt.c (convert_nontype_argument): Fix typo.
10855 (check_explicit_specialization): Allow old-style specialization
10856 of class template members.
10858 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
10859 Manfred Hollstein <manfred@s-direktnet.de>
10861 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
10862 when deciding to override DECL_ASSEMBLER_NAME.
10864 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
10866 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
10867 * cp-tree.h (flag_do_squangling): Add declaration.
10868 * lang-options.h: Add -fsquangle and -fno-squangle.
10869 * method.c: Add macros and static variables for squangling.
10870 (build_overload_name): Rename to build_mangled_name, add logic for B
10871 compression, and split into process_modifiers and
10872 process_overload_item.
10873 (process_modifiers): New function, to handle constant, reference,
10875 (process_overload_item): New function, handles issue of type codes.
10876 (build_overload_name): New function, start squangling and call
10877 build_mangled_name.
10878 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
10879 (start_squangling): New function to initialize squangling structs.
10880 (end_squangling): New function to destroy squangling structs.
10881 (nrepeats): Rename variable to Nrepeats.
10882 (issue_nrepeats): New function for issuing 'n' type repeats.
10883 (check_ktype): New function to check for type K name compression.
10884 (build_overload_nested_name): Add a check for K name compression.
10885 (build_qualified_name): Add a check for K name compression and don't
10886 use DECL_ASSEMBLER_NAME when squangling is on.
10887 (check_btype): New function, checks for B type compression.
10888 (build_static_name, build_decl_overload_real): Initiate squangling.
10889 (build_typename_overload, build_overload_with_type): Initiate
10892 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
10894 * method.c (make_thunk): Avoid name buffer overflow.
10896 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
10898 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
10899 don't define them yet.
10901 * parse.y (nomods_initdcl0): Add constructor_declarator case.
10903 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10905 * config-lang.in (diff_excludes): Use basename only.
10907 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
10909 * tinfo2.cc: Add tinfo for signed char.
10911 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
10913 * search.c (compute_access): Handle protected constructors in derived
10914 classes as accessible.
10916 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
10918 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
10919 Call convert_from_reference sooner.
10921 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
10923 * cvt.c (ocp_convert): Obtain the constant values from constant
10924 decls even if the destination type is the same as the type of the
10927 * decl2.c (finish_file): Make sure that static inlines with
10928 definitions are not marked DECL_EXTERNAL before returning.
10930 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10932 * decl.c: Lose arg_looking_for_template.
10933 (lookup_name_real): Likewise.
10934 * parse.y: Lose processing_template_arg, template_arg1.
10935 (primary): Likewise.
10936 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
10938 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10940 * error.c (dump_decl): Fix type of default arguments for template
10941 template parameters and nontype template parameters.
10942 * parse.y (template_parm): Handle invalid default template
10943 template arguments here.
10945 * parse.y (template_parm): Use template_arg instead of PTYPENAME
10946 for default template template argument.
10947 * pt.c (coerce_template_parms): Merge default template argument
10948 codes. Can treat RECORD_TYPE as template name if it is implicitly
10949 created. Fix argument index in error message.
10950 * typeck.c (comptypes): Merge template argument comparison codes in
10951 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
10953 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
10955 * lex.c (file_name_nondirectory): Also check for '/'.
10957 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
10959 * parse.y (primary): Deal with statement-expressions in
10961 * pt.c (tsubst_copy): Handle BIND_EXPR.
10962 * tree.c (mapcar): Likewise.
10964 * call.c (add_template_candidate_real): Pass extra parameter to
10965 fn_type_unification.
10966 * cp-tree.h (fn_type_unification): Add parameter.
10967 * pt.c (fn_type_unification): Add additional parameter to deal with
10968 static member functions.
10969 (get_bindings): Deal with static member functions.
10971 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
10972 (revert_static_member_fn): Declare.
10973 * decl.c (revert_static_member_fn): Remove declaration. Change
10974 linkage from internal to external.
10975 (cp_finish_decl): Deal with virtual functions in classes local to
10976 template functions.
10977 * decl2.c (finish_file): Don't forget to emit increment/decrement
10978 expressions in initializers for file-scope variables.
10979 * parse.y (typename_sub2): If the typename doesn't names a
10980 template, rather than a type, issue an error message.
10981 * pt.c (check_explicit_specialization): Handle specializations of
10982 static member functions.
10983 (coerce_template_parms): Handle offset references to lists of
10985 * search.c (note_debug_info_needed): Don't crash when handed a
10986 type which is being defined.
10987 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
10988 that can happen with some illegal code.
10990 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10992 * call.c (user_harshness): Initialize `code' to 0.
10993 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
10994 (null_ptr_cst_p): Add parentheses around && within ||.
10995 (standard_conversion): Likewise.
10996 (z_candidate): Likewise.
10997 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
10998 (build_object_call): Likewise for `mem_args'.
10999 (build_new_op): Likewise for `mem_arglist'. Add `return' from
11000 default case in enumeration switch.
11002 * class.c (build_vtable_entry): Add explicit braces to avoid
11004 (build_class_init_list): Likewise.
11005 (finish_struct_1): Initialize `width' to 0.
11006 (instantiate_type): Initialize `name' to NULL_TREE. Add
11007 explicit braces to avoid ambiguous `else'.
11009 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
11012 * decl.c (grok_reference_init): Eliminate unused parameter, all
11014 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
11015 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
11016 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
11017 (grokdeclarator): Add parentheses around && within ||. Add
11018 explicit braces to avoid ambiguous `else'.
11019 (grokparms): Initialize `type' to NULL_TREE.
11020 (xref_tag): Remove unused label `just_return'.
11021 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
11022 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
11023 (hack_incomplete_structures): Add parentheses around assignment
11024 used as truth value.
11026 * decl2.c (coerce_delete_type): Hide definition of `e3'.
11028 * error.c: Include <stdlib.h>.
11029 (dump_expr): Change the type of `i' to size_t. Remove unused
11032 * except.c (init_exception_processing): Remove unused variable `d'.
11033 (expand_throw): Likewise for `label'.
11035 * friend.c (add_friends): Add explicit braces to avoid ambiguous
11038 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
11039 (sort_base_init): Likewise for `binfo'.
11040 (expand_member_init): Likewise for `rval'.
11041 (build_member_call): Add parentheses around assignment used as
11043 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
11044 (build_new): Initialize `nelts' to NULL_TREE. Initialize
11045 `old_immediate_size_expand' to 0.
11046 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
11047 (build_vec_delete_1): Remove unused variable `block'.
11048 (expand_vec_init): Initialize `itype' to NULL_TREE.
11050 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
11051 declaration of `index' and `rindex' with autoconf macros.
11052 (reinit_parse_for_expr): Remove unused variables
11053 `look_for_semicolon' and `look_for_lbrac'.
11054 (cons_up_default_function): Initialize `args' to NULL_TREE.
11055 (readescape): Initialize `firstdig' to 0.
11056 (real_yylex): Add parentheses around assignment used as truth value.
11058 * method.c: Include <strings.h> if we don't have <string.h>.
11059 Protect declaration of `index' with autoconf macro.
11061 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
11062 Initialize `type' to NULL_TREE.
11063 (structsp): Remove unused variable `id'.
11065 * pt.c (coerce_template_parms): Add explicit braces to avoid
11067 (lookup_template_class): Initialize `template' to NULL_TREE.
11068 (instantiate_class_template): Remove unused variable `name' and `e'.
11069 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
11070 (do_poplevel): Initialize `saved_warn_unused' to 0.
11071 (type_unification): Remove unused varable `parm'.
11072 (unify): Likewise for `j'.
11074 * repo.c (init_repo): Add parentheses around assignment used as
11076 (finish_repo): Remove unused varable `p'.
11078 * search.c (get_binfo): Initialize `type' to NULL_TREE.
11079 (get_base_distance): Likewise.
11080 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
11081 and `new_v' to NULL_TREE.
11082 (lookup_fnfields): Likewise for `rval_binfo_h'.
11083 (breadth_first_search): Add parentheses around assignment used as
11085 (get_template_base): Initialize `type' to NULL_TREE.
11087 * sig.c (append_signature_fields): Initialize `last_mfptr' to
11089 (build_signature_table_constructor): Likewise for
11090 `last_rhs_field', `pfn' and `vt_off'.
11091 (build_sigtable): Likewise for `init'.
11093 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
11094 (propagate_binfo_offsets): Likewise for `delta'.
11095 (hash_tree_cons): Initialize hashcode to 0.
11096 (can_free): Likewise for `size'.
11097 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
11099 * typeck.c (convert_sequence): Hide prototype.
11100 (common_type): Add explicit braces to avoid ambiguous `else'.
11101 (comp_target_types): Likewise.
11102 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
11103 (build_function_call_real): Add explicit braces to avoid ambiguous
11105 (convert_arguments): Initialize `called_thing' to 0.
11106 (convert_for_initialization): Initialize `savew' and `savee' to 0.
11108 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
11109 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
11110 (build_x_arrow): Likewise for `last_rval'.
11112 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
11114 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
11116 * decl.c (init_decl_processing): Use set_sizetype.
11117 * decl2.c (sizetype): Don't declare.
11118 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
11119 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
11120 (build_component_addr, unary_complex_lvalue): Likewise.
11121 * rtti.c (expand_class_desc): Likewise.
11122 * class.c (get_vfield_offset): Likewise.
11124 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
11126 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
11127 early to avoid bogus error. Handle overloaded function
11128 names provided as template arguments correctly.
11129 (coerce_template_parms): Don't mishandle overloaded functions when
11130 dealing with template template parameters.
11131 (lookup_template_class): Issue an error message, rather than
11132 crashing, when the TYPE_DECL provided is not a template type.
11134 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
11136 * class.c (instantiate_type): Don't just return a known type if
11139 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
11141 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
11142 since that code could never be reached.
11144 * error.c (dump_decl): Avoid aborting in the midst of printing an
11145 error message about an illegal template declaration.
11147 * parse.y (structsp): Print an error message, rather than crashing,
11148 when a class-head does not name a class.
11150 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
11151 template arguments as a g++ extension.
11153 * cp-tree.def (ALIGNOF_EXPR): New tree code.
11154 * decl2.c (grok_alignof): If processing_template_decl, just store
11156 * typeck.c (c_alignof): Likewise.
11157 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
11158 * error.c (dump_expr): Likewise.
11159 * pt.c (tsubst_copy): Likewise.
11160 * tree.c (cp_tree_equal): Likewise.
11161 * pt.c (uses_template_parms): Correctly determine whether or not a
11162 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
11163 folding can be done.
11165 * cp-tree.h (grok_enum_decls): Remove type parameter.
11166 * decl.c (grok_enum_decls): Likewise.
11167 * decl2.c (grok_x_components): Call grok_enum_decls
11168 unconditionally, since it will do nothing if there is no
11169 current_local_enum. Use the new calling sequence.
11170 * pt.c (tsubst_enum): Use the new calling sequence for
11173 * decl.c (start_function): Make member functions of local classes
11174 in extern inline functions have comdat linkage here...
11175 (grokdeclarator): Rather than here.
11177 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
11179 * pt.c (convert_nontype_argument): Use decl_constant_value.
11181 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
11183 * call.c (add_template_candidate_real): New function.
11184 (add_template_candidate): Use it.
11185 (add_template_conv_candidate): Likewise.
11186 (joust): Pass extra argument to more_specialized.
11187 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
11188 (is_local_class): Remove.
11189 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
11190 * cp-tree.h (is_local_class): Remove.
11191 (perform_array_to_pointer_conversion): Likewise.
11192 (finish_member_template_decl): Add.
11193 (check_explicit_specialization): Return a tree, not an int.
11194 (more_specialized): Take additional argument.
11195 (get_bindings): Likewise.
11196 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
11197 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
11198 (perform_array_to_pointer_conversion): Remove.
11199 * decl.c (saved_scope): Add processing_specialization,
11200 processing_explicit_instantiation fields.
11201 (maybe_push_to_top_level): Save them.
11202 (pop_from_top_level): Restore them.
11203 (grokfndecl): Use new return value from
11204 check_explicit_specialization.
11205 (start_decl): Don't check flag_guiding_decls before pushing
11207 (cp_finish_decl): Remove previous (bogus) change.
11208 (grok_declarator): Use decl_function_context rather than
11210 * decl2.c (finish_file): Pass extra argument to get_bindings.
11211 (build_expr_from_tree): Let build_x_component_ref check
11212 validity of arguments rather than doing it here.
11213 * lex.c (cons_up_default_function): Remove code fooling with
11214 processing_specialization, processing_explicit_instantiation
11215 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
11216 * method.c (build_overload_identifier): Mangle local classes in
11217 template functions correctly.
11218 * parse.y (finish_member_template_decl): Move to pt.c.
11219 * pt.c (finish_member_template_decl): Moved here from parse.y.
11220 (print_candidates): New function.
11221 (determine_specialization): Change interface. Properly look for
11222 most specialized versions of template candidates.
11223 (check_explicit_specialization): Fully process explicit
11225 (push_template_decl): Avoid looking at CLASSTYPE fields in
11227 (determine_overloaded_function): Remove.
11228 (convert_nontype_argument): Change name from
11229 convert_nontype_parameter. Use determine_overloaded_function
11230 instead of instantiate_type.
11231 (mangle_class_name_for_template): Handle type contexts as well as
11233 (classtype_mangled_name): Likewise.
11234 (lookup_template_class): Likewise.
11235 (tsubst): Likewise.
11236 (more_specialized): Take explict template arguments as a
11238 (most_specialized): Likewise.
11239 (get_bindings): Likewise. Check that return types match before
11240 proclaiming a function a match.
11241 (do_decl_instantiation): Remove code searching for function to
11242 instantiate; that is now done in check_explicit_specialization.
11243 (add_maybe_template): Pass extra argument to get_bindings.
11244 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
11246 * typeck.c (build_component_ref): Check for invalid arguments.
11248 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
11250 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
11251 return_target and call_target are equivalent.
11253 * pt.c (type_unification_real): Just accept function parms that
11254 don't use any template parms.
11256 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
11258 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
11259 unset DECL_NOT_REALLY_EXTERN.
11261 * parse.y (typename_sub*): Fix std::.
11263 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
11265 * error.c (dump_decl): Fix type default template args.
11266 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
11268 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
11270 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
11271 (file_name_nondirectory): Use.
11273 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11275 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
11276 that are not really present. Substitute default arguments in
11277 template template arguments. Correctly convert TEMPLATE_DECL to
11278 TEMPLATE_TEMPLATE_PARM.
11279 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
11280 are no longer treated specially here.
11281 * parse.y (template_template_parm): Fix copy error.
11282 * decl.c (grokdeclarator): Warn about missing `typename' for nested
11283 type created from template template parameters.
11284 * parse.y (bad_parm): Likewise
11286 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
11287 (push_nested_class): Likewise.
11288 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
11289 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
11290 (copy_template_template_parm): Declare.
11291 * decl.c (arg_looking_for_template): New variable.
11292 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
11293 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
11294 node if arg_looking_for_template is nonzero.
11295 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
11296 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
11297 (grokdeclarator): Handle TEMPLATE_DECL.
11298 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
11299 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
11300 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
11301 (dump_decl): Handle unnamed template type parameters.
11302 Handle template template parameters.
11303 (dump_function_name): Handle template template parameters.
11304 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
11305 Handle TEMPLATE_TEMPLATE_PARM.
11306 * method.c (build_template_template_parm_names): New function.
11307 (build_template_parm_names): Handle TEMPLATE_DECL.
11308 (build_overload_nested_name, build_overload_name):
11309 Handle TEMPLATE_TEMPLATE_PARM.
11310 * parse.y (maybe_identifier): New nonterminal.
11311 (template_type_parm): Use it.
11312 (template_template_parm, template_arg1): New nonterminal.
11313 (template_parm): Add template_template_parm rules.
11314 (template_arg): Set processing_template_arg.
11315 (template_arg1): Rules moved from template_arg.
11316 (primary, nonnested_type): Set arg_looking_for_template if we are
11317 processing template arguments.
11318 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
11319 (process_template_parm): Handle template template parameters.
11320 (coerce_template_parms, comp_template_args): Likewise.
11321 (mangle_class_name_for_template, lookup_template_class): Likewise.
11322 (uses_template_parms): Handle TEMPLATE_DECL and
11323 TEMPLATE_TEMPLATE_PARM.
11324 (current_template_args): Handle TEMPLATE_DECL.
11325 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
11326 * search.c (dfs_walk, dfs_record_inheritance):
11327 Handle TEMPLATE_TEMPLATE_PARM.
11328 * tree.c (copy_template_template_parm): New function.
11329 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
11330 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
11332 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
11334 * decl.c (start_decl): Don't allow duplicate definitions of static
11337 * call.c (build_user_type_conversion_1): Handle user-defined
11338 template conversion operators correctly.
11340 * decl2.c (build_expr_from_tree): Issue an error message if the
11341 object in a COMPONENT_REF is a TEMPLATE_DECL.
11343 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
11345 * class.c (is_local_class): New function.
11346 * cp-tree.h (is_local_class): Declare it.
11347 (last_tree): Likewise.
11348 (begin_tree): Likewise.
11349 (end_tree): Likewise.
11350 (lookup_template_class): Change prototype.
11351 * decl.c (cp_finish_decl): Check for NULL where necessary.
11352 Consider FUNCTION_DECLS to declare objects with top-level binding,
11353 when calling make_decl_rtl.
11354 (grokdeclarator): Give members of local classes internal linkage.
11355 (start_function): Remove declaration of last_tree.
11356 (finish_function): Set flag_keep_inline_functions around call to
11357 rest_of_compilation if we are processing a member function in a
11359 (start_method): Call push_template_decl for member functions of
11360 local classes in template functions.
11361 * decl2.c (import_export_decl): Don't give external linkage to
11362 instantiations of templates with internal linkage.
11363 * parse.y (last_tree): Remove declaration.
11364 (template_type): Pass extra parameter to lookup_template_class.
11365 (self_template_type): Likewise.
11366 (structsp): Move call to reset_specialization into left_curly.
11367 (left_curly): Call reset_specialization, and begin_tree.
11368 * pt.c (saved_trees): New variable.
11369 (mangle_class_name_for_template): Change prototype. Use
11370 additional function context to name local classes in templates
11372 (classtype_mangled_name): Pass the context.
11373 (push_template_decl): Handle local classes and templates, and
11374 member functions for such classes.
11375 (convert_nontype_parameter): Fix handling of pointer-to-member
11377 (lookup_template_class): Handle local classes in templates.
11378 (tsubst): Likewise. Don't assume that template instantiations
11379 have external linkage; pay attention to the template declaration.
11380 (mark_decl_instantiated): Likewise.
11381 (begin_tree): New function.
11382 (end_tree): Likewise.
11384 * decl.c (xref_basetypes): Don't call complete_type for basetypes
11385 that involve template parameters; that can lead to infinite
11386 recursion unnecessarily.
11388 * pt.c (register_specialization): Do not register specializations
11389 that aren't ready to be registered yet.
11390 (check_explicit_specialization): Handle explicit specialization of
11391 constructors and destructors.
11392 (build_template_decl): New function.
11393 (push_template_delc): Handle out-of-class specializations of
11396 * pt.c (check_explicit_specialization): Set up the template
11397 information before registering the specialization.
11398 (coerce_template_parms): Fix thinko.
11399 (tsubst): Handle specializations of member templates correctly.
11401 * class.c (finish_struct_methods): Remove calls to
11402 check_explicit_specialization from here.
11403 (finish_struct): And insert them here.
11404 * cp-tree.h (perform_qualification_conversions): New function.
11405 (perform_array_to_pointer_conversion): Likewise.
11406 (begin_explicit_instantiation): Likewise.
11407 (end_explicit_instantiation): Likewise.
11408 (determine_specialization): Renamed from
11409 determine_explicit_specialization.
11410 (comp_template_parms): New function.
11411 (processing_explicit_instantiation): New variable.
11412 * cvt.c (perform_qualification_conversions): New function.
11413 (perform_array_to_pointer_conversion): Likewise.
11414 * decl.c (duplicate_decls): Don't consider template functions
11415 alike unless they have the same parameters. Refine handling of
11416 instantiation/specialization mismatches.
11417 (start_decl): Don't call pushdecl for template specializations,
11418 since they don't affect overloading.
11419 (start_function): Likewise.
11420 (grokfndecl): Call check_explicit_specialization a little later.
11421 Don't call duplicate_decls for memberm template specializations.
11422 (grokdeclarator): Don't update template_count for classes that are
11423 themselves specializations. Remove use of `2' as parameter to
11424 grokfndecl since that value isn't used.
11425 * lex.c (cons_up_default_function): Save and restore
11426 processing_explicit_instantiation around calls to grokfield.
11427 * parse.y (finish_member_template_decl): New function.
11428 (component_decl_1): Use it.
11429 (fn.def2): Likewise.
11430 (template_arg_list_opt): New nonterminal.
11431 (template_type): Use it.
11432 (self_template_type): Likewise.
11433 (template_id): Likewise.
11434 (object_template_id): Likewise.
11435 (notype_template_declarator): Likwise.
11436 (begin_explicit_instantiation): Likewise.
11437 (end_explicit_instantiation): Likewise.
11438 (explicit_instantiation): Use them.
11439 * pt.c (coerce_template_parms): Add parameters.
11440 (processing_explicit_instantiation): New variable.
11441 (convert_nontype_parameter): New function.
11442 (determine_overloaded_function): Likewise.
11443 (begin_explicit_instantiation): Likewise.
11444 (end_explicit_instantiation): Likewise.
11445 (retrieve_specialization): Likewise.
11446 (register_specialization): Likewise.
11447 (processing_explicit_specialization): Removed.
11448 (determine_specialization): Handle specializations of member
11449 functions of template class instantiations.
11450 (check_explicit_specialization): Refine to conform to standard.
11451 (comp_template_parms): New function.
11452 (coerce_template_parms): Call convert_nontype_parameter.
11453 (tsubst): Refine handling of member templates. Use
11454 register_specialization.
11455 (instantiate_template): Use retrieve_specialization.
11456 (do_decl_instantiation): Likewise.
11457 (instantiate_decl): Likewise.
11458 (type_unification): Improve handling of explict template
11460 * tree.c (mapcar): Return error_mark_node, rather than aborting,
11461 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
11462 * typeck.c (build_unary_op): Call determine_specialization, rather
11463 than determine_explicit_specialization.
11465 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
11467 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
11469 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11471 * error.c (dump_decl): For enum tags, output the tag, not its value.
11473 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
11475 * decl.c (init_decl_processing): Only call init_rtti_processing
11478 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
11480 * init.c (build_new_1): Split out from build_new.
11481 (build_new): Just return a NEW_EXPR.
11482 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
11484 * decl2.c (get_temp_regvar): Tweak.
11486 * cp-tree.h (TREE_CALLS_NEW): Comment out.
11487 * class.c (resolves_to_fixed_type_p): Remove use.
11488 * method.c (build_opfncall): Likewise.
11489 * call.c (build_new_op): Likewise.
11491 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
11493 * exception.cc (__eh_alloc, __eh_free): New fns.
11494 (__cp_push_exception, __cp_pop_exception): Use them.
11495 (__uncatch_exception): Call terminate here if no exception.
11496 * except.c (build_terminate_handler): New fn.
11497 (expand_start_catch_block): Use it.
11498 (expand_exception_blocks): Likewise.
11499 (alloc_eh_object): New fn.
11500 (expand_throw): Use it. Protect exception init with terminate.
11501 * typeck.c (build_modify_expr): Remove code that ignores trivial
11504 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11506 * call.c (add_builtin_candidate): Add default case in enumeration
11508 (build_new_op): Likewise.
11509 (convert_like): Likewise.
11510 * cvt.c (build_expr_type_conversion): Likewise.
11511 * tree.c (real_lvalue_p): Likewise.
11512 (lvalue_p): Likewise.
11513 (cp_tree_equal): Likewise.
11514 * typeck.c (comptypes): Likewise.
11515 (build_component_ref): Likewise.
11516 (build_function_call_real): Likewise.
11517 (build_binary_op_nodefault): Likewise.
11518 (build_unary_op): Likewise.
11519 (build_modify_expr): Likewise.
11520 * typeck2.c (initializer_constant_valid_p): Likewise.
11522 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
11524 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
11526 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
11528 * pt.c (coerce_template_parms): Make sure to digest_init if
11531 * decl.c (duplicate_decls): Make the newdecl virtual if the
11532 olddecl was, just as is done with other attributes of olddecl.
11534 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
11536 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
11537 address of an OFFSET_REF.
11539 * cp-tree.def: Add AGGR_INIT_EXPR.
11540 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
11541 AGGR_INIT_EXPR where appropriate.
11542 * expr.c (cplus_expand_expr): Likewise. Simplify.
11544 * decl2.c (finish_file): Remove call to register_exception_table.
11546 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11548 * pt.c (instantiate_class_template): Don't do injection when
11549 processing_template_decl is true, as pollutes current_binding_level
11552 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
11554 * pt.c (maybe_fold_nontype_arg): Add prototype.
11556 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11558 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
11559 * error.c (dump_expr): Likewise.
11561 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
11563 * typeck.c (build_function_call_real): Remove "inline called before
11564 definition" pedwarn.
11566 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
11568 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11570 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
11572 * pt.c (type_unification_real): Change __null to type void* with
11575 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
11577 * call.c (implicit_conversion): Don't call
11578 build_user_type_conversion_1 with a NULL expr, since it will
11581 * pt.c (unify): Don't try to unify array bounds if either array is
11584 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11586 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
11587 Replace extern decls with casts.
11589 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
11590 Update last_parm_cleanup_insn.
11591 (store_after_parms): Remove.
11592 * cp-tree.h: Adjust.
11594 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
11596 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
11597 (finish_file): Check DECL_COMDAT instead of weak|one_only.
11598 (import_export_vtable): Use make_decl_one_only instead of
11599 comdat_linkage for win32 tweak.
11600 (import_export_decl): Likewise.
11601 * pt.c (mark_decl_instantiated): Likewise.
11603 * decl2.c (finish_file): Lose handling of templates in pending_statics.
11605 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
11607 * decl2.c (finish_file): Lose call to expand_builtin_throw.
11608 * except.c (expand_builtin_throw): Remove.
11609 * cp-tree.h: Remove ptr_ptr_type_node.
11610 * decl.c: Likewise.
11612 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
11614 * decl.c (ptr_ptr_type_node): Define.
11615 (init_decl_processing): Initialize it.
11616 * cp-tree.h: Declare it.
11617 * exception.cc (__cp_exception_info): Use __get_eh_info.
11618 (__cp_push_exception): Likewise.
11619 (__cp_pop_exception): Likewise.
11621 From Scott Snyder <snyder@d0sgif.fnal.gov>:
11622 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
11624 (init_exception_processing): Removed saved_pc initialization.
11626 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
11628 * pt.c (instantiate_decl): Defer all templates but inline functions.
11630 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
11632 * init.c (expand_vec_init): Don't fold a list of parameters.
11634 * decl.c (copy_args_p): Handle copy elision for types with virtual
11636 * call.c (build_over_call): Likewise.
11638 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
11640 * pt.c (lookup_template_function): Copy the template arguments,
11641 not just the list containing them, to the permanent obstack.
11643 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
11645 * except.c (expand_start_catch_block): suspend_momentary for the
11648 * error.c (dump_decl): Handle LOOKUP_EXPR.
11650 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
11652 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
11653 permanent obstack if we are processing a template decl.
11654 * typeck.c (build_static_cast): Likewise.
11655 (build_const_cast): Likewise.
11656 (build_reinterpret_cast): Likewise.
11658 * pt.c (coerce_template_parms): Coerce some expressions, even
11659 when processing_template_decl.
11661 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11663 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
11664 handling of pointer difference expressions.
11666 * typeck.c (comp_target_types): Comparison of function/method types
11667 is independent of nptrs.
11669 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
11671 * pt.c (tsubst): Avoid creating pointer to reference and
11672 reference to reference types.
11674 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
11676 * parse.y (do_id): New nonterminal.
11677 (template_id): Use it.
11679 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
11681 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
11682 * spew.c (yylex): Don't do_identifier here.
11683 * decl2.c (build_expr_from_tree): Revert last change.
11685 * decl2.c (build_expr_from_tree): Expand the name for a method call.
11686 * parse.y (object_template_id): Don't try to take the DECL_NAME.
11688 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
11690 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
11692 * call.c (build_op_delete_call): Adjust.
11694 * except.c (expand_end_catch_block): Lose rethrow region.
11695 (expand_start_catch_block): Likewise.
11696 (expand_end_catch_block): Don't expand_leftover_cleanups.
11698 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11700 * pt.c (tsubst): Remove tree_cons call (places redundant info into
11701 DECL_TEMPLATE_INSTANTIATION).
11703 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
11705 * tree.c (is_overloaded_fn): Handle getting a fn template.
11706 (really_overloaded_fn): Likewise.
11707 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
11708 * pt.c (check_explicit_specialization): Tweak.
11709 (determine_explicit_specialization): Tweak.
11711 * tree.c, cp-tree.h (get_target_expr): New fn.
11713 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
11715 * pt.c (check_explicit_specialization): Fix misspelling in
11716 diagnostic: `preceeded'.
11717 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
11720 1997-12-02 Mark Mitchell <mmitchell@usa.net>
11722 * pt.c (determine_explicit_specialization): Avoid an internal
11723 error for bad specializations.
11725 * method.c (build_overload_value): Handle SCOPE_REF.
11727 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
11729 * class.c (prepare_fresh_vtable): Enable even more complex MI
11732 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
11734 * exception.cc (__check_eh_spec): Optimize a bit.
11736 * exception.cc (__cp_pop_exception): Lose handler arg.
11737 * except.c (do_pop_exception): Likewise.
11738 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
11739 (expand_end_catch_block): Likewise.
11741 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11743 * pt.c (check_explicit_specialization): Complain about using a
11744 template-id for a non-specialization.
11746 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
11748 * repo.c: Prototype rindex only if needed.
11749 * xref.c: Likewise.
11751 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11753 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
11755 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
11757 * typeck.c (build_const_cast): Handle references here instead of
11758 handing off to convert_to_reference.
11760 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
11761 TerminateFunctionCall.
11762 (init_exception_processing): Likewise. Terminate et al are now
11763 the fns, not ADDR_EXPRs.
11764 (various): Lose redundant assemble_external calls.
11765 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
11767 * cp-tree.h (struct lang_decl_flags): Add comdat.
11768 (DECL_COMDAT): New macro.
11769 * decl.c (duplicate_decls): Propagate it.
11770 (cp_finish_decl): Handle it.
11771 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
11773 * class.c: Remove static pending_hard_virtuals.
11774 (add_virtual_function): Take pointers to pending_virtuals
11775 and pending_hard_virtuals.
11776 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
11778 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
11780 * decl2.c (import_export_vtable): If we support one_only but not
11781 weak symbols, mark instantiated template vtables one_only.
11782 (import_export_decl): Likewise for tinfo functions.
11783 (finish_vtable_vardecl): Also write out vtables from explicitly
11784 instantiated template classes.
11785 * pt.c (mark_class_instantiated): Revert last change.
11787 * except.c (expand_throw): Call mark_used on the destructor.
11789 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
11791 * lex.c (lang_init): Enable flag_exceptions by default if no
11792 command line switch was specified.
11794 1997-11-26 Mark Mitchell <mmitchell@usa.net>
11796 * pt.c (unify): Handle `void' template parameters in
11799 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
11801 * rtti.c (build_dynamic_cast): Handle template case here.
11802 (build_dynamic_cast_1): Not here.
11804 * typeck2.c (digest_init): Make copies where appropriate.
11806 * decl2.c (delete_sanity): resolve_offset_ref.
11808 * except.c: Call terminate without caching so many bits.
11810 * except.c (expand_start_catch_block): Fix catching a reference
11813 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
11815 * init.c (build_new): Copy size to the saveable obstack.
11817 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
11818 TRY_CATCH_EXPR for now.
11820 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
11822 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
11823 has DECL_LANG_SPECIFIC.
11825 * exception.cc (struct cp_eh_info): Add handlers field.
11826 (__cp_push_exception): Initialize it.
11827 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
11828 (__throw_bad_exception): Remove.
11829 * except.c (call_eh_info): Add handlers field.
11830 (get_eh_handlers): New fn.
11831 (push_eh_cleanup): Increment handlers.
11833 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
11835 * except.c (expand_start_eh_spec): Use the try/catch code.
11836 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
11837 doing everything inline.
11838 (init_exception_processing): throw_type_match now takes
11839 const void pointers.
11840 * exception.cc (__check_eh_spec): New fn.
11841 * inc/exception: Neither terminate nor unexpected return.
11842 * decl.c: Make const_ptr_type_node public.
11843 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
11845 * except.c (expand_start_catch_block): We only need the rethrow
11846 region for non-sjlj exceptions.
11847 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
11849 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
11851 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
11852 (various.o): Likewise.
11853 * inc/new: Add placement deletes. Add throw specs for default new.
11854 * new.cc (set_new_handler): Move here from libgcc2.
11855 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
11856 (new): Move from libgcc2. Throw bad_alloc.
11857 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
11858 * decl.c (init_decl_processing): Update exception specs on new and
11861 * method.c (build_decl_overload_real): Don't mess with global
11864 * init.c (build_new): Check for null throw spec, not nothrow_t.
11866 * decl.c (duplicate_decls): Don't complain about different exceptions
11867 from an internal declaration.
11869 * call.c (build_op_delete_call): Fix check for member fns again.
11871 * decl2.c (import_export_decl): Interface hackery affects
11872 virtual synthesized methods.
11874 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11876 * decl.c (start_decl): Don't just complain about a mismatched
11879 * decl.c (make_implicit_typename): Handle case where t is not
11880 actually from context.
11881 * tree.c (get_type_decl): Lose identifier case.
11882 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
11883 * parse.y (nonnested_type): Just use lookup_name.
11884 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
11886 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
11888 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
11889 T was built in C language context (for example, by
11890 output_func_start_profiler).
11892 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
11894 * decl.c (make_implicit_typename): New fn.
11895 (lookup_name_real): Use it. Use current_class_type as the context.
11897 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
11899 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
11901 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11903 * friend.c (do_friend): Warn about non-template friends in templates.
11905 * call.c (build_op_delete_call): Fix handling of inherited delete.
11907 * search.c (dfs_record_inheritance): Ignore template type parms.
11909 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
11911 * call.c (build_new_op): Fix copy error.
11912 (build_op_new_call): New fn.
11913 (build_op_delete_call): New fn.
11914 * cp-tree.h: Declare them.
11915 * init.c (build_new): Use them. Support placement delete.
11916 (build_x_delete): Use build_op_delete_call.
11917 (build_delete): Likewise.
11918 * decl2.c (delete_sanity): Likewise.
11919 (coerce_delete_type): Don't complain about placement delete.
11921 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11923 * call.c (build_new_function_call): Remove unused 'obj' parm.
11924 * cp-tree.h, typeck.c: Adjust.
11926 * init.c (build_new): Make the cleanup last longer.
11927 (expand_vec_init): Call do_pending_stack_adjust.
11929 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
11931 * pt.c (do_type_instantiation): Fix typo.
11932 (mark_class_instantiated): If we support one_only but not weak
11933 symbols, don't mark this as known.
11935 * init.c (build_new): Handle vec delete in EH cleanup.
11937 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11939 * call.c (build_method_call): Call complete_type before checking
11942 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
11944 * decl.c (add_block_current_level): Delete.
11945 * init.c (build_vec_delete_1): Delete build_block and
11946 add_block_current_level calls.
11948 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
11950 * init.c (build_new): Handle freeing allocated memory when the
11951 constructor throws.
11953 * call.c (build_new_method_call): Fix flags arg.
11955 * pt.c (do_type_instantiation): Don't try to instantiate
11957 (mark_decl_instantiated): If we support one_only but not
11958 weak symbols, mark this one_only.
11959 * decl2.c (import_export_vtable): Don't defer handling of vtables
11960 if MULTIPLE_SYMBOL_SPACES.
11962 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11964 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
11966 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
11968 * except.c (do_pop_exception): Return a value.
11970 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
11972 * call.c (build_new_method_call): Handle getting a
11973 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
11974 if we got template parms.
11975 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
11977 * decl2.c (build_expr_from_tree): Tweak last change.
11978 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
11979 (maybe_fold_nontype_arg): Split out from tsubst_copy.
11980 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
11982 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11984 * pt.c (tsubst_copy): Handle explicit template arguments in
11986 * typeck.c (build_x_function_call): Likewise.
11987 * decl2.c (build_expr_from_tree): Lookup function name if it
11990 * pt.c (tsubst): Instantiate template functions properly when
11991 template parameter does not appear in function arguments and return
11993 (comp_template_args): Handle member templates required by tsubst.
11995 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11997 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
12000 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12002 * pt.c (coerce_template_parms): Tweak error message.
12004 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
12005 return type defaults to `int', even if there are storage-class
12008 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12010 Complete nested exception support.
12011 * except.c (do_pop_exception): Split out...
12012 (push_eh_cleanup): From here. Handle the EH region by hand.
12013 (expand_start_catch_block): Add a new level for the catch parm.
12014 Move the rethrow region outside the two cleanup regions.
12015 Protect the initializer for the catch parm with terminate.
12016 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
12017 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
12018 popping off the middle of the stack.
12019 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
12020 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
12021 (build_cplus_new): Only wrap CALL_EXPRs.
12022 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
12023 the constructor call.
12025 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12027 * Make-lang.in (c++.distdir): Make inc subdirectory.
12029 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12031 * decl2.c (finish_file): Put back some code.
12033 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12035 * decl2.c (finish_file): Remove redundant code.
12036 * method.c (emit_thunk): Don't let the backend defer generic thunks.
12038 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
12040 * except.c (call_eh_info): Split out...
12041 (push_eh_info): From here.
12042 (expand_builtin_throw): Use it.
12043 (expand_start_catch_block): Move region start back.
12045 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
12047 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
12048 (real_yylex): Record wide strings using target endianness, not host.
12050 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
12052 * repo.c (rindex): Add decl unconditionally.
12053 (get_base_filename, open_repo_file): Don't cast rindex.
12054 * xref.c (rindex): Add decl unconditionally.
12055 (index): Remove unused decl.
12056 (open_xref_file): Don't cast rindex.
12058 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12060 * class.c (build_vbase_path): Propagate the result type properly.
12062 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
12064 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
12065 remaining use of saved_throw_type with a call to get_eh_type.
12067 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
12069 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
12070 (file_name_nondirectory): New function, doing the same as the macro.
12071 (set_typedecl_interface_info): Use it instead of the macro.
12072 (check_newline): Likewise.
12073 (handle_cp_pragma): Likewise.
12075 * repo.c (get_base_filename): Cast result of rindex to char*.
12076 (open_repo_file): Likewise.
12077 * xref.c (open_xref_file): Likewise.
12078 * error.c (dump_char): Make its arg int, not char.
12080 * except.c (push_eh_info): Pass the number of fields - 1 down, not
12081 the exact number of fields.
12083 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12085 Support for nested exceptions.
12086 * tinfo2.cc (__is_pointer): New fn.
12087 * exception.cc (struct cp_eh_info): Define.
12088 (__cp_exception_info, __uncatch_exception): New fns.
12089 (__cp_push_exception, __cp_pop_exception): New fns.
12090 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
12092 (init_exception_processing): Likewise. __eh_pc is now external.
12093 (push_eh_info): New fn.
12094 (get_eh_{info,value,type,caught}): New fns.
12095 (push_eh_cleanup): Just call __cp_pop_exception.
12096 (expand_start_catch_block): Use push_eh_info. Start the eh region
12098 (expand_end_eh_spec): Use push_eh_info.
12099 (expand_throw): Call __cp_push_exception to set up the exception info.
12100 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
12102 (expand_builtin_throw): Don't refer to empty_fndecl.
12104 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
12106 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
12108 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
12110 * method.c (build_template_parm_names, build_decl_overload_real):
12111 Add static to definitions.
12112 * pt.c (add_to_template_args, note_template_header,
12113 processing_explicit_specialization, type_unification_real): Likewise.
12114 ({determine,check}_explicit_specialization): Use a single string for
12117 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
12119 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
12120 (expand_end_catch_block): Likewise.
12121 (expand_end_eh_spec): Likewise.
12123 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
12125 * decl.c (duplicate_decls): Handle template specializations
12127 * error.c (dump_function_name): Fix printing of specializations of
12128 member functions that are not member templates.
12129 * cp-tree.h (processing_specialization): Make global.
12130 * pt.c (processing_specialization): Likewise.
12131 * lex.c (cons_up_default_function): Save and restore
12132 processing_specialization to avoid confusion.
12134 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12136 * decl.c (init_decl_processing): Give null_node unknown* type.
12137 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
12138 (common_type): Likewise.
12139 * error.c (args_as_string): Recognize null_node.
12141 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12143 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
12144 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
12146 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
12148 * Make-lang.in (g++): Include prefix.o.
12150 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
12152 * pt.c (determine_explicit_specialization): Initialize "dummy"
12153 to keep Purify quiet.
12155 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12157 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
12158 (build_overload_int): Not here.
12160 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
12162 * class.c (build_type_pathname): Remove.
12163 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
12165 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
12167 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
12168 &&label GNU extension.
12170 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
12172 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
12173 so as to avoid incorrect manglings.
12174 * method.c (build_decl_overload_real): Don't mangle return types
12177 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
12179 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
12180 scratch_tree_cons): Define as macros for now.
12181 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
12182 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
12183 typeck2.c: Use them and the expression_obstack variants.
12185 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12187 * decl.c (store_return_init): Allow classes with explicit ctors to
12188 be used with the named return values extension.
12190 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
12192 * pt.c (instantiate_decl): Fix previous change.
12194 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
12196 * pt.c (tsubst): Fix thinko.
12197 (instantiate_decl): Really use the original template.
12199 * call.c (build_new_method_call): Use simple constructor_name for
12202 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
12204 * method.c (build_underscore_int): Don't use ANSI specific
12207 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12209 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
12210 for our key method; it might have been inlined by -O3.
12212 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
12214 * decl.c (make_typename_type): Do not try to call lookup_field for
12215 non-aggregate types.
12217 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
12219 * typeck.c (build_reinterpret_cast): Tweak.
12221 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
12223 * typeck.c (build_reinterpret_cast): Converting a void pointer
12224 to function pointer with a reinterpret_cast produces a warning
12225 if -pedantic is issued.
12227 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12229 * typeck.c (c_expand_return): Don't warn about returning a
12230 reference-type variable as a reference.
12232 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12234 * method.c (build_static_name): Fix typo.
12236 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
12238 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
12239 OLDDECL before we try to do DECL_USE_TEMPLATE.
12241 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12243 * decl.c (duplicate_decls): Don't warn about template instances.
12245 * typeck.c (mark_addressable): Lose ancient code that unsets
12248 * pt.c (do_decl_instantiation): Lose support for instantiating
12251 * call.c (build_new_function_call): Fix handling of null explicit
12253 (build_new_method_call): Likewise.
12255 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
12257 * method.c (build_underscore_int): Fix typo.
12259 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
12261 * tree.c (print_lang_statistics): #if 0 call to
12262 print_inline_obstack_statistics until its definition is checked in.
12264 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12266 * decl2.c (finish_file): Move dump_tree_statistics to end.
12268 * pt.c (instantiate_decl): Look for the original template.
12269 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
12270 of member templates.
12272 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12274 * Makefile.in (g++FAQ.*): New rules.
12275 (CONFLICTS): Update.
12276 * g++FAQ.texi: Moved from libg++.
12278 * parse.y (PFUNCNAME): Only specify the type once.
12280 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
12282 * lex.c (real_yylex): Clean up the code to fully behave the way
12283 the c-lex.c parser does for complex and real numbers.
12285 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12287 * method.c (build_decl_overload_real): Reformat.
12289 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
12291 * method.c (synthesize_method): If at_eof, determine our linkage.
12293 1997-09-29 Paul Eggert <eggert@twinsun.com>
12295 * lex.c (real_yylex): Treat `$' just like `_', except issue a
12296 diagnostic if !dollars_in_ident or if pedantic.
12298 * lang-specs.h (@c++): -ansi no longer implies -$.
12300 * decl2.c (lang_decode_option):
12301 -traditional and -ansi now do not mess with
12304 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
12306 * Makefile.in (parse.o, decl.o): Also depend on
12307 $(srcdir)/../except.h $(srcdir)/../output.h.
12308 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
12309 $(srcdir)/../except.h $(srcdir)/../output.h.
12310 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
12313 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
12315 * expr.c (cplus_expand_expr): Make it static.
12317 * decl2.c, init.c, typeck.c: Include "expr.h".
12318 (expand_expr): Use proper values when calling the function.
12320 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
12322 * lang-options.h: New -Wold-style-cast flag.
12323 * cp-tree.h (warn_old_style_cast): New variable.
12324 * decl2.c (warn_old_style_cast): Likewise.
12325 (lang_decode_option): Support -Wold-style-cast.
12326 (reparse_absdcl_as_casts): Produce old-style-cast warning.
12328 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12330 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
12331 TREE_USED, reset value based on already_used.
12333 * init.c (expand_member_init): Revert change.
12335 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12337 * cp-tree.h, decl.c, decl2.c, pt.c:
12338 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
12340 * decl2.c (lang_decode_option): Add missing ;.
12342 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12344 * friend.c (do_friend): Disable injection for all template-derived
12346 * decl2.c (lang_decode_option): Handle -fguiding-decls.
12347 * parse.y (notype_template_declarator): New nonterminal.
12348 (direct_notype_declarator): Use it.
12349 (complex_direct_notype_declarator): Likewise.
12350 (object_template_id): Accept any kind of identifier after TEMPLATE.
12351 (notype_qualified_id): Don't add template declarators here.
12353 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
12355 * call.c (add_template_candidate): Add explicit_targs parameter.
12356 (build_scoped_method_call): Use it.
12357 (build_overload_call_real): Likewise.
12358 (build_user_type_conversion_1): Likewise.
12359 (build_new_function_call): Likewise.
12360 (build_object_call): Likewise.
12361 (build_new_op): Likewise.
12362 (build_new_method_call): Likewise.
12363 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
12364 (build_new_method_call): Likewise.
12366 * class.c (finish_struct_methods): Add specialization pass to
12367 determine which methods were specializing which other methods.
12368 (instantiate_type): Handle TEMPLATE_ID_EXPR.
12370 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
12372 * cp-tree.h (name_mangling_version): New variable.
12373 (flag_guiding_decls): Likewise.
12374 (build_template_decl_overload): New function.
12375 (begin_specialization): Likewise.
12376 (reset_specialization): Likewise.
12377 (end_specialization): Likewise.
12378 (determine_explicit_specialization): Likewise.
12379 (check_explicit_specialization): Likewise.
12380 (lookup_template_function): Likewise.
12381 (fn_type_unification): Add explicit_targs parameter.
12382 (type_unification): Likewise.
12384 * decl.c (duplicate_decls): Add smarts for explicit
12386 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
12388 (grokfndecl): Call check_explicit_specialization.
12390 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
12391 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
12392 (check_classfn): Handle specializations.
12394 * error.c (dump_function_name): Print specialization arguments.
12396 * friend.c (do_friend): Don't call pushdecl for template
12399 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
12401 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
12402 and -fno-guiding-decls.
12404 * lex.c (identifier_type): Return PFUNCNAME for template function
12407 * method.c (build_decl_overload_real): New function.
12408 (build_template_parm_names): New function.
12409 (build_overload_identifier): Use it.
12410 (build_underscore_int): New function.
12411 (build_overload_int): Use it. Add levels for template
12413 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
12414 (build_overload_nested_names): Handle template type parameters.
12415 (build_template_decl_overload): New function.
12417 * parse.y (YYSTYPE): New ntype member.
12418 (nested_name_specifier): Use it.
12419 (nested_name_specifier_1): Likewise.
12420 (PFUNCNAME): New token.
12421 (template_id, object_template_id): New non-terminals.
12422 (template_parm_list): Note specializations.
12423 (template_def): Likewise.
12424 (structsp): Likewise.
12425 (fn.def2): Handle member template specializations.
12426 (component_decl_1): Likewise.
12427 (direct_notype_declarator): Handle template-ids.
12428 (component_decl_1): Likewise.
12429 (direct_notype_declarator): Handle template-ids.
12430 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
12432 * pt.c (processing_specializations): New variable.
12433 (template_header_count): Likewise.
12434 (type_unification_real): New function.
12435 (processing_explicit_specialization): Likewise.
12436 (note_template_header): Likewise.
12437 (is_member_template): Handle specializations.
12438 (end_template_decl): Call reset_specialization.
12439 (push_template_decl): Handle member template specializations.
12440 (tsubst): Likewise.
12441 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
12442 (instantiate_template): Handle specializations.
12443 (instantiate_decl): Likewise.
12444 (fn_type_unification): Handle explicit_targs.
12445 (type_unification): Likewise. Allow incomplete unification
12446 without an error message, if allow_incomplete.
12447 (get_bindings): Use new calling sequence for fn_type_unification.
12449 * spew.c (yylex): Handle PFUNCNAME.
12451 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
12452 (really_overloaded_fn): Likewise.
12453 (get_first_fn): Handle function templates.
12455 * typeck.c (build_x_function_call): Use really_overloaded_fn.
12456 Handle TEMPLATE_ID_EXPR.
12457 (build_x_unary_op): Likewise.
12458 (build_unary_op): Likewise.
12459 (mark_addressable): Templates whose address is taken are marked
12462 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12464 * decl.c (init_decl_processing): Declare __builtin_constant_p as
12465 accepting any kind of type, not only int.
12467 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12469 * search.c (get_matching_virtual): Notice virtual bases when sorrying
12470 about covariant returns.
12472 * parse.y (member_init): Also imply typename here. Remove ancient
12473 extension for initializing base members.
12475 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12477 Handle multi-level typenames and implicit typename in base list.
12478 * parse.y (typename_sub{,[0-2]}): New rules.
12479 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
12480 (nonnested_type): New rule.
12481 (complete_type_name): Use it.
12482 (base_class.1): Use typename_sub and nonnested_type.
12483 (nested_name_specifier): Don't elide std:: here.
12484 * decl.c (make_typename_type): Handle getting a type for NAME.
12485 (lookup_name_real): Turn std:: into :: here.
12487 Rvalue conversions were removed in London.
12488 * call.c (is_subseq): Don't consider lvalue transformations.
12489 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
12490 (joust): Re-enable ?: kludge.
12492 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
12494 * decl.c (start_function): Up warning of no return type to be a
12497 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12499 * init.c (expand_member_init): Don't set TREE_USED.
12500 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
12501 set,don't clear TREE_USED wholesale.
12503 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
12505 * call.c (build_over_call): Do require_complete_type before
12508 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12510 * search.c (lookup_field): Call complete_type in all cases.
12512 * decl.c (finish_function): Just warn about flowing off the end.
12514 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12516 * decl.c (grokparms): Don't bash a permanent list node if we're
12519 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
12521 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
12523 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12525 * call.c (build_new_op): Give better error for syntactically
12526 correct, but semantically invalid, use of undeclared template.
12528 * call.c (compare_qual): Handle pmfs.
12530 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
12531 after the exception spec.
12533 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12535 * call.c (null_ptr_cst_p): Integer type, not integral type.
12537 * call.c (joust): Disable warnings until they can be moved to the
12540 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
12542 * Makefile.in, config-lang.in: Convert to autoconf.
12544 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
12546 * decl.c (lookup_name_real): Add implicit 'typename' to types from
12549 * pt.c (most_specialized_class): Fix typo.
12550 (tsubst): Move constant folding to TREE_VEC case.
12552 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
12554 * pt.c (do_poplevel): Don't warn about unused local variables
12555 while processing_template_decl since we don't always know whether
12556 or not they will need constructing/destructing.
12558 * pt.c (uses_template_parms): Check the values of an enumeration
12559 type to make sure they don't depend on template parms.
12561 * decl.c (make_typename_type): Don't lookup the field if the
12562 context uses template parms, even if we're not
12563 processing_template_decl at the moment.
12565 * pt.c (coerce_template_parms): Avoid looking at the
12566 TYPE_LANG_DECL portion of a typename type, since there won't be
12568 (tsubst): Do constant folding as necessary to make sure that
12569 arguments passed to lookup_template_class really are constants.
12571 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
12573 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
12574 * decl2.c (finish_file): Only register exception tables if we
12577 * decl.c (init_decl_processing): Add __builtin_[fs]p.
12579 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12581 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
12583 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
12585 * error.c (dump_decl): Avoid crashing when presented with a
12586 uninitialized constant, as can occur with a template parameter.
12587 (dump_expr): Make sure that there are enough levels of
12588 current_template_parms before we start diving through them.
12590 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
12592 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
12595 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12597 * except.c (expand_throw): Call build_delete for all
12598 exception types, not just objects with destructors.
12600 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
12602 * decl.c (current_local_enum): Remove static.
12603 * pt.c (tsubst_enum): Save and restore value of current_local_enum
12604 in case template is expanded in enum decl.
12605 (instantiate_class_template): Use new tsubst_enum signature.
12606 (tsubst_expr): Likewise.
12608 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
12610 * pt.c (begin_member_template_processing): Take a function as
12611 argument, not a set of template arguments. Use the template
12612 parameters, rather than the arguments. Handle non-type parameters
12613 correctly. Push a binding level for the parameters so that multiple
12614 member templates using the same parameter names can be declared.
12615 (end_member_template_processing): Pop the binding level.
12616 (push_template_decl): Mark member templates as static when
12619 * lex.c (do_pending_inlines): Pass the function, not its template
12620 arguments, to begin_member_template_processing.
12621 (process_next_inline): Likewise.
12622 (do_pending_defargs): Likewise.
12624 * error.c (dump_expr): Obtain the correct declaration for a
12625 TEMPLATE_CONST_PARM.
12627 * call.c (add_template_conv_candidate): New function.
12628 (build_object_call): Handle member templates, as done in the other
12631 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
12633 * decl.c (replace_defag): Undo previous change.
12634 * lex.c (do_pending_defargs): Deal with member templates.
12636 * pt.c (is_member_template): Avoid crashing when passed a
12637 non-function argument.
12639 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12641 * class.c (grow_method): Remove check for redeclaration.
12643 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
12645 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
12646 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
12647 (PRIMARY_TEMPLATE_P): Use it.
12648 * call.c (build_overload_call_real): Use it.
12649 * class.c (instantiate_type): Likewise.
12650 * decl.c (decls_match): Likewise.
12651 * method.c (build_overload_identifier): Likewise.
12652 * pt.c (push_template_decl): Likewise.
12653 (classtype_mangled_name): Likewise.
12654 (lookup_template_class): Likewise.
12656 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
12657 DECL_NTPARMS to conform to usage elsewhere.
12658 * call.c (add_template_candidate): Likewise.
12659 * class.c (instantiate_type): Likewise.
12660 * pt.c (instantiate_template): Likewise.
12661 (get_bindings): Likewise.
12663 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
12664 is_member_template.
12666 * pt.c (unify): Undo changes to allow multiple levels of template
12668 (type_unification): Likewise.
12669 (fn_type_unification): Likewise.
12670 (get_class_bindings): Likewise.
12671 * cp-tree.h (Likewise).
12673 * decl.c (replace_defarg): Check that the type of the default
12674 parameter does not invlove a template type before complaining
12675 about the initialization.
12677 * error.c (dump_expr): Deal with template constant parameters in
12678 member templates correctly.
12680 * pt.c (is_member_template): Deal with class specializations
12682 (tsubst): Handle "partial instantiation" of member templates
12685 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
12687 * pt.c (type_unification): Change calling sequence to allow for
12688 multiple levels of template parameters.
12689 (tsubst_expr): Likewise.
12690 (tsubst): Likewise.
12691 (tsubst_copy): Likewise.
12692 (instantiate_template): Likewise.
12694 * call.c (build_overload_call_real): Use it.
12695 (add_builtin_candidate): Use it.
12696 (build_new_method_call): Use it.
12697 * class.c (instantiate_type): Use it.
12698 * decl.c (grokdeclarator): Use it.
12699 * decl2.c (finish_file): Use it.
12700 * method.c (build_overload_identifier): Use it.
12702 * call.c (add_template_candidate): Add additional parameter for
12703 the function return type. Call fn_type_unification istead of
12705 (build_user_type_conversion_1): Handle member templates.
12706 (build_new_function_call): Likewise.
12707 (build_new_op): Likewise.
12708 (build_new_method_call): Likewise.
12710 * class.c (grow_method): Don't give an error message indicating
12711 that two member templates with the same name are ambiguous.
12712 (finish_struct): Treat member template functions just like member
12715 * cp-tree.h (check_member_template): Add declaration.
12716 (begin_member_template_processing): Likewise.
12717 (end_member_template_processing): Likewise.
12718 (fn_type_unification): Likewise.
12719 (is_member_template): Likewise.
12720 (tsubst): Change prototype.
12721 (tsubst_expr): Likewise.
12722 (tsubst_copy): Likewise.
12723 (instantiate_template): Likewise.
12724 (get_bindings): Likewise.
12726 * decl.c (decls_match): Handle multiple levels of template
12728 (pushdecl): Handle template type params just like other type
12730 (push_class_level_binding): Return immediately if the
12731 class_binding_level is NULL.
12732 (grokfndecl): If check_classfn() returns a member_template, use
12733 the result of the template, not the template itself.
12735 * decl2.c (check_member_template): New function. Check to see
12736 that the entity declared to be a member template can be one.
12737 (check_classfn): Allow redeclaration of member template functions
12738 with different types; the new functions can be specializations or
12739 explicit instantiations.
12741 * error.c (dump_decl): Handle multiple levels of template
12743 (dump_function_decl): Update to handle function templates.
12745 * lex.c (do_pending_inlines): Set up template parameter context
12746 for member templates.
12747 (process_next_inline): Likewise.
12749 * method.c (build_overload_identifier): Adjust for multiple levels
12750 of template parameters.
12752 * parse.y (fn.def2): Add member templates.
12753 (component_decl_1): Likewise.
12755 * pt.c (begin_member_template_processing): New function.
12756 (end_member_template_processing): Likewise.
12757 (is_member_template): Likewise.
12758 (fn_type_unification): Likewise.
12759 (current_template_parms): Return a vector of all the template
12760 parms, not just the innermost level of parms.
12761 (push_template_decl): Deal with the possibility of member
12763 (lookup_template_class): Likewise.
12764 (uses_template_parms): Likewise.
12765 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
12766 TEMPLATE_CONST_PARM to deal with multiple levels of template
12767 arguments. Add processing of TEMPLATE_DECL to produce new
12768 TEMPLATE_DECLs from old ones.
12769 (do_decl_instantiation): Handle member templates.
12771 * search.c (lookup_fnfields_1): Handle member template conversion
12774 * tree.c (cp_tree_equal): Check the levels, as well as the
12775 indices, of TEMPLATE_CONST_PARMs.
12777 * typeck.c (comptypes): Check the levels, as well as the indices,
12778 fo TEMPLATE_TYPE_PARMs.
12779 (build_x_function_call): Treat member templates like member
12782 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12784 * typeck.c (c_expand_return): Always convert_for_initialization
12785 before checking for returning a pointer to local.
12787 * pt.c (type_unification): If strict and the function parm doesn't
12788 use template parms, just compare types.
12790 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
12792 * method.c (build_overloaded_value): Replace direct call
12793 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
12795 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12797 * typeck.c (convert_arguments): Don't arbitrarily choose the first
12798 of a set of overloaded functions.
12800 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12802 * lex.c (real_yylex): Don't elide __FUNCTION__.
12804 * method.c (build_overload_value): Add in_template parm.
12805 (build_overload_int): Likewise.
12806 (build_overload_identifier): Pass it.
12808 * decl.c (duplicate_decls): Don't bash a previous template
12809 definition with a redeclaration.
12811 * pt.c (unify): float doesn't match double.
12813 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
12814 TYPE_DECL. Handle getting non-template types.
12815 * parse.y (explicit_instantiation): Use typespec instead of
12816 aggr template_type.
12818 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
12820 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
12822 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
12824 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
12825 (compare_ics): Likewise.
12827 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12829 * call.c (joust): Warn about choosing one conversion op over
12830 another because of 'this' argument when the other return type is
12832 (source_type): New fn.
12834 * call.c (build_new_op): Strip leading REF_BIND from first operand
12835 to builtin operator.
12837 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
12840 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
12842 * call.c (null_ptr_cst_p): Remove support for (void*)0.
12844 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
12846 * typeck.c (expand_target_expr): Make definition match declaration.
12848 * class.c (get_basefndecls): Make definition match declaration.
12850 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
12852 * input.c (sub_getch): Eventually give up and release the input file.
12854 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
12857 * call.c (joust): Tweak message.
12859 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
12861 * error.c (type_as_string): Put const/volatile on template type
12862 parameters where appropriate.
12864 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
12866 * call.c (strictly_better): Make arguments unsigned ints.
12868 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
12870 * lex.c (real_yylex): Refer to __complex instead of complex.
12872 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
12874 * lex.c (real_yylex): Don't use getc directly.
12876 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12878 * call.c (is_subseq): Don't try to be clever.
12880 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
12882 * parse.y, pt.c: Include "except.h".
12883 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
12884 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
12885 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
12886 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
12889 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
12891 * decl2.c (mark_vtable_entries): Instead of replacing pure
12892 virtuals with a reference to __pure_virtual, copy the decl and
12895 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12897 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
12899 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
12901 * pt.c (instantiate_class_template): Call repo_template_used
12902 before finish_prevtable_vardecl.
12904 * call.c (is_subseq): New fn.
12905 (compare_ics): Use it.
12907 * repo.c (finish_repo): Don't crash on no args.
12909 * parse.y (named_complex_class_head_sans_basetype): Handle
12910 explicit global scope.
12911 * decl2.c (handle_class_head): New fn.
12913 * pt.c (unify): Add CONST_DECL case.
12915 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12917 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
12919 * cp-tree.h (report_type_mismatch): Add prototype.
12920 * call.c (build_overload_call_real): Remove erroneous fourth
12921 argument to report_type_mismatch.
12922 (build_user_type_conversion_1): Remove erroneous second arg to
12924 (build_new_function_call): Likewise.
12925 (build_object_call): Likewise.
12926 (build_new_op): Likewise.
12927 (build_new_method_call): Likewise.
12929 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12931 * error.c (dump_decl): Don't bother processing a function with no
12932 DECL_LANG_SPECIFIC.
12934 * method.c (emit_thunk): Call init_function_start in the macro case.
12936 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
12938 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
12939 defined and used to set flag_vtable_thunks.
12941 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12943 * parse.y: Don't clear the inlines from their obstack until they've
12944 all been processed.
12946 * decl.c (duplicate_decls): Don't complain about exception
12947 specification mismatch if flag_exceptions is off.
12949 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
12951 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
12953 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
12955 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
12956 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
12957 Include <stdio.h> before include files that formerly used STDIO_PROTO.
12959 * decl.c, g++spec.c, lex.c, method.c, repo.c:
12960 Include "config.h" first, as per autoconf manual.
12962 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12964 * decl.c (duplicate_decls): Tweak wording.
12965 * lex.c (do_pending_defargs): Don't die if we see a default arg
12966 that isn't a DEFAULT_ARG.
12967 * error.c (dump_expr): Handle DEFAULT_ARG.
12969 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
12970 * lang-options.h: Add -fhandle-exceptions.
12972 * class.c (build_vtable): Vtables are artificial.
12973 (prepare_fresh_vtable): Likewise.
12975 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12977 * cvt.c (ocp_convert): After converting to the target type, set
12978 LOOKUP_NO_CONVERSION.
12980 * call.c (joust): Warn about potentially confusing promotion rules
12982 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
12984 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
12986 * exception.cc: Declare __terminate_func with noreturn attribute.
12988 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
12990 * parse.y: Break out eat_saved_input, handle errors.
12991 (function_try_block): Use compstmt instead of compstmt_or_error.
12993 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12995 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
12997 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12999 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
13000 existence of cc1plus check whether $(LANGUAGES) contains C++.
13002 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13004 * method.c (do_build_copy_constructor): When copying an anonymous
13005 union member loop around to handle nested anonymous unions. Use
13006 the offset of the member relative to the outer structure, not the
13009 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13011 * call.c (resolve_args): New fn.
13012 (build_new_function_call): Use it.
13013 (build_object_call): Likewise.
13014 (build_new_method_call): Likewise.
13016 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
13018 * call.c (build_over_call): tsubst all default parms from templates.
13020 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
13022 * decl.c (struct cp_function): Add static_labelno.
13023 (push_cp_function_context): Save it.
13024 (pop_cp_function_context): Restore it.
13026 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13028 * typeck.c (build_component_ref_1): Convert from reference.
13030 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13032 * parse.y (current_declspecs, prefix_attributes): Initialize to
13035 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
13036 before we try to force it to be a TREE_LIST.
13037 (decl): Make sure $1.t is non-nil.
13039 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
13041 * pt.c (uses_template_parms): Handle template first-parse codes.
13043 * decl.c (cp_finish_decl): Only warn about user-defined statics.
13045 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13047 * pt.c (unify): Handle BOOLEAN_TYPE.
13049 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
13050 * pt.c (tsubst): Don't set it.
13051 * call.c (build_over_call): Use uses_template_parms.
13053 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
13055 * method.c (build_overload_nested_name): Use static_labelno
13056 instead of var_labelno.
13057 (build_qualified_name): New fn.
13058 (build_overload_name): Split out from here.
13059 (build_static_name): Use build_qualified_name.
13060 * decl.c (cp_finish_decl): Statics in extern inline functions
13061 have comdat linkage.
13062 (start_function): Initialize static_labelno.
13064 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
13066 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
13067 before "all member functions in class [] are private".
13069 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
13071 * lex.c (do_scoped_id): convert_from_reference.
13072 * init.c (build_offset_ref): Likewise.
13074 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
13076 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
13078 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
13080 * typeck.c (get_member_function_from_ptrfunc): Promote index
13083 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
13085 * tree.c (layout_basetypes): Move non-virtual destructor warning.
13086 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
13088 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13090 * decl.c (grokdeclarator): Call add_defarg_fn for the function
13092 * lex.c (add_defarg_fn): Adjust.
13093 (do_pending_defargs): Adjust. Don't skip the first parm.
13095 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
13097 * decl.c (build_enumerator): Global enumerators are also readonly.
13099 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
13100 (build_dynamic_cast): Call it and convert_from_reference.
13102 * lex.c (add_defarg_fn): New fn.
13103 (snarf_defarg): Don't add to defarg_types.
13104 (do_pending_defargs): Lose defarg_types. All fns we process now
13106 * decl.c (grokfndecl): Call add_defarg_fn.
13108 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
13109 * cp-tree.def: Add DEFAULT_ARG.
13110 * spew.c (yylex): Call snarf_defarg as appropriate.
13111 * parse.y: New tokens DEFARG and DEFARG_MARKER.
13112 (defarg_again, pending_defargs, defarg, defarg1): New rules.
13113 (structsp): Use pending_defargs.
13114 (parms, full_parm): Use defarg.
13115 * lex.c (init_lex): Initialize inline_text_firstobj.
13116 (do_pending_inlines): Never pass the obstack to feed_input.
13117 (process_next_inline): Call end_input instead of restore_pending_input.
13118 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
13119 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
13120 * input.c (end_input): New fn.
13121 (sub_getch): At the end of some fed input, just keep returning EOF
13122 until someone calls end_input.
13123 Remove 'obstack' field from struct input_source.
13124 * decl.c (grokparms): Handle DEFAULT_ARG.
13125 (replace_defarg): New fn.
13126 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
13128 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13130 * call.c (implicit_conversion): If nothing else works, try binding
13131 an rvalue to a reference.
13133 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
13135 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
13136 ifndef for Cygwin32 to include SIGSEGV.
13138 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13140 * class.c (finish_struct_1): Only complain about pointers without
13141 copy stuff if there are any constructors.
13143 * rtti.c (build_dynamic_cast): Call complete_type on the types.
13145 * decl.c (grokfndecl): If the function we chose doesn't actually
13148 * decl2.c (grokclassfn): Don't specify 'const int' for the
13149 artificial destructor parm.
13151 * pt.c (type_unification): If we are called recursively, nothing
13154 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
13156 * decl.c (init_decl_processing): Stop trying to catch signals
13157 other than SIGABRT since the Cygwin32 library doesn't support
13158 them correctly yet. This fixes a situation in which g++ causes
13159 a hang on SIGSEGVs and other such signals in our Win32-hosted
13162 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
13164 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
13166 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
13168 * typeck2.c (store_init_value): Always return the value if our
13169 type needs constructing.
13171 * method.c (hack_identifier): Convert class statics from
13174 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
13176 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
13178 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
13180 * typeck.c (c_expand_return): Make sure we clean up temporaries at
13181 the end of return x;
13183 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13185 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
13187 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
13189 * except.c (expand_builtin_throw): Add support
13190 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
13192 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13194 * repo.c (extract_string): Null-terminate.
13196 * cp-tree.h (TI_SPEC_INFO): New macro.
13197 (CLASSTYPE_TI_SPEC_INFO): New macro.
13198 * pt.c (push_template_decl): Correctly determine # of template parms
13201 * call.c (compare_ics): Really fix 'this' conversions.
13203 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13206 * pt.c (push_template_decl): Complain about mismatch in # of
13207 template parms between a class template and a member template.
13209 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13211 * method.c (synthesize_method): You can't call
13212 function_cannot_inline_p after finish_function.
13213 * decl.c (finish_function): Turn on flag_inline_functions and turn
13214 off DECL_INLINE before handing a synthesized method to the
13217 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13219 * method.c (synthesize_method): Remove July 30 change to never set
13220 DECL_INLINE if at_eof.
13222 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
13224 * xref.c (GNU_xref_member): Ensure that the node has a
13225 decl_lang_specific part before checking DECL_FRIEND_P.
13227 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13229 * pt.c (instantiate_class_template): Diagnose non-class types used
13232 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13234 * typeck.c (build_conditional_expr): Use convert_for_initialization
13235 instead of convert_and_check.
13237 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13239 * parse.y (typespec): Don't pedwarn for typeof.
13241 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
13243 * repo.c (finish_repo): Only check changes if we would write a
13246 * call.c (compare_ics): Fix handling of 'this' conversions.
13248 * pt.c (do_decl_instantiation): Support static data too. Rename
13249 from do_function_instantiation.
13250 * cp-tree.h: Adjust.
13253 * repo.c (extract_string): New fn.
13254 (get_base_filename): Use it.
13255 (init_repo): Compare old args with current args.
13257 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
13259 * Makefile.in, Make-lang.in: Protect C-ls with a comment
13260 character, idea from Paul Eggert <eggert@twinsun.com>.
13262 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
13264 * typeck.c (c_expand_return): Be more persistent in looking for
13267 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
13268 pointer to reference.
13270 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
13272 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13274 * init.c (build_member_call, build_offset_ref):
13275 Use do_scoped_id instead of do_identifier.
13277 * cvt.c (convert): Remove bogosity.
13279 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13281 * cvt.c (build_up_reference): Do checks of ARGTYPE and
13282 TARGET_TYPE before trying to use get_binfo.
13284 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
13286 * cvt.c (build_up_reference): Call get_binfo to get access control.
13288 * decl2.c (import_export_decl): If we don't support weaks, leave
13291 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
13293 * except.c (expand_builtin_throw): Add support for machines that
13294 cannot access globals after throw's epilogue when
13295 -fno-sjlj-exceptions is used.
13297 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
13299 * parse.y: 'std::' becomes '::'.
13300 * lex.c (real_yylex): Remove 'namespace' warning.
13301 * init.c (build_member_call): Ignore 'std::'.
13302 (build_offset_ref): Likewise.
13303 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
13304 (do_toplevel_using_decl): Ignore 'using std::whatever'.
13305 * decl.c (push_namespace): Just sorry.
13306 (pop_namespace): Nop.
13307 (init_decl_processing): Declare std namespace.
13309 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13311 * search.c (push_class_decls): A name which ambiguously refers to
13312 several instantiations of the same template just refers to the
13315 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
13317 * decl.c (build_enumerator): Fix problem with unsigned long
13318 enumerated values being smashed to ints, causing overflow
13319 when computing next enumerated value (for enum values around
13322 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
13324 * typeck.c (build_component_ref): Only call mark_used on a decl.
13326 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13328 * typeck.c (build_c_cast): Make the check for a ptr to function
13329 more specific before possible default_conversion call.
13331 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
13333 * except.c (expand_exception_blocks): Simplify and fix and make
13334 sure we don't end a region in a sequence, as expand_end_bindings
13337 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
13339 * except.c (init_exception_processing): Mark terminate as not
13340 returning so that the optimizer can optimize better.
13342 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
13344 * cvt.c (convert): Don't do any extra work, if we can avoid it
13347 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
13349 * *.[chy]: Change cp_convert to ocp_convert, change convert to
13350 cp_convert. convert is now reserved for the backend, and doesn't
13351 have the semantics a frontend person should ever want.
13353 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
13355 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
13356 Lose -traditional support.
13358 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13360 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
13362 * parse.y (self_reference): Do it for templates, too.
13363 * class.c (pushclass): Don't overload_template_name; the alias
13364 generated by build_self_reference serves the same purpose.
13366 * tree.c (list_hash): Make static, take more args.
13367 (list_hash_lookup): Likewise.
13368 (list_hash_add): Make static.
13369 (list_hash_canon): Lose.
13370 (hash_tree_cons): Only build a new node if one isn't already in the
13372 (hash_tree_chain): Use hash_tree_cons.
13373 * cp-tree.h: Adjust.
13374 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
13375 of calling lookup_name.
13377 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
13379 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
13380 doesn't refer to the CONST_DECLs.
13382 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
13384 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
13386 (expand_class_desc): Convert the last argument to a sizetype.
13388 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13390 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
13391 __real__): Add reswords.
13392 * hash.h: Regenerate.
13393 * lex.h (rid): Add RID_COMPLEX.
13394 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
13395 * lex.c (init_lex): Add building of RID_COMPLEX.
13396 (real_yylex): General cleanup in line with what c-lex.c also has,
13397 sans the cruft for traditional; add handling of SPEC_IMAG, complex
13398 types, and imaginary numeric constants.
13399 * parse.y (REALPART, IMAGPART): Add tokens.
13400 (unary_expr): Add REALPART and IMAGPART rules.
13401 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
13402 * decl.c (complex_{integer,float,double,long}_type_node): Define
13404 (init_decl_processing): Set up the types.
13405 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
13406 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
13407 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13408 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
13409 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
13411 * method.c (build_overload_name): Add handling of the different
13412 COMPLEX_TYPEs, prefixing them with `J'.
13413 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
13414 as a template parm.
13415 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
13416 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
13417 (mapcar): Handle COMPLEX_CST.
13418 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
13419 (common_type): Add code for complex types.
13420 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13421 (convert_for_assignment): Likewise.
13422 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
13424 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
13426 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
13427 tsubst_expr, as it might try to do overload resolution.
13429 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
13431 * pt.c (instantiate_class_template): Oops.
13433 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13435 * cp-tree.def: Add TAG_DEFN.
13436 * pt.c (tsubst_enum): New fn.
13437 (instantiate_class_template): Use it.
13438 (tsubst_expr): Support TAG_DEFN.
13439 (tsubst): Support local enums.
13440 (tsubst_copy): Likewise.
13441 * decl.c (finish_enum): Likewise.
13442 (start_enum): If this is a local enum, switch to permanent_obstack.
13444 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
13446 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
13447 (finish_function): Put the base init code for constructors just
13448 after the parm cleanup insns.
13449 (struct cp_function): Add last_parm_cleanup_insn.
13450 (push_cp_function_context): Likewise.
13451 (pop_cp_function_context): Likewise.
13453 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13455 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
13457 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13459 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
13460 for THUNK_FNDECL before we switch to temporary allocation.
13462 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
13464 * call.c (build_new_op): Handle null arg2 for ?:.
13466 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
13468 * except.c (expand_exception_blocks): Ensure that we flow through
13469 the end of the exception region for the exception specification.
13470 Move exception region for the exception specification in, so that
13471 it doesn't protect the parm cleanup. Remove some obsolete code.
13472 * decl.c (store_parm_decls): Likewise.
13473 (finish_function): Likewise.
13475 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
13477 * init.c (build_new): Fix nothrow handling.
13479 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13481 * init.c (emit_base_init): Don't warn about the initialization
13482 list for an artificial member.
13484 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13486 * expr.c (do_case): Handle !START case for the error msg.
13488 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13490 * decl2.c, lang-options.h: New option -Weffc++.
13491 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
13494 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
13495 to MULTIPLE_SYMBOL_SPACES.
13497 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
13499 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
13501 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
13503 * typeck.c (c_expand_return): Don't complain about returning void
13504 to void in an artificial function.
13505 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
13506 don't set DECL_RESULT, set DECL_ARTIFICIAL.
13507 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
13509 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
13511 * init.c (init_decl_processing): Add support for setjmp/longjmp based
13512 exception handling.
13513 * except.c (init_exception_processing): Likewise.
13514 (expand_end_catch_block): Likewise.
13515 (expand_exception_blocks): Likewise.
13516 (expand_throw): Likewise.
13517 * exception.cc (__default_terminate): Likewise.
13519 * init.c (perform_member_init): Use new method of expr level
13520 cleanups, instead of cleanups_this_call and friends.
13521 (emit_base_init): Likewise.
13522 (expand_aggr_vbase_init_1): Likewise.
13523 (expand_vec_init): Likewise.
13524 * decl.c (cp_finish_decl): Likewise.
13525 (expand_static_init): Likewise.
13526 (store_parm_decls): Likewise.
13527 (cplus_expand_expr_stmt): Likewise.
13528 * decl2.c (finish_file): Likewise.
13530 * Make-lang.in (exception.o): Ok to compile with -O now.
13532 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
13533 we know it will be done later by the backend.
13535 * decl2.c (lang_f_options): Remove support for short temps.
13536 * lang-options.h: Likewise.
13538 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13540 * tree.c (varargs_function_p): New fn.
13541 * method.c (emit_thunk): Replace broken generic code with code to
13542 generate a heavyweight thunk function.
13544 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
13546 * pt.c (process_template_parm): pedwarn about floating-point parms.
13548 * decl.c (grokdeclarator): inline no longer implies static.
13550 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
13552 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
13554 * class.c (check_for_override): The signature of an overriding
13555 function is not changed.
13557 * call.c (build_over_call): Move setting of conv into the loop.
13558 Note: this change, along with the related changes of the 18th thru
13559 the 20th of April, fix an infinite loop problem in conversions.
13561 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13563 * call.c (build_user_type_conversion_1): Really ignore rvalue
13564 conversions when looking for a REFERENCE_TYPE.
13566 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
13567 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
13568 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
13569 (build_unary_op): Likewise.
13570 * call.c (build_over_call): See through a CONVERT_EXPR around the
13571 ADDR_EXPR for on a temporary.
13572 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
13573 the ADDR_EXPR for a local variable.
13575 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
13577 * call.c (build_user_type_conversion_1): If we're trying to
13578 convert to a REFERENCE_TYPE, only consider lvalue conversions.
13579 (build_new_function_call): Print candidates.
13580 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
13581 (reference_binding): Binding a temporary of a reference-related type
13584 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13586 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
13587 * tinfo2.cc (type_info::before): Likewise.
13589 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
13591 * call.c (implicit_conversion): Oops.
13593 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
13595 * call.c (implicit_conversion): Try to find a reference conversion
13596 before binding a const reference to a temporary.
13598 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
13600 * exception.cc (__default_unexpected): Call terminate by default,
13601 so that if the user overrides terminate, the correct function will
13604 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
13606 * parse.y (left_curly): Avoid trying to use any fields of
13607 error_mark_node, as there aren't any.
13609 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
13611 * lex.c (do_identifier): Avoid breaking on overloaded methods
13612 as default arguments.
13614 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
13616 * call.c (add_template_candidate): Initialize the variable "dummy".
13618 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
13620 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
13621 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
13623 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13625 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
13626 (debug_binfo): Delete decl, not needed.
13628 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
13629 promotes_to_aggr_type): Delete fns.
13630 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
13631 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
13632 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
13634 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
13636 * friend.c (is_friend_type): Delete fn.
13637 * cp-tree.h (is_friend_type): Delete decl.
13639 * decl.c (original_result_rtx, double_ftype_double,
13640 double_ftype_double_double, int_ftype_int, long_ftype_long,
13641 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
13642 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
13644 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
13646 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
13648 * decl.c (pushdecl_nonclass_level): #if 0, unused.
13649 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
13651 * lex.c (reinit_lang_specific): #if 0, unused.
13652 * cp-tree.h (reinit_lang_specific): #if 0 decl.
13654 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
13655 * cp-tree.h (revert_static_member_fn): Delete decl.
13657 * class.c (root_lang_context_p): Delete fn.
13658 * cp-tree.h (root_lang_context_p): Delete decl.
13660 * decl.c (set_current_level_tags_transparency): #if 0, unused.
13661 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
13663 * lex.c (set_vardecl_interface_info): Make static.
13664 * cp-tree.h (set_vardecl_interface_info): Delete decl.
13666 * call.c (find_scoped_type): Make static.
13667 * cp-tree.h (find_scoped_type): Delete decl.
13669 * search.c (convert_pointer_to_vbase): Make static.
13670 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
13672 * decl.c (const_ptr_type_node): Likewise.
13673 * cp-tree.h (const_ptr_type_node): Delete decl.
13675 * typeck.c (common_base_type): Make static.
13676 * cp-tree.h (common_base_types): Delete erroneous decl.
13678 * pt.c (classtype_mangled_name): Make static.
13679 * cp-tree.h (classtype_mangled_name): Delete decl.
13681 * lex.c (check_newline): Make static.
13682 * cp-tree.h (check_newline): Delete decl.
13684 * typeck.c (build_x_array_ref): Delete fn, same idea as
13686 * cp-tree.h (build_x_array_ref): Delete decl.
13688 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
13690 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
13692 * class.c (build_vtable_entry): Make static.
13693 * cp-tree.h (build_vtable_entry): Delete decl.
13695 * class.c (build_vbase_pointer): Make static.
13696 * cp-tree.h (build_vbase_pointer): Delete decl.
13698 * sig.c (build_sptr_ref): Add forward decl and make static.
13699 * cp-tree.h (build_sptr_ref): Delete decl.
13701 * call.c (build_new_method_call): Add forward decl and make static.
13702 * cp-tree.h (build_new_method_call): Delete decl.
13704 * call.c (build_object_call): Make static.
13705 * class.c (check_for_override, complete_type_p, mark_overriders):
13707 * decl.c (cp_function_chain): Likewise.
13708 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
13710 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
13712 * tree.c (build_cplus_array_type_1): Likewise.
13713 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
13714 (comp_target_parms): Likewise.
13716 * init.c (build_builtin_call): Make static.
13717 * cp-tree.h (build_builtin_call): Delete decl.
13719 * typeck.c (binary_op_error): Delete decl.
13720 * cp-tree.h (binary_op_error): Likewise.
13722 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13724 * call.c (build_method_call): Compare against error_mark_node
13725 directly, rather than the ERROR_MARK tree code.
13726 * cvt.c (cp_convert): Likewise.
13727 * decl.c (print_binding_level): Likewise.
13728 (duplicate_decls): Likewise.
13729 (grokdeclarator): Likewise.
13730 (grokdeclarator): Likewise.
13731 * init.c (expand_aggr_init_1): Likewise.
13732 (decl_constant_value): Likewise.
13733 * method.c (build_opfncall): Likewise.
13734 (hack_identifier): Likewise.
13735 * typeck.c (build_modify_expr): Likewise.
13737 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
13739 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13741 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
13743 * pt.c (coerce_template_parms): Add new error message.
13745 * method.c (build_overload_value): Implement name mangling for
13746 floating-point template arguments.
13748 * method.c (build_overload_int, icat, dicat): Fix mangling of template
13749 arguments whose absolute value doesn't fit in a signed word.
13751 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13753 * friend.c: New file; put all of the friend stuff in here.
13754 * init.c: Instead of here.
13755 * Makefile.in (CXX_OBJS): Add friend.o.
13756 (friend.o): Add dependencies.
13757 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
13759 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
13761 * call.c (build_scoped_method_call): Complain if the scope isn't a
13764 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13766 * parse.y (left_curly): Don't crash on erroneous type.
13768 * init.c (build_delete): Fix type of ref.
13770 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
13772 * search.c (get_vbase_1): Renamed from get_vbase.
13773 (get_vbase): Wrapper, now non-static.
13774 (convert_pointer_to_vbase): Now static.
13776 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
13777 * init.c (build_delete): Pass one.
13778 (build_partial_cleanup_for): Use build_scoped_method_call.
13779 * decl.c (finish_function): Pass a binfo.
13781 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13783 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
13785 * typeck.c (build_c_cast): Lose other reference to flag.
13787 * call.c (build_field_call): Don't look for [cd]tor_identifier.
13788 * decl2.c (delete_sanity): Remove meaningless use of
13789 LOOKUP_HAS_IN_CHARGE.
13790 * decl.c (finish_function): Use build_scoped_method_call instead
13791 of build_delete for running vbase dtors.
13792 * init.c (build_delete): Call overload resolution code instead of
13793 duplicating it badly.
13795 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
13797 * call.c (build_over_call): Call mark_used before trying to elide
13800 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
13802 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13804 * typeck.c (build_modify_expr): Always pedwarn for a cast to
13805 non-reference used as an lvalue.
13807 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13809 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
13811 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13813 * parse.y (handler): Fix template typo.
13815 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13817 * error.c (lang_decl_name): New fn.
13818 * tree.c (lang_printable_name): Use it.
13820 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
13822 * g++spec.c: Include config.h so that we can catch bzero #defines
13823 from the config file.
13825 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
13827 * new1.cc: Include a declaration for malloc, to avoid warning, and
13828 avoid lossing on systems that require one (ones that define malloc
13831 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13833 * decl2.c (max_tinst_depth): New variable.
13834 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
13836 * pt.c (max_tinst_depth): Variable moved.
13837 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
13840 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
13842 * decl.c (xref_basetypes): Allow a base class that depends on
13843 template parms to be incomplete.
13845 * decl2.c (build_expr_from_tree): Support typeid(type).
13846 * rtti.c (get_typeid): Support templates.
13847 (expand_si_desc, expand_class_desc): Fix string length.
13848 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
13850 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
13852 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
13854 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
13856 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13858 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
13859 smashes together template and non-template decls of the same
13862 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
13864 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
13866 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13868 * decl.c (duplicate_decls): Next route, pedwarn about different
13869 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
13871 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13873 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
13874 (struct lang_type): Delete has_default_implementation member.
13875 Increase dummy to 21.
13876 * decl.c (start_method): Delete usage.
13878 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
13879 store_after_parms, start_decl_1, auto_function): Add decls.
13880 (get_arglist_len_in_bytes, declare_implicit_exception,
13881 have_exceptions_p, make_type_decl, typedecl_for_tag,
13882 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
13883 build_component_type_expr, cplus_exception_name,
13884 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
13885 * call.c (build_this): Make static.
13886 (is_complete): Likewise.
13887 (implicit_conversion): Likewise.
13888 (reference_binding): Likewise.
13889 (standard_conversion): Likewise.
13890 (strip_top_quals): Likewise.
13891 (non_reference): Likewise.
13892 (build_conv): Likewise.
13893 (user_harshness): Likewise.
13894 (rank_for_ideal): Likewise.
13895 * decl.c (start_decl_1): Delete forward decl.
13896 (push_decl_level): Make static.
13897 (resume_binding_level): Make static.
13898 (namespace_bindings_p): Make static.
13899 (declare_namespace_level): Make static.
13900 (lookup_name_real): Make static.
13901 (duplicate_decls): Make static. Take register off NEWDECL and
13902 OLDDECL parm decls.
13903 * decl2.c (get_sentry): Make static.
13904 (temp_name_p): Delete fn.
13905 * except.c (auto_function): Delete decl.
13906 * lex.c (handle_{cp,sysv}_pragma): Make static.
13907 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
13908 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
13909 * pt.c (tsubst_expr_values): Make static.
13910 * rtti.c (combine_strings): Delete decl.
13912 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13914 * pt.c (push_template_decl): Handle getting a typedef.
13916 * call.c (build_new_function_call): Complain about void arg.
13918 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13920 * decl.c (duplicate_decls): Give pedwarn of different exceptions
13921 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
13923 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
13925 * except.c (expand_throw): Don't expand the cleanup tree here,
13926 since we are not going to write the rtl out. Fixes problem with
13929 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
13931 * Make-lang.in: Add $(exeext) as necessary.
13933 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
13935 * parse.y (handler_seq): Must have at least one catch clause.
13937 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13939 * call.c (add_builtin_candidate): Restore ?: hack.
13941 * decl.c (grok_op_properties): More warnings.
13943 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13945 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
13946 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
13948 * decl.c (duplicate_decls): Scale back to a warning, and only do
13951 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
13953 * decl.c (duplicate_decls): pedwarn mismatched exception
13956 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
13958 * call.c (build_new_method_call): Don't display the invisible
13959 argument for controlling virtual bases.
13961 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
13963 * new: Add nothrow new and delete, bad_alloc and throw specifications
13965 * decl.c (init_decl_processing): Add throw specification for delete.
13966 * new.cc (nothrow): Define.
13967 * lex.c (real_yylex): Removing warning that throw and friends are
13969 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
13970 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
13971 * Make-lang.in: Add new{1,2}.{cc,o}.
13973 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13975 * lex.c (cons_up_default_function): Fix return type of synth op=.
13977 * init.c (emit_base_init): Add warnings for uninitialized members
13980 * decl.c (xref_basetypes): Add warning for non-polymorphic type
13981 with destructor used as base type.
13983 * decl.c (grok_op_properties): Add warning for op= returning void.
13984 * typeck.c (c_expand_return): Add warning for op= returning anything
13987 * class.c (finish_struct_1): Add warning for class with pointers
13988 but not copy ctor or copy op=.
13990 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
13991 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
13992 (instantiate_template): If -fexternal-templates, add this
13993 instantiation to pending_templates.
13995 * decl2.c (copy_assignment_arg_p): Disable old hack to support
13998 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
14000 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
14002 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
14004 * call.c (standard_conversion): Handle getting references. Tack
14005 on RVALUE_CONV here. Do it for non-class types, too.
14006 (reference_binding): Pass references to standard_conversion.
14007 (implicit_conversion): Likewise.
14008 (add_builtin_candidate): Disable one ?: kludge.
14009 (convert_like): Handle RVALUE_CONVs for non-class types.
14010 (joust): Disable the other ?: kludge.
14012 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14014 * decl.c (init_decl_processing): Add code to build up common
14015 function types beforehand, to avoid creation then removal of
14016 things already in the hash table.
14018 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
14020 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
14023 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
14024 current_template_parms.
14026 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
14028 * search.c (lookup_field): Don't return a function, check want_type.
14030 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14032 * init.c (build_new): Make sure PLACEMENT has a type.
14034 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
14036 * init.c (build_new): Support new (nothrow).
14038 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
14040 * pt.c (instantiate_decl): Also do push_to_top_level before setting
14043 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
14044 * pt.c (tsubst): Defer instantiation of default args.
14045 * call.c (build_over_call): Until here.
14047 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14049 * search.c (lookup_field): Make sure we have an
14050 IDENTIFIER_CLASS_VALUE before we try to return it.
14052 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
14054 * call.c (build_method_call): Delete unused var PARM.
14055 (build_overload_call_real): Likewise.
14056 (build_object_call): Delete unused var P.
14057 (build_new_op): Likewise.
14058 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
14059 var definitions, which are never used.
14060 (shadow_tag): Delete unused var FN.
14061 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
14062 * init.c (build_new): Delete unused var ALLOC_TEMP.
14063 * method.c (hack_identifier): Delete unused var CONTEXT.
14064 (do_build_copy_constructor): Delete unused var NAME.
14065 (synthesize_method): Delete unused var BASE.
14066 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
14067 * rtti.c (build_headof): Delete unused var VPTR.
14068 (get_typeid): Delete unused var T.
14069 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
14071 (build_ptrmemfunc): Delete unused vars U and NINDEX.
14072 * typeck2.c (build_functional_cast): Delete unused var BINFO.
14074 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
14076 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
14077 things in a type being defined.
14078 * decl.c (finish_enum): Reverse the values so that they are in
14081 * pt.c (instantiate_class_template): Don't initialize
14082 BINFO_BASETYPES until the vector is filled out.
14083 (unify): Don't abort on conflicting bindings, just fail.
14084 (instantiate_decl): Do push_tinst_level before any tsubsting.
14086 * method.c (build_overload_value): Handle getting a
14087 TEMPLATE_CONST_PARM for a pointer.
14089 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
14091 * init.c (expand_member_init): Don't give 'not a base' error for
14094 * pt.c (instantiate_decl): Call import_export_decl later.
14096 * pt.c (instantiate_class_template): Return a value.
14098 * parse.y (extension): New rule for __extension__.
14099 (extdef, unary_expr, decl, component_decl): Use it.
14101 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
14103 * class.c (base_binfo): Remove unused base_has_virtual member.
14104 (finish_base_struct): Likewise.
14105 (finish_struct_1): Likewise.
14107 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
14109 * search.c (expand_upcast_fixups): Fix bogus code generation
14110 problem where the generated code uses the wrong index into the
14111 runtime built vtable on the stack. Old code could clobber random
14114 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
14116 * init.c (perform_member_init): Make sure the partial EH cleanups
14117 live on the function_obstack.
14119 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
14121 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
14122 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
14124 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
14126 * decl.c (grokvardecl): Avoid ANSI style initialization.
14128 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
14130 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
14132 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
14134 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
14136 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14138 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
14139 arguments we compare against. Start the count of I at 1, not 0,
14140 since argv[0] is still the command.
14142 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
14144 * lang-specs.h: Accept .cp as an C++ extension.
14146 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14148 * cp-tree.h (ptr_reasonably_similar): Add decl.
14150 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14152 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
14153 pointer. New local SPECBITS with the parm's value.
14154 (grokdeclarator): Pass &specbits down.
14156 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
14157 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
14159 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
14160 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
14162 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
14163 not an error_mark_node.
14165 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14167 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
14168 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
14170 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14172 * decl.c (grokdeclarator): When giving an anonymous struct a name,
14173 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
14176 * typeck2.c (build_m_component_ref): If component is a pointer
14177 to data member, resolve the OFFSET_REF now.
14179 * call.c (convert_like): Don't go into infinite recursion.
14181 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
14183 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
14184 * tree.c (layout_basetypes): And on the vbase ptr.
14186 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14188 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
14189 CHAR_TYPE_SIZE so bool is always the same size as another type.
14191 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
14193 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
14195 * decl2.c (grok_x_components): Remove synthesized methods from
14196 TYPE_METHODS of an anonymous union, complain about member
14198 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14200 (finish_function): Just clear the DECL_RTL of our arguments.
14202 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14204 * decl2.c (finish_file): Emit DWARF debugging info for static data
14207 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14209 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
14211 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
14214 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14216 * Make-lang.in (g++-cross$(exeext)): Fix typo.
14218 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14220 Make the g++ driver now be a standalone program, rather than one
14221 that tries to run the gcc driver after munging up the options.
14222 * Make-lang.in (g++.c, g++spec.o): New rules.
14223 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
14225 (g++$(exeext)): New rule, based on xgcc rule.
14226 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
14227 * g++spec.c: New file.
14228 * g++.c: Removed file.
14230 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
14232 * cvt.c (build_up_reference): Arrange for any temporary values
14233 that have been keep in registers until now to be put into memory.
14235 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14237 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
14238 that make -j3 bootstrap works better.
14240 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
14242 * decl.c (pushtag): Do pushdecl for anon tags.
14244 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
14246 * typeck.c (c_expand_return): Fix logic.
14247 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
14249 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
14251 * g++.c (main): Make sure arglist has a final NULL entry. Add
14252 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
14253 stdin/stdout of the invoked program are redirected to
14256 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14258 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
14260 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
14262 * init.c (resolve_offset_ref): Handle obj.vfn better.
14263 * typeck.c (build_component_ref): Set TREE_TYPE on result from
14266 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
14268 * typeck.c (convert_for_assignment): Also handle anachronistic
14269 implicit conversions from (::*)() to cv void*.
14270 * cvt.c (cp_convert_to_pointer): Likewise.
14272 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14274 * lex.c (handle_cp_pragma): Fix bogus warning.
14276 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
14278 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
14279 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
14281 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14283 * class.c (finish_struct_1): Support DWARF2_DEBUG.
14284 * search.c (dfs_debug_mark): Likewise.
14285 * decl2.c (finish_vtable_vardecl): Likewise.
14286 * decl.c (pushtag, finish_enum): Likewise.
14287 * lex.c (check_newline): Use debug_* instead of calling *out
14288 functions directly.
14290 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14292 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
14293 on some picky hosts.
14295 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14297 * class.c (finish_struct_1): A class has a non-trivial copy
14298 constructor if it has virtual functions.
14300 * cvt.c (cp_convert): Always call a constructor.
14302 * call.c (reference_binding): Still tack on a REF_BIND
14303 for bad conversions.
14304 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
14306 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
14307 (c_expand_return): Likewise.
14308 * typeck2.c (digest_init): Likewise for { }.
14309 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
14310 * cvt.c (cp_convert): Handle failure better.
14312 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14314 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
14315 of GCC be path-relative.
14317 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14319 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
14320 it does need choose-temp.o and pexecute.o.
14322 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14324 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
14325 that we still use it.
14326 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
14328 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14330 * init.c (expand_default_init): Avoid calling constructors to
14331 initialize reference temps.
14333 * cvt.c (convert_to_reference): Fix.
14335 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14337 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
14338 (convert_to_reference): Likewise.
14339 * typeck.c (convert_for_initialization): Likewise.
14340 * init.c (expand_default_init): Likewise.
14341 (expand_aggr_init_1): Likewise.
14342 * cp-tree.h (CONV_NONCONVERTING): Lose.
14343 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
14345 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
14347 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
14349 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
14351 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14353 * init.c (expand_aggr_init_1): Don't crash on non-constructor
14356 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14358 * g++.c: Include gansidecl.h.
14359 (VPROTO, PVPROTO, VA_START): Delete.
14360 (choose_temp_base_try, choose_temp_base, perror_exec,
14361 run_dos) [__MSDOS__]: Delete fns.
14362 (pfatal_with_name): Delete fn.
14363 (temp_filename): Declare like in gcc.c.
14364 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
14365 (error_count, signal_count): Define.
14366 (error): Delete both definitions.
14367 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
14368 (pfatal_pexecute): Add fn from gcc.c.
14369 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
14370 code to use the pexecute stuff also used by gcc.c.
14371 (MIN_FATAL_STATUS): Define.
14372 * Make-lang.in (g++): Add dependency on and linking with
14373 choose-temp.o and pexecute.o.
14375 * cp-tree.h: Include gansidecl.h.
14376 (STDIO_PROTO): Delete #undef/#define.
14377 * cvt.c (NULL): Delete #undef/#define.
14378 * expr.c (NULL): Likewise.
14379 * init.c (NULL): Likewise.
14380 * rtti.c (NULL): Likewise.
14381 * xref.c (NULL): Likewise.
14383 * cp-tree.h (build_user_type_conversion): Add prototype.
14384 * call.c (build_user_type_conversion): Delete prototype. Correct
14385 decl of FLAGS arg to be an int.
14386 * cvt.c (build_user_type_conversion): Likewise.
14388 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
14390 * cp-tree.def: Add TRY_BLOCK and HANDLER.
14391 * except.c (expand_start_catch_block): Support templates.
14392 * parse.y (try_block, handler_seq): Likewise.
14393 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
14395 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14397 * pt.c (current_template_args): New fn.
14398 (push_template_decl): Use it.
14399 * decl.c (grokdeclarator): Use it.
14401 * decl2.c (build_expr_from_tree): Dereference ref vars.
14403 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
14404 the decl-specifier-seq.
14406 * decl.c (grok_op_properties): Don't force the type of a conversion
14407 op to be complete. Don't warn about converting to the same type
14408 for template instantiations.
14410 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
14413 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
14415 * typeck.c (get_delta_difference): Remove previous bogusness.
14416 Don't give errors if force is set.
14418 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14420 * decl2.c (finish_file): Don't emit debug info.
14421 * decl.c (pushdecl): Lose obsolete code.
14422 (grokdeclarator): Still do the long long thing after complaining.
14423 * search.c (note_debug_info_needed): Don't do anything if we're in a
14425 * method.c (synthesize_method): For non-local classes,
14426 push_to_top_level first.
14428 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
14430 * typeck.c (get_delta_difference): Add no_error parameter.
14431 (build_ptrmemfunc): Call get_delta_difference with no_error set;
14432 we don't want error messages when converting unrelated
14433 pointer-to-member functions.
14435 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
14437 * error.c (dump_expr): Improve the wording on error messages that
14438 involve pointer to member functions.
14440 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
14442 * cvt.c (cp_convert_to_pointer): Move code for conversions from
14443 (::*)() to void* or (*)() up a bit, so that we can convert from
14444 METHOD_TYPEs as well.
14446 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14448 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
14449 There are no 'member' types.
14450 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
14451 (build_x_typeid): Handle errors.
14453 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
14455 * typeck.c (convert_for_assignment): Handle anachronistic implicit
14456 conversions from (::*)() to void* or (*)().
14457 * cvt.c (cp_convert_to_pointer): Likewise.
14458 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
14459 conversions from here.
14460 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
14461 * lang-options.h: Likewise.
14462 * decl2.c (warn_pmf2ptr): Define.
14463 * cp-tree.h: Declare it.
14464 * typeck2.c (digest_init): Allow pmfs down into
14465 convert_for_initialization.
14467 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14469 * typeck.c (c_expand_return): Fix for returning overloaded fn.
14471 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14473 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
14474 * decl.c (grok_reference_init): Pass DIRECT_BIND.
14475 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
14477 * call.c (convert_like): Don't pass INDIRECT_BIND.
14478 * typeck.c (convert_arguments): Likewise.
14479 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
14481 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14483 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
14484 similar code in build_up_ref.
14485 * cvt.c (build_up_reference): Drastically simplify.
14487 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
14489 * typeck.c (signed_or_unsigned_type): If the given type already
14490 as the correct signedness, then just return it.
14492 * typeck.c ({un,}signed_type): If can't do anything, call
14493 signed_or_unsigned_type.
14495 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
14497 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
14498 current_class_type is NULL.
14500 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
14502 * class.c (finish_struct_1): Avoid empty structs by adding a field
14503 so layout_type gets the mode right.
14505 * typeck.c (c_expand_return): Drastically simplify.
14507 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14509 * typeck.c (decay_conversion): Handle overloaded methods.
14511 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
14513 * call.c (build_over_call): A TARGET_EXPR has side-effects.
14515 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
14517 * cvt.c (convert_to_pointer_force): Add code to support pointer to
14518 member function to pointer to function conversions.
14519 * init.c (resolve_offset_ref): Add code to allow faked up objects,
14520 ignoring them if they are not used, and giving an error, if they
14522 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
14523 code, and so that we can give an error, if we needed an object,
14524 and one was not provided.
14525 (build_c_cast): Don't call default_conversion when we want to
14526 convert to pointer to function from a METHOD_TYPE.
14528 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
14530 * Make-lang.in (cplib2.ready): Fix logic.
14532 * decl.c (shadow_tag): Only complain about non-artificial function
14535 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
14537 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
14539 * expr.c (cplus_expand_expr): Pre-tweak call_target like
14540 expand_inline_function would.
14542 * pt.c (mark_decl_instantiated): If extern_p, call
14543 mark_inline_for_output.
14545 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
14547 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
14550 * typeck.c (get_delta_difference): Fix wording, as we can be used
14551 for pointer to data members.
14553 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
14555 * pt.c (tsubst): If the function decl isn't a member of this
14556 template, return a copy of the decl (including copying the
14557 lang-specific part) so we don't hose ourselves later.
14559 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14561 * class.c (finish_struct): Remove DWARF-specific tag handling.
14562 * decl.c (pushtag): Likewise.
14563 (finish_function): Always clear DECL_ARGUMENTS on function decls with
14565 * decl2.c (finish_file): Emit DWARF debugging info for static data
14568 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
14570 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
14571 isn't the same as the new one before we whack it.
14573 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
14575 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
14576 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
14577 warn_traditional and warn_strict_prototypes; remove ancient
14578 'overload' code; remove references to flag_traditional.
14580 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
14582 * input.c (sub_getch): Handle 8-bit characters in string literals.
14584 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
14586 * tree.c (mapcar): Handle CONSTRUCTORs.
14587 (copy_to_permanent): Handle expression_obstack properly.
14589 * Make-lang.in (cplib2.txt): Also depend on the headers.
14591 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
14593 (expand_class_desc): Use USItype for offset field.
14594 * tinfo.h (struct __class_type_info): Likewise.
14596 * method.c (build_overload_int): TYPE_PRECISION should be applied
14599 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
14601 * call.c (build_new_op): A COND_EXPR involving void must be a
14604 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14606 * typeck.c (build_x_component_ref): New fn.
14607 (build_object_ref): Use it.
14608 * parse.y (primary): Use it.
14609 * decl2.c (build_expr_from_tree): Use it.
14610 * cp-tree.h: Declare it.
14612 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
14613 * error.c (dump_type_suffix): Handle variable arrays.
14615 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14617 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
14619 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14621 * decl.c (lookup_name_real): Don't try to look up anything in a
14624 * tinfo2.cc (__throw_type_match_rtti): Oops.
14626 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14628 * Make-lang.in (exception.o): Use -fno-PIC for now.
14630 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14632 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
14634 (get_tinfo_fn_dynamic): Extracted from build_typeid.
14635 * tinfo2.cc (__dynamic_cast): Adjust.
14637 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
14638 (build_x_typeid): Likewise.
14640 * parse.y: Call build_x_typeid instead of build_typeid.
14641 * cp-tree.def: Add TYPEID_EXPR.
14642 * pt.c (tsubst_copy): Handle typeid.
14643 * decl2.c (build_expr_from_tree): Likewise.
14644 * rtti.c (build_x_typeid): Throw bad_typeid from here.
14645 (build_typeid): Not here.
14646 * cp-tree.h: Declare build_x_typeid.
14648 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
14650 * call.c (convert_like): Pull out constant values.
14652 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
14654 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14656 * decl.c (init_decl_processing): Create short int types before
14657 creating size_t in case a machine description needs to use
14658 unsigned short for size_t.
14660 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14662 * Make-lang.in (exception.o): Turn off pic.
14664 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
14665 type, multi-level ptr conversions.
14667 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
14668 (throw_bad_cast): Use it.
14669 (throw_bad_typeid): New fn.
14670 (build_typeid): Throw bad_typeid as needed.
14672 (synthesize_tinfo_fn): Handle functions and arrays before checking
14675 * Remove .h from standard C++ headers, add new.h, move into inc
14678 * exception*: Remove pointer from object, constructors. Add
14679 default exception::what that uses type_info::name. Add
14680 __throw_bad_typeid.
14682 * init.c (build_new): Don't add a cookie to new (void *) T[2].
14684 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
14686 * Make-lang.in: Building C++ code depends on cc1plus.
14688 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14690 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
14691 a HOST_WIDE_INT, not a tree.
14693 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14695 * exception.cc: Don't include <stdlib.h>.
14697 * Make-lang.in (c++.clean): Remove cplib2.*.
14699 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
14701 * parse.y (component_decl_1, component_costructor_declarator case):
14702 Pass attributes/prefix_attributes in tree list.
14704 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
14706 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
14708 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14710 * lex.c (do_identifier): Don't do deferred lookup in a template
14713 * typeck2.c (store_init_value): Oops.
14715 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
14716 New files for C++ lang-support library.
14717 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
14718 (CXX_LIB2FUNCS): Define.
14719 And rules for building the C++ lang-support code.
14720 * config-lang.in (headers): Define.
14721 (lib2funcs): Define.
14723 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14725 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
14727 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
14728 * typeck2.c (store_init_value): Check for initializing pmf with { }
14730 (process_init_constructor): Not here.
14732 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14734 * pt.c (begin_template_parm_list): Increment
14735 processing_template_decl here.
14736 (end_template_parm_list): Not here.
14737 (process_template_parm): No need to add 1 to it now.
14738 * *.c: Use processing_template_decl instead of current_template_parms
14739 to check for being in a template.
14741 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
14742 (tsubst_copy): Handle CONSTRUCTOR.
14743 (instantiate_decl): Set up context properly for variables.
14744 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
14745 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
14747 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14749 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
14751 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14753 * method.c (make_thunk): Call comdat_linkage before setting the
14756 * decl2.c (comdat_linkage): Use make_decl_one_only.
14757 (import_export_decl): Likewise.
14758 * decl.c (init_decl_processing): Check supports_one_only instead of
14761 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
14763 * decl2.c (grokfield): Tighten checking for access decls.
14765 * decl.c (make_typename_type): Resolve references to
14766 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
14767 (lookup_name_real): Types that depend on a template parameter get
14768 an implicit 'typename' unless they're in the current scope.
14769 (start_decl_1): We don't care about incomplete types that depend
14770 on a template parm.
14771 (grokdeclarator): Resolve 'typename's in the type specifier that
14772 refer to members of the current scope.
14774 * call.c (build_over_call): Remove 'inline called before
14775 definition' diagnostic.
14776 (build_method_call): Likewise.
14777 * decl.c (duplicate_decls): Downgrade 'used before declared
14778 inline' to a warning, only with -Winline.
14780 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
14782 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
14784 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14786 * call.c (build_method_call): When calling a signature
14787 default implementation, as in other cases, let instance_ptr simply
14790 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
14792 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
14794 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
14796 * except.c (expand_start_catch_block): Add a pushlevel so that -g
14797 works on hppa and SPARC.
14799 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14801 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
14803 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14805 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
14806 before testing whether it's a signature.
14808 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14810 * call.c (build_new_method_call): Don't complain about signature
14811 pointers and references not being an aggr type.
14812 (build_this): If a signature pointer or reference was passed in,
14814 (build_new_method_call): If instance is a signature pointer, set
14815 basetype to the signature type of instance.
14816 * sig.c (build_signature_method_call): Deleted basetype and
14817 instance parameters, they can be found as the DECL_CONTEXT of
14818 function and as the first argument passed in.
14819 * cp-tree.h: Changed declaration of build_signature_method_call.
14820 * call.c (build_method_call): Deleted first two arguments in call
14821 of build_signature_method_call.
14822 (build_over_call): Added call to build_signature_method_call.
14824 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14826 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
14829 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14831 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
14833 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
14835 * except.c (expand_start_try_stmts): Move to except.c in the backend.
14836 (expand_end_try_stmts): Remove.
14838 * init.c (perform_member_init): Use add_partial_entry () instead
14839 of directly manipulating lists.
14840 (emit_base_init): Likewise.
14842 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
14844 * except.c (expand_exception_blocks): Always make sure USE and
14845 CLOBBER insns that came at the end still do, the backend relies
14848 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
14850 * call.c (build_over_call): We can only use a TARGET_EXPR of the
14853 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
14855 * cvt.c (convert_to_reference): Revert last change, don't complain
14856 about temp without target decl.
14858 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
14860 * decl.c (grokdeclarator): Don't core dump when void() is given.
14862 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
14864 * decl.c (copy_args_p): Don't crash.
14866 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
14868 * pt.c (tsubst): And support template args inside the exception
14871 * pt.c (tsubst): Add support for exception specifications in
14872 template functions.
14874 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
14876 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
14878 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
14879 (start_function): Likewise.
14880 (start_method): Likewise.
14881 (grokfield): Likewise.
14882 (make_call_declarator): Add throw spec parameter.
14883 (set_quals_and_spec): Add routine.
14884 * lex.c (set_quals_and_spec): Likewise.
14885 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
14886 * decl.c (shadow_tag): Eliminate the throw spec parameter to
14888 (groktypename): Likewise.
14889 (start_decl): Eliminate the throw spec parameter. Eliminate the
14890 throw spec parameter to grokdeclarator. Eliminate the throw spec
14891 field in DECL_STMT.
14892 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
14893 (grokfndecl): Remove useless set of raises.
14894 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
14895 the throw spec parameter to start_decl. Pull the throw spec out
14896 of the call declarator.
14897 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
14898 (start_function): Eliminate the throw spec parameter. Eliminate
14899 the throw spec parameter to grokdeclarator.
14900 (start_method): Likewise.
14901 * decl2.c (grokfield): Likewise.
14902 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
14903 (grokoptypename): Likewise.
14904 (finish_file): Eliminate the throw spec parameter to
14905 start_function. Add throw spec to make_call_declarator.
14906 * except.c (init_exception_processing): Add throw spec to
14907 make_call_declarator. Eliminate the throw spec parameter to
14909 (expand_start_catch_block): Eliminate the throw spec parameter to
14911 (expand_builtin_throw): Add throw spec to make_call_declarator.
14912 Eliminate the throw spec parameter to start_function.
14913 (start_anon_func): Likewise.
14914 * lex.c (make_call_declarator): Add throw spec parameter.
14915 (set_quals_and_spec): New routine.
14916 (cons_up_default_function): Add throw spec to make_call_declarator.
14917 Eliminate the throw spec parameter to grokfield.
14918 * method.c (synthesize_method): Eliminate the throw spec parameter
14920 * pt.c (process_template_parm): Eliminate the throw spec parameter
14922 (tsubst): Add throw spec to make_call_declarator.
14923 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
14924 (do_function_instantiation): Eliminate the throw spec parameter to
14925 grokdeclarator. Eliminate the throw spec parameter to
14927 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
14929 * parse.y (datadef): Remove non-winning optimization.
14931 (fndef): Remove ambiguous error productions uncovered by grammar
14933 (constructor_declarator): Add exception_specification_opt here.
14934 (component_constructor_declarator): Likewise.
14935 (direct_after_type_declarator): Likewise.
14936 (complex_direct_notype_declarator): Likewise.
14937 (direct_abstract_declarator): Likewise.
14938 (fn.def1): Remove exception_specification_opt.
14939 (fn.def2): Likewise.
14940 (condition): Likewise.
14941 (initdcl0): Likewise.
14942 (initdcl): Likewise.
14943 (notype_initdcl0): Likewise.
14944 (nomods_initdcl0): Likewise.
14945 (component_decl_1): Likewise.
14946 (component_declarator): Likewise.
14947 (after_type_component_declarator0): Likewise.
14948 (after_type_component_declarator): Likewise.
14949 (notype_component_declarator): Likewise.
14951 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14953 * call.c (build_over_call): Also use an INIT_EXPR when
14954 initializing anything from an rvalue.
14956 * call.c (build_over_call): Call stabilize_reference when building
14957 an INIT_EXPR instead of calling the copy ctor.
14959 * call.c (joust): Extend the previous change to all comparisons.
14961 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
14962 NO_LINKAGE_HEURISTICS.
14964 * decl2.c (finish_file): Emit any statics that weren't already.
14966 * typeck.c (build_static_cast): Implement.
14967 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
14968 * decl.c (grokparms): Use can_convert_arg instead of
14969 implicit_conversion directly.
14970 (copy_args_p): New fn.
14971 * cvt.c (convert_to_reference): Don't complain about temp with
14973 (build_up_reference): Handle TARGET_EXPRs.
14974 * call.c (build_over_call): Elide unnecessary temps.
14975 (can_convert*): Use new overloading code.
14977 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
14979 * call.c: Move TYPE_PTR*_MACROS ...
14980 * cp-tree.h: To here.
14981 * typeck.c (build_reinterpret_cast): Implement.
14983 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
14985 (joust): If we're comparing a function to a builtin and the worst
14986 conversion for the builtin is worse than the worst conversion for the
14987 function, take the function.
14989 * typeck.c (build_const_cast): Implement.
14990 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
14991 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
14993 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
14995 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
14996 too early. Make sure we explode if exprtype turns out to be a
14997 NULL_TREE when it shouldn't be.
14999 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
15001 * cp-tree.h: New routine make_call_declarator.
15002 * lex.c (make_call_declarator): Define it.
15003 * except.c (init_exception_processing): Use it.
15004 (expand_builtin_throw): Likewise.
15005 (start_anon_func): Likewise.
15006 * decl2.c (finish_file): Likewise.
15007 * lex.c (cons_up_default_function): Likewise.
15008 * parse.y: Likewise.
15009 * pt.c (tsubst): Likewise.
15011 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
15013 * decl2.c (groktypefield): Remove unused code.
15015 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
15017 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
15018 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
15019 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
15020 nonempty_cv_qualifiers.
15023 * lex.c (make_pointer_declarator): Change type_quals into
15025 (make_reference_declarator): Likewise.
15027 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15029 * decl.c (start_function): Only check interface_* for templates
15030 with flag_alt_external_templates.
15032 * call.c (build_new_op): Check for comparison of different enum types.
15033 (build_over_call): Fix arg # output.
15035 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
15037 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
15039 * call.c (build_new_op): Check for erroneous args.
15041 * call.c (build_new_method_call): Add missing args to cp_error.
15043 * tree.c (error_type): Don't print reference-to-array.
15045 * typeck.c (convert_for_assignment): Don't say contravariance for
15048 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
15050 * call.c (build_over_call): Diagnose bad convs for `this'.
15052 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
15055 * call.c (convert_like): Handle bad convs.
15056 (build_over_call): Handle bad convs better.
15058 * decl2.c: -fansi-overloading is now the default.
15060 * call.c (build_new_method_call): Check for erroneous args.
15062 * pt.c (instantiate_class_template): Propagate
15063 TYPE_USES_MULTIPLE_INHERITANCE.
15065 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
15067 * call.c (enforce_access): Add static to routine.
15069 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15071 * call.c (build_user_type_conversion_1): Fix bad handling.
15072 (compare_ics): Likewise.
15074 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15076 * call.c (standard_conversion): Oops.
15078 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
15080 * g++.c: Update test for win32 (&& ! cygwin32).
15082 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
15084 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
15085 (ptr_reasonably_similar): New fn.
15086 * call.c (BAD_RANK): New rank.
15087 (ICS_BAD_FLAG): New macro.
15088 (standard_conversion): Handle almost-right pointer conversions.
15089 (reference_binding): Handle bad rvalue bindings.
15090 (add_*_candidate): Stuff.
15091 (build_over_call): Pass bad conversions to convert_for_initialization.
15092 (compare_ics): Handle bad convs.
15095 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
15097 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
15098 integer_type_node when computing pointer offsets.
15100 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
15102 * tree.c (lvalue_type): New fn.
15103 (error_type): New fn.
15104 * call.c (op_error): Use error_type.
15105 (add_conv_candidate): Use lvalue_type.
15106 (add_builtin_candidates): Likewise.
15107 * error.c (args_as_string): Use error_type.
15109 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15111 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
15112 (tsubst): Not here.
15114 * decl.c (init_decl_processing): With -ansi, __null's type is the
15115 signed integral type with the same number of bits as a pointer.
15116 Introduce a new variable null_node for it.
15117 * cp-tree.h: Adjust.
15118 * call.c (null_ptr_cst_p): Adjust.
15120 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
15122 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
15125 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
15127 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
15128 fns of classes without virtual functions.
15130 * call.c (add_function_candidate): Handle `this' specially.
15131 (compare_ics): Likewise.
15133 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
15135 * typeck.c (build_conditional_expr): Fix handling of __null.
15137 * decl2.c (comdat_linkage): New fn.
15138 (import_export_vtable): Use it.
15139 (import_export_decl): Use it.
15140 * method.c (make_thunk): Use it.
15142 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
15144 * pt.c (end_template_decl): If we don't actually have parms, return.
15145 * parse.y (template_header): Accept 'template <>'.
15147 * errfn.c: Allow 5 args.
15149 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15151 * tree.c (make_temp_vec): New fn.
15152 * pt.c (push_template_decl): Handle partial specs.
15153 (instantiate_class_template): Likewise.
15154 (more_specialized): Use get_bindings.
15155 (more_specialized_class): New fn.
15156 (get_class_bindings): New fn.
15157 (most_specialized_class): New fn.
15158 (do_function_instantiation): List candidates for ambiguous case.
15159 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
15160 (shadow_tag): Call push_template_decl for partial specializations.
15161 * parse.y: Likewise.
15162 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
15163 DECL_TEMPLATE_MEMBERS.
15164 * call.c (print_z_candidates): Reduce duplication.
15166 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15168 * decl2.c (lang_decode_option): Allow -fansi-overloading.
15170 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
15172 * pt.c (get_bindings): New fn.
15173 (most_specialized): Likewise.
15174 (do_function_instantiation): Use them.
15175 (add_maybe_template): New fn.
15176 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
15177 * call.c (build_new_op): Handle guiding decls.
15178 (build_new_function_call): Likewise.
15179 * decl2.c (finish_file): Likewise.
15181 * decl2.c (mark_used): Do synthesis here.
15182 * call.c (build_method_call): Not here.
15183 (build_over_call): Or here.
15184 * typeck.c (build_function_call_real): Or here.
15185 * tree.c (bot_manip): Call mark_used on functions used in default
15188 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
15190 * decl2.c (import_export_vtable): Delete code that disabled vtable
15191 heuristic on systems with ASM_OUTPUT_EXTERNAL.
15193 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15195 * typeck.c (build_x_function_call): Handle static call context
15198 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15199 the function, not its outer block.
15201 * call.c (build_field_call): Pass fields on to build_opfncall
15202 regardless of TYPE_OVERLOADS_CALL_EXPR.
15203 (build_method_call): Pass on to build_new_method_call sooner.
15205 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15207 * class.c (instantiate_type): Don't put a POINTER_TYPE to
15208 METHOD_TYPE on an expression. Also make a copy of rhs instead of
15211 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15213 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
15214 (add_builtin_candidate): Don't take enums for ++.
15215 (build_new_method_call): Handle non-aggregates and field calls.
15216 Move new overloading code from...
15219 * decl.c (grokparms): Don't check default args in templates.
15221 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
15223 * cvt.c (build_new_op): Fix args to build_unary_op.
15224 (add_builtin_candidates): Don't call type_promotes_to on float.
15226 * decl.c (grokparms): Check the type of the default arg.
15228 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
15229 returning NULL_TREE.
15231 * typeck.c (build_x_binary_op): Avoid doing extra work.
15232 (build_x_unary_op): Likewise.
15233 (build_x_conditional_expr): Likewise.
15234 * cvt.c (build_over_call): Return.
15235 (add_builtin_candidate): Fix MEMBER_REF.
15236 (build_new_op): Likewise.
15238 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
15240 * method.c (build_overload_name): Put bug fix into code but leave
15241 disabled for now so we can be bug compatible with older releases
15242 that do repeats incorrectly. In the future, we can enable it.
15244 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15246 * cvt.c (convert_like): Don't call build_cplus_new twice.
15248 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
15249 Control new overloading code with -fansi-overloading.
15251 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15253 * cvt.c (build_over_call): Call build_cplus_new.
15254 * call.c (build_method_call): Likewise.
15255 * typeck.c (build_function_call_real): Likewise.
15256 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
15257 the COND_EXPR in a TARGET_EXPR so they use the same slot.
15259 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
15261 * typeck.c (complete_type): Propagate
15262 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
15264 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15266 * cvt.c (joust): More ?: kludging. Sigh.
15267 (build_over_call): Don't try to synthesize global fns.
15269 * search.c (lookup_conversions): Use binfo marking.
15271 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
15273 * search.c (build_mi_matrix): Use the correct value of cid
15274 when determining the new mi_size.
15276 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15278 * cvt.c (add_builtin_candidates): Do consider type conversion ops
15279 for the first parms of += et al.
15280 (strip_top_quals): New fn.
15281 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
15282 (implicit_conversion): Likewise.
15283 (add_builtin_candidates): Be careful about arrays.
15284 (build_new_method_call): Handle vtable optimization.
15286 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
15288 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
15289 * cvt.c (reference_binding): Use it.
15290 (implicit_conversion): Use it.
15291 (add_builtin_candidate, COND_EXPR): Use it.
15293 * cvt.c (build_new_function_call): Check for error args.
15295 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
15297 * gxx.gperf: Add __null.
15298 * hash.h: Regenerate.
15299 * lex.h: Add RID_NULL.
15300 * lex.c (init_lex): Create null_pointer_node here, stick it in
15302 * decl.c (init_decl_processing): Still set its type here.
15303 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
15304 (convert_to_pointer_force): Likewise.
15305 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
15307 * call.c (convert_harshness): Use null_ptr_cst_p.
15308 * typeck.c (convert_for_assignment): Likewise. Don't produce
15311 * error.c (args_as_string): Handle lists of actual args, too.
15312 * cvt.c (null_ptr_cst): Support (void*)0 for now.
15313 (build_user_type_conversion_1): Improve diagnostics.
15314 (build_new_function_call): Likewise.
15315 (build_object_call): Likewise.
15316 (build_new_method_call): Likewise. Move call before def diagnostic...
15317 (build_over_call): Here.
15319 * cvt.c (build_new_method_call): Don't complain about no match if
15320 LOOKUP_SPECULATIVELY.
15321 (build_over_call): Fix 'this' for virtual fn.
15322 (build_new_method_call): Add diagnostic.
15324 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15326 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
15327 constructors to be passed in.
15328 (build_over_call): Likewise.
15329 (build_user_type_conversion_1): Pass them in.
15330 (convert_like): Likewise.
15331 (build_object_call): Handle overloaded conversions.
15332 (build_over_call): Pass the right args to build_vfn_ref.
15333 (standard_conversion): Fix pmf convs.
15334 (joust): Handle comparing statics and non-statics.
15335 (build_new_method_call): New fn.
15336 * call.c (build_method_call): Call it if NEW_OVER.
15338 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
15340 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
15343 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
15345 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
15346 instead of just maybe_build_cleanup so that we deallocate the
15349 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15351 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
15352 * cp-tree.h (finish_prevtable_vardecl): Add decl.
15354 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
15356 * pt.c (instantiate_class_template): Call complete_type. Also, if
15357 we're at the end of the file and we just instantiated a template
15358 class with a vtable, call finish_prevtable_vardecl.
15360 * error.c (dump_decl): Don't explode (or explode more gracefully
15361 as appropriate) if the object being dumped has a null type.
15362 (dump_expr): Likewise.
15364 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
15365 by counting the number of nodes that we'll need before allocating
15367 (lookup_fnfields): Fix comment.
15368 (breadth_first_search): Fix comment.
15370 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
15372 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
15374 * class.c (finish_struct): Call cplus_decl_attributes here.
15375 (finish_struct_1): Not here.
15376 * cp-tree.h: Adjust.
15378 * pt.c (type_unification): New parameter STRICT.
15379 (unify): If STRICT, don't allow cv addition or base deduction.
15380 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
15382 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15384 * search.c (get_template_base{_recursive}): New fns.
15385 * pt.c (more_specialized): New fn.
15386 (do_function_instantiation): Use it.
15387 (unify): Handle base deduction.
15388 * cvt.c (joust): Use more_specialized.
15389 Don't arbitrarily choose between non-builtin candidates.
15390 (build_over_call): Call require_complete_type.
15392 * decl.c (start_function): Statics are static even in a #pragma
15395 * decl2.c (import_export_vtable): Disable vtable heuristic on
15396 systems with ASM_OUTPUT_EXTERNAL.
15398 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
15399 (standard_conversion): No std conv to enum type.
15401 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
15404 * cvt.c (reference_binding): Bind directly to a base subobject of
15407 * cvt.c (build_new_op): Enforce access control.
15409 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
15411 * typeck2.c (process_init_constructor): When scanning the
15412 union for a named field, skip things that aren't FIELD_DECLs.
15414 * method.c (synthesize_method): Don't scan fndecl's rtl if
15415 we're at the end of the file; just assume the function can't
15418 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15420 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
15423 * cvt.c (build_user_type_conversion_1): Handle overloaded
15426 * cvt.c (add_builtin_candidates): Don't consider type conversion
15427 operators for the first parameter of operator=.
15429 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
15431 * typeck.c (complete_type): Only call layout_type if we're not
15432 expanding a template.
15434 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15436 * cvt.c (compare_ics): Oops.
15438 * cvt.c (op_error): Oops.
15440 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
15441 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
15442 (build_conv): Use them.
15443 (implicit_conversion): Use them.
15444 (convert_like): Handle them.
15445 (build_new_op): Handle builtin COND_EXPR again.
15446 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
15447 in lists of types for COND_EXPR.
15448 (add_builtin_candidate): Add enum candidates for COND_EXPR.
15450 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
15452 * typeck.c (build_modify_expr): Always attempt to build a call to
15453 the assignment operator, even if we're using a default one.
15454 (convert_for_initialization): Call complete_type.
15456 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15458 * cvt.c (reference_binding): A REF_BIND gets the reference type.
15459 (implicit_conversion): Likewise.
15460 (convert_like): Likewise.
15461 (compare_ics): Likewise.
15462 (compare_qual): Likewise.
15463 (print_z_candidates): Handle no candidates.
15464 (build_new_op): Don't handle builtin COND_EXPR for now.
15466 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
15468 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
15470 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15472 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
15474 * cvt.c (build_builtin_candidate): Oops.
15475 (build_new_op): Oops.
15477 * method.c (build_opfncall): Pass COND_EXPR on.
15478 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
15479 (add_builtin_candidate{,s}): Likewise.
15480 (add_builtin_candidates): Likewise.
15481 (print_z_candidates, op_error, build_new_op): Likewise.
15482 (type_decays_to): New fn.
15483 * lex.c (init_lex): Just say ?: for COND_EXPR.
15485 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15487 * typeck.c (complete_type): Call layout_type rather than building
15490 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
15491 only use ptrdiff_t.
15493 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15495 * cvt.c: Always compile the new overloading code (but don't use it).
15496 (implicit_conversion): Add a BASE_CONV when converting to
15497 the same class type.
15498 (convert_like): Handle BASE_CONV.
15500 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15502 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
15503 (add_builtin_candidate): Likewise.
15506 * typeck.c (build_x_function_call): Try an operator function
15507 whenever we call an object of class type.
15508 * method.c (build_opfncall): Pass CALL_EXPRs through.
15509 * cvt.c (implicit_conversion): Do const-ref case first.
15510 (add_conv_candidate, build_object_call, op_error): New fns.
15511 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
15512 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
15513 builtin candidates.
15514 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
15515 Fall back on preincrement handling. Use op_error.
15517 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
15518 an error_mark_node.
15519 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
15522 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
15524 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
15526 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
15528 * typeck.c (build_component_ref_1): Use build_component_ref
15529 instead of open coding it here.
15531 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15533 * g++.c (main): Don't link with -lg++.
15536 * cvt.c (convert_to_reference): Don't use convert_from_reference on
15537 result of build_type_conversion.
15538 (cp_convert): Only call build_method_call for ctors if
15539 build_type_conversion failed.
15540 (ptr_complete_ob): New function.
15541 (TYPE_PTR{,OB,MEM}_P): New macros.
15542 ({add,build}_builtin_candidate{,s}): New functions.
15543 (print_z_candidates): Handle builtins.
15544 (build_user_type_conversion_1): Don't use conversion fns for
15545 converting to a base type.
15546 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
15547 (build_user_type_conversion): Use convert_from_reference.
15548 (build_new_op): New function.
15549 (build_over_call): Fix handling of methods.
15550 (compare_ics): Handle AMBIG_CONV properly.
15551 * typeck2.c: Increment abort count.
15552 * method.c (build_opfncall): Forward most requests to build_new_op.
15553 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
15555 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15557 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
15558 invalid second argument to dump_expr_list.
15560 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
15562 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
15564 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
15566 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
15569 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
15571 * typeck2.c (process_init_constructor): New pedwarn for using { }
15572 to initialize a pointer to member function.
15573 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
15574 we can avoid the new error.
15576 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
15578 * typeck.c (build_ptrmemfunc1): New function to hide details of
15579 pointer to member functions better.
15581 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
15583 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
15584 methods into the actual method, as we know the implied object is
15587 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15589 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
15590 inside a system header.
15592 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
15594 * call.c (build_method_call): Call complete_type on the
15597 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
15599 * typeck.c (build_component_ref): Always build up an OFFSET_REF
15600 for obj_ptr->func so that we can know which object to use in a
15603 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
15605 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
15606 around things. Also improve maintainability.
15608 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
15610 * decl.c (grokdeclarator): Check for overflow when evaluating an
15613 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
15615 * cvt.c (cp_convert): Don't check for ambiguity with constructor
15618 * typeck.c (build_x_function_call): Pass function overload
15619 questions to new overloading code if NEW_OVER.
15620 * init.c (expand_aggr_init_1): Only check for type conversion ops
15621 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
15622 Don't check for ambiguity with constructor if NEW_OVER.
15623 * cvt.c (convert_to_reference): Dereference the result of a type
15624 conversion operator.
15625 (build_conv): Propagate ICS_USER_FLAG.
15626 (implicit_conversion): Call instantiate_type.
15627 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
15628 (add_function_candidate): Fix cv-quals on argtype.
15629 (print_z_candidates): New function.
15630 (build_new_function_call): Call it.
15631 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
15632 consider non-converting constructors.
15633 Call print_z_candidates.
15634 Return an AMBIG_CONV for an ambiguous conversion.
15635 (build_user_type_conversion): Handle AMBIG_CONV.
15636 (convert_like): Fix test for building TARGET_EXPR.
15637 Call instantiate_type.
15638 Handle AMBIG_CONV and LVALUE_CONV.
15639 (build_over_call): Handle 0 args and ellipsis.
15640 * cp-tree.def: Add AMBIG_CONV.
15642 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
15644 * decl.c (lookup_name_real): If we find mem in obj when parsing
15645 `obj->mem', make sure we return the right value.
15647 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
15649 * search.c (get_base_distance): Call complete_type.
15651 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
15653 * decl.c (store_bindings): Make static.
15655 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
15657 * init.c (expand_aggr_init_1): Don't check type conversions if
15660 * cvt.c (z_candidate): Put back template field.
15661 (add_function_candidate): Set it.
15662 (add_template_candidate): Likewise.
15664 (compare_qual): Handle references and pointers to members.
15665 (compare_ics): Handle reference bindings.
15667 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
15669 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
15671 * call.c (compute_conversion_costs): Call complete_type.
15673 * tree.c (vec_binfo_member): Use comptypes instead of comparing
15674 pointers, so we can handle template parameters.
15676 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
15678 * cvt.c (cp_convert_to_pointer): We have to call complete_type
15679 here; let's make it explicit instead of a side effect of an
15682 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
15684 * cvt.c (z_candidate): Remove template field.
15685 (reference_binding): Handle binding to temporary.
15686 (implicit_conversion): Likewise.
15687 (add_function_candidate): Handle artificial constructor parms.
15688 Handle functions with too few parms.
15689 (add_template_candidate): New function.
15690 (build_user_type_conversion_1): Handle constructors.
15691 (convert_like): Likewise.
15692 (build_over_call): Likewise.
15693 (build_new_function_call): Support templates.
15694 (compare_ics): Fix reference, inheritance handling.
15696 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
15698 * decl.c: Add signed_size_zero_node.
15699 (init_decl_processing): Build it.
15700 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
15701 when we're trying to make a negative delta.
15703 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15705 Stop doing this damn index==strchr variable name confusion.
15706 * class.c (add_virtual_function): Change local var INDEX to be
15708 (add_method): Likewise.
15709 * lex.c (print_parse_statistics): Likewise.
15710 * search.c (make_memoized_table_entry): Likewise.
15711 (lookup_fnfields_here): Likewise.
15712 (lookup_field): Likewise.
15713 (lookup_fnfields): Likewise.
15714 (get_baselinks): Likewise.
15715 * sig.c (build_signature_table_constructor): Likewise.
15716 (build_signature_method_call): Likewise.
15717 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
15718 (get_member_function_from_ptrfunc): Likewise.
15719 (build_ptrmemfunc): Change local var INDEX to be IDX.
15720 (c_expand_start_case): Likewise.
15722 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15724 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
15725 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
15726 (convert_to_reference): Use build_type_conversion to convert to
15727 the reference type directly.
15728 (standard_conversion): Fix void* case, non-conversions.
15729 (reference_binding): Fix expr == 0 case, non-conversions.
15730 (convert_like): Support REF_BIND.
15731 (compare_qual): Split out from compare_ics.
15732 (compare_ics): Use it, handle icses with only a qual_conv.
15734 * init.c (expand_vec_init): Don't crash if decl is NULL.
15736 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
15738 * mpw-config.in: New file, configury for Mac MPW.
15739 * mpw-make.sed: New file, makefile editing for MPW.
15741 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15743 * pt.c (instantiate_class_template): Call repo_template_used.
15745 * search.c (lookup_conversions): Only lookup conversions in
15748 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15750 * cp-tree.def: Renamed from tree.def, to avoid confusion with
15752 * cp-tree.h, lex.c: Include cp-tree.def.
15753 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
15755 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
15757 * init.c (build_vec_delete_1): Call complete_type.
15759 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
15761 * except.c (start_anon_func): Make sure anonymous functions are
15764 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15766 * decl.c (finish_function): If function_depth > 1, set nested.
15768 * decl2.c (grokbitfield): Revert Bob's change.
15769 * class.c (finish_struct_1): Fix handling of named bitfield widths.
15771 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15773 * pt.c (add_pending_template): Handle types.
15774 (lookup_template_class): With -fexternal-templates, just add the class
15775 to pending_templates instead of instantiating it now.
15776 * decl2.c (finish_file): Handle types in pending_templates.
15778 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
15780 * decl2.c (grokbitfield): Handle constant decls appropriately.
15781 Give an appropriate error message now instead of spewing core
15784 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
15786 * decl2.c: Don't turn on thunks by default for now.
15788 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
15790 * typeck.c (complete_type): Handle error_mark_node.
15791 (common_type, OFFSET_TYPE): Handle template_type_parms.
15793 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
15795 * pt.c (instantiate_decl): If at_eof, call import_export_decl
15796 regardless of DECL_INLINE.
15798 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
15800 * class.c (finish_struct_bits): Copy TYPE_SIZE.
15802 * rtti.c (build_dynamic_cast): Support templates.
15803 * tree.def: Support DYNAMIC_CAST_EXPR.
15804 * pt.c (tsubst_copy): Likewise.
15805 * decl2.c (build_expr_from_tree): Likewise.
15807 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15809 * typeck.c (build_static_cast): Support templates.
15810 (build_const_cast): Likewise.
15811 * tree.def: Support CONST/STATIC_CAST_EXPR.
15812 * pt.c (tsubst_copy): Likewise.
15813 * decl2.c (build_expr_from_tree): Likewise.
15815 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
15817 * decl2.c (finish_vtable_vardecl): Don't trust
15818 TREE_SYMBOL_REFERENCED for vtables of local classes.
15820 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15822 * pt.c (tsubst_copy): Handle operator T.
15824 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15826 * init.c (build_delete): Move creation of PARMS inside test of
15827 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
15829 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
15831 * typeck.c (build_conditional_expr): Don't assume that
15832 the arguments to ?: are always pointers or records.
15834 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15836 * decl2.c (import_export_decl): Still emit static/weak/comdat
15837 copies of inline template functions with -fno-implicit-templates.
15839 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
15841 * init.c (build_delete): Determine the complete basetype
15842 path to the destructor we're calling.
15844 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
15846 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
15847 initialize the enum, because we really and truly don't know where
15849 (start_enum): Don't copy integer_zero_node because
15850 build_enumerator will do it.
15852 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15854 * decl.c (finish_function): Do access control on base destructors.
15856 * pt.c (tsubst, case FUNCTION_DECL): Set up
15857 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
15860 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
15862 * cvt.c (build_up_reference): If we have already extended the
15863 lifetime of the temporary, don't try it again.
15864 * typeck.c (c_expand_return): Don't try and convert the return
15865 value twice when we want a reference, once is enough.
15867 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
15869 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
15870 LOOKUP_ONLYCONVERTING at all for now.
15872 * search.c (add_conversions): Put the conversion function in
15873 TREE_VALUE, the basetype in TREE_PURPOSE.
15874 * cvt.c (build_type_conversion): Adjust.
15875 * cvt.c (build_expr_type_conversion): Adjust.
15876 * call.c (user_harshness): Adjust.
15878 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
15880 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
15883 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
15885 * except.c (expand_start_catch_block): Add a dummy region, if we
15886 get an error, so that we can avoid core dumping later.
15888 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
15890 * cp-tree.h (OFFSET_REF): Remove.
15891 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
15892 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
15893 * init.c (expand_aggr_init_1): Likewise.
15894 (build_new): Likewise.
15895 * typeck.c (expand_target_expr): Likewise.
15897 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15899 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
15902 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
15904 * cvt.c (build_up_reference): Redo how and when temporaries are
15906 * decl.c (grok_reference_init): Don't try and be smart about
15909 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
15911 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
15912 (TARGET_EXPR...), now that it has 4 arguments.
15913 * tree.c (build_cplus_new): Likewise.
15915 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15917 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
15919 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
15920 * decl.c (struct saved_scope): Remove named_labels,
15921 {base,member}_init_list.
15922 (maybe_push_to_top_level): Don't set them. Call
15923 push_cp_function_context if appropriate.
15924 (pop_from_top_level): Likewise.
15926 * method.c (do_build_assign_ref): Remove obsolete check of
15927 TYPE_HAS_ASSIGN_REF (basetype).
15929 * decl.c (grokfndecl): Diagnose user definition of
15930 implicitly-declared methods.
15932 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
15934 * method.c (do_build_copy_constructor): Add code to give
15935 meaningful error messages instead of crashing.
15936 (do_build_assign_ref): Don't synthesize assignment operators for
15937 classes containing reference or const members.
15939 * class.c (struct base_info): Remove cant_synth_copy_ctor
15940 and cant_synth_asn_ref.
15941 (finish_base_struct): Remove the code that tries to conditionalize
15942 synthesis of copy constructors & assignment operators based on
15943 access permissions. Instead, let it fail when it tries to
15944 synthesize the copy constructor. This will give meaningful error
15945 messages instead of silently generating code to perform a bitcopy.
15947 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
15949 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
15950 determining types for constant values.
15952 * decl.c (struct named_label_list): Use instead of stuffing
15953 random items into a TREE_LIST node.
15954 (named_label_uses): Use the new struct.
15955 (poplevel): Likewise.
15956 (lookup_label): Likewise.
15957 (define_label): Add an error message to tell the user the line
15958 where the goto is located in addition to the destination of the
15960 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
15962 (finish_function): Likewise.
15964 (start_decl): Complain about defining a static data member
15965 in a different type from which it was declared.
15967 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15969 * cvt.c (build_expr_type_conversion): Adjust.
15971 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15973 * call.c (build_method_call): Always convert 'this' to the
15976 * search.c (add_conversions): Put the conversion function in
15977 TREE_VALUE, the type in TREE_PURPOSE.
15978 * cvt.c (build_type_conversion): Adjust.
15979 * call.c (user_harshness): Adjust.
15981 * method.c (emit_thunk): Call temporary_allocation and
15982 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
15984 * tree.c (build_cplus_array_type): Handle tweaking of
15985 TYPE_MAIN_VARIANT here.
15986 * typeck.c (common_type): Not here.
15988 * typeck.c (complete_type): Only try to complete an array type if
15991 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
15993 * decl.c (grokvardecl): Call complete_type.
15994 (grokdeclarator): Call complete_type for PARM_DECLs.
15996 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
15998 * pt.c (instantiate_class_template): Re-set
15999 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
16001 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
16003 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
16004 smart enough to do it right.
16005 * tree.c (cp_expand_decl_cleanup): Likewise.
16006 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
16007 cp_expand_decl_cleanup.
16008 (store_parm_decls): Likewise.
16009 (hack_incomplete_structures): Likewise.
16010 * except.c (push_eh_cleanup): Likewise.
16012 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
16014 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
16015 frontend to the backend where it belongs.
16016 * tree.c (unsave_expr): Likewise.
16017 (unsave_expr_now): Likewise.
16018 * tree.def (UNSAVE_EXPR): Likewise.
16019 * cp-tree.h (unsave_expr): Likewise.
16020 (unsave_expr_now): Likewise.
16022 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
16024 * init.c (emit_base_init): Make sure the partial EH cleanups live
16025 on the function_obstack.
16027 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
16029 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
16030 when checking for pointer types.
16032 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16034 * pt.c (instantiate_class_template): Remove obsolete check for
16035 access declarations.
16037 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
16039 * call.c (build_overload_call): Simplify calls to
16040 build_overload_call by removing last parameter.
16041 (build_method_call): Likewise.
16042 * cp-tree.h: Likewise.
16043 * method.c (build_opfncall): Likewise.
16044 * typeck.c (build_x_function_call): Likewise.
16046 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
16048 * call.c (default_parm_conversions): Factor out common code.
16049 (build_method_call): Use it.
16050 (build_overload_call_real): Use it.
16052 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
16054 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
16055 but pedwarn as the code is bogus.
16056 * typeck.c (decay_conversion): Likewise.
16057 (build_function_call_real): Use build_addr_func instead of
16058 default_conversion. Don't allow pointer-to-method functions down
16060 (build_unary_op): Use real pointer-to-member functions instead of
16062 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
16063 (convert_for_assignment): Removed some obsolete code.
16064 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
16065 build_x_function_call instead of current_class_ptr. Only call
16066 digest_init once on an initializer, we do this just checking
16068 (build_expr_from_tree): Pass current_class_ref to
16069 build_x_function_call instead of current_class_ptr.
16070 * init.c (build_member_call): Likewise.
16071 * pase.y: Likewise.
16072 * error.c (dump_expr): Handle OFFSET_REFs better.
16073 * pt.c (unify): Handle pointer-to-member functions better.
16074 * decl.c (finish_function): Clear out current_class_ref just like
16075 we do for current_class_ptr.
16077 * typeck.c (get_delta_difference): Handle virtual bases better.
16079 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
16081 * sig.c (build_signature_table_constructor): Use the delta for
16082 the original basetype for this virtual function with thunks.
16083 (build_signature_method_call): We still need to adjust 'this'
16086 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
16088 * call.c (build_addr_func): New routine. Used to get the `real'
16089 address of a function or a method. Needed to avoid getting a
16090 pointer-to-member function.
16091 (build_call): New routine to build CALL_EXPRs.
16092 (build_method_call): Use it.
16093 * cvt.c (convert_to_aggr): Likewise.
16094 * typeck.c (build_function_call_real): Likewise.
16095 * sig.c (build_signature_table_constructor): Use build_addr_func.
16096 * cp-tree.h (build_call, build_addr_func): Declare them.
16098 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
16100 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
16101 * parse.y: Remove uses of LOOKUP_AGGR.
16103 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
16105 * *.[chy]: Rename current_class_decl to current_class_ptr, and
16106 C_C_D to current_class_ref.
16108 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16110 * call.c (convert_harshness): Tighten up pointer conversions.
16112 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
16114 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
16115 (finish_file): Likewise.
16117 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16119 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
16121 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
16124 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16126 * decl2.c: Turn on thunks by default where supported.
16128 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
16130 * cp-tree.h (build_overload_call_maybe): Removed.
16131 * call.c (build_overload_call_real): Invert meaning of last arg to
16132 be require_complete.
16133 (build_overload_call): Likewise.
16134 * typeck.c (build_x_function_call): Use build_overload_call_real
16135 instead of build_overload_call_maybe.
16137 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
16139 * decl2.c (finish_file): Don't try to emit functions that haven't
16142 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
16144 * decl2.c (finish_vtable_vardecl): Oops.
16146 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
16147 Also store the bindings from previous_class_values.
16148 (pop_from_top_level): Restore them.
16150 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
16152 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
16153 symbol has been referenced.
16154 (finish_file): Re-join synthesis/vtable loop with inline emission
16155 loop, disable inlining when an inline is output.
16157 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
16159 * except.c (init_exception_processing): Setup saved_in_catch.
16160 (push_eh_cleanup): Reset __eh_in_catch.
16161 (expand_start_catch_block): Set __eh_in_catch.
16163 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
16165 * except.c (push_eh_cleanup): Add tracking for whether or not we
16166 have an active exception object.
16167 (expand_builtin_throw): Use it to make sure a rethrow without an
16168 exception object is caught.
16170 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
16172 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
16175 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
16177 * decl2.c (finish_file): Also use sentries for vars with
16178 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
16181 * lex.c (handle_cp_pragma): Disable #pragma
16182 interface/implementation if SUPPORTS_ONE_ONLY > 1.
16184 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
16186 * method.c (emit_thunk): Wrap default case in
16187 temporary/permanent_allocation.
16189 * method.c (make_thunk): Use DECL_ONE_ONLY.
16190 (emit_thunk): Call assemble_end_function.
16192 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16194 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
16195 (import_export_decl): Likewise.
16196 (finish_prevtable_vardecl): Disable vtable hack if
16197 SUPPORTS_ONE_ONLY > 1.
16199 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
16201 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16202 PREDECREMENT_EXPRs take two arguments, not one.
16204 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
16206 * class.c (build_vtable_entry): Don't build thunks for abstract
16209 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
16212 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16214 * class.c (set_rtti_entry): Use size_zero_node.
16215 (build_vtable): Likewise.
16217 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
16219 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
16220 (prepare_fresh_vtable): Likewise.
16222 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
16224 * method.c (emit_thunk): Call mark_used on the target function.
16226 * call.c (build_method_call): Don't warn about pending templates.
16228 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16230 * decl2.c (finish_file): Fix list walking logic.
16232 * typeck2.c (check_for_new_type): Only warn if -pedantic.
16234 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
16236 * class.c (finish_struct_1): Remove old code for
16237 dont_allow_type_definitions.
16238 * cp-tree.h: Likewise.
16239 * spew.c: Make sure cp-tree.h is included before parse.h, so the
16240 definition of flagged_type_tree is found before it is used.
16242 * parse.y: Added the ftype member to the type union, and changed a
16243 number of rules to use it instead of ttype. Added calls to
16244 check_for_new_type() as appropriate.
16245 * typeck2.c (check_for_new_type): New function for checking
16246 if a newly defined type appears in the specified tree.
16247 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
16248 for check_for_new_type().
16250 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
16252 * decl2.c (finish_file): Only use a sentry if the decl is public.
16254 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
16255 don't pass LOOKUP_ONLYCONVERTING.
16257 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
16259 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
16260 properly keeps track of const and volatile type modifiers.
16262 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
16264 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
16265 * pt.c (comp_template_args): Use it.
16267 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
16268 assemble_external for artificial function decls.
16270 * decl.c (cp_finish_decl): Oops.
16272 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
16274 * decl2.c (import_export_decl): Put static data member templates
16275 into common storage, or make them weak, depending on whether they
16276 are dynamically or statically initialized.
16277 (get_sentry): New function.
16278 (finish_file): Do import_export_decl for static data members before
16279 building the init/fini functions. Don't init/fini a variable that's
16280 EXTERNAL. Use a sentry for variables in common. Fix mismatching
16281 push/pop_temp_slots.
16282 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
16283 expand_static_init thang.
16284 * method.c (get_id_2): New function.
16286 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
16288 * parse.y (empty_parms): Make sure we use C++-style prototypes
16289 when we're declaring member functions.
16291 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16293 * Makefile.in (CONFLICTS): 16 s/r conflicts.
16294 * parse.y (self_template_type): New nonterminal.
16296 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16298 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
16300 * parse.y (base_class.1): Allow 'typename foo::bar'.
16302 * lex.c (check_newline): Remove #pragma code that plays with the
16303 input stream, since we now deal with tokens. Clear nextchar when
16305 (handle_cp_pragma): Use real_yylex.
16306 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
16309 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
16311 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
16313 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16315 * parse.y: New token SELFNAME for potential constructor.
16316 * spew.c (yylex): Handle it.
16317 * lex.c (identifier_type): Produce it.
16319 * parse.y (complete_type_name): In :: case, don't push class binding.
16320 (complex_type_name): Likewise.
16322 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
16324 * typeck.c (build_reinterpret_cast): Handle pointer to member
16327 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16329 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
16331 (check_newline): Put the vtable/unit/implementation/interface pragma
16332 code into handle_cp_pragma, replacing it with a call.
16333 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
16334 args. Get the next token after handling the pragma token.
16336 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
16338 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
16339 (convert_to_pointer_force): Likewise.
16341 * init.c (build_new): Fix array new without -fcheck-new.
16343 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16345 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
16346 tree.c: Lose TYPE_NESTED_NAME.
16348 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
16351 * tree.def: Add VEC_INIT_EXPR.
16352 * expr.c (cplus_expand_expr): Handle it.
16353 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
16354 the extra file-scope symbol nastiness.
16356 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16358 * method.c (make_thunk): Thunks are static.
16359 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
16361 * decl2.c (mark_vtable_entries): Emit thunks as needed.
16362 (finish_file): Don't emit them here.
16364 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
16366 * rtti.c (build_dynamic_cast): Handle null pointers.
16367 (ifnonnull): New function.
16369 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
16371 * call.c (build_method_call): Remember the original basetype we
16372 were called with. Give an error message instead of trying
16373 (incorrectly) to call a non-static member function through a
16374 non-inherited class.
16376 * search.c (expand_upcast_fixups): Mark the new fixup as
16379 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16381 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
16383 * class.c (set_rtti_entry): Fix for thunks.
16385 * decl2.c (import_export_decl): Still emit typeinfo fns for
16386 cv-variants of builtin types.
16388 * rtti.c (expand_class_desc): Set up base_info_type_node here.
16389 (init_rtti_processing): Instead of here.
16391 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
16393 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
16394 (build_typeid): Only complain about taking dynamic typeid without
16397 * decl2.c: flag_rtti defaults to 1.
16399 * rtti.c (get_tinfo_var): The general class case is now smaller.
16400 (init_rtti_processing): Pack the latter three fields of base_info
16403 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
16405 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
16407 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
16409 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
16410 (push_memoized_context): Split out code to undefer pop_type_level to
16411 (clear_memoized_cache): here.
16412 (pop_memoized_context): We can only handle one layer of deferral of
16413 pop_type_level so clear the cache, if there was a previous level.
16415 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16417 * rtti.c (init_rtti_processing): Build up base_info_type_node.
16418 (expand_class_desc): Use one pointer to an array of base_info
16419 structs, passed using a CONSTRUCTOR.
16421 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
16423 * class.c (build_vbase_path): Remove block extern for
16424 flag_assume_nonnull_objects here.
16425 (build_vfn_ref): Split out functionality into build_vtbl_ref.
16426 (build_vtbl_ref): New routine.
16427 (build_vtable): Set up rtti info here.
16428 (add_virtual_function): Note in CLASSTYPE_RTTI the best
16429 place where we can get the rtti pointers from to avoid having to
16430 search around for a place.
16431 (finish_base_struct): Likewise.
16432 (finish_struct_1): Likewise. Never create totally new vtables
16433 with totally new vtable pointers for rtti. Disable code to layout
16434 vtable pointers better until we want to break binary
16436 * rtti.c (build_headof_sub): New routine to convert down to a
16437 sub-object that has an rtti pointer in the vtable.
16438 (build_headof): Use it. Also, use build_vtbl_ref now to be more
16440 (build_dynamic_cast): Make sure we have saved it, if we need to.
16441 * search.c (dfs_init_vbase_pointers): Disable code that deals with
16442 a more efficient vtable layout, enable later.
16443 * call.c (flag_assume_nonnull_objects): Moved declaration to
16444 * cp-tree.h: here. Declare build_vtbl_ref.
16445 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
16446 function calls that want a tree.
16448 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
16450 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
16451 other X subobjects in the most derived type. Ack.
16453 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
16454 get_typeid will do it for us.
16455 (get_typeid_1): Break out call-building for expand_*_desc to use.
16456 (get_typeid): Call it.
16457 (expand_*_desc): Likewise.
16458 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
16460 (init_decl_processing): Lose builtin_type_tdescs lossage.
16461 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
16463 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
16465 * pt.c (tsubst): When calling set_nested_typename, use
16466 TYPE_NESTED_NAME (current_class_type) instead of
16467 current_class_name.
16469 * decl.c (pushdecl): Likewise.
16470 (pushdecl_class_level): Likewise.
16471 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
16472 set_nested_typename.
16474 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
16476 * rtti.c (synthesize_tinfo_fn): Handle arrays.
16478 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
16480 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
16482 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
16483 (init_rtti_processing): Lose bad_cast_type.
16484 (build_dynamic_cast): Use throw_bad_cast.
16486 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
16488 * decl2.c (finish_file): Don't synthesize artificial functions
16489 that are external and not inline.
16491 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
16493 * decl2.c (finish_file): Handle having new inlines added to
16494 saved_inlines by synthesis.
16496 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
16498 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16500 RTTI rewrite to initialize nodes as needed, not require that
16501 users #include <typeinfo>, complete functionality and reduce wasted
16503 * rtti.c (init_rtti_processing): New fn.
16504 (build_typeid): The vtable entry is now a function.
16505 (get_tinfo_var): New fn.
16506 (get_tinfo_fn): Likewise.
16507 (get_typeid): Use it.
16508 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
16509 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
16511 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
16512 (synthesize_tinfo_fn): New fn.
16513 * method.c (build_t_desc_overload): Lose.
16514 (build_overload_with_type): More generic.
16515 * decl.c (init_decl_processing): Call init_rtti_processing.
16516 * class.c (set_rtti_entry): Use get_tinfo_fn.
16517 * decl2.c (mark_vtable_entries): Mark the rtti function.
16518 (finish_prevtable_vardecl): Don't build_t_desc.
16519 (import_export_decl): Handle tinfo functions.
16520 (finish_file): Likewise.
16521 * typeck.c (inline_conversion): New fn.
16522 (build_function_call_real): Use it.
16523 * cp-tree.h: Add decls.
16525 * method.c (hack_identifier): Also convert component_refs from
16528 * lex.c (cons_up_default_function): Use the type, not the name, in
16531 * decl2.c (import_export_vtable): Fix weak vtables.
16533 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
16535 * search.c (get_base_distance_recursive): Fix access checks for
16538 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16540 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
16542 (convert_harshness): Add prototypes wrapped by PROTO.
16543 * decl2.c (grok_function_init): Likewise.
16544 (do_toplevel_using_decl): Change to void return type.
16545 * class.c (build_vtable_entry): Remove decl of make_thunk.
16546 (merge_overrides): Fix order of arg definitions.
16547 (finish_vtbls): Likewise.
16548 (fixup_vtable_deltas): Likewise.
16549 (modify_all_direct_vtables): Likewise.
16550 (modify_all_indirect_vtables): Likewise.
16551 * search.c (get_base_distance_recursive): Likewise.
16552 (get_abstract_virtuals_1): Likewise.
16553 (fixup_virtual_upcast_offsets): Likewise.
16554 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
16555 * init.c (perform_member_init): Fix order of arg definitions.
16556 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
16557 * cp-tree.h (make_thunk): Add decl.
16558 (overload_template_name, push_template_decl): Add decls.
16559 (do_toplevel_using_decl): Change to void return type.
16560 (vec_binfo_member): Add decl.
16562 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16564 * typeck.c (mark_addressable, convert_for_assignment,
16565 convert_for_initialization, pointer_int_sum, pointer_diff,
16566 unary_complex_lvalue): Add prototypes wrapped by PROTO.
16567 (convert_sequence): #if 0 fn decl, since definition also is.
16569 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
16571 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
16572 cast to pointer types for type searching.
16574 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16576 * typeck.c (get_delta_difference): Use cp_error, not error, in the
16577 case where BINFO == 0.
16579 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
16581 * call.c (build_method_call): Fix wording of error messages so
16582 constructors come out right.
16584 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
16586 * decl.c (push_overloaded_decl): Don't warn about hidden
16587 constructors when both the type and the function are declared
16588 in a system header file.
16590 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
16592 * class.c (finish_struct_1): Propagate the TYPE_PACKED
16593 flag for the type to the type's fields.
16595 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16597 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
16599 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
16601 * class.c (base_info, finish_base_struct): Replace
16602 needs_virtual_dtor with base_has_virtual.
16604 (finish_struct_1): Remove the old code that tried to make default
16605 destructors virtual. Use base_has_virtual when checking if we need
16606 to add a vtable entry for the rtti code.
16608 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16610 * pt.c (push_template_decl): Complain about template decl with
16611 inappropriate declaration.
16613 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
16615 * typeck.c (build_x_unary_op): Remove bogus check for taking
16616 the address of a member function.
16618 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
16620 * parse.y (constructor_declarator): Only push the class if
16621 we are not already in the class.
16623 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
16625 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
16626 Add additional argument to INIT_CUMULATIVE_ARGS.
16628 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
16630 * decl.c (shadow_tag): Fix error about anon union with methods.
16632 * parse.y (self_reference): Only generate a self-reference if this
16633 is a non-template class.
16634 (opt.component_decl_list): Only use it if it was generated.
16636 * parse.y (component_decl_1): Use constructor_declarator.
16637 (fn.def2): Likewise.
16638 (notype_component_declarator0): Likewise.
16640 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
16642 * typeck.c (build_x_unary_op): Add checks for taking the address
16643 of a TARGET_EXPR or of a member function, and give appropriate
16646 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
16648 * pt.c (process_template_parm): Allow template type parms to be
16649 used as types for template const parms.
16651 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
16653 * init.c (expand_vec_init): Ensure the eh cleanups are on the
16656 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16658 * decl.c (lookup_name_real): Be even more picky about the
16659 ambiguous lookup warning.
16660 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
16661 * parse.y (constructor_declarator): Rather than here.
16663 * parse.y (constructor_declarator): New nonterminal.
16665 (explicit_instantiation): Likewise.
16667 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16669 Add implicit declaration of class name at class scope.
16670 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
16671 * parse.y (self_reference): New nonterminal.
16672 (opt.component_decl_list): Use it.
16673 (fn.def1): Add nested_name_specifier type_name cases.
16674 * class.c (build_self_reference): New function.
16675 (finish_struct): Handle access_default later, move self-reference
16677 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
16678 * cp-tree.h: Adjust.
16680 * pt.c (do_function_instantiation): Separate handling of member
16681 functions and non-member functions properly.
16683 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16685 * pt.c (process_template_parm): Improve error for 'volatile class K'.
16687 * class.c (finish_struct_1): Check the right slot for destructors.
16689 * decl.c (start_enum): Complain about enum templates.
16691 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
16693 * init.c (resolve_offset_ref): Offset pointers to member data by one.
16694 * typeck.c (unary_complex_lvalue): Likewise.
16696 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
16698 * typeck.c (c_expand_return): Check for a returned local
16699 array name, similar to the check for an ADDR_EXPR.
16701 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16703 * decl.c (cp_finish_decl): Don't build cleanups for static
16706 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
16708 * typeck.c (build_modify_expr): Fix error messages to be more
16710 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
16711 assignment operators.
16712 * error.c (assop_as_string): Likewise. Add support for `%Q' for
16713 assignment operators.
16715 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16717 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
16718 give an error if initialized. pedwarn about nested type with the
16719 same name as its enclosing class.
16721 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
16723 * typeck.c (require_complete_type): Be sure to instantiate the
16724 MAIN_VARIANT of the type.
16726 * decl2.c (finish_file): Instantiate pending templates before
16727 processing static constructors and destructors.
16729 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
16732 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
16734 * decl2.c (delete_sanity): If error_mark_node is passed
16735 in as an expression, quit while we're ahead.
16737 * decl.c (grokdeclarator): Give an error message if `friend'
16738 is combined with any storage class specifiers.
16740 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
16742 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
16743 definition of nonexistent nested type.
16745 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
16746 not to say 'typedef'.
16748 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16750 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
16751 * search.c (dfs_walk, dfs_init_vbase_pointers,
16752 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
16753 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
16755 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
16757 * except.c (build_throw): Support minimal parse.
16758 * pt.c (tsubst_copy): Support THROW_EXPR.
16759 * decl2.c (build_expr_from_tree): Likewise.
16761 * pt.c (mangle_class_name_for_template): Always allocate
16764 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
16766 * cvt.c (cp_convert_to_pointer): Give an appropriate error
16767 when trying to cast from an incomplete type.
16769 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16771 * pt.c (instantiate_class_template): Don't bother setting up
16772 CLASSTYPE_TAGS explicitly, as the nested types will add
16775 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
16777 * decl.c (shadow_tag): Remove old error check for usage of
16778 an enum without a previous declaration.
16779 (xref_tag): Add error message about usage of enums without a
16780 previous declaration.
16782 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16784 * lex.c (do_identifier): Only do name consistency check if we're
16787 * pt.c (push_template_decl): Don't crash if we get a member defn
16788 that doesn't match.
16790 * decl.c (xref_tag_from_type): New function to do an xref without
16791 always having to figure out code_type_node.
16792 * cp-tree.h: Declare it.
16793 * pt.c (instantiate_class_template): Use it for friend classes.
16794 (lookup_template_class): Use it.
16796 * typeck2.c (build_functional_cast): Pull out a single parm before
16797 passing it to build_c_cast.
16799 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
16801 * expr.c (do_case): Give an error message if a pointer is
16802 given as a case value.
16804 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16806 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
16809 * lex.c (cons_up_default_function): Really, now, interface hackery
16810 does not apply to synthesized methods.
16812 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
16814 * call.c (build_method_call): Ctors and dtors now have special names
16815 with respect to lookups.
16816 * class.c (add_method): Likewise.
16817 (grow_method): Likewise.
16818 (finish_struct_methods): Likewise.
16819 (warn_hidden): Likewise.
16820 (finish_struct_1): Likewise.
16821 * cvt.c (convert_to_reference): Likewise.
16822 (convert_to_aggr): Likewise.
16823 (cp_convert): Likewise.
16824 * decl2.c (check_classfn): Likewise.
16825 * init.c (expand_member_init): Likewise.
16826 (expand_default_init): Likewise.
16827 (expand_aggr_init_1): Likewise.
16828 (build_offset_ref): Likewise.
16829 (build_new): Likewise.
16830 (build_delete): Likewise.
16831 * lex.c (do_inline_function_hair): Likewise.
16832 * search.c (lookup_field_1): Likewise.
16833 (lookup_fnfields_here): Likewise.
16834 (lookup_field): Likewise.
16835 (lookup_fnfields): Likewise.
16836 (get_virtual_destructor): Likewise.
16837 (dfs_debug_mark): Likewise.
16838 (dfs_pushdecls): Likewise.
16839 (dfs_compress_decls): Likewise.
16840 * tree.c (layout_basetypes): Likewise.
16841 * typeck.c (build_component_ref): Likewise.
16842 (build_x_function_call): Likewise.
16843 (build_modify_expr): Likewise.
16844 (convert_for_initialization): Likewise.
16845 (build_functional_cast): Likewise.
16846 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
16849 * decl.c (ctor_identifier): New.
16850 (dtor_identifier): New.
16851 (init_decl_processing): Set them.
16853 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
16855 * typeck.c (build_component_ref): Don't get confused by fields whose
16856 context has no type name, like pointer to member functions.
16858 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
16860 * decl.c (grokdeclarator): Handle typedef without declarator.
16862 * pt.c (tsubst): Handle SCOPE_REF in declarator.
16864 * parse.y (bad_parm): Catch another case of missing `typename'.
16866 * lex.c (yyprint): Handle TYPE_DECLs.
16868 * decl.c (start_function): Don't try to be clever.
16870 * lex.c: Lose compiler_error_with_decl.
16871 * typeck2.c: Lose error_with_aggr_type.
16872 (incomplete_type_error): Use cp_* instead of old functions.
16873 (readonly_error): Likewise.
16874 * typeck.c (convert_arguments): Likewise.
16875 * search.c (lookup_nested_field): Likewise.
16876 * method.c (make_thunk): Likewise.
16877 * decl.c (grokparms): Likewise.
16878 * cp-tree.h: Update.
16880 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
16883 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
16885 * method.c (build_opfncall): When deleting a pointer to an
16886 array, build a new pointer to the tree past any ARRAY_TYPE
16889 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16891 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
16893 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16895 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
16898 * decl.c (finish_function): Don't set nested based on
16899 hack_decl_function_context.
16900 * parse.y (function_try_block): Check for nested function.
16901 (pending_inlines): Likewise.
16903 * decl2.c (build_expr_from_tree): If a unary op already has a
16904 type, just return it.
16906 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
16908 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
16909 (finish_file): Check the return value of walk_vtables.
16910 (finish_prevtable_vardecl): Return int.
16911 (finish_vtable_vardecl): Likewise.
16912 (prune_vtable_vardecl): Likewise.
16913 * lex.c (set_vardecl_interface_info): Likewise.
16914 * cp-tree.h: Adjust return types.
16916 * class.c (delete_duplicate_fields_1): Don't complain about
16917 duplicate nested types if they're the same type.
16918 (finish_struct): Remove check for duplicate.
16919 * decl2.c (grokfield): Don't check for typedef of anonymous type.
16921 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16923 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
16925 * decl.c (grokdeclarator): Lose special handling of class-level
16926 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
16927 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
16929 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
16931 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
16933 * search.c (compute_access): Fix handling of anonymous union
16935 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
16936 from anonymous unions to their members.
16938 * typeck.c (build_x_function_call): For static member functions,
16939 hand off to build_member_call.
16941 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
16943 * typeck.c (build_component_ref): Handle OFFSET_REFs.
16945 * init.c (expand_vec_init): Fix init == 0 case.
16947 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
16949 * init.c (build_new): pedwarn about init and array new.
16950 (expand_vec_init): Handle lists, use convert_for_initialization.
16952 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
16953 when converting to an aggregate type.
16954 * cvt.c (cp_convert): Pass it through.
16956 * typeck.c (build_conditional_expr): Handle user-defined
16957 conversions to slightly different types.
16959 * decl.c (grokdeclarator): Force an array type in a parm to be
16962 * decl2.c (do_using_directive): Sorry.
16963 (do_namespace_alias): Likewise.
16964 * lex.c (real_yylex): Warn about using the `namespace' keyword.
16966 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16968 * parse.y (datadef): Move call to note_list_got_semicolon up.
16970 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
16972 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
16974 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
16976 * decl.c (cp_finish_decl): The exception regions have to be
16977 nested, not overlapping. We start the exception region for a
16978 decl, after it has been fully built, and all temporaries for it
16979 have been cleaned up.
16981 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
16983 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
16985 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
16987 * tree.def: Add RETURN_INIT.
16988 * pt.c (instantiate_decl): Handle RETURN_INIT.
16989 * decl.c (store_return_init): Handle minimal_parse_mode.
16991 * tree.c (cp_build_type_variant): Just return an error_mark_node.
16992 * decl.c (make_typename_type): Don't try to get the file and line
16994 * typeck.c (comptypes): Handle TYPENAME_TYPE.
16996 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
16998 * decl.c (poplevel): Make sure we clear out and restore old local
16999 non-VAR_DECL values by default when they go out of scope.
17001 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
17003 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
17004 referring to addresses of variables and functions.
17006 * error.c (dump_expr): Support SIZEOF_EXPR.
17008 * init.c (do_friend): Use the return value of check_classfn.
17010 * typeck.c (convert_arguments): Call complete_type.
17012 * method.c (hack_identifier): After giving an error, set value to
17015 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
17017 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
17018 lossage for local classes.
17019 * cp-tree.h: Declare it.
17020 * decl.c (lookup_name_real): Evil, painful hack for local classes.
17021 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
17022 Use hack_decl_function_context.
17023 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
17024 (start_function): Use hack_decl_function_context.
17025 (finish_function): Likewise.
17026 * method.c (synthesize_method): Likewise.
17027 * lex.c (process_next_inline): Likewise.
17028 (do_pending_inlines): Likewise.
17029 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
17032 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
17034 * sig.c (build_signature_pointer_or_reference_type): Align
17035 signature pointers/references on 8-byte boundaries so they can be
17036 grabbed 2 words at a time on a Sparc.
17038 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
17040 * method.c (hack_identifier): Requiring a static chain is now a
17042 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
17045 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17047 * init.c (build_offset_ref): Call complete_type.
17049 * decl.c (pop_from_top_level): Always pop previous_class_type.
17051 * parse.y: Handle multiple decls in a for-init-statement.
17052 * pt.c (tsubst_expr): Likewise.
17054 * pt.c (tsubst): Use tsubst_expr for the second operand of an
17057 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
17058 (poplevel_class): Set it here.
17059 (pop_from_top_level): Pop it here if we're returning to class scope.
17060 * class.c (pushclass): Don't set it here.
17062 * decl.c (maybe_push_to_top_level): Save current_template_parms,
17063 and clear it if !pseudo.
17064 (pop_from_top_level): Restore it.
17066 * decl2.c (finish_file): Push the dummy each time we walk the list
17069 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
17070 something for CAST_EXPR.
17072 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17074 * cvt.c (cp_convert): Warn about implicit conversion of the
17075 address of a function to bool, as it is always true.
17077 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17079 * typeck.c (c_expand_return): Fix warning for local externs returned.
17081 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
17083 * tree.c (mapcar): Propagate const and volatile properly.
17085 * typeck.c (complete_type): Be sure to instantiate the
17086 MAIN_VARIANT of the type.
17088 * method.c (synthesize_method): Class interface hackery does not
17089 apply to synthesized methods.
17091 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
17093 * pt.c (comp_template_args): Use comptypes rather than just
17094 checking for TEMPLATE_TYPE_PARM equivalence.
17096 * typeck.c (build_x_function_call): Call complete_type before
17097 checking TYPE_OVERLOADS_CALL_EXPR.
17099 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
17101 * g++.c (main): Check also for new define ALT_LIBM.
17103 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17105 * pt.c (instantiate_class_template): If we don't have a pattern
17107 (coerce_template_parms): If we see a local class, bail.
17109 * decl.c (grok_reference_init): Make sure there's a type before
17112 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
17113 (push_template_decl): Likewise.
17115 * parse.y (named_class_head): Set
17116 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
17118 * decl.c (xref_tag): Diagnose redeclaration of template
17119 type-parameter name.
17121 * error.c (dump_type): Handle anonymous template type parms.
17123 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
17125 (coerce_template_parms): Likewise.
17127 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
17129 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
17130 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
17132 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
17134 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
17135 before trying to get its STUB_DECL.
17136 (coerce_template_parms): Likewise.
17138 * parse.y (template_type_parm): If they didn't use 'class',
17139 pretend they did after giving an error.
17141 * pt.c (coerce_template_parms): Diagnose use of local class.
17143 * decl.c (grok_reference_init): Use instantiate_type.
17145 * error.c (dump_expr): Handle TEMPLATE_DECLs.
17147 * parse.y (named_class_head): Diagnose mismatching types and tags.
17149 * decl.c (pushdecl): Type decls and class templates clash with
17150 artificial type decls, not hide them.
17152 * decl.c (redeclaration_error_message): Diagnose redefinition of
17153 templates properly.
17154 (duplicate_decls): Diagnose disallowed overloads for template
17157 * decl.c (start_decl): Call complete_type before checking for a
17160 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
17162 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
17164 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17166 * decl.c (grok_op_properties): Don't check for operator++(int) in
17169 * tree.c (perm_manip): Return a copy of variable and function
17170 decls with external linkage.
17172 * tree.def: Change some of the min tree codes to type "1".
17173 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
17174 * method.c (build_overload_int): Emit something arbitrary for
17175 anything but an INTEGER_CST if we're in a template.
17177 * decl.c (cp_finish_decl): Call complete_type before deciding
17178 whether or not to lay out the decl.
17180 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
17182 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
17184 * typeck2.c (build_x_arrow): Call complete_type.
17186 * pt.c (add_pending_template): Broken out.
17187 (lookup_template_class): If -fexternal-templates, call it for all
17188 the methods of implemented types.
17189 (instantiate_class_template): Instead of instantiating them here.
17190 (instantiate_decl): Handle -fexternal-templates earlier.
17192 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17194 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
17195 memoized lookup stuff inside GATHER_STATISTICS.
17197 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
17199 * decl.c (start_decl): Complain about array of incomplete type
17201 (grokdeclarator): Not here.
17203 * parse.y (template_parm): Expand full_parm inline so we can set
17204 the rule's precedence.
17206 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17207 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17208 * decl2.c (grokbitfield): Don't check for integer constant here.
17209 * class.c (finish_struct_1): Check here.
17211 * decl.c (define_label): Make the min decl go on permanent_obstack.
17213 * pt.c (unify): Don't handle CONST_DECLs.
17214 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
17215 (tsubst_copy): Likewise.
17217 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
17218 CONST_DECL for a template parm.
17220 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
17222 * decl.c (grokdeclarator): Complain about array of incomplete type
17224 (start_decl_1): Not here.
17226 * pt.c (tsubst): Handle pointer-to-function declarators.
17228 * method.c (hack_identifier): If pedantic, diagnose local class
17229 methods that require a static chain.
17231 * decl.c (grok_op_properties): No longer static.
17232 * cp-tree.h: Declare it.
17233 * pt.c (tsubst): Call it for operators.
17234 Use tsubst_copy for TREE_VECs.
17236 * parse.y (template_arg): The expr has precedence like '>'.
17238 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
17240 * pt.c (coerce_template_parms): Don't coerce an expression using
17242 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
17243 (tsubst): Don't use build_index_2_type if the max_value uses template
17245 * method.c (build_overload_int): Emit something arbitrary for an
17246 expression using template parms.
17248 * parse.y (template_close_bracket): New non-terminal to catch use
17249 of '>>' instead of '> >' in template class names.
17250 (template_type): Use it.
17251 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
17253 * tree.def: Add CAST_EXPR.
17254 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
17255 CONVERT_EXPR for minimal_parse_mode.
17256 * typeck.c (build_c_cast): Likewise.
17257 * pt.c (tsubst_copy): Likewise.
17258 * decl2.c (build_expr_from_tree): Likewise.
17259 * error.c (dump_expr): Likewise.
17261 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17263 * except.c (SetTerminate, SetUnexpected): Put back global vars.
17264 (init_exception_processing): Put back decl/init of
17265 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
17266 fns from libstdc++.
17268 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
17269 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
17271 * cp-tree.h (declare_uninstantiated_type_level,
17272 uninstantiated_type_level_p): Delete prototypes.
17274 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
17276 * pt.c (tsubst_expr): Add default return.
17278 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17280 * error.c (fndecl_as_string): Delete unused arg CNAME.
17281 * sig.c (build_signature_table_constructor,
17282 build_signature_method_call): Fix calls.
17284 * class.c (the_null_vtable_entry): Delete var definition.
17285 (init_class_processing): Delete tree the_null_vtable_entry init.
17286 * decl.c (no_print_{functions, builtins}): Declare as static.
17287 (__tp_desc_type_node): #if 0 var definition.
17288 (init_type_desc): #if 0 init of __tp_desc_type_node.
17289 (vb_off_identifier): Move var decl into init_decl_processing.
17290 (current_function_assigns_this): Declare as static.
17291 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
17292 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
17293 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
17294 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
17295 * init.c (BI_header_type, BI_header_size): Declare as static.
17296 * pt.c (template_classes): Delete unused var.
17297 (add_pending_template): Delete decl for non-existent fn.
17298 (lookup_template_class): Delete vars CODE and TAG_CODE.
17299 (instantiate_template): Delete unused var TARGS.
17300 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
17302 (__tp_desc_type_node): #if 0 var decl.
17303 (fndecl_as_string): Fix prototype.
17305 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
17307 * tree.def: Add GOTO_STMT.
17308 * pt.c (tsubst_expr): Support goto and labels.
17309 * decl.c (define_label): Support minimal parsing.
17310 * parse.y (simple_stmt): Likewise.
17312 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17314 * xref.c (GNU_xref_member): Only define/set var I if
17315 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
17317 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
17318 (GNU_xref_end): Fix call.
17319 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
17320 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
17322 * tree.c (build_exception_variant): Delete unused vars I, A, T,
17324 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
17325 (mapcar): Delete unused var CODE.
17326 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
17327 (break_out_cleanups): Fix call.
17328 (bot_manip): Likewise.
17329 * call.c (build_method_call): Likewise.
17330 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
17332 * typeck.c (unary_complex_lvalue, build_modify_expr,
17333 convert_for_initialization): Likewise.
17334 * typeck2.c (build_functional_cast): Likewise.
17335 * cp-tree.h (build_cplus_new): Fix prototype.
17337 * repo.c (open_repo_file): Delete unused var Q.
17338 (repo_compile_flags, repo_template_declared,
17339 repo_template_defined, repo_class_defined, repo_inline_used,
17340 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
17341 (repo_get_id, repo_vtable_used): Declare as static.
17342 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
17345 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
17347 * parse.y (pending_inlines): Add function_try_block case.
17349 * pt.c (unify): Fix for template const parms.
17351 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17353 * lex.c (extract_interface_info): Delete forward decl.
17354 (default_copy_constructor_body, default_assign_ref_body): Delete
17355 decls for non-existent functions.
17356 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
17357 (init_lex): Delete setting them.
17358 (cons_up_default_function): Delete unused vars FUNC_BUF,
17359 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
17360 #if 0'd synth code.
17361 (toplevel, expression_obstack): Delete unused extern decls.
17362 (tree_node_kind): Delete unused enum.
17363 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
17365 (tree_node_kind_names): Delete unused extern decl.
17366 (synth_obstack): Delete unused var.
17367 (init_lex): Don't set it.
17368 (init_parse): Add decl before use.
17369 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
17370 (current_unit_{name, language}): Delete unused vars.
17371 (check_newline): Don't bother setting them, just accept the #pragma.
17372 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
17373 (current_unit_{name, language}): Delete decls.
17375 * search.c: Wrap all of the memoized functions, macros, and
17376 variables inside #ifdef GATHER_STATISTICS.
17377 (lookup_field, lookup_fnfields): Likewise.
17378 (init_search_processing): Likewise.
17379 (reinit_search_statistics): Wrap whole function.
17380 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
17382 * decl.c (finish_function): Only call pop_memoized_context if
17383 GATHER_STATISTICS is defined.
17384 (start_function): Likewise for push_memoized_context.
17385 * class.c (pushclass, popclass): Likewise.
17387 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
17388 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
17390 * cvt.c (cp_convert): Delete unused local var FORM.
17391 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
17394 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17396 * pt.c (do_poplevel): Oops; really return what we get from
17397 poplevel this time.
17399 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17401 * cp-tree.h (is_aggr_type): Add prototype.
17403 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
17404 * method.c ({push,pop}_cp_function_context): Delete decls.
17405 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
17406 (SetUnexpected, SetTerminate): Delete unused vars.
17407 (init_exception_processing): Don't set SetUnexpected or
17408 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
17409 (output_exception_table_entry): Delete unused array LABEL.
17410 (expand_internal_throw): Delete unused var PARAMS.
17411 (expand_start_catch_block): Delete unused var CLEANUP.
17412 (emit_exception_table): Delete unused var EH_NODE_DECL.
17413 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
17414 GOTO_UNWIND_AND_THROW. Don't set them.
17415 (end_eh_unwinder): Add top decl.
17416 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
17417 (exception_section, push_rtl_perm, do_function_call,
17418 lang_interim_eh, push_eh_cleanup, eh_outer_context,
17419 expand_end_eh_spec, end_eh_unwinder): Declare as static.
17420 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
17421 throw_used): Likewise.
17422 * cp-tree.h (expand_end_eh_spec): Delete prototype.
17424 * search.c (dfs_mark, dfs_mark_vtable_path,
17425 dfs_unmark_vtable_path, dfs_mark_new_vtable,
17426 dfs_unmark_new_vtable, dfs_clear_search_slot,
17427 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
17428 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
17429 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
17431 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
17432 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
17433 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
17434 Only define #ifdef GATHER_STATISTICS.
17435 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
17437 (vbase_decl): Delete var definition.
17438 (init_search): Delete old decl.
17439 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
17440 never actually used.
17441 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
17442 (get_base_distance_recursive): Delete unused fourth arg
17443 BASETYPE_PATH. Fix call .
17444 (get_base_distance): Fix call.
17445 (push_class_decls): Delete unused var ID.
17446 (make_memoized_table_entry): Declare as static.
17447 (breadth_first_search): Declare as static.
17448 (tree_has_any_destructor_p): Declare as static.
17449 (pop_class_decls): Delete unused arg pop_class_decls.
17450 * class.c (popclass): Fix call to pop_class_decls.
17451 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
17452 tree_has_any_destructor_p): Delete prototypes.
17454 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
17455 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
17456 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
17457 (build_user_desc): Delete unused var T.
17458 (build_class_desc): Delete unused vars T and OFF.
17459 (build_t_desc): Delete unused var NAME_STRING.
17460 (build_headof): Make static.
17461 (get_bad_cast_node): Likewise.
17462 (get_def_to_follow): Likewise.
17463 * cp-tree.h (init_type_desc): Add prototype.
17464 (build_headof): Remove prototype.
17466 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
17468 * pt.c (tsubst): Only look for matching decls at file scope for
17469 non-member functions.
17471 * call.c (build_scoped_method_call): Handle scoped destructor
17472 calls in templates.
17474 * decl.c (*_top_level): Also save previous_class_values.
17476 * pt.c (tsubst_expr): Support do {} while loops.
17477 * parse.y (simple_stmt): Likewise.
17478 * tree.def: Likewise.
17480 * method.c (build_overload_identifier): For a class nested in a
17481 template class, don't mangle in the template parms from our
17484 * lex.c, cp-tree.h: Remove support for template instantiations in
17485 the pending_inlines code.
17486 * pt.c: Remove dead functions and unused arguments.
17487 (uses_template_parms): TYPENAME_TYPEs always use template parms.
17488 * parse.y: Stop passing anything to end_template_decl.
17489 * tree.c (print_lang_statistics): Only print tinst info #ifdef
17492 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17494 * init.c (expand_recursive_init{,_1}): Delete decls.
17495 (sort_member_init): Delete unused var INIT.
17496 (emit_base_init): Delete unused var X.
17497 (build_offset_ref): Delete unused var CNAME.
17498 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
17499 (emit_base_init): Delete unused local var BASE. Delete extern
17500 decl of IN_CHARGE_IDENTIFIER.
17501 (build_delete): Delete unused local var VIRTUAL_SIZE.
17503 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
17504 (build_delete): Fix call.
17505 * decl2.c (delete_sanity): Likewise.
17506 * cp-tree.h (build_vec_delete): Update prototype.
17508 * typeck.c (common_base_type): Delete unused var TMP.
17509 (build_binary_op): Delete local var ARGS_SAVE.
17510 (build_array_ref): Delete unused var ITYPE.
17511 (c_expand_return): Delete unused var USE_TEMP.
17513 * typeck.c (compexcepttypes): Delete unused arg STRICT.
17514 (comptypes): Fix calls.
17515 * decl.c (duplicate_decls): Likewise.
17516 * cp-tree.h (compexcepttypes): Delete extra arg.
17518 * decl2.c (check_classfn): Delete unused second arg CNAME.
17519 * decl.c (start_decl, grokfndecl): Fix calls.
17520 * init.c (do_friend): Likewise.
17521 * cp-tree.h (check_classfn): Update prototype.
17523 * cp-tree.h (signature_error, import_export_vtable,
17524 append_signature_fields, id_in_current_class, mark_used,
17525 copy_assignment_arg_p): Add decls.
17526 * decl2.c (mark_used): Delete decl.
17528 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
17530 * class.c (get_vtable_entry): Disable unused function.
17531 (doing_hard_virtuals): Delete unused static global var.
17532 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
17533 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
17534 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
17535 (modify_one_vtable): Delete unused var OLD_RTTI.
17536 (finish_struct_anon): Delete unused vars OFFSET and X.
17537 (finish_struct_bits): Delete unused var METHOD_VEC.
17538 (get_basefndecls): Delete unused var PURPOSE. Delete unused
17539 for-scope local variable METHODS.
17541 * call.c (user_harshness): Delete unused/unneeded arg PARM.
17542 (ideal_candidate): Delete unused args BASETYPE and PARMS.
17543 (build_method_call): Delete unused args passed into ideal_candidate.
17544 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
17545 * cp-tree.h (synthesize_method): Add decl.
17547 * decl.c (note_level_for_for): Give void return type.
17548 (pushdecl_nonclass_level): Likewise.
17549 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
17550 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
17551 (suspend_binding_level): Delete unused var LEVEL.
17552 (duplicate_decls): Delete unused var CTYPE.
17553 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
17554 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
17556 (grokdeclarator): Delete unused var C.
17557 (grokdeclarator): Delete unused var SIZE_VARIES.
17558 (grokparms): Delete unused var SAW_VOID.
17559 (start_function): Delete unused var OLDDECL.
17560 (cplus_expand_expr_stmt): Delete unused var
17561 REMOVE_IMPLICIT_IMMEDIATELY.
17563 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
17565 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
17567 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
17569 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
17570 (build_min_nt): Likewise.
17571 * pt.c (do_pushlevel): Emit line note.
17572 (do_poplevel): Return what we get from poplevel.
17573 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
17574 * parse.y: Use do_pushlevel and do_poplevel.
17575 * cp-tree.h: Declare do_poplevel.
17577 * cp-tree.h: Declare at_eof.
17578 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
17579 * decl2.c (import_export_decl): Renamed from import_export_inline.
17580 (finish_file): Call it to do interface handling for statics.
17581 * pt.c (tsubst_copy): Call mark_used on variables and functions
17584 * decl2.c (finish_file): Don't emit statics we can't generate.
17585 * pt.c (instantiate_decl): Don't set interface on instantiations
17588 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
17589 * tree.c (print_lang_statistics): Print max template depth.
17590 * pt.c (push_tinst_level): Dump entire instantiation context.
17591 (instantiate_class_template): Use it and pop_tinst_level.
17592 (instantiate_decl): Likewise.
17594 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
17595 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
17597 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
17599 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
17600 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
17601 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
17602 the new template implementation.
17604 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17606 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
17608 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
17610 * decl.c (cp_finish_decl): Delay emitting the debug information for
17611 a typedef that has been installed as the canonical typedef, if the
17612 type has not yet been defined.
17614 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
17616 * decl2.c (grokfield): Still call pop_nested_class for access decls.
17618 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17620 * decl.c (lookup_label): Call label_rtx.
17622 * decl.c (make_binding_level): New function.
17623 (pushlevel, pushlevel_class): Call it instead of explicit
17624 duplicate calls to xmalloc.
17626 * decl.c (init_decl_processing): Delete useless build_pointer_type
17629 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
17630 (sizet_ftype_string): Delete variable.
17631 (init_decl_processing): Add built-in functions fabsf, fabsl,
17632 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
17633 variable strlen_ftype, used for strlen.
17635 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
17637 * decl.c (push_to_top_level): Start from current_binding_level
17638 again for now; the stl hacks depend on g++ being broken in this
17639 way, and it'll be fixed in the template rewrite.
17641 * tree.def: Add USING_DECL.
17642 * decl2.c (do_class_using_decl): Implement.
17643 (grokfield): Pass access decls off to do_class_using_decl instead of
17645 * error.c (dump_decl): Handle USING_DECLs.
17646 * decl.c (grokdeclarator): Remove code for handling access decls.
17647 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
17648 as access decls for now.
17649 (finish_struct): Don't check USING_DECLs for other uses of the name.
17651 * search.c (get_matching_virtual): Use cp_error_at.
17653 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17655 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
17657 (self_promoting_args_p): Move the check that TYPE is non-nil
17658 before trying to look at its main variant.
17659 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
17661 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
17663 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
17664 (do_friend): Delete call to xref_friend.
17665 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
17667 * typeck.c (convert_sequence): #if 0 unused function.
17669 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
17670 be in decl_in_memory_p.
17671 (decl_in_memory_p): Delete decl.
17672 * expr.c (decl_in_memory_p): Delete fn.
17673 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
17675 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
17677 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
17679 * class.c (finish_struct_1): Check for a pure-specifier on a
17680 non-virtual function here.
17682 * decl2.c (grok_function_init): Don't check whether the function
17684 (grokfield): Don't call check_for_override here.
17686 * decl.c (push_to_top_level): Start from inner_binding_level,
17687 check class_shadowed in class levels.
17689 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
17691 * decl.c (resume_level): Ignore things that don't have names, instead
17694 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17696 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
17698 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
17700 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
17703 * parse.y (complete_type_name): Bind global_scope earlier.
17704 (complex_type_name): Likewise.
17705 (qualified_type_name): Remove.
17707 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
17709 * decl.c (grokfndecl): Move code that looks for virtuals in base
17711 * class.c (check_for_override): ... to a new function.
17712 (finish_struct_1): Call it.
17714 * cp-tree.h: Declare warn_sign_compare.
17716 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
17717 rather than extra_warnings to decide whether to warn about
17718 comparison of signed and unsigned.
17720 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
17721 implies -Wsign-compare. -Wall doesn't imply -W.
17723 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
17725 * typeck.c (build_component_ref): Fix to handle anon unions in base
17728 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17730 * class.c (resolves_to_fixed_type_p): Delete code dealing with
17731 a WITH_CLEANUP_EXPR, since we don't generate them any more.
17732 * cvt.c (build_up_reference): Likewise.
17733 * decl.c (grok_reference_init): Likewise.
17734 (cp_finish_decl): Likewise.
17735 * error.c (dump_expr): Likewise.
17736 * tree.c (real_lvalue_p): Likewise.
17737 (lvalue_p): Likewise.
17738 (build_cplus_new): Likewise.
17739 (unsave_expr_now): Likewise.
17740 * typeck.c (unary_complex_lvalue, build_modify_expr,
17741 c_expand_return): Likewise.
17743 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17745 Make the C++ front-end pay attention to attributes for structures.
17746 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
17748 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
17749 Take out old round_up_size use and setting the DECL_ALIGN possibly
17750 using it. Take out setting of TYPE_ALIGN to round_up_size, which
17751 can override what the attribute set.
17752 * cp-tree.h (finish_struct): Update prototype.
17753 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
17754 attributes to finish_struct.
17755 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
17756 value down into finish_struct.
17757 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
17759 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
17761 * decl.c (poplevel): Re-word dead for local handling.
17762 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
17763 (cp_finish_decl): If is_for_scope, check for duplicates so
17764 we can disable is_for_scope. Otherwise, preserve_temp_slots.
17766 * lex.c (do_identifier): Use global binding in preference of
17767 dead for local variable.
17769 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
17771 * init.c (initializing_context): Handle anon union changes, the
17772 context where fields of anon unions can be initialized now has to be
17773 found by walking up the TYPE_CONTEXT chain.
17775 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
17777 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
17778 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
17779 (obscure_complex_init): If bss is supported, always set
17780 DECL_INITIAL to error_mark_node.
17782 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17784 * init.c (is_friend): Make sure there's a context before we see if
17787 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
17789 * init.c (is_friend): Classes are not friendly with nested classes.
17791 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
17793 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
17794 and record its result.
17796 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
17798 * class.c (finish_struct_anon): Switch around code to not move anon
17799 union elements around, nor mess up their contexts, nor offsets,
17800 instead we now build up the right number of COMPONENT_REFs for all
17801 the anon unions that may be present at build_component_ref time.
17802 * typeck.c (lookup_anon_field): New routine to handle field lookup
17803 on fields without names. We find them, based upon their unique type
17805 * typeck.c (build_component_ref): Allow FIELD_DECL components.
17806 Handle finding components in anonymous unions, and ensure that a
17807 COMPONENT_REF is built for each level as necessary.
17809 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
17811 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
17812 code that ensures that copy ctors are used if appropriate.
17814 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17816 * init.c (build_vec_delete): Only give an error if base isn't an
17819 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
17821 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
17822 (yylex): If we see `new', keep slurping.
17824 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
17826 * class.c (finish_struct_1): Move code for handling anon unions...
17827 (finish_struct_anon): to here. Fixup so that we do the offset
17828 calculations right, and so that the fields are physically moved to
17829 the containers's chain.
17831 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17833 * decl.c (grokdeclarator): Avoid trying to get an operand off an
17836 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
17838 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
17839 POINTER_SIZE to agree with expr.c.
17841 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
17843 * search.c (lookup_field): Don't report ambiguities if protect is 0,
17844 instead return NULL_TREE.
17846 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
17848 * class.c (finish_struct_1): Call warn_hidden if we want warnings
17849 about overloaded virtual functions.
17850 (warn_hidden): New routine to warn of virtual functions that are
17851 hidden by other virtual functions, that are not overridden.
17852 (get_basefndecls): New routine, used by warn_hidden.
17853 (mark_overriders): New routine, used by warn_hidden.
17854 * search.c (get_matching_virtual): Remove old warning that just
17857 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17859 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
17861 * typeck.c (null_ptr_cst_p): Delete unused fn.
17862 (build_function_call_maybe): Delete unused fn.
17864 * expr.c (extract_init): #if 0 the code after unconditional return 0
17867 Delete old cadillac code.
17868 * edsel.c: Remove file.
17869 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
17870 * Makefile.in (CXX_OBJS): Delete edsel.o.
17871 (edsel.o): Delete rule.
17872 * cp-tree.h (flag_cadillac): Delete var decl.
17873 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
17874 * decl2.c (flag_cadillac): Delete var definition.
17875 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
17876 (grokfield): Delete code depending on flag_cadillac.
17877 (finish_anon_union): Likewise.
17878 * class.c (finish_struct_1): Likewise.
17879 (pushclass): Likewise.
17880 (popclass): Likewise.
17881 (push_lang_context): Likewise.
17882 (pop_lang_context): Likewise.
17883 * decl.c (init_decl_processing): Likewise.
17884 (start_decl): Likewise.
17885 (cp_finish_decl): Likewise.
17886 (xref_tag): Likewise.
17887 (finish_enum): Likewise.
17888 (start_function): Likewise.
17889 (finish_function): Likewise.
17890 (finish_stmt): Likewise.
17891 * lex.c (lang_init): Likewise.
17892 (check_newline): Likewise.
17894 * lex.c (do_pending_inlines): Delete synthesized method kludge.
17896 Delete defunct, ancient garbage collection implementation.
17897 * rtti.c: New file with the RTTI stuff from gc.c.
17898 * gc.c: Removed file (moved the remaining stuff into rtti.c).
17899 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
17900 (rtti.o): New rule, replacing gc.o.
17901 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
17902 * cp-tree.h: Delete gc-related fn decls.
17903 (DECL_GC_OFFSET): Delete macro.
17904 (flag_gc): Delete extern decl.
17905 * decl.c (current_function_obstack_index): Delete var decl.
17906 (current_function_obstack_usage): Delete var decl.
17907 (start_function): Delete clearing of current_function_obstack_index
17908 and current_function_obstack_usage.
17909 (init_decl_processing): Delete code relying on -fgc.
17910 Delete call to init_gc_processing.
17911 (cp_finish_decl): Delete calls to build_static_gc_entry and
17912 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
17913 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
17914 and to expand_expr of a __gc_main call.
17915 (maybe_gc_cleanup): Delete var decl.
17916 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
17917 * decl2.c (flag_gc): Delete var decl.
17918 (lang_f_options): Delete offering of -fgc.
17919 (lang_decode_option): Delete -fgc and -fno-gc handling.
17920 (get_temp_regvar): Delete gc code.
17921 * init.c (build_new): Delete gc code.
17922 * lex.c (init_lex): Delete checking of flag_gc.
17924 * typeck.c (convert_arguments): Delete gc code.
17925 (build_component_addr): Delete -fgc warning.
17926 (build_modify_expr): Delete gc code.
17928 * decl2.c (build_push_scope): Delete fn.
17929 * cp-tree.h (build_push_scope): Delete decl.
17931 * search.c (clear_search_slots): Delete fn.
17932 * cp-tree.h (clear_search_slots): Delete decl.
17934 * search.c (tree_needs_constructor_p): Delete fn.
17935 * cp-tree.h (tree_needs_constructor_p): Delete decl.
17937 * tree.c (id_cmp): Delete fn.
17939 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
17940 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
17942 * tree.c (decl_value_member): Delete fn.
17943 * cp-tree.h (decl_value_member): Delete decl.
17945 * tree.c (list_hash_lookup_or_cons): Delete fn.
17946 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
17948 * method.c (cplus_exception_name): Delete fn.
17949 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
17951 * spew.c (shift_tokens): Delete fn.
17953 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17955 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
17957 * parse.y: Likewise.
17959 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17961 * tree.c (build_cplus_staticfn_type): Delete function definition;
17963 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
17965 * tree.c (virtual_member): Delete function definition; never used.
17966 * cp-tree.h (virtual_member): Delete decl.
17968 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
17970 * typeck.c (build_component_ref): Handle getting vbase pointers
17971 out of complex multiple inheritance better.
17973 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
17975 * typeck.c (build_object_ref): Make sure we use the real type, not
17976 any reference type.
17978 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
17980 * tree.c (build_exception_variant): Don't create new types if we
17981 don't have to, also build new types on the right obstack.
17983 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17985 * decl.c (store_bindings): Split out from push_to_top_level.
17986 (push_to_top_level): Call it for b->type_shadowed on class binding
17989 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
17991 * search.c (expand_upcast_fixups): Fix so that offsets stored in
17992 vbase_offsets are always right. Fixes a problem where virtual base
17993 upcasting and downcasting could be wrong during conversions on this
17994 during virtual function dispatch at ctor/dtor time when dynamic
17995 vtable fixups for deltas are needed. This only sounds easier than
17997 (fixup_virtual_upcast_offsets): Change to reflect new calling
17998 convention for expand_upcast_fixups.
18000 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18002 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
18003 check that it's usable as the bitfield width.
18005 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18007 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
18008 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
18009 only ever used for functions in it.
18011 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
18013 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
18014 (nested_type): Likewise.
18015 (nested_name_specifier): Use lastiddecl.
18017 * decl.c (grokdeclarator): Adjust accordingly.
18018 * init.c (expand_member_init): Likewise.
18019 * parse.y (base_class): Likewise.
18020 * typeck2.c (build_functional_cast): Likewise.
18022 * typeck2.c (build_functional_cast): Fill in name after we've
18023 checked for non-aggr type.
18025 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
18027 * decl2.c (warn_pointer_arith): Default to on.
18029 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
18031 * lex.c (is_rid): New function.
18032 * decl.c (grokdeclarator): Diagnose reserved words used as
18035 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
18037 * tree.c (get_decl_list): Don't lose cv-quals.
18039 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
18040 typespecs used as declarator-ids.
18042 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
18044 * decl.c (poplevel): When poping a level, don't give a warning for
18045 any subblocks that already exist.
18047 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
18049 * typeck.c (build_object_ref): Finish what I started.
18051 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
18053 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
18055 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
18058 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
18060 * decl.c (xref_tag): Handle passing a type in directly.
18062 * parse.y (qualified_type_name): Pull out the type.
18063 (nested_type): Likewise.
18064 Take types directly instead of as identifiers.
18065 * call.c (build_scoped_method_call): Take types directly instead of
18067 * decl.c (xref_basetypes): Likewise.
18068 * init.c (expand_member_init): Likewise.
18069 (build_member_call): Likewise.
18070 (build_offset_ref): Likewise.
18071 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
18072 * method.c (do_build_assign_ref): Likewise.
18073 * decl.c (grokdeclarator): Handle a type appearing as the
18074 declarator-id for constructors.
18075 * method.c (do_build_copy_constructor): current_base_init_list now
18076 uses the types directly, not their names.
18077 * init.c (sort_base_init): Likewise.
18078 (expand_member_init): Likewise.
18079 * init.c (is_aggr_type): New function, like is_aggr_typedef.
18081 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
18083 * tree.c (layout_basetypes): Call build_lang_field_decl instead
18084 of build_lang_decl if first arg is a FIELD_DECL.
18086 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18088 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
18090 * except.c (expand_start_catch_block): Set TREE_USED to avoid
18091 warnings about the catch handler.
18093 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
18095 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
18096 expand_target_expr.
18098 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
18100 Fix access control to use trees rather than integers.
18101 * class.c (access_{default, public, protected, private,
18102 default_virtual, public_virtual, private_virtual}_node): Add
18104 (init_class_processing): Do creation of those nodes.
18105 * cp-tree.h (access_type): Delete enum decl.
18106 (access_{default, public, protected, private, default_virtual,
18107 public_virtual, private_virtual}_node): Add decls.
18108 (compute_access): Change return type.
18109 * search.c (compute_access): Have tree return type, instead of enum.
18110 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
18111 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
18112 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
18113 * parse.y (VISSPEC): Make ttype rather than itype.
18114 (base_class_access_list): Likewise.
18115 * *.[cy]: Change all refs of `access_public' to `access_public_node',
18117 * call.c (build_method_call): Make ACCESS be a tree.
18118 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
18119 * cvt.c (convert_to_aggr): Likewise.
18120 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
18122 * method.c (hack_identifier): Likewise.
18123 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
18125 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
18127 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
18128 frontend, and make it more consistent with respect to
18129 warn_pointer_arith.
18131 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
18133 * decl.c (pushdecl): Check for duplicate parameter names.
18135 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
18137 * decl.c (expand_static_init): Call assemble_external for atexit.
18139 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
18141 * except.c (do_unwind): Remove some generated dead code.
18142 (eh_outer_context): New routine, factor out some common code from
18143 expand_builtin_throw and end_eh_unwinder. Add code to do return
18144 address masking for the PA.
18145 (expand_builtin_throw): Use eh_outer_context instead of open coding
18147 (end_eh_unwinder): Likewise.
18149 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
18151 * except.c (expand_throw): Call assemble_external for __empty, if we
18154 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
18156 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
18157 NORMAL_RETURN_ADDR_OFFSET.
18158 (end_eh_unwinder): Likewise.
18160 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
18162 * gc.c (build_dynamic_cast): Make sure we don't cast away const
18163 when dealing with references, and make sure we handle dynamic
18164 casting to a cv qualified reference.
18166 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
18168 * except.c (struct eh_context): New structure top hold eh context
18170 (push_eh_context): New routine.
18171 (pop_eh_context): Likewise.
18172 * decl.c (push_cp_function_context): Use them.
18173 (pop_cp_function_context): Likewise.
18175 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
18177 * decl2.c (finish_file): Also prune uninteresting functions in the
18178 inline emission loop.
18180 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
18182 * sig.c (build_signature_table_constructor): Mark functions
18183 in the signature as referenced.
18185 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
18187 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
18188 the inline emission stuff.
18190 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
18192 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
18194 * lang-options.h: Add -f{no-,}weak.
18195 * decl.c (init_decl_processing): If the target does not support weak
18196 symbols, don't use them.
18197 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18199 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
18201 * init.c (expand_member_init): warning for base init after members.
18203 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
18205 * cvt.c (build_expr_type_conversion): Don't convert to a reference
18208 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
18210 * method.c (report_type_mismatch): Improve wording for volatile
18213 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
18215 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
18216 expand_assignment, as the later doesn't handle things that have
18217 copy constructors well. The compiler would do bitwise copying,
18218 instead of ctor calling in some cases.
18220 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
18222 * g++.c (my_strerror): Return "cannot access" if errno is 0.
18223 (pfatal_with_name, perror_exec): Don't assume that
18224 the returned value from my_strerror contains no '%'s.
18226 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
18228 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
18230 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
18231 TYPE_METHODS/TREE_CHAIN mean what they used to.
18232 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
18233 instead of TYPE_METHODS.
18234 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
18235 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
18236 * cp-tree.h (CLASSTYPE_METHODS): Lose.
18237 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
18239 (struct lang_decl): Lose next_method field.
18240 (DECL_NEXT_METHOD): Lose.
18241 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
18242 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
18244 (finish_struct_methods): Don't mess with the TREE_CHAINs in
18247 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
18250 * call.c (build_method_call): Synthesize here even when not inlining.
18251 * typeck.c (build_function_call_real): Likewise.
18253 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
18255 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
18256 == DBX_DEBUG, call dbxout_start_new_source_file and
18257 dbxout_resume_previous_source_file when appropriate.
18259 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
18261 * except.c (start_anon_func): Push to the top level.
18262 (end_anon_func): Pop from the top level.
18264 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
18266 * cp-tree.h (build_cleanup): New routine to build cleanups.
18267 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
18268 call at ctor time and use atexit to run it later.
18269 * decl2.c (build_cleanup): New routine, taken from finish_file.
18270 (finish_file): Use build_cleanup instead, and don't put function
18271 local statics in global dtor list.
18273 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
18275 * except.c (expand_throw): Ensure that we have cleanups, if we try
18276 and expand cleanups.
18278 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
18280 * except.c (expand_throw): Add logic to manage dynamic cleanups for
18282 (expand_end_catch_block): Use the magic of expand_goto, instead of
18283 emit_jump so that we get the cleanup for any catch clause parameter
18284 and the cleanup for the exception object. Update to reflect label
18286 (push_eh_cleanup): New routine to register a cleanup for an
18288 (empty_fndecl): Used to default cleanup actions to
18290 (init_exception_processing): Setup empty_fndecl. Setup
18292 (expand_start_catch_block): Update to reflect label changes. Call
18293 push_eh_object to register the cleanup for the EH object.
18294 (start_anon_func): New routine to start building lambda expressions
18296 (end_anon_func): New routine to end them.
18297 (struct labelNode): Change so that we can use tree labels, or rtx
18299 (saved_cleanup): Object to check for dynamic cleanups for the
18300 exception handling object.
18301 (push_label_entry): Change so that we can use tree labels, or rtx
18303 (pop_label_entry): Likewise.
18304 (top_label_entry): Likewise.
18305 (expand_start_all_catch): Use tree label instead of rtx label, so
18306 that we can get the magic of expand_goto.
18307 (expand_end_all_catch): Update to reflect label changes.
18309 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
18311 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
18312 building_cleanup logic, as we now use UNSAVE_EXPRs.
18313 * cp-tree.h (unsave_expr): Declare it.
18314 * decl.c (building_cleanup): Remove.
18315 (maybe_build_cleanup): Remove building_cleanup logic, and use
18316 UNSAVE_EXPR instead.
18318 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
18320 * gc.c (build_t_desc): Update error message to say <typeinfo>.
18322 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18324 * decl.c (pushdecl): Only warn about shadowing a local variable if
18325 warn_shadow is true.
18327 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
18329 * typeck.c (build_binary_op_nodefault): Added warning about
18330 comparisons between different enum types with -Wall, unless
18331 -fenum-int-equiv set.
18333 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
18335 * class.c (finish_struct_1): Skip down to the inner type in
18336 multidimensional arrays. Ensures ctors will be made for types that
18339 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
18341 * decl.c (last_dtor_insn): New to track the last compiler generated
18343 (store_parm_decls): Set it.
18344 (finish_function): Use it to see if the dtor is empty. Avoid doing
18345 vtable setup all the time, if we can.
18346 (struct cp_function): Add last_dtor_insn.
18347 (push_cp_function_context): Save it.
18348 (pop_cp_function_context): Restore it.
18350 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
18352 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
18355 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
18357 * typeck.c (expand_target_expr): Make sure targets get put into the
18358 current temp_slot_level, so that the free_temp_slots call will reuse
18361 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
18363 * class.c (finish_struct_1): Delay delta fixups for virtual bases
18364 until after we have done the hard virtuals, to avoid a bogus `every
18365 virtual function must have a unique final overrider' for virtual
18366 functions that are only overridden by hard virtuals.
18368 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
18370 * pt.c (do_function_instantiation): Don't try to find a file-scope
18371 template for a member function.
18373 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
18375 * g++.c (main): Add handling of -nodefaultlibs.
18377 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
18379 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
18380 distinguish between direct bindings of reference variables, and
18381 indirect bindings of reference variables.
18382 * cvt.c (build_up_reference): Use it.
18383 * typeck.c (convert_arguments): Use it to indicate this is an
18385 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
18386 as they are unused.
18387 (expand_static_init): Likewise.
18388 (cplus_expand_expr_stmt): Likewise.
18389 * decl2.c (finish_file): Likewise.
18390 * init.c (perform_member_init): Likewise.
18391 (emit_base_init): Likewise.
18392 (expand_aggr_vbase_init_1): Likewise.
18394 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18396 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
18397 get a DECL_LANG_SPECIFIC node.
18398 * cp-tree.h (lang_decl_flags): Add new member `level'.
18399 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
18400 decl_flags level member.
18402 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18404 * call.c (build_method_call): Make sure instance has a
18405 TYPE_LANG_SPECIFIC node before we dive into it.
18407 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
18409 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
18411 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
18413 * decl.c (duplicate_decls): When smashing decls, smash staticness in
18416 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
18418 * decl.c (poplevel): Handle the merging of subblocks of cleanups
18419 when finishing blocks that have already been created (usually due to
18420 the fixup goto code). Fixes bad debugging information.
18422 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
18424 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
18425 that's not a list of overloaded functions.
18427 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18429 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
18430 before trying to use DECL_ABSTRACT_VIRTUAL_P.
18432 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
18434 * decl2.c (mark_used): New function for hooking into setting of
18435 TREE_USED on decls.
18436 * call.c (build_method_call): Use it.
18437 * class.c (instantiate_type): Likewise.
18438 * init.c (build_offset_ref): Likewise. Don't call assemble_external
18439 for all like-named functions.
18440 * method.c (hack_identifier): Likewise.
18441 (emit_thunk): Don't call assemble_external.
18442 (make_thunk): Create thunk as a FUNCTION_DECL so that it
18443 gets the right mode and ENCODE_SECTION_INFO works.
18445 * parse.y: Use mark_used. Pass operator names to do_identifier.
18446 * lex.c (do_identifier): Handle operator names.
18448 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
18450 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18452 * errfn.c: Include stdio.h.
18453 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
18455 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
18457 * typeck2.c (digest_init): Always convert initializers to the
18460 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
18462 * init.c (member_init_ok_or_else): Don't allow member initializers
18463 for indirect members, as it is invalid.
18465 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18467 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
18469 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
18471 * parse.y (for.init.statement): Catch compound statements inside for
18472 initializations, if we're being pedantic.
18474 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
18476 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
18479 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
18481 * error.c (dump_expr): Don't core dump when a boolean expression is
18482 used as a default argument.
18484 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
18486 * class.c (finish_struct_bits): Check aggregate_value_p instead of
18489 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
18491 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
18492 BLKmode type that would otherwise be returned in registers.
18494 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18496 * g++.c (WITHLIBC): New macro.
18497 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
18498 saw_libc and pass it at the end if it was set.
18500 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18502 * parse.y (fn.def1): Call split_specs_attrs in
18503 declmods notype_declarator case.