1 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3 * parse.y (language_string): Constify.
5 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7 * repo.c (getpwd): Don't prototype.
8 * xref.c (getpwd): Likewise
10 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
13 Remove hacks for stuff which now comes from libiberty.
15 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
17 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
19 1999-08-30 Mark Mitchell <mark@codesourcery.com>
21 * cp-tree.h (begin_init_stmts): Declare.
22 (finish_init_stmts): Likewise.
23 * cvt.c (build_up_reference): Wrap the declaration of a temporary
24 in a statement-expression so that we will see it when expanding
26 * init.c (begin_init_stmts): Don't make it static.
27 (finish_init_stmts): Likewise.
29 * cp-tree.h (start_handler_parms): New function.
30 (expand_start_catch_block): Take only one parameter.
31 (start_handler_parms): New function.
32 * decl.c (start_handler_parms): Define it.
33 * except.c (process_start_catch_block): Take only one parameter.
34 Don't call grokdeclarator here.
35 (expand_start_catch_block): Don't call grokdeclarator here,
37 * parse.y (handler_args): Adjust call to
38 expand_start_catch_block. Use start_handler_parms.
39 * pt.c (push_template_decl_real): Make permanent lists have
41 (tsubst_expr): Adjust calls to expand_start_catch_block
43 * semantics.c (expand_stmt): Likewise.
45 1999-08-29 Alex Samuel <samuel@codesourcery.com>
47 * pt.c (push_template_decl_real): Use template declaration from
48 class type if it exists.
50 1999-08-29 Mark Mitchell <mark@codesourcery.com>
52 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
53 (maybe_inject_for_scope_var): Declare it.
54 (initialize_local_var): Likewise.
55 * decl.c (maybe_inject_for_scope_var): Make it global.
56 (initialize_local_var): Likewise. Move cleanup handling here,
58 (make_rtl_for_nonlocal_decl): Use
59 push_obstacks_nochange/pop_obstacks, rather than
60 end_temporary_allocation/resume_temporary_allocation.
61 (cp_finish_decl): Try to complete the type of a variable when it
62 is declared. Move cleanup-handling to initialize_local_var.
63 (expand_static_init): Use tree-building code, rather than
65 * decl2.c (get_temp_name): Assert non-initializedness of
67 * init.c (create_temporary_var): Move RTL-assigning code to ...
68 (get_temp_regvar): Here.
69 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
70 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
71 call initialize_local_var to generate initialization code.
73 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
75 * cp-tree.h (fndecl_as_string, type_as_string,
76 type_as_string_real, args_as_string, decl_as_string,
77 expr_as_string, code_as_string, language_as_string,
78 parm_as_string, op_as_string, assop_as_string, cv_as_string,
79 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
81 * errfn.c (cp_printer): Likewise.
83 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
84 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
85 cp_file_of, code_as_string, language_as_string, parm_as_string,
86 op_as_string, assop_as_string, args_as_string, cv_as_string):
89 * tree.c (lang_printable_name): Likewise.
91 1999-08-28 Richard Henderson <rth@cygnus.com>
93 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
95 1999-08-28 Mark Mitchell <mark@codesourcery.com>
97 * cp-tree.h (strip_array_types): New function.
98 * decl.c (maybe_deduce_size_from_array_init): New function, split
99 out from cp_finish_decl.
100 (layout_var_decl): Likewise.
101 (maybe_commonize_var): Likewise.
102 (maybe_inject_for_scope_var): Likewise.
103 (initialize_local_var): Likewise.
104 (build_cleanup_on_safe_obstack): Likewise.
105 (check_initializer): Likewise.
106 (make_rtl_for_nonlocal_decl): Likewise.
107 (cp_finish_decl): Use them.
108 * typeck.c (strip_array_types): New function.
110 * cp-tree.def (LABEL_STMT): New tree node.
111 * cp-tree.h (LABEL_STMT_LABEL): New macro.
112 (shadow_label): Remove.
113 (declare_local_label): New function.
114 (finish_label_decl): Likewise.
115 * decl.c (make_label_decl): New function, split out from
117 (shadowed_labels): Remove.
118 (binding_level): Add shadowed_labels.
119 (clear_binding_level): Remove.
120 (push_binding_level): Just bzero the new binding level.
121 (pushlevel): Fix indentation.
122 (pop_label): New function.
123 (pop_labels): Likewise, split out from poplevel.
124 (poplevel): Pop local labels. Use pop_labels.
125 (maybe_push_to_top_level): Don't clear shadowed_labels.
126 (lookup_label): Use make_label_decl.
127 (shadow_label): Remove.
128 (declare_local_label): New function.
129 (define_label): Simplify.
130 (start_function): Don't clear shadowed_labels.
131 (cp_function): Remove shadowed_labels.
132 (push_cp_function_context): Don't save shadowed_labels.
133 (pop_cp_function_context): Don't restore it.
134 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
135 * parse.y (label_decl): Use finish_label_decl.
136 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
138 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
140 (finish_label_decl): New function.
141 (expand_stmt): Handle LABEL_STMTs and local label declarations.
143 1999-08-26 Mark Mitchell <mark@codesourcery.com>
145 * decl.c (lookup_label): Build labels on the permanent obstack
146 when building statement trees. Don't build RTL for labels when
147 building statement trees.
148 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
149 building statement trees.
150 (finish_label_stmt): Likewise.
151 (expand_stmt): Adjust accordingly.
152 * pt.c (tsubst_expr); Likewise.
153 (do_decl_instantiation): Robustify.
155 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
156 * tree.c (build_cplus_new): Set it.
157 * expr.c (cplus_expand_expr): Use it.
158 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
160 * decl.c (store_parm_decls): Reset immediate_size_expand.
161 (finish_function): Likewise.
163 * tree.c (cplus_unsave_expr_now): Don't return a value.
165 * semantics.c (do_poplevel): Always initialize the return value.
167 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
169 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
170 * tree.h (cplus_unsave_expr_now) : Same.
172 1999-08-25 Mark Mitchell <mark@codesourcery.com>
174 * decl.c (grokdeclarator): Amend comment.
175 * except.c (expand_start_catch_block): Call push_template_decl for
176 catch-block parameters.
177 * method.c (synthesize_method): Build an empty compound statement
178 for the body of a constructor.
180 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
182 * tree.c (cp_build_qualified_type_real): If we're asking for the
183 same quals we already have, just return.
185 1999-08-25 Mark Mitchell <mark@codesourcery.com>
187 * cp-tree.def (SUBOBJECT): New tree node.
188 * cp-tree.h (CLEANUP_P): New macro.
189 (SUBOBJECT_CLEANUP): Likewise.
190 (keep_next_level): Add parameter.
191 (get_temp_regvar): Don't declare.
192 (emit_base_init): Remove parameter.
193 (expand_aggr_init): Rename to build_aggr_init.
194 (expand_vec_init): Rename to build_vec_init.
195 (do_pushlevel): Remove.
196 (do_poplevel): Likewise.
197 (finish_cleanup): New function.
198 (finish_subobject): Likewise.
199 (stmts_are_full_exprs_p): New variable.
200 * decl.c (keep_next_level): Add parameter.
201 (cp_finish_decl): Use build_aggr_init, not
202 expand_aggr_init. Use finish_expr_stmt to expand the code.
203 (expand_static_init): Use tree-generating, not RTL-generating,
204 functions to handle the initialization.
205 (start_function): Remove dead code. Always have a momentary
206 obstack inside the function, even before hitting the first curly
208 (cplus_expand_expr_stmt): Move calls to
209 expand_{start,end}_target_temps into semantics.c.
210 (cp_function): Add stmts_are_full_exprs_p.
211 (push_cp_function_context): Save it.
212 (pop_cp_function_context): Restore it.
213 * decl2.c (get_temp_regvar): Move to init.c.
214 (do_static_initialization): Use build_{aggr,vec}_init.
215 (do_static_destruction): Fix typo in comment.
216 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
217 * except.c (expand_throw): Use create_temporary_var.
218 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
219 * init.c (expand_vec_init_try_block): Remove.
220 (expand_vec_init_catch_clause): Likewise.
221 (get_temp_regvar): New function.
222 (begin_init_stmts): Likewise.
223 (finish_init_stmts): Likewise.
224 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
226 (emit_base_init): Likewise. Remove unused parameter.
227 (expand_virtual_init): Likewise.
228 (expand_cleanup_for_base): Use finish_subobject.
229 (expand_aggr_vbase_init_1): Simplify.
230 (construct_virtual_bases): Use tree-generating functions to build
232 (expand_aggr_init): Likewise. Rename to build_aggr_init.
233 (expand_default_init): Likewise.
234 (expand_aggr_init_1): Likewise.
235 (expand_vec_init): Rename to build_vec_init.
236 * method.c (do_build_copy_constructor): Use tree-generating
237 functions. Don't call clear_last_expr.
238 (do_build_assign_ref): Likewise.
239 (synthesize_method): Call clear_last_expr here.
240 * parse.y (base_init): Don't call clear_last_expr here.
242 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
243 * semantics.c (do_pushlevel): Move to here.
244 (do_poplevel): Likewise.
245 (stmts_are_full_exprs_p): New variable.
246 (finish_expr_stmt): Handle logic for temoprary cleanup here.
247 (finish_for_stmt): Use finish_expr_stmt.
248 (finish_cleanup): New function.
249 (finish_function_try_block): Fix indentation.
250 (finish_subobject): New function.
251 (setup_vtbl_ptr): Call keep_next_level here.
252 (finish_stmt_expr): Handle a block with no scope inside the
253 statement-expression.
254 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
256 * tree.c (search_tree): Handle INIT_EXPR.
258 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
259 * typeck2.c (store_init_value): Change expand_aggr_init to
260 build_aggr_init in comment.
262 1999-08-25 Mark Mitchell <mark@codesourcery.com>
264 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
266 1999-08-25 Nathan Sidwell <nathan@acm.org>
268 * decl2.c (handle_class_head): Be graceful about additional
269 scope qualifiers. Adjust comments to reflect reality.
271 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
273 * call.c (build_conditional_expr): Fix typo.
274 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
275 lvalue before trying to mess with the sides.
277 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
279 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
281 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
283 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
285 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
286 Return arbitrary pointer or NULL.
287 (check_eh_spec): Call __throw_type_match_rtti_2.
288 * tinfo.h (*::dcast): Return int. Add valp parm.
289 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
290 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
291 (__throw_type_match_rtti): Now just a wrapper.
293 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
294 (init_exception_processing): Don't initialize them.
296 1999-08-23 Paul Burchard <burchard@pobox.com>
298 * decl.c (check_default_argument): Fix typo.
300 1999-08-22 Mark Mitchell <mark@codesourcery.com>
302 * cp-tree.def (STMT_EXPR): Fix typo in node name.
304 * dump.c (dump_next_stmt): New function.
305 (dequeue_and_dump): Use it.
307 * pt.c (tsubst_copy): Make sure to initialize return value for a
308 STMT_EXPR, even when processing_template_decl.
309 * semantics.c (finish_stmt_expr): A statement-expression whose
310 last statement is not an expression-statement has type `void'.
312 1999-08-20 Mark Mitchell <mark@codesourcery.com>
314 * semantics.c (finish_stmt_expr): Fix typo in comment.
315 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
317 * init.c (build_vec_delete_1): Make the children of a permanent
319 * pt.c (register_specialization): Don't register a specialization
322 1999-08-18 Andrew Haley <aph@cygnus.com>
324 * method.c (process_overload_item): Call build_mangled_C9x_name ()
325 for all integer parameter types larger than long long.
327 1999-08-19 Mark Mitchell <mark@codesourcery.com>
329 * pt.c (redeclare_class_template): Merge default template
330 arguments in both directions.
332 * typeck.c (common_type): Undo 1999-08-18 change. Remove
333 compiler_error message.
335 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
337 * cp-tree.h: Declare flag_use_repository.
338 * pt.c (do_decl_instantiation): Don't complain about duplicate
339 instantiation with -frepo.
340 (do_type_instantiation): Likewise.
342 * pt.c (push_template_decl_real): Complain about everything
343 that isn't a valid template.
345 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
348 1999-08-19 Mark Mitchell <mark@codesourcery.com>
350 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
351 * decl2.c (build_expr_from_tree): Handle it.
352 * error.c (dump_expr): Likewise.
353 * pt.c (for_each_template_parm): Likewise.
354 (tsubst_copy): Likewise.
355 * tree.c (search_tree): Likewise.
356 * semantics.c (finish_pseudo_destructor_call): Create it.
358 1999-08-18 Mark Mitchell <mark@codesourcery.com>
360 * search.c (setup_class_bindings): Robustify.
361 * typeck.c (common_type): Use same_type_p, not pointer equality,
364 * cp-tree.h (build_lang_field_decl): Remove.
365 * class.c (build_vtable): Replace calls to build_lang_field_decl
366 with build_lang_decl.
367 (prepare_fresh_vtable): Likewise.
368 (finish_struct_1): Likewise.
369 (init_class_processing): Likewise.
370 * decl.c (push_using_decl): Likewise.
371 (init_decl_processsing): Likewise.
372 (grokvardecl): Likewise.
373 (build_ptrmemfunc_type): Likewise.
374 (grokdeclarator): Likewise.
375 (build_enumerator): Likewise.
376 * decl2.c (grok_x_components): Likewise.
377 (do_class_using_decl): Likewise.
378 * except.c (call_eh_info): Likewise.
379 * init.c (init_init_processing): Likewise.
380 * rtti.c (expand_class_decl): Likewise.
381 * tree.c (build_base_fields): Likewise.
382 (build_vbase_pointer_fields): Likewise.
383 * lex.c (build_lang_decl): Build declarations on the permanent
384 obstack if we're building statmeent trees.
385 (retrofit_lang_decl): Handle both the full lang_decl and also the
386 smaller lang_decl_flags here.
387 (build_lang_field_decl): Remove.
388 * pt.c (push_template_decl_real): Issue errors for variable
389 declarations that are not static members.
391 1999-08-18 Richard Henderson <rth@cygnus.com>
393 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
396 1999-08-17 Mark Mitchell <mark@codesourcery.com>
398 * cp-tree.h (back_end_hook): New variable.
399 * decl2.c (back_end_hook): Define it.
400 (finish_file): If it's non-NULL, call it.
402 * decl.c (add_decl_to_level): New function.
403 (push_local_binding): Use it.
404 (find_binding): Fix typo in comment.
405 (pushdecl): Use add_decl_to_level. Put templates on the
406 corresponding namespace-scope binding levels.
407 * dump.c (dequeue_and_dump): Print the specializations of a
409 * pt.c (push_template_decl_real): Don't push a template multiple
412 1999-08-17 Mark Mitchell <mark@codesourcery.com>
414 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
415 (CALL_DECLARATOR_QUALS): Likewise.
416 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
417 * decl.c (grokdeclarator): Adjust to use them.
418 * decl2.c (grokfield): Likewise.
419 (reparse_absdcl_as_casts): Likewise.
420 * lex.c (make_call_declarator): Likewise.
421 (set_quals_and_spec): Likewise.
422 * pt.c (tsubst): Likewise.
423 * tree.c (mapcar): Remove special hack to handle third operand of
426 1999-08-16 Mark Mitchell <mark@codesourcery.com>
428 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
429 * class.c (build_vtable): Use build_lang_field_decl to build the
430 VAR_DECLs for vtables.
431 (prepare_fresh_vtable): Likewise.
432 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
433 CAN_HAVE_FULL_LANG_DECL_P.
434 (push_using_decl): Use build_lang_decl to build USING_DECLs.
435 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
436 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
437 (build_lang_field_decl): Likewise.
438 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
441 * cp-tree.def (STMT_EXPR): New tree node.
442 * cp-tree.h (STMT_EXPR_STMT): New macro.
443 (store_return_init): Change prototype.
444 (finish_named_return_value): New function.
445 (expand_stmt): Likewise.
446 (expand_body): Likewise.
447 (begin_stmt_tree): Likewise.
448 (finish_stmt_tree): Likewise.
449 (expanding_p): New variable.
450 (last_expr_type): Likewise.
451 (building_stmt_tree): New macro.
452 * decl.c (start_function): Use building_stmt_tree, not
453 processing_template_decl, where appropriate.
454 (store_parm_decls): Likewise.
455 (store_return_init): Move most of the body to semantics.c.
456 (finish_function): Use building_stmt_tree.
457 (finish_stmt): Clear last_expr_type here.
458 (cp_function): Add expanding_p, last_tree, last_expr_type.
459 (push_cp_function_context): Save them.
460 (pop_cp_function_context): Restore them.
461 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
462 * error.c (dump_expr): Handle STMT_EXPR.
463 * except.c (expand_start_catch_block): Use building_stmt_tree.
465 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
466 (do_case): Move add_tree call to semantics.c.
467 * parse.y (return_init): Use finish_named_return_value.
468 (for.init.statement): Use finish_expr_stmt.
469 * parse.c: Regenerated.
470 * pt.c (do_pushlevel): Move to semantics.c.
471 (do_poplevel): Likewise.
472 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
473 (tsubst_expr): Don't expand all the way to RTL here. Handle
474 RETURN_INIT and CTOR_INITIALIZER.
475 (instantiate_decl): Call expand_body after tsubst'ing into
477 * semantics.c (expand_stmts): New function.
478 (expanding_p): New variable.
479 (last_expr_type): Likewise.
480 (finish_expr_stmt): Use building_stmt_tree.
481 (begin_if_stmt): Likewise.
482 (finish_if_stmt_cond): Likewise.
483 (finish_then_clause): Likewise.
484 (begin_else_clause): Likewise.
485 (finish_else_clause): Likewise.
486 (begin_while_stmt): Likewise.
487 (finish_while_stmt_cond): Likewise.
488 (finish_while_stmt): Likewise.
489 (finish_do_body): Likewise.
490 (finish_do_stmt): Likewise.
491 (finish_return_stmt): Likewise.
492 (begin_for_stmt): Likewise.
493 (fnish_for_init_stmt): Likewise.
494 (finish_for_cond): Likewise.
495 (finish_for_expr): Likewise.
496 (finish_for_stmt): Likewise.
497 (finish_break_stmt): Likewise.
498 (finish_continue_stmt): Likewise.
499 (finish_switch_cond): Likewise.
500 (finish_switch_stmt): Likewise.
501 (finish_case_label): Call add_tree here if necessary.
502 (finish_goto_statement): Use building_stmt_tree.
503 (begin_try_block): Likewise.
504 (begin_function_try_block): Likewise.
505 (finish_try_block): Likewise.
506 (finish_function_try_block): Likewise.
507 (finish_handler_sequence): Likewise.
508 (finish_function_handler_sequence): Likewise.
509 (begin_handler): Likewise.
510 (finish_handler_parms): Likewise.
511 (finish_handler): Likewise.
512 (begin_compound_stmt): Likewise.
513 (finish_compound_stmt): Likewise.
514 (finish_asm_stmt): Likewise.
515 (finish_label_stmt): Likewise.
516 (finish_named_return_value): New function.
517 (setup_vtbl_ptr): Moved here from decl2.c.
518 (do_pushlevel): Moved here from pt.c.
519 (do_poplevel): Likewise.
520 (begin_stmt_expr): Use building_stmt_tree.
521 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
522 when building_stmt_tree.
523 (begin_stmt_tree): New function.
524 (finish_stmt_tree): Likewise.
525 (expand_stmt): Likewise.
526 (expand_body): Likewise.
527 * tree.c (build_cplus_method_type): Make sure the argument types
528 end up on the same obstack as the METHOD_TYPE.
529 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
530 THROW_EXPR, STMT_EXPR.
531 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
532 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
533 sorry, if an unsupported node is encountered.
534 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
535 (c_expand_return): Don't call add_tree here.
537 1999-08-15 Mark Mitchell <mark@codesourcery.com>
539 * pt.c (check_default_tmpl_args): Don't check in local scopes.
540 (tsubst_decl): Make sure the declaration is on a saveable
541 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
543 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
545 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
547 Speed up Koenig lookup.
548 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
549 to return namespaces we've looked at.
550 * decl2.c (lookup_using_namespace): Likewise.
551 (add_function): Don't call ovl_member.
552 (lookup_arg_dependent): Initialize k.namespaces to the list of
553 namespaces seen in unqualified lookup.
554 * call.c (equal_functions): Move here from tree.c.
555 (joust): Use it to handle duplicate candidates.
556 * tree.c (ovl_member): Use ==.
558 1999-08-13 Mark Mitchell <mark@codesourcery.com>
560 * cp-tree.def (DECL_STMT): Make it smaller.
561 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
562 (lang_decl): ... here. Add next.
563 (DECL_SAVED_TREE): Adjust accordingly.
564 (DECL_IMPLICIT_TYPEDEF_P): New macro.
565 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
566 (DECL_STMT_DECL): Likewise.
567 (create_implicit_typedef): New function.
568 (maybe_push_decl): Likewise.
569 (tsubst_default_argument): New function.
570 (at_function_scope_p): Likewise.
571 (add_decl_stmt): Likewise.
572 (push_permanent_obstack): Likewise.
573 * call.c (convert_default_arg): Use tsubst_default_argument.
574 * class.c (add_method): Use push_permanent_obstack.
575 (build_self_reference): Create a TEMPLATE_DECL for the
576 self-reference, if necessary.
577 * decl.c (pseudo_global_level_p): Only look at the current binding
579 (push_binding): Use push_permanent_obstack.
580 (create_implicit_typedef): New function.
582 (duplicate_decls): Use push_permanent_obstack.
583 (maybe_push_decl): New function.
584 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
585 (start_decl_1): Remove dead code.
586 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
587 pseudo_global_level_p.
588 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
590 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
591 pseudo_global_level_p.
592 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
594 (get_sentry): Use push_permanent_obstack.
595 * dump.c (dequeue_and_dump): Enable DECL_STMT.
596 * except.c (call_eh_info): Use push_permanent_obstack.
597 (build_eh_type_ref): Likewise.
598 (do_pop_exception): Likewise.
599 (expand_eh_spec): Likewise.
600 (alloc_eh_object): Likewise.
601 (expand_throw): Likewise.
602 * init.c (build_java_class_ref): Likewise.
603 * lex.c (get_time_identifier): Likewise.
604 (free_lang_decl_chain): Correct type.
605 (retrofit_lang_decl): Adjust accordingly.
606 (build_lang_field_decl): Likewise.
607 * lex.h (free_lang_decl_chain): Likewise.
608 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
609 * parse.c: Regenerated.
610 * pt.c (tsubst_default_arguments): New function.
611 (retrieve_local_specialization): Likewise.
612 (register_local_specialization): Likewise.
613 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
614 pseudo_global_level_p to determine whether or not a template is
616 (lookup_template_class): Likewise. Use create_implicit_typedef.
617 (instantiate_class_template): Call tsubst_default_arguments for
618 member functions, if appropriate.
619 (tsubst_default_argument): New function.
620 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
621 * search.c (at_function_scope_p): New function.
622 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
623 (finish_label_stmt): Likewise.
624 (add_decl_stmt): New function.
625 (begin_class_definition): Likewise.
626 (finish_typeof): Likewise.
627 * tree.c (copy_template_template_parm): Likewise.
628 (copy_to_permanent): Likewise.
629 (push_permanent_obstack): Define.
630 (mark_addressable): Use it.
631 * typeck.c (mark_addressable): Likewise.
633 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
635 cp-tree.h (init_cplus_unsave): New.
636 (cplus_unsave_expr_now): New.
637 lex.c (init_parse): Call init_cplus_unsave.
638 tree.c (init_cplus_unsave): New.
639 (cplus_unsave_expr_now): New.
641 1999-08-13 Mark Mitchell <mark@codesourcery.com>
643 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
644 decl_constant_value to simplify array bounds.
646 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
648 * lang-options.h: Add -fms-extensions.
649 * cp-tree.h: Declare flag_ms_extensions.
650 * decl2.c: Define it.
651 * class.c (instantiate_type): Don't complain about taking the address
652 of a bound member function if -fms-extensions.
653 * typeck.c (build_unary_op): Likewise.
654 * decl.c (grokdeclarator): Or about implicit int.
655 * init.c (resolve_offset_ref): Or about implicit '&'.
657 1999-08-11 Mark Mitchell <mark@codesourcery.com>
659 * cp-tree.h (minimal_parse_mode): Remove.
660 (finish_label_stmt): New function.
661 * decl.c (saved_scope): Remove minimal parse mode.
662 (maybe_push_to_top_level): Don't save it.
663 (pop_from_top_level): Don't restore it.
664 (define_label): Split out template-handling code to semantics.c.
665 (start_decl): Don't use minimal_parse_mode.
666 (cp_finish_decl): Likewise.
667 (start_function): Don't increment it.
668 (store_return_init): Don't use it.
669 (finish_function): Don't decrement it.
670 * parse.y (label_colon): Use finish_label_stmt throughout.
671 * parse.c: Regenerated.
672 * pt.c (minimal_parse_mode): Don't define it.
673 (tsubst_expr): Use finish_label_stmt.
674 * semantics.c (finish_label_stmt): New function.
676 * dump.c (queue): Be careful when computing bitmasks.
677 (dequeue_and_dump): Describe binfos as binfos, not as
680 * parse.y (pedantic): Give it itype. Adjust usage accordingly
682 * parse.c: Regenerated.
684 * Make-lang.in (CXX_SRCS): Remove sig.c.
685 * Makefile.in (CXX_OBJS): Remove sig.o.
687 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
688 (CPTI_SIGNATURE_TYPE): Likewise.
689 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
690 (opaque_type_node): Likewise.
691 (signature_type_node): Likewise.
692 (sigtable_entry_type): Likewise.
693 (flag_handle_signatures): Likewise.
694 (lang_type): Remove is_signature, is_signature_pointer,
695 is_signature_reference, has_opaque_typedecls,
696 sigtables_has_been_generated. Adjust dummy. Remove signature,
697 signature_pointer_to, signature_reference_to.
698 (IS_SIGNATURE): Remove.
699 (SET_SIGNATURE): Remove.
700 (CLEAR_SIGNATURE): Remove.
701 (IS_SIGNATURE_POINTER): Remove.
702 (IS_SIGNATURE_REFERENCE): Remove.
703 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
704 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
705 (CLASSTYPE_SIGNATURE): Remove.
706 (SIGNATURE_TYPE): Remove.
707 (SIGNATURE_METHOD_VEC): Remove.
708 (SIGNATURE_POINTER_TO): Remove.
709 (SIGNATURE_REFERENCE_TO): Remove.
710 (lang_decl_flags): Remove is_default_implementation. Rename
711 memfunc_pointer_to to saved_tree.
712 (IS_DEFAULT_IMPLEMENTATION): Remove.
713 (DECL_MEMFUNC_POINTER_TO): Remove.
714 (DECL_MEMFUNC_POINTING_TO): Remove.
715 (DECL_SAVED_TREE): Adjust definition.
716 (tag_types): Remove signature_type_node.
717 (SIGNATURE_FIELD_NAME): Remove.
718 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
719 (SIGNATURE_OPTR_NAME): Likewise.
720 (SIGNATURE_SPTR_NAME): Likewise.
721 (SIGNATURE_POINTER_NAME): Likewise.
722 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
723 (SIGNATURE_REFERENCE_NAME): Likewise.
724 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
725 (SIGTABLE_PTR_TYPE): Likewise.
726 (SIGTABLE_NAME_FORMAT): Likewise.
727 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
728 (SIGTABLE_TAG_NAME): Likewise.
729 (SIGTABLE_VB_OFF_NAME): Likewise.
730 (SIGTABLE_VT_OFF_NAME): Likewise.
731 (finish_base_specifiers): Change prototype.
732 (build_signature_pointer_type): Remove.
733 (build_signature_reference_type): Remove.
734 (build_signature_pointer_constructor): Remove.
735 (build_signature_method_call): Remove.
736 (build_optr_ref): Likewise.
737 (append_signature_fields): Likewise.
738 (signature_error): Likewise.
739 * call.c (build_this): Remove signature support.
740 (build_over_call): Likewise.
741 (build_new_method_call): Likewise.
742 * class.c (add_implicitly_declared_members): Likewise.
743 (finish_struct_1): Likewise.
744 (finish_struct): Likewise.
745 * cvt.c (cp_convert_to_pointer): Likewise.
746 (convert_to_pointer_force): Likewise.
747 (ocp_convert): Likewise.
748 * decl.c (sigtable_decl_p): Remove.
749 (init_decl_processing): Remove support for signatures.
750 (cp_finish_decl): Likewise.
751 (grokdeclarator): Likewise.
752 (grokparms): Likewise.
753 (xref_tag): Likewise.
754 (start_function): Likewise.
755 (start_method): Likewise.
756 * decl2.c (finish_sigtable_vardecl): Remove.
757 (flag_handle_signatures): Remove.
758 (lang_f_options): Remove handle-signatures.
759 (grokfield): Remove support for signatures.
760 (grokbitfield): Likewise.
761 (finish_file): Likewise.
762 (reparse_absdcl_as_casts): Likewise.
763 * error.c (dump_type_real): Likewise.
764 (dump_function_decl): Likewise.
765 * friend.c (make_friend_class): Likewise.
766 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
767 * hash.h: Regenerated.
768 * init.c (build_new_1): Remove support for signatures.
769 * lang-options.h: Remove -fhandle-signatures,
770 -fno-handle-signatures.
771 * lex.c (init_parse): Remove support for signatures.
773 * lex.h (rid): Remove RID_SIGNATURE.
774 * method.c (build_decl_overload_real): Remove support for
776 (hack_identifier): Likewise.
777 * parse.y (base_class): Likewise.
778 (base_class.1): Likewise.
779 (access_specifier): Likewise.
780 * search.c (lookup_member): Likewise.
781 * semantics.c (finish_qualified_object_call_expr): Likewise.
782 (finish_template_type_parm): Likewise.
783 (begin_class_definition): Likewise.
784 (finish_base_specifier): Likewise.
786 * tree.c (build_cplus_method_type): Remove support for signatures.
787 * typeck.c (require_complete_type): Likewise.
788 (c_sizeof): Likewise.
789 (c_alignof): Likewise.
790 (build_object_ref): Likewise.
791 (build_component_ref): Likewise.
792 (build_indirect_ref): Likewise.
793 (build_c_cast): Likewise.
794 (build_modify_expr): Likewise.
795 (convert_for_initialization): Likewise.
796 * typeck2.c (signature_error): Remove.
797 (store_init_value): Remove support for signatures.
798 (digest_init): Likewise.
799 (build_x_arrow): Likewise.
800 (build_functional_cast): Likewise.
801 * xref.c (GNU_xref_decl): Likewise.
803 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
805 * lex.c (do_identifier): Remove unnecessary lookup of class field.
807 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
809 * decl2.c (set_decl_namespace): Do not complain about non-matching
810 decls if processing a template.
812 1999-08-09 Mark Mitchell <mark@codesourcery.com>
814 * decl.c (build_ptrmemfunc_type): Handle qualified
815 pointer-to-member types here.
816 * tree.c (cp_build_qualified_type_real): Simplify handling here.
818 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
820 * decl.c: Remove redundant prototype for `print_error_function'.
821 (lang_print_error_function): Constify a char*.
823 * lex.c (lang_identify): Likewise.
825 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
827 * Makefile.in: Update dependencies.
828 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
830 * decl.c: Include "function.h"
831 (cleanup_label, return_label): Delete declarations.
832 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
833 (finish_function): Rename last_parm_insn variable to
834 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
835 * decl2.c: Include "function.h".
836 (rtl_expr_chain): Delete declaration.
837 * method.c: Include "function.h"
838 * tree.c (build_vbase_pointer_fields): Don't initialize
839 DECL_SAVED_INSNS with NULL_RTX.
840 * typeck.c: Include "function.h"
842 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
844 * semantics.c (begin_function_try_block, finish_function_try_block,
845 finish_function_handler_sequence): New fns.
846 * parse.y (function_try_block): Use them.
847 * pt.c (instantiate_decl): Likewise.
849 * cp-tree.h: Declare in_function_try_handler.
851 (start_function): Clear it.
852 (struct cp_function, push_cp_function_context): Save it.
853 (pop_cp_function_context): Restore it.
854 * parse.y (function_try_block): Set and clear it.
855 * except.c (expand_end_catch_block): Rethrow if we reach the end
856 of a function-try-block handler in a ctor or dtor.
857 * typeck.c (c_expand_return): Complain about returning from a
858 function-try-block handler of a ctor.
860 * parse.y (function_try_block): Call end_protect_partials
861 before expand_start_all_catch.
863 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
865 * decl.c (struct binding_level): Add eh_region field.
866 (push_binding_level): Set it.
867 (define_label): Complain about jumping into an EH block.
869 * ptree.c (print_lang_type): Print the real type of a PMF.
870 Print what exceptions a fn type throws.
872 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
874 * class.c (count_fields, add_fields_to_vec): Add static prototype.
876 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
877 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
880 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
883 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
886 * dump.c (queue_and_dump_index, dump_int, dump_string,
887 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
889 (dump_stmt): Add static prototype.
891 * errfn.c (cp_thing): Constify a char*.
893 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
894 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
895 dump_expr): Constify a char*.
897 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
898 read_line_number): Add static prototype.
899 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
900 (real_yylex): Move label `letter' into the scope where it is used.
902 * method.c (build_mangled_template_parm_index, build_overload_int,
903 build_decl_overload_real, get_id_2): Constify a char*.
905 * search.c (check_final_overrider): Make static.
907 * typeck.c (composite_pointer_type): Constify a char*.
909 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
911 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
912 we're looking at a class.
914 * decl.c (lookup_name_real): Set the complain flag if we're
915 looking for a namespace member.
917 * lex.c (real_yylex): We can have a number with no digits.
919 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
921 * search.c (binfo_from_vbase): New fn.
922 * cp-tree.h: Declare it.
923 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
924 from pointer to member of virtual base.
925 * typeck.c (get_delta_difference): Likewise.
927 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
929 * pt.c (tsubst): Use build_index_type to build in-template array
930 index type. Fixes g++.oliva/dwarf1.C.
931 * decl.c (grokdeclarator): Likewise, just for consistency, as it
932 doesn't seem to trigger the bug without it.
934 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
936 * typeck2.c (add_exception_specifier): Use complete_type.
938 1999-08-06 Mark Mitchell <mark@codesourcery.com>
940 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
941 (dump_binary_op): Bulletproof.
942 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
943 * tree.c (search_tree): Don't enumerate all the nodes of classes
944 `1', `2', and `<'; handle them generically. Don't be sorry about
945 "unrecognized tree codes"; just abort.
946 (no_linkage_check): Don't do linkage checks for templates.
948 * tree.c (cp_build_qualified_type_real): Handle
949 pointer-to-member-function types correctly.
951 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
953 * decl.c (pushdecl): Only give an error for shadowing a parm
954 from *this* function.
956 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
958 * typeck2.c: Update URLs and mail addresses.
960 1999-08-04 Nathan Sidwell <nathan@acm.org>
962 * cp-tree.h (empty_except_spec): New global var.
963 (compexcepttypes): Remove prototype.
964 (comp_except_specs): Prototype new global function.
965 (add_exception_specifier): Prototype new global function.
966 * decl.c (empty_except_spec): Define new global var.
967 (duplicate_decls): Use comp_except_specs, reword error message.
968 (init_decl_processing): Initialize empty_except_spec.
969 Adjust build_exception_variant calls.
970 * parse.y (exception_specification_opt): Use empty_except_spec.
971 (ansi_raise_identifier): Call check_for_new_type.
972 (ansi_raise_identifiers): Use add_exception_specifier.
973 * pt.c (tsubst): Use add_exception_specifier to build exception
975 * search.c (check_final_overrider): New static function, broken
976 out of get_matching_virtual. Check throw specifiers, reword
978 (get_matching_virtual): Use check_final_overrider.
979 * tree.c (build_exception_variant): Use comp_except_specs.
980 * typeck.c (compexcepttypes): Remove.
981 (comp_except_types): New static function, helper for
982 comp_except_specs. Compare two types as exception specifiers.
983 (comp_except_specs): New global function, compare two exception
985 (comptypes): Adjust for comp_except_specs.
986 * typeck2.c (add_exception_specifier): New global function.
988 * class.c (check_for_override): Reword error message.
990 1999-08-03 Nathan Sidwell <nathan@acm.org>
992 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
993 * cp-tree.h (struct lang_type): Added non_pod_class flag.
994 (CLASSTYPE_NON_POD_P): New macro to access it.
995 * class.c (finish_struct_1): Determine non-PODness.
996 Check for arrays of pointers (-Weffc++).
997 Remove array inspection duplicated code.
998 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
999 Use CLASSTYPE_NON_POD_P.
1001 1999-08-03 Nathan Sidwell <nathan@acm.org>
1003 * class.c (duplicate_tag_error): Preserve template information.
1005 1999-08-03 Nathan Sidwell <nathan@acm.org>
1007 * decl.c (start_enum): Show location of previous definition.
1008 * parse.y (enumlist_opt): New reduction.
1009 (structsp): Simplify enum rules to use enumlist_opt.
1011 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
1013 * lex.c (yyprint): Handle PFUNCNAME.
1015 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
1016 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
1018 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
1020 * decl.c (start_decl): Set attributes before duplicate_decls call.
1022 1999-08-02 Mark Mitchell <mark@codesourcery.com>
1024 * Make-lang.in (CXX_SRCS): Add dump.c.
1025 * Makefile.in (CXX_OBJS): Add dump.o.
1026 (dump.o): New target.
1027 * cp-tree.h (DECL_CONV_FN_P): Document.
1028 (DECL_OVERLOADED_OPERATOR_P): New function.
1029 (TYPE_PTRMEM_CLASS_TYPE): New macro.
1030 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1031 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
1032 (ASM_VOLATILE_P): New macro.
1033 (STMT_LINENO): Likewise.
1034 (cp_namespace_decls): New function.
1035 (dump_node_to_file): New function.
1036 * decl.c (cp_namespace_decls): New function.
1037 (walk_namespaces_r): Use it.
1038 (wrapup_globals_for_namespace): Likewise.
1039 * decl2.c (flag_dump_translation_unit): New variable.
1040 (lang_decode_option): Handle -fdump-translation-unit.
1041 (finish_file): If flag_dump_translation_unit is set, dump the
1044 * lang-options.h: Add -fdump-translation-unit.
1045 * pt.c (tsubst_template_parms): Robustify.
1046 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
1047 (tsubst_expr): Use STMT_LINENO.
1048 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
1049 for invalid cv-qualifiers even while building templates.
1051 1999-08-02 Richard Henderson <rth@cygnus.com>
1053 * call.c: Include defaults.h instead of expr.h.
1056 * typeck.c: Include defaults.h.
1058 1999-08-02 Mark Mitchell <mark@codesourcery.com>
1060 * lex.c (errorcount, sorrycount): Don't declare.
1061 * repo.c (errorcount, sorrycount): Likewise.
1062 * typeck2.c (errorcount, sorrycount): Likewise.
1064 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
1066 * call.c (convert_default_arg, build_over_call): Change all uses of
1067 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
1068 Ensure expr.h is included.
1069 * decl.c (grokparams): Ditto.
1070 * pt.c (tsubst_decl): Ditto.
1071 * typeck.c (convert_arguments): Ditto.
1073 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
1075 * class.c (mark_overriders): Fix order of args to overrides.
1076 (warn_hidden): Likewise. Fix for having virtual and non-virtual
1077 functions with the same name.
1079 1999-08-02 Richard Henderson <rth@cygnus.com>
1081 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
1083 1999-08-01 Mark Mitchell <mark@codesourcery.com>
1085 * call.c (build_conditional_expr): Fix typo in comment.
1087 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
1089 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
1090 case_stack; use in_control_zone_p.
1091 * typeck.c (c_expand_return): Likewise.
1093 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
1095 * except.c (catch_clauses): Delete declaration.
1097 1999-07-30 Mark Mitchell <mark@codesourcery.com>
1099 * call.c (build_conditional_expr): Call convert_from_reference to
1100 avoid reference/non-reference type confusion. Fix typo.
1102 1999-07-30 Richard Henderson <rth@cygnus.com>
1104 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
1105 * cp-tree.h (initializer_constant_valid_p): Remove.
1107 1999-07-28 Mark Mitchell <mark@codesourcery.com>
1109 * call.c (conditional_conversion): Don't build BASE_CONVs for
1110 conversions between things that have the same type.
1111 (build_conditional_expr): Tweak.
1112 (convert_like): Some BASE_CONVs really do require the generation
1115 * init.c (perform_member_init): Don't go through build_modify_expr
1116 for simple initializations.
1118 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
1120 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
1121 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
1122 virtual functions and MI. Simplify.
1124 * method.c: Remove prototype for largest_union_member.
1125 * pt.c (determine_specialization): Fix uninitialized warning.
1126 * lex.c (real_yylex): Likewise.
1128 1999-07-27 Mark Mitchell <mark@codesourcery.com>
1130 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
1133 * cp-tree.h (BINFO_VIRTUALS): Document new format.
1134 * class.c (modify_one_vtable): Change prototype accordingly.
1135 (modify_all_vtables): Likewise.
1136 (modify_all_direct_vtables): Likewise.
1137 (modify_all_indirect_vtables): Likewise.
1138 (build_vtable_entry_for_fn): New function.
1139 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
1140 (modify_vtable_entry): Likewise.
1141 (add_virtual_function): Likewise.
1142 (build_vtbl_initializer): New function.
1143 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
1144 (fixup_vtable_deltas1): Likewise.
1145 (fixup_vtable_deltas): Likewise.
1146 (override_one_vtable): Likewise.
1147 (finish_struct_1): Likewise.
1149 * error.c (dump_expr): Likewise.
1150 * search.c (get_abstract_virtuals_1): Likewise.
1151 (get_abstract_virtuals): Likewise.
1152 (expand_upcast_fixups): Likewise.
1153 * tree.c (debug_binfo): Likewise.
1154 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
1155 __pure_virtual here.
1157 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1159 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
1160 as per 1999-07-26 change.
1162 * typeck.c (c_sizeof): Don't allow non-static data members.
1163 (expr_sizeof): Likewise.
1165 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
1167 * input.c (feed_input): Only touch lineno and input_filename
1168 if !USE_CPPLIB. Save the old values before setting the new ones.
1170 * input.c (feed_input): Add file, line parms.
1171 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
1172 (real_yylex): Check linemode before input_redirected().
1174 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
1175 from op new to warning.
1177 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1179 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
1180 * call.c: All uses changed.
1181 * typeck.c: Likewise.
1183 1999-07-26 Nathan Sidwell <nathan@acm.org>
1185 * exception.cc (__cplus_type_matcher): Match __eh_matcher
1188 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1190 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
1191 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
1192 (strip_top_quals): Declare.
1193 (ncp_convert): Likewise.
1194 (type_after_usual_arithmetic_converions): Likewise.
1195 (composite_pointer_type): Likewise.
1196 * call.c (strip_top_quals): Don't make it static.
1197 (promoted_arithmetic_type_p): New function.
1198 (conditional_conversion): Likewise.
1199 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
1200 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
1201 for converting a type to itself.
1202 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
1203 (implicit_conversion): Make sure the from and to types are
1205 (add_builtin_candidate): Correct handling of ?: operator.
1206 (add_builtin_candidates): Improve documentation.
1207 (build_conditional_expr): New function.
1208 (can_convert): Implement in terms of can_convert_arg.
1209 (ncp_convert): New function.
1210 * typeck.c (type_after_usual_arithmetic_conversions): New
1211 function, split out from common_type.
1212 (composite_pointer_type): New function, split out from
1213 build_conditional_expr.
1214 (common_type): Use type_after_usual_arithmetic_conversions.
1215 Remove redundant attribute merging.
1216 (comptypes): Tidy. Handle COMPLEX_TYPE.
1217 (build_binary_op_nodefault): Use null_ptr_cst_p.
1218 (build_conditional_expr): Remove.
1219 (convert_for_assignment): Use new conversion functions.
1221 * cp-tree.h (abstract_virtuals_error): Change declaration.
1222 * typeck2.c (abstract_virtuals_error): Check to see if an error
1223 ocurred, and return a boolean value accordingly.
1224 (build_functional_cast): Adjust accordingly.
1225 * class.c (finish_struct_1): Likewise.
1226 * cvt.c (ocp_convert): Likewise.
1227 * decl.c (cp_finish_decl): Likewise.
1228 (grokparams): Likewise.
1229 (grok_op_properties): Likewise.
1230 (start_function): Likewise.
1231 * init.c (build_new_1): Likewise.
1233 * pt.c (unify): Don't get confused by pointers-to-member functions.
1235 * search.c (build_cplus_new): Robustify.
1237 1999-07-24 Richard Henderson <rth@cygnus.com>
1239 * decl.c (ptr_type_node, va_list_type_node): New.
1240 * gxx.gperf (__builtin_va_arg): New.
1241 * parse.y (VA_ARG): New token.
1242 (unary_expr): Recognize it.
1244 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
1246 * g++FAQ.texi: Deleted per Joe Buck's request.
1247 * Makefile.in: Corresponding changes.
1249 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
1251 * lex.c: Sync with C frontend.
1252 (whitespace_cr): New fn.
1253 (skip_white_space): Use it.
1254 (init_parse): Reorder.
1255 (yyprint): Support CONSTANT.
1256 (pragma_getc, pragma_ungetc): Bring back.
1257 (read_line_number): Change in_system_header directly.
1258 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
1259 (parse_float): Update to C version.
1260 (yylex): Handle '$' under the letter case.
1261 Remove looking_for_typename handling.
1262 Support hex floating point constants.
1263 Follow C's lead for choosing type of integer constants.
1264 Rearrange stuff to match C frontend.
1265 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
1266 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
1268 1999-07-23 Mark Mitchell <mark@codesourcery.com>
1270 * call.c (reference_binding): Tweak.
1271 (mayble_handle_implicit_object): Use direct_reference_binding to
1272 create the right implicit conversion sequence.
1274 1999-07-22 Mark Mitchell <mark@codesourcery.com>
1276 * pt.c (convert_nontype_argument): Don't call decl_constant_value
1277 if we're converting to a reference type.
1279 * call.c (NEED_TEMPORARY_P): New macro.
1280 (standard_conversion): Set it, for derived-to-base conversions.
1281 (reference_related_p): New function.
1282 (reference_compatible_p): Likewise.
1283 (convert_class_to_reference): Likewise.
1284 (direct_reference_binding): Likewise.
1285 (reference_binding): Rework for standards-compliance.
1286 (convert_like): Adjust accordingly.
1287 (maybe_handle_ref_bind): Simplify; the right conversion sequences
1288 are now built up in reference_binding.
1289 (initialize_reference): New function.
1290 * cp-tree.h (ICS_USER_FLAG): Document.
1291 (ICS_THIS_FLAG): Likewise.
1292 (ICS_BAD_FLAG): Likewise.
1293 (NEED_TEMPORARY_P): Likewise.
1294 (cp_lvalue_kind): New type.
1295 (real_lvalue_p): Return it.
1296 * error.c (dump_expr): Provide more accurate representation for
1298 * init.c (expand_default_init): Do not try to perform implicit
1299 conversions for a brace-enclosed initializer.
1300 * search.c (lookup_conversions): Document.
1301 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
1303 (real_lvalue_p): Adjust accordingly.
1304 (lvalue_p): Likewise.
1305 (build_cplus_new): Don't allow the creation of an abstract class.
1306 * typeck.c (convert_for_initialization): Use initialize_reference.
1308 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
1310 * lex.c (real_yylex) : Correct the test for overflow when lexing
1313 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
1315 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
1316 not DECL_BUILT_IN, to determine if a function is internally declared.
1317 (duplicate_decls): Likewise. Improve handling of builtins.
1318 (push_overloaded_decl): Remove special handling of builtins.
1320 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
1322 * decl.c (grokdeclarator): Pull out decl_constant_value in
1325 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
1326 * cp-tree.h, pt.c, semantics.c: Adjust.
1327 * method.c (largest_union_member): Remove.
1329 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
1331 * lex.c (token_getch, token_put_back): New fns.
1332 (real_yylex): Use them.
1334 * lex.c (lang_init): Generalize.
1335 (lang_init_options): Tell cpplib this is C++.
1336 (nextchar): Remove. Replace uses with put_back.
1337 (skip_white_space): Handle linemode here. Optimize for cpplib.
1338 (extend_token_buffer_to): New fn.
1339 (extend_token_buffer): Use it.
1340 (read_line_number, check_newline): Just deal with tokens.
1341 (real_yylex): More cpplib optimizations. Simplify. Don't produce
1342 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
1343 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
1344 * parse.y (PAREN_STAR_PAREN): Remove.
1345 * input.c: Don't use the putback machinery with cpplib.
1346 (sub_getch): Fold back into getch.
1347 (getch): Don't handle linemode here.
1348 (feed_input): Unget any text in the token buffer.
1350 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
1351 nextyychar, nextyylval): Remove.
1353 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
1354 Jason Merrill <jason@yorick.cygnus.com>
1356 * lex.c (indent_level): New variable.
1357 (init_parse): Set cpp_token to CPP_DIRECTIVE.
1358 (consume_string): Make this smart about USE_CPPLIB.
1359 (yyungetc): Use put_back function.
1360 (pragma_getc, pragma_ungetc): Functions deleted.
1361 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
1362 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
1364 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
1365 Also, clean up cases where we redundantly set token_buffer[0].
1366 (read_line_number): New fn.
1367 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
1368 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
1369 (sub_getch): Conditionalize out code that's not appropriate if
1371 (put_back): Rewrite in case USE_CPPLIB is defined.
1372 (input_redirected): Ditto.
1374 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
1376 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
1377 c_global_trees and accessor macros defined in c-common.h.
1378 (cp_tree_index): New enumeration.
1379 (cp_global_trees): Declare new array. Add accessor macros for it, and
1380 delete declarations of tree nodes replaced by it.
1381 (builtin_function): Delete macro, add declaration for new function.
1383 * decl.c: Delete definitions for tree nodes that were replaced by
1384 cp_global_trees and c_global_trees.
1385 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
1386 to generate the common builtins here.
1387 (builtin_function): New function.
1388 * decl2.c (abort_fndecl): Delete declaration.
1389 * except.c (expand_builtin_return_address): Delete declaration.
1390 (builtin_return_address_fndecl): Delete variable.
1391 (const_ptr_type_node): Delete declaration.
1392 * lex.c (cons_up_default_function): Delete declaration of
1394 * parse.y (void_list_node): Delete declaration.
1395 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
1397 (const_string_type_node): Delete declaration.
1398 * search.c (abort_fndecl): Delete declaration.
1399 * Makefile.in: Update dependencies.
1401 1999-07-19 Mark Mitchell <mark@codesourcery.com>
1403 * pt.c (check_default_tmpl_args): Move test for missing default
1404 arguments here, from ...
1405 (end_template_parm_list): Here.
1407 1999-07-18 Mark Mitchell <mark@codesourcery.com>
1409 * decl.c (lookup_nested_type): Remove.
1410 (pushtag): Don't call it.
1412 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
1414 * Makefile.in (INTERFACE): Bump to 2.
1416 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
1418 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
1419 instructions to gcc.gnu.org. Removed e-mail address.
1421 1999-07-17 Mark Mitchell <mark@codesourcery.com>
1423 * pt.c (determine_specialization): Tighten error-checking.
1424 (end_template_parm_list): Likewise.
1426 1999-07-14 Mark Mitchell <mark@codesourcery.com>
1428 * pt.c (check_default_tmpl_args): Handle friends defined in the
1429 class just like member functions defined in the class.
1431 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
1432 Jason Merrill <jason@yorick.cygnus.com>
1434 * cp-tree.h (struct lang_decl): Added field for storing sorted
1435 FIELD_DECLs (used in TYPE_DECLs).
1436 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
1437 (DECL_SORTED_FIELDS): New macro.
1438 * class.c (method_name_cmp): New function.
1439 (finish_struct_methods): Modified to support sorting and searching
1441 (finish_struct_anon): Changed code in inner loop to use ELT rather
1442 than UELT (which required an extra indirection for every reference).
1443 (field_decl_cmp): New function to support sorting FIELD_DECLs.
1444 (finish_struct_1): Sort fields.
1445 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
1446 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
1447 Also, switch to using array indexing rather than a changing pointer.
1448 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
1451 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
1453 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
1454 casts in system headers or extern "C" blocks.
1456 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
1459 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
1461 * decl2.c (write_virtuals): Deleted declaration.
1462 * cp-tree.h (write_virtuals): Deleted extern declaration.
1463 * class.c (finish_struct_1): Removed #if 0'd code that mentions
1465 * semantics.c (begin_class_definition): Rewrite code to not depend
1468 * lex.c (cp_pragma_interface): New function.
1469 (cp_pragma_implementation): Likewise.
1470 (handle_cp_pragma): Call them.
1472 * typeck.c (comptypes): Simplify C code in look_hard.
1474 * xref.c (PALLOC): Use xcalloc, not calloc.
1475 (SALLOC): Use xmalloc, not malloc.
1477 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
1479 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
1482 * decl.c (duplicate_decls): If a redeclaration doesn't match the
1483 initial declaration, then don't save the inline info and by all
1484 means don't mark the function as a builtin function.
1486 * decl.c (lookup_name_real): Set NONCLASS to 1 if
1487 CURRENT_CLASS_TYPE is 0.
1489 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
1492 * ptree.c (print_lang_type): Added vtable-needs-writing.
1494 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
1496 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
1498 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
1500 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
1501 Merged into c-common.
1503 1999-07-05 Dave Brolley <brolley@cygnus.com>
1505 * lex.c (errorcount): Declare it.
1506 (finish_parse): Update errorcount for when using CPPLIB.
1508 1999-07-05 Mark Mitchell <mark@codesourcery.com>
1510 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
1512 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
1513 * decl.c (push_class_binding): Use it.
1514 (lookup_name_real): Likewise.
1516 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
1518 * cp-tree.h (widest_integer_literal_type_node,
1519 widest_unsigned_literal_type) : New.
1520 * decl.c (widest_integer_literal_type_node,
1521 widest_unsigned_literal_type) : New.
1522 (init_decl_processing): Handle/use the two new types.
1523 * lex.c (real_yylex): Same.
1524 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
1527 1999-07-01 Mark Mitchell <mark@codesourcery.com>
1529 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
1530 to anonymous cv-qualified types.
1532 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
1534 * lex.c (real_yylex) : Change integer literal overflow handling to
1537 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
1539 1999-06-28 Richard Henderson <rth@cygnus.com>
1541 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
1543 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
1545 * error.c (dump_type_real): Handle TREE_LIST again.
1547 * typeck.c (comp_target_parms): Don't complain about
1548 converting from () to (...) if !flag_strict_prototype.
1550 * decl.c (grokdeclarator): Update the names of all variants when
1553 1999-06-21 Mark Mitchell <mark@codesourcery.com>
1555 * init.c (expand_aggr_vbase_init): Rename to
1556 construct_virtual_bases. Conditionalize construction here,
1558 (emit_base_init): Here.
1560 1999-06-19 Mark Mitchell <mark@codesourcery.com>
1562 * semantics.c (finish_asm_statement): Apply decay conversions to
1565 * decl.c (expand_static_init): When building an anonymous function
1566 for use with atexit, compute its body before and after entering
1569 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
1572 1999-06-18 Mark Mitchell <mark@codesourcery.com>
1574 * init.c (expand_aggr_vbase_init): Add flag parameter.
1575 (build_partial_cleanup_for): Remove, inlining into ..
1576 (expand_cleanup_for_base): ... here. Take flag parameter.
1577 (emit_base_init): Pass the in_chrg parameter to
1578 emit_aggr_vbase_init.
1579 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
1581 1999-06-16 Mark Mitchell <mark@codesourcery.com>
1583 * decl2.c (import_export_decl): Use same_type_p, rather than
1584 relying on pointer-equality for types.
1586 * method.c (do_build_copy_constructor): Simplify.
1588 * call.c (build_method_call): Remove bogus code for two-argument
1590 * init.c (build_new_1): Expand on comment, and remove dead code.
1592 * init.c (expand_cleanup_for_base): New function, split out
1594 (emit_base_init): Here.
1595 (expand_aggr_vbase_init): Use it.
1597 1999-06-15 Mark Mitchell <mark@codesourcery.com>
1599 * cp-tree.h (class_cache_firstobj): Declare.
1600 (maybe_push_cache_obstack): Rename to push_cache_obstack.
1601 * class.c (permanent_obstack): Remove declaration.
1602 (class_cache_firstobj): Make it global.
1603 (add_method): Don't use permanent_obstack directly.
1604 (pushclass): Only free the class_cache_obstack if we know how far
1606 (maybe_push_cache_obstack): Rename to push_cache_obstack.
1607 * decl.c: Remove dead comment.
1608 (saved_scope): Add class_cache_firstobj.
1609 (push_to_top_level): Save it.
1610 (pop_from_top_level): Restore it.
1611 (push_class_level_binding): Use push_cache_obstack, not
1612 maybe_push_cache_obstack.
1613 * search.c (push_class_decls): Likewise.
1615 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
1617 * pt.c (tsubst_friend_function): Push into namespace of friend
1618 function before pushdecl'ing it.
1620 1999-06-14 Nathan Sidwell <nathan@acm.org>
1622 * call.c (build_new_op): Remove REF_BIND from all operands.
1624 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
1626 * init.c (build_new_1): Look up operator delete even if there was
1627 no explicit new placement.
1629 1999-06-08 Nathan Sidwell <nathan@acm.org>
1631 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
1633 (build_throw): ... here. Call it.
1634 (process_start_catch_block): Call it.
1636 1999-06-07 Mark Mitchell <mark@codesourcery.com>
1638 * search.c (convert_pointer_to_single_level): Reimplement without
1641 1999-06-06 Mark Mitchell <mark@codesourcery.com>
1643 * method.c (is_back_referenceable_type): Back-reference bools when
1646 1999-06-07 Dave Brolley <brolley@cygnus.com>
1648 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
1649 * input.c (putback_buffer): New structure type.
1650 (putback): Replaces putback_char member.
1651 (putback): Replaces putback_char static variable.
1652 (feed_input): Use putback.
1653 (end_input): Use putback.
1654 (sub_getch): Use putback.
1655 (put_back): Use putback.
1657 1999-06-05 Mark Mitchell <mark@codesourcery.com>
1659 * decl.c (grokdeclarator): Fix typo in last change.
1661 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
1663 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
1664 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
1666 1999-06-04 Nathan Sidwell <nathan@acm.org>
1668 * except.c (build_throw): Check throw expression validity.
1670 1999-06-03 Mark Mitchell <mark@codesourcery.com>
1672 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
1673 just because flag_signed_bitfields is false.
1675 1999-06-03 Nathan Sidwell <nathan@acm.org>
1677 * semantics.c (begin_class_definition): Update the struct's
1679 * class.c (finish_struct): ... rather than here.
1681 * decl.c (make_typename_type): Don't rely on uninitialized
1684 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1686 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
1688 1999-05-31 Mark Mitchell <mark@codesourcery.com>
1690 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
1691 and friends rather than messing with current_obstack directly.
1692 (cp_build_qualified_type_real): Rework ARRAY_TYPE
1693 allocation to match practice throughout the rest of the
1696 1999-05-30 Mark Mitchell <mark@codesourcery.com>
1698 * lex.c (make_lang_type): Create TYPE_BINFO for
1699 TEMPLATE_TYPE_PARMs just like for non-template types.
1701 * decl.c (start_decl): Move checks on initialization to ...
1702 (cp_finish_decl): Here. Tidy formatting slightly.
1704 1999-05-28 Mark Mitchell <mark@codesourcery.com>
1706 * decl.c (add_binding): Don't complain about a redeclaration of a
1707 semantically identical typedef in a local scope.
1709 1999-05-28 Nathan Sidwell <nathan@acm.org>
1711 * decl.c (complete_array_type): Allocate off same obstack. Fix
1712 DO_DEFAULT comment to match reality.
1714 * friend.c (make_friend_class): Fix diagnostic typo.
1716 1999-05-28 Mark Mitchell <mark@codesourcery.com>
1718 * decl.c (lookup_namespace_name): Handle getting a
1720 (expand_static_init): Don't call pushdecl for implicitly declared
1721 `atexit' used to register destructors.
1723 1999-05-25 Mark Mitchell <mark@codesourcery.com>
1725 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
1728 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
1729 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
1730 by combining TEMPLATE_INFO and LEVEL into a single union.
1731 (DECL_TEMPLATE_INFO): Reformat.
1732 (DECL_SAVED_TREE): Document.
1733 (DECL_TEMPLATE_INJECT): Remove.
1734 * class.c (finish_struct): Remove code to deal with
1735 DECL_TEMPLATE_INJECT.
1737 * decl.c (maybe_process_template_type_declaration): Handle all new
1738 types in templates uniformly.
1739 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
1741 * pt.c (lookup_template_class): Inject template instantiations of
1742 forward-declarations.
1743 (instantiate_class_template): Remove code processing
1744 DECL_TEMPLATE_INJECT.
1746 * pt.c (lookup_template_class): Tweak lookup to find member
1749 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
1751 * semantics.c (finish_asm_stmt): Make strings permanent if they're
1754 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
1756 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
1757 parts of pointer to data member types.
1759 1999-05-24 Mark Mitchell <mark@codesourcery.com>
1761 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
1762 and then make it look like `abort'. Just use `abort' instead.
1764 * typeck.c (build_static_cast): Don't allow static_casts that cast
1766 (casts_away_constness_r): New function.
1767 (casts_away_constness): Likewise.
1769 * decl.c (lookup_tag): Remove code no longer needed after
1770 name-lookup improvements.
1771 * decl2.c (handle_class_head): Make error-recovery more robust.
1772 * friend.c (make_friend_class): Reject templated typename types.
1773 * lex.c (is_global): A template parameter isn't global.
1774 * parse.y (class_head): Robustify.
1775 * parse.c: Regenerated.
1777 1999-05-22 Mark Mitchell <mark@codesourcery.com>
1779 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
1780 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
1782 * cp-tree.h (push_nested_namespace): Declare.
1783 (pop_nested_namespace): Likewise.
1784 * decl.c (push_nested_namespace): New function.
1785 (pop_nested_namespace): Likewise.
1786 * pt.c (instantiate_class_template): Use them.
1788 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
1790 * cp-tree.h (cplus_expand_constant): Declare.
1791 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
1792 converted from one pointer-to-object type to another.
1793 * expr.c (cplus_expand_constant): Don't make it static.
1794 * typeck.c (build_component_ref): Don't crash when presented with
1795 a component which is a TEMPLATE_DECL.
1796 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
1797 cast from a pointer-to-member constant to its own type does not
1798 result in a valid non-type template argument.
1800 1999-05-21 Mark Mitchell <mark@codesourcery.com>
1801 Nathan Sidwell <nathan@acm.org>
1803 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
1804 * cp-tree.h: Fix typo in documentation on pointers-to-members.
1805 (cp_build_qualified_type): Make it a macro.
1806 (cp_build_qualified_type_real): Declare.
1807 * decl.c (grokdeclarator): Remove misleading comment. Avoid
1808 problem with template parameters and restrict-qualification.
1809 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
1810 * hash.h: Regenerated.
1811 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
1813 (NORID): Remove definition.
1814 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
1815 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
1816 (fn_type_unification): Check that the function type resulting from
1817 the deduction is legal.
1818 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
1819 (unify): Use cp_build_qualified_type_real.
1820 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
1821 (cp_build_qualified_type): Rename to ...
1822 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
1823 and modify appropriately.
1825 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
1826 reveal optimization opportunities.
1828 * pt.c (tsubst): Don't issue error messages when we're not
1829 complaining, even if we see a qualified function type.
1830 (check_cv_quals_for_unify): Don't allow a qualified function
1833 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
1835 * class.c (instantiate_type): Downgrade errors for object-dependent
1836 memfn refs to pedwarn.
1838 1999-05-20 Mark Mitchell <mark@codesourcery.com>
1840 * decl.c (grokdeclarator): Don't treat [] as indicating a
1841 zero-sized array in a typedef.
1843 * call.c (build_object_call): Don't look at DECL_NAME for a type.
1844 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
1845 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
1847 * pt.c (for_each_template_parm): Rework to match documentation.
1848 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
1850 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
1852 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
1854 * class.c (finish_base_struct): Allow non-COM bases for COM classes
1855 except at the leftmost position.
1856 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
1857 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
1858 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
1860 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
1861 (build_cplus_new): Make sure that what we return is of the right type.
1863 1999-05-20 Mark Mitchell <mark@codesourcery.com>
1865 * cp-tree.h (make_ptrmem_cst): New function.
1866 * expr.c (cplus_expand_constant): Split out from ...
1867 (cplus_expand_expr): Here. Use cplus_expand_constant.
1868 (init_cplus_expand): Set lang_expand_constant.
1869 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
1871 * tree.c (make_ptrmem_cst): Define.
1872 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
1873 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
1875 1999-05-19 Mark Mitchell <mark@codesourcery.com>
1877 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
1879 * decl2.c (start_static_storage_duration_function): Fix comment.
1880 (finish_file): Create static storage duration functions lazily.
1882 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
1884 Implement anonymous structs.
1885 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
1886 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
1887 * class.c (finish_struct_1): Remove redundant check for anon struct.
1888 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
1889 (check_tag_decl): Check for anonymous struct here.
1890 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
1891 * init.c (sort_member_init, emit_base_init): Handle getting fields
1892 as well as names in current_member_init_list.
1893 (perform_member_init): Handle getting an anon aggr.
1894 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
1895 (do_build_copy_constructor): Likewise.
1897 1999-05-19 Mark Mitchell <mark@codesourcery.com>
1899 * tree.c (cp_build_qualified_type): Don't allow qualified function
1902 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
1904 * gxxint.texi: Fix typo.
1906 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
1908 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
1909 * class.c (finish_struct_1): Use CLASS_TYPE_P.
1910 * ptree.c (print_lang_type): Likewise.
1911 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
1913 * typeck2.c (digest_init): Likewise.
1915 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
1917 * call.c (joust): Compare the types of the conv ops, not the
1918 target types of the conversions.
1920 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
1922 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
1925 1999-05-17 Mark Mitchell <mark@codesourcery.com>
1927 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
1928 * decl.c (grokfndecl): Don't allow inline declarations of friend
1929 template specializations, or friend template specializations with
1931 * pt.c (tsubst): Handle substitution into array types that does
1932 not yield a fixed upper bound, even when not processing a
1934 (tsubst_copy): Deal with the fact that the second operand to a
1935 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
1936 * search.c (marked_pushdecls_p): Don't descend into
1937 TEMPLATE_TYPE_PARMs and the like.
1938 (unmarked_pushdecls_p): Likewise.
1940 * call.c (build_over_call): Don't throw away
1941 initializations/copies of empty classes; use MODIFY_EXPR and
1942 INIT_EXPR as for non-empty classes.
1943 * class.c (finish_struct_1): Put the padding byte for an empty
1944 class on the TYPE_NONCOPIED_PARTS list for the class.
1946 1999-05-16 Mark Mitchell <mark@codesourcery.com>
1948 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
1949 indicate a reference to a field that is a qualified name.
1951 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
1953 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
1954 ASM_OUTPUT_CONSTRUCTOR.
1956 * friend.c (do_friend): Add attrlist arg. Remove support for
1957 getting a non-decl as 'decl'.
1958 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
1960 (grokdeclarator): Adjust.
1961 * cp-tree.h: Adjust.
1963 1999-05-16 Mark Mitchell <mark@codesourcery.com>
1965 * cp-tree.h (permanent_p): New function.
1966 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
1967 possibly complex tree node.
1968 * tree.c (mapcar): Adjust comments, and follow coding standards in
1970 (permanent_p): New function.
1972 1999-05-13 Per Bothner <bothner@cygnus.com>
1974 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
1975 primitive Java types, if we actually see `extern "Java"'.
1977 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1979 * lang-specs.h: Pass -$ to the preprocessor.
1981 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
1983 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
1984 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
1985 (resolve_offset_ref): Don't handle a raw baselink.
1986 * cvt.c (build_expr_type_conversion): Likewise.
1987 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
1988 convert_for_initialization): Likewise.
1989 * class.c (instantiate_type): Handle seeing a baselink under an
1991 * error.c (dump_expr): Likewise.
1992 * pt.c (for_each_template_parm): Likewise.
1993 (resolve_overloaded_unification): Likewise.
1994 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
1995 * typeck.c (expr_sizeof): Also complain about other permutations
1996 of overloaded functions.
1998 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
2000 * init.c (resolve_offset_ref): Don't return a raw method.
2002 * typeck.c (decay_conversion): Don't handle a raw method.
2003 Resolve all OFFSET_REFs.
2004 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
2005 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
2006 same_type_p for pmf bits. Don't use build_binary_op to compare
2007 raw pointers to methods.
2008 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
2009 to decide when to call resolve_offset_ref.
2010 (build_c_cast, convert_for_initialization): Likewise.
2011 * cvt.c (build_expr_type_conversion): Likewise.
2013 1999-05-06 Nathan Sidwell <nathan@acm.org>
2015 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
2017 1999-05-05 Mark Mitchell <mark@codesourcery.com>
2019 * decl2.c (start_objects): Don't let static constructors and
2020 destructors get inlined.
2022 * parse.y (nested_name_specifier): Make sure ordinary types are
2023 complete, just like template types.
2024 * parse.c: Regenerated.
2026 * pt.c (check_explicit_specialization): Improve error messages.
2028 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
2030 * typeck.c (string_conv_p): Use same_type_p to check whether we
2031 try to convert between char and wchar_t.
2033 1999-05-03 Mark Mitchell <mark@codesourcery.com>
2035 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
2036 lookup to error_mark_node here.
2037 (lookup_member): Revise documentation. Add comments. Don't set
2038 the TREE_TYPE to error_mark_node here, and don't build up an extra
2039 TREE_LIST for ambiguous lookups.
2040 (setup_class_bindings): Adjust accordingly.
2041 (push_class_decls): Revise out-of-date comments.
2043 * typeck.c (build_const_cast): Tighten checks for legality.
2045 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
2047 * init.c (build_member_call): Lookup names coming from
2048 namespace-scoped LOOKUP_EXPR.
2050 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
2052 * gxxint.texi: Add documentation for 'I'.
2054 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
2056 * tinfo.cc (operator==): Qualify type_info with std::.
2058 1999-05-02 Mark Mitchell <mark@codesourcery.com>
2060 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
2061 (DECL_COMDAT): Remove definition.
2063 1999-05-01 Mark Mitchell <mark@codesourcery.com>
2065 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
2068 1999-04-30 Mark Mitchell <mark@codesourcery.com>
2070 * class.c (build_vtable): Use build_lang_decl when building
2071 vtables, not just build_decl.
2072 (prepare_fresh_vtable): Likewise.
2073 * decl.c (wrapup_globals_for_namespace): Mark vtables as
2074 DECL_EXTERNAL when calling wrapup_global_declarations.
2075 * decl2.c (priority_info_s): Add initializations_p and
2076 destructions_p members.
2077 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
2078 when deciding what vtables to write out.
2079 (ssdf_decls): New variable.
2080 (ssdf_decls_used): Likewise.
2081 (start_static_storage_duration_function): Deal with being called
2082 multiple times. Avoid inlining this function.
2083 (generate_inits_for_priority): Deal with reuse of priority map.
2084 (get_priority_info): Clear initializations_p and destructions_p.
2085 (do_static_initialization): Tweak comment.
2086 (do_static_destruction): Likewise. Fix condition on sentries for
2088 (generate_ctor_or_dtor_function): Call all of the static storage
2090 (generate_ctor_or_dtor_function_for_priority): Check
2091 initializations_p and destructions_p to see what priorities need
2092 initialization functions.
2093 (finish_file): Rework to generate multiple static storage duration
2094 functions, rather than just one.
2096 * typeck.c (build_const_cast): Tweak last change to handle
2097 templates correctly.
2099 * typeck.c (build_const_cast): Disallow use of const_cast to
2100 anything but a pointer or reference type.
2102 1999-04-30 Nathan Sidwell <nathan@acm.org>
2104 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
2107 1999-04-29 Mark Mitchell <mark@codesourcery.com>
2109 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
2110 (finish_file): Indent comments properly.
2112 1999-04-29 Richard Henderson <rth@cygnus.com>
2114 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
2115 (do_static_destruction): Likewise.
2117 1999-04-29 Nathan Sidwell <nathan@acm.org>
2119 * cp-tree.h (TYPE_NOTHROW_P): New macro.
2120 * decl2.c (delete_sanity): Warn on deleting void *.
2121 * init.c (build_new_1): Use TYPE_NOTHROW_P.
2122 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
2123 throwing operator new.
2125 1999-04-28 Nathan Sidwell <nathan@acm.org>
2127 * cp-tree.h (build_component_addr): Remove prototype.
2128 * typeck.c (build_component_addr): Make static. Remove MSG
2130 (build_component_addr): Remove MSG parameter, clean up
2132 (build_x_function_call): Use cp_error.
2133 (build_unary_op): Adjust call of build_component_addr.
2135 1999-04-28 Mark Mitchell <mark@codesourcery.com>
2137 * pt.c (tsubst_friend_class): Check for NULL.
2139 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2141 * search.c (binfo_for_vtable): Initialize bfvi.var.
2143 1999-04-27 Nathan Sidwell <nathan@acm.org>
2145 * rtti.c (build_x_typeid): Check rtti is enabled.
2147 1999-04-26 Mark Mitchell <mark@codesourcery.com>
2149 * search.c (is_subobject_of_p): Make sure we're looking at the
2152 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
2154 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
2156 1999-04-23 Mark Mitchell <mark@codesourcery.com>
2158 * decl2.c (finish_file): Tweak handling of extern inlines so that
2159 they are not unnecessarily put out.
2161 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
2162 such as base classes.
2164 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
2166 * tree.c (build_exception_variant): Fix typo: use the chain of U,
2167 not trying V, while cycling through U.
2169 1999-04-22 Mark Mitchell <mark@codesourcery.com>
2171 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
2172 preserves_first_arg. Enlarge dummy accordingly.
2173 (DECL_TINFO_FN_P): New macro.
2174 (SET_DECL_TINFO_FN_P): Likeiwse.
2175 (DECL_RETURNS_FIRST_ARG): Remove.
2176 (DECL_PRESERVES_THIS): Likewise.
2177 (DECL_INIT_PRIORITY): New macro.
2178 (finish_struct_1): Change prototype.
2179 (cat_namespace_levels): Remove prototype.
2180 (vtable_decl_p): New prototype.
2181 (vtype_decl_p): Likewise.
2182 (sigtable_decl_p): Likewise.
2183 (walk_globals_pred): New typedef.
2184 (walk_globals_fn): Likewise.
2185 (walk_globals): New prototype.
2186 (walk_namespaces_fn): New typedef.
2187 (walk_namespaces): New prototype.
2188 (wrapup_globals_for_namespace): Likewise.
2189 (walk_vtables): Remove prototype.
2190 (walk_sigtables): Likewise.
2191 (instantiate_pending_templates): New prototype.
2192 * class.c (finish_struct_1): Don't return a value.
2193 * decl.h (pending_statics): Remove declaration.
2194 * decl.c (walk_namespaces_r): New function.
2195 (walk_globals_r): Likewise.
2196 (vtable_decl_p): Likewise.
2197 (vtype_decl_p): Likewise.
2198 (sigtable_decl_p): Likewise.
2199 (walk_namespaces): Likewise.
2200 (walk_globals_data): New type.
2201 (walk_globals): New function.
2202 (wrapup_globals_for_namespace): Likewise.
2203 (expand_static_init): Remove assertion. Remove redundancy in
2204 conditional. Don't put static data members in static_aggregates
2206 (finish_function): Remove redundancy in conditional. Don't set
2207 DECL_RETURNS_FIRST_ARG.
2208 (cat_namespace_levels): Remove.
2209 * decl2.c: Include splay-tree.h and varray.h.
2210 (priority_info_s): New structure.
2211 (finish_vtable_vardecl): Change prototype. Adjust for new calling
2213 (prune_vtable_vardecl): Likewise.
2214 (finish_sigtable_vardecl): Likewise.
2215 (setup_initp): Remove.
2218 (start_static_storage_duration_function): New function.
2219 (generate_inits_for_priority): Likewise.
2220 (finish_static_storage_duration_function): Likewise.
2221 (get_priority_info): Likewise.
2222 (do_static_initialization): Likewise.
2223 (do_static_destruction): Likewise.
2224 (do_static_initialization_and_destruction): Likewise.
2225 (generate_ctor_or_dtor_function): Likewise.
2226 (generate_ctor_and_dtor_functions_for_priority): Likewise.
2227 (pending_statics): Make it a varray.
2228 (pending_statics_used): New variable.
2229 (saved_inlines): Make it a varray.
2230 (saved_inlines_used): New variable.
2231 (finish_static_data_member): Change method of updating
2233 (mark_inline_for_output): Remove #if 0'd code. Change method of
2234 updating saved_inlines.
2235 (walk_vtables): Remove.
2236 (walk_sigtables): Likewise.
2237 (import_export_decl): Use DECL_TINFO_FN_P.
2238 (pending_templates): Remove declaration.
2239 (maybe_templates): Likewise.
2240 (static_aggregates_initp): Likewise.
2241 (setup_initp): Likewise.
2242 (finish_objects): Simplify.
2243 (INITIALIZE_P_IDENTIFIER): New macro.
2244 (PRIORITY_IDENTIFIER): New macro.
2245 (SSDF_IDENTIFIER): New macro.
2246 (initialize_p_decl): New variable.
2247 (priority_decl): Likewise.
2248 (ssdf_decl): Likewise.
2249 (priority_info_map): Likewise.
2250 (finish_file): Recode output of static intializers and other
2251 file-scope finalization tasks.
2252 * error.c (OB_END_TEMPLATE_ID): New macro.
2253 (dump_type_real): Use it.
2254 (dump_decl): Likewise.
2255 (dump_function_name): Likewise.
2256 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
2258 (check_newline): Use walk_globals, not walk_vtables.
2259 * pt.c (pending_tempalte_expansions): Remove.
2260 (set_vardecl_interface_info): Likewise.
2261 (pending_templates): Make static.
2262 (maybe_templates): Likewise.
2263 (instantiate_class_template): Adjust call to finish_struct_1.
2264 (instantiate_pending_templates): New function.
2265 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
2266 * tree.c (static_aggregates_initp): Remove.
2267 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
2269 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
2271 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
2272 with the RTL code RETURN.
2273 * hash.h: Regenerated.
2274 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
2275 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
2276 * parse.c: Regenerated.
2277 * pt.c: Include varray.h. Include rtl.h since varray.h requires
2279 (inline_parm_levels): New variable.
2280 (inline_parm_levels_used): Likewise.
2281 (maybe_begin_member_template_processing): Update them.
2282 (maybe_end_member_template_processing): Use them, rather than
2283 guessing how many levels to pop.
2285 * decl.c (make_typename_type): Tighten error-checking.
2287 1999-04-20 Mark Mitchell <mark@codesourcery.com>
2289 * cp-tree.h (build_binary_op): Remove unneeded parameter.
2290 * class.c (build_vrable_entry_ref): Adjust call to
2292 * decl.c (expand_static_init): Likewise.
2293 (grokdeclarator): Likewise.
2294 (finish_function): Likewise.
2295 * decl2.c (delete_sanity): Likewise.
2296 (do_dtors): Likewise.
2297 (do_ctors): Likewise.
2298 * error.c (dump_type_suffix): Likewise.
2299 * expr.c (cplus_expand_expr): Likewise.
2300 * init.c (resolve_offset_ref): Likewise.
2301 (build_new): Likewise.
2302 (build_new_1): Likewise.
2303 (build_vec_delete_1): Likewise.
2304 (expand_vec_init_catch_clause): Likewise.
2305 (build_delete): Likewise.
2306 * pt.c (tsubst): Likewise.
2307 * rtti.c (synthesize_tinfo_fn): Likewise.
2308 * search.c (expand_upcast_fixups): Likewise.
2309 (expand_direct_vtbls_init): Likewise.
2310 * typeck.c (get_member_function_from_ptrfunc): Likewise.
2311 (build_binary_op_nodefault): Likewise.
2312 (point_int_sum): Likewise.
2313 (pointer_diff): Likewise.
2314 (build_unary_op): Likewise.
2315 (build_modify_expr): Likewise.
2316 (get_delta_difference): Likewise.
2317 (build_ptrmemfunc): Likewise.
2318 (expand_ptrmemfunc_cst): Likewise.
2320 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
2322 * decl.c (grokfndecl): Always call cplus_decl_attributes.
2323 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
2325 1999-04-19 Mark Mitchell <mark@codesourcery.com>
2327 * cp-tree.h (finish_static_data_member_decl): New function.
2328 * decl2.c (finish_static_data_member_decl): Split out from ...
2330 * pt.c (instantiate_class_template): Use it here instead of
2332 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
2333 finish_static_data_member_decl will do that. Explicit set
2334 DECL_EXTERNAL to match non-template processing.
2336 1999-04-18 Mark Mitchell <mark@codesourcery.com>
2338 * cp-tree.h (finish_class_definition): Add parameter.
2339 * parse.y (structsp): Use it. Don't call pop_scope here.
2340 * parse.c: Regenerated.
2341 * semantics.c (finish_class_definition): Pop it here.
2343 1999-04-17 Mark Mitchell <mark@codesourcery.com>
2345 * decl.c (xref_tag): Revise handling of nested template
2347 * pt.c (check_explicit_specialization): Tweak handling of friend
2348 templates in template classes.
2349 (tsubst_friend_class): Handle friend declarations for nested
2350 member template classes.
2352 1999-04-16 Mark Mitchell <mark@codesourcery.com>
2354 * class.c (finish_struct): Remove unused variable.
2355 (pushclass): Likewise.
2356 (invalidate_class_lookup_cache): Likewise.
2357 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
2358 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
2359 doesn't get obliterated.
2360 (make_typename_type): Handle template classes correctly.
2362 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
2363 (storetags): Declare.
2364 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
2365 (pushclass): Likewise. Use storetags to install tag declarations,
2367 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
2368 * decl.c (storetags): Make it global.
2369 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
2370 implicit typename declaration.
2371 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
2372 * method.c (hack_identifier): Likewise.
2373 * search.c (lookup_member): Likewise.
2375 * decl.c (warn_about_implicit_typename_lookup): New function.
2376 (lookup_name_real): Use it. Rework handling of implicit typename
2379 1999-04-15 Mark Mitchell <mark@codesourcery.com>
2381 * cp-tree.h (lookup_nested_field): Remove.
2382 * class.c (push_nested_class): Handle UNION_TYPEs.
2383 (pop_nested_class): Likewise.
2384 * decl.c (lookup_name_real): Don't call lookup_nested_field.
2385 (start_decl): Use push_nested_class, not just pushclass.
2386 (cp_finish_decl): Use pop_nested_class, not just popclass.
2387 * search.c (lookup_nested_field): Remove.
2389 * cp-tree.h (lang_type): Add documentation.
2390 * decl2.c (handle_class_head): Create template declarations here,
2392 * parse.y (class_head): Return whether or not we entered a new
2393 scope, as well as the type named.
2394 (named_class_head): Likewise.
2395 (named_complex_class_head_sans_basetype): Likewise.
2396 (structsp): Adjust accordingly. Pop scope when required.
2397 * parse.c: Regenerated.
2398 * pt.c (check_default_tmpl_args): Robustify.
2399 (redeclare_class_template): Likewise.
2400 (instantiate_class_template): An instantiation of an
2401 anonymous union is itself an anonymous union.
2402 * semantics.c (begin_class_definition): Don't create template
2405 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
2407 * parse.y (after_type_declarator_intern): New nonterminal.
2408 (after_type_declarator): Use it.
2409 (direct_after_type_declarator): Likewise. Move above
2410 nonnested_type to fix reduce/reduce conflict resolution.
2411 (declmods): Reducing from just 'attributes' has EMPTY precedence.
2412 * Makefile.in (CONFLICTS): Update.
2414 * decl.c (define_label): Downgrade error for jumping over a
2415 non-POD decl to pedwarn.
2417 1999-04-14 Mark Mitchell <mark@codesourcery.com>
2419 * cp-tree.h (popclass): Change declaration.
2420 (pop_nested_class): Likewise.
2421 (poplevel_class): Remove declaration.
2422 * call.c (convert_default_argument): Pass no arguments to
2424 * class.c (finish_struct_1): Likewise.
2425 (finish_struct): Likewise.
2426 (popclass): Remove argument. Simplify code accordingly.
2427 (pop_nested_class): Likewise.
2428 * decl.c (poplevel_class): Declare it here, and make it static.
2429 (poplevel): Handle class scopes.
2430 (poplevel_class): Don't take an rgument. Simplify.
2431 (pop_everything): Pass no arguments to pop_nested_class.
2432 (cp_finish_decl): Pass no arguments to popclass.
2433 (grokdeclarator): Pass no arguments to pop_nested_class.
2434 (finish_function): Likewise.
2435 * decl2.c (grokfield): Likewise.
2436 (pop_scope): Pass no arguments to popclass.
2437 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
2438 * pt.c (instantiate_class_template): Move call to pushclass, and
2439 document. Pass no arguments to popclass.
2440 (regenerate_decl_from_template): Likewise.
2442 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
2444 * typeck.c (build_unary_op): Handle taking the address of a unique
2445 bound non-static member function.
2447 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
2449 * lang-options.h (-Wdeprecated): New flag.
2450 * decl2.c (warn_deprecated): New flag.
2451 (lang_decode_option): Deprecated this-is-variable,
2452 external-templates, alt-external-templates.
2453 Support -Wdeprecated.
2454 * errfn.c (cp_deprecated): New function.
2456 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
2458 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
2459 of the decls themselves.
2461 * pt.c (tsubst_function_type): Copy attributes over.
2463 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
2465 * cp-tree.h: Add prototype.
2466 * decl.c (init_decl_processing): Set valid_lang_attribute.
2468 1999-04-13 Mark Mitchell <mark@codesourcery.com>
2470 * class.c (finish_struct_1): Look at the const-ness of the field's
2471 type, not the TREE_READONLY-ness of the declaration.
2472 * method.c (synthesize_method): Likewise.
2473 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
2474 creating new declarations.
2476 1999-04-13 Mike Stump <mrs@wrs.com>
2478 * decl2.c (import_export_decl): Because vtables always reference
2479 virtual functions, even if they are inlined, don't allow
2480 -fno-implement-inlines to not emit them, instead, emit them with
2482 * decl.c (start_function): Likewise.
2484 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
2486 * cp-tree.h (struct lang_type): Add com_interface.
2487 (CLASSTYPE_COM_INTERFACE): New macro.
2488 * class.c (set_rtti_entry): COM interface classes have no RTTI
2489 entries in their vtables; adjust.
2490 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
2491 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
2492 finish_struct_1): Likewise.
2493 * decl2.c (mark_vtable_entries): Likewise.
2494 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
2495 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
2496 expand_upcast_fixups): Likewise.
2497 * tree.c (debug_binfo): Likewise.
2499 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
2500 * typeck.c (comptypes): If we get it, ignore attributes.
2501 * class.c (instantiate_type): Use BASELINK_P. Change complain
2502 parameter to flags; 2 means ignore attributes.
2503 * call.c (build_op_delete_call): Pass it.
2505 * decl.c (xref_tag): Only complain once about using a typedef-name
2506 with 'struct'. Downgrade to pedwarn.
2508 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
2510 * parse.y (absdcl_intern): New nonterminal.
2511 (absdcl, direct_abstract_declarator): Use it.
2513 * pt.c (lookup_template_class): Look through implict typename.
2515 1999-04-11 Mark Mitchell <mark@codesourcery.com>
2517 * friend.c (add_friend): Deal gracefully with error_mark_node.
2518 * method.c (build_overload_value): Handle pointers-to-members as
2519 template parameters.
2521 * decl.c (push_binding): Fix typo in comment.
2523 1999-04-10 Mark Mitchell <mark@codesourcery.com>
2525 * error.c (dump_type_real): If a typename is a template-id, put
2526 out the template arguments.
2527 (dump_expr): Handle TEMPLATE_ID_EXPR.
2528 * pt.c (lookup_template_class): Now that full arguments are
2529 available everywhere, remove code that tried to guess them.
2531 1999-04-09 Mark Mitchell <mark@codesourcery.com>
2533 * decl.c (make_typename_type): Complain if we don't find a type
2534 when trying to make a typename type for a non-template type.
2536 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
2538 * decl.c (start_decl): Pass attributes to grokdeclarator.
2539 (grokdeclarator): Handle attributes on constructor-syntax
2542 1999-04-08 Mark Mitchell <mark@codesourcery.com>
2544 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
2547 * search.c (template_self_reference_p): Tweak.
2549 1999-04-07 Mark Mitchell <mark@codesourcery.com>
2551 * init.c (build_offset_ref): Don't build yet another weird data
2552 structure to describe overloaded functions.
2554 1999-04-06 Mark Mitchell <mark@codesourcery.com>
2556 * cp-tree.h (BASELINK_P): New macro.
2557 (SET_BASELINK_P): Likewise.
2558 * init.c (build_member_call): Remove needless assignment in if
2560 * search.c (lookup_field_r): Fix handling when we are looking
2561 specifically for a type; these are not hidden by functions and
2563 (lookup_member): Use SET_BASELINK_P.
2564 * tree.c (is_overloaded_fn): Use BASELINK_P.
2565 (really_overloaed_fn): Likewise.
2566 (get_first_fn): Likewise.
2568 1999-04-05 Mark Mitchell <mark@codesourcery.com>
2570 * decl.c (lookup_name_current_level): Tweak, and improve
2573 * class.c (maybe_fixup_vptrs): Remove declaration.
2574 (build_class_init_list): Likewise.
2575 * decl.c (pushdecl_class_level): Call check_template_shadow here
2577 (push_class_level_binding): ... not here.
2578 * search.c (dfs_push_type_decls): Only avoid
2579 template-self-reference TYPE_DECLs if they are from base classes.
2581 1999-04-04 Mark Mitchell <mark@codesourcery.com>
2583 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
2586 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
2588 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
2589 (finish_struct_1): Don't call build_class_init_list.
2591 1999-04-02 Mark Mitchell <mark@codesourcery.com>
2593 * tinfo.h (__class_type_info): Fix illegal declaration.
2595 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
2596 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
2597 (IDENTIFIER_CLASS_VALUE): Improve documentation.
2598 (is_properly_derived_from): Declare.
2599 (invalidate_class_lookup_cache): Likewise.
2600 (maybe_maybe_note_name_used_in_class): Likewise.
2601 (note_name_declared_in_class): Likewise.
2602 (push_using_decl): Remove duplicate declaration.
2603 (id_in_current_class): Remove declaration.
2604 (push_class_binding): Change prototype.
2605 (clear_identitifer_class_values): Declare.
2606 * call.c (is_properly_derived_from): Make it global.
2607 (build_new_function_call): Be careful about updating candidates.
2608 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
2609 asked to make illegal calls.
2610 * class.c: Include splay-tree.h.
2611 (class_stack_node): Add names_used slot.
2612 (check_member_decl_is_same_in_complete_scope): Remove.
2613 (add_method): Fix comment. Push the declaration into class
2615 (finish_struct_1): When popping the class, pop the bindings too.
2616 Remove check for data member/function member conflict.
2617 (finish_struct): Remove calls to
2618 check_member_decl_is_same_in_complete_scope. Change calls to
2620 (pushclass): Clear names_used in the class stack entry.
2621 Use invalidate_class_lookup_cache to remove cached entries, rather
2622 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
2623 before entering a new class. Remove dead code. Don't mess with
2624 current_function_decl when pushing declarations.
2625 (invalidate_class_lookup_cache): New function, split out from ...
2626 (popclass): Here. Clean up names_used on our way out.
2627 (instantiate_type): Adjust.
2628 (build_self_reference): Don't push the declaration here.
2629 (maybe_note_name_used_in_class): New function.
2630 (note_name_declared_in_class): Likewise.
2631 * decl.c (add_binding): Change prototype.
2632 (find_class_binding_level): New function.
2633 (innermost_nonclass_level): Likewise.
2634 (current_binding_level): Update documentation.
2635 (inner_binding_level): Remove. Replace with current_binding_level
2637 (push_binding_level): Remove special handling of
2638 class_binding_level.
2639 (pop_binding_level): Likewise. Use find_class_binding_level.
2640 (suspend_binding_level): Likewise.
2641 (global_bindings_p): Use innermost_nonclass_level.
2642 (toplevel_bindings_p): Likewise.
2643 (namespace_bindings_p): Likewise.
2644 (pseudo_global_level_p): Likewise.
2645 (push_binding): Clear INHERITED_VALUE_BINDING_P.
2646 (add_binding): Check for illegal multiple declarations. Return a
2647 value indicating whether or not the new binding was legal.
2648 (push_local_binding): Skip over class binding levels. Check
2649 return value from add_binding.
2650 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
2651 note_name_declared_in_class.
2652 (pushlevel_class): Remove "fake out the rest of the compiler"
2654 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
2655 (clear_identifier_class_values): New function.
2656 (pop_from_top_level): Use it.
2657 (pop_everything): Tweak.
2658 (maybe_process_template_type_declaration): Don't push the
2659 declaration for the template here.
2660 (pushtag): Don't push tag declarations into class scope here.
2661 (pushdecl): Apply DeMorgan's law for readability.
2662 (pushdecl_class_level): Remove special-case code for
2663 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
2664 (push_class_level_bindng): Deal with inherited bindings.
2665 (lookup_name_real): Remove special-case code for
2666 TYPE_BEING_DEFINED, and some implicit typename magic.
2667 (grokdeclarator): Handle COMPONENT_REF for a template function.
2668 (build_enumerator): Don't call pushdecl_class_level here.
2669 (id_in_current_class): Remove.
2670 * decl2.c (grokfield): Don't call pushdecl_class_level or
2671 check_template_shadow.
2672 * errfn.c (cp_file_of): Don't declare.
2673 (cp_line_of): Likewise.
2674 * error.c (dump_decl): Handle an OVERLOAD.
2675 (cp_file_of): Likewise.
2676 (cp_line_of): Likewise.
2677 * init.c (build_member_call): Handle a COMPONENT_REF.
2678 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
2679 pushdecl_class_level.
2680 * method.c (hack_identifier): Build COMPONENT_REFs for references
2681 to member templates as well as member functions. Remove dead
2683 * parse.y (left_curly): Remove.
2684 (nonnested_type): Call maybe_note_name_used_in_class, not
2685 pushdecl_class_level.
2686 * parse.c: Regenerated.
2687 (nested_name_specifier_1): Likewise.
2688 * pt.c (check_explicit_specialization): Adjust, for robustness.
2689 (check_template_shadow): Handle OVERLOADs.
2690 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
2691 TEMPLATE_DECL, if appropriate.
2692 * search.c (envelope_add_decl): Remove.
2693 (dfs_pushdecls): Likewise.
2694 (dfs_compress_decls): Likewise.
2695 (dfs_push_decls): New function.
2696 (dfs_push_type_decls): Likewise.
2697 (setup_class_bindings): Likewise.
2698 (template_self_reference_p): Likewise.
2699 (lookup_field_r): Use it.
2700 (looup_member): Remove old comment. Deal with ambiguity.
2701 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
2702 and remove envelope processing.
2703 * semantics.c (begin_class_definition): Let pushclass push
2704 declarations for base classes.
2705 (finish_member_declaration): Push declarations into class scope.
2706 * typeck.c (build_component_ref): Just put an OVERLOAD into the
2707 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
2708 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
2709 * Makefile.in (class.o): Depend on splay-tree.h.
2711 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
2713 * cvt.c (convert_pointer_to_real): Use same_type_p.
2714 * typeck.c (comp_target_types): Use same_type_p.
2716 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
2718 * semantics.c (begin_inline_definitions,
2719 finish_inline_definitions): Rename from finish_default_args and
2720 begin_inline_definitions, respectively, to something that isn't a
2722 * parse.y (structsp): Adjust.
2724 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
2725 (list_hash_lookup): Likewise.
2726 (hash_tree_chain): Adjust.
2727 * pt.c (tsubst): Adjust.
2728 (tsubst_arg_types): Use plain hash_tree_cons.
2729 * cp-tree.h (hash_tree_cons_simple): Lose.
2730 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
2732 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2734 * Makefile.in (hash.h): Generate using gperf language 'C', not
2735 'KR-C', so gperf uses the `const' keyword on strings.
2737 * gxx.gperf (resword): Const-ify a char*.
2739 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
2741 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
2742 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
2743 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
2744 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
2745 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
2746 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
2749 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
2751 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
2753 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
2755 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
2757 1999-03-27 Mark Mitchell <mark@codesourcery.com>
2759 * cp-tree.h (add_friend): Declare.
2760 (add_friends): Likewise.
2761 * friend.c (add_friend): Make it global. Don't add to
2762 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
2763 (add_friends): Make it global.
2764 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
2765 befriending class is a template.
2766 * parse.y (component_decl_1): Fix typo in comment.
2767 * parse.c: Regenerated.
2768 * pt.c (instantiate_class_template): Use add_friend and
2769 add_friends rather that duplicating some of their functionality
2772 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
2774 * call.c (build_field_call): Unify 'this' and non-'this' cases.
2776 * typeck.c (build_indirect_ref): Check for 'this' sooner.
2778 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2780 * call.c (op_error): Const-ify a char*.
2781 (add_candidate, source_type, add_warning): Add static prototype.
2782 (print_z_candidates): Const-ify a char*.
2784 * class.c (resolve_address_of_overloaded_function,
2785 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
2786 (get_vtable_name, finish_struct_1): Const-ify a char*.
2788 * cvt.c (convert_to_reference): Likewise.
2790 * decl.c (redeclaration_error_message, record_builtin_type,
2791 record_unknown_type, member_function_or_else, bad_specifiers):
2793 (find_binding, select_decl, unqualified_namespace_lookup,
2794 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
2795 Add static prototype.
2796 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
2797 implicitly_declare, record_builtin_java_type, define_function,
2798 grok_op_properties, tag_name): Const-ify a char*.
2800 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
2801 (define_function, finish_builtin_type): Const-ify a char*.
2802 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
2803 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
2804 (file_name_nondirectory): Const-ify a char*.
2805 (init_filename_times): Don't prototype.
2806 (compiler_error): Prototype.
2807 (yyerror, init_repo): Const-ify a char*.
2808 (build_srcloc): Don't prototype.
2809 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
2811 (warn_for_assignment): Don't prototype.
2812 (convert_for_initialization, readonly_error, check_for_new_type,
2813 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
2816 * decl2.c (acceptable_java_type, output_vtable_inherit,
2817 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
2818 merge_functions, decl_namespace, validate_nonmember_using_decl,
2819 do_nonmember_using_decl): Add static prototype.
2820 (lang_f_options): Const-ify a char*.
2821 (finish_builtin_type): Likewise.
2822 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
2825 * errfn.c: Include cp-tree.h.
2826 (cp_thing): Add static prototype.
2827 (compiler_error): Don't protoptype.
2828 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
2829 passing it to `cp_thing'.
2831 * error.c (interesting_scope_p): Add static prototype.
2833 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
2836 * init.c (compiler_error): Don't prototype.
2837 (member_init_ok_or_else): Const-ify a char*.
2838 (build_java_class_ref): Add static prototype.
2840 * lex.c (compiler_error): Don't prototype.
2841 (get_time_identifier, interface_strcmp, extend_token_buffer,
2842 handle_cp_pragma): Const-ify a char*.
2843 (is_global, init_filename_times): Add static prototype.
2844 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
2845 (compiler_error): Change from fixed args to variable args.
2846 (yyerror): Const-ify a char*.
2848 * parse.y (cond_stmt_keyword): Const-ify a char*.
2849 (parse_decl): Add static prototype.
2851 * pt.c (template_args_equal, print_template_context): Likewise.
2852 (print_candidates, check_default_tmpl_args): Const-ify a char*.
2853 (instantiate_class_template): Likewise.
2855 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
2857 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
2858 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
2860 * search.c (lookup_field_info, lookup_member): Likewise.
2861 (lookup_member): Cast the first argument of `bzero' to a PTR.
2863 * sig.c (compiler_error): Don't prototype.
2864 (build_signature_pointer_or_reference_nam): Const-ify a char*.
2865 (get_sigtable_name, build_member_function_pointer): Likewise.
2867 * tree.c (compiler_error): Don't prototype.
2868 (no_linkage_helper, build_srcloc): Add static prototype.
2869 (build_vbase_pointer_fields): Const-ify a char*.
2870 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
2872 * typeck.c (compiler_error): Don't prototype.
2873 (convert_for_assignment): Const-ify a char*.
2874 (comp_cv_target_types): Add static prototype.
2875 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
2876 build_component_addr, build_unary_op, convert_for_initialization):
2879 * typeck2.c (ack): Add static prototype and change from fixed args
2881 (readonly_error, check_for_new_type): Const-ify a char*.
2883 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
2884 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
2885 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
2886 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
2887 gen_assign, GNU_xref_member): Const-ify a char*.
2889 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
2891 * gxxint.texi: Remove old discussion on copying virtual bases.
2893 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
2895 * Make-lang.in: Remove all references to g++.o/g++.c.
2896 Link g++ from gcc.o.
2898 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
2900 * decl2.c (comdat_linkage): Treat vtables like functions.
2902 1999-03-25 Mark Mitchell <mark@codesourcery.com>
2904 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
2906 1999-03-25 Nathan Sidwell <nathan@acm.org>
2908 * decl.c (init_decl_processing): Add `signed' type as a synonym
2911 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
2913 * typeck.c (common_type): Handle cv-qual unification for pointers
2916 * decl.c (unqualified_namespace_lookup): Return error_mark_node
2918 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
2919 * lex.c (do_identifier): If we got error_mark_node, call
2922 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
2924 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
2927 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
2929 * decl.c (lookup_name_real): Do nested field lookup regardless of
2932 1999-03-24 Mark Mitchell <mark@codesourcery.com>
2934 * cp-tree.h (lang_type): Remove has_assignment and
2935 has_real_assignment. Add befriending_classes.
2936 (TYPE_HAS_ASSIGNMENT): Remove.
2937 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
2938 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
2939 (lang_decl): Document.
2940 (DECL_BEFRIENDING_CLASSES): New macro.
2941 (FRIEND_NAME): Move declaration to more obvious location.
2942 (FRIEND_DECLS): Likewise.
2943 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
2944 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
2945 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
2946 (grok_op_properties): Likewise.
2947 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
2948 (add_friend): Likewise. Don't do weird things with assignment
2949 operators. Update DECL_BEFRIENDING_CLASSES.
2950 (add_friends): Don't do weird things with assignment operators.
2951 (make_friend_class): Likewise. Update
2952 CLASSTYPE_BEFRIENDING_CLASSES.
2953 * pt.c (instantiate_class_template): Don't set
2954 TYPE_HAS_ASSIGNMENT.
2955 (tsubst_copy): Substitute the TREE_TYPE for more unary
2957 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
2958 * search.c (protected_accessible_p): New function.
2959 (friend_accessible_p): Likewise.
2960 (accessible_p): Use them.
2962 1999-03-23 Mark Mitchell <mark@codesourcery.com>
2964 * pt.c (convert_nontype_argument): Don't create things that aren't
2965 PTRMEM_CSTs when applying a qualification conversion to a
2968 1999-03-23 Mark Mitchell <mark@codesourcery.com>
2970 * Makefile.in (OBJS): Don't mention hash.o.
2971 (OBJDEPS): Likewise.
2973 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
2975 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
2976 * decl.c (expand_static_init): Make sure we don't add any after
2979 * decl.c (cp_finish_decl): Move intelligence about handling
2980 DECL_COMDAT for variables from here...
2981 * decl2.c (comdat_linkage): ...to here.
2982 (maybe_make_one_only): Tweak.
2983 (import_export_decl): Call comdat_linkage for variables, too.
2984 (finish_file): Handle template statics properly.
2986 1999-03-22 Mark Mitchell <mark@codesourcery.com>
2988 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
2989 Document internals of pointer-to-member-functions.
2990 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
2991 (PFN_FROM_PTRMEMFUNC): Likewise.
2992 (build_type_conversion): Remove unused parameter.
2993 (build_ptrmemfunc1): Declare.
2994 (expand_ptrmemfunc_cst): New function.
2995 (delta2_from_ptrmemfunc): Likewise.
2996 (pfn_from_ptrmemfunc): Likewise.
2997 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
2998 build_type_conversion. Use TYPE_PTRMEM_P for readability.
2999 (convert_to_reference): Remove unused parameter to
3000 build_type_conversion.
3001 (ocp_convert): Likewise.
3002 (build_user_type_conversion): Likewise.
3003 * error.c (dump_expr): Handle NULL pointer-to-member functions.
3004 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
3005 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
3006 open when handling pointer-to-member functions.
3007 * pt.c (convert_nontype_argument): Clean up error messages. Be
3008 more stringent with pointers-to-members.
3009 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
3010 (build_unary_op): Tidy ever-so-slightly.
3011 (build_conditional_expr): Remove extra parameter to
3012 build_type_conversion.
3013 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
3015 (expand_ptrmemfunc_cst): Define.
3016 (delta2_from_ptrmemfunc): Likewise.
3017 (pfn_from_ptrmemfunc): Likewise.
3019 1999-03-19 Mark Mitchell <mark@codesourcery.com>
3021 * init.c (build_member_call): Handle template-id expressions
3023 * typeck.c (build_x_function_call): Likewise.
3025 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
3027 * friend.c (make_friend_class): Avoid core dump when
3028 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
3030 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
3032 * decl.c (start_function): Suppress normal linkage heuristics
3033 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
3035 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
3037 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
3038 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
3040 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
3042 * parse.y (named_complex_class_head_sans_basetype):
3043 Do not push a scope for error_mark_node.
3044 (maybe_base_class_list): Likewise.
3046 * decl.c (start_decl): Check for error_mark_node as a type.
3047 Detected by g++.brendan/array-refs.C.
3048 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
3049 (maybe_build_cleanup_1): Likewise. Detected by
3050 g++.jason/incomplete1.C.
3052 * tree.c (build_dummy_object): Use void_zero_node instead of the
3054 (is_dummy_object): Check for such a node.
3055 Detected by g++.bob/inherit1.C
3057 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
3059 * method.c (old_backref_index): Split out...
3060 (flush_repeats): From here. Rename back from try_old_backref.
3061 (build_mangled_name): Put back some old-style repeat handling.
3063 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3065 * lex.c: Don't include setjmp.h.
3066 (parse_float): New static function.
3067 (pf_args): New struct.
3068 (real_yylex): Use them in call to `do_float_handler'.
3070 1999-03-15 Mark Mitchell <mark@markmitchell.com>
3072 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
3073 * tree.c (layout_basetypes): Not here.
3074 * search.c (dfs_search): Remove; no longer used.
3076 1999-03-12 Mark Mitchell <mark@markmitchell.com>
3078 * decl2.c (validate_nonmember_using_decl): Issue sensible
3079 error-messages on bogus qualifiers.
3081 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
3083 * call.c (add_function_candidate): Fix uninitialized variable.
3085 * Makefile.in (search.o): Add dependency on varray.h.
3087 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
3089 * decl.c (duplicate_decls): Use same_type_p.
3090 * method.c (try_old_backref): Renamed from flush_repeats. Use
3091 same_type_p. Don't try to handle repeats. Return success.
3092 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
3093 calls from old-style code, too.
3094 (check_ktype): Use same_type_p.
3095 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
3096 (build_qualified_name): Simplify logic.
3097 (process_overload_item): Strip typedefs and quals at the top.
3098 (build_mangled_name_for_type_with_Gcode): Remove call to
3099 type_canonical_variant.
3100 (build_mangled_name): Likewise. Remove support for old-style
3101 repeats, which have been disabled since 2.7.2. Don't mess with
3103 (build_decl_overload_real): Don't mess with TREE_USED.
3105 1999-03-13 Nathan Sidwell <nathan@acm.org>
3107 * error.c (cp_printers): Add 'F' escape character.
3108 (dump_type_real): Remove TREE_LIST (fnargs) printing.
3109 Functionality moved to dump_parameters.
3110 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
3111 (dump_function_decl): Extend meaning of V parameter. Use
3112 dump_parameters and dump_exception_spec.
3113 (dump_parameters): New static function.
3114 (dump_exception_spec): New static function.
3115 (fndecl_as_string): Change argument semantics. Use
3116 dump_function_decl directly.
3118 * sig.c (build_signature_table_constructor): Use cp_error.
3120 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
3122 * semantics.c (finish_switch_cond): Handle error cases gracefully.
3123 Detected by g++.law/enum5.C.
3125 * typeck.c (build_modify_expr): Check for errors after resolving
3126 offsets. Detected by g++.brendan/static1.C.
3128 * decl.c (complete_array_type): Ignore initial_value if it is an
3129 error. Detected by g++.benjamin/17930.C.
3131 * typeck2.c (process_init_constructor): Return error if one argument
3132 is in error. Detected by g++.benjamin/13478.C.
3134 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
3136 * decl.c (select_decl): Allow class templates when we need types.
3137 * decl2.c (ambiguous_decl): Likewise.
3139 1999-03-12 Mark Mitchell <mark@markmitchell.com>
3141 * lex.c (do_identifier): Correct call to enforce_access.
3142 * search.c (accessible_p): Tweak comment.
3144 1999-03-10 Mark Mitchell <mark@markmitchell.com>
3146 * semantics.c (begin_class_definition): Call build_self_reference.
3147 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
3149 * search.c (assert_canonical_unmarked): Fix typo in prototype.
3151 * search.c (dfs_canonical_queue): New function.
3152 (dfs_assert_unmarked_p): Likewise.
3153 (assert_canonical_unmarked): Likewise.
3154 (access_in_type): Use it.
3155 (accessible_p): Likewise. Walk the whole tree when umarking.
3157 * sig.c (build_signature_table_constructor): Use accessible_p
3158 instead of compute_access.
3160 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
3162 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
3164 1999-03-09 Mark Mitchell <mark@markmitchell.com>
3166 * cp-tree.h (flag_access_control): Declare.
3167 (TREE_VIA_PPUBLIC): Document.
3168 (DECL_NONSTATIC_MEMBER_P): New macro.
3169 (enforce_access): Return an indication of whether or not access
3171 (build_self_reference): Change prototype.
3172 (compute_access): Replace with ...
3173 (accessible_p): New function.
3174 (dfs_walk): Change prototype.
3175 (dfs_unmark): Likewise.
3176 (markedp): Likewise.
3177 * call.c (enforce_access): Use accessible_p.
3178 * class.c (build_self_reference): Insert the declaration into the
3179 list of members for this type, and make it public.
3180 * decl.c (xref_basetypes): Avoid ill-timed recursion.
3181 * init.c (build_offset_ref): Use lookup_member, not three separate
3182 name-lookups. Call enforce_access rather than checking for
3183 illegal accesses here.
3184 (resolve_offset_ref): Likewise.
3185 * lex.c (do_identifier): Likewise.
3186 * method.c (hack_identifier): Likewise.
3187 * parse.y (self_reference): Remove.
3188 (opt_component_decl_list): Don't use it.
3189 * parse.c: Regenerated.
3190 * pt.c (print_candidates): Generalize to handle lists of
3191 overloaded functions.
3192 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
3194 (get_template_base): Use new calling convention for dfs_walk.
3195 * search.c: Include varray.h. Add prototypes.
3196 (dfs_walk): Accept a data pointer to pass to the work functions.
3197 All callers changed. All work functions changed.
3198 (breadth_first_search): Rename to bfs_walk, and make consistent
3200 (dfs_walk_real): New function.
3201 (canonical_binfo): New function.
3202 (context_for_name_lookup): Likewise.
3203 (shared_marked_p): Likewise.
3204 (shared_unmarked_p): Likewise.
3205 (lokup_field_queue_p): Likewise.
3206 (lookup_field_r): Generalize to handle both functions and fields.
3207 (lookup_field): Just call lookup_member.
3208 (lookup_fnfields): Likewise.
3209 (lookup_member): Move body of lookup_field here and generalize.
3210 (dfs_accessible_queue_p): Likewise.
3211 (dfs_accessible_p): Likewise.
3212 (dfs_access_in_type): Likewise.
3213 (access_in_type): Likewise.
3214 (compute_access): Remove, and replace with ...
3215 (accessible_p): New function.
3216 (vbase_types): Remove.
3217 (vbase_decl_ptr_intermediate): Likewise.
3218 (vbase_decl_ptr): Likewise.
3219 (vbase_init_result): Likewise.
3220 (closed_envelopes): Likewise.
3221 (bvtable): Likewise.
3223 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
3225 * call.c (add_function_candidate): Check for proper number of args
3226 before checking the validity of those args.
3228 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
3230 * cp-tree.h (struct lang_type): Add anon_union field.
3231 (ANON_UNION_TYPE_P): Use it instead of examining type.
3232 (SET_ANON_UNION_TYPE_P): New macro.
3233 * decl.c (check_tag_decl): Use it.
3235 * search.c (compute_access): Handle non-type contexts earlier, and
3238 * tree.c (build_exception_variant): Use copy_to_permanent.
3240 * decl2.c (setup_initp): Give statics with no priority the default
3242 (do_dtors, do_ctors, finish_file): Remove special handling of
3243 non-prioritized statics.
3245 1999-03-05 Mark Mitchell <mark@markmitchell.com>
3247 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
3248 * decl.c (make_typename_type): Don't issue an error if an
3249 immediate lookup fails; it migt be resolved later.
3250 * friend.c (is_friend): Add comment.
3251 * search.c (breadth_first_search): Add POSTFN and DATA
3252 parameters. Tidy. All callers changed.
3253 (lookup_field_queue_p): New function.
3254 (lookup_field_r): Likewise.
3255 (lookup_field_post): Likewise.
3256 (lookup_field): Use them, via breadth_first_search, instead of
3258 (compute_access): Robustify.
3259 (lookup_fnfield_info): New structure.
3261 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
3263 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
3265 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
3267 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
3270 * decl2.c (import_export_class): Also return if
3271 CLASSTYPE_INTERFACE_ONLY is set.
3273 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
3275 * decl.c (push_overloaded_decl): Only overwrite the old binding if
3277 * decl2.c (do_local_using_decl): Fix loop termination.
3279 1999-03-02 Mark Mitchell <mark@markmitchell.com>
3281 * cp-tree.h (determine_specialization): Don't declare.
3282 * pt.c (determine_specialization): Make it static. Eliminate
3283 complain parameter. Note that decl is always non-NULL now, and
3284 simplify accordingly.
3286 * decl.c (maybe_push_to_top_level): Always call
3287 push_cp_function_context.
3288 (pop_from_top_level): Always call pop_cp_function_context.
3290 1999-02-26 Nathan Sidwell <nathan@acm.org>
3292 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
3294 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
3295 * init.c (build_new_1): Extra arg to complete_type_or_else.
3296 (build_delete): Likewise.
3297 * typeck.c (require_complete_type): Likewise.
3298 (pointer_int_sum): Likewise.
3299 (pointer_diff): Likewise.
3300 (build_component_ref): Likewise.
3302 * typeck2.c (incomplete_type_error): Always use cp_error.
3303 Show declaration of undefined type, if appropriate.
3304 Deal with UNKNOWN_TYPE nodes.
3306 * typeck.c (require_complete_type): Use TYPE_SIZE as
3307 size_zero_node to mean incomplete type.
3308 (require_complete_type_in_void): New function.
3309 (build_compound_expr): Call complete_type_in_void for LHS.
3310 (build_c_cast): Call complete_type_in_void for void cast.
3311 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
3312 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
3313 require_complete_type_in_void. Call it.
3314 * cp-tree.h (require_complete_type_in_void): Prototype new function.
3316 * typeck.c (convert_arguments): Use alternative format for
3317 function decls. Don't require_complete_type here. Simplify
3318 diagnostic printing.
3319 (convert_for_initialization): Don't require_complete_type on RHS yet.
3320 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
3322 * call.c (build_over_call): Cope with qualified void return type.
3323 * semantics.c (finish_call_expr): Likewise.
3324 * typeck.c (build_function_call_real): Likewise.
3325 (c_expand_return): Likewise.
3326 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
3328 * call.c (print_z_candidates): Use alternate print format, to be
3329 consistent with (pt.c) print_candidates.
3330 * method.c (hack_identifier): List candidate members.
3331 * search.c (lookup_field): Build ambiguous list, and show it, if
3334 1999-02-26 Mark Mitchell <mark@markmitchell.com>
3336 * typeck.c (decay_conversion): Don't confuse constant array
3337 variables with their initializers.
3339 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
3341 * pt.c (regenerate_decl_from_template): Tweak for clarity.
3342 (instantiate_decl): Mark a decl instantiated before regenerating
3343 it to avoid recursion.
3344 * tree.c (mapcar): Don't call decl_constant_value unless we know
3345 something is TREE_READONLY_DECL_P.
3347 * class.c (check_for_override): Don't stop checking when we find
3348 the first overridden function. Delete #if 0'd code.
3349 * search.c (get_matching_virtual): Likewise.
3351 1999-02-25 Richard Henderson <rth@cygnus.com>
3353 * lang-specs.h: Define __FAST_MATH__ when appropriate.
3355 1999-02-24 Mike Stump <mrs@wrs.com>
3357 * typeck.c (convert_for_assignment): Allow boolean integral constant
3358 expressions to convert to null pointer.
3360 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
3362 * decl.c (lookup_namespace_name): Resolve namespace aliases.
3364 * class.c (push_nested_class): Allow namespaces.
3366 * decl2.c (set_decl_namespace): Add friendp parameter.
3367 * decl.c (grokfndecl): Pass it.
3368 (grokvardecl): Likewise.
3369 * cp-tree.h: Change declaration.
3371 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
3373 * pt.c (tsubst): Allow an array of explicit size zero.
3375 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
3377 * errfn.c: Change varargs code to look like toplev.c.
3379 * method.c (process_modifiers): Don't prepend 'U' for char or
3382 1999-02-20 Craig Burley <craig@jcb-sc.com>
3384 * Make-lang.in (cplib2.ready): Don't consider updating
3385 cplib2 stuff if the current directory isn't writable, as
3386 it won't work (such as during a `make install').
3388 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
3390 * decl2.c (start_objects): Make file scope constructors and
3391 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
3392 ASM_OUTPUT_DESTRUCTOR are defined.
3394 1999-02-19 Mark Mitchell <mark@markmitchell.com>
3396 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
3397 (fn_type_unification): Adjust prototype.
3398 (lookup_fnfields_1): Declare.
3399 * call.c (add_template_candidate_real): Adjust call to
3400 fn_type_unification.
3401 * class.c (add_method): Don't allow duplicate declarations of
3402 constructors or destructors.
3403 (resolve_address_of_overloaded_function): Remove unused variable.
3404 Adjust call to fn_type_unification.
3405 * decl.c (grokfndecl): Be more robust in the face of illegal
3407 * decl2.c (check_classfn): Remove hokey handling of member
3409 * pt.c (determine_specialization): Improve comments. Adjust to
3410 handle template argument deduction as per the standard.
3411 (check_explicit_specialization): Fix comment spacing. Handle
3412 type-conversion operators correctly. Improve error-recovery.
3413 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
3414 (get_bindings_real): Simplify handling of static members.
3415 * search.c (lookup_fnfields_1): Make it have external linkage.
3416 * typeck.c (compparms): Fix comment.
3417 (build_unary_op): Don't try to figure out which template
3418 specialization is being referred to when when the address-of
3419 operator is used with a template function.
3421 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3423 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
3424 keyword to match an analogous change at the top level.
3426 * tree.c (lvalue_or_else): Likewise.
3428 1999-02-17 Mark Mitchell <mark@markmitchell.com>
3430 * decl.c (xref_basetypes): Comment.
3431 * pt.c (instantiate_class_template): Use xref_basetypes.
3433 1999-02-16 Mark Mitchell <mark@markmitchell.com>
3435 * cp-tree.h (tsubst): Change prototype.
3436 (tsubst_expr): Likewise.
3437 (tsubst_copy): Likewise.
3438 (type_unification): Remove prototype.
3439 * call.c (convert_default_arg): Adjust call to tsubst_expr.
3440 * class.c (resolve_address_of_overloaded_function): Just use
3441 fn_type_unification.
3442 * decl.c (grokdeclarator): Adjust call to tsubst.
3443 * method.c (build_template_parm_names): Likewise.
3444 * pt.c (GTB_VIA_VIRTUAL): New macro.
3445 (GTB_IGNORE_TYPE): Likewise.
3446 (resolve_overloaded_unification): Add `complain' parameter.
3447 (try_one_overload): Likewise.
3448 (tsubst_template_arg_vector): Likewise.
3449 (tsubst_template_parms): Likewise.
3450 (tsubst_aggr_type): Likewise.
3451 (tsubst_arg_types): Likewise.
3452 (tsubst_call_declarator_parms): Likewise.
3453 (unify): Remove explicit_mask.
3454 (type_unification_real): Likewise.
3455 (get_template_base_recursive): Likewise.
3456 (coerce_template_template_parms): Provide prototype.
3457 (tsubst_function_type): Likewise.
3458 (try_class_unification): New function.
3459 All callers changed to use new complain parameter.
3460 (get_template_base): Use try_class_unification.
3461 (unify): Adjust handling of classes derived from template types.
3462 (fn_type_unification): Substitute explicit arguments before
3465 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3467 * decl.c (pushdecl): Remove dead code.
3469 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
3471 * decl2.c (finish_objects): Fix code I missed in previous change.
3473 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
3475 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
3476 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
3478 * pt.c (maybe_process_partial_specialization): Complain about
3479 'template <>' on non-specialization.
3481 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
3483 * decl.c (grokdeclarator): Catch wierd declarators.
3484 * decl2.c (finish_file): Don't abort because of namespace parsing
3486 (check_decl_namespace): Remove.
3488 1999-02-09 Mark Mitchell <mark@markmitchell.com>
3490 * cp-tree.h (get_template_base): Don't declare.
3491 (dfs_walk): Declare.
3492 (dfs_unmark): Likewise.
3493 (markedp): Likewise.
3494 * pt.c (unify): Remove duplicate declaration. Pass tparms and
3495 targs to get_template_base.
3496 (get_template_base_recursive): Move here from search.c. Check to
3497 see that the base found can be instantiated to form the desired
3499 (get_template_base): Likewise.
3500 (get_class_bindings): Simplify.
3501 * search.c (get_template_base_recursive): Move to pt.c.
3502 (get_template_base): Likewise.
3503 (markedp): Make it global.
3504 (dfs_walk): Likewise.
3505 (dfs_unmark): Likewise.
3507 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
3509 * pt.c (maybe_process_partial_specialization): Complain about
3510 specialization in wrong namespace.
3511 * tree.c (decl_namespace_context): New fn.
3513 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3515 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
3516 * pt.c (coerce_template_template_parms): Handle nested
3517 template template parameters.
3519 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
3521 * typeck2.c: Update email addresses.
3523 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3525 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
3528 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
3530 * lex.c (retrofit_lang_decl): Split out...
3531 (build_lang_decl): From here.
3532 * decl.c (pushdecl): Call it for functions generated by the middle
3533 end that don't have DECL_LANG_SPECIFIC.
3534 * cp-tree.h: Declare it.
3536 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
3537 (start_objects, finish_objects): Only use special
3538 init_priority code if the user specified a priority.
3539 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
3542 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
3544 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
3545 mkstemp.o. Get them from libiberty now.
3546 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
3548 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3550 * decl2.c (lang_decode_option): Use read_integral_parameter.
3552 1999-02-01 Mark Mitchell <mark@markmitchell.com>
3554 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
3555 before calling complete_type_or_else.
3557 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3559 * input.c (inline): Don't define, its handled by system.h.
3561 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
3563 * decl2.c: Don't define flag_no_ident here. Don't process
3565 * cp-tree.h: Don't declare flag_no_ident here.
3566 * lang-specs.h: Map -Qn to -fno-ident.
3568 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
3570 * cp-tree.h (struct tree_binding): Replace scope field with a union.
3571 (BINDING_SCOPE): Adjust.
3572 * decl.c (BINDING_LEVEL): Adjust.
3574 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
3576 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
3579 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
3582 * tree.c (equal_functions): Fix name in prototype.
3584 * decl.c (push_local_binding): Add FLAGS argument.
3585 (pushdecl, push_overloaded_decl): Pass it.
3586 * decl2.c (do_local_using_decl): Likewise.
3587 * cp-tree.h: Adjust prototype.
3588 * decl.c (poplevel): Fix logic.
3590 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
3591 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
3592 (cat_namespace_levels): Don't loop forever.
3594 1999-01-25 Richard Henderson <rth@cygnus.com>
3596 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
3598 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
3600 * class.c (resolve_address_of_overloaded_function): Mark the
3601 chosen function used.
3603 * call.c (build_call): Make sure that a function coming in has
3604 been marked used already.
3605 * decl.c (expand_static_init): Call mark_used instead of
3607 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
3608 alloc_eh_object, expand_throw): Likewise.
3609 * init.c (build_builtin_delete_call): Likewise.
3610 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
3611 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
3612 expand_generic_desc): Likewise.
3614 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
3616 * tree.c (equal_functions): New function.
3617 (ovl_member): Call it.
3619 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
3621 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
3623 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
3625 * decl.c (decls_match): Return 1 if old and new are identical.
3626 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
3628 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
3630 * decl.c (start_function): Make member functions one_only on windows.
3631 * decl2.c (import_export_decl): Likewise.
3633 * decl.c (grokdeclarator): Don't complain about implicit int in
3634 a system header. Change same-name field check to not complain in
3635 a system header instead of within extern "C".
3637 1999-01-21 Mark Mitchell <mark@markmitchell.com>
3639 * cp-tree.h (PUSH_GLOBAL): New macro.
3640 (PUSH_LOCAL): Likewise.
3641 (PUSH_USING): Likewise.
3642 (namespace_bindings_p): Declare.
3643 (push_overloaded_decl): Likewise.
3644 * decl.c (push_overloaded_decl): Don't make it static. Check for
3645 illegal declarations after using declarations here.
3646 (namespace_bindings_p): Likewise.
3647 (duplicate_decls): Don't consider declarations from different
3648 namespaces to be the same.
3649 (pushdecl): Use symbolic PUSH_ constants in calls to
3650 push_overloaded_decl.
3651 (push_overloaded_decl_1): Likewise.
3652 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
3653 (do_nonmember_using_decl): Check for illegal using declarations
3654 after ordinary declarations here.
3655 (do_local_using_decl): Call pushdecl to insert declarations.
3657 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
3659 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
3661 1999-01-21 Mark Mitchell <mark@markmitchell.com>
3663 * tree.c (build_cplus_array_type_1): Don't call build_array_type
3664 for types involving template parameters.
3666 * cp-tree.h (PARM_DECL_EXPR): Delete.
3667 (convert_default_arg): Change prototype.
3668 (check_default_argument): Declare.
3669 (search_tree): Likewise.
3670 * call.c (convert_default_arg): Take the function to which the
3671 default argument belongs as a parameter, and do any necessary
3672 instantiation here, instead of ...
3673 (build_over_call): Here.
3674 * decl.c (local_variable_p): New function.
3675 (check_default_argument): Likewise, split out and tidied from ...
3677 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
3678 * pt.c (tsubst_call_declarator_parms): New function.
3679 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
3680 with CALL_EXPRs, rather than trying to be clever.
3681 (tsubst): Use tsubst_call_declarator_parms.
3682 * tree.c (search_tree): Don't make it static.
3683 * typeck.c (convert_arguments): Use new interface to
3684 convert_default_arg.
3686 1999-01-20 Mark Mitchell <mark@markmitchell.com>
3688 * error.c (dump_function_decl): Don't print the argument types for
3689 a function when the verbosity level is negative.
3691 * call.c (build_over_call): Check format attributes at call-time.
3693 * pt.c (tsubst_copy): Fix comment.
3694 (unify): Don't allow unification with variable-sized arrays.
3696 * semantics.c (finish_stmt_expr): When processing a template make
3697 the BIND_EXPR long-lived.
3699 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
3701 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
3702 (import_export_vtable): Not here.
3704 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
3706 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
3707 non-static member function.
3709 1999-01-18 Nathan Sidwell <nathan@acm.org>
3711 * class.c (instantiate_type): Only diagnose illegal address of member
3712 function if complaining.
3714 * decl.c (lookup_name_real): Remove duplicate code.
3716 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
3718 * tree.c (copy_template_template_parm): Use permanent_obstack.
3720 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3722 * pt.c (unify): Remove restrictions on deduction of argument
3723 of template template parameters.
3725 1999-01-18 Nathan Sidwell <nathan@acm.org>
3727 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
3729 * class.c (resolve_address_of_overloaded_function): Show list of
3730 all candidates, when none of them match.
3732 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
3734 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
3735 definition of 'casting away const' in reinterpret_cast<>.
3737 1999-01-18 Graham <grahams@rcp.co.uk>
3739 * cvt.c: Add include for decl.h, remove extern for
3740 static_aggregates which is now provided by decl.h.
3742 * Makefile.in (cvt.o): Add dependency for decl.h and missing
3743 dependencies for convert.h and flags.h.
3745 1999-01-18 Nathan Sidwell <nathan@acm.org>
3747 * decl2.c (do_dtors): Set current location to that of the
3748 decl, for sensible diagnostics and debugging.
3749 (check_classfn): Issue `incomplete type' error, if
3750 class is not defined.
3752 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
3754 * cp-tree.h: Add prototype for bound_pmf_p.
3756 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
3757 Manfred Hollstein <manfred@s-direktnet.de>
3759 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
3762 1999-01-16 Nathan Sidwell <nathan@acm.org>
3764 * cp-tree.h (struct lang_type): Added has_mutable flag.
3765 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
3766 (TYPE_HAS_MUTABLE_P): New macro to read it.
3767 (cp_has_mutable_p): Prototype for new function.
3768 * class.c (finish_struct_1): Set has_mutable from members.
3769 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
3770 it contains a mutable.
3771 * typeck.c (cp_has_mutable_p): New function.
3773 1999-01-15 Mark Mitchell <mark@markmitchell.com>
3775 * pt.c (process_template_parm): Ignore top-level qualifiers on
3776 non-type parameters.
3778 * decl.c (start_function): Use current_function_parms in the call
3779 to require_complete_type_for_parms, not the probably empty
3782 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
3784 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
3786 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
3787 that we don't suppress the other copies.
3788 * lex.c (handle_cp_pragma): Likewise.
3790 1999-01-13 Mark Mitchell <mark@markmitchell.com>
3792 * decl.c (grokdeclarator): Undo 1998-12-14 change.
3793 * tree.c (build_cplus_array_type_1): Likewise.
3794 * pt.c (instantiate_class_template): Remove misleading comment.
3795 (tsubst_aggr_type): Substitute if there are template parameters,
3796 regardless of whether or not they use template arguments.
3797 (unify): Likewise, but for unification.
3799 1999-01-12 Richard Henderson <rth@cygnus.com>
3801 * cp-tree.h (flag_permissive): Declare extern.
3803 1999-01-06 Mark Mitchell <mark@markmitchell.com>
3805 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
3807 (lang_type): Add is_partial_instantiation. Decrease width of
3809 (PARTIAL_INSTANTIATION_P): New macro.
3810 (OPERATOR_TYPENAME_P): Remove.
3811 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
3812 OPERATOR_TYPENAME_P.
3813 (grok_op_properties): Likewise.
3814 * friend.c (do_friend): Handle friends that are member functions
3816 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
3817 * pt.c (instantiate_class_template): Rework for clarity. Avoid
3818 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
3819 any more partial instantiation than is absolutely necessary for
3820 implicit typename. Set PARTIAL_INSTANTIATION_P.
3821 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
3822 * semantics.c (begin_class_definition): Handle partial
3823 specializations of a type that was previously partially
3826 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
3828 * g++spec.c (LIBSTDCXX): Provide default definition.
3829 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
3831 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3833 * Make-lang.in (g++.o): Depend on prefix.h.
3835 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
3837 * tree.c (bound_pmf_p): New fn.
3838 * typeck.c (build_c_cast): Use it.
3840 * decl.c (grok_op_properties): Use same_type_p.
3842 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3844 * Makefile.in (cvt.o): Depend on toplev.h.
3846 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
3848 * cvt.c: Include toplev.h.
3850 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
3853 * init.c (expand_vec_init): Initialize variable `itype'.
3855 * lex.c (yyerror): Cast the argument passed to a ctype function to
3858 * method.c (build_mangled_C9x_name): Wrap prototype and definition
3859 in "HOST_BITS_PER_WIDE_INT >= 64".
3861 * typeck.c (build_binary_op): Mark parameter `convert_p' with
3864 1998-12-22 Mark Mitchell <mark@markmitchell.com>
3866 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
3867 * tree.c (build_exception_variant): Don't crash on empty throw
3870 1998-12-18 DJ Delorie <dj@cygnus.com>
3872 * cvt.c (convert_to_reference): Check for both error_mark_node
3873 and NULL_NODE after call to convert_for_initialization.
3875 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
3877 * error.c (interesting_scope_p): New fn.
3878 (dump_simple_decl): Use it.
3879 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
3880 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
3882 1998-12-16 Mark Mitchell <mark@markmitchell.com>
3884 * class.c (resolve_address_of_overloaded_function): Do conversion
3885 to correct type here, rather than ...
3886 (instantiate_type): Here.
3888 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
3889 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
3890 (decl_template_parm_p): Remove.
3891 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
3893 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
3894 * pt.c (push_inline_template_parms_recursive): Set it.
3895 (decl_template_parm_p): Remove.
3896 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
3897 (process_template_parm): Set it.
3899 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
3901 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
3902 if configured with cpplib.
3904 1998-12-15 Mark Mitchell <mark@markmitchell.com>
3906 * decl.c (poplevel): Make sure ns_binding is initialized.
3908 * decl.c (finish_function): Undo inadvertent change in previous
3911 1998-12-14 Mark Mitchell <mark@markmitchell.com>
3913 * class.c (pushclass): Tweak handling of class-level bindings.
3914 (resolve_address_of_overloaded_function): Update pointer-to-member
3916 (instantiate_type): Likewise.
3917 * cvt.c (cp_convert_to_pointer): Likewise.
3918 * decl.c (pop_binding): Take the DECL to pop, not just the name.
3919 Deal with `struct stat' hack.
3920 (binding_level): Add to documentation.
3921 (push_binding): Clear BINDING_TYPE.
3922 (add_binding): New function.
3923 (push_local_binding): Use it.
3924 (push_class_binding): Likewise.
3925 (poplevel): Adjust calls to pop_binding.
3926 (poplevel_class): Likewise.
3927 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
3928 declarations to current binding level.
3929 (push_class_level_binding): Likewise.
3930 (push_overloaded_decl): Adjust handling of OVERLOADs in local
3932 (lookup_namespace_name): Don't crash when confronted with a
3934 (lookup_name_real): Do `struct stat' hack in local binding
3936 (build_ptrmemfunc_type): Adjust documentation.
3937 (grokdeclarator): Don't avoid building real array types when
3938 processing templates unless really necessary.
3939 (finish_method): Adjust calls to pop_binding.
3940 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
3941 not reparse_decl_as_expr.
3942 (build_expr_from_tree): Deal with a template-id as the function to
3943 call in a METHOD_CALL_EXPR.
3944 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
3945 (maybe_adjust_types_For_deduction): Don't do peculiar things with
3947 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
3948 pointer-to-member types where necessary.
3949 * tree.c (build_cplus_array_type_1): Don't avoid building real
3950 array types when processing templates unless really necessary.
3951 (build_exception_variant): Compare the exception lists correctly.
3953 1998-12-13 Mark Mitchell <mark@markmitchell.com>
3955 * cp-tree.def (CPLUS_BINDING): Update documentation.
3956 * cp-tree.h (LOCAL_BINDING_P): New macro.
3957 (lang_identifier): Rename local_value to bindings.
3958 (tree_binding): Make `scope' of type `void*', not `tree'.
3959 (BINDING_SCOPE): Update documentation.
3960 (IDENTIFIER_LOCAL_VALUE): Remove.
3961 (IDENTIFIER_CLASS_VALUE): Document.
3962 (IDENTIFIER_BINDING): New macro.
3963 (IDENTIFIER_VALUE): Likewise.
3964 (TIME_IDENTIFIER_TIME): Likewise.
3965 (TIME_IDENTIFIER_FILEINFO): Likewise.
3966 (IMPLICIT_TYPENAME_P): Likewise.
3967 (set_identifier_local_value): Remove.
3968 (push_local_binding): New function.
3969 (push_class_binding): Likewise.
3970 * class.c (pushclass): Update comments; use push_class_binding.
3971 * decl.c (set_identifier_local_value_with_scope): Remove.
3972 (set_identifier_local_value): Likewise.
3973 (push_binding): New function.
3974 (pop_binding): Likewise.
3975 (binding_level): Update documentation. Remove shadowed.
3976 (BINDING_LEVEL): New macro.
3977 (free_binding_nodes): New variable.
3978 (poplevel): Adjust for new name-lookup scheme. Don't mess up
3979 BLOCK_VARs when doing for-scope extension. Remove effectively
3981 (pushlevel_class): Tweak formatting.
3982 (poplevel_class): Adjust for new name-lookup scheme.
3983 (print_binding_level): Likewise.
3984 (store_bindings): Likewise.
3985 (pushdecl): Likewise.
3986 (pushdecl_class_level): Likewise.
3987 (push_class_level_binding): Likewise.
3988 (push_overloaded_decl): Update comments. Adjust for new
3990 (lookup_name_real): Likewise.
3991 (lookup_name_current_level): Likewise.
3992 (cp_finish_decl): Likewise.
3993 (require_complete_types_for_parms): Likewise. Remove misleading
3995 (grok_parms): Likewise. Don't call
3996 require_complete_types_for_parms here.
3997 (grok_ctor_properties): Don't treat templates as copy
3999 (grop_op_properties): Or as assignment operators.
4000 (start_function): Document. Adjust for new name-lookup scheme.
4001 (finish_function): Likewise.
4002 * decl2.c (do_local_using_decl): Use push_local_binding.
4003 * lex.c (begin_definition_of_inclass_inline): New function, split
4005 (do_pending_inlines): Here, and ...
4006 (process_next_inline): Here.
4007 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
4008 (init_filename_times): Likewise.
4009 (extract_interface_info): Likewise.
4010 (ste_typedecl_interface_info): Likewise.
4011 (check_newline): Likewise.
4012 (dump_time_statistics): Likewise.
4013 (handle_cp_pragma): Likewise.
4014 (do_identifier): Adjust for new name-lookup scheme.
4015 * parse.y (function_try_block): Return ctor_initializer_opt value.
4017 (fn.defpen): Pass appropriate values to start_function.
4018 (pending_inline): Use functor_try_block value, and pass
4019 appropriate values to finish_function.
4020 * pt.c (is_member_template): Update documentation; remove handling
4021 of FUNCTION_DECLs. As per name, this function should deal only in
4023 (decl_template_parm_p): Change name of olddecl parameter to decl.
4024 (check_template_shadow): Adjust for new name-lookup scheme.
4025 (lookup_template_class): Likewise.
4026 (tsubst_decl): Tweak so as not to confuse member templates with
4027 copy constructors and assignment operators.
4028 (unify): Handle UNION_TYPEs.
4029 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
4030 (lang_print_xnode): Adjust for new name-lookup scheme.
4031 * typeck.c (mark_addressable): Likewise.
4032 (c_expand_return): Likewise.
4034 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
4036 * decl.c (grokdeclarator): Allow field with same name as class
4039 * decl.c (lookup_name_real): Don't limit field lookup to types.
4040 * class.c (check_member_decl_is_same_in_complete_scope): No error
4041 if icv and x are the same.
4042 * lex.c (do_identifier): Tweak error message.
4044 1998-12-10 Mark Mitchell <mark@markmitchell.com>
4046 * decl.c (start_enum): Use push_obstacks, not
4047 end_temporary_allocation.
4048 (finish_enum): Call pop_obstacks.
4050 1998-12-10 Mark Mitchell <mark@markmitchell.com>
4052 * class.c (instantiate_type): Return error_mark_node rather than
4055 1998-12-09 Mark Mitchell <mark@markmitchell.com>
4057 * cp-tree.h (most_specialized_instantiation): New function.
4058 (print_candidates): Likewise.
4059 * class.c (validate_lhs): Remove.
4060 (resolve_address_of_overloaded_function): New function, split out
4061 and then substantially reworked, from ...
4062 (instantiate_type): Use it. Simplify.
4063 * cvt.c (convert_to_reference): Complain when caller has indicated
4064 that's the right thing to do. Don't crash if instantiate_type
4066 * pt.c: Substitute `parameters' for `paramters' throughout.
4067 (print_candidates): Don't make it static.
4068 (most_specialized_instantiation): Split out from ...
4069 (most_specialized): Here.
4071 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
4073 * lex.c (lang_init_options): Initialize cpplib.
4074 * decl2.c (parse_options,cpp_initialized): Removed.
4075 (lang_decode_option): Move initialization of cpplib to
4078 1998-12-09 Mark Mitchell <mark@markmitchell.com>
4080 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
4081 well as the TYPE_DECL, when a typedef name is assigned to a
4082 previously anonymous type.
4084 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
4086 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
4087 __cp_eh_info for getting the eh info pointer. Add table_index to
4089 (push_eh_cleanup): Don't increment 'handlers' data field.
4090 (process_start_catch_block): Don't set the 'caught' field.
4092 * cp/exception.cc (CP_EH_INFO): New macro for getting the
4093 exception info pointer within library routines.
4094 (__cp_eh_info): Use CP_EH_INFO.
4095 (__start_cp_handler): Get exception info pointer, set caught field,
4096 and increment the handlers field. Avoids this being done by handlers.
4097 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
4098 (uncaught_exception): Use CP_EH_INFO macro.
4100 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
4102 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
4104 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
4106 * lex.c (check_newline): Add support for \ as `natural'
4107 characters in file names in #line to be consistent with #include
4108 handling. We support escape processing in the # 1 "..." version of
4109 the command. See also support in cp/lex.c.
4111 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
4113 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
4116 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
4118 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
4120 * error.c (dump_simple_decl): Also print namespace context.
4121 (dump_function_decl): Likewise.
4123 * decl2.c (ambiguous_decl): Don't print old value if it's
4126 * decl.c (lookup_name_real): Fix handling of local types shadowed
4127 by a non-type decl. Remove obsolete code.
4128 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
4130 * lang-options.h: Add -fpermissive.
4131 * decl2.c: Likewise.
4132 * cp-tree.h: Add flag_permissive.
4133 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
4134 were specified, set flag_pedantic_errors.
4135 * call.c (build_over_call): Turn dropped qualifier messages
4137 * cvt.c (convert_to_reference): Likewise.
4138 * typeck.c (convert_for_assignment): Likewise.
4140 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
4142 * decl2.c (coerce_new_type): Use same_type_p.
4143 (coerce_delete_type): Likewise.
4145 * call.c (check_dtor_name): Return 1, not error_mark_node.
4147 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
4149 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
4150 if MULTIPLE_SYMBOL_SPACES.
4152 * pt.c (check_template_shadow): New fn.
4153 * decl2.c (grokfield): Use it.
4154 * decl.c (pushdecl): Likewise.
4155 (pushdecl_class_level): Likewise.
4156 (start_method): Likewise.
4157 (xref_tag): Don't try to use 't' if we're defining.
4159 * call.c (check_dtor_name): Just return an error_mark_node.
4160 * pt.c (lookup_template_class): Complain about using non-template here.
4161 * parse.y (apparent_template_type): Not here.
4163 * pt.c (check_explicit_specialization): Complain about specialization
4166 * lang-options.h: Add -f{no-,}implicit-inline-templates.
4168 * pt.c (convert_nontype_argument): Don't assume that any integer
4169 argument is intended to be a constant-expression.
4171 1998-12-03 Mark Mitchell <mark@markmitchell.com>
4173 * class.c (handle_using_decl): Fix comment. Don't lookup
4174 constructors in base classes.
4175 (validate_lhs): Fix typo in comment.
4176 * search.c (lookup_field_1): Don't return a USING_DECL.
4178 * cp-tree.h (DECL_ACCESS): Improve documentation.
4180 * decl.c (expand_static_init): Don't set the initialization-done
4181 flag until the initialization is done.
4183 1998-12-02 Mark Mitchell <mark@markmitchell.com>
4185 * decl2.c (validate_nonmember_using_decl): Complain about using
4186 declarations for class members.
4188 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
4190 * typeck2.c (process_init_constructor): Use same_type_p.
4192 * decl.c (check_tag_decl): Don't warn about null decl inside a
4195 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
4197 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
4198 (resolve_overloaded_unification): Strip baselinks.
4200 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4202 * g++spec.c: Don't prototype xmalloc.
4204 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
4206 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
4208 * decl.c (check_tag_decl): Do complain about null friend decl at
4211 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4213 * lex.c (make_lang_type): Clear the whole struct lang_type, not
4214 only the first multiple of sizeof (int).
4216 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
4218 * decl.c (start_decl): An explicit specialization of a static data
4219 member is only a definition if it has an initializer.
4221 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
4222 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
4224 * init.c (expand_default_init): Check for DIRECT_BIND instead of
4227 * call.c (build_over_call): Use build_decl.
4229 * except.c (expand_throw): Just use convert, not
4230 build_reinterpret_cast.
4232 * lex.c (handle_generic_pragma): Use token_buffer.
4234 * decl.c (check_tag_decl): Don't complain about null friend decl.
4236 1998-11-24 Dave Pitts <dpitts@cozx.com>
4238 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
4240 * lex.c (check_newline): Use ISALPHA.
4241 (readescape): Use ISGRAPH.
4242 (yyerror): Use ISGRAPH.
4244 1998-11-24 Nathan Sidwell <nathan@acm.org>
4246 * search.c (get_abstract_virtuals): Do not use initial
4247 CLASSTYPE_ABSTRACT_VIRTUALS.
4248 * typeck2.c (abstract_virtuals_error): Show location of abstract
4250 * call.c (build_new_method_call): Use
4251 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
4252 * class.c (finish_struct_bits): Don't bother working out whether
4253 get_abstract_virtuals will do anything, just do it.
4255 1998-11-24 Graham <grahams@rcp.co.uk>
4257 * typeck.c (build_component_ref): Remove unused statement.
4259 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
4261 * class.c (add_method): Catch invalid overloads.
4263 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
4264 * search.c (lookup_conversions): Handle getting real OVERLOADs.
4265 (add_conversions): Likewise. Revert last change.
4266 * call.c (add_conv_candidate): Pass totype to add_candidate instead
4267 of fn. Don't add a new candidate if the last one was for the same
4269 (print_z_candidates): Handle getting a type as a function.
4270 (joust): If we got two conversion candidates to the same type,
4272 (build_object_call): Lose 'templates'.
4273 (build_user_type_conversion_1): Handle getting real OVERLOADs.
4275 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
4277 * typeck2.c (process_init_constructor): If there are elements
4278 that don't have initializers and they need to have constructors
4279 run, supply them with initializers.
4281 * class.c (finish_struct_1): A class with a 0-width bitfield is
4284 1998-11-23 Mark Mitchell <mark@markmitchell.com>
4286 * pt.c (instantiate_class_template): Don't try to figure out what
4287 specialization to use for a partial instantiation. Correct
4288 typos in a couple of comments. Avoid calling uses_template_parms
4291 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
4293 * method.c (process_overload_item): Add call to
4294 build_mangled_C9x_name for intTI_type_nodes.
4295 (build_mangled_C9x_name): Add prototype, define.
4296 * decl.c (init_decl_processing): Add names for
4299 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
4301 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
4303 * class.c (finish_struct_1): Set things up for 0-width bitfields
4304 like we do for others.
4306 * decl.c (check_tag_decl): New fn.
4307 (shadow_tag): Split out from here.
4308 * decl2.c (grok_x_components): Call it.
4310 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
4312 * decl.c: Lose warn_about_return_type.
4313 (grokdeclarator): Always complain about implicit int, except for
4316 * decl.c (tag_name): New fn.
4317 (xref_tag): Complain about using typedef-name after class-key.
4319 * init.c (expand_vec_init): Also keep going if from_array.
4321 * tree.c (is_overloaded_fn): Also handle the output of
4324 * decl.c (grokdeclarator): Use constructor_name when comparing
4325 field name against enclosing class.
4326 * class.c (finish_struct_anon): Likewise.
4328 1998-11-22 Mark Mitchell <mark@markmitchell.com>
4330 * decl.c (poplevel): Remove code to handle KEEP == 2.
4331 (finish_function): Don't confuse BLOCK-order when
4332 processing a destructor.
4334 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
4336 * decl.c (require_complete_types_for_parms): Call layout_decl
4337 after we've completed the type.
4339 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
4341 * decl2.c (validate_nonmember_using_decl): Allow using templates
4342 from the global namespace.
4344 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
4346 Handle specifying template args to member function templates.
4347 * tree.c (build_overload): Always create an OVERLOAD for a template.
4348 * search.c (add_conversions): Handle finding an OVERLOAD.
4349 * decl2.c (check_classfn): Likewise.
4350 * lex.c (identifier_type): See through a baselink.
4351 * parse.y (do_id): Don't call do_identifier if we got a baselink.
4352 * class.c (instantiate_type, case TREE_LIST): Recurse.
4354 * decl.c (grokdeclarator): Allow a boolean constant for array
4355 bounds, odd as that sounds.
4357 * pt.c (unify): Be more strict about non-type parms, except for
4359 (UNIFY_ALLOW_INTEGER): New macro.
4361 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
4363 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
4365 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
4367 * semantics.c (begin_class_definition): Call
4368 maybe_process_partial_specialization before push_template_decl.
4369 Don't call push_template_decl for a specialization.
4370 * search.c (lookup_field): Do return a member template class.
4371 * decl2.c (handle_class_head): Handle member template classes.
4373 * decl.c (grokdeclarator): A parm type need not be complete.
4375 * pt.c (convert_nontype_argument): Fix thinko.
4377 1998-11-18 Mark Mitchell <mark@markmitchell.com>
4379 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
4380 (global_delete_fndecl): New variable.
4381 * decl.c (global_delete_fndecl): Define it.
4382 (init_decl_processing): Set it.
4383 * init.c (build_builtin_delete_call): Use it.
4384 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
4387 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
4389 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
4392 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
4393 * call.c (build_object_call): Also support references to functions.
4394 * typeck.c (convert_for_initialization): Don't decay a function
4395 if the target is a reference to function.
4397 * search.c (add_conversions): Get all the overloads from a class.
4399 * decl.c (grok_ctor_properties): Complain about any constructor
4400 that will take a single arg of the class type by value.
4402 * typeck2.c (build_functional_cast): Can't create objects of
4403 abstract classes this way.
4404 * cvt.c (ocp_convert): Likewise.
4406 * decl.c (grokfndecl): Member functions of local classes are not
4409 1998-11-18 Mark Mitchell <mark@markmitchell.com>
4411 * Make-lang.in (cc1plus): Add dependency on hash.o.
4413 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
4415 * search.c (get_abstract_virtuals): Complain about virtuals with
4417 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
4418 with no final overrider.
4419 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
4420 on virtuals with no final overrider.
4422 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
4424 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
4427 * friend.c (do_friend): Don't set_mangled_name_for_decl.
4429 * class.c (finish_struct_anon): Complain about non-fields.
4430 * decl2.c (build_anon_union_vars): Likewise.
4432 * decl.c (grokdeclarator): Normal data members can't have the same
4433 name as the class, either.
4434 * class.c (finish_struct_anon): Neither can members of an
4437 1998-11-17 Mark Mitchell <mark@markmitchell.com>
4439 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
4440 (TYPE_BINFO): Likewise.
4441 (IS_AGGR_TYPE): Tweak.
4442 (SET_IS_AGGR_TYPE): New macro.
4443 (CLASS_TYPE_P): Tweak.
4444 (lang_type): Group mark bitfields together. Remove linenum.
4445 (CLASSTYPE_SOURCE_LINE): Remove macro.
4446 (CLASSTYPE_MARKED_N): New macro.
4447 (SET_CLASSTYPE_MARKED_N): Likewise.
4448 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
4449 (CLASS_TYPE_MARKED_*): Use them.
4450 (SET_CLASSTYPE_MARKED_*): Likewise.
4451 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
4452 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4453 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
4454 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
4455 * class.c (class_cache_obstack): New variable.
4456 (class_cache_firstobj): Likewise.
4457 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
4458 (pushclass): Free the cache, when appropriate.
4460 (maybe_push_cache_obstack): Use class_cache_obstack.
4461 * decl.c (include hash.h).
4462 (typename_hash): New function.
4463 (typename_compare): Likewise.
4464 (build_typename_type): Check the hash table to avoid creating
4466 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
4467 (grokdeclarator): Use CLASS_TYPE_P.
4468 (xref_basetypes): Likewise.
4469 (start_function): Likewise. Don't put current_class_ref on the
4471 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
4473 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
4474 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
4475 fields for types other than class types. Do clear TYPE_ALIAS_SET
4476 for types other than class types, though.
4477 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
4478 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4479 * pt.c (process_template_parm): Don't set
4480 CLASSTYPE_GOT_SEMICOLON.
4481 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4482 Coerce arguments on the momentary obstack.
4483 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4484 (instantiate_class_template): Calculate template arguments on the
4485 momentary obstack. Tidy.
4486 (tsubst_template_arg_vector): Use make_temp_vec.
4487 (tsubst_aggr_type): Put template arguments on the momentary
4489 (tsubst_decl): Likewise.
4490 (tsubst): Copy the array bounds index to the permanent obstack
4491 before building index types. Use new macros.
4492 (unify): Use new macros.
4493 (do_type_instantiation): Likewise.
4494 * search.c (lookup_fnfields_1): Use new macros.
4495 (dfs_pushdecls): Build envelopes on the cache obstack.
4496 (dfs_compress_decls): Use new macros.
4497 (push_class_decls): Build on the cache obstack.
4498 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
4499 * sign.c (build_signature_pointer_or_reference_type): Use
4501 * tree.c (make_binfo): Check CLASS_TYPE_P.
4502 (copy_template_template_parm): Adjust.
4503 (make_temp_vec): Use push_expression_obstack.
4504 * typeck.c (complete_type): Use new macros.
4505 (comptypes): Likewise.
4507 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
4509 * pt.c (tsubst): Add diagnostics for invalid array, reference
4510 and pointer to member types.
4512 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
4514 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
4516 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
4519 * parse.y (structsp): Fix cut-and-paste error.
4521 * init.c (build_new): Complain about non-integral size.
4523 * parse.y (unary_expr): Complain about defining types in sizeof.
4525 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
4527 * rtti.c (build_x_typeid): Complain about typeid without
4528 including <typeinfo>.
4529 (get_typeid): Likewise. Complain about typeid of incomplete type.
4530 (get_tinfo_fn_dynamic): Likewise.
4531 (get_typeid_1): Not static anymore.
4532 * except.c (build_eh_type_type): Use get_typeid_1.
4534 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
4535 ambiguous or private bases. Fix warning for reference cast.
4537 1998-11-16 Mark Mitchell <mark@markmitchell.com>
4539 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
4540 * decl.c (duplicate_decls): Remove special-case code to deal with
4541 template friends, and just do the obvious thing.
4542 * pt.c (register_specialization): Tweak for clarity, and also to
4543 clear DECL_INITIAL for an instantiation before it is merged with a
4545 (check_explicit_specialization): Fix indentation.
4546 (tsubst_friend_function): Handle both definitions in friend
4547 declaration and outside friend declarations.
4548 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
4549 (regenerate_decl_from_template): Tweak accordingly.
4550 (instantiate_decl): Likewise.
4552 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
4554 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
4555 member function reference to error.
4556 * cvt.c (ocp_convert): Complain about converting an overloaded
4559 * init.c (build_offset_ref): Just return a lone static member
4562 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
4565 * typeck.c (build_binary_op_nodefault): Improve error handling.
4567 * decl.c (grokfndecl): Complain about making 'main' a template.
4569 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
4571 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
4572 TYPE_DECL in a template.
4574 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
4576 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
4578 * decl.c (struct cp_function): Add named_label_uses.
4579 (push_cp_function_context): Save it.
4580 (pop_cp_function_context): Restore it.
4581 (define_label): Also complain about jumping into the scope of
4582 non-POD objects that don't have constructors.
4583 * tree.c (pod_type_p): New fn.
4585 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
4586 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
4587 (get_tinfo_fn): Not here.
4588 * repo.c (repo_get_id): Abort if we get called for an incomplete
4591 1998-11-13 Mark Mitchell <mark@markmitchell.com>
4593 * except.c (expand_throw): Make sure first argument to
4594 __cp_push_exception is of type `void*' to avoid spurious error
4597 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
4599 * pt.c (try_one_overload): Take orig_targs again. Only check for
4600 mismatches against them; we don't care what a previous call found.
4601 (resolve_overloaded_unification): Adjust.
4603 * search.c (lookup_field): Don't return anything for a non-type
4604 field from a dependent type.
4605 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
4606 in an array declarator.
4607 (start_decl): Push into the class before looking for the field.
4609 1998-11-08 Mark Mitchell <mark@markmitchell.com>
4611 * method.c (build_overload_value): Handle REFERENCE_TYPE.
4613 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
4615 * decl.c (grokdeclarator): Allow namespace-scoped members if they
4618 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
4620 * pt.c (tsubst_decl): Don't mess with the global value of an
4621 un-mangled DECL_ASSEMBLER_NAME.
4623 1998-11-03 Christopher Faylor <cgf@cygnus.com>
4625 * decl.c (init_decl_processing): Remove CYGWIN conditional
4626 since CYGWIN is now able to deal with trapping signals.
4628 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4630 * cp-tree.h: Don't include gansidecl.h.
4631 * exception.cc: Include gansidecl.h (since we don't include config.h)
4632 * g++spec.c: Don't include gansidecl.h.
4634 1998-11-06 Mark Mitchell <mark@markmitchell.com>
4636 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
4638 (DECL_DEFINED_IN_CLASS_P): New macro.
4639 (TEMPLATE_PARMS_FOR_INLINE): Document.
4640 (check_static_variable_definition): New function.
4641 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
4643 (check_static_variable_definition): Split out from ...
4644 (grokdeclarator): Here.
4645 * pt.c (check_default_tmpl_args): New function, split out from ...
4646 (push_template_decl_real): Here.
4647 (instantiate_template): Fix comment.
4649 1998-11-04 Mark Mitchell <mark@markmitchell.com>
4651 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
4652 (CP_TYPE_VOLATILE_P): Likewise.
4653 (CP_TYPE_RESTRICT_P): Likewise.
4655 1998-11-03 Mark Mitchell <mark@markmitchell.com>
4657 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
4659 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
4661 * class.c (instantiate_type): Be more helpful.
4663 * decl2.c (import_export_decl): Call import_export_class.
4665 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
4666 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
4667 * pt.c (tsubst_copy): Likewise.
4669 1998-11-02 Mark Mitchell <mark@markmitchell.com>
4671 * init.c (expand_vec_init): Fix off-by-one error.
4673 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
4675 * parse.y (apparent_template_type): New type.
4676 (named_complex_class_head_sans_basetype): Use it.
4677 * Makefile.in (CONFLICTS): One new conflict.
4678 * parse.c: Regenerated.
4680 1998-11-01 Mark Mitchell <mark@markmitchell.com>
4682 * cp-tree.h (COMPARE_STRICT): New macro.
4683 (COMPARE_BASE): Likewise.
4684 (COMPARE_RELAXED): Likewise.
4685 (COMPARE_REDECLARATION): Likewise.
4686 (same_type_p): Likewise.
4687 (same_or_base_type_p): Likewise.
4688 * call.c (standard_conversion): Use them, in place of comptypes
4689 with numeric arguments.
4690 (reference_binding): Likewise.
4691 (convert_like): Likewise.
4692 (build_over_call): Likewise.
4693 (is_subseq): Likewise.
4694 (is_properly_derived_from): Likewise.
4695 (compare_ics): Likewise.
4697 * class.c (delete_duplicate_fields_1): Likewise.
4698 (resolves_to_fixed_type_p): Likewise.
4699 (instantiate_type): Likewise. Remove #if 0'd code.
4700 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
4701 (pushdecl): Likewise.
4702 (lookup_name_real): Likewise.
4703 (grokdeclarator): Likewise. Check for illegal array declarations.
4704 (grokparms): Likewise.
4705 (grok_op_properties): Likewise.
4706 * decl2.c (check_classfn): Likewise.
4707 * friend.c (is_friend): Likewise.
4708 (make_friend_class): Likewise.
4709 * init.c (expand_aggr_init): Likewise.
4710 (expand_vec_init): Likewise.
4711 * pt.c (is_member_template_class): Remove declaration.
4712 (is_specialization_of): Use COMPARE_* and new macros.
4713 (comp_template_parms): Likewise.
4714 (convert_nontype_argument): Likewise.
4715 (coerce_template_template_parms): Likewise.
4716 (template_args_equal): Likewise.
4717 (lookup_template_class): Likewise.
4718 (type_unification_real): Likewise.
4720 (get_bindings_real): Likewise.
4721 * search.c (covariant_return_p): Likewise.
4722 (get_matching_virtual): Likewise.
4723 * sig.c (match_method_types): Likewise.
4724 * tree.c (vec_binfo_member): Likewise.
4725 (cp_tree_equal): Likewise.
4726 * typeck.c (common_type): Likewise.
4727 (comp_array_types): Likewise. Get issues involving unknown array
4729 (comptypes): Update comments. Use new flags.
4730 (comp_target_types): Use new macros.
4731 (compparms): Likewise.
4732 (comp_target_parms): Likewise.
4733 (string_conv_p): Likewise.
4734 (build_component_ref): Likewise.
4735 (build_indirect_ref): Likewise.
4736 (build_conditional_expr): Likewise.
4737 (build_static_cast): Likewise.
4738 (build_reinterpret_cast): Likewise.
4739 (build_const_cast): Likewise.
4740 (build_modify_expr): Likewise.
4741 (convert_for_assignment): Likewise.
4742 (comp_ptr_ttypes_real): Likewise.
4743 (ptr_reasonably_similar): Likewise.
4744 (comp_ptr_ttypes_const): Likewise.
4746 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
4748 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
4750 1998-10-30 Mark Mitchell <mark@markmitchell.com>
4752 * decl2.c (delete_sanity): Pass integer_zero_node, not
4753 integer_two_node, to build_vec_delete.
4754 * init.c (build_array_eh_cleanup): Remove.
4755 (expand_vec_init_try_block): New function.
4756 (expand_vec_init_catch_clause): Likewise.
4757 (build_vec_delete_1): Don't deal with case that auto_delete_vec
4758 might be integer_two_node anymore.
4759 (expand_vec_init): Rework for initialization-correctness and
4760 exception-correctness.
4761 * typeck2.c (process_init_constructor): Make mutual exclusivity
4762 of cases more obvious.
4764 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
4766 * decl.c (lookup_name_real): OK, only warn if not lexing.
4767 Simplify suggested fix.
4769 * cp-tree.h (IDENTIFIER_MARKED): New macro.
4770 * search.c (lookup_conversions): Use breadth_first_search.
4771 (add_conversions): Avoid adding two conversions to the same type.
4772 (breadth_first_search): Work with base binfos, rather
4773 than binfos and base indices.
4774 (get_virtual_destructor): Adjust.
4775 (tree_has_any_destructor_p): Adjust.
4776 (get_matching_virtual): Adjust.
4778 * pt.c (push_template_decl_real): Generalize check for incorrect
4779 number of template parms.
4780 (is_member_template_class): #if 0.
4782 1998-10-29 Richard Henderson <rth@cygnus.com>
4784 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
4787 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
4789 * lex.c: Call check_newline from lang_init always. After
4790 calling cpp_start_read, set yy_cur and yy_lim to read from the
4791 cpplib token buffer.
4793 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
4795 * class.c (instantiate_type): Don't consider templates for a normal
4798 * class.c (finish_struct_1): Don't complain about non-copy
4799 assignment ops in union members.
4801 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
4802 (prepare_fresh_vtable): Likewise.
4803 (finish_struct_1): Don't call import_export_class.
4804 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
4805 (finish_prevtable_vardecl): Lose.
4806 (finish_file): Don't call it.
4807 * pt.c (instantiate_class_template): Likewise.
4808 * cp-tree.h: Remove it.
4810 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
4811 * decl.c (finish_function): Not here.
4812 (start_function): Do set DECL_INITIAL.
4814 * pt.c (push_template_decl_real): Complain about default template
4815 args for enclosing classes.
4817 * call.c (add_function_candidate): Treat conversion functions
4818 as coming from the argument's class.
4819 * cp-tree.h (DECL_CONV_FN_P): New fn.
4820 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
4821 * class.c (add_method): Use DECL_CONV_FN_P.
4822 * decl2.c (check_classfn): Likewise.
4823 * error.c (dump_function_name): Likewise.
4824 (dump_function_decl): Likewise.
4825 * pt.c (fn_type_unification): Likewise.
4826 * search.c (add_conversions): Likewise.
4828 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
4830 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
4831 * method.c (hack_identifier): Also check for using RESULT_DECL
4834 1998-10-27 Mark Mitchell <mark@markmitchell.com>
4836 * decl.c (grokdeclarator): Use type_quals, rather than constp,
4839 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
4841 * call.c (standard_conversion): instantiate_type here.
4842 (reference_binding): And here.
4843 (implicit_conversion): Not here.
4844 (build_op_delete_call): No need to cons up an OVERLOAD.
4845 * cvt.c (cp_convert_to_pointer): instantiate_type here.
4846 (convert_to_reference): And here.
4847 * decl.c (grok_reference_init): Not here.
4848 (grokparms): Or here.
4849 * typeck2.c (digest_init): Or here.
4850 * typeck.c (decay_conversion): Take the address of overloaded
4852 (require_instantiated_type): Lose.
4853 (convert_arguments): Don't handle unknown types here.
4854 (build_c_cast): Likewise.
4855 (build_binary_op): Gut.
4856 (build_conditional_expr): Don't require_instantiated_type.
4857 (build_modify_expr): Likewise.
4858 (build_static_cast): Don't instantiate_type.
4859 (build_reinterpret_cast): Likewise.
4860 (build_const_cast): Likewise.
4861 (convert_for_initialization): Likewise.
4862 (build_ptrmemfunc): Use type_unknown_p.
4863 (convert_for_assignment): Also do default_conversion on overloaded
4864 functions. Hand them off to ocp_convert.
4866 1998-10-26 Mark Mitchell <mark@markmitchell.com>
4868 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
4869 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
4871 * class.c (finish_struct_1): Use build_cplus_array_type to build
4873 * decl.c (init_decl_processing): Likewise.
4874 * except.c (expand_end_eh_spec): Likewise.
4875 * search.c (expand_upcast_fixups): Simplify very slightly.
4877 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
4879 * decl.c (grokdeclarator): Complain about a variable using
4880 constructor syntax coming back null from start_decl.
4882 * friend.c (make_friend_class): Complain about trying to make
4883 a non-class type a friend.
4885 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
4886 (start_function): Not here.
4888 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
4890 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
4892 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
4894 * typeck2.c (process_init_constructor): Only skip anonymous fields
4895 if they are bitfields.
4897 * cp-tree.def (TYPEOF_TYPE): New code.
4898 * error.c (dump_type_real): Handle it.
4899 * pt.c (tsubst): Likewise.
4900 * tree.c (search_tree): Likewise.
4901 * semantics.c (finish_typeof): New fn.
4902 * parse.y (typespec): Use it.
4903 * cp-tree.h: Declare it.
4905 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
4907 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
4909 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
4911 * typeck.c (convert_arguments): Don't handle pmf references
4914 * init.c (build_member_call): Don't try to convert to the base type
4915 if it's ambiguous or pedantic.
4917 * typeck2.c (check_for_new_type): Only depend on pedantic for
4920 1998-10-25 Mark Mitchell <mark@markmitchell.com>
4922 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
4923 non-converting constructors.
4925 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
4927 * gxxint.texi: Correct documentation for n, N, Q, and B.
4929 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
4931 * parse.y (condition): Convert VAR_DECL from reference to indirect
4934 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
4936 * exception.cc (__cp_pop_exception): Free the original exception
4937 value, not the potentially coerced one.
4939 1998-10-23 Mark Mitchell <mark@markmitchell.com>
4941 * Makefile.in (hash.h): Run gperf when necessary.
4943 * cp-tree.h (CP_TYPE_READONLY): Remove.
4944 (CP_TYPE_VOLATILE): Likewise.
4945 (CP_TYPE_QUALS): New macro.
4946 (CP_TYPE_CONST_P): Likewise.
4947 (CP_TYPE_VOLATILE_P): Likewise.
4948 (CP_TYPE_RESTRICT_P): Likewise.
4949 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
4950 (cp_build_type_variant): Rename to ...
4951 (cp_build_qualified_type): New function.
4952 (c_apply_type_quals_to_decl): Declare.
4953 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
4954 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
4955 (cp_type_qual_from_rid): New function.
4956 (compparms): Remove unused parameter. All callers changed.
4957 (cp_type_quals): New function.
4958 (at_least_as_qualified_p): Likewise.
4959 (more_qualified_p): Likewise.
4961 * call.c (standard_conversion): Replace calls to
4962 cp_build_type_variant with cp_build_qualified_type. Use
4963 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
4964 compare them. Use CP_TYPE_* macros to check qualifiers.
4965 (reference_binding): Likewise.
4966 (implicit_conversion): Likewise.
4967 (add_builtin_candidates): Likewise.
4968 (build_over_call): Likewise.
4969 * class.c (overrides): Compare all qualifiers, not just `const',
4970 on method declarations.
4971 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
4972 (convert_pointer_to_real): Likewise.
4973 (type_promotes_to): Likewise.
4974 * decl.c (check_for_uninitialized_const_var): New function.
4975 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
4976 (cp_finish_decl): Use check_for_uninitialized_const_var.
4977 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
4979 (grok_ctor_properties): Likewise.
4980 (grok_op_properties): Likewise.
4981 (start_function): Likewise.
4982 (rever_static_member_fn): Likewise.
4983 * decl2.c (grok_method_quals): Likewise.
4984 (grokfield): Likewise.
4985 * error.c (dump_readonly_or_volatile): Rename to ...
4986 (dump_qualifiers): New function. Handle `restrict'.
4987 (dump_type_real): Use it.
4988 (dump_aggr_type): Likewise.
4989 (dump_type_prefix): Likewise.
4990 (dump_type_suffix): Likewise.
4991 (dump_function_decl): Likewise.
4992 (cv_as_string): Likewise.
4993 * gxx.gperf: Add __restrict and __restrict__.
4994 * gxxint.texi: Document `u' as used for `__restrict', and a few
4995 other previously undocumented codes.
4996 * hash.h: Regenerated.
4997 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
4998 (build_member_call): Likewise.
4999 (build_new_1): Likewise.
5000 * lex.c (init_parse): Add entry for RID_RESTRICT.
5001 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
5002 (cp_type_qual_from_rid): Define.
5003 * lex.h (enum rid): Add RID_RESTRICT.
5004 * method.c (process_modifiers): Deal with `restrict'.
5005 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
5006 * parse.c: Regenerated.
5007 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
5008 (tsubst_aggr_type): Likewise.
5010 (check_cv_quals_for_unify): Likewise.
5012 * rtti.c (init_rtti_processing): Likewise.
5013 (build_headof): Likewise.
5014 (get_tinfo_var): Likewise.
5015 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
5016 (expand_class_desc): Likewise.
5017 (expand_attr_desc): Likewise.
5018 (synthesize_tinfo_fn): Likewise.
5019 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
5020 (get_matching_virtual): Likewise.
5021 (expand_upcast_fixups): Likewise.
5022 * sig.c (build_signature_pointer_or_reference_name): Take
5023 type_quals, not constp and volatilep.
5024 (build_signature_pointer_or_reference_type): Likewise.
5025 (match_method_types): More CP_TYPE_QUALS conversion, etc.
5026 (build_signature_pointer_constructor): Likewise.
5027 (build_signature_method_call): Likewise.
5028 * tree.c (build_cplus_array_type): Likewise.
5029 (cp_build_type_variant): Rename to ...
5030 (cp_build_qualified_type): New function. Deal with `__restrict'.
5031 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
5032 (build_exception_variant): Likewise.
5034 * typeck.c (qualif_type): Likewise.
5035 (common_type): Likewise.
5036 (comptypes): Likewise.
5037 (comp_cv_target_types): Likewise.
5038 (at_least_as_qualified_p): Define.
5039 (more_qualified_p): Likewise.
5040 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
5041 (compparms): Likewise.
5042 (inline_conversion): Likewise.
5043 (string_conv_p): Likewise.
5044 (build_component_ref): Likewise.
5045 (build_indirect_ref): Likewise.
5046 (build_array_ref): Likewise.
5047 (build_unary_op): Likewise.
5048 (build_conditional_expr): Likewise.
5049 (build_static_cast): Likewise.
5050 (build_c_cast): Likewise.
5051 (build_modify_expr): Likewise.
5052 (convert_For_assignment): Likewise.
5053 (comp_ptr_ttypes_real): Likewise.
5054 (cp_type_quals): New function.
5056 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
5058 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
5059 (CP_TYPE_VOLATILE): Likewise.
5060 * decl.c (grokdeclarator): Use them.
5061 * tree.c (canonical_type_variant): Likewise.
5063 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
5065 * parse.y (named_class_head): Push into class while parsing the
5067 * decl2.c (push_scope, pop_scope): New functions.
5068 * cp-tree.h: Declare them.
5069 * init.c (build_new_1): Delay cleanup until end of full expression.
5071 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
5073 * typeck.c (build_component_ref): Use of a type here is an error.
5075 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
5077 Revamp references to member functions.
5078 * method.c (hack_identifier): Call build_component_ref for a
5079 reference to a member function.
5080 * typeck.c (build_component_ref): Only return a single function
5081 if it's static. Otherwise, return a COMPONENT_REF.
5082 (build_x_function_call): Handle a COMPONENT_REF.
5083 (build_unary_op): Handle all unknown-type things.
5084 * decl2.c (arg_assoc): Handle COMPONENT_REF.
5085 * class.c (instantiate_type): Complain if the function we get is a
5086 nonstatic member function. Remove code for finding "compatible"
5088 * pt.c (tsubst_copy): Handle NOP_EXPR.
5089 * tree.c (build_dummy_object): New fn.
5090 (maybe_dummy_object): New fn.
5091 (is_dummy_object): New fn.
5092 * cp-tree.h: Declare them.
5093 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
5094 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
5095 * init.c (build_member_call): Use maybe_dummy_object and
5097 (build_offset_ref): Use maybe_dummy_object.
5098 (resolve_offset_ref): Use is_dummy_object.
5099 * typeck.c (build_x_function_call): Call build_dummy_object.
5100 (unary_complex_lvalue): Call is_dummy_object.
5102 * typeck.c (build_component_addr): Make sure field is a field.
5104 * call.c (build_new_op): Delete obsolete code.
5106 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
5108 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
5110 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
5111 std if std is ignored.
5113 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
5115 * decl.c (grokvardecl): Fix thinko.
5117 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5120 * parse.y (fn.def2): Fix 'attrs' format.
5122 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
5124 * Makefile.in (CONFLICTS): Update.
5125 * parse.y (expr_or_declarator_intern): New rule.
5126 (expr_or_declarator, direct_notype_declarator, primary,
5127 functional_cast): Use it.
5128 (notype_declarator_intern): New rule.
5129 (notype_declarator, complex_notype_declarator): Use it.
5131 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
5133 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
5134 (grokvardecl): Likewise.
5136 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5138 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
5139 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
5141 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
5143 * pt.c (process_partial_specialization): Cast 1st argument of
5146 * tree.c (build_base_fields): Cast `base_align' to (int) when
5147 comparing against one.
5149 1998-10-16 Mark Mitchell <mark@markmitchell.com>
5151 * decl.c (lookup_name_real): Handle template parameters for member
5152 templates where said parameters have the same name as the
5155 * decl.c (expand_static_init): Build cleanups before entering the
5156 anonymous function used to do them to avoid access-checking
5159 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
5160 accidentally removed by previous change, and make DECL_RTL here.
5161 * class.c (add_method): Don't make DECL_RTL here.
5163 * pt.c (for_each_template_parm): Don't examine uninstantiated
5166 1998-10-16 Dave Brolley <brolley@cygnus.com>
5168 * lex.c (real_yylex): Fix unaligned access of wchar_t.
5170 1998-10-16 Mark Mitchell <mark@markmitchell.com>
5172 * class.c (add_method): Fix documentation to reflect previous
5173 changes. Check for duplicate method declarations here.
5174 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
5175 correctly; such things never match.
5176 (grokfndecl): Don't look for duplicate methods here.
5177 * decl2.c (check_classfn): Don't assume names are mangled.
5178 Don't add bogus member function declarations to a class before the
5179 class type is complete.
5180 (grokfield): Reformat error message.
5181 * method.c (set_mangled_name_for_decl): Don't mangle names while
5182 processing_template_decl.
5184 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
5186 * typeck.c (build_indirect_ref): Complain about a pointer to data
5188 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
5190 * init.c (resolve_offset_ref): Don't undo the above.
5192 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
5193 (struct lang_decl_flags): Add `bitfield'.
5194 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
5196 * decl2.c (grokbitfield, grok_alignof): Likewise.
5197 * init.c (build_offset_ref): Likewise.
5198 * typeck.c (build_component_addr, expr_sizeof): Likewise.
5199 * cvt.c (build_up_reference): Don't crash if taking the address
5200 returns error_mark_node.
5202 * decl.c (grokfndecl): Also check ctype when checking for ::main().
5204 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
5206 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
5208 (grokdeclarator): Instead of here.
5209 * friend.c (do_friend): Lose special handling of ::main and
5211 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
5213 * spew.c (yylex): Clear looking_for_typename if we got
5216 1998-10-15 Mark Mitchell <mark@markmitchell.com>
5218 * class.c (maybe_warn_about_overly_private_class): Improve error
5219 messages for class with only private constructors.
5221 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
5222 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
5223 (build_typename_type): New function.
5224 * decl.c (build_typename_type): Broken out from ...
5225 (make_typename_type): Use it.
5226 * search.c (lookup_field): Likewise.
5228 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5230 * pt.c (convert_nontype_argument): Check against type_referred_to.
5231 * decl.c (grokvardecl): Check for declarator name before building
5232 DECL_ASSEMBLER_NAME.
5234 1998-10-14 Mark Mitchell <mark@markmitchell.com>
5236 * pt.c (lookup_template_class): Add comment.
5237 (instantiate_class_template): Don't mark the _TYPE node for
5238 member class templates as an instantiation.
5240 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
5242 * decl.c (grokfndecl): Fix my thinko.
5244 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
5246 * tinfo2.cc (fast_compare): Remove.
5247 (before): Just use strcmp.
5248 * tinfo.cc (operator==): Just use strcmp.
5250 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
5252 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
5255 1998-10-13 Mark Mitchell <mark@markmitchell.com>
5257 * cp-tree.h (specializations_of_same_template_p): Remove.
5258 * search.c (get_template_base): Don't use it.
5259 (get_template_base_recursive): Likewise.
5260 * pt.c (specializations_of_same_template_p): Remove.
5261 (unify): Don't use it.
5262 (lookup_template_class): Find the correct parent when setting
5263 CLASSTYPE_TI_TEMPLATE.
5265 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
5267 * tinfo.cc (operator==): Always compare names.
5269 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
5271 * decl.c (start_function): Fix cut-and-paste error.
5273 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
5275 * inc/typeinfo: Add #pragma interface.
5276 (operator!=): Just call operator==.
5277 * tinfo.cc: Add #pragma implementation.
5278 (operator==): Move from inc/typeinfo and tinfo2.cc.
5279 Check __COMMON_UNRELIABLE instead of _WIN32.
5281 * typeck2.c (my_friendly_abort): Add URL.
5283 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
5285 * decl.c (start_method): Added extra parameter for attributes.
5286 * cp-tree.h (start_method): Update prototype.
5287 * parse.y (fn.def2): Update start_method parameter list.
5289 1998-10-11 Mark Mitchell <mark@markmitchell.com>
5291 * cp-tree.h (specializations_of_same_template_p): Declare.
5292 * pt.c (specializations_of_same_template_p): New function.
5294 * search.c (get_template_base): Use it.
5295 (get_template_base_recursive): Likewise.
5297 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
5299 * decl2.c (start_objects): Add new variable `joiner' and
5300 initialize it properly.
5302 1998-10-09 Mark Mitchell <mark@markmitchell.com>
5304 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
5305 change to vtable types.
5307 * cvt.c (ocp_convert): Avoid infinite recursion caused by
5310 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
5312 * pt.c (resolve_overloaded_unification): New fn.
5313 (try_one_overload): Likewise.
5314 (unify): Don't fail on unknown type.
5315 (type_unification_real): Likewise. Use resolve_overloaded_unification
5316 to handle an overloaded argument.
5317 (template_args_equal): Split out...
5318 (comp_template_args): From here.
5319 (determine_specialization): Also allow a template with more
5320 parms than were explicitly specified.
5321 * cp-tree.h: Add template_args_equal.
5322 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
5324 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
5326 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
5329 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
5331 * typeck.c (unsigned_type): Only return TItype nodes when
5332 HOST_BITS_PER_WIDE_INT is >= 64 bits.
5333 (signed_type): Likewise.
5334 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
5335 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5336 (init_decl_processing): Only create TItype nodes when
5337 HOST_BITS_PER_WIDE_INT is >= 64 bits.
5338 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
5339 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5341 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5343 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
5344 (gxx.gperf): Update comments describing invocation flags.
5345 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
5347 1998-10-07 Mark Mitchell <mark@markmitchell.com>
5349 * class.c (finish_struct_1): Add commentary on previous change.
5351 * cp-tree.h (vtbl_ptr_type_node): New variable.
5352 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
5353 already of the right type.
5354 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
5355 Simplify code to grow vtable.
5356 * decl.c (vtbl_ptr_type_node): Define.
5357 (init_decl_processing): Initialize it.
5359 1998-10-06 Mark Mitchell <mark@markmitchell.com>
5361 * cp-tree.def (PTRMEM_CST): New tree node.
5362 * cp-tree.h (ptrmem_cst): New type.
5363 (lang_type): Remove local_typedecls.
5364 (dummy): Increase to 12 bits from 11.
5365 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
5366 (PTRMEM_CST_CLASS): New macro.
5367 (PTRMEM_CST_MEMBER): Likewise.
5368 (current_access_specifier): New variable.
5369 (current_class_type): Remove duplicate declaration.
5370 (finish_struct): Change prototype.
5371 (unreverse_member_declarations): New function.
5372 (pushdecl_class_level): Change prototype.
5373 (grok_enum_decls): Remove.
5374 (fixup_anonymous_union): New function.
5375 (grok_x_components): Change prototype.
5376 (tsubst_chain): Remove.
5377 (finish_member_template_decl): Likewise.
5378 (check_explicit_specialization): Fix indentation.
5379 (finish_class_definition): Change prototype.
5380 (finish_member_class_template): Likewise.
5381 (finish_member_declaration): New function.
5382 (check_multiple_declarators): Likewise.
5383 * class.c (class_stack_node_t): New type.
5384 (current_class_base): Remove.
5385 (current_class_stack): Change type.
5386 (current_access_specifier): New variable.
5387 (grow_method): Remove.
5388 (check_member_decl_is_same_in_complete_scope): Break out from
5390 (make_method_vec): New function.
5391 (free_method_vec): Likewise.
5392 (add_implicitly_declared_members): Break out from finish_struct_1.
5393 (free_method_vecs): New variable.
5394 (add_method): Rework for direct use from parser.
5395 (handle_using_decl): Watch for NULL_TREE while iterating through
5396 CLASSTYPE_METHOD_VEC.
5397 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
5398 just do some error-checking.
5399 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
5400 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
5401 (finish_struct): Change prototype. Simplify; fields and methods
5402 are already set up at this point.
5403 (init_class_processing): Set up current_class_stack.
5404 (pushclass): Save current_access_specifier.
5405 (popclass): Restore it.
5406 (currently_open_class): Simplify.
5407 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
5408 * decl.c (saved_scope): Add access_specifier.
5409 (maybe_push_to_top_level): Save it.
5410 (pop_from_top_level): Restore it.
5411 (maybe_process_template_type_declaration): Use
5412 finish_member_declaration.
5413 (pushtag): Likewise.
5414 (pushdecl_class_level): Don't return a value.
5415 (fixup_anonymous_union): Break out from grok_x_components.
5416 (shadow_tag): Use it.
5417 (xref_tag): Complain about using an elaborated type specifier to
5418 reference a template type parameter or typedef name.
5419 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
5420 (current_local_enum): Remove.
5421 (build_enumerator): Call finish_member_declaration.
5422 (grok_enum_decls): Remove.
5423 * decl2.c (grok_x_components): Simplify.
5424 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
5425 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
5426 (merge_functions): Add to comment.
5427 (arg_assoc_type): Prototype.
5428 (arg_assoc): Pass as many arguments as there are parameters.
5429 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
5431 * expr.c (cpls_expand_expr): Remove dead code. Handle
5433 * friend.c (do_friend): Lookup friends when in nested classes.
5435 * init.c (build_offset_ref): Do lookup even for classes that are
5436 only partially defined.
5437 (decl_constant_value): Remove dead code.
5438 * method.c (build_overload_value): Remove hack where by TYPE was
5439 not a TYPE. Handle PTRMEM_CST.
5440 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
5442 * parse.y (components, notype_components, component_decl,
5443 component_decl_1, component_declarator, component_declarator0):
5444 Now all are itype rather than ttype. Rework to add members to
5446 (typesqpecqual_reserved): Use check_multiple_declarators.
5447 (structsp): Update class to finish_class_definition.
5448 (do_xref_defn): Unsplit into named_class_head.
5449 (access_specifier): Set current_access_specifier.
5450 * pt.c (set_current_access_from_decl): New function.
5451 (finish_member_template_decl): Don't take the parameters.
5452 (comp_template_args): Make more robust.
5453 (lookup_template_class): Don't use current_local_enum.
5454 (for_each_template_parm): Handle PTRMEM_CST.
5455 (instantiate_class_template): Use set_current_access_from_decl,
5456 finish_member_declaration and unreverse_member_declarations. Set
5457 lineno/input_filename before generating implicit member functions.
5458 (type_unification_real): Don't assume back-unification happens
5459 only for the last argument.
5460 (regenerate_decl_from_template): Call pushclass a bit earlier.
5461 (tsubst_chain): Remove.
5462 (tsubst_enum): Use set_current_access_from_decl.
5463 (set_mangled_name_for_template_decl): Fix indentation.
5464 * search.c (lookup_fnfields_1): Change iteration through
5465 CLASSTYPE_METHOD_VEC.
5466 (dfs_pushdecls): Likewise.
5467 (dfs_compress_decls): Likewise.
5468 (add_conversions): Likewise.
5469 * semantics.c (finish_class_definition): Don't take components.
5470 Change call to finish_struct.
5471 (finish_member_declaration): New function.
5472 (finish_member_class_template): Don't take template parameters.
5473 Change call to grok_x_components. Call finish_member_template_decl.
5474 (check_multiple_declarators): New function.
5475 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
5476 a passed in fieldlist.
5477 * tree.c (search_tree): Handle PTRMEM_CST.
5479 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
5480 INTEGER_CSTs, for pointer-to-data members.
5482 * call.c (resolve_args): Resolve template specializations, if
5485 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5487 * Makefile.in (spew.o): Depend on toplev.h.
5489 * call.c (compare_ics): Initialize variables `deref_from_type2',
5490 `deref_to_type1' and `deref_to_type2'.
5492 * except.c (get_eh_type): Hide prototype and definition.
5493 (process_start_catch_block_old): Remove unused static prototype.
5495 * pt.c (tsubst_decl): Initialize variable `argvec'.
5497 * spew.c: Include toplev.h.
5499 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
5501 * pt.c (instantiate_decl): Do save and restore file position.
5503 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
5505 * method.c (build_decl_overload_real): Clear
5506 numeric_output_need_bar after __.
5508 1998-10-05 Nathan Sidwell <nathan@acm.org>
5510 * call.c (build_new_method_call): Issue 'incomplete type' error,
5511 if class is not defined.
5513 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5515 * call.c (build_object_call): Move declaration of variable
5516 `fn' into the scope where it is used. Don't access variable
5517 `fn' when it is uninitialized, instead use `fns'.
5519 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5521 * errfn.c (cp_thing): Print buf as a string not as a printf format
5522 to avoid problems with the operator%. Consequently, `%%' sequences
5523 in format are copied as `%' in buf.
5525 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
5527 * pt.c (pop_tinst_level): Call extract_interface_info.
5528 (instantiate_decl): Don't save and restore file position.
5530 * decl.c (cp_finish_decl): Make statics in extern inlines and
5531 templates common, if possible and the target doesn't support weak
5534 * decl.c (grokdeclarator): Remove redundant calls to
5535 build_type_variant and some duplicated code.
5536 * sig.c (build_signature_reference_type): Only take the type parm.
5537 (build_signature_pointer_type): Likewise.
5538 * tree.c (build_cplus_method_type): Adjust.
5539 * cp-tree.h: Update.
5541 1998-10-04 Mark Mitchell <mark@markmitchell.com>
5543 * call.c (build_over_call): Make pedwarns about dropped qualifiers
5544 into full-fledged errors.
5545 * cvt.c (convert_to_reference): Likewise.
5546 * typeck.c (convert_for_assignment): Likewise.
5548 * search.c (expand_upcast_vtables): In addition to unsetting
5549 TREE_READONLY, remove top-level const type qualifier.
5551 1998-10-03 Mark Mitchell <mark@markmitchell.com>
5553 * class.c (current_class_ptr, current_class_ref): Clarify
5555 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
5556 NOP type conversions.
5557 * decl.c (decls_match): Use comptypes directly; ignore
5558 qualifiers on the DECL.
5559 (duplicate_decls): Remove qualifier checks on DECL.
5560 (grokdeclarator): Make the type built up include top-level
5562 * decl2.c (do_dtors): Fix spelling error.
5563 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
5564 when printing type information.
5565 * init.c (build_new_1): Add documentation. Deal with the fact
5566 that type of allocated memory now contains qualifiers.
5567 * lex.c (is_global): Improve error-recovery.
5568 * sig.c (build_member_function_pointer): Don't cast away const
5569 on fields of sigtable_entry_type.
5570 * tree.c (lvalue_type): Don't look at top-level qualifiers on
5572 * typeck.c (decay_conversion): Likewise.
5573 (build_component_ref): Make sure the type of the COMPONENT_REF
5574 contains top-level qualifiers, as appropriate. Improve
5576 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
5577 (build_array_ref): Likewise.
5578 (build_unary_op): Improve error-recovery.
5579 (unary_complex_lvalue): Make taking the address a bound member
5580 function an error, not a sorry.
5581 (build_conditional_expr): Look at the type qualifiers, not the
5582 qualifiers on the expression itself.
5584 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
5586 * decl2.c (merge_functions): Remove duplicates.
5588 * decl2.c: Add -f{no-,}implicit-inline-templates.
5589 (import_export_decl): Check it.
5591 * decl.c (lookup_name_real): Template parms also take precedence
5592 over implicit typename. Only warn if yylex.
5594 * typeck.c (build_conditional_expr): Only fold if ifexp is an
5597 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
5600 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
5602 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
5603 * class.c (build_vbase_pointer): Use it.
5604 * rtti.c (expand_class_desc): Likewise.
5605 * tree.c (build_vbase_pointer_fields): Likewise.
5607 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
5609 * decl.c (start_decl): Add invocation of
5610 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
5611 (start_function): Add invocation of
5612 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
5614 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
5615 HANDLE_GENERIC_PRAGMAS.
5617 1998-09-28 Anthony Green <green@cygnus.com>
5619 * semantics.c (finish_asm_stmt): Always permit volatile asms.
5621 1998-09-28 Mark Mitchell <mark@markmitchell.com>
5623 * decl.c (grokdeclarator): Tighten checks for invalid
5624 destructors. Improve error-messages and error-recovery.
5625 * decl2.c (check_classfn): Don't assume that mangled destructor
5626 names contain type information.
5628 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
5630 * search.c (get_base_distance): Remove assert.
5632 * decl2.c (build_anon_union_vars): Don't process a field with no
5634 (finish_anon_union): Also complain about local anon unions with no
5637 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
5639 * decl.c (lookup_namespace_name): If the name is a namespace,
5640 return it immediately.
5642 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5644 * cp-tree.h (define_case_label): Remove unused parameter.
5645 (check_java_method): Likewise.
5646 (grokclassfn): Likewise.
5647 (expand_aggr_init): Likewise.
5648 (build_x_delete): Likewise.
5649 (maybe_end_member_template_processing): Likewise.
5650 (unshare_base_binfos): Add prototype.
5651 (string_conv_p): Likewise.
5652 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
5654 * cvt.c (build_up_reference): Remove unused parameter
5655 `checkconst', all callers changed.
5656 (build_type_conversion): Mark parameter `code' with
5658 (build_expr_type_conversion): Initialize variable `conv'.
5660 * decl.c (push_namespace): Initialize variable `d'.
5661 (define_case_label): Remove unused parameter `decl', all callers
5664 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
5665 `argc' with ATTRIBUTE_UNUSED.
5666 (grokclassfn): Remove unused parameter `cname', all callers
5668 (check_java_method): Likewise for parameter `ctype'.
5669 (copy_assignment_arg_p): Mark parameter `virtualp' with
5671 (finish_prevtable_vardecl): Likewise for parameter `prev'.
5673 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
5675 * init.c (expand_aggr_init_1): Remove unused parameter
5676 `alias_this', all callers changed.
5677 (expand_aggr_init): Likewise.
5678 (expand_default_init): Likewise.
5679 (build_new_1): Initialize variable `susp'.
5680 (build_x_delete): Remove unused parameter `type', all callers
5683 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
5685 (readescape): Use (unsigned) value in shift.
5686 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
5687 comparing to a signed quantity.
5689 * pt.c (maybe_end_member_template_processing): Remove unused
5690 parameter `decl', all callers changed.
5691 (check_explicit_specialization): Add braces around empty body in
5693 (current_template_args): Initialize variable `args'.
5694 (lookup_template_class): Likewise for variable `prev_local_enum'.
5695 (tsubst_decl): Likewise for variable `r'.
5696 (set_mangled_name_for_template_decl): Initialize variable
5699 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
5700 Likewise for variable `i'.
5701 (yylex): Initialize variable `trrr'.
5703 * typeck.c (compparms): Mark variable `strict' with
5706 * xref.c (simplify_type): Cast argument of ctype function to
5709 1998-09-24 Mark Mitchell <mark@markmitchell.com>
5711 * cp-tree.h (language_lvalue_valid): Remove.
5712 * decl.c (grokdeclarator): Don't disallow references to functions.
5713 * tree.c (lvalue_p_1): New function, combining duplicated
5716 (real_lvalue_p): Likewise.
5717 * typeck.c (language_lvalue_valid): Remove.
5718 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
5719 they don't have TREE_READONLY set.
5720 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
5722 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
5724 * spew.c (yylex): Give diagnostic.
5725 * hash.h (is_reserved_word): Add export.
5726 * gxx.gperf: Likewise.
5727 * lex.h (rid): Add RID_EXPORT.
5728 * lex.c (init_parse): Likewise.
5730 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
5732 * friend.c (do_friend): Make warning a full sentence.
5734 1998-09-22 Mark Mitchell <mark@markmitchell.com>
5736 * parse.y (component_decl_list): Improve error-recovery.
5738 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
5740 * decl.c (make_typename_type): Move error to point where name
5741 variable can be used by dump_type.
5743 1998-09-22 Mark Mitchell <mark@markmitchell.com>
5745 * decl.c (grokfndecl): Improve error-recovery.
5746 * decl2.c (grokfield): Likewise.
5747 * pt.c (finish_member_template_decl): Likewise.
5749 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
5751 * method.c (hack_identifier): Finding multiple members is always
5754 1998-09-21 Per Bothner <bothner@cygnus.com>
5756 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
5758 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
5760 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
5762 1998-09-20 Mark Mitchell <mark@markmitchell.com>
5764 * class.c (maybe_warn_about_overly_private_class): Reformat.
5766 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
5768 * exception.cc (__cplus_type_matcher): Realign some code.
5770 1998-09-16 Mark Mitchell <mark@markmitchell.com>
5772 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
5773 (tinfo2.o): Likewise.
5774 (exception.o): Likewise.
5776 (opnew.o): Likewise.
5777 (opnewnt.o): Likewise.
5778 (opvnew.o): Likewise.
5779 (opvnewnt.o): Likewise.
5780 (opdel.o): Likewise.
5781 (opdelnt.o): Likewise.
5782 (opvdel.o): Likewise.
5783 (opvdelnt.o): Likewise.
5785 1998-09-16 Richard Henderson <rth@cygnus.com>
5787 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
5789 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
5791 * call.c (build_field_call): Handle static data members too.
5793 * typeck.c (comptypes): When comparing pointer types, check
5794 whether referred types match even in strictest modes.
5796 1998-09-15 Mark Mitchell <mark@markmitchell.com>
5798 * cp-tree.h: Revert previous change.
5799 (finish_struct_methods): Remove declaration.
5800 * class.c: Revert previous change.
5801 (maybe_warn_about_overly_private_class): New function.
5802 (finish_struct_methods): Declare here, and make static. Remove
5803 unnecessary parameters. Tidy slightly. Use
5804 maybe_warn_about_overly_private_class.
5805 (finish_struct_1): Adjust. Remove check for private constructors,
5807 (finish_struct): Adjust.
5809 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
5811 * except.c (expand_start_catch_block): No need to check for new
5813 (process_start_catch_block_old): Deleted.
5814 (process_start_catch_block): Add call to start_decl_1().
5815 (expand_end_catch_block): Add call to end_catch_handler().
5816 * exception.cc (__cplus_type_matcher): Only check the exception
5817 language if there is an exception table.
5819 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
5821 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
5822 as used to prevent conflicts with virtual function tables.
5824 1998-09-14 Mark Mitchell <mark@markmitchell.com>
5826 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
5827 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
5828 * class.c (maybe_class_too_private_p): New function.
5829 (finish_struct_methods): Use it.
5830 (finish_struct_1): Likewise.
5831 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
5834 * pt.c (check_specialization_scope): Fix spelling error.
5835 (check_explicit_specialization): Remove code to handle explicit
5836 specializations in class scope; they are now correctly diagnosed
5839 1998-09-10 Mark Mitchell <mark@markmitchell.com>
5841 * decl.c (pushdecl): Don't copy types if the
5842 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
5845 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5847 * class.c (get_enclosing_class): New function.
5848 (is_base_of_enclosing_class): Likewise.
5849 * cp-tree.h (get_enclosing_class): Declare.
5850 (is_base_of_enclosing_class): Likewise.
5851 * pt.c (coerce_template_parms): Use them.
5853 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
5855 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
5856 null to decide whether to use it.
5858 * error.c (dump_type_real): Handle NAMESPACE_DECL.
5859 * parse.y (base_class.1): Avoid crash on error.
5861 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
5863 * decl.c (make_typename_type): If context is a namespace, the code
5866 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
5868 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
5870 1998-09-08 Mark Mitchell <mark@markmitchell.com>
5872 * cp-tree.h (anonymous_namespace_name): Declare.
5873 * decl.c: Define it.
5874 (push_namespace): Use anonymous_namespace_name, rather than local
5876 * error.c (dump_decl): If a namespace is named
5877 anonymous_namespace_name, call it {anonymous}.
5879 * decl.c (grokparms): Distinguish between references and pointers
5882 1998-09-08 Richard Henderson <rth@cygnus.com>
5883 Mark Mitchell <mark@markmitchell.com>
5885 * pt.c (process_partial_specialization): Consistently allocate
5886 and zero tpd.parms based on ntparms. Use tpd2.parms, not
5887 tpd.parms, where appropriate.
5889 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
5891 * Makefile.in (INCLUDES): Update after recent toplevel gcc
5894 1998-09-05 Mark Mitchell <mark@markmitchell.com>
5896 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
5897 * class.c (finish_struct): Remove hackery to deal with explicit
5898 specializations in class scope.
5899 * decl.c (grokfndecl): Improve error-recovery.
5900 * decl2.c (grokfield): Likewise.
5901 * pt.c (check_specialization_scope): New function.
5902 (begin_specialization): Call it.
5903 (process_partial_specialization): New function, split out from
5904 push_template_decl. Check partial specializations more
5906 (push_template_decl): Call it.
5907 (check_explicit_specialization): Don't attempt to handle explicit
5908 specializations in class scope.
5909 (template_parm_data): Document. Add current_arg and
5910 arg_uses_template_parms.
5911 (mark_template_parm): Set it.
5912 (tsubst_arg_types): Remove unused variable.
5913 * semantics.c (begin_class_definition): Tweak.
5915 1998-09-04 Mark Mitchell <mark@markmitchell.com>
5917 * inc/typeinfo (type_info::type_info(const char*)): Make
5920 * cp-tree.h (hash_tree_cons_simple): New macro.
5921 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
5922 (coerce_template_parms): Use make_temp_vec, instead of
5923 make_tree_vec. Document this behavior.
5924 (lookup_template_class): Likewise.
5925 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
5926 Remove dead code (and add assertion to check its deadness). Fix
5927 bug w.r.t. exception specifications.
5929 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
5931 * decl2.c (import_export_vtable): Always make artificials comdat.
5932 (import_export_decl): Likewise.
5933 * pt.c (mark_decl_instantiated): Likewise.
5935 1998-09-03 Mark Mitchell <mark@markmitchell.com>
5937 * cp-tree.h (finish_globally_qualified_member_call_expr):
5939 (finish_qualified_call_expr).
5940 * semantics.c: Likewise.
5941 * parse.y (primary): Use it.
5942 * method.c (hack_identifier): Remove redundant code.
5944 * init.c (resolve_offset_ref): Call convert_from_reference to
5945 handle members of reference type. Improve error recovery.
5947 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
5949 * cp-tree.h: Declare warn_nontemplate_friend.
5950 * decl2.c (lang_decode_option): Set.
5951 * lang-options.h: Add -Wnon-template-friend.
5952 * friend.c (do_friend): Use to toggle non-template function warning.
5954 1998-09-03 Mark Mitchell <mark@markmitchell.com>
5956 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
5957 corresponding INTEGER_CSTs when processing_template_decl.
5958 * pt.c (tsubst_enum): Tweak accordingly.
5960 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5962 * decl.c (pushdecl_class_level): Add warning here.
5965 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
5967 * cvt.c (convert_pointer_to_real): Tidy.
5968 * search.c (get_base_distance_recursive): Simplify.
5969 (get_base_distance): Likewise.
5971 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
5974 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
5976 * lex.c (check_newline): Call HANDLE_PRAGMA before
5977 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
5978 if unknown pragmas are encountered.
5979 (handle_sysv_pragma): Interpret return code from
5980 handle_pragma_token (). Return success/failure indication rather
5981 than next unprocessed character.
5982 (pragma_getc): New function: retrieves characters from the
5983 input stream. Defined when HANDLE_PRAGMA is defined.
5984 (pragma_ungetc): New function: replaces characters back into the
5985 input stream. Defined when HANDLE_PRAGMA is defined.
5987 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
5989 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
5990 * class.c (build_vtable_entry_ref): Likewise.
5992 1998-09-01 Mark Mitchell <mark@markmitchell.com>
5994 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
5995 * decl2.c (import_export_decl): Likewise.
5996 * pt.c (instantiate_decl): Use it.
5998 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
6000 * decl.c (lookup_name_real): Also do implicit typename thing for
6001 artificial TYPE_DECLs.
6002 * search.c (lookup_field): Likewise.
6003 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
6004 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
6005 (enter_scope_of): Extract type from implicit typename.
6006 (begin_class_definition): Likewise.
6007 * lex.c (identifier_type): Handle implicit typename when checking
6010 * cp-tree.h: Declare flag_strict_prototype.
6011 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
6013 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
6014 specified, set it to the value of pedantic.
6016 1998-09-01 Mark Mitchell <mark@markmitchell.com>
6018 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
6020 1998-08-31 Mark Mitchell <mark@markmitchell.com>
6022 * decl.c (finish_enum): Handle member enums of classes declared in
6025 * decl2.c (grok_x_components): Strip attributes before calling
6028 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
6030 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
6031 -fenum-int-equivalence and -fno-nonnull-objects.
6032 * class.c (check_for_override): Remove support for -fall-virtual.
6033 (finish_struct_1): Likewise.
6034 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
6035 * typeck.c (build_binary_op_nodefault): Likewise.
6036 * cvt.c (ocp_convert): Likewise.
6037 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
6038 * class.c (build_vbase_path): Likewise.
6040 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
6042 * Makefile.in (INTERFACE): New, set to 1.
6044 1998-08-30 Mark Mitchell <mark@markmitchell.com>
6046 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
6047 comparing with global_namespace.
6048 (dump_aggr_type): Likewise.
6050 * decl.c (grokfndecl): Issue error on declaration of friend
6051 templates with explicit template arguments.
6053 * pt.c (convert_template_argument): New function, split out
6055 (coerce_template_parms): Here.
6056 (tsubst): Attempt better error-recovery.
6058 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
6060 * pt.c (decl_template_parm_p): Add checks for
6061 TEMPLATE_TEMPLATE_PARM.
6063 1998-08-28 Mark Mitchell <mark@markmitchell.com>
6065 * lex.c (do_identifier): Fix thinko in previous change.
6067 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
6069 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
6070 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
6072 1998-08-28 Richard Henderson <rth@cygnus.com>
6074 Add support for discarding unused virtual functions.
6075 * lang-options.h: Add -fvtable-gc.
6076 * cp-tree.h: Add flag_vtable_gc.
6077 * decl2.c (output_vtable_inherit): New fn.
6078 (finish_vtable_vardecl): Call it.
6079 * class.c (build_vtable_entry_ref): New fn.
6080 (build_vtbl_ref): Call it.
6082 1998-08-28 Mark Mitchell <mark@markmitchell.com>
6084 * cp-tree.h (build_enumerator): Take the enumeration type as a
6086 * decl.c (finish_enum): Don't set the TREE_TYPE for the
6087 enumeration constant values if we're processing_template_decls.
6088 Don't set the type for the CONST_DECLs either; that's done in
6090 (build_enumerator): Take the enumeration type as a
6092 * lex.c (do_identifier): Don't resolve enumeration constants while
6093 processing template declarations, even if they happen to be
6094 TEMPLATE_PARM_INDEXs.
6096 * parse.y (current_enum_type): New variable.
6097 (primary): Don't allow statement-expression in local classes just
6098 as we don't in global classes.
6099 (structsp): Use current_enum_type.
6100 (enum_list): Likewise.
6101 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
6102 finish_enum; they no longer occur.
6104 * cp-tree.h (finish_base_specifier): New function.
6105 * parse.y (base_class): Use it.
6106 * semantics.c (finish_base_specifier): Define it.
6108 * parse.y (structsp): Warn on use of typename outside of template
6111 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
6113 * lex.c (handle_cp_pragma): Remove #pragma vtable.
6114 * lang-options.h: Remove +e options.
6115 * decl2.c (lang_decode_option): Likewise.
6116 (import_export_vtable): Don't check write_virtuals.
6117 (finish_vtable_vardecl, finish_file): Likewise.
6118 * search.c (dfs_debug_mark): Likewise.
6119 * semantics.c (begin_class_definition): Likewise.
6120 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
6122 * call.c (build_over_call): Check flag_elide_constructors.
6123 * decl2.c: flag_elide_constructors defaults to 1.
6124 * typeck.c (convert_arguments): Remove return_loc parm.
6125 (build_function_call_real): Adjust.
6127 * search.c: Tear out all mi_matrix and memoize code.
6128 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
6129 * lang-options.h: Remove documentation for -fhandle-exceptions,
6130 -fmemoize-lookups and -fsave-memoized.
6131 * cp-tree.h: Lose mi_matrix and memoize support.
6132 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
6133 * class.c: Lose struct class_level.
6134 (pushclass, popclass): Lose memoize support.
6135 * init.c (build_offset_ref): Likewise.
6137 Never change BINFO_INHERITANCE_CHAIN.
6138 * init.c (emit_base_init): Change modification of
6139 BINFO_INHERITANCE_CHAIN to an assert.
6140 * search.c (get_base_distance_recursive): Likewise.
6141 (get_base_distance): Likewise.
6142 (lookup_member): Likewise.
6143 (convert_pointer_to_single_level): Likewise.
6144 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
6145 (lookup_fnfields): Likewise.
6146 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
6147 (unshare_base_binfos): Don't call propagate_binfo_offsets.
6148 (layout_basetypes): Call propagate_binfo_offsets instead of
6149 unshare_base_binfos.
6150 * decl.c (xref_basetypes): Call unshare_base_binfos.
6151 * pt.c (instantiate_class_template): Likewise.
6152 * tree.c (reverse_path): Remove 'copy' parm; always make a
6154 * class.c (build_vbase_path): Just call it.
6155 * search.c (compute_access): Likewise. Don't re-reverse.
6157 1998-08-27 Mark Mitchell <mark@markmitchell.com>
6159 * class.c (build_vbase_path): Use reverse_path.
6160 (finish_base_struct): Move warnings for inaccessible bases to
6162 (modify_one_vtable): Remove check of TREE_USED (binfo).
6163 (fixup_vtable_deltas1): Likewise.
6164 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
6165 (xref_tag): Remove binfos parameter.
6166 (make_binfo): Remove chain parameter.
6167 (reverse_path): Add copy parameter.
6168 * decl.c (init_decl_processing): Change calls to xref_tag.
6169 (xref_tag): Remove binfos parameter.
6170 (xref_basetypes): Change calls to make_binfo.
6171 * decl2.c (grok_x_components): Change calls to xref_tag.
6172 (handle_class_head): Likewise.
6173 * friend.c (do_friend): Likewise.
6174 * lex.c (make_lang_type): Change calls to make_binfo.
6175 * parse.y (structsp): Change calls to xref_tag.
6176 (named_complex_class_head_sans_basetype): Likewise.
6177 (named_class_head): Likewise.
6178 * rtti.c (init_rtti_processing): Likewise.
6179 * search.c (compute_access): Change calls to reverse_path.
6180 (dfs_get_vbase_types): Change calls to make_binfo.
6181 (get_vbase_types): Remove dead code.
6182 * tree.c (unshare_base_binfos): Change calls to make_binfo.
6183 (layout_basetypes): Warn here about inaccessible bases.
6184 (make_binfo): Remove chain parameter.
6185 (reverse_path): Add copy parameter.
6187 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
6189 * class.c: #if 0 complete_type_p.
6190 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
6191 * method.c (process_overload_item): Likewise.
6192 * typeck.c (comp_target_types): Likewise.
6194 Stop sharing binfos for indirect virtual bases.
6195 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
6196 (layout_basetypes): Likewise.
6197 (unshare_base_binfos): Copy vbases, too.
6198 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
6199 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
6200 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
6201 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
6202 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
6203 reference to BINFO_VIA_PUBLIC.
6204 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
6205 (push_class_decls): Use them.
6206 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
6207 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
6209 1998-08-27 Mark Mitchell <mark@markmitchell.com>
6211 * decl.c (build_enumerator): Set DECL_CONTEXT for the
6214 1998-08-26 Mark Mitchell <mark@markmitchell.com>
6216 * cp-tree.h (finish_enum): Change prototype.
6217 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
6218 VALUES parameter. Don't try to compute mins/maxs if
6219 processing_template_decl.
6220 * parse.y (structsp): Use new calling sequence for finish_enum.
6221 * pt.c (tsubst_enum): Likewise. Take the new type as input.
6222 (lookup_template_class): Remove unused variables. Tweak.
6223 Register enums on instantiation list before substituting
6224 enumeration constants.
6225 (tsubst_decl): Remove unused variables.
6226 (regenerate_decl_from_template): Likewise.
6228 * decl.c (duplicate_decls): Don't obliterate the
6229 DECL_TEMPLATE_INFO for a template if we're not replacing it with
6232 * lex.c (do_identifier): Fix typo in comment.
6234 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6236 * errfn.c: Remove stdarg.h/varargs.h.
6239 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
6241 * pt.c (tsubst_copy): Only do typename overloading on an
6242 IDENTIFIER_NODE that happens to look like a typename if it actually
6243 has a type for us to use.
6245 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
6247 * typeck.c (comp_cv_target_types): Split out...
6248 (comp_target_types): From here. Don't allow cv-qual changes under
6249 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
6250 (build_ptrmemfunc): Pass 1 to nptrs.
6251 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
6253 1998-08-25 Mark Mitchell <mark@markmitchell.com>
6255 * search.c (dependent_base_p): Don't compare a binfo to
6256 current_class_type; use the TREE_TYPE of the binfo instead.
6258 * cp-tree.h (CLASS_TYPE_P): Revise definition.
6260 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
6262 * decl.c (duplicate_decls): Don't complain about different
6263 exceptions from an internal decl even if pedantic.
6265 * typeck.c (convert_for_assignment): Converting from pm of vbase
6266 to derived is an error, not a sorry.
6268 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
6269 * class.c (fixed_type_or_null): Rename from
6270 resolves_to_fixed_type_p. Return the dynamic type of the
6271 expression, if fixed, or null.
6272 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
6273 does not match the static type.
6274 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
6275 resolves_to_fixed_type_p again.
6277 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6279 * pt.c (tsubst_decl): Move special case code for dealing with
6280 tricky friend templates here from ...
6281 (regenerate_decl_from_template): Here.
6283 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6285 * decl.c (start_decl): Remove redundant linkage check.
6287 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
6289 * typeck.c (c_expand_return): Handle the case that valtype
6290 is wider than the functions return type.
6292 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6294 * cp-tree.h (CLASS_TYPE_P): New macro.
6295 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
6296 * pt.c (process_template_parm): Undo previous change.
6298 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
6300 * cp-tree.h: Declare.
6301 * pt.c (decl_template_parm_p): New function.
6302 * decl.c (pushdecl): Check decls for redeclaring template parms.
6303 (xref_tag): Make redeclaration an error, print decl.
6304 * decl2.c (grokfield): Check field_decls for redeclaration as well.
6306 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6308 * parse.y (primary): Fix up the type of string constants.
6310 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6312 * typeck.c (convert_for_initialization): Move check for odd uses
6313 of NULL to avoid duplicate warnings.
6315 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6317 * tree.c (lvalue_type): Fix for arrays.
6318 * typeck.c (string_conv_p): New fn.
6319 (convert_for_assignment): Use it.
6320 (build_unary_op): Use lvalue_type.
6321 * call.c (standard_conversion, convert_like): Use string_conv_p.
6322 (add_function_candidate): Use lvalue_type.
6323 * cvt.c (convert_to_reference): Likewise.
6324 * decl2.c (lang_decode_option): Ignore -traditional.
6325 * decl.c (init_decl_processing): flag_writable_strings inhibits
6328 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
6330 * lang-options.h (lang_options): Add fconst-strings to the list
6332 * decl2.c (lang_f_options, lang_decode_option): Likewise.
6334 1998-08-24 Nathan Sidwell <nathan@acm.org>
6336 * lex.c (real_yylex): Don't warn about long long constants if
6337 we're allowing long long.
6339 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6341 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
6342 accessing bindings directly.
6344 * search.c (my_tree_cons): Reimplement.
6346 * lang-specs.h: Remove __HONOR_STD.
6347 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
6349 1998-08-23 Mark Mitchell <mark@markmitchell.com>
6351 * decl.c (grokdeclarator): Complain about in-class initialization
6352 of aggregates and/or references.
6353 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
6354 TEMPLATE_TYPE_PARMs.
6356 * decl2.c (grok_array_decl): Add comment.
6357 (mark_used): Don't instantiate an explicit instantiation.
6358 * friend.c (make_friend_class): Remove bogus comment. Fix check
6359 for partial specializations.
6360 * pt.c (check_explicit_specialization): Don't
6361 SET_DECL_EXPLICIT_INSTANTIATION here.
6362 (mark_decl_instantiated): Or here.
6363 (do_decl_instantiation): Do it here, instead. Add checks for
6364 duplicate explicit instantiations, etc. Tidy.
6365 (do_type_instantiation): Likewise.
6366 (instantiate_decl): Improve comments. Complain about explicit
6367 instantiations where no definition is available.
6369 * cp-tree.h (ansi_null_node): Remove.
6370 * call.c (build_over_call): Warn about converting NULL to an
6372 * cvt.c (build_expr_type_conversion): Likewise. Use
6373 null_ptr_cst_p instead of expanding it inline.
6374 * decl.c (ansi_null_node): Remove.
6375 (init_decl_processing): Make null_node always have integral type.
6376 * except.c (build_throw): Warn about converting NULL to an
6378 * lex.c (init_parse): Remove handling of ansi_null_node.
6379 * pt.c (type_unification_real): Don't convert NULL to void* type.
6380 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
6381 (convert_for_assignment): Warn about converting NULL to an
6383 (convert_for_initialization): Likewise.
6385 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
6387 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
6388 * pt.c (coerce_template_parms): Use no_linkage_check.
6389 * decl.c (grokvardecl): Likewise.
6390 (grokfndecl): Likewise. Members of anonymous types have no linkage.
6392 * method.c (process_overload_item): Remove useless code.
6394 1998-08-20 Per Bothner <bothner@cygnus.com>
6396 Handle new'ing of Java classes.
6397 * init.c (build_class_classref): New function.
6398 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
6399 constructor does not return this; don't need to exception-protect.
6401 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
6402 * decl2.c (acceptable_java_type): Handle template-derived types.
6404 1998-08-20 Per Bothner <bothner@cygnus.com>
6406 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
6408 1998-08-20 Mark Mitchell <mark@markmitchell.com>
6410 * decl.c (duplicate_decls): Always merge the old and new patterns
6411 for templates, regardless of whether or not the new one has
6412 DECL_INITIAL. Don't throw away specializations. Merge
6414 * pt.c (tsubst_decl): Use the right pattern when calculating the
6415 complete args for a new template instance.
6416 (do_decl_instantiation): Fix typo in comment.
6417 (regenerate_decl_from_template): Deal with tricky friend template
6419 (instantiate_decl): Likewise.
6421 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
6423 * init.c (build_builtin_delete_call): Add missing assemble_external
6426 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
6428 * parse.y (notype_unqualified_id): Also accept ~A<int>.
6430 1998-08-19 Mark Mitchell <mark@markmitchell.com>
6432 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
6434 * except.c (build_throw): Warn when NULL is thrown, even with
6435 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
6438 * cp-tree.h (ansi_null_node): New variable.
6439 * decl.c (ansi_null_node): New variable.
6440 (init_decl_processing): Initialize its type.
6441 * lex.c (init_parse): Initialize its value. Use ansi_null_node
6442 for null_node in non-ANSI mode.
6443 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
6444 place of null_node to avoid spurious errors.
6446 1998-08-17 Mark Mitchell <mark@markmitchell.com>
6448 * cp-tree.h (enter_scope_of): New function.
6449 * parse.y (complex_direct_notype_declarator): Use it.
6450 * semantics.c (enter_scope_of): New function.
6452 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
6454 * decl.c (grokparms): No, here.
6456 * decl.c (grokdeclarator): Catch parm with pointer to array of
6457 unknown bound here...
6458 * method.c (process_overload_item): ...not here.
6460 * gxxint.texi: Remove obsolete documentation of overloading code.
6462 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
6463 * class.c (finish_struct_bits): Likewise.
6465 * tree.c (lvalue_type): Fix for arrays.
6466 * typeck.c (build_unary_op): Use lvalue_type.
6467 * call.c (add_function_candidate): Likewise.
6468 * cvt.c (convert_to_reference): Likewise.
6470 * decl2.c (lang_decode_option): Ignore -traditional.
6472 * init.c (build_offset_ref): Don't mess with error_mark_node.
6473 * lex.c (do_scoped_id): Use cp_error.
6475 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
6477 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
6479 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
6481 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
6483 * cp-tree.h (set_identifier_local_value): Provide prototype.
6485 * decl2.c (do_namespace_alias): Remove unused variables `binding'
6488 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
6490 * Makefile.in: Rename BBISON to BISON so that it can be properly
6491 inherited from the parent makefile.
6493 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
6495 * lang-options.h: Add -finit-priority.
6496 * decl2.c: Likewise. Check flag_init_priority instead of
6499 * decl2.c (setup_initp): New fn.
6500 (start_objects, finish_objects, do_ctors): Handle init_priority.
6501 (do_dtors, finish_file): Likewise.
6503 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
6505 * pt.c (tsubst_copy): Hush warning.
6507 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
6509 1998-08-12 Mark Mitchell <mark@markmitchell.com>
6511 * pt.c (print_template_context): Don't abort when instantiating a
6514 * decl.c (grokdeclarator): Issue errors on namespace qualified
6515 declarators in parameter lists or in class scope.
6517 1998-08-09 Mark Mitchell <mark@markmitchell.com>
6519 * pt.c (check_explicit_specialization): Don't abort on bogus
6520 explicit instantiations.
6522 1998-08-07 Mark Mitchell <mark@markmitchell.com>
6524 * typeck.c (require_complete_type): Use complete_type_or_else.
6525 (complete_type_or_else): Always return NULL_TREE on failure, as
6528 * pt.c (tsubst_aggr_type): Prototype.
6529 (tsubst_decl): New function, split out from tsubst. Set
6530 input_filename and lineno as appropriate.
6531 (pop_tinst_level): Restore the file and line number saved in
6533 (instantiate_class_template): Set input_filename and lineno as
6535 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
6536 context for a TYPENAME_TYPE is complete.
6538 * decl2.c (grokbitfield): Issue errors on bitfields declared with
6540 (do_dtors): As in do_ctors, pretend to be a member of the same
6541 class as a static data member while generating a call to its
6544 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
6545 conversions, even in complex virtual base class hierarchies.
6547 1998-08-06 Mark Mitchell <mark@markmitchell.com>
6549 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
6550 (TYPE_TEMPLATE_INFO): Likewise.
6551 (SET_TYPE_TEMPLATE_INFO): Likewise.
6552 (ENUM_TI_TEMPLATE): Likewise.
6553 (ENUM_TI_ARGS): Likewise.
6554 (lookup_nested_type_by_name): Remove.
6555 * decl.c (maybe_process_template_type_declaration): Handle enums.
6556 (start_enum): Don't check for primary-template enum declarations
6558 (finish_enum): Clean up, document. Make sure template enum
6559 constants get the correct type.
6560 (build_enumerator): Copy initializers for template enumerations,
6562 (grok_enum_decls): Document.
6563 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
6564 better. Build LOOKUP_EXPRs for local variables, even if they are
6566 * pt.c (tsubst_enum): Remove field_chain parameter.
6567 (template_class_depth): Include the depth of surrounding function
6569 (push_template_decl): Check for primary-template enum declarations
6570 here. Deal with enumeration templates.
6571 (lookup_template_class): Likewise.
6572 (for_each_template_parm): Likewise.
6573 (instantiate_class_template): Don't call tsubst_enum directly,
6574 call tsubst instead, to instantiate enums. Deal with all
6575 field_chain issues here, not in tsubst_enum.
6576 (lookup_nested_type_by_name): Remove.
6577 (tsubst_aggr_type): Revise handling of enumeration types.
6579 (tsubst_copy): Likewise.
6580 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
6582 1998-08-04 Mark Mitchell <mark@markmitchell.com>
6584 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
6585 uses template parameters.
6586 * method.c (build_template_parm_names): Use the full set of
6587 template arguments for tsubst'ing.
6588 (build_overload_identifier): Pass the full set of template
6589 arguments to build_template_parm_names, not just the
6591 * pt.c (TMPL_ARGS_DEPTH): Define using
6592 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
6593 (NUM_TMPL_ARGS): New macro.
6594 (add_outermost_template_args): Deal with the case where the outer
6595 args will be completely discarded.
6596 (coerce_template_parms): Use the full set of template arguments
6597 for tsubst'ing. Simplify. Add some asserts. Improve
6599 (lookup_template_class): Pass the full set of template arguments
6600 to coerce_template_parms.
6601 (tsubst): Add assertion.
6602 (do_type_instantiation): Don't instantiate member template
6605 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
6606 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
6608 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
6610 * method.c (set_mangled_name_for_decl): Change return type to void.
6612 * decl.c (lookup_name_real): A namespace-level decl takes priority
6613 over implicit typename. Avoid doing the same lookup twice.
6615 * search.c (dependent_base_p): New fn.
6616 (dfs_pushdecls, dfs_compress_decls): Use it.
6618 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
6619 virtual functions if the type doesn't have any.
6621 1998-08-03 Mark Mitchell <mark@markmitchell.com>
6623 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
6624 uses template parameters.
6626 1998-08-02 Mark Mitchell <mark@markmitchell.com>
6628 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
6629 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
6630 * lex.c (do_identifier): Don't use a second argument, or a type,
6631 when building LOOKUP_EXPRs.
6632 (do_identifier): Likewise.
6633 (do_scoped_id): Likewise.
6634 * method.c (hack_identifier): Improve error message.
6635 * pt.c (lookup_template_function): Don't needlessly call
6636 copy_to_permanent or build_min.
6637 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
6639 (do_decl_instantiation): Improve error message.
6640 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
6641 (build_min): Copy the type to the permanent obstack, too.
6643 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
6645 * init.c (init_init_processing): Remove BI* handling.
6646 (build_builtin_call): Remove.
6647 (build_builtin_delete_call): New fn.
6648 (build_delete): Use it.
6650 1998-07-31 Mark Mitchell <mark@markmitchell.com>
6652 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
6653 (maybe_check_template_type): New function.
6654 * decl.c (maybe_process_template_type_declaration): New function,
6655 split out from pushtag Call maybe_check_template_type.
6656 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
6657 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
6658 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
6659 * pt.c (template_class_depth_real): Generalization of ...
6660 (template_class_depth): Use it.
6661 (register_specialization): Use duplicate_decls for duplicate
6662 declarations of specializations.
6663 (maybe_check_template_type): New function.
6664 (push_template_decl_real): Fix comment.
6665 (convert_nontype_argument): Likewise.
6666 (lookup_template_class): Likewise. Avoid an infinite loop on
6668 (tsubst_friend_function): Fix comment.
6669 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
6671 * semantics.c (begin_function_definition): Use
6672 reset_specialization to note that template headers don't apply
6673 directly to declarations after the opening curly for a function.
6675 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
6677 * decl.c (push_overloaded_decl): Use current_namespace instead of
6678 DECL_CONTEXT (decl) to determine where we go.
6680 * decl.c (lookup_name_real): Fix typo.
6682 1998-07-28 Mark Mitchell <mark@markmitchell.com>
6684 * friend.c (is_friend): Be lenient with member functions to deal
6685 with nested friends.
6687 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
6689 * class.c (finish_struct_1): Convert integer_zero_node to
6690 ssizetype before passing it to set_rtti_entry.
6691 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
6692 of any size to a pointer.
6694 1998-07-27 Mark Mitchell <mark@markmitchell.com>
6696 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
6697 (build_template_decl_overload): Remove.
6698 (set_mangled_name_for_decl): New function.
6699 (innermost_args): Remove is_spec parameter.
6700 (most_specialized, most_specialized_class): Remove declarations.
6701 (lookup_template_class): Add entering_scope parameter.
6702 (maybe_process_partial_specialization): New function.
6703 (finish_template_decl): Likewise.
6704 (finish_template_type): Likewise.
6705 * class.c (finish_struct): Clean up processing of member template
6707 * decl.c (pushtag): Fix formatting.
6708 (lookup_tag): Improve handling of pseudo-global levels.
6709 (make_typename_type): Adjust call to lookup_template_class.
6710 (shadow_tag): Use maybe_process_partial_specialization.
6711 (xref_tag): Improve handling of member friends.
6712 (start_function): Call push_nested_class before
6713 push_template_decl. Don't call push_template_decl for
6715 * decl2.c (grok_x_components): Don't call xref_tag for
6716 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
6717 (grokclassfn): Use set_mangled_name_for_decl.
6718 (arg_assoc_class): Adjust call to innermost_args.
6719 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
6720 * error.c (dump_function_name): Improve printing of template
6722 * friend.c (is_friend): Don't compare types of decls to determine
6723 friendship, unless flag_guiding_decls.
6724 (make_friend_class): Partial specializations cannot be friends.
6725 (do_friend): Use set_mangled_name_for_decl. Call
6726 push_template_decl_real instead of push_template_decl.
6727 * method.c (build_decl_overload_real): Remove prototype. Give it
6729 (build_overload_identififer): Adjust call to innermost_args.
6730 (build_template_decl_overload): Remove.
6731 (set_mangled_name_for_decl): New function.
6732 * parse.y (.finish_template_type): New non-terminal.
6733 (template_def): Use finish_template_decl. Use template_extdef
6735 (template_extdef, template_datadef): New non-terminals, containing
6736 only those rules for things which can be templates.
6738 (template_type, self_template_type): Use .finish_template_type.
6739 (named_class_head): Use maybe_process_partial_specialization.
6740 * pt.c (mangle_class_name_for_template): Remove context parameter.
6741 (get_class_bindings): Remove outer_args parameter.
6742 (complete_template_args): Remove.
6743 (add_outermost_template_args): New function.
6744 (register_specialization): Return the specialization.
6745 (unregister_specialization): New function.
6746 (tsubst_template_parms): Likewise.
6747 (most_specialized, most_specialized_class): Prototype here as
6749 (original_template): Rename to most_general_template.
6750 (tsubst_template_parms): New function.
6751 (set_mangled_name_for_template_decl): Likewise.
6752 (TMPL_ARGS_DEPTH): New macro.
6753 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
6754 (TMPL_ARGS_LEVEL): New macro.
6755 (SET_TMPL_ARGS_LEVEL): Likewise.
6756 (TMPL_ARG): Likewise.
6757 (SET_TMPL_ARG): Likewise.
6758 (TMPL_ARGS_DEPTH): Likewise.
6759 (finish_member_template_decl): Use finish_template_decl.
6760 (maybe_process_partial_specialization): New function, split out
6762 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
6763 (maybe_begin_member_template_processing): Use new macros.
6764 (is_member_template): Likewise.
6765 (is_member_template_class): Likewise.
6766 (add_to_template_args): Likewise. Deal with multiple levels of
6768 (maybe_process_partial_specialization): New function.
6769 (retrieve_specialization): Add consistency check.
6770 (determine_specialization): Return full argument list.
6771 (check_explicit_specialization): Tweak friend handling. Use full
6772 argument lists. Simplify.
6773 (current_template_args): Use new macros.
6774 (push_template_decl_real): Change ill-named mainargs to specargs.
6775 Check that a partial specialization actually specializes at least
6776 one parameter. Improve friend handling. Modify for full
6778 (classtype_mangled_name): Don't mangle the names of
6780 (lookup_template_class): Add entering_scope parameter. Use it to
6781 avoid finding a template type when an instantiation is required.
6782 Simplify. Use full template arguments.
6783 (tsubst_friend_function): Use unregister_specialization. Use new
6784 macros. Use full template arguments.
6785 (tsubst_friend_class): Substitute, using tsubst_template_parms,
6786 into the template parameters before passing them to
6787 redeclare_class_template.
6788 (instantiate_class_template): Simplify. Use full template
6789 arguments. Adjust calls to get_class_bindings. Use
6790 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
6791 (innermost_args): Use new macros.
6792 (tsubst_aggr_type): New function, split out from tsubst.
6793 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
6794 conventions for lookup_template_class. Refine handling of partial
6795 instantiations. Remove calls to complete_template_args.
6796 Simplify. Add consistency checks. Use set_mangled_name_for_decl
6797 and set_mangled_name_for_template_decl.
6798 (tsubst_copy): Use tsubst_aggr_type.
6799 (instantiate_template): Use full template arguments.
6800 (more_specialized): Improve formatting.
6801 (more_specialized_class): Adjust calls to get_class_bindings.
6802 (get_bindings_real): Don't call complete_template_args.
6803 (most_specialized): Don't overwrite input; create a new list.
6804 (most_specialized_class): Use most_general_template.
6805 (regenerate_decl_from_template): Use unregister_specialization.
6806 Use full template arguments.
6807 (instantiate_decl): Use full template arguments.
6808 (set_mangled_name_for_template_decl): New function.
6809 * semantics.c (begin_class_definition): Use
6810 maybe_process_partial_specialization.
6811 (finish_member_class_template): New function.
6812 (finish_template_decl): Likewise.
6813 (finish_template_type): Likewise.
6814 (typeck.c): Don't crash after issuing a compiler_error.
6815 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
6817 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
6819 * typeck2.c (build_functional_cast): Handle default-initialization.
6821 * call.c (build_over_call): Pass 1 to popclass.
6823 * parse.y (direct_notype_declarator): Add precedence declaration
6824 to notype_unqualified_id case.
6825 * Makefile.in (EXPECT): Adjust.
6827 * tree.c (ovl_member): Fix for single function in OVL.
6829 1998-07-27 Dave Brolley <brolley@cygnus.com>
6831 * c-lex.c (yylex): Fix boundary conditions in character literal and
6832 string literal loops.
6834 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
6836 * decl.c (lookup_name_real): OK, do return the from_obj value
6837 unless got_object depends on template parms.
6839 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
6841 * pt.c (coerce_template_parms): Also complain about local enums.
6843 * cp-tree.h: Add prototype for set_identifier_local_value.
6844 * decl.c (set_identifier_local_value_with_scope): Make static,
6846 * search.c (covariant_return_p): Likewise.
6847 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
6849 * call.c (build_method_call): Only pull out the type of a destructor
6850 if it's a template type parm.
6851 * decl.c (lookup_name_real): Never return the from_obj value.
6853 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
6855 * except.c (process_start_catch_block_old): Call start_decl_1 for
6857 * decl.c (start_decl_1): Avoid duplicate error.
6859 * init.c (expand_default_init): Only perform the initialization if
6860 it will do something.
6862 1998-07-23 H.J. Lu (hjl@gnu.org)
6864 * parse.y (base_class): Check for invalid base class.
6866 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
6868 * decl2.c (import_export_template): Fold in...
6869 (import_export_class): ...to here. Handle dllimport/export.
6871 * class.c (build_vtable): Pass at_eof to import_export_vtable.
6872 (prepare_fresh_vtable): Likewise.
6873 * decl2.c (import_export_class): Split out...
6874 (finish_prevtable_vardecl): From here.
6875 * class.c (finish_struct_1): Call import_export_class if at_eof.
6877 * decl.c (start_function): #if 0 mysterious code I wrote and have
6879 * rtti.c (get_tinfo_fn): If this is for a class type, set
6882 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
6884 * inc/exception: Change terminate and unexpected to ().
6886 * parse.y (named_class_head_sans_basetype_defn): A
6887 named_class_head_sans_basetype followed by '{' or ':' is a defn.
6889 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
6891 * tree.c (canonical_type_variant): New fn to handle arrays.
6892 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
6893 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
6894 * method.c (process_overload_item): Use build_overload_value for
6897 1998-07-20 Dave Brolley <brolley@cygnus.com>
6899 * lex.c (mbchar.h): #include it.
6900 (GET_ENVIRONMENT): New macro.
6901 (init_parse): Set character set based on LANG environment variable.
6902 (real_yylex): Handle multibyte characters in character literals.
6903 (real_yylex): Handle multibyte characters in string literals.
6905 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
6907 * lex.c (do_identifier): Look for class value even if we don't
6908 have a global value. Do implicit declaration if parsing is 2.
6909 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
6912 1998-07-19 Mark Mitchell <mark@markmitchell.com>
6914 * decl.c (pushtag): Revert previous change.
6915 * pt.c (lookup_template_class): Don't put out debugging
6916 information for types that use template parameters.
6918 * decl.c (pushtag): Don't put out debugging information for
6919 compiler-generated typedefs.
6921 * error.c (dump_type_real): Don't crash when presented with
6922 intQI_type_node or the like.
6924 * semantics.c (finish_translation_unit): Fix spelling error in
6927 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
6929 * decl.c (lookup_name_real): Pull out single function here.
6930 (select_decl): Not here.
6931 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
6933 * decl.c (qualify_lookup): Tweak again.
6935 * pt.c (lookup_template_class): Don't mess with the context of the
6937 * decl2.c (current_decl_namespace): Remove special handling for
6940 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
6941 a member template specialization.
6943 * tree.c (ovl_member): Use decls_match to compare functions.
6944 * decl.c (decls_match): Check the context of a function.
6946 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
6947 in Koenig lookup support rules.
6948 * semantics.c (finish_call_expr): Handle the new cases.
6950 * typeck.c (build_x_function_call): Handle overloaded methods.
6952 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
6954 1998-07-16 Mark Mitchell <mark@markmitchell.com>
6956 * semantics.c (finish_object_call_expr): Revert previous change.
6957 * call.c (build_new_method_call): Likewise. Instead, convert
6958 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
6960 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
6962 * decl.c (qualify_lookup): Handle templates.
6964 * decl2.c (do_using_directive): Don't pass ancestor.
6965 * decl.c (push_using_directive): Calculate ancestor.
6967 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
6968 * decl.c (pushdecl): Move type shadowing handling from here...
6969 (duplicate_decls): ...to here.
6970 * decl.c (set_identifier_local_value_with_scope): New fn.
6972 (set_identifier_local_value, lookup_type_current_level): New fns.
6973 * decl2.c (do_local_using_decl): Handle types and binding level
6976 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
6977 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
6978 (lookup_namespace_name): Likewise.
6979 * typeck.c (build_unary_op): Not here anymore.
6981 * decl2.c (do_class_using_decl): Make sure we get an identifier.
6982 * class.c (handle_using_decl): Ignore TYPE_DECLs.
6984 * decl.c (qualify_lookup): New fn.
6985 (lookup_name_real): Use it.
6987 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
6989 * decl2.c (add_using_namespace): When directly using a namespace
6990 that was indirect before, promote it.
6992 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
6993 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
6994 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
6995 * decl.c (select_decl): Replace two flag parameters by one.
6996 (unqualified_namespace_lookup): Likewise, pass flag.
6997 (lookup_flags): New function.
6998 (lookup_name_real): Compute flags, pass them.
6999 (lookup_namespace_name): Call with zero-flag.
7000 * decl2.c (ambiguous_decl): Add flag parameter, complain only
7002 (lookup_using_namespace, qualified_lookup_using_namespace):
7003 Add flag parameter, pass them through.
7004 * lex.c (do_scoped_id): Call with zero-flag.
7006 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
7008 * typeck.c (convert_for_assignment): Use comptypes.
7010 1998-07-16 Mark Mitchell <mark@markmitchell.com>
7012 * semantics.c (finish_object_call_expr): Move test for the
7013 function called being a TYPE_DECL to ...
7014 * call.c (build_new_method_call): Here.
7016 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
7018 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
7019 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
7021 * lex.c (looking_for_typename): Don't initialize.
7023 * decl2.c (ambiguous_decl): Clarify error message.
7025 * decl.c (push_using_directive): Iterate over namespaces used
7028 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7030 * decl2.c (add_using_namespace): Iterate over namespaces used
7033 * decl.c (lookup_name_real): Accept namespace aliases as locals.
7034 (cat_namespace_levels): Ignore aliases.
7035 (duplicate_decls): Ignore duplicate aliases.
7036 * decl2.c (do_namespace_alias): Process block level namespace
7037 aliases. Store alias with pushdecl. Remove odr errors.
7038 * parse.y (namespace_alias): New non-terminal.
7041 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
7043 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
7044 Handle TEMPLATE_TYPE_PARM.
7045 (arg_assoc): Rewrite.
7047 * pt.c (complete_template_args): Don't look at the context unless
7050 * method.c (build_decl_overload_real): Fix namespace handling.
7052 * typeck.c (build_unary_op): Extract a lone function from an
7055 * call.c (build_scoped_method_call): Handle getting a namespace
7056 for basetype in a destructor call.
7057 (check_dtor_name): Handle enums.
7059 * parse.y (using_directive): New nonterminal.
7060 (extdef, simple_stmt): Use it.
7062 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7064 * decl2.c (add_function): Move error message ...
7065 (arg_assoc_namespace): ... from here.
7067 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
7069 * parse.y (namespace_qualifier): Fix multiple level handling.
7070 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
7071 (arg_assoc): Don't skip the first argument of a function.
7073 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
7075 * search.c (my_tree_cons): Clean up.
7077 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
7079 * call.c (joust): Don't warn about "confusing" conversions to the
7082 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7084 * class.c (push_nested_class): Complain about namespaces.
7085 * decl.c (start_decl): Enter the object's namespace.
7086 (cp_finish_decl): Leave it.
7087 (grokdeclarator): Likewise.
7088 * decl2.c (check_decl_namespace): New function.
7089 (finish_file): Call it.
7090 * parse.y (complex_direct_notype_declarator): Set complexity
7091 of namespace-qualified ids to -1, enter the namespace.
7093 * method.c (build_template_decl_overload): Expect _DECL as first
7094 parameter. Put context temporarily into current_namespace.
7095 * pt.c (check_explicit_specialization): Change caller.
7098 * init.c (build_offset_ref): Call mark_used and
7099 convert_from_reference for namespace members.
7101 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
7103 * search.c (my_tree_cons): The bitfield is at index 2.
7105 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
7107 * lang-options.h: Format changed to work with new --help support
7110 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7112 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
7113 Do Koenig lookup in CALL_EXPR.
7114 (arg_assoc): Handle error_mark.
7115 * lex.c (is_global): New function.
7116 (do_identifier): Expect arguments for Koenig lookup.
7117 * parse.y (primary): Add rules for calls of unqualified function calls.
7118 (do_id): Change call of do_identifier.
7119 * pt.c (finish_stmt_expr): Likewise.
7120 * semantics.c (finish_id_expr): Likewise.
7121 (finish_call_expr): Add integer parameter to indicate
7122 argument-dependent lookup.
7124 * decl.c (struct binding_level): New field using_directives.
7125 (push_using_decl): Not sorry anymore.
7126 (push_using_directive): New function.
7127 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
7128 (unqualified_namespace_lookup): New function, code from ...
7129 (lookup_name_real): ... here.
7130 * decl2.c (lookup_using_namespace): Pass using list instead of
7132 (validate_nonmember_using_decl): New function.
7133 (do_nonmember_using_decl): New function.
7134 (do_toplevel_using_decl): Use them.
7135 (do_local_using_decl): New function.
7136 (do_using_directive): Support block-level directives.
7137 * parse.y (simple_stmt): Support using declarations and
7139 (namespace_qualifier, namespace_using_decl): New non-terminals.
7141 * xref.c (classname): New function.
7142 (GNU_xref_hier): Change class and base parameters to tree.
7143 * decl.c (xref_baseypes): Change caller.
7144 * friend.c (make_friend_class): Likewise.
7146 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7148 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
7151 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
7152 template template parameter, record its use.
7153 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
7154 its template arguments if exists.
7156 * pt.c (coerce_template_template_parms): New function equivalent
7157 to coerce_template_parms when IS_TMPL_PARM is true.
7158 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
7159 all callers changed.
7161 (coerce_template_parms): Access ARGLIST properly when creating a
7162 new vector. Only accept implicit TYPE_DECL as valid argument for
7163 a template template parameter when it is a base class of
7164 current_class_type. Don't display error message when COMPLAIN is
7167 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
7169 * repo.c (get_base_filename): Use file_name_nondirectory.
7170 (open_repo_file): Likewise.
7171 * cp-tree.h (file_name_nondirectory): Add prototype.
7173 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
7175 * friend.c (do_friend): Pull the identifier out of declarator.
7176 Use cp_error and friends.
7177 * decl2.c (qualified_lookup_using_namespace): Fix call to
7179 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
7180 (grokvardecl): Use DECL_CLASS_SCOPE_P.
7181 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
7182 * class.c (warn_hidden): Fix for OVERLOAD.
7183 From grahams@rcp.co.uk:
7184 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
7185 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
7187 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
7189 * g++.1 (-traditional): Remove duplicated documentation.
7191 1998-07-11 Mark Mitchell <mark@markmitchell.com>
7193 * method.c (flush_repeats): Add nrepeats parameter.
7194 (issue_nrepeats): Likewise.
7195 (is_back_referenceable_type): New function. Don't back-reference
7196 TEMPLATE_TYPE_PARMs as well as simple types like integers.
7197 (build_mangled_name_for_type): Likewise.
7198 (build_mangled_name_for_type_with_Gcode): Likewise.
7200 (nrepeats): Likewise.
7201 (Nrepeats): Likewise.
7202 (start_squangling): Don't clear the variables removed above.
7203 (end_squangling): Likewise.
7204 (flush_repeats): Tidy. Use nrepeats parameter rather than
7206 (issue_nrepeats): Likewise, but with nrepeats global. Use
7207 is_backreferenceable_type.
7208 (build_overload_nested_name): Tidy. Add comment. Use
7209 build_mangled_name_for_type.
7210 (build_underscore_int): Comment.
7211 (build_overload_scope_ref): Use build_mangled_name_for_type.
7212 (build_overload_int): Likewise.
7213 (build_template_template_parm_names): Tidy.
7214 (build_template_parm_names): Use build_mangled_name_for_type.
7215 (build_overload_identifier): Add comments.
7216 (build_mangled_name_for_type_with_Gcode): Split out from
7218 (build_mangled_name_for_type): Use it.
7219 (build_mangled_name): Rework to use build_mangled_name_for_type
7220 and to not use global nrepeats/Nrepeats. Tidy.
7221 (process_modifiers): Tidy.
7222 (check_btype): Use is_backreferenceable_type. Add comment.
7223 Rename `node' to `type'.
7224 (process_overload_item): Set numeric_output_need_bar here.
7225 Use build_mangled_name_for_type. Tidy.
7226 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
7227 build_mangled_name_for_type.
7229 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
7232 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
7234 * cp-tree.h (warn_long_long): Define.
7235 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
7236 warning "ANSI C++ does not support `long long'".
7237 * decl2.c (warn_long_long): Define.
7238 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
7240 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
7242 * decl.c (xref_tag): Handle attributes between 'class' and name.
7243 * parse.y (aggr): Likewise.
7244 * semantics.c (finish_class_definition): Likewise.
7245 * Makefile.in (EXPECTED): Adjust.
7247 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
7248 * decl2.c: Define them.
7249 (lang_decode_option): Handle them.
7250 * lang-options.h: Add -foptional-diags.
7251 * class.c (finish_struct): Don't complain about multiple meanings of
7252 name if -fno-optional-diags.
7253 * decl.c (pushdecl_class_level): Likewise.
7254 * lex.c (real_yylex): Check warn_multichar.
7256 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
7258 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
7260 * tree.c (make_binfo): Fix length.
7262 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
7264 * decl2.c (lang_decode_option): Remove warn_template_debugging.
7265 * lang-options.h: Likewise.
7267 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7269 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
7270 (process_start_catch_block): Likewise for variables
7271 `false_label_rtx', `call_rtx' and `return_value_rtx'.
7273 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
7275 * tree.c (build_srcloc): Make sure we allocate this node on the
7278 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
7280 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
7281 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
7282 (lang_specific_driver): Only add -lm automatically if need_math is
7285 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
7287 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
7289 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7291 * Makefile.in (EXPR_H): New dependency variable.
7292 (decl2.o): Depend on $(EXPR_H).
7293 (typeck.o): Likewise.
7297 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
7299 * decl.c (start_enum): Put local enums on permanent_obstack.
7301 1998-06-25 Mark Mitchell <mark@markmitchell.com>
7303 * cp-tree.h (c_get_alias_set): Declare.
7304 * decl.c (init_decl_processing): Set lang_get_alias_set.
7306 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
7308 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
7309 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
7310 flag for all function decls which are in the exception table.
7311 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
7312 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
7313 code is emitted for any referenced rtti function.
7315 1998-06-25 Dave Brolley <brolley@cygnus.com>
7317 * lang-specs.h: Use new | syntax to eliminate
7318 string concatenation.
7320 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
7322 * cp-tree.h (CP_DECL_CONTEXT): New macro.
7323 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
7324 * method.c (build_overload_nested_name): Likewise.
7325 * sig.c (build_signature_pointer_or_reference_type): Don't set
7328 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7330 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
7331 * cp-tree.h (FROB_CONTEXT): New macro.
7332 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
7333 * decl.c (namespace_binding): Replace NULL_TREE with
7335 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
7336 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
7338 * decl.c (pushtag): Use FROB_CONTEXT.
7339 (pushdecl, make_typename_type, define_function, grokdeclarator):
7341 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
7342 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
7344 * decl2.c (decl_namespace): Return global_namespace if no context.
7345 * method.c (build_overload_nested_name): Expect null as context.
7346 * pt.c (mangle_class_name_for_template): Do nothing for null
7348 (lookup_template_class): Allow for null id_context.
7350 1998-06-25 Richard Henderson <rth@cygnus.com>
7352 * method.c (emit_thunk): Set current_function_is_thunk for the
7353 ASM_OUTPUT_MI_THUNK case as well.
7355 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
7357 * exception.cc (__cplus_type_matcher): Get a match_info pointer
7358 instead of an exception table entry as a parameter.
7360 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
7362 * parse.y (function_try_block): Don't call start_catch_handler.
7363 * except.c (call_eh_info): Remove coerced field from declaration.
7364 (build_eh_type_type_ref): New function to create an address of a
7365 rtti function for the new style exception tables.
7366 (expand_start_catch_block): Split function, this contains the
7368 (process_start_catch_block_old): New function to perform the rest
7369 of expand_start_catch_block under old style exceptions.
7370 (process_start_catch_block_old): New function to perform the rest
7371 of expand_start_catch_block under new style exceptions.
7372 (expand_end_catch_block): Only pop the false label off the stack under
7373 the old style of exceptions.
7374 * semantics.c (finish_try_block): Don't call start_catch_handler.
7375 * exception.cc (struct cp_eh_info): Add original_value field.
7376 (__cplus_type_matcher): Perform type matching on the original exception
7377 value, and if we have a match, set the current value.
7378 (__cp_push_exception): Set the original exception value.
7380 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
7382 * call.c (joust): Fix confusing conversion warning.
7384 * call.c (build_op_delete_call): Add placement parm. Check
7385 LOOKUP_SPECULATIVELY.
7386 * cp-tree.h, decl2.c, init.c: Adjust.
7387 * decl.c (finish_function): Use it.
7389 * pt.c (tsubst): Diagnose creating void fields or variables.
7391 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7393 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
7395 * cp-tree.h (check_dtor_name): Add prototype.
7397 * init.c (expand_member_init): Remove unused variables
7398 `ptr_type_node', `parm' and `rval'.
7400 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
7402 (lang_print_xnode): Likewise.
7404 * typeck2.c (enum_name_string): Cast argument to sprintf to long
7405 and use %ld specifier.
7407 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
7408 specifier in call to fprintf.
7409 (GNU_xref_member): Cast argument to sprintf to int.
7411 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7413 * typeck2.c (pop_init_level): Warn about implicit zero initialization
7416 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7418 * cp-tree.h: Prototype function `check_java_method'.
7420 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
7422 * class.c (finish_struct): Make conflicting use of id a pedwarn.
7423 * decl.c (pushdecl_class_level): Likewise.
7425 1998-06-17 Mark Mitchell <mark@markmitchell.com>
7427 * pt.c (convert_nontype_argument): Issue an error when presented
7428 with an integer (real) constant that cannot be simplified to an
7431 * cp-tree.h (c_get_alias_set): Remove declaration added in
7432 1998-06-13 change that should never have been checked in.
7434 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
7436 * typeck.c (build_binary_op_nodefault): Change % in format strings
7439 * decl.c (grokvardecl): Don't build_static_name for decls that
7440 aren't at namespace scope.
7442 * init.c (perform_member_init): Catch default-initialization of
7445 1998-06-17 Mark Mitchell <mark@markmitchell.com>
7447 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
7449 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
7451 * method.c (hack_identifier): Complain about getting a namespace
7453 * typeck.c (decay_conversion): Remove check for namespaces.
7454 * typeck2.c (incomplete_type_error): Likewise.
7455 * parse.y (template_arg): Add PTYPENAME expansion.
7457 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
7459 * decl.c (grokvardecl): Don't build external assembler names for
7460 TYPENAMEs in other namespaces as there is no declarator.
7461 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
7462 info from DECL_CONTEXT if it is NULL.
7464 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
7466 * call.c (check_dtor_name): Split out.
7467 (build_scoped_method_call): Use it.
7468 (build_method_call): Use it.
7469 * init.c (build_offset_ref): Use it.
7471 * typeck.c (build_static_cast): Fix handling of pointers to members.
7473 * decl.c (finish_function): Just return nothing from a constructor.
7474 * typeck.c (c_expand_return): Complain about returning a void
7475 expression from a destructor.
7477 1998-06-13 Mark Mitchell <mark@markmitchell.com>
7479 * class.c (alter_access): Accept a BINFO explaining how to get
7480 from the entity whose accessed is being altered to the type doing
7482 (handle_using_decl): New function containing code split out from ...
7483 (finish_struct_1): Here.
7485 * cp-tree.h (complete_type_or_else): Declare.
7486 * init.c (build_new_1, build_delete): Use it.
7487 * typeck.c (require_complete_type): Use complete_type, rather than
7488 expanding it inline.
7489 (complete_type_or_else): New function.
7490 (build_component_ref): Use it.
7491 (pointer_int_sum): Make sure the type pointed to is complete.
7492 (pointer_diff): Likewise.
7494 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
7497 * search.c (get_matching_virtual): Note that member templates
7498 cannot override virtual functions.
7500 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
7502 * pt.c (check_explicit_specialization): If DECLARATOR turned into
7503 an error_mark_node from lookup_template_function, return the same.
7504 (determine_specialization): Also make sure TEMPLATE_ID isn't an
7505 error_mark_node, before we try to read its operands.
7506 * decl.c (grokdeclarator): If we got an error_mark_node from
7507 check_explicit_specialization, just return it right back.
7509 1998-06-12 Mark Mitchell <mark@markmitchell.com>
7511 * class.c (instantiate_type): Don't treat template-ids that don't
7512 specify any template arguments as equivalent to ordinary
7513 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
7514 pointer-to-members for member templates. Tidy slightly.
7515 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
7516 * init.c (build_offset_ref): Handle template-ids like ordinary
7517 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
7518 offset part of the OFFSET_REF.
7519 * typeck.c (build_unary_op): Change check for unknown types to
7520 look for OFFSET_REFs, not SCOPE_REFs.
7522 1998-06-11 Mark Mitchell <mark@markmitchell.com>
7524 * pt.c (is_member_template_class): New function.
7525 (push_template_decl_real): Use it.
7527 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
7529 * friend.c (do_friend): Add support for nested classes using
7530 member functions of the enclosing class as friends.
7532 1998-06-10 Mark Mitchell <mark@markmitchell.com>
7534 * call.c (convert_default_arg): Make global, not static.
7535 (convert_arg_for_ellipsis): Split out from ...
7536 (build_over_call): Here.
7537 * cp-tree.h (convert_default_arg); Declare.
7538 (convert_arg_to_ellipsis): Likewise.
7539 (do_member_init): Remove.
7540 * init.c (do_member_init): Remove; this code is dead.
7541 (expand_member_init): Remove much of this code; it is dead.
7542 * typeck.c (convert_arguments): Use convert_default_arg and
7543 convert_arg_for_ellipsis, rather than duplicating here.
7545 * call.c (convert_like): Don't fail silently if
7546 build_user_type_conversion fails. Always return error_mark_node
7549 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
7551 * search.c (covariant_return_p): Complain about ambiguous base.
7553 * typeck.c (build_component_ref): Diagnose ref to nested type.
7555 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
7557 * decl.c (grokparms): Check that INIT isn't an error_mark_node
7558 before giving error about invalid type for default arg.
7560 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
7562 * call.c (build_method_call): Fix thinko.
7564 1998-06-10 Dave Brolley <brolley@cygnus.com>
7566 * decl2.c (lang_decode_option): New argc/argv interface.
7567 * cp-tree.h (lang_decode_option): New argc/argv interface.
7568 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
7569 specified for cpplib-enabled compilers.
7570 * lex.c (lang_init): Don't check_newline for cpplib.
7571 (init_parse): Don't initialize cpplib here.
7573 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
7575 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
7576 piece before checking DECL_MUTABLE_P.
7578 1998-06-10 John Carr <jfc@mit.edu>
7580 * tree.c (debug_binfo): Make printf format match arguments.
7582 * error.c (OB_PUTI): Make printf format match arguments.
7584 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
7586 * init.c (perform_member_init): Handle default-initialization.
7588 * except.c (build_throw): Handle throwing NULL.
7590 * typeck.c (build_x_function_call): Use resolve_offset_ref.
7592 * search.c (compute_access): Only strip an anonymous union
7595 * call.c (add_builtin_candidates): Tweak.
7597 * cvt.c (build_expr_type_conversion): Restore code for conversion
7599 * decl2.c (delete_sanity): Use it. Clean up.
7601 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
7603 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
7605 * typeck.c (c_expand_return): Don't warn about void expressions on
7606 return statements in functions returning void.
7608 1998-06-09 Mark Mitchell <mark@markmitchell.com>
7610 * pt.c (fn_type_unification): Revise documentation. Tidy.
7611 (type_unification): Likewise.
7613 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
7615 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
7617 * parse.y (function_try_block): Rename expand_start_catch, and delete
7619 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
7622 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
7624 * search.c (lookup_member): New fn.
7625 * class.c (finish_struct_1): Use it.
7626 * decl.c (lookup_name_real): Use it.
7628 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7630 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
7632 * cp-tree.h: Add prototype for `maybe_print_template_context' and
7633 `maybe_make_one_only'.
7635 * decl.c (auto_function): Remove unused variable `decl'.
7637 * decl2.c: Include dwarf2out.h and dwarfout.h.
7639 * lex.c: Remove redundant declarations of `set_float_handler' and
7642 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
7644 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
7645 time flag. Call __cp_eh_info instead of __cp_exception_info.
7646 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
7647 (__cp_exception_info): Return offset into cp_eh_info structure to
7648 match what use to be the start of this structure.
7649 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
7650 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
7652 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
7653 __cp_eh_info instead of __cp_exception_info.
7655 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
7657 * decl.c (cp_finish_decl): Disable inlining of extern inlines
7658 with static variables.
7660 1998-06-08 Mark Mitchell <mark@markmitchell.com>
7662 * init.c (build_offset_ref): Correct previous change to use build,
7665 1998-06-07 Mark Mitchell <mark@markmitchell.com>
7667 * class.c (instantiate_type): Handle pointer-to-members where the
7668 member is a template.
7669 * init.c (build_offset_ref): Likewise.
7670 * typeck.c (build_unary_op): Likewise.
7672 1998-06-07 Richard Henderson <rth@cygnus.com>
7674 * lex.c (lang_init_options): New function.
7675 (lang_init): Remove flag_exceptions == 2 hack.
7677 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
7679 * search.c (envelope_add_decl): Tweak for implicit typename.
7681 * call.c (joust): Also warn about confusing conversion op/constructor
7682 overload resolution.
7684 * spew.c (yylex): Also return the TYPE_DECL if got_object.
7685 Don't clear got_object after '~'.
7686 * call.c (build_scoped_method_call): Tweak destructor handling.
7687 (build_method_call): Likewise.
7688 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
7689 TYPE_MAIN_VARIANT for destructors.
7690 * semantics.c (finish_object_call_expr): Complain about calling a
7693 1998-06-05 Per Bothner <bothner@cygnus.com>
7695 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
7696 Define - update needed by gcc.c change.
7698 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
7700 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
7702 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
7704 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
7705 * decl.c (lookup_name_real): Add namespaces_only parameter.
7706 If set, return only NAMESPACE_DECLs.
7707 (select_decl): Likewise.
7708 (identifier_type_value): Give additional parameter.
7709 (lookup_name_nonclass): Likewise.
7710 (lookup_name): Likewise.
7711 (find_binding): Skip namespace aliases.
7712 (binding_for_name): Likewise.
7713 (push_namespace): Check for namespace aliases.
7714 (lookup_name_namespace_only): New function.
7715 (begin_only_namespace_names, end_only_namespace_names): New functions.
7716 * decl2.c (set_decl_namespace): Skip namespace aliases.
7717 (do_using_directive): Likewise.
7718 (do_namespace_alias): Produce namespace aliases, fix alias
7720 * error.c (dump_decl): Support SCOPE_REF.
7721 * parse.y (extdef): Wrap lookup with namespace_only for namespace
7722 aliases and using declarations.
7724 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
7726 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
7728 * error.c (dump_expr): Clean up NEW_EXPR case.
7730 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
7732 Suggested by Brendan Kehoe
7733 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
7734 treat it as using ::decl.
7736 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
7738 * tree.c (mapcar): Support NEW_EXPR.
7740 * error.c (dump_expr): Support NEW_EXPR.
7742 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
7744 * method.c (make_thunk): Use overload machinery to make name.
7745 * search.c (covariant_return_p): New fn.
7746 (get_matching_virtual): Use it.
7748 * init.c (build_new_1): Fix check for void.
7750 1998-06-01 Per Bothner <bothner@cygnus.com>
7752 * cp-tree.h (TYPE_FOR_JAVA): New macro.
7753 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
7754 java_int_type_node, java_long_type_node, java_float_type_node,
7755 java_double_type_node, java_char_type_node, java_boolean_type_node):
7756 New "primitive" types, with predefined names __java_byte etc.
7757 (record_builtin_java_type): New function.
7758 (init_decl_processing): Make Java types with record_builtin_java_type.
7759 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
7760 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
7761 (grokfndecl): Call check_java_method for Java classes.
7762 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
7763 (process_overload_item): Match types against specific
7764 java_XX_type_node types, rather than using is_java_type.
7765 * class.c (finish_struct_1): Don't add default copy constructor
7766 or operator= if TYPE_FOR_JAVA.
7767 (pop_lang_conext): Restore strict_prototyp proper if Java.
7768 * decl2.c (acceptable_java_type, check_java_method): New functions.
7769 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
7770 (tsubst): Move common statement after if statement.
7771 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
7773 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
7775 * pt.c (for_each_template_parm): Use first_rtl_op.
7777 * tree.c (build_cplus_array_type_1): Also check index_type for
7780 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
7782 * pt.c (tsubst): Always copy BINFO_BASETYPES.
7784 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
7786 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
7789 1998-05-29 Mark Mitchell <mark@markmitchell.com>
7791 * decl.c (grokdeclarator): Don't complain about in-class
7792 initialization of static consts if we don't really know the type
7795 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
7797 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
7798 * method.c (build_destructor_name): New fn.
7799 * decl2.c (maybe_retrofit_in_chrg): Split out...
7800 (grokclassfn): From here. Reorganize.
7801 * decl.c (grok_ctor_properties): Make sure ctors for types with
7802 vbases have the in_chrg parm.
7803 * pt.c (instantiate_class_template): Update
7804 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
7806 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
7808 1998-05-28 Mark Mitchell <mark@markmitchell.com>
7810 * pt.c (instantiate_decl): Make test for whether or not static
7811 variables should be instantiated early match its comment.
7813 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
7815 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
7817 (start_function): Call check_default_args.
7818 * decl2.c (grokfield): Don't call check_default_args.
7819 (check_default_args): Use cp_error_at.
7820 * lex.c (do_pending_defargs): Call check_default_args.
7822 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
7824 * call.c (build_method_call): Make sure get_type_value returns
7825 something before we try to use its TYPE_MAIN_VARIANT.
7826 (build_scoped_method_call): Likewise.
7828 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
7830 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
7831 initialize an array.
7833 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
7836 * friend.c (do_friend): Clarify template warning.
7838 1998-05-27 Mark Mitchell <mark@markmitchell.com>
7840 * decl.c (shadow_label): Don't treat decls as identifiers.
7841 (maybe_push_to_top_level): Clear shadowed_labels.
7843 * pt.c (instantiate_decl): Reset lineno and filename after calling
7844 regenerate_decl_from_template.
7846 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
7849 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
7851 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
7853 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7855 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
7856 (convert_nontype_argument): Handle cases when nontype template
7857 parameters become classes after substitution.
7859 1998-05-26 Mark Mitchell <mark@markmitchell.com>
7861 * friend.c (is_friend): Use comptypes, rather than == to compare
7862 types. Modify for new representation of template friends.
7863 (make_friend_class): Likewise.
7864 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
7865 (instantiate_class_template): Deal with template friends.
7867 * decl.c (store_parm_decls): Remove redundant call to
7868 expand_main_function.
7870 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
7872 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
7875 1998-05-26 Per Bothner <bothner@cygnus.com>
7877 * language_as_string: Handle lang_java.
7879 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
7881 * decl.c (pushdecl): Don't copy the type_decl.
7883 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7885 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
7887 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
7889 * parse.y (complex_direct_notype_declarator): Use $1 to access
7890 scope of notype_qualified_id.
7892 1998-05-26 Dave Brolley <brolley@cygnus.com>
7894 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
7895 (init_parse): Initialize cpplib interface.
7897 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
7900 1998-05-26 Mark Mitchell <mark@markmitchell.com>
7902 * decl.c (pushtag): Avoid crashing on erroneous input.
7904 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7906 * decl.c (push_namespace): Only produce one unique name for
7907 anonymous namespaces.
7908 (get_unique_name): Remove.
7910 1998-05-25 Mark Mitchell <mark@markmitchell.com>
7912 * call.c (tourney): Don't do any extra comparisons.
7914 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
7916 * cp-tree.h (processing_template_parmlist): Declare.
7917 * decl.c (pushtag): Don't call push_template_decl when we
7919 * pt.c (processing_template_parmlist): New variable.
7920 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
7921 (complete_template_args): Use it.
7922 (add_to_template_args): Likewise.
7923 (innermost_args): Likewise.
7925 (begin_template_parm_list): Use processing_template_parmlist.
7926 (end_template_parm_list): Likewise.
7928 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
7929 * decl.c (grokdeclarator): Use it.
7930 * decl2.c (grok_x_components): Likewise.
7931 * init.c (initializing_context): Likewise.
7932 * method.c (do_build_copy_constructor): Likewise.
7933 (do_build_assign_ref): Likewise.
7934 * search.c (compute_access): Likewise.
7935 * typeck.c (build_component_ref): Likewise.
7937 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
7938 unnamed type a typedef name "for linkage purposes".
7940 * pt.c (lookup_template_class): Don't look at
7941 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
7943 * method.c (build_overload_int): Handle error cases gracefully.
7945 * pt.c (instantiate_decl): Handle static member variables
7948 * pt.c (tsubst): Use the tsubst'd type when producing new
7949 TEMPLATE_PARM_INDEX nodes.
7951 1998-05-24 Mark Mitchell <mark@markmitchell.com>
7953 * tree.c (cp_tree_equal): Handle pointers to member functions.
7955 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
7956 sure the type of the REF_BIND is a reference type.
7957 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
7958 target_type for clarity.
7960 * parse.y (xcond): Move call to condition_conversion ...
7961 * semantics.c (finish_for_cond): Here.
7962 * parse.c: Regenerated.
7964 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
7966 * decl.c (push_namespace): Namespaces have type void.
7967 * typeck2.c (incomplete_type_error): Complain about namespace
7969 * typeck.c (decay_conversion): Likewise.
7971 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7973 * error.c (dump_expr): Support namespaces.
7975 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
7977 * cp-tree.def: Add SRCLOC.
7978 * cp-tree.h: Add struct tree_srcloc and accessor macros.
7979 * tree.c (build_srcloc, build_srcloc_here): New fns.
7980 * pt.c (add_pending_template): Use build_srcloc_here.
7981 (push_tinst_level): Update last_template_error_tick before erroring.
7982 (instantiate_decl): Restore lineno and input_filename before
7983 calling add_pending_template.
7984 * decl2.c (finish_file): Set up lineno and input_filename for
7987 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
7989 * decl.c (lang_print_error_function): New fn.
7990 (init_decl_processing): Set print_error_function to use it.
7991 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
7993 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
7996 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
7997 copy-initialization.
7999 * class.c (build_vtable_entry): Use int_fits_type_p.
8000 (build_vtable): Pass a signed offset to build_vtable_entry.
8001 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
8002 set_rtti_entry): Likewise.
8004 1998-05-22 Per Bothner <bothner@cygnus.com>
8006 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
8007 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
8009 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
8011 * pt.c (print_template_context): Use fprintf instead of cp_error.
8013 * pt.c (determine_specialization): Just return an error_mark_node.
8014 Also print the decl we want in error messages. If we complain,
8015 return error_mark_node.
8016 (tsubst_friend_function): Set lineno and input_filename so
8017 error messages will be useful.
8018 (instantiate_template): Just return an error_mark_node.
8019 (check_explicit_specialization): Don't mess with a returned
8022 * pt.c (print_template_context): Add new argument.
8023 (maybe_print_template_context): New fn.
8024 (push_tinst_level): Increment tinst_level_tick.
8025 (pop_tinst_level): Likewise.
8026 * errfn.c (cp_thing): Call maybe_print_template_context. Use
8027 xrealloc instead of xmalloc.
8029 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
8031 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
8033 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
8034 if the template we looked up is the same as the one we already
8037 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
8039 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
8040 (cpp_reader,parse_in): Add for cpplib.
8041 (check_newline): Call handle_sysv_pragma with new interface.
8042 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
8044 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
8045 (sub_getch): Call GETC for cpplib.
8047 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
8048 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
8050 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
8052 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
8054 * decl2.c (maybe_make_one_only): New fn.
8055 (import_export_vtable): Use it.
8056 (import_export_decl): Likewise.
8057 * pt.c (mark_decl_instantiated): Likewise.
8059 1998-05-21 Mark Mitchell <mmitchell@usa.net>
8061 * decl2.c (find_representative_member): Rename to ...
8062 (build_anon_union_vars): New function.
8063 (finish_anon_union): Fix stupidity of previous change.
8065 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
8067 * decl.c (grokfndecl): Handle definition of specialization in
8070 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
8072 1998-05-20 Mark Mitchell <mmitchell@usa.net>
8074 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
8075 to look for type declarations.
8076 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
8077 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
8078 (finish_member_class_template): Declare.
8079 * decl.c (pushtag): Put member class templates on the
8080 CLASSTYPE_TAGS list, just as for ordinary member classes.
8081 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
8082 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
8083 IDENTIFIER_NAMESPACE_VALUEs.
8084 * parse.y (component_decl): Move code to ...
8085 * semantics.c (finish_member_class_template): New function.
8086 Don't put member class templates on the list of components for a
8088 * parse.c: Regenerated.
8089 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
8090 In fact, don't use DECL_CONTEXT at all here.
8092 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
8094 * decl.c (record_unknown_type): New function.
8095 (init_decl_processing): Call it for the unknown and global type
8098 1998-05-20 Mark Mitchell <mmitchell@usa.net>
8100 * decl2.c (find_representative_member): New function.
8101 (finish_anon_union): Use it.
8103 * cp-tree.h (MAIN_NAME_P): New macro.
8104 (DECL_MAIN_P): Likwise.
8105 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
8106 (grokfndecl): Use the new macros.
8107 (grokdeclarator): Likewise.
8108 (start_function): Likewise.
8109 (store_parm_decls): Likewise.
8110 (finsh_function): Likewise.
8111 * friend.c (do_friend): Likewise.
8112 * typeck.c (build_function_call_real): Likewise.
8113 (build_unary_op): Likewise.
8115 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
8117 * decl2.c (start_objects, finish_objects, do_dtors,
8118 do_ctors): Split out from...
8119 (finish_file): ...here.
8121 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
8123 * tree.c (is_overloaded_fn): Don't abort on placeholders from
8126 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
8128 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
8130 * error.c (dump_expr): Handle an ARROW_EXPR.
8132 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
8134 * decl.c (saveable_obstack): Declare.
8135 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
8136 declare, if necessary.
8138 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
8140 * call.c (compare_qual): Remove.
8142 (is_properly_derived_from): New function.
8143 (maybe_handle_ref_bind): Likewise.
8144 (maybe_handle_implicit_object): Likewise.
8145 (compare_ics): Modify substantially to bring into conformance with
8147 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
8148 (comp_cv_qualification): Declare.
8149 (comp_cv_qual_signature): Likewise.
8150 * typeck.c (comp_cv_qualification): Likewise.
8151 (comp_cv_qual_signature): Likewise.
8153 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8155 * Makefile.in (parse.o): Depend on toplev.h.
8157 * class.c (typecode_p): Remove prototype and definition.
8159 * cp-tree.h (currently_open_class, is_empty_class, member_p):
8162 * decl.c (push_overloaded_decl_top_level): Remove prototype and
8165 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
8166 in call to `cp_thing'.
8167 (cp_warning): Likewise for function pointer `warning'.
8169 * except.c (do_function_call): Remove prototype and definition.
8170 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
8172 * method.c (is_java_type): Add prototype and make it static.
8174 * parse.y: Include toplev.h.
8176 * pt.c (type_unification): Remove unused variable `arg'.
8177 (instantiate_decl): Likewise for `save_ti'.
8179 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
8181 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
8183 * init.c (build_member_call): Handle template_ids.
8184 * parse.y (primary): Add global_scope template_id.
8186 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
8188 * decl2.c (get_sentry): Use end_temporary_allocation.
8189 Don't declare permanent_obstack.
8191 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
8193 * parse.y (.finish_new_placement): New non-terminal.
8194 (unary_expr, new_type_id): Use it.
8195 * parse.c: Regenerated.
8197 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
8199 * pt.c (redeclare_class_template): Say where the original definition
8200 of the template-parameter's default argument appeared.
8202 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
8204 * call.c (build_over_call): Tweak empty class handling.
8206 * decl.c (make_typename_type): Use currently_open_class.
8208 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
8210 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8212 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
8213 for a type unless it is one.
8215 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
8217 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
8219 * Makefile.in (program_transform_name, objdir): Define.
8221 * Makefile.in (BISON): Use bison from the build tree if it exists.
8224 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8226 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
8228 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
8230 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
8232 * call.c (build_scoped_method_call): Likewise.
8234 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
8236 * init.c (build_new_1): Call suspend_momentary around the creation
8237 of values that must be saved for exception handling.
8238 * parse.y (.build_new_placement): New non-terminal.
8239 (unary_expr, new_placement): Use it.
8240 * parse.c: Regenerated.
8242 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
8244 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
8247 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
8250 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
8252 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
8254 * decl.c (start_decl): Revert problem change.
8256 * Makefile.in (CONFLICTS): Fix.
8258 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8260 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
8262 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
8264 * class.c (finish_struct_1): Use BINFO_SIZE.
8266 * decl.c (start_decl): Use 'tem'.
8268 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
8270 * exception.cc: Include eh-common.h.
8271 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
8272 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
8273 (__cp_push_exception): Initialize eh_info struct as well.
8274 * except.c: Remove local structs and include eh-common.h.
8275 (init_exception_processing): Set language and version codes.
8276 (call_eh_info): Add presence of eh_info to runtime description of
8278 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
8279 * semantics.c (finish_try_block): Call start_catch_block() and
8281 * parse.y (function_try_block): Call start_catch_block() and
8284 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
8286 * typeck.c (original_type): New function.
8287 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
8288 to see if they're actually the same.
8289 * cp-tree.h (original_type): Declare.
8291 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8293 * Makefile.in (lex.o): Depend on output.h.
8295 * call.c (add_function_candidate): Remove unused variable `cand'.
8296 (add_conv_candidate): Likewise.
8297 (build_builtin_candidate): Likewise.
8299 * cp-tree.h: Add prototype for `types_overlap_p'.
8301 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
8303 * decl2.c (merge_functions): Remove unused variables `tmp' and
8306 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
8307 (code_as_string): Likewise.
8308 (language_as_string): Likewise.
8309 (parm_as_string): Likewise.
8310 (op_as_string): Likewise.
8311 (assop_as_string): Likewise.
8312 (cv_as_string): Likewise.
8314 * lex.c: Include output.h.
8316 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
8318 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
8321 * tinfo.cc (__class_type_info::dcast): Change the type of variable
8322 `i' from int to size_t.
8324 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
8327 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
8329 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
8330 DECL_NAMESPACE_SCOPE_P.
8331 (lang_decl_name): Likewise.
8332 * pt.c (tsubst_friend_function, tsubst): Likewise.
8333 * decl.c (pushdecl, redeclaration_error_message, start_decl,
8334 cp_finish_decl, start_function): Likewise.
8335 * class.c (finish_struct_1): Likewise.
8336 * call.c (build_over_call): Likewise.
8337 (compare_ics): Use DERIVED_FROM_P.
8339 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
8341 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
8342 * method.c (build_mangled_name): Use it.
8343 (build_decl_overload_real): Likewise.
8345 * error.c (dump_simple_decl): New function, broken out from ...
8346 (dump_decl): Use it.
8348 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
8350 * ptree.c (lang_print_xnode): Add missing `break'.
8352 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
8354 * call.c (add_template_candidate): Adjust for changes to
8355 fn_type_unification.
8356 (add_template_candidate_real): Likewise.
8357 (add_template_conv_candidate): Likewise.
8358 (build_user_type_conversion_1): Likewise.
8359 (build_new_function_call): Likewise.
8360 (build_object_call): Likewise.
8361 (build_new_op): Likewise.
8362 (build_new_method_call): Likewise.
8363 * class.c (instantiate_type): Likewise.
8364 * cp-tree.h (unification_kind_t): New type.
8365 (fn_type_unification): Adjust prototype.
8366 (type_unificaiton): Likewise.
8367 * pt.c (UNIFY_ALLOW_NONE): New macro.
8368 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
8369 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
8370 (UNIFY_ALLOW_DERIVED): Likewise.
8371 (unify): Change prototype.
8372 (maybe_adjust_types_for_deduction): New function.
8373 (check_cv_quals_for_unify): Likewise.
8374 (determine_specialization): Adjust.
8375 (fn_type_unification): Likewise.
8376 (type_unification): Likewise.
8377 (type_unification_real): Likewise. Use
8378 maybe_adjust_types_for_deduction. Fix mishandling of
8379 back-unification of template functions passed as arguments. Pass
8380 appropriate combination of UNIFY_ALLOW_* to unify.
8381 (unify): Remove unused NTPARMS parameter. Use
8382 check_cv_quals_for_unify. Remove bogus code that allowed
8383 too-generous unification in order to adhere more closely to standard.
8384 (get_bindings_real): Adjust.
8385 (get_class_bindings): Likewise.
8387 * method.c (build_overload_identifier): Only use the innermost
8388 template arguments when mangling.
8389 * pt.c (tsubst_template_argument_vector): New function.
8390 (complete_template_args): Deal with the situation where the
8391 extra_args contain more than one level of arguments.
8392 (lookup_template_class): Deal with member template classes, which
8393 may have more than one level of arguments.
8394 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
8395 Improve handling of member template classes. Use
8396 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
8397 tsubst_template_argument_vector where appropriate.
8398 (regenerate_decl_from_template): Break out from ...
8399 (instantiate_decl): Here.
8401 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
8402 * parse.h: Regenerated.
8403 * parse.c: Really regenerated.
8405 * cp-tree.h (finish_unary_op_expr): New function.
8406 (finish_id_expr): Likewise.
8407 (begin_new_placement): Likewise.
8408 (finish_new_placement): Likewise.
8409 (finish_declarator): Likewise.
8410 (finish_translation_unit): Likewise.
8411 (finish_parmlist): Likewise.
8412 (begin_class_definition): Likewise.
8413 (finish_class_definition): Likewise.
8414 (finish_default_args): Likewise.
8415 (finish_inline_definitions): Likewise.
8416 * parse.y (GCC_ASM_KEYWORD): Remove.
8417 (TYPENAME_ELLIPSIS): Likewise.
8418 * parse.c: Regenerated.
8419 Use new functions in semantics.c in the actions for many rules.
8420 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
8421 * hash.h: Regenerated.
8422 * semantics.c (finish_expr_stmt): Allow NULL expr.
8423 (finish_unary_op_expr): New function, containing
8424 code previously in parse.y.
8425 (finish_id_expr): Likewise.
8426 (begin_new_placement): Likewise.
8427 (finish_new_placement): Likewise.
8428 (finish_declarator): Likewise.
8429 (finish_translation_unit): Likewise.
8430 (finish_parmlist): Likewise.
8431 (begin_class_definition): Likewise.
8432 (finish_class_definition): Likewise.
8433 (finish_default_args): Likewise.
8434 (finish_inline_definitions): Likewise.
8436 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
8438 * typeck.c (build_c_cast): Don't decay arrays and functions to
8439 pointer type when converting to a class type.
8441 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
8443 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
8444 (DECL_CLASS_SCOPE_P): Likewise.
8446 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
8448 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
8449 * decl2.c (constructor_name_full): Likewise.
8451 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
8453 * tree.c (mapcar): Add OVERLOAD support.
8455 * init.c (resolve_offset_ref): We must use basetype_path before we
8456 destroy it with a call to convert_pointer_to.
8458 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
8460 * class.c (currently_open_class): New fn.
8461 * decl.c (lookup_name_real): Use it.
8462 * search.c (lookup_field): Likewise.
8464 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
8466 * cp-tree.def (OVERLOAD): New node.
8467 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
8468 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
8469 (NAMESPACE_BINDING): Remove.
8470 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
8472 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
8474 (tree_overload): New struct.
8475 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
8476 (REAL_IDENTIFIER_TYPE_VALUE): Define.
8477 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
8478 (lang_decl_flags): Remove in_namespace.
8479 (lang_decl): Remove chain.
8480 (DECL_CHAIN, DECL_NAMESPACE): Remove.
8481 (flag_honor_std): Declare extern.
8482 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
8483 namespace_binding, set_namespace_binding,
8484 lookup_function_nonclass, cat_namespace_levels,
8485 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
8486 scratch_ovl_cons, ovl_member, build_overload): Declare.
8487 (decl_list_length, get_namespace_id, current_namespace_id,
8488 overloaded_globals_p): Remove.
8489 (lookup_using_namespace, qualified_lookup_using_namespace): Change
8491 (push_scratch_obstack): New macro.
8492 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
8493 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
8495 (build_new_function_call): Iterate using OVL_CHAIN.
8496 Print DECL_NAME in when reporting ambiguities.
8497 (build_object_call): Iterate using OVL_NEXT for fns, convs.
8498 (build_new_op): Call lookup_function_nonclass.
8499 Iterate using OVL_NEXT.
8500 (build_op_delete_call): Change detection of members.
8501 Do not wrap TREE_LIST around fields and single global functions.
8502 (build_over_call): Don't push a class level if the context is a
8504 (build_new_method_call): Iterate using OVL_NEXT.
8505 * class.c (add_method): Chain overloaded members using
8506 build_overload. Remove copying of method.
8507 (grow_method): When iterating through the obstack, expect OVERLOAD
8508 nodes. Chain overload members.
8509 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
8510 nodes in call to get_baselinks.
8511 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
8512 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
8513 fdecls that are OVERLOAD nodes.
8514 (validate_lhs): New function.
8515 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
8516 code. Use DECL_NAME in error messages. Split code between global
8517 and member function processing.
8518 * decl.c (global_type_node): New static variable.
8519 (in_std): New global.
8520 (struct binding_level): New field usings.
8521 (resume_binding_level): Assert that we are not in a class.
8522 (toplevel_bindings_p): Just check for namespace_p or
8524 (resume_level): Remove.
8525 (find_binding): New function.
8526 (binding_for_name): Call it.
8527 (namespace_binding, set_namespace_binding): New functions.
8528 (push_namespace): Associate binding level with new namespace,
8529 resume_binding_level for existing namespace. Remove old code.
8530 Fake std by counting.
8531 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
8532 (maybe_push_to_top_level): Save current namespace.
8533 (pop_from_top_level): Restore saved namespace.
8534 (pop_namespace): Call suspend_binding_level. Remove old code.
8535 (cat_namespace_levels): New function.
8536 (set_identifier_type_value_with_scope): For namespace bindings,
8537 set BINDING_TYPE, and use global_type_node.
8538 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
8539 (identifier_type_value): New function.
8540 (pushtag): If no context, use current_namespace.
8541 (duplicate_decls): Don't process DECL_CHAIN.
8542 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
8543 already set. Never reset it to NULL_TREE. Lookup global variables
8544 in their namespace. Push overloaded templates if they are on
8546 (pushdecl_namespace_level): New function.
8547 (pushdecl_top_level): Implement using pushdecl_namespace_level.
8548 (pushdecl_using_decl): New function.
8549 (overloaded_globals_p): Remove.
8550 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
8551 them. Use namespace_binding and set_namespace_value.
8552 (redeclaration_error_message): Complain if the declarations come
8553 from different namespaces.
8554 (lookup_tag): On namespace level, look in the BINDING_TYPE.
8555 (lookup_namespace_name): Pass tree_bindings from stack. Remove
8557 (select_decl): New function.
8558 (lookup_name_real): Call it for qualified and unqualified lookup.
8559 Pass tree_bindings from the stack.
8560 If prefer_type is 1, also accept namespaces.
8561 (lookup_function_nonclass): New function.
8562 (init_decl_processing): Set the binding level of the global
8563 namespace to global_binding_level.
8564 Build a proper type list for __builtin_apply.
8565 Initialize std_node to "fake std" if flag_honor_std is set.
8566 Initialize global_type_node.
8567 Allocated bad_alloc in namespace std if flag_honor_std.
8568 (define_function): Set the DECL_CONTEXT to the current_namespace.
8569 (start_decl): A namespace is not considered as a context here. If
8570 the DECL_CONTEXT is a namespace, push the decl.
8571 (cp_finish_decl): Check for namespaces used as initializers.
8572 (grokfndecl): Add namespace parameter. Remove processing of
8574 (grokvardecl): Add namespace parameter.
8575 (grokdeclarator): Process SCOPEs that are namespaces. For
8576 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
8577 (start_function): Check for contexts that are namespaces.
8578 Set context for declarations that have not been pushed.
8579 (store_parm_decls): Check for ::main only.
8580 (finish_function): Likewise.
8581 (start_method): Check for contexts that are namespaces.
8582 (start_method): Remove DECL_CHAIN processing.
8583 * decl2.c (flag_honor_std): Declare.
8584 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
8585 (decl_namespace_list): New static global.
8586 (grok_x_components): Ignore namespaces as type contexts.
8587 (check_classfn): Expect OVERLOAD nodes.
8588 (grokfield): Remove DECL_CHAIN processing.
8589 (finish_file): Call cat_namespace_levels.
8590 (merge_functions): New function.
8591 (ambiguous_decl): Rewrite.
8592 (lookup_using_namespace): Produce tree_bindings.
8593 (qualified_lookup_using_namespace): Likewise.
8594 (set_decl_namespace, decl_namespace, current_decl_namespace,
8595 push_decl_namespace, pop_decl_namespace): New functions.
8596 (arg_lookup): New struct.
8597 (add_function, arg_assoc_namespace, arg_assoc_class,
8598 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
8600 (get_namespace_id, current_namespace_id): Remove.
8601 (do_toplevel_using_decl): Rewrite.
8602 (do_class_using_decl): Complain about namespace qualifiers.
8603 (do_using_directive): Sorry if not on namespace level. Complain
8604 about unknown namespaces.
8605 * error.c (dump_aggr_type): Check for namespace contexts.
8606 * except.c (init_exception_processing): Push terminate into std.
8607 * friend.c (is_friend): A namespace is not a context, here.
8608 * init.c (expand_member_init): Remove DECL_CHAIN processing.
8609 (build_offset_ref): Process OVERLOAD nodes.
8610 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
8611 * lex.c (identifier_type): Loop using OVL_CHAIN.
8612 (see_typename): Set looking_for_typename to 2.
8613 (real_yylex): Likewise.
8614 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
8615 (do_scoped_id): Expect OVERLOAD nodes.
8616 Change calling convention for qualified_lookup_using_namespace.
8617 (build_lang_decl): Don't set in_namespace anymore.
8618 * method.c (typevec_size): New global.
8619 (build_overload_nested_name): Return if global_namespace.
8620 Otherwise, always expect a declaration context.
8621 (build_qualified_name): Likewise.
8622 Make sure we don't write beyond typevec_size.
8623 (build_decl_overload_real): Likewise.
8624 Allocate one extra slot for the namespace.
8625 (hack_identifier): Mark code dead.
8626 Process OVERLOAD and NAMESPACE_DECL nodes.
8627 * parse.y (program): Pop namespaces until in global namespace.
8628 (extdef): In a using-declaration, don't discard the identifier if
8629 there is no declaration.
8630 (left_curly): Ignore type contexts which are namespaces.
8631 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
8633 * pt.c (template_class_depth): Expect types to be namespaces.
8634 (determine_specialization): Simplify by expecting OVERLOAD nodes.
8635 (push_template_decl): Push into namespace level.
8636 Reset ctx if it is a namespace.
8637 Set DECL_CONTEXT to current_namespace if not set already.
8638 Ignore real contexts that are namespaces.
8639 (mangle_class_name_for_template): Skip global_namespace.
8640 Mangle other namespaces as declarations.
8641 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
8642 (lookup_template_class): Push into namespace of context.
8643 If the context is a namespace, set it to global_namespace.
8644 Use id_context for mangling.
8645 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
8646 (tsubst_friend_function): Ignore namespace contexts.
8647 Push into namespace level.
8648 (tsubst): Handle NAMESPACE_DECL nodes.
8649 Remove DECL_CHAIN processing.
8650 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
8651 * ptree.c (print_lang_identifier): Print bindings.
8652 (lang_print_xnode): Print OVERLOAD nodes.
8653 * rtti.c (init_rtti_processing): Push type_info into std.
8654 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
8655 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
8656 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
8657 lookup_fnfields_here): Likewise.
8658 Process all nodes, instead of going through TREE_CHAIN.
8659 * sig.c (build_signature_pointer_or_reference_type): Set context
8660 to global_namespace.
8661 (build_signature_table_constructor): Expect OVERLOAD nodes.
8662 * spew.c (yylex): Save old setting of looking_for_typename.
8663 * tree.c (decl_list_length): Remove.
8664 (binding_init): New function.
8665 (count_functions): Rewrite.
8666 (is_overloaded_fn): Expect OVERLOAD nodes.
8667 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
8668 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
8669 ovl_member): New functions.
8670 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
8671 (type_unknown_p): Likewise.
8672 (require_instantiated_type): Likewise.
8673 (build_component_ref): Declare code dead.
8674 (build_x_function_call): Create and expect OVERLOAD nodes.
8675 (build_function_call_real): Check for ::main only.
8676 (build_unary_op): Likewise. Expect OVERLOAD nodes.
8677 (convert_for_assignment): Check for TREE_LIST before accessing
8679 * decl.c (duplicate_decls): Check for namespace bindings instead
8681 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
8682 lookup_name_current_level, start_decl, xref_tag,
8683 finish_enum): Likewise.
8684 * init.c (build_offset_ref): Likewise.
8685 * search.c (lookup_field): Likewise.
8686 (lookup_fnfields): Likewise.
8687 (dfs_debug_mark): Likewise.
8688 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
8689 (poplevel_class, pop_from_top_level): Likewise.
8690 * decl2.c (finish_method): Likewise.
8691 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
8692 * decl.c (record_builtin_type): Likewise.
8693 (init_decl_processing, grokfndecl): Likewise.
8694 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
8695 (make_lang_type): Likewise.
8696 * parse.y (make_thunk): Likewise.
8697 * pt.c (tsubst): Likewise.
8698 * tree.c (debug_binfo): Likewise.
8699 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
8700 tinfo2.cc, inc/new.h: Add std qualifications.
8701 * inc/new: Wrap with namespace std if __HONOR_STD.
8702 * inc/typeinfo: Likewise.
8704 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
8706 * call.c (build_user_type_conversion_1): Handle second_conv
8707 properly for templates.
8709 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
8711 * method.c (build_decl_overload_real): Set TREE_USED flag to
8712 zero for build_type_variants nodes as well.
8714 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
8716 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
8718 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
8720 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
8721 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
8722 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
8723 xref.o): Add toplev.h dependencies.
8725 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
8727 * errfn.c (cp_error, cp_warning): Remove declarations for
8728 error and warning respectively.
8730 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8732 * error.c: Convert to using ctype macros defined in system.h.
8733 * method.c: Likewise.
8735 * lex.c: Likewise. Also remove redundant system header stuff.
8737 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
8739 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
8740 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
8741 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
8742 xref.c: Add include of toplev.h.
8744 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
8746 * tree.c (perm_manip): Also regenerate the RTL of an extern.
8747 (copy_to_permanent): Use end_temporary_allocation.
8749 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
8751 * init.c (expand_vec_init): The initialization of each array
8752 element is a full-expression.
8754 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
8756 * method.c (build_mangled_name): Add a call to build_type_variant
8757 to get the right type.
8759 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
8761 * Makefile.in: Add .SUFFIXES.
8763 * cp-tree.def: Remove NAMESPACE_DECL.
8765 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
8767 * call.c (build_over_call): Do evaluate arg even if it has empty
8769 * decl.c (start_function): Don't push a member function.
8771 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
8773 * Makefile.in (g++FAQ.info): Put -o option before input file.
8775 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
8777 * gxxint.texi: Add info for squangling codes K and B.
8779 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
8781 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
8782 the expression in templates.
8783 (finish_stmt_expr): Likewise.
8785 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
8787 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
8789 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
8791 * decl.c (maybe_push_to_top_level): Always clear
8792 current_template_parms and processing_template_decl.
8793 (pushtag): Remove check of current_class_type and some comments,
8794 since maybe_push_to_top_level no longer creates confusion.
8796 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
8798 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
8799 (DECL_CLASS_TEMPLATE_P): Likewise.
8800 (DECL_PRIMARY_TEMPLATE): Likewise.
8801 (PRIMARY_TEMPLATE_P): Use it.
8802 (push_template_decl_real): New function.
8803 (redeclare_class_template): Take new template parameters as
8805 (is_specialization_of): New function.
8806 (comp_template_args): Declare.
8807 * decl.c (pushtag): Handle friend template classes.
8808 (xref_tag): Likewise. Use new calling convention for
8809 redeclare_class_template.
8810 * decl2.c (grok_x_components): Handle friend templates.
8811 * friend.c (is_friend): Use is_specialization_of where
8812 appropriate. Deal with friend class templates.
8813 (make_friend_class): Let a class template be friends with itself.
8814 * pt.c (comp_template_args): Remove declaration.
8815 (tsubst_friend_class): New function.
8816 (push_template_decl_real): New function.
8817 (push_template_decl): Use it.
8818 (redeclare_class_template): Adjust for new calling convention.
8819 (comp_template_args): Give it external linkage.
8820 (instantiate_class_type): Use tsubst_friend_class to deal
8821 with friend templates.
8822 * typeck.c (comptypes): Use comp_template_args, rather than
8823 expanding it inline.
8824 * parse.y (component_decl): Handle a nested template type
8825 like other component type declarations.
8827 * pt.c (check_explicit_specialization): Handle overloaded
8828 constructors correctly.
8830 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
8831 (lookup_template_class): Use it.
8833 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
8835 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
8836 * cp-tree.h: Add WRAPPER support.
8837 * call.c (add_candidate): Split out from add_*_candidate fns.
8838 (build_over_call): Take the candidate instead of function and args.
8839 Enforce access control here. Emit overload warnings here.
8840 (add_warning): New fn.
8841 (joust): Add WARN parm. If not set, call add_warning instead of
8842 printing a warning. Re-enable some warnings.
8844 (convert_like): Adjust.
8845 (build_new_op): Adjust.
8846 (build_new_function_call): Adjust.
8847 (build_user_type_conversion_1): Adjust.
8848 (USER_CONV_FN): Adjust.
8849 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
8850 build_int_wrapper): New fns.
8852 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
8854 * pt.c (unify): Fix typo in previous change.
8856 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
8858 * error.c (dump_type_real): Declare canonical_name.
8860 * typeck.c (comp_target_types): Fix PMFs.
8862 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
8864 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
8865 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
8868 * pt.c (tsubst): Decrease the template-level of
8869 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
8870 TEMPLATE_PARM_INDEX.
8871 (template_decl_level): New function.
8872 (unify): Make sure to record unifications for template
8873 parameters, even when the parameters exactly match the arguments.
8874 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
8875 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
8876 aren't from the level we're currently working on.
8878 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
8880 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
8882 * decl2.c (check_member_template): Set DECL_IGNORED for member
8883 class templates, too.
8885 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
8887 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8889 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
8891 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
8893 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
8894 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
8895 (init_decl_processing): Handle TI types.
8896 * typeck.c (unsigned_type, signed_type): Handle TI types.
8898 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
8900 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
8901 New local added_libraries. Increment count when add library to
8904 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
8906 * cp-tree.h (type_as_string_real): New function.
8907 * pt.c (mangle_class_name_for_template): Use it.
8908 * error.c (dump_aggr_type): Change prototype.
8909 (dump_type_prefix): Likewise.
8910 (dump_type_suffix): Likewise.
8911 (dump_type_real): Convert from dump_type. If desired, the
8912 "canonica" name of a typedef, i.e., the name of the underlying
8913 type, can be printed.
8914 (dump_type): Call dump_type_real.
8916 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
8918 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
8920 * typeck.c (comp_target_types): Tweak pedantic case.
8921 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
8922 Return -1 or 1 instead of 1 or 2.
8923 (compparms): Remove STRICT handling.
8924 (convert_for_assignment): Fix handling of pmfs.
8926 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
8928 * typeck.c (comp_target_types): Handle references like pointers.
8929 (comp_target_parms): Note that return code from comp_target_types
8930 can be negative to indicate failure.
8932 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8934 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
8935 which requires a working target compiler to build.
8937 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
8939 * tree.c (avoid_overlap): Add prototype.
8941 * spew.c (num_tokens): Add prototype.
8942 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
8944 * search.c (dfs_check_overlap): Add prototype.
8945 (dfs_no_overlap_yet): Likewise.
8947 * pt.c (original_template): Add prototype.
8948 (inline_needs_template_parms): Likewise.
8949 (push_inline_template_parms_recursive): Likewise.
8950 (retrieve_specialization, register_specialization): Likewise.
8951 (print_candidates, reduce_template_parm_level): Likewise.
8952 (build_template_decl, mark_template_parm): Likewise.
8953 (tsubst_friend_function, get_bindings_real): Likewise.
8955 * method.c (start_squangling): Add prototype.
8956 (end_squangling, check_ktype, issue_ktype): Likewise.
8957 (build_overloaded_scope_ref, check_btype): Likewise.
8958 (build_mangled_template_parm_index): Likewise.
8960 * lex.c (init_cpp_parse): Add prototype.
8961 (handle_cp_pragma, handle_sysv_pragma): Likewise.
8962 (reduce_cmp, token_cmp): Likewise.
8964 * except.c (call_eh_info): Add prototype.
8965 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
8966 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
8968 * decl2.c (is_namespace_ancestor): Add prototype.
8969 (namespace_ancestor, add_using_namespace): Likewise.
8970 (ambiguous_decl): Likewise.
8972 * decl.c (indent): Add prototype.
8974 * call.c (add_template_candidate_real): Add prototype.
8976 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
8978 * decl2.c (build_expr_from_tree): Just return a PMF.
8980 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
8982 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
8983 when doing initializations.
8985 * pt.c (unify): Use comptypes to compare type args.
8987 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
8989 * decl.c (duplicate_decls): Fix check for when it's safe to free
8992 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
8995 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
8997 * pt.c (build_template_parm_index): Add prototype.
8999 * search.c (my_tree_cons): Don't clear words outside the
9000 newly allocated node.
9002 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
9004 * lex.c (init_parse): Now returns char* containing the filename.
9006 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
9007 Jeff Law <law@cygnus.com>
9009 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
9012 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9014 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
9016 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
9018 * decl.c (duplicate_decls): Don't warn for redundant decls if
9019 friend: let add_friend take care of it.
9021 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9023 * sig.c (build_signature_pointer_constructor): Don't set
9024 TREE_HAS_CONSTRUCTOR for a signature pointer.
9025 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
9026 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
9028 * typeck.c (build_unary_op): Only allow taking the address of a
9030 * typeck2.c (digest_init): Simplify.
9031 (store_init_value): Don't pedwarn about using { } for pmfs.
9033 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
9035 * cp-tree.h (start_decl): Update prototype.
9036 * decl.c (start_decl): Like the C version, new parameters
9037 for the attributes. Call cplus_decl_attributes here,
9038 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
9039 (grokdeclarator): Pass NULL for new start_decl arguments.
9040 * pt.c (tsubst_expr): Likewise.
9041 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
9042 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
9043 * lex.c (build_lang_decl): Add lang_name_java.
9044 * class.c (push_lang_context): Add lang_name_java.
9045 * method.c (build_mangled_name): Check for is_java_type.
9047 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
9049 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
9050 * call.c (build_scoped_method_call): Check for TREE_CODE for
9051 VOID_TYPE instead of type == void_type_node.
9052 (build_method_call): Likewise.
9053 * decl.c (lookup_name_real): Likewise.
9054 (grokdeclarator): Likewise.
9055 (start_decl): Likewise.
9056 (grokparms): Likewise.
9057 (start_function): Likewise.
9058 (finish_function): Likewise.
9059 (start_method): Likewise.
9061 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
9063 * lex.c (finput): New variable.
9064 (init_cpp_parse): Renamed from init_parse.
9065 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
9066 (finish_parse): New function.
9067 * cp-tree.h (init_lex, init_parse): Remove declarations.
9069 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
9071 * call.c (build_call): Still evaluate the actual argument.
9072 * class.c (is_empty_class): Update for -fnew-abi.
9074 * decl2.c: -fnew-abi implies -fsquangle.
9076 * method.c (do_build_assign_ref): Don't do anything to copy
9078 (do_build_copy_constructor): Likewise.
9079 * call.c (build_over_call): Likewise.
9081 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9083 * tree.c (avoid_overlap): Return a value.
9085 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
9087 * method.c (check_btype): Add missing argument to xrealloc.
9088 (check_ktype): Likewise.
9090 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9092 Implement empty base optimization.
9093 * class.c (finish_struct_1): Add vbase fields earlier. Set
9094 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
9095 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
9096 (types_overlap_p): New fn.
9097 * tree.c (avoid_overlap): New fn.
9098 (build_base_fields): Use it to avoid overlapping empty bases.
9099 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
9101 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
9103 Re-implement allocation of base class subobjects.
9104 * tree.c (unshare_base_binfos): New fn.
9105 (layout_basetypes): Use it. Now handles offsets of both virtual and
9106 non-virtual bases, after layout_type.
9107 (layout_vbasetypes): Remove.
9108 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
9109 (build_vbase_pointer_fields): Split out from old layout_basetypes.
9110 * class.c (finish_base_struct): Lose offset handling code.
9111 Move nonvdtor warning here. Don't mess with t_binfo anymore.
9112 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
9113 * cp-tree.h: Adjust.
9115 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
9117 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
9118 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
9119 * class.c (duplicate_tag_error): Likewise.
9120 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
9121 * tree.c (layout_vbasetypes): Update from layout_record, remove
9122 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
9123 (layout_basetypes): Likewise.
9125 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
9127 * class.c, Make sure system.h is included just after config.h.
9128 Delete lingering stdio and errno references too.
9129 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
9131 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
9133 * friend.c (is_friend): Fix access control for local classes.
9135 * class.c (is_empty_class): New fn.
9136 * call.c (build_call): Don't pass empty class objects to a function.
9138 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
9140 * call.c (build_over_call): Do name resolution for default
9141 arguments of function templates in the scope of the templates.
9143 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
9145 * call.c: Include system.h. Remove includes, declarations and
9146 defines provided by system.h.
9147 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
9148 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
9149 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
9150 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
9151 * typeck2.c, xref.c: Likewise.
9152 * Makefile.in: Dependencies updated as appropriate.
9153 * Make-lang.in: Likewise.
9155 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
9157 * pt.c (fn_type_unification): Allow incomplete unification without
9158 an immediate error message.
9160 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
9162 * tree.c (member_p): New fn.
9163 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
9164 initializing class members.
9166 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
9167 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
9169 * call.c (build_method_call): Handle non-scoped destructors, too.
9170 * pt.c (tsubst_copy): Likewise.
9172 * pt.c (print_template_context): Split out...
9173 (push_tinst_level): ...from here.
9175 * friend.c (is_friend): Don't pass a type to decl_function_context.
9177 * typeck.c (convert_for_initialization): Always hand off
9178 conversions to class type.
9180 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9182 * friend.c (is_friend): Local classes have the same access as the
9185 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
9187 * typeck.c (expand_target_expr): Delete dead function.
9189 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
9191 * repo.c (save_string): Delete dead function.
9193 * method.c (thunk_printable_name): Delete dead function.
9195 * lex.c (yynextch): Delete dead function.
9197 * expr.c (tree_extract_aggr_init): #if 0 out.
9199 * except.c (do_unwind): Delete dead function.
9200 (easy_expand_asm): Likewise.
9202 * cvt.c (build_conversion_type_1): Delete dead function.
9204 * cp-tree.h (push_expression_obstack): Declare.
9206 * call.c (source_type): #if 0 out.
9208 * class.c (alter_access): Remove unused label. Add braces
9209 around empty else clause.
9211 * lex.c (yyprint): Fix argument to printf.
9213 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
9215 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
9217 * pt.c (instantiate_class_template): Make sure template
9218 arguments are permanent.
9219 * init.c (resolve_offset_ref): Don't go looking around in
9222 * semantics.c: Add routines to handle expressions, and some
9223 declaration processing.
9224 * parse.y: Use them.
9225 (current_class_depth): Move declaration to cp-tree.h.
9226 * parse.c: Regenerated.
9227 * cp-tree.h: Use them.
9228 (current_class_depth): Declare.
9229 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
9231 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
9233 * error.c (dump_decl): Be a bit more explicit with template
9234 type arguments, when verbose.
9236 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
9238 * inc/exception: Reorder closing braces.
9240 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
9242 * pt.c (redeclare_class_template): New function.
9243 * cp_tree.h (redeclare_class_template): Declare it.
9244 * decl.c (xref_tag): Use it.
9246 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
9248 * call.c (build_over_call): Check IS_AGGR_TYPE, not
9250 * typeck.c (convert_arguments): Likewise.
9252 * decl.c (grokdeclarator): Remove const and volatile from type after
9253 setting constp and volatilep.
9255 * class.c (finish_struct_1): Don't warn about bool bitfield larger
9258 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
9260 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
9262 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
9264 * call.c (build_object_call): Complain about ambiguous operator(),
9265 rather that crashing.
9266 (build_new_op): Likewise.
9267 (build_op_delete_call): Likewise.
9269 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
9271 * cvt.c (perform_qualification_conversions): Use comp_target_types
9272 instead of comp_ptr_ttypes.
9274 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
9276 * cp-tree.h (enforce_access): Declare.
9277 * call.c (enforce_access): Make it extern, not static.
9278 * class.c (alter_access): Use enforce_access; modify code for ISO
9279 compliance, rather than ARM rules.
9281 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9283 * cp-tree.h: Fix typo.
9285 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
9287 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
9288 if (aggregate_value_p (type)).
9290 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
9292 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
9294 * tree.c (mapcar): When dealing with a DECL, use it's constant
9296 * pt.c (lookup_template_class): Don't mangle the names of template
9297 classes whose arguments are unknown.
9299 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
9301 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
9303 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
9305 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
9307 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
9308 boolean_type_node to 1.
9310 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
9312 * error.c (dump_expr): Remove unused variable `l'.
9314 * pt.c (for_each_template_parm): New function, created by
9315 converting uses_template_parms.
9316 (tree_fn_t): New typedef.
9317 (uses_template_parms): Use it.
9318 (mark_template_parm): New function.
9319 (push_template_decl): Check that the argument list of a partial
9320 specialization uses all the template parameters.
9322 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
9323 with it; we might want it for debugging.
9324 * cp-tree.h (type_unification): Change interface.
9325 * class.c (finish_struct_1): Skip nested template types, just like
9326 ordinary nested types.
9327 (instantiate_type): Use new interface to type_unification.
9328 * lex.c (init_lex): Add __sz as opname for sizeof.
9329 * method.c (build_overload_scope_ref): New function.
9330 (build_overload_int): Handle complex expressions. Set
9331 numeric_output_need_bar if necessary.
9332 (build_overload_value): Handle non-PARM_DECL nodes; this
9333 routine is now used by build_overload_int. Remove some
9334 assignments to numeric_output_need_bar. Use
9335 build_overload_scope_ref.
9336 (build_qualified_name): Note that some template mangled names end
9337 with digits, and set numeric_output_need_bar appropriately. Use
9338 build_underscore_int.
9339 * pt.c (unify): Change interface.
9340 (type_unification_real): Likewise.
9341 (determine_specialization): Use new interfaces.
9342 (tsubst): Deal gracefully with situations in which the argument
9343 vector is not fully filled.
9344 (fn_type_unification): Use new interfaces.
9345 (type_unification): Likewise. Remove NOP_EXPR hack.
9346 (type_unification_real): Likewise.
9347 (unify): Likewise. Deal with unification of complex expressions.
9349 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9351 * pt.c (complete_template_args): Initialize skip properly.
9353 * decl.c (make_typename_type): Revert.
9354 (make_implicit_typename): Remove.
9355 (lookup_name_real): Don't call it. Call lookup_field if we see a
9356 TYPE_DECL from a template base.
9357 * search.c (lookup_field): Do implicit typename stuff.
9359 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
9360 Geoff Noer <noer@cygnus.com>
9362 * Makefile.in: Various fixes for building cygwin32 native toolchains.
9363 * Make-lang.in: Likewise.
9365 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9367 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
9369 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
9371 * decl.c (make_implicit_typename): Rewrite removed code.
9372 (make_typename_type): Call it if the type we look up comes from
9373 a base that uses template parms.
9375 * pt.c (complete_template_args): Rewrite.
9376 (tsubst, FUNCTION_DECL): Use it.
9378 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
9380 * semantics.c (finish_asm_stmt): Fix combine strings. Call
9381 c_expand_asm_operands () if output_operands, input_operands or
9382 clobbers is not NULL_TREE.
9384 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9386 * pt.c (complete_template_args): New function.
9387 (get_bindings): Deal with specializations of function templates
9388 with return type containing parameters from outer class
9390 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
9391 substitute arguments and compose a new type.
9393 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
9395 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
9398 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9400 * decl.c (make_implicit_typename): Lose useless code.
9402 * call.c (standard_conversion): Handle A* -> const A* properly.
9404 * pt.c (get_bindings_real): Rename from get_bindings. Add
9406 (get_bindings): Pass 1.
9407 (get_bindings_overload): Pass 0.
9409 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
9411 * pt.c (check_explicit_specialization): When reverting a static
9412 member function, also remove the `this' parameter from
9413 last_function_parms.
9415 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9417 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
9420 * decl.c (store_bindings): Use free_binding_vecs.
9421 (pop_from_top_level): Likewise.
9423 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
9425 * decl.c (make_implicit_typename): Only change the type of a
9428 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
9430 * semantics.c: New file, containing routines to perform the
9431 semantic phase of parsing.
9433 * pt.c (tsubst_expr): Likewise.
9434 * cp-tree.h: Declare the various functions in semantics.c.
9435 Provide macros to access _STMT tree nodes.
9436 * cp-tree.def: Add ASM_STMT tree node.
9437 * Makefile.in, Make-lang.in: Add dependencies on and for
9440 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
9442 * pt.c (push_template_decl): Only check primary templates.
9444 * pt.c (check_explicit_specialization): Complain about default args
9445 in explicit specialization.
9447 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
9448 constructor_declarator.
9450 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
9452 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
9453 has no overloaded operator ->.
9455 * call.c (build_field_call): Don't crash when presented with a
9456 field that is actually a nested type.
9458 * decl.c (pushtag): Deal with friend class injection in local
9461 * call.c (build_object_call): Don't crash if OBJ is a
9462 pointer-to-member-function.
9464 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
9466 * pt.c (push_template_decl): Complain about template with C linkage,
9467 anonymous template class.
9469 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
9471 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
9472 * search.c: Likewise.
9474 * lex.c (do_pending_defargs): Only call
9475 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
9477 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
9479 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
9481 * parse.y: Deal with CONSTRUCTORS in new_initializers.
9483 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
9485 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
9486 closely mimics the behavior in parse.y.
9487 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
9488 into a compound statement.
9490 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
9492 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
9493 * pt.c (inline_needs_template_parms): New fn.
9494 (original_template): New fn.
9495 (push_inline_template_parms_recursive): New fn.
9496 (maybe_begin_member_template_processing): Use them.
9497 (maybe_end_member_template_processing): Likewise.
9498 (is_member_or_friend_template): Rename to is_member_template.
9499 Member functions of local classes are never member templates.
9501 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9503 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
9504 added in the class scope to catch redefinition error.
9506 * pt.c (reduce_template_parm_level): Also copy
9507 the DECL_TEMPLATE_PARMS field.
9509 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
9511 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
9512 reduced-level template type parameter.
9514 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
9516 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
9517 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
9518 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
9519 * decl.c (duplicate_decls): Propagate it.
9520 * typeck2.c (abstract_virtuals_error): Use two loops to emit
9521 abstract virtual functions and virtual functions which need a
9522 final overrider separately.
9524 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
9526 * lang-specs.h: Properly put brackets around array elements in
9529 * typeck.c (build_binary_op_nodefault): Correctly place parens around
9530 && and || in expression.
9532 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
9534 * call.c (default_parm_conversions): Remove prototype definition.
9535 (build_method_call): Remove unused variable result.
9537 * cvt.c (ocp_convert): Remove unused variable conversion.
9539 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
9541 * except.c (do_unwind): #if 0 definition of unused variables fcall
9544 * expr.c (extract_scalar_init): #if 0 prototype and function
9547 * init.c (expand_aggr_init_1): Remove unused variable init_type.
9548 (build_new_1): Remove unused variable t.
9550 * pt.c (instantiate_class_template): Remove unused variable newtag;
9551 cast called function return value to void.
9552 (do_decl_instantiation): Remove unused variables name and fn.
9554 * tree.c (get_type_decl): Add default return to shut up compiler from
9555 complaining control reaches end of non-void function.
9557 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
9559 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
9561 * call.c (default_parm_conversions): Remove prototype definition.
9562 (build_method_call): Remove unused variable result.
9563 (build_over_call): Add default case in enumeration switch.
9565 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
9567 * decl2.c (lang_decode_option): Change j's type to size_t.
9569 * tree.c (layout_vbasetypes): record_align and desired_align are of
9570 type unsigned int; const_size and nonvirtual_const_size likewise.
9572 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
9574 * parse.y (new_initializer): Make sure all initializers are
9577 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
9579 * decl2.c (import_export_decl): Mark tinfo functions for
9580 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
9582 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
9584 * method.c: Fix typo.
9586 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9588 * method.c: Include "system.h" to get stdlib.h, stdio.h,
9589 ctype.h, string.h, etc.
9590 (issue_nrepeats): Add default case in enumeration switch.
9591 (check_btype): Likewise.
9592 (process_overload_item): Likewise.
9594 * Makefile.in (method.o): Depend on system.h.
9596 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9598 * lex.c (do_scoped_id): Fix parenthesizing.
9600 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
9602 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
9603 FLAG_RTTI is unset, initialize type info machinery and continue
9604 with FLAG_RTTI enabled.
9605 (get_typeid): Likewise.
9607 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
9609 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
9612 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
9614 * pt.c (finish_member_template_decl): Deal more gracefully with
9615 invalid declarations.
9617 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
9619 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
9620 cp-tree.h: Clean up more old overloading code, old RTTI code, and
9621 some formatting quirks.
9623 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
9624 method.c, pt.c, ptree.c, typeck.c: Remove support for
9625 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
9627 * Makefile.in: Adjust.
9629 * pt.c (unify): Don't allow reduced cv-quals when strict.
9631 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
9632 *type_unification* and unify.
9634 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
9636 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
9637 (nested_name_specifier): And add it before this use.
9638 (typename_sub0): And this use. Also add use without the keyword.
9639 (typename_sub1): Likewise.
9640 * pt.c (instantiate_class_template): Don't actually instantiate
9641 anything if our type uses template parms.
9643 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
9645 * decl.c (start_function): Don't call temporary_allocation for a
9648 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9650 * pt.c (instantiate_class_template): Don't mess with friends if
9651 our type uses template parms.
9653 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
9655 * parse.y (nested_name_specifier): Use explicit_template_type.
9656 (typename_sub): Allow a template_type, an explicit_template_type,
9657 or an implicit template type at the end.
9658 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
9659 * decl.c (make_typename_type): Handle template-id where the name
9661 * call.c (build_scoped_method_call): Handle member template
9663 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
9664 destructor is represented by the type.
9666 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
9667 * parse.y (nested_name_specifier): Add 'template' case.
9668 (explicit_template_type): New rule.
9669 (typename_sub): Use it.
9670 * decl.c (make_typename_type): Handle getting a template-id for NAME.
9671 * pt.c (tsubst): Likewise.
9673 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
9675 * pt.c (add_to_template_args): Fix thinko.
9676 (instantiate_class_template): Call it later.
9678 * pt.c (get_class_bindings): Add outer_args parm.
9679 (most_specialized_class): Likewise.
9680 (instantiate_class_template): Pass it.
9681 (more_specialized_class): Likewise.
9682 (lookup_template_class): Get context from template if none
9684 (finish_member_template_decl): Don't do anything with a
9685 partial specialization.
9686 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
9688 * class.c (finish_struct): Member class templates have already been
9689 checked for name clashes.
9690 * decl.c (pushdecl_with_scope): Handle pushing at class level.
9692 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
9694 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
9695 (tsubst, *_PARM): Support multiple levels of template classes.
9696 (instantiate_class_template): Look up the pattern from the
9698 (lookup_template_class): Handle getting a template for d1.
9699 (push_template_decl): Correct setting of 'primary'.
9700 (reduce_template_parm_level): Add 'levels' parm.
9701 (finish_member_template_decl): Support member class templates.
9702 (template_class_depth): Handle multiple levels.
9703 * parse.y (component_decl_1, fn.def2): Remove member template case.
9704 (component_decl): Add member template cases.
9705 * decl2.c (check_member_template): We now handle member template
9707 * decl.c (pushtag): Handle member templates.
9708 * method.c (do_inline_function_hair): Don't touch
9709 IDENTIFIER_GLOBAL_VALUE.
9710 * init.c (build_offset_ref): If name isn't an identifier, just
9712 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
9714 * typeck.c (get_delta_difference): Do adjust for conversions to
9715 and from virtual base.
9717 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
9719 * typeck.c (get_delta_difference): Give hard error for conversion
9722 * cp-tree.h: Tweak formatting.
9724 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
9726 * decl.c (push_namespace): Handle redeclaration error.
9728 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
9729 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
9730 (NAMESPACE_BINDING): New macro.
9731 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
9734 * pt.c (push_template_decl): Use innermost_args.
9736 * decl.c (get_unique_name): Tweak from earlier in the name.
9738 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
9740 * cp-tree.def: Add CPLUS_BINDING node.
9741 * cp-tree.h (tree_binding): New struct.
9742 (BINDING_SCOPE, BINDING_VALUE): New macros.
9743 (current_namespace, global_namespace): Declare extern.
9744 (struct lang_decl_flags): New field in_namespace.
9745 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
9746 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
9747 (TREE_INDIRECT_USING): New macro.
9748 * decl2.c (current_namespace, global_namespace): Declare. The
9749 value is a NAMESPACE_DECL now, not a TREE_LIST.
9750 (is_namespace_ancestor, namespace_ancestor): New static functions.
9751 (add_using_namespace, ambiguous_decl): Likewise.
9752 (lookup_using_namespace): New support function for lookup_name.
9753 (qualified_lookup_using_namespace): New support function for
9754 do_scoped_id and lookup_namespace_name.
9755 (get_namespace_id): Mark as obsolete.
9756 (current_namespace_id): Likewise.
9757 (do_namespace_alias): Implement.
9758 (do_using_directive): Implement as call to add_using_namespace.
9759 * decl.c (binding_for_name): New function.
9760 (push_namespace, pop_namespace): Implement.
9761 (push_decl): Don't install a FUNCTION_DECL in the global branch.
9762 (lookup_namespace_name): Implement using qualified lookup.
9763 (lookup_name_real): For global scoping, lookup in
9764 global_namespace. For namespace scoping, lookup in given
9765 namespace. For unscoped lookup, iterate over namespace,
9766 considering using directives.
9767 (init_decl_processing): Initialize global_namespace.
9768 (grokvardecl): Build assembler name as static name for globals.
9769 (grokdeclarator): Remove old namespace mangling.
9770 (xref_tag): When installing a global binding for the
9771 tag, make sure we have an identifier.
9772 * method.c (build_overload_nested_name): Mangle namespaces.
9773 (build_qualified_name): Likewise.
9774 (build_decl_overload_real): Likewise.
9775 * lex.c (build_lang_decl): Set namespace for new declaration to
9777 (do_scoped_id): Find global names in global or current
9778 namespace, or using qualified namespace lookup, depending on
9780 * init.c (build_member_call): When scope is namespace, use
9781 build_x_function_call instead.
9782 (build_offset_ref): When scope is namespace, collapse processing
9783 to lookup_namespace_name instead.
9784 * error.c (dump_decl): Support NAMESPACE_DECL.
9785 * decl.c (pushdecl): Bind globals to current namespace.
9786 (push_overloaded_decl): Likewise.
9787 (lookup_tag): Likewise.
9788 (lookup_name_current_level): Likewise.
9789 (xref_tag): Likewise.
9790 (start_function): Likewise.
9791 * lex.c (do_identifier): Likewise.
9792 (identifier_typedecl_value): Likewise.
9793 (real_yylex): Likewise.
9794 * method.c (do_inline_function_hair): Likewise.
9795 * parse.y (unscoped): Likewise.
9796 * pt.c (check_explicit_specialization): Likewise.
9797 (lookup_template_class): Likewise.
9798 * rtti.c (call_void_fn): Likewise.
9799 * sig.c (build_sigtable): Likewise.
9800 * ptree.c (lang_print_xnode): New function.
9802 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
9804 * pt.c (instantiate_class_template): Don't instantiate if pedantic
9805 and the args use template parms.
9807 * pt.c (push_tinst_level): If the instantiation uses template parms,
9809 * decl.c (xref_basetypes): Do call complete_type for basetypes
9810 that involve template parameters.
9812 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
9814 * typeck2.c (process_init_constructor): Fix labeled init check.
9816 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
9818 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
9819 argument to tsubst and friends.
9821 * pt.c (tsubst, FUNCTION_DECL): Tidy.
9823 * typeck.c (build_x_function_call): Handle static member function
9824 templates like non-templates. Handle friend templates like normal
9826 * pt.c (tsubst, *_PARM): Don't use orig_level.
9827 (get_bindings): Don't call add_to_template_args.
9828 (instantiate_template): Likewise.
9829 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
9830 * ptree.c (print_lang_type): Print index/level for template parms.
9832 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
9834 * Make-lang.in (cc1plus): Note that cc1plus depends on
9835 cp/cp-tree.h and cp/cp-tree.def.
9837 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
9838 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
9839 position in a template parameter list.
9840 * cp-tree.h (template_parm_index): New structure, used as the tree
9841 structure for a TEMPLATE_PARM_INDEX.
9842 (TEMPLATE_PARM_IDX): New macro.
9843 (TEMPLATE_PARM_LEVEL): Likewise.
9844 (TEMPLATE_PARM_DESCENDANTS): Likewise.
9845 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
9846 (TEMPLATE_PARM_DECL): Likewise.
9847 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
9848 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
9849 (TEMPLATE_TYPE_DECL): Likewise.
9850 (TEMPLATE_CONST_IDX): Remove.
9851 (TEMPLATE_CONST_LEVEL): Likewise.
9852 (TEMPLATE_CONST_SET_INFO): Likewise.
9853 (TEMPLATE_TYPE_SET_INFO): Likewise.
9854 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
9856 (TEMPLATE_TYPE_LEVEL): Likewise.
9857 * decl.c (decls_match): Call comp_template_parms, rather than
9858 expanding it inline.
9859 (duplicate_decls): If two template declarations are being merged,
9860 then their TEMPLATE_INFOs should be merged as well.
9861 (grokfndecl): Save template-id information when declaring a friend
9862 with explicit template arguments. Pass arguments to
9863 check_explicit_specialization via correct convention; at some
9864 point check_explicit_specialization changed, but these call-sites
9866 (grokdeclarator): Tidy up slightly.
9867 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
9868 two template functions with the same DECL_ASSEMBLER_NAME the same,
9869 since the names are not yet mangled.
9870 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
9871 TEMPLATE_CONST_PARM.
9872 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
9873 decl for a non-type parameter, rather than printing `<tparm ...>'.
9874 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
9875 (do_friend): Deal with template friends.
9876 * lex.c (do_pending_inlines): Call
9877 maybe_begin_member_template_processing, rather than
9878 conditionally calling begin_member_template_processing.
9879 (process_next_inline): Likewise. Call
9880 maybe_end_member_template_processing, rather than
9881 conditionally calling end_member_template_processing.
9882 (do_pending_defargs): Likewise.
9883 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
9884 TEMPLATE_CONST_PARM.
9885 * method.c (build_mangled_template_parm_index): New function.
9886 (build_overload_value): Use it.
9887 (build_overload_name): Likewise.
9888 * pt.c (finish_member_template_decl): Allow friend declarations.
9889 (template_class_depth): New function.
9890 (is_member_template): Rename, and modify, to become...
9891 (is_member_or_friend_template): New function.
9892 (end_member_template_processing): Rename, and modify, to become...
9893 (maybe_end_member_template_processing).
9894 (build_template_parm_index): New function.
9895 (reduce_template_parm_level): New function.
9896 (process_template_parm): Modify to use build_template_parm_index.
9897 (push_template_decl): Deal with friend templates.
9898 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
9899 TEMPLATE_CONST_PARM.
9900 (tsubst_friend_function): New function.
9901 (instantiate_class_template): Generate the DECL_FRIENDLIST
9902 for a new instantiation by using tsubst_friend_function rather
9904 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
9905 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
9906 appropriate new macros. Use reduce_template_parm_level to
9907 generate lower-level template parameters. Handle tsubst'ing into
9908 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
9909 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
9910 templates. Similarly for the template parameters for a new
9912 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
9913 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
9914 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
9915 (get_bindings): Call add_to_template_args if necessary.
9916 (instantiate_decl): Handle instantiations of friend templates.
9917 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
9918 TEMPLATE_TYPE_PARM as a list of fields; it's not!
9919 * spew.c (yylex): Do a little manual constant propagation to
9922 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
9924 * error.c: Include sys/types.h.
9926 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
9928 * method.c (build_mangled_name): Start CPP directives in column zero.
9930 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9932 * typeck2.c (process_init_constructor): Sorry about non-trivial
9933 labeled initializers.
9934 * parse.y (initlist): Re-enable labeled initializers.
9936 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9938 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
9939 all callers changed. Rely on the new parameter instead of arg
9940 being a TREE_LIST when determine whether we are working inside
9941 template template parameter. Clean up is_type test.
9943 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
9945 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
9946 * typeck2.c (initializer_constant_valid_p): Allow conversions
9947 between pointers and references.
9949 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
9951 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
9952 if pedantic || warn_pointer_arith.
9954 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9956 * pt.c (unify): Handle TEMPLATE_DECL.
9958 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
9960 * cp-tree.h (strip_attrs): Remove decl.
9962 1998-02-18 Doug Evans <devans@cygnus.com>
9964 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
9965 Update olddecl's attributes too.
9966 (strip_attrs): Remove function.
9967 * typeck.c (common_type): Call merge_machine_type_attributes.
9969 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
9971 * parse.y (initdcl0_innards): New grammar symbol.
9972 (nomods_initdecls, nomods_initdcl0): Change type from itype to
9973 none, since the resulting value is never used.
9974 (parse_decl): New function.
9975 (datadef): Remove redundant actions.
9976 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
9977 * parse.c: Regenerated.
9979 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
9981 * parse.y (simple_stmt): Use getdecls() to check for decl.
9983 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
9985 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
9987 (c++.install-common): Install c++filt properly as native or as cross
9989 (c++.uninstall): Add c++filt.
9991 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9993 * call.c (standard_conversion): Fix multi-level ptr conversions.
9995 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
9997 * init.c (build_new): Propagate error_mark_node up.
9999 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
10001 * parse.y (simple_stmt): If the condition isn't a declaration,
10002 start the controlled block after the test.
10004 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10006 * call.c (build_over_call): Convert builtin abs, labs and fabs to
10008 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
10011 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10013 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
10015 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
10017 * cp-tree.h: Add access_protected_virtual_node.
10018 * class.c (init_class_processing): Initialize it.
10019 * decl.c (xref_basetypes): Use it.
10020 * parse.y (base_class_access_list): Likewise.
10022 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
10023 (c++.install-common): Install c++filt.
10025 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10027 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
10029 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
10031 * call.c (reference_binding): Use comptypes when comparing
10032 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
10034 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
10036 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
10037 (really_overloaded_fn): Move check here from is_overloaded_fn.
10038 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
10040 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
10042 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
10045 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
10047 * cp-tree.h (push_template_decl): Return the decl passed in, or an
10048 equivalent duplicate.
10049 * decl.c (pushtag): Use the return value from push_template_decl.
10050 (duplicate_decls): When duplicating a template declaration, merge
10051 the DECL_TEMPLATE_RESULTs as well.
10052 (make_implicit_typename): Don't try to dive into typename types to
10053 find a context for making a new implicit typename.
10054 (start_decl): Use the return value from push_template_decl.
10055 (grokdeclarator): Complain about declarations list `const operator
10056 int'. Since we don't correctly handle in-class initializations of
10057 non-static data members, complain about this (now illegal)
10058 practice. Issue an error for initializations of non-const statics
10059 since that is illegal as well, and since we don't handle that case
10061 (start_function): Use the return value from push_template_decl.
10062 (start_method): Likewise.
10063 * decl2.c (grokfield): Likewise. Since the change to
10064 grokdeclarator ensures that all initialized fields are in fact
10065 static, remove a redundant test for TREE_PUBLIC.
10066 * parse.y (initlist): Disable labeled initializers since they do
10067 not work as per the documentation, and since they do not use the
10068 same syntax as the C front end.
10069 * pt.c (push_template_decl): Return the decl passed in, or an
10070 equivalent duplicate.
10071 (lookup_template_class): When searching in a nested context,
10072 use the right arguments.
10073 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
10074 * typeck.c (build_component_ref): Assign the correct type to the
10075 result of build_vfn_ref.
10077 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
10079 * pt.c (convert_nontype_argument): Fix typo.
10080 (check_explicit_specialization): Allow old-style specialization
10081 of class template members.
10083 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
10084 Manfred Hollstein <manfred@s-direktnet.de>
10086 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
10087 when deciding to override DECL_ASSEMBLER_NAME.
10089 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
10091 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
10092 * cp-tree.h (flag_do_squangling): Add declaration.
10093 * lang-options.h: Add -fsquangle and -fno-squangle.
10094 * method.c: Add macros and static variables for squangling.
10095 (build_overload_name): Rename to build_mangled_name, add logic for B
10096 compression, and split into process_modifiers and
10097 process_overload_item.
10098 (process_modifiers): New function, to handle constant, reference,
10100 (process_overload_item): New function, handles issue of type codes.
10101 (build_overload_name): New function, start squangling and call
10102 build_mangled_name.
10103 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
10104 (start_squangling): New function to initialize squangling structs.
10105 (end_squangling): New function to destroy squangling structs.
10106 (nrepeats): Rename variable to Nrepeats.
10107 (issue_nrepeats): New function for issuing 'n' type repeats.
10108 (check_ktype): New function to check for type K name compression.
10109 (build_overload_nested_name): Add a check for K name compression.
10110 (build_qualified_name): Add a check for K name compression and don't
10111 use DECL_ASSEMBLER_NAME when squangling is on.
10112 (check_btype): New function, checks for B type compression.
10113 (build_static_name, build_decl_overload_real): Initiate squangling.
10114 (build_typename_overload, build_overload_with_type): Initiate
10117 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
10119 * method.c (make_thunk): Avoid name buffer overflow.
10121 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
10123 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
10124 don't define them yet.
10126 * parse.y (nomods_initdcl0): Add constructor_declarator case.
10128 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10130 * config-lang.in (diff_excludes): Use basename only.
10132 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
10134 * tinfo2.cc: Add tinfo for signed char.
10136 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
10138 * search.c (compute_access): Handle protected constructors in derived
10139 classes as accessible.
10141 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
10143 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
10144 Call convert_from_reference sooner.
10146 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
10148 * cvt.c (ocp_convert): Obtain the constant values from constant
10149 decls even if the destination type is the same as the type of the
10152 * decl2.c (finish_file): Make sure that static inlines with
10153 definitions are not marked DECL_EXTERNAL before returning.
10155 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10157 * decl.c: Lose arg_looking_for_template.
10158 (lookup_name_real): Likewise.
10159 * parse.y: Lose processing_template_arg, template_arg1.
10160 (primary): Likewise.
10161 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
10163 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10165 * error.c (dump_decl): Fix type of default arguments for template
10166 template parameters and nontype template parameters.
10167 * parse.y (template_parm): Handle invalid default template
10168 template arguments here.
10170 * parse.y (template_parm): Use template_arg instead of PTYPENAME
10171 for default template template argument.
10172 * pt.c (coerce_template_parms): Merge default template argument
10173 codes. Can treat RECORD_TYPE as template name if it is implicitly
10174 created. Fix argument index in error message.
10175 * typeck.c (comptypes): Merge template argument comparison codes in
10176 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
10178 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
10180 * lex.c (file_name_nondirectory): Also check for '/'.
10182 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
10184 * parse.y (primary): Deal with statement-expressions in
10186 * pt.c (tsubst_copy): Handle BIND_EXPR.
10187 * tree.c (mapcar): Likewise.
10189 * call.c (add_template_candidate_real): Pass extra parameter to
10190 fn_type_unification.
10191 * cp-tree.h (fn_type_unification): Add parameter.
10192 * pt.c (fn_type_unification): Add additional parameter to deal with
10193 static member functions.
10194 (get_bindings): Deal with static member functions.
10196 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
10197 (revert_static_member_fn): Declare.
10198 * decl.c (revert_static_member_fn): Remove declaration. Change
10199 linkage from internal to external.
10200 (cp_finish_decl): Deal with virtual functions in classes local to
10201 template functions.
10202 * decl2.c (finish_file): Don't forget to emit increment/decrement
10203 expressions in initializers for file-scope variables.
10204 * parse.y (typename_sub2): If the typename doesn't names a
10205 template, rather than a type, issue an error message.
10206 * pt.c (check_explicit_specialization): Handle specializations of
10207 static member functions.
10208 (coerce_template_parms): Handle offset references to lists of
10210 * search.c (note_debug_info_needed): Don't crash when handed a
10211 type which is being defined.
10212 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
10213 that can happen with some illegal code.
10215 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10217 * call.c (user_harshness): Initialize `code' to 0.
10218 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
10219 (null_ptr_cst_p): Add parentheses around && within ||.
10220 (standard_conversion): Likewise.
10221 (z_candidate): Likewise.
10222 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
10223 (build_object_call): Likewise for `mem_args'.
10224 (build_new_op): Likewise for `mem_arglist'. Add `return' from
10225 default case in enumeration switch.
10227 * class.c (build_vtable_entry): Add explicit braces to avoid
10229 (build_class_init_list): Likewise.
10230 (finish_struct_1): Initialize `width' to 0.
10231 (instantiate_type): Initialize `name' to NULL_TREE. Add
10232 explicit braces to avoid ambiguous `else'.
10234 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
10237 * decl.c (grok_reference_init): Eliminate unused parameter, all
10239 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
10240 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
10241 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
10242 (grokdeclarator): Add parentheses around && within ||. Add
10243 explicit braces to avoid ambiguous `else'.
10244 (grokparms): Initialize `type' to NULL_TREE.
10245 (xref_tag): Remove unused label `just_return'.
10246 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
10247 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
10248 (hack_incomplete_structures): Add parentheses around assignment
10249 used as truth value.
10251 * decl2.c (coerce_delete_type): Hide definition of `e3'.
10253 * error.c: Include <stdlib.h>.
10254 (dump_expr): Change the type of `i' to size_t. Remove unused
10257 * except.c (init_exception_processing): Remove unused variable `d'.
10258 (expand_throw): Likewise for `label'.
10260 * friend.c (add_friends): Add explicit braces to avoid ambiguous
10263 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
10264 (sort_base_init): Likewise for `binfo'.
10265 (expand_member_init): Likewise for `rval'.
10266 (build_member_call): Add parentheses around assignment used as
10268 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
10269 (build_new): Initialize `nelts' to NULL_TREE. Initialize
10270 `old_immediate_size_expand' to 0.
10271 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
10272 (build_vec_delete_1): Remove unused variable `block'.
10273 (expand_vec_init): Initialize `itype' to NULL_TREE.
10275 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
10276 declaration of `index' and `rindex' with autoconf macros.
10277 (reinit_parse_for_expr): Remove unused variables
10278 `look_for_semicolon' and `look_for_lbrac'.
10279 (cons_up_default_function): Initialize `args' to NULL_TREE.
10280 (readescape): Initialize `firstdig' to 0.
10281 (real_yylex): Add parentheses around assignment used as truth value.
10283 * method.c: Include <strings.h> if we don't have <string.h>.
10284 Protect declaration of `index' with autoconf macro.
10286 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
10287 Initialize `type' to NULL_TREE.
10288 (structsp): Remove unused variable `id'.
10290 * pt.c (coerce_template_parms): Add explicit braces to avoid
10292 (lookup_template_class): Initialize `template' to NULL_TREE.
10293 (instantiate_class_template): Remove unused variable `name' and `e'.
10294 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
10295 (do_poplevel): Initialize `saved_warn_unused' to 0.
10296 (type_unification): Remove unused varable `parm'.
10297 (unify): Likewise for `j'.
10299 * repo.c (init_repo): Add parentheses around assignment used as
10301 (finish_repo): Remove unused varable `p'.
10303 * search.c (get_binfo): Initialize `type' to NULL_TREE.
10304 (get_base_distance): Likewise.
10305 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
10306 and `new_v' to NULL_TREE.
10307 (lookup_fnfields): Likewise for `rval_binfo_h'.
10308 (breadth_first_search): Add parentheses around assignment used as
10310 (get_template_base): Initialize `type' to NULL_TREE.
10312 * sig.c (append_signature_fields): Initialize `last_mfptr' to
10314 (build_signature_table_constructor): Likewise for
10315 `last_rhs_field', `pfn' and `vt_off'.
10316 (build_sigtable): Likewise for `init'.
10318 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
10319 (propagate_binfo_offsets): Likewise for `delta'.
10320 (hash_tree_cons): Initialize hashcode to 0.
10321 (can_free): Likewise for `size'.
10322 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
10324 * typeck.c (convert_sequence): Hide prototype.
10325 (common_type): Add explicit braces to avoid ambiguous `else'.
10326 (comp_target_types): Likewise.
10327 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
10328 (build_function_call_real): Add explicit braces to avoid ambiguous
10330 (convert_arguments): Initialize `called_thing' to 0.
10331 (convert_for_initialization): Initialize `savew' and `savee' to 0.
10333 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
10334 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
10335 (build_x_arrow): Likewise for `last_rval'.
10337 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
10339 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
10341 * decl.c (init_decl_processing): Use set_sizetype.
10342 * decl2.c (sizetype): Don't declare.
10343 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
10344 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
10345 (build_component_addr, unary_complex_lvalue): Likewise.
10346 * rtti.c (expand_class_desc): Likewise.
10347 * class.c (get_vfield_offset): Likewise.
10349 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
10351 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
10352 early to avoid bogus error. Handle overloaded function
10353 names provided as template arguments correctly.
10354 (coerce_template_parms): Don't mishandle overloaded functions when
10355 dealing with template template parameters.
10356 (lookup_template_class): Issue an error message, rather than
10357 crashing, when the TYPE_DECL provided is not a template type.
10359 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
10361 * class.c (instantiate_type): Don't just return a known type if
10364 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
10366 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
10367 since that code could never be reached.
10369 * error.c (dump_decl): Avoid aborting in the midst of printing an
10370 error message about an illegal template declaration.
10372 * parse.y (structsp): Print an error message, rather than crashing,
10373 when a class-head does not name a class.
10375 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
10376 template arguments as a g++ extension.
10378 * cp-tree.def (ALIGNOF_EXPR): New tree code.
10379 * decl2.c (grok_alignof): If processing_template_decl, just store
10381 * typeck.c (c_alignof): Likewise.
10382 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
10383 * error.c (dump_expr): Likewise.
10384 * pt.c (tsubst_copy): Likewise.
10385 * tree.c (cp_tree_equal): Likewise.
10386 * pt.c (uses_template_parms): Correctly determine whether or not a
10387 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
10388 folding can be done.
10390 * cp-tree.h (grok_enum_decls): Remove type parameter.
10391 * decl.c (grok_enum_decls): Likewise.
10392 * decl2.c (grok_x_components): Call grok_enum_decls
10393 unconditionally, since it will do nothing if there is no
10394 current_local_enum. Use the new calling sequence.
10395 * pt.c (tsubst_enum): Use the new calling sequence for
10398 * decl.c (start_function): Make member functions of local classes
10399 in extern inline functions have comdat linkage here...
10400 (grokdeclarator): Rather than here.
10402 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
10404 * pt.c (convert_nontype_argument): Use decl_constant_value.
10406 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
10408 * call.c (add_template_candidate_real): New function.
10409 (add_template_candidate): Use it.
10410 (add_template_conv_candidate): Likewise.
10411 (joust): Pass extra argument to more_specialized.
10412 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
10413 (is_local_class): Remove.
10414 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
10415 * cp-tree.h (is_local_class): Remove.
10416 (perform_array_to_pointer_conversion): Likewise.
10417 (finish_member_template_decl): Add.
10418 (check_explicit_specialization): Return a tree, not an int.
10419 (more_specialized): Take additional argument.
10420 (get_bindings): Likewise.
10421 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
10422 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10423 (perform_array_to_pointer_conversion): Remove.
10424 * decl.c (saved_scope): Add processing_specialization,
10425 processing_explicit_instantiation fields.
10426 (maybe_push_to_top_level): Save them.
10427 (pop_from_top_level): Restore them.
10428 (grokfndecl): Use new return value from
10429 check_explicit_specialization.
10430 (start_decl): Don't check flag_guiding_decls before pushing
10432 (cp_finish_decl): Remove previous (bogus) change.
10433 (grok_declarator): Use decl_function_context rather than
10435 * decl2.c (finish_file): Pass extra argument to get_bindings.
10436 (build_expr_from_tree): Let build_x_component_ref check
10437 validity of arguments rather than doing it here.
10438 * lex.c (cons_up_default_function): Remove code fooling with
10439 processing_specialization, processing_explicit_instantiation
10440 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
10441 * method.c (build_overload_identifier): Mangle local classes in
10442 template functions correctly.
10443 * parse.y (finish_member_template_decl): Move to pt.c.
10444 * pt.c (finish_member_template_decl): Moved here from parse.y.
10445 (print_candidates): New function.
10446 (determine_specialization): Change interface. Properly look for
10447 most specialized versions of template candidates.
10448 (check_explicit_specialization): Fully process explicit
10450 (push_template_decl): Avoid looking at CLASSTYPE fields in
10452 (determine_overloaded_function): Remove.
10453 (convert_nontype_argument): Change name from
10454 convert_nontype_parameter. Use determine_overloaded_function
10455 instead of instantiate_type.
10456 (mangle_class_name_for_template): Handle type contexts as well as
10458 (classtype_mangled_name): Likewise.
10459 (lookup_template_class): Likewise.
10460 (tsubst): Likewise.
10461 (more_specialized): Take explict template arguments as a
10463 (most_specialized): Likewise.
10464 (get_bindings): Likewise. Check that return types match before
10465 proclaiming a function a match.
10466 (do_decl_instantiation): Remove code searching for function to
10467 instantiate; that is now done in check_explicit_specialization.
10468 (add_maybe_template): Pass extra argument to get_bindings.
10469 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
10471 * typeck.c (build_component_ref): Check for invalid arguments.
10473 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
10475 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
10476 return_target and call_target are equivalent.
10478 * pt.c (type_unification_real): Just accept function parms that
10479 don't use any template parms.
10481 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
10483 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
10484 unset DECL_NOT_REALLY_EXTERN.
10486 * parse.y (typename_sub*): Fix std::.
10488 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
10490 * error.c (dump_decl): Fix type default template args.
10491 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
10493 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
10495 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
10496 (file_name_nondirectory): Use.
10498 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10500 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
10501 that are not really present. Substitute default arguments in
10502 template template arguments. Correctly convert TEMPLATE_DECL to
10503 TEMPLATE_TEMPLATE_PARM.
10504 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
10505 are no longer treated specially here.
10506 * parse.y (template_template_parm): Fix copy error.
10507 * decl.c (grokdeclarator): Warn about missing `typename' for nested
10508 type created from template template parameters.
10509 * parse.y (bad_parm): Likewise
10511 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
10512 (push_nested_class): Likewise.
10513 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
10514 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
10515 (copy_template_template_parm): Declare.
10516 * decl.c (arg_looking_for_template): New variable.
10517 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
10518 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
10519 node if arg_looking_for_template is nonzero.
10520 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
10521 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
10522 (grokdeclarator): Handle TEMPLATE_DECL.
10523 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
10524 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
10525 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
10526 (dump_decl): Handle unnamed template type parameters.
10527 Handle template template parameters.
10528 (dump_function_name): Handle template template parameters.
10529 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
10530 Handle TEMPLATE_TEMPLATE_PARM.
10531 * method.c (build_template_template_parm_names): New function.
10532 (build_template_parm_names): Handle TEMPLATE_DECL.
10533 (build_overload_nested_name, build_overload_name):
10534 Handle TEMPLATE_TEMPLATE_PARM.
10535 * parse.y (maybe_identifier): New nonterminal.
10536 (template_type_parm): Use it.
10537 (template_template_parm, template_arg1): New nonterminal.
10538 (template_parm): Add template_template_parm rules.
10539 (template_arg): Set processing_template_arg.
10540 (template_arg1): Rules moved from template_arg.
10541 (primary, nonnested_type): Set arg_looking_for_template if we are
10542 processing template arguments.
10543 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
10544 (process_template_parm): Handle template template parameters.
10545 (coerce_template_parms, comp_template_args): Likewise.
10546 (mangle_class_name_for_template, lookup_template_class): Likewise.
10547 (uses_template_parms): Handle TEMPLATE_DECL and
10548 TEMPLATE_TEMPLATE_PARM.
10549 (current_template_args): Handle TEMPLATE_DECL.
10550 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
10551 * search.c (dfs_walk, dfs_record_inheritance):
10552 Handle TEMPLATE_TEMPLATE_PARM.
10553 * tree.c (copy_template_template_parm): New function.
10554 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
10555 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
10557 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
10559 * decl.c (start_decl): Don't allow duplicate definitions of static
10562 * call.c (build_user_type_conversion_1): Handle user-defined
10563 template conversion operators correctly.
10565 * decl2.c (build_expr_from_tree): Issue an error message if the
10566 object in a COMPONENT_REF is a TEMPLATE_DECL.
10568 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
10570 * class.c (is_local_class): New function.
10571 * cp-tree.h (is_local_class): Declare it.
10572 (last_tree): Likewise.
10573 (begin_tree): Likewise.
10574 (end_tree): Likewise.
10575 (lookup_template_class): Change prototype.
10576 * decl.c (cp_finish_decl): Check for NULL where necessary.
10577 Consider FUNCTION_DECLS to declare objects with top-level binding,
10578 when calling make_decl_rtl.
10579 (grokdeclarator): Give members of local classes internal linkage.
10580 (start_function): Remove declaration of last_tree.
10581 (finish_function): Set flag_keep_inline_functions around call to
10582 rest_of_compilation if we are processing a member function in a
10584 (start_method): Call push_template_decl for member functions of
10585 local classes in template functions.
10586 * decl2.c (import_export_decl): Don't give external linkage to
10587 instantiations of templates with internal linkage.
10588 * parse.y (last_tree): Remove declaration.
10589 (template_type): Pass extra parameter to lookup_template_class.
10590 (self_template_type): Likewise.
10591 (structsp): Move call to reset_specialization into left_curly.
10592 (left_curly): Call reset_specialization, and begin_tree.
10593 * pt.c (saved_trees): New variable.
10594 (mangle_class_name_for_template): Change prototype. Use
10595 additional function context to name local classes in templates
10597 (classtype_mangled_name): Pass the context.
10598 (push_template_decl): Handle local classes and templates, and
10599 member functions for such classes.
10600 (convert_nontype_parameter): Fix handling of pointer-to-member
10602 (lookup_template_class): Handle local classes in templates.
10603 (tsubst): Likewise. Don't assume that template instantiations
10604 have external linkage; pay attention to the template declaration.
10605 (mark_decl_instantiated): Likewise.
10606 (begin_tree): New function.
10607 (end_tree): Likewise.
10609 * decl.c (xref_basetypes): Don't call complete_type for basetypes
10610 that involve template parameters; that can lead to infinite
10611 recursion unnecessarily.
10613 * pt.c (register_specialization): Do not register specializations
10614 that aren't ready to be registered yet.
10615 (check_explicit_specialization): Handle explicit specialization of
10616 constructors and destructors.
10617 (build_template_decl): New function.
10618 (push_template_delc): Handle out-of-class specializations of
10621 * pt.c (check_explicit_specialization): Set up the template
10622 information before registering the specialization.
10623 (coerce_template_parms): Fix thinko.
10624 (tsubst): Handle specializations of member templates correctly.
10626 * class.c (finish_struct_methods): Remove calls to
10627 check_explicit_specialization from here.
10628 (finish_struct): And insert them here.
10629 * cp-tree.h (perform_qualification_conversions): New function.
10630 (perform_array_to_pointer_conversion): Likewise.
10631 (begin_explicit_instantiation): Likewise.
10632 (end_explicit_instantiation): Likewise.
10633 (determine_specialization): Renamed from
10634 determine_explicit_specialization.
10635 (comp_template_parms): New function.
10636 (processing_explicit_instantiation): New variable.
10637 * cvt.c (perform_qualification_conversions): New function.
10638 (perform_array_to_pointer_conversion): Likewise.
10639 * decl.c (duplicate_decls): Don't consider template functions
10640 alike unless they have the same parameters. Refine handling of
10641 instantiation/specialization mismatches.
10642 (start_decl): Don't call pushdecl for template specializations,
10643 since they don't affect overloading.
10644 (start_function): Likewise.
10645 (grokfndecl): Call check_explicit_specialization a little later.
10646 Don't call duplicate_decls for memberm template specializations.
10647 (grokdeclarator): Don't update template_count for classes that are
10648 themselves specializations. Remove use of `2' as parameter to
10649 grokfndecl since that value isn't used.
10650 * lex.c (cons_up_default_function): Save and restore
10651 processing_explicit_instantiation around calls to grokfield.
10652 * parse.y (finish_member_template_decl): New function.
10653 (component_decl_1): Use it.
10654 (fn.def2): Likewise.
10655 (template_arg_list_opt): New nonterminal.
10656 (template_type): Use it.
10657 (self_template_type): Likewise.
10658 (template_id): Likewise.
10659 (object_template_id): Likewise.
10660 (notype_template_declarator): Likwise.
10661 (begin_explicit_instantiation): Likewise.
10662 (end_explicit_instantiation): Likewise.
10663 (explicit_instantiation): Use them.
10664 * pt.c (coerce_template_parms): Add parameters.
10665 (processing_explicit_instantiation): New variable.
10666 (convert_nontype_parameter): New function.
10667 (determine_overloaded_function): Likewise.
10668 (begin_explicit_instantiation): Likewise.
10669 (end_explicit_instantiation): Likewise.
10670 (retrieve_specialization): Likewise.
10671 (register_specialization): Likewise.
10672 (processing_explicit_specialization): Removed.
10673 (determine_specialization): Handle specializations of member
10674 functions of template class instantiations.
10675 (check_explicit_specialization): Refine to conform to standard.
10676 (comp_template_parms): New function.
10677 (coerce_template_parms): Call convert_nontype_parameter.
10678 (tsubst): Refine handling of member templates. Use
10679 register_specialization.
10680 (instantiate_template): Use retrieve_specialization.
10681 (do_decl_instantiation): Likewise.
10682 (instantiate_decl): Likewise.
10683 (type_unification): Improve handling of explict template
10685 * tree.c (mapcar): Return error_mark_node, rather than aborting,
10686 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
10687 * typeck.c (build_unary_op): Call determine_specialization, rather
10688 than determine_explicit_specialization.
10690 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
10692 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
10694 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10696 * error.c (dump_decl): For enum tags, output the tag, not its value.
10698 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
10700 * decl.c (init_decl_processing): Only call init_rtti_processing
10703 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
10705 * init.c (build_new_1): Split out from build_new.
10706 (build_new): Just return a NEW_EXPR.
10707 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
10709 * decl2.c (get_temp_regvar): Tweak.
10711 * cp-tree.h (TREE_CALLS_NEW): Comment out.
10712 * class.c (resolves_to_fixed_type_p): Remove use.
10713 * method.c (build_opfncall): Likewise.
10714 * call.c (build_new_op): Likewise.
10716 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
10718 * exception.cc (__eh_alloc, __eh_free): New fns.
10719 (__cp_push_exception, __cp_pop_exception): Use them.
10720 (__uncatch_exception): Call terminate here if no exception.
10721 * except.c (build_terminate_handler): New fn.
10722 (expand_start_catch_block): Use it.
10723 (expand_exception_blocks): Likewise.
10724 (alloc_eh_object): New fn.
10725 (expand_throw): Use it. Protect exception init with terminate.
10726 * typeck.c (build_modify_expr): Remove code that ignores trivial
10729 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10731 * call.c (add_builtin_candidate): Add default case in enumeration
10733 (build_new_op): Likewise.
10734 (convert_like): Likewise.
10735 * cvt.c (build_expr_type_conversion): Likewise.
10736 * tree.c (real_lvalue_p): Likewise.
10737 (lvalue_p): Likewise.
10738 (cp_tree_equal): Likewise.
10739 * typeck.c (comptypes): Likewise.
10740 (build_component_ref): Likewise.
10741 (build_function_call_real): Likewise.
10742 (build_binary_op_nodefault): Likewise.
10743 (build_unary_op): Likewise.
10744 (build_modify_expr): Likewise.
10745 * typeck2.c (initializer_constant_valid_p): Likewise.
10747 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
10749 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
10751 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
10753 * pt.c (coerce_template_parms): Make sure to digest_init if
10756 * decl.c (duplicate_decls): Make the newdecl virtual if the
10757 olddecl was, just as is done with other attributes of olddecl.
10759 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
10761 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
10762 address of an OFFSET_REF.
10764 * cp-tree.def: Add AGGR_INIT_EXPR.
10765 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
10766 AGGR_INIT_EXPR where appropriate.
10767 * expr.c (cplus_expand_expr): Likewise. Simplify.
10769 * decl2.c (finish_file): Remove call to register_exception_table.
10771 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10773 * pt.c (instantiate_class_template): Don't do injection when
10774 processing_template_decl is true, as pollutes current_binding_level
10777 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
10779 * pt.c (maybe_fold_nontype_arg): Add prototype.
10781 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
10783 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
10784 * error.c (dump_expr): Likewise.
10786 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
10788 * typeck.c (build_function_call_real): Remove "inline called before
10789 definition" pedwarn.
10791 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
10793 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
10795 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
10797 * pt.c (type_unification_real): Change __null to type void* with
10800 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
10802 * call.c (implicit_conversion): Don't call
10803 build_user_type_conversion_1 with a NULL expr, since it will
10806 * pt.c (unify): Don't try to unify array bounds if either array is
10809 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
10811 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
10812 Replace extern decls with casts.
10814 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
10815 Update last_parm_cleanup_insn.
10816 (store_after_parms): Remove.
10817 * cp-tree.h: Adjust.
10819 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
10821 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
10822 (finish_file): Check DECL_COMDAT instead of weak|one_only.
10823 (import_export_vtable): Use make_decl_one_only instead of
10824 comdat_linkage for win32 tweak.
10825 (import_export_decl): Likewise.
10826 * pt.c (mark_decl_instantiated): Likewise.
10828 * decl2.c (finish_file): Lose handling of templates in pending_statics.
10830 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
10832 * decl2.c (finish_file): Lose call to expand_builtin_throw.
10833 * except.c (expand_builtin_throw): Remove.
10834 * cp-tree.h: Remove ptr_ptr_type_node.
10835 * decl.c: Likewise.
10837 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
10839 * decl.c (ptr_ptr_type_node): Define.
10840 (init_decl_processing): Initialize it.
10841 * cp-tree.h: Declare it.
10842 * exception.cc (__cp_exception_info): Use __get_eh_info.
10843 (__cp_push_exception): Likewise.
10844 (__cp_pop_exception): Likewise.
10846 From Scott Snyder <snyder@d0sgif.fnal.gov>:
10847 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
10849 (init_exception_processing): Removed saved_pc initialization.
10851 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
10853 * pt.c (instantiate_decl): Defer all templates but inline functions.
10855 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
10857 * init.c (expand_vec_init): Don't fold a list of parameters.
10859 * decl.c (copy_args_p): Handle copy elision for types with virtual
10861 * call.c (build_over_call): Likewise.
10863 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
10865 * pt.c (lookup_template_function): Copy the template arguments,
10866 not just the list containing them, to the permanent obstack.
10868 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
10870 * except.c (expand_start_catch_block): suspend_momentary for the
10873 * error.c (dump_decl): Handle LOOKUP_EXPR.
10875 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
10877 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
10878 permanent obstack if we are processing a template decl.
10879 * typeck.c (build_static_cast): Likewise.
10880 (build_const_cast): Likewise.
10881 (build_reinterpret_cast): Likewise.
10883 * pt.c (coerce_template_parms): Coerce some expressions, even
10884 when processing_template_decl.
10886 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10888 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
10889 handling of pointer difference expressions.
10891 * typeck.c (comp_target_types): Comparison of function/method types
10892 is independent of nptrs.
10894 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
10896 * pt.c (tsubst): Avoid creating pointer to reference and
10897 reference to reference types.
10899 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
10901 * parse.y (do_id): New nonterminal.
10902 (template_id): Use it.
10904 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
10906 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
10907 * spew.c (yylex): Don't do_identifier here.
10908 * decl2.c (build_expr_from_tree): Revert last change.
10910 * decl2.c (build_expr_from_tree): Expand the name for a method call.
10911 * parse.y (object_template_id): Don't try to take the DECL_NAME.
10913 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
10915 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
10917 * call.c (build_op_delete_call): Adjust.
10919 * except.c (expand_end_catch_block): Lose rethrow region.
10920 (expand_start_catch_block): Likewise.
10921 (expand_end_catch_block): Don't expand_leftover_cleanups.
10923 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10925 * pt.c (tsubst): Remove tree_cons call (places redundant info into
10926 DECL_TEMPLATE_INSTANTIATION).
10928 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
10930 * tree.c (is_overloaded_fn): Handle getting a fn template.
10931 (really_overloaded_fn): Likewise.
10932 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
10933 * pt.c (check_explicit_specialization): Tweak.
10934 (determine_explicit_specialization): Tweak.
10936 * tree.c, cp-tree.h (get_target_expr): New fn.
10938 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
10940 * pt.c (check_explicit_specialization): Fix misspelling in
10941 diagnostic: `preceeded'.
10942 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
10945 1997-12-02 Mark Mitchell <mmitchell@usa.net>
10947 * pt.c (determine_explicit_specialization): Avoid an internal
10948 error for bad specializations.
10950 * method.c (build_overload_value): Handle SCOPE_REF.
10952 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
10954 * class.c (prepare_fresh_vtable): Enable even more complex MI
10957 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
10959 * exception.cc (__check_eh_spec): Optimize a bit.
10961 * exception.cc (__cp_pop_exception): Lose handler arg.
10962 * except.c (do_pop_exception): Likewise.
10963 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
10964 (expand_end_catch_block): Likewise.
10966 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
10968 * pt.c (check_explicit_specialization): Complain about using a
10969 template-id for a non-specialization.
10971 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
10973 * repo.c: Prototype rindex only if needed.
10974 * xref.c: Likewise.
10976 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10978 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
10980 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
10982 * typeck.c (build_const_cast): Handle references here instead of
10983 handing off to convert_to_reference.
10985 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
10986 TerminateFunctionCall.
10987 (init_exception_processing): Likewise. Terminate et al are now
10988 the fns, not ADDR_EXPRs.
10989 (various): Lose redundant assemble_external calls.
10990 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
10992 * cp-tree.h (struct lang_decl_flags): Add comdat.
10993 (DECL_COMDAT): New macro.
10994 * decl.c (duplicate_decls): Propagate it.
10995 (cp_finish_decl): Handle it.
10996 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
10998 * class.c: Remove static pending_hard_virtuals.
10999 (add_virtual_function): Take pointers to pending_virtuals
11000 and pending_hard_virtuals.
11001 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
11003 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
11005 * decl2.c (import_export_vtable): If we support one_only but not
11006 weak symbols, mark instantiated template vtables one_only.
11007 (import_export_decl): Likewise for tinfo functions.
11008 (finish_vtable_vardecl): Also write out vtables from explicitly
11009 instantiated template classes.
11010 * pt.c (mark_class_instantiated): Revert last change.
11012 * except.c (expand_throw): Call mark_used on the destructor.
11014 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
11016 * lex.c (lang_init): Enable flag_exceptions by default if no
11017 command line switch was specified.
11019 1997-11-26 Mark Mitchell <mmitchell@usa.net>
11021 * pt.c (unify): Handle `void' template parameters in
11024 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
11026 * rtti.c (build_dynamic_cast): Handle template case here.
11027 (build_dynamic_cast_1): Not here.
11029 * typeck2.c (digest_init): Make copies where appropriate.
11031 * decl2.c (delete_sanity): resolve_offset_ref.
11033 * except.c: Call terminate without caching so many bits.
11035 * except.c (expand_start_catch_block): Fix catching a reference
11038 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
11040 * init.c (build_new): Copy size to the saveable obstack.
11042 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
11043 TRY_CATCH_EXPR for now.
11045 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
11047 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
11048 has DECL_LANG_SPECIFIC.
11050 * exception.cc (struct cp_eh_info): Add handlers field.
11051 (__cp_push_exception): Initialize it.
11052 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
11053 (__throw_bad_exception): Remove.
11054 * except.c (call_eh_info): Add handlers field.
11055 (get_eh_handlers): New fn.
11056 (push_eh_cleanup): Increment handlers.
11058 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
11060 * except.c (expand_start_eh_spec): Use the try/catch code.
11061 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
11062 doing everything inline.
11063 (init_exception_processing): throw_type_match now takes
11064 const void pointers.
11065 * exception.cc (__check_eh_spec): New fn.
11066 * inc/exception: Neither terminate nor unexpected return.
11067 * decl.c: Make const_ptr_type_node public.
11068 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
11070 * except.c (expand_start_catch_block): We only need the rethrow
11071 region for non-sjlj exceptions.
11072 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
11074 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
11076 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
11077 (various.o): Likewise.
11078 * inc/new: Add placement deletes. Add throw specs for default new.
11079 * new.cc (set_new_handler): Move here from libgcc2.
11080 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
11081 (new): Move from libgcc2. Throw bad_alloc.
11082 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
11083 * decl.c (init_decl_processing): Update exception specs on new and
11086 * method.c (build_decl_overload_real): Don't mess with global
11089 * init.c (build_new): Check for null throw spec, not nothrow_t.
11091 * decl.c (duplicate_decls): Don't complain about different exceptions
11092 from an internal declaration.
11094 * call.c (build_op_delete_call): Fix check for member fns again.
11096 * decl2.c (import_export_decl): Interface hackery affects
11097 virtual synthesized methods.
11099 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11101 * decl.c (start_decl): Don't just complain about a mismatched
11104 * decl.c (make_implicit_typename): Handle case where t is not
11105 actually from context.
11106 * tree.c (get_type_decl): Lose identifier case.
11107 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
11108 * parse.y (nonnested_type): Just use lookup_name.
11109 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
11111 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
11113 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
11114 T was built in C language context (for example, by
11115 output_func_start_profiler).
11117 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
11119 * decl.c (make_implicit_typename): New fn.
11120 (lookup_name_real): Use it. Use current_class_type as the context.
11122 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
11124 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
11126 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11128 * friend.c (do_friend): Warn about non-template friends in templates.
11130 * call.c (build_op_delete_call): Fix handling of inherited delete.
11132 * search.c (dfs_record_inheritance): Ignore template type parms.
11134 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
11136 * call.c (build_new_op): Fix copy error.
11137 (build_op_new_call): New fn.
11138 (build_op_delete_call): New fn.
11139 * cp-tree.h: Declare them.
11140 * init.c (build_new): Use them. Support placement delete.
11141 (build_x_delete): Use build_op_delete_call.
11142 (build_delete): Likewise.
11143 * decl2.c (delete_sanity): Likewise.
11144 (coerce_delete_type): Don't complain about placement delete.
11146 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11148 * call.c (build_new_function_call): Remove unused 'obj' parm.
11149 * cp-tree.h, typeck.c: Adjust.
11151 * init.c (build_new): Make the cleanup last longer.
11152 (expand_vec_init): Call do_pending_stack_adjust.
11154 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
11156 * pt.c (do_type_instantiation): Fix typo.
11157 (mark_class_instantiated): If we support one_only but not weak
11158 symbols, don't mark this as known.
11160 * init.c (build_new): Handle vec delete in EH cleanup.
11162 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11164 * call.c (build_method_call): Call complete_type before checking
11167 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
11169 * decl.c (add_block_current_level): Delete.
11170 * init.c (build_vec_delete_1): Delete build_block and
11171 add_block_current_level calls.
11173 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
11175 * init.c (build_new): Handle freeing allocated memory when the
11176 constructor throws.
11178 * call.c (build_new_method_call): Fix flags arg.
11180 * pt.c (do_type_instantiation): Don't try to instantiate
11182 (mark_decl_instantiated): If we support one_only but not
11183 weak symbols, mark this one_only.
11184 * decl2.c (import_export_vtable): Don't defer handling of vtables
11185 if MULTIPLE_SYMBOL_SPACES.
11187 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11189 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
11191 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
11193 * except.c (do_pop_exception): Return a value.
11195 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
11197 * call.c (build_new_method_call): Handle getting a
11198 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
11199 if we got template parms.
11200 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
11202 * decl2.c (build_expr_from_tree): Tweak last change.
11203 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
11204 (maybe_fold_nontype_arg): Split out from tsubst_copy.
11205 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
11207 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11209 * pt.c (tsubst_copy): Handle explicit template arguments in
11211 * typeck.c (build_x_function_call): Likewise.
11212 * decl2.c (build_expr_from_tree): Lookup function name if it
11215 * pt.c (tsubst): Instantiate template functions properly when
11216 template parameter does not appear in function arguments and return
11218 (comp_template_args): Handle member templates required by tsubst.
11220 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11222 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
11225 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11227 * pt.c (coerce_template_parms): Tweak error message.
11229 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
11230 return type defaults to `int', even if there are storage-class
11233 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11235 Complete nested exception support.
11236 * except.c (do_pop_exception): Split out...
11237 (push_eh_cleanup): From here. Handle the EH region by hand.
11238 (expand_start_catch_block): Add a new level for the catch parm.
11239 Move the rethrow region outside the two cleanup regions.
11240 Protect the initializer for the catch parm with terminate.
11241 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
11242 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
11243 popping off the middle of the stack.
11244 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
11245 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
11246 (build_cplus_new): Only wrap CALL_EXPRs.
11247 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
11248 the constructor call.
11250 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11252 * Make-lang.in (c++.distdir): Make inc subdirectory.
11254 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11256 * decl2.c (finish_file): Put back some code.
11258 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11260 * decl2.c (finish_file): Remove redundant code.
11261 * method.c (emit_thunk): Don't let the backend defer generic thunks.
11263 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
11265 * except.c (call_eh_info): Split out...
11266 (push_eh_info): From here.
11267 (expand_builtin_throw): Use it.
11268 (expand_start_catch_block): Move region start back.
11270 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
11272 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
11273 (real_yylex): Record wide strings using target endianness, not host.
11275 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
11277 * repo.c (rindex): Add decl unconditionally.
11278 (get_base_filename, open_repo_file): Don't cast rindex.
11279 * xref.c (rindex): Add decl unconditionally.
11280 (index): Remove unused decl.
11281 (open_xref_file): Don't cast rindex.
11283 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11285 * class.c (build_vbase_path): Propagate the result type properly.
11287 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
11289 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
11290 remaining use of saved_throw_type with a call to get_eh_type.
11292 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
11294 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
11295 (file_name_nondirectory): New function, doing the same as the macro.
11296 (set_typedecl_interface_info): Use it instead of the macro.
11297 (check_newline): Likewise.
11298 (handle_cp_pragma): Likewise.
11300 * repo.c (get_base_filename): Cast result of rindex to char*.
11301 (open_repo_file): Likewise.
11302 * xref.c (open_xref_file): Likewise.
11303 * error.c (dump_char): Make its arg int, not char.
11305 * except.c (push_eh_info): Pass the number of fields - 1 down, not
11306 the exact number of fields.
11308 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
11310 Support for nested exceptions.
11311 * tinfo2.cc (__is_pointer): New fn.
11312 * exception.cc (struct cp_eh_info): Define.
11313 (__cp_exception_info, __uncatch_exception): New fns.
11314 (__cp_push_exception, __cp_pop_exception): New fns.
11315 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
11317 (init_exception_processing): Likewise. __eh_pc is now external.
11318 (push_eh_info): New fn.
11319 (get_eh_{info,value,type,caught}): New fns.
11320 (push_eh_cleanup): Just call __cp_pop_exception.
11321 (expand_start_catch_block): Use push_eh_info. Start the eh region
11323 (expand_end_eh_spec): Use push_eh_info.
11324 (expand_throw): Call __cp_push_exception to set up the exception info.
11325 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
11327 (expand_builtin_throw): Don't refer to empty_fndecl.
11329 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
11331 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
11333 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
11335 * method.c (build_template_parm_names, build_decl_overload_real):
11336 Add static to definitions.
11337 * pt.c (add_to_template_args, note_template_header,
11338 processing_explicit_specialization, type_unification_real): Likewise.
11339 ({determine,check}_explicit_specialization): Use a single string for
11342 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
11344 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
11345 (expand_end_catch_block): Likewise.
11346 (expand_end_eh_spec): Likewise.
11348 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
11350 * decl.c (duplicate_decls): Handle template specializations
11352 * error.c (dump_function_name): Fix printing of specializations of
11353 member functions that are not member templates.
11354 * cp-tree.h (processing_specialization): Make global.
11355 * pt.c (processing_specialization): Likewise.
11356 * lex.c (cons_up_default_function): Save and restore
11357 processing_specialization to avoid confusion.
11359 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11361 * decl.c (init_decl_processing): Give null_node unknown* type.
11362 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
11363 (common_type): Likewise.
11364 * error.c (args_as_string): Recognize null_node.
11366 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11368 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
11369 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
11371 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
11373 * Make-lang.in (g++): Include prefix.o.
11375 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
11377 * pt.c (determine_explicit_specialization): Initialize "dummy"
11378 to keep Purify quiet.
11380 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
11382 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
11383 (build_overload_int): Not here.
11385 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
11387 * class.c (build_type_pathname): Remove.
11388 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
11390 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
11392 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
11393 &&label GNU extension.
11395 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
11397 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
11398 so as to avoid incorrect manglings.
11399 * method.c (build_decl_overload_real): Don't mangle return types
11402 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11404 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
11405 scratch_tree_cons): Define as macros for now.
11406 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
11407 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
11408 typeck2.c: Use them and the expression_obstack variants.
11410 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11412 * decl.c (store_return_init): Allow classes with explicit ctors to
11413 be used with the named return values extension.
11415 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
11417 * pt.c (instantiate_decl): Fix previous change.
11419 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
11421 * pt.c (tsubst): Fix thinko.
11422 (instantiate_decl): Really use the original template.
11424 * call.c (build_new_method_call): Use simple constructor_name for
11427 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
11429 * method.c (build_underscore_int): Don't use ANSI specific
11432 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11434 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
11435 for our key method; it might have been inlined by -O3.
11437 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
11439 * decl.c (make_typename_type): Do not try to call lookup_field for
11440 non-aggregate types.
11442 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
11444 * typeck.c (build_reinterpret_cast): Tweak.
11446 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
11448 * typeck.c (build_reinterpret_cast): Converting a void pointer
11449 to function pointer with a reinterpret_cast produces a warning
11450 if -pedantic is issued.
11452 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11454 * typeck.c (c_expand_return): Don't warn about returning a
11455 reference-type variable as a reference.
11457 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11459 * method.c (build_static_name): Fix typo.
11461 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
11463 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
11464 OLDDECL before we try to do DECL_USE_TEMPLATE.
11466 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11468 * decl.c (duplicate_decls): Don't warn about template instances.
11470 * typeck.c (mark_addressable): Lose ancient code that unsets
11473 * pt.c (do_decl_instantiation): Lose support for instantiating
11476 * call.c (build_new_function_call): Fix handling of null explicit
11478 (build_new_method_call): Likewise.
11480 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
11482 * method.c (build_underscore_int): Fix typo.
11484 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
11486 * tree.c (print_lang_statistics): #if 0 call to
11487 print_inline_obstack_statistics until its definition is checked in.
11489 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
11491 * decl2.c (finish_file): Move dump_tree_statistics to end.
11493 * pt.c (instantiate_decl): Look for the original template.
11494 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
11495 of member templates.
11497 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11499 * Makefile.in (g++FAQ.*): New rules.
11500 (CONFLICTS): Update.
11501 * g++FAQ.texi: Moved from libg++.
11503 * parse.y (PFUNCNAME): Only specify the type once.
11505 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
11507 * lex.c (real_yylex): Clean up the code to fully behave the way
11508 the c-lex.c parser does for complex and real numbers.
11510 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11512 * method.c (build_decl_overload_real): Reformat.
11514 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
11516 * method.c (synthesize_method): If at_eof, determine our linkage.
11518 1997-09-29 Paul Eggert <eggert@twinsun.com>
11520 * lex.c (real_yylex): Treat `$' just like `_', except issue a
11521 diagnostic if !dollars_in_ident or if pedantic.
11523 * lang-specs.h (@c++): -ansi no longer implies -$.
11525 * decl2.c (lang_decode_option):
11526 -traditional and -ansi now do not mess with
11529 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
11531 * Makefile.in (parse.o, decl.o): Also depend on
11532 $(srcdir)/../except.h $(srcdir)/../output.h.
11533 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
11534 $(srcdir)/../except.h $(srcdir)/../output.h.
11535 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
11538 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
11540 * expr.c (cplus_expand_expr): Make it static.
11542 * decl2.c, init.c, typeck.c: Include "expr.h".
11543 (expand_expr): Use proper values when calling the function.
11545 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
11547 * lang-options.h: New -Wold-style-cast flag.
11548 * cp-tree.h (warn_old_style_cast): New variable.
11549 * decl2.c (warn_old_style_cast): Likewise.
11550 (lang_decode_option): Support -Wold-style-cast.
11551 (reparse_absdcl_as_casts): Produce old-style-cast warning.
11553 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11555 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
11556 TREE_USED, reset value based on already_used.
11558 * init.c (expand_member_init): Revert change.
11560 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
11562 * cp-tree.h, decl.c, decl2.c, pt.c:
11563 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
11565 * decl2.c (lang_decode_option): Add missing ;.
11567 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
11569 * friend.c (do_friend): Disable injection for all template-derived
11571 * decl2.c (lang_decode_option): Handle -fguiding-decls.
11572 * parse.y (notype_template_declarator): New nonterminal.
11573 (direct_notype_declarator): Use it.
11574 (complex_direct_notype_declarator): Likewise.
11575 (object_template_id): Accept any kind of identifier after TEMPLATE.
11576 (notype_qualified_id): Don't add template declarators here.
11578 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
11580 * call.c (add_template_candidate): Add explicit_targs parameter.
11581 (build_scoped_method_call): Use it.
11582 (build_overload_call_real): Likewise.
11583 (build_user_type_conversion_1): Likewise.
11584 (build_new_function_call): Likewise.
11585 (build_object_call): Likewise.
11586 (build_new_op): Likewise.
11587 (build_new_method_call): Likewise.
11588 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
11589 (build_new_method_call): Likewise.
11591 * class.c (finish_struct_methods): Add specialization pass to
11592 determine which methods were specializing which other methods.
11593 (instantiate_type): Handle TEMPLATE_ID_EXPR.
11595 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
11597 * cp-tree.h (name_mangling_version): New variable.
11598 (flag_guiding_decls): Likewise.
11599 (build_template_decl_overload): New function.
11600 (begin_specialization): Likewise.
11601 (reset_specialization): Likewise.
11602 (end_specialization): Likewise.
11603 (determine_explicit_specialization): Likewise.
11604 (check_explicit_specialization): Likewise.
11605 (lookup_template_function): Likewise.
11606 (fn_type_unification): Add explicit_targs parameter.
11607 (type_unification): Likewise.
11609 * decl.c (duplicate_decls): Add smarts for explicit
11611 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
11613 (grokfndecl): Call check_explicit_specialization.
11615 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
11616 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
11617 (check_classfn): Handle specializations.
11619 * error.c (dump_function_name): Print specialization arguments.
11621 * friend.c (do_friend): Don't call pushdecl for template
11624 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
11626 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
11627 and -fno-guiding-decls.
11629 * lex.c (identifier_type): Return PFUNCNAME for template function
11632 * method.c (build_decl_overload_real): New function.
11633 (build_template_parm_names): New function.
11634 (build_overload_identifier): Use it.
11635 (build_underscore_int): New function.
11636 (build_overload_int): Use it. Add levels for template
11638 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
11639 (build_overload_nested_names): Handle template type parameters.
11640 (build_template_decl_overload): New function.
11642 * parse.y (YYSTYPE): New ntype member.
11643 (nested_name_specifier): Use it.
11644 (nested_name_specifier_1): Likewise.
11645 (PFUNCNAME): New token.
11646 (template_id, object_template_id): New non-terminals.
11647 (template_parm_list): Note specializations.
11648 (template_def): Likewise.
11649 (structsp): Likewise.
11650 (fn.def2): Handle member template specializations.
11651 (component_decl_1): Likewise.
11652 (direct_notype_declarator): Handle template-ids.
11653 (component_decl_1): Likewise.
11654 (direct_notype_declarator): Handle template-ids.
11655 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
11657 * pt.c (processing_specializations): New variable.
11658 (template_header_count): Likewise.
11659 (type_unification_real): New function.
11660 (processing_explicit_specialization): Likewise.
11661 (note_template_header): Likewise.
11662 (is_member_template): Handle specializations.
11663 (end_template_decl): Call reset_specialization.
11664 (push_template_decl): Handle member template specializations.
11665 (tsubst): Likewise.
11666 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
11667 (instantiate_template): Handle specializations.
11668 (instantiate_decl): Likewise.
11669 (fn_type_unification): Handle explicit_targs.
11670 (type_unification): Likewise. Allow incomplete unification
11671 without an error message, if allow_incomplete.
11672 (get_bindings): Use new calling sequence for fn_type_unification.
11674 * spew.c (yylex): Handle PFUNCNAME.
11676 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
11677 (really_overloaded_fn): Likewise.
11678 (get_first_fn): Handle function templates.
11680 * typeck.c (build_x_function_call): Use really_overloaded_fn.
11681 Handle TEMPLATE_ID_EXPR.
11682 (build_x_unary_op): Likewise.
11683 (build_unary_op): Likewise.
11684 (mark_addressable): Templates whose address is taken are marked
11687 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
11689 * decl.c (init_decl_processing): Declare __builtin_constant_p as
11690 accepting any kind of type, not only int.
11692 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
11694 * search.c (get_matching_virtual): Notice virtual bases when sorrying
11695 about covariant returns.
11697 * parse.y (member_init): Also imply typename here. Remove ancient
11698 extension for initializing base members.
11700 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
11702 Handle multi-level typenames and implicit typename in base list.
11703 * parse.y (typename_sub{,[0-2]}): New rules.
11704 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
11705 (nonnested_type): New rule.
11706 (complete_type_name): Use it.
11707 (base_class.1): Use typename_sub and nonnested_type.
11708 (nested_name_specifier): Don't elide std:: here.
11709 * decl.c (make_typename_type): Handle getting a type for NAME.
11710 (lookup_name_real): Turn std:: into :: here.
11712 Rvalue conversions were removed in London.
11713 * call.c (is_subseq): Don't consider lvalue transformations.
11714 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
11715 (joust): Re-enable ?: kludge.
11717 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
11719 * decl.c (start_function): Up warning of no return type to be a
11722 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11724 * init.c (expand_member_init): Don't set TREE_USED.
11725 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
11726 set,don't clear TREE_USED wholesale.
11728 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
11730 * call.c (build_over_call): Do require_complete_type before
11733 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
11735 * search.c (lookup_field): Call complete_type in all cases.
11737 * decl.c (finish_function): Just warn about flowing off the end.
11739 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
11741 * decl.c (grokparms): Don't bash a permanent list node if we're
11744 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
11746 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
11748 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
11750 * call.c (build_new_op): Give better error for syntactically
11751 correct, but semantically invalid, use of undeclared template.
11753 * call.c (compare_qual): Handle pmfs.
11755 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
11756 after the exception spec.
11758 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
11760 * call.c (null_ptr_cst_p): Integer type, not integral type.
11762 * call.c (joust): Disable warnings until they can be moved to the
11765 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
11767 * Makefile.in, config-lang.in: Convert to autoconf.
11769 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
11771 * decl.c (lookup_name_real): Add implicit 'typename' to types from
11774 * pt.c (most_specialized_class): Fix typo.
11775 (tsubst): Move constant folding to TREE_VEC case.
11777 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
11779 * pt.c (do_poplevel): Don't warn about unused local variables
11780 while processing_template_decl since we don't always know whether
11781 or not they will need constructing/destructing.
11783 * pt.c (uses_template_parms): Check the values of an enumeration
11784 type to make sure they don't depend on template parms.
11786 * decl.c (make_typename_type): Don't lookup the field if the
11787 context uses template parms, even if we're not
11788 processing_template_decl at the moment.
11790 * pt.c (coerce_template_parms): Avoid looking at the
11791 TYPE_LANG_DECL portion of a typename type, since there won't be
11793 (tsubst): Do constant folding as necessary to make sure that
11794 arguments passed to lookup_template_class really are constants.
11796 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
11798 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
11799 * decl2.c (finish_file): Only register exception tables if we
11802 * decl.c (init_decl_processing): Add __builtin_[fs]p.
11804 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11806 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
11808 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
11810 * error.c (dump_decl): Avoid crashing when presented with a
11811 uninitialized constant, as can occur with a template parameter.
11812 (dump_expr): Make sure that there are enough levels of
11813 current_template_parms before we start diving through them.
11815 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
11817 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
11820 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11822 * except.c (expand_throw): Call build_delete for all
11823 exception types, not just objects with destructors.
11825 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
11827 * decl.c (current_local_enum): Remove static.
11828 * pt.c (tsubst_enum): Save and restore value of current_local_enum
11829 in case template is expanded in enum decl.
11830 (instantiate_class_template): Use new tsubst_enum signature.
11831 (tsubst_expr): Likewise.
11833 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
11835 * pt.c (begin_member_template_processing): Take a function as
11836 argument, not a set of template arguments. Use the template
11837 parameters, rather than the arguments. Handle non-type parameters
11838 correctly. Push a binding level for the parameters so that multiple
11839 member templates using the same parameter names can be declared.
11840 (end_member_template_processing): Pop the binding level.
11841 (push_template_decl): Mark member templates as static when
11844 * lex.c (do_pending_inlines): Pass the function, not its template
11845 arguments, to begin_member_template_processing.
11846 (process_next_inline): Likewise.
11847 (do_pending_defargs): Likewise.
11849 * error.c (dump_expr): Obtain the correct declaration for a
11850 TEMPLATE_CONST_PARM.
11852 * call.c (add_template_conv_candidate): New function.
11853 (build_object_call): Handle member templates, as done in the other
11856 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
11858 * decl.c (replace_defag): Undo previous change.
11859 * lex.c (do_pending_defargs): Deal with member templates.
11861 * pt.c (is_member_template): Avoid crashing when passed a
11862 non-function argument.
11864 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11866 * class.c (grow_method): Remove check for redeclaration.
11868 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
11870 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
11871 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
11872 (PRIMARY_TEMPLATE_P): Use it.
11873 * call.c (build_overload_call_real): Use it.
11874 * class.c (instantiate_type): Likewise.
11875 * decl.c (decls_match): Likewise.
11876 * method.c (build_overload_identifier): Likewise.
11877 * pt.c (push_template_decl): Likewise.
11878 (classtype_mangled_name): Likewise.
11879 (lookup_template_class): Likewise.
11881 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
11882 DECL_NTPARMS to conform to usage elsewhere.
11883 * call.c (add_template_candidate): Likewise.
11884 * class.c (instantiate_type): Likewise.
11885 * pt.c (instantiate_template): Likewise.
11886 (get_bindings): Likewise.
11888 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
11889 is_member_template.
11891 * pt.c (unify): Undo changes to allow multiple levels of template
11893 (type_unification): Likewise.
11894 (fn_type_unification): Likewise.
11895 (get_class_bindings): Likewise.
11896 * cp-tree.h (Likewise).
11898 * decl.c (replace_defarg): Check that the type of the default
11899 parameter does not invlove a template type before complaining
11900 about the initialization.
11902 * error.c (dump_expr): Deal with template constant parameters in
11903 member templates correctly.
11905 * pt.c (is_member_template): Deal with class specializations
11907 (tsubst): Handle "partial instantiation" of member templates
11910 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
11912 * pt.c (type_unification): Change calling sequence to allow for
11913 multiple levels of template parameters.
11914 (tsubst_expr): Likewise.
11915 (tsubst): Likewise.
11916 (tsubst_copy): Likewise.
11917 (instantiate_template): Likewise.
11919 * call.c (build_overload_call_real): Use it.
11920 (add_builtin_candidate): Use it.
11921 (build_new_method_call): Use it.
11922 * class.c (instantiate_type): Use it.
11923 * decl.c (grokdeclarator): Use it.
11924 * decl2.c (finish_file): Use it.
11925 * method.c (build_overload_identifier): Use it.
11927 * call.c (add_template_candidate): Add additional parameter for
11928 the function return type. Call fn_type_unification istead of
11930 (build_user_type_conversion_1): Handle member templates.
11931 (build_new_function_call): Likewise.
11932 (build_new_op): Likewise.
11933 (build_new_method_call): Likewise.
11935 * class.c (grow_method): Don't give an error message indicating
11936 that two member templates with the same name are ambiguous.
11937 (finish_struct): Treat member template functions just like member
11940 * cp-tree.h (check_member_template): Add declaration.
11941 (begin_member_template_processing): Likewise.
11942 (end_member_template_processing): Likewise.
11943 (fn_type_unification): Likewise.
11944 (is_member_template): Likewise.
11945 (tsubst): Change prototype.
11946 (tsubst_expr): Likewise.
11947 (tsubst_copy): Likewise.
11948 (instantiate_template): Likewise.
11949 (get_bindings): Likewise.
11951 * decl.c (decls_match): Handle multiple levels of template
11953 (pushdecl): Handle template type params just like other type
11955 (push_class_level_binding): Return immediately if the
11956 class_binding_level is NULL.
11957 (grokfndecl): If check_classfn() returns a member_template, use
11958 the result of the template, not the template itself.
11960 * decl2.c (check_member_template): New function. Check to see
11961 that the entity declared to be a member template can be one.
11962 (check_classfn): Allow redeclaration of member template functions
11963 with different types; the new functions can be specializations or
11964 explicit instantiations.
11966 * error.c (dump_decl): Handle multiple levels of template
11968 (dump_function_decl): Update to handle function templates.
11970 * lex.c (do_pending_inlines): Set up template parameter context
11971 for member templates.
11972 (process_next_inline): Likewise.
11974 * method.c (build_overload_identifier): Adjust for multiple levels
11975 of template parameters.
11977 * parse.y (fn.def2): Add member templates.
11978 (component_decl_1): Likewise.
11980 * pt.c (begin_member_template_processing): New function.
11981 (end_member_template_processing): Likewise.
11982 (is_member_template): Likewise.
11983 (fn_type_unification): Likewise.
11984 (current_template_parms): Return a vector of all the template
11985 parms, not just the innermost level of parms.
11986 (push_template_decl): Deal with the possibility of member
11988 (lookup_template_class): Likewise.
11989 (uses_template_parms): Likewise.
11990 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
11991 TEMPLATE_CONST_PARM to deal with multiple levels of template
11992 arguments. Add processing of TEMPLATE_DECL to produce new
11993 TEMPLATE_DECLs from old ones.
11994 (do_decl_instantiation): Handle member templates.
11996 * search.c (lookup_fnfields_1): Handle member template conversion
11999 * tree.c (cp_tree_equal): Check the levels, as well as the
12000 indices, of TEMPLATE_CONST_PARMs.
12002 * typeck.c (comptypes): Check the levels, as well as the indices,
12003 fo TEMPLATE_TYPE_PARMs.
12004 (build_x_function_call): Treat member templates like member
12007 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12009 * typeck.c (c_expand_return): Always convert_for_initialization
12010 before checking for returning a pointer to local.
12012 * pt.c (type_unification): If strict and the function parm doesn't
12013 use template parms, just compare types.
12015 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
12017 * method.c (build_overloaded_value): Replace direct call
12018 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
12020 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12022 * typeck.c (convert_arguments): Don't arbitrarily choose the first
12023 of a set of overloaded functions.
12025 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12027 * lex.c (real_yylex): Don't elide __FUNCTION__.
12029 * method.c (build_overload_value): Add in_template parm.
12030 (build_overload_int): Likewise.
12031 (build_overload_identifier): Pass it.
12033 * decl.c (duplicate_decls): Don't bash a previous template
12034 definition with a redeclaration.
12036 * pt.c (unify): float doesn't match double.
12038 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
12039 TYPE_DECL. Handle getting non-template types.
12040 * parse.y (explicit_instantiation): Use typespec instead of
12041 aggr template_type.
12043 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
12045 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
12047 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
12049 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
12050 (compare_ics): Likewise.
12052 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12054 * call.c (joust): Warn about choosing one conversion op over
12055 another because of 'this' argument when the other return type is
12057 (source_type): New fn.
12059 * call.c (build_new_op): Strip leading REF_BIND from first operand
12060 to builtin operator.
12062 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
12065 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
12067 * call.c (null_ptr_cst_p): Remove support for (void*)0.
12069 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
12071 * typeck.c (expand_target_expr): Make definition match declaration.
12073 * class.c (get_basefndecls): Make definition match declaration.
12075 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
12077 * input.c (sub_getch): Eventually give up and release the input file.
12079 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
12082 * call.c (joust): Tweak message.
12084 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
12086 * error.c (type_as_string): Put const/volatile on template type
12087 parameters where appropriate.
12089 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
12091 * call.c (strictly_better): Make arguments unsigned ints.
12093 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
12095 * lex.c (real_yylex): Refer to __complex instead of complex.
12097 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
12099 * lex.c (real_yylex): Don't use getc directly.
12101 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12103 * call.c (is_subseq): Don't try to be clever.
12105 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
12107 * parse.y, pt.c: Include "except.h".
12108 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
12109 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
12110 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
12111 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
12114 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
12116 * decl2.c (mark_vtable_entries): Instead of replacing pure
12117 virtuals with a reference to __pure_virtual, copy the decl and
12120 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12122 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
12124 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
12126 * pt.c (instantiate_class_template): Call repo_template_used
12127 before finish_prevtable_vardecl.
12129 * call.c (is_subseq): New fn.
12130 (compare_ics): Use it.
12132 * repo.c (finish_repo): Don't crash on no args.
12134 * parse.y (named_complex_class_head_sans_basetype): Handle
12135 explicit global scope.
12136 * decl2.c (handle_class_head): New fn.
12138 * pt.c (unify): Add CONST_DECL case.
12140 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12142 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
12144 * cp-tree.h (report_type_mismatch): Add prototype.
12145 * call.c (build_overload_call_real): Remove erroneous fourth
12146 argument to report_type_mismatch.
12147 (build_user_type_conversion_1): Remove erroneous second arg to
12149 (build_new_function_call): Likewise.
12150 (build_object_call): Likewise.
12151 (build_new_op): Likewise.
12152 (build_new_method_call): Likewise.
12154 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12156 * error.c (dump_decl): Don't bother processing a function with no
12157 DECL_LANG_SPECIFIC.
12159 * method.c (emit_thunk): Call init_function_start in the macro case.
12161 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
12163 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
12164 defined and used to set flag_vtable_thunks.
12166 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12168 * parse.y: Don't clear the inlines from their obstack until they've
12169 all been processed.
12171 * decl.c (duplicate_decls): Don't complain about exception
12172 specification mismatch if flag_exceptions is off.
12174 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
12176 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
12178 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
12180 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
12181 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
12182 Include <stdio.h> before include files that formerly used STDIO_PROTO.
12184 * decl.c, g++spec.c, lex.c, method.c, repo.c:
12185 Include "config.h" first, as per autoconf manual.
12187 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12189 * decl.c (duplicate_decls): Tweak wording.
12190 * lex.c (do_pending_defargs): Don't die if we see a default arg
12191 that isn't a DEFAULT_ARG.
12192 * error.c (dump_expr): Handle DEFAULT_ARG.
12194 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
12195 * lang-options.h: Add -fhandle-exceptions.
12197 * class.c (build_vtable): Vtables are artificial.
12198 (prepare_fresh_vtable): Likewise.
12200 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12202 * cvt.c (ocp_convert): After converting to the target type, set
12203 LOOKUP_NO_CONVERSION.
12205 * call.c (joust): Warn about potentially confusing promotion rules
12207 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
12209 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
12211 * exception.cc: Declare __terminate_func with noreturn attribute.
12213 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
12215 * parse.y: Break out eat_saved_input, handle errors.
12216 (function_try_block): Use compstmt instead of compstmt_or_error.
12218 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12220 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
12222 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12224 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
12225 existence of cc1plus check whether $(LANGUAGES) contains C++.
12227 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12229 * method.c (do_build_copy_constructor): When copying an anonymous
12230 union member loop around to handle nested anonymous unions. Use
12231 the offset of the member relative to the outer structure, not the
12234 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12236 * call.c (resolve_args): New fn.
12237 (build_new_function_call): Use it.
12238 (build_object_call): Likewise.
12239 (build_new_method_call): Likewise.
12241 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12243 * call.c (build_over_call): tsubst all default parms from templates.
12245 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12247 * decl.c (struct cp_function): Add static_labelno.
12248 (push_cp_function_context): Save it.
12249 (pop_cp_function_context): Restore it.
12251 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12253 * typeck.c (build_component_ref_1): Convert from reference.
12255 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12257 * parse.y (current_declspecs, prefix_attributes): Initialize to
12260 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
12261 before we try to force it to be a TREE_LIST.
12262 (decl): Make sure $1.t is non-nil.
12264 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12266 * pt.c (uses_template_parms): Handle template first-parse codes.
12268 * decl.c (cp_finish_decl): Only warn about user-defined statics.
12270 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12272 * pt.c (unify): Handle BOOLEAN_TYPE.
12274 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
12275 * pt.c (tsubst): Don't set it.
12276 * call.c (build_over_call): Use uses_template_parms.
12278 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
12280 * method.c (build_overload_nested_name): Use static_labelno
12281 instead of var_labelno.
12282 (build_qualified_name): New fn.
12283 (build_overload_name): Split out from here.
12284 (build_static_name): Use build_qualified_name.
12285 * decl.c (cp_finish_decl): Statics in extern inline functions
12286 have comdat linkage.
12287 (start_function): Initialize static_labelno.
12289 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12291 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
12292 before "all member functions in class [] are private".
12294 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12296 * lex.c (do_scoped_id): convert_from_reference.
12297 * init.c (build_offset_ref): Likewise.
12299 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
12301 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
12303 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12305 * typeck.c (get_member_function_from_ptrfunc): Promote index
12308 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12310 * tree.c (layout_basetypes): Move non-virtual destructor warning.
12311 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
12313 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12315 * decl.c (grokdeclarator): Call add_defarg_fn for the function
12317 * lex.c (add_defarg_fn): Adjust.
12318 (do_pending_defargs): Adjust. Don't skip the first parm.
12320 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
12322 * decl.c (build_enumerator): Global enumerators are also readonly.
12324 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
12325 (build_dynamic_cast): Call it and convert_from_reference.
12327 * lex.c (add_defarg_fn): New fn.
12328 (snarf_defarg): Don't add to defarg_types.
12329 (do_pending_defargs): Lose defarg_types. All fns we process now
12331 * decl.c (grokfndecl): Call add_defarg_fn.
12333 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
12334 * cp-tree.def: Add DEFAULT_ARG.
12335 * spew.c (yylex): Call snarf_defarg as appropriate.
12336 * parse.y: New tokens DEFARG and DEFARG_MARKER.
12337 (defarg_again, pending_defargs, defarg, defarg1): New rules.
12338 (structsp): Use pending_defargs.
12339 (parms, full_parm): Use defarg.
12340 * lex.c (init_lex): Initialize inline_text_firstobj.
12341 (do_pending_inlines): Never pass the obstack to feed_input.
12342 (process_next_inline): Call end_input instead of restore_pending_input.
12343 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
12344 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
12345 * input.c (end_input): New fn.
12346 (sub_getch): At the end of some fed input, just keep returning EOF
12347 until someone calls end_input.
12348 Remove 'obstack' field from struct input_source.
12349 * decl.c (grokparms): Handle DEFAULT_ARG.
12350 (replace_defarg): New fn.
12351 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
12353 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12355 * call.c (implicit_conversion): If nothing else works, try binding
12356 an rvalue to a reference.
12358 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
12360 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
12361 ifndef for Cygwin32 to include SIGSEGV.
12363 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
12365 * class.c (finish_struct_1): Only complain about pointers without
12366 copy stuff if there are any constructors.
12368 * rtti.c (build_dynamic_cast): Call complete_type on the types.
12370 * decl.c (grokfndecl): If the function we chose doesn't actually
12373 * decl2.c (grokclassfn): Don't specify 'const int' for the
12374 artificial destructor parm.
12376 * pt.c (type_unification): If we are called recursively, nothing
12379 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
12381 * decl.c (init_decl_processing): Stop trying to catch signals
12382 other than SIGABRT since the Cygwin32 library doesn't support
12383 them correctly yet. This fixes a situation in which g++ causes
12384 a hang on SIGSEGVs and other such signals in our Win32-hosted
12387 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
12389 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
12391 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
12393 * typeck2.c (store_init_value): Always return the value if our
12394 type needs constructing.
12396 * method.c (hack_identifier): Convert class statics from
12399 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12401 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
12403 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
12405 * typeck.c (c_expand_return): Make sure we clean up temporaries at
12406 the end of return x;
12408 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12410 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
12412 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
12414 * except.c (expand_builtin_throw): Add support
12415 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
12417 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
12419 * repo.c (extract_string): Null-terminate.
12421 * cp-tree.h (TI_SPEC_INFO): New macro.
12422 (CLASSTYPE_TI_SPEC_INFO): New macro.
12423 * pt.c (push_template_decl): Correctly determine # of template parms
12426 * call.c (compare_ics): Really fix 'this' conversions.
12428 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
12431 * pt.c (push_template_decl): Complain about mismatch in # of
12432 template parms between a class template and a member template.
12434 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12436 * method.c (synthesize_method): You can't call
12437 function_cannot_inline_p after finish_function.
12438 * decl.c (finish_function): Turn on flag_inline_functions and turn
12439 off DECL_INLINE before handing a synthesized method to the
12442 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12444 * method.c (synthesize_method): Remove July 30 change to never set
12445 DECL_INLINE if at_eof.
12447 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
12449 * xref.c (GNU_xref_member): Ensure that the node has a
12450 decl_lang_specific part before checking DECL_FRIEND_P.
12452 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
12454 * pt.c (instantiate_class_template): Diagnose non-class types used
12457 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
12459 * typeck.c (build_conditional_expr): Use convert_for_initialization
12460 instead of convert_and_check.
12462 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12464 * parse.y (typespec): Don't pedwarn for typeof.
12466 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
12468 * repo.c (finish_repo): Only check changes if we would write a
12471 * call.c (compare_ics): Fix handling of 'this' conversions.
12473 * pt.c (do_decl_instantiation): Support static data too. Rename
12474 from do_function_instantiation.
12475 * cp-tree.h: Adjust.
12478 * repo.c (extract_string): New fn.
12479 (get_base_filename): Use it.
12480 (init_repo): Compare old args with current args.
12482 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
12484 * Makefile.in, Make-lang.in: Protect C-ls with a comment
12485 character, idea from Paul Eggert <eggert@twinsun.com>.
12487 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
12489 * typeck.c (c_expand_return): Be more persistent in looking for
12492 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
12493 pointer to reference.
12495 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
12497 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
12499 * init.c (build_member_call, build_offset_ref):
12500 Use do_scoped_id instead of do_identifier.
12502 * cvt.c (convert): Remove bogosity.
12504 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12506 * cvt.c (build_up_reference): Do checks of ARGTYPE and
12507 TARGET_TYPE before trying to use get_binfo.
12509 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
12511 * cvt.c (build_up_reference): Call get_binfo to get access control.
12513 * decl2.c (import_export_decl): If we don't support weaks, leave
12516 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
12518 * except.c (expand_builtin_throw): Add support for machines that
12519 cannot access globals after throw's epilogue when
12520 -fno-sjlj-exceptions is used.
12522 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
12524 * parse.y: 'std::' becomes '::'.
12525 * lex.c (real_yylex): Remove 'namespace' warning.
12526 * init.c (build_member_call): Ignore 'std::'.
12527 (build_offset_ref): Likewise.
12528 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
12529 (do_toplevel_using_decl): Ignore 'using std::whatever'.
12530 * decl.c (push_namespace): Just sorry.
12531 (pop_namespace): Nop.
12532 (init_decl_processing): Declare std namespace.
12534 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
12536 * search.c (push_class_decls): A name which ambiguously refers to
12537 several instantiations of the same template just refers to the
12540 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
12542 * decl.c (build_enumerator): Fix problem with unsigned long
12543 enumerated values being smashed to ints, causing overflow
12544 when computing next enumerated value (for enum values around
12547 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12549 * typeck.c (build_component_ref): Only call mark_used on a decl.
12551 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12553 * typeck.c (build_c_cast): Make the check for a ptr to function
12554 more specific before possible default_conversion call.
12556 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
12558 * except.c (expand_exception_blocks): Simplify and fix and make
12559 sure we don't end a region in a sequence, as expand_end_bindings
12562 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
12564 * except.c (init_exception_processing): Mark terminate as not
12565 returning so that the optimizer can optimize better.
12567 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
12569 * cvt.c (convert): Don't do any extra work, if we can avoid it
12572 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
12574 * *.[chy]: Change cp_convert to ocp_convert, change convert to
12575 cp_convert. convert is now reserved for the backend, and doesn't
12576 have the semantics a frontend person should ever want.
12578 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
12580 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
12581 Lose -traditional support.
12583 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12585 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
12587 * parse.y (self_reference): Do it for templates, too.
12588 * class.c (pushclass): Don't overload_template_name; the alias
12589 generated by build_self_reference serves the same purpose.
12591 * tree.c (list_hash): Make static, take more args.
12592 (list_hash_lookup): Likewise.
12593 (list_hash_add): Make static.
12594 (list_hash_canon): Lose.
12595 (hash_tree_cons): Only build a new node if one isn't already in the
12597 (hash_tree_chain): Use hash_tree_cons.
12598 * cp-tree.h: Adjust.
12599 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
12600 of calling lookup_name.
12602 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
12604 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
12605 doesn't refer to the CONST_DECLs.
12607 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
12609 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
12611 (expand_class_desc): Convert the last argument to a sizetype.
12613 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12615 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
12616 __real__): Add reswords.
12617 * hash.h: Regenerate.
12618 * lex.h (rid): Add RID_COMPLEX.
12619 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
12620 * lex.c (init_lex): Add building of RID_COMPLEX.
12621 (real_yylex): General cleanup in line with what c-lex.c also has,
12622 sans the cruft for traditional; add handling of SPEC_IMAG, complex
12623 types, and imaginary numeric constants.
12624 * parse.y (REALPART, IMAGPART): Add tokens.
12625 (unary_expr): Add REALPART and IMAGPART rules.
12626 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
12627 * decl.c (complex_{integer,float,double,long}_type_node): Define
12629 (init_decl_processing): Set up the types.
12630 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
12631 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
12632 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
12633 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
12634 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
12636 * method.c (build_overload_name): Add handling of the different
12637 COMPLEX_TYPEs, prefixing them with `J'.
12638 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
12639 as a template parm.
12640 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
12641 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
12642 (mapcar): Handle COMPLEX_CST.
12643 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
12644 (common_type): Add code for complex types.
12645 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
12646 (convert_for_assignment): Likewise.
12647 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
12649 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
12651 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
12652 tsubst_expr, as it might try to do overload resolution.
12654 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
12656 * pt.c (instantiate_class_template): Oops.
12658 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12660 * cp-tree.def: Add TAG_DEFN.
12661 * pt.c (tsubst_enum): New fn.
12662 (instantiate_class_template): Use it.
12663 (tsubst_expr): Support TAG_DEFN.
12664 (tsubst): Support local enums.
12665 (tsubst_copy): Likewise.
12666 * decl.c (finish_enum): Likewise.
12667 (start_enum): If this is a local enum, switch to permanent_obstack.
12669 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
12671 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
12672 (finish_function): Put the base init code for constructors just
12673 after the parm cleanup insns.
12674 (struct cp_function): Add last_parm_cleanup_insn.
12675 (push_cp_function_context): Likewise.
12676 (pop_cp_function_context): Likewise.
12678 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12680 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
12682 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12684 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
12685 for THUNK_FNDECL before we switch to temporary allocation.
12687 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12689 * call.c (build_new_op): Handle null arg2 for ?:.
12691 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
12693 * except.c (expand_exception_blocks): Ensure that we flow through
12694 the end of the exception region for the exception specification.
12695 Move exception region for the exception specification in, so that
12696 it doesn't protect the parm cleanup. Remove some obsolete code.
12697 * decl.c (store_parm_decls): Likewise.
12698 (finish_function): Likewise.
12700 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
12702 * init.c (build_new): Fix nothrow handling.
12704 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12706 * init.c (emit_base_init): Don't warn about the initialization
12707 list for an artificial member.
12709 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12711 * expr.c (do_case): Handle !START case for the error msg.
12713 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
12715 * decl2.c, lang-options.h: New option -Weffc++.
12716 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
12719 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
12720 to MULTIPLE_SYMBOL_SPACES.
12722 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
12724 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
12726 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
12728 * typeck.c (c_expand_return): Don't complain about returning void
12729 to void in an artificial function.
12730 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
12731 don't set DECL_RESULT, set DECL_ARTIFICIAL.
12732 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
12734 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
12736 * init.c (init_decl_processing): Add support for setjmp/longjmp based
12737 exception handling.
12738 * except.c (init_exception_processing): Likewise.
12739 (expand_end_catch_block): Likewise.
12740 (expand_exception_blocks): Likewise.
12741 (expand_throw): Likewise.
12742 * exception.cc (__default_terminate): Likewise.
12744 * init.c (perform_member_init): Use new method of expr level
12745 cleanups, instead of cleanups_this_call and friends.
12746 (emit_base_init): Likewise.
12747 (expand_aggr_vbase_init_1): Likewise.
12748 (expand_vec_init): Likewise.
12749 * decl.c (cp_finish_decl): Likewise.
12750 (expand_static_init): Likewise.
12751 (store_parm_decls): Likewise.
12752 (cplus_expand_expr_stmt): Likewise.
12753 * decl2.c (finish_file): Likewise.
12755 * Make-lang.in (exception.o): Ok to compile with -O now.
12757 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
12758 we know it will be done later by the backend.
12760 * decl2.c (lang_f_options): Remove support for short temps.
12761 * lang-options.h: Likewise.
12763 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
12765 * tree.c (varargs_function_p): New fn.
12766 * method.c (emit_thunk): Replace broken generic code with code to
12767 generate a heavyweight thunk function.
12769 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
12771 * pt.c (process_template_parm): pedwarn about floating-point parms.
12773 * decl.c (grokdeclarator): inline no longer implies static.
12775 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
12777 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
12779 * class.c (check_for_override): The signature of an overriding
12780 function is not changed.
12782 * call.c (build_over_call): Move setting of conv into the loop.
12783 Note: this change, along with the related changes of the 18th thru
12784 the 20th of April, fix an infinite loop problem in conversions.
12786 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12788 * call.c (build_user_type_conversion_1): Really ignore rvalue
12789 conversions when looking for a REFERENCE_TYPE.
12791 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
12792 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
12793 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
12794 (build_unary_op): Likewise.
12795 * call.c (build_over_call): See through a CONVERT_EXPR around the
12796 ADDR_EXPR for on a temporary.
12797 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
12798 the ADDR_EXPR for a local variable.
12800 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
12802 * call.c (build_user_type_conversion_1): If we're trying to
12803 convert to a REFERENCE_TYPE, only consider lvalue conversions.
12804 (build_new_function_call): Print candidates.
12805 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
12806 (reference_binding): Binding a temporary of a reference-related type
12809 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12811 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
12812 * tinfo2.cc (type_info::before): Likewise.
12814 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
12816 * call.c (implicit_conversion): Oops.
12818 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
12820 * call.c (implicit_conversion): Try to find a reference conversion
12821 before binding a const reference to a temporary.
12823 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
12825 * exception.cc (__default_unexpected): Call terminate by default,
12826 so that if the user overrides terminate, the correct function will
12829 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
12831 * parse.y (left_curly): Avoid trying to use any fields of
12832 error_mark_node, as there aren't any.
12834 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12836 * lex.c (do_identifier): Avoid breaking on overloaded methods
12837 as default arguments.
12839 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
12841 * call.c (add_template_candidate): Initialize the variable "dummy".
12843 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
12845 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
12846 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
12848 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12850 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
12851 (debug_binfo): Delete decl, not needed.
12853 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
12854 promotes_to_aggr_type): Delete fns.
12855 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
12856 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
12857 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
12859 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
12861 * friend.c (is_friend_type): Delete fn.
12862 * cp-tree.h (is_friend_type): Delete decl.
12864 * decl.c (original_result_rtx, double_ftype_double,
12865 double_ftype_double_double, int_ftype_int, long_ftype_long,
12866 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
12867 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
12869 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
12871 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
12873 * decl.c (pushdecl_nonclass_level): #if 0, unused.
12874 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
12876 * lex.c (reinit_lang_specific): #if 0, unused.
12877 * cp-tree.h (reinit_lang_specific): #if 0 decl.
12879 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
12880 * cp-tree.h (revert_static_member_fn): Delete decl.
12882 * class.c (root_lang_context_p): Delete fn.
12883 * cp-tree.h (root_lang_context_p): Delete decl.
12885 * decl.c (set_current_level_tags_transparency): #if 0, unused.
12886 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
12888 * lex.c (set_vardecl_interface_info): Make static.
12889 * cp-tree.h (set_vardecl_interface_info): Delete decl.
12891 * call.c (find_scoped_type): Make static.
12892 * cp-tree.h (find_scoped_type): Delete decl.
12894 * search.c (convert_pointer_to_vbase): Make static.
12895 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
12897 * decl.c (const_ptr_type_node): Likewise.
12898 * cp-tree.h (const_ptr_type_node): Delete decl.
12900 * typeck.c (common_base_type): Make static.
12901 * cp-tree.h (common_base_types): Delete erroneous decl.
12903 * pt.c (classtype_mangled_name): Make static.
12904 * cp-tree.h (classtype_mangled_name): Delete decl.
12906 * lex.c (check_newline): Make static.
12907 * cp-tree.h (check_newline): Delete decl.
12909 * typeck.c (build_x_array_ref): Delete fn, same idea as
12911 * cp-tree.h (build_x_array_ref): Delete decl.
12913 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
12915 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
12917 * class.c (build_vtable_entry): Make static.
12918 * cp-tree.h (build_vtable_entry): Delete decl.
12920 * class.c (build_vbase_pointer): Make static.
12921 * cp-tree.h (build_vbase_pointer): Delete decl.
12923 * sig.c (build_sptr_ref): Add forward decl and make static.
12924 * cp-tree.h (build_sptr_ref): Delete decl.
12926 * call.c (build_new_method_call): Add forward decl and make static.
12927 * cp-tree.h (build_new_method_call): Delete decl.
12929 * call.c (build_object_call): Make static.
12930 * class.c (check_for_override, complete_type_p, mark_overriders):
12932 * decl.c (cp_function_chain): Likewise.
12933 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
12935 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
12937 * tree.c (build_cplus_array_type_1): Likewise.
12938 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
12939 (comp_target_parms): Likewise.
12941 * init.c (build_builtin_call): Make static.
12942 * cp-tree.h (build_builtin_call): Delete decl.
12944 * typeck.c (binary_op_error): Delete decl.
12945 * cp-tree.h (binary_op_error): Likewise.
12947 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12949 * call.c (build_method_call): Compare against error_mark_node
12950 directly, rather than the ERROR_MARK tree code.
12951 * cvt.c (cp_convert): Likewise.
12952 * decl.c (print_binding_level): Likewise.
12953 (duplicate_decls): Likewise.
12954 (grokdeclarator): Likewise.
12955 (grokdeclarator): Likewise.
12956 * init.c (expand_aggr_init_1): Likewise.
12957 (decl_constant_value): Likewise.
12958 * method.c (build_opfncall): Likewise.
12959 (hack_identifier): Likewise.
12960 * typeck.c (build_modify_expr): Likewise.
12962 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
12964 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12966 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
12968 * pt.c (coerce_template_parms): Add new error message.
12970 * method.c (build_overload_value): Implement name mangling for
12971 floating-point template arguments.
12973 * method.c (build_overload_int, icat, dicat): Fix mangling of template
12974 arguments whose absolute value doesn't fit in a signed word.
12976 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12978 * friend.c: New file; put all of the friend stuff in here.
12979 * init.c: Instead of here.
12980 * Makefile.in (CXX_OBJS): Add friend.o.
12981 (friend.o): Add dependencies.
12982 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
12984 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
12986 * call.c (build_scoped_method_call): Complain if the scope isn't a
12989 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
12991 * parse.y (left_curly): Don't crash on erroneous type.
12993 * init.c (build_delete): Fix type of ref.
12995 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12997 * search.c (get_vbase_1): Renamed from get_vbase.
12998 (get_vbase): Wrapper, now non-static.
12999 (convert_pointer_to_vbase): Now static.
13001 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
13002 * init.c (build_delete): Pass one.
13003 (build_partial_cleanup_for): Use build_scoped_method_call.
13004 * decl.c (finish_function): Pass a binfo.
13006 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13008 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
13010 * typeck.c (build_c_cast): Lose other reference to flag.
13012 * call.c (build_field_call): Don't look for [cd]tor_identifier.
13013 * decl2.c (delete_sanity): Remove meaningless use of
13014 LOOKUP_HAS_IN_CHARGE.
13015 * decl.c (finish_function): Use build_scoped_method_call instead
13016 of build_delete for running vbase dtors.
13017 * init.c (build_delete): Call overload resolution code instead of
13018 duplicating it badly.
13020 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
13022 * call.c (build_over_call): Call mark_used before trying to elide
13025 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
13027 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13029 * typeck.c (build_modify_expr): Always pedwarn for a cast to
13030 non-reference used as an lvalue.
13032 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13034 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
13036 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13038 * parse.y (handler): Fix template typo.
13040 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13042 * error.c (lang_decl_name): New fn.
13043 * tree.c (lang_printable_name): Use it.
13045 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
13047 * g++spec.c: Include config.h so that we can catch bzero #defines
13048 from the config file.
13050 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
13052 * new1.cc: Include a declaration for malloc, to avoid warning, and
13053 avoid lossing on systems that require one (ones that define malloc
13056 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13058 * decl2.c (max_tinst_depth): New variable.
13059 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
13061 * pt.c (max_tinst_depth): Variable moved.
13062 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
13065 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
13067 * decl.c (xref_basetypes): Allow a base class that depends on
13068 template parms to be incomplete.
13070 * decl2.c (build_expr_from_tree): Support typeid(type).
13071 * rtti.c (get_typeid): Support templates.
13072 (expand_si_desc, expand_class_desc): Fix string length.
13073 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
13075 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
13077 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
13079 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
13081 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13083 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
13084 smashes together template and non-template decls of the same
13087 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
13089 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
13091 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13093 * decl.c (duplicate_decls): Next route, pedwarn about different
13094 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
13096 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13098 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
13099 (struct lang_type): Delete has_default_implementation member.
13100 Increase dummy to 21.
13101 * decl.c (start_method): Delete usage.
13103 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
13104 store_after_parms, start_decl_1, auto_function): Add decls.
13105 (get_arglist_len_in_bytes, declare_implicit_exception,
13106 have_exceptions_p, make_type_decl, typedecl_for_tag,
13107 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
13108 build_component_type_expr, cplus_exception_name,
13109 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
13110 * call.c (build_this): Make static.
13111 (is_complete): Likewise.
13112 (implicit_conversion): Likewise.
13113 (reference_binding): Likewise.
13114 (standard_conversion): Likewise.
13115 (strip_top_quals): Likewise.
13116 (non_reference): Likewise.
13117 (build_conv): Likewise.
13118 (user_harshness): Likewise.
13119 (rank_for_ideal): Likewise.
13120 * decl.c (start_decl_1): Delete forward decl.
13121 (push_decl_level): Make static.
13122 (resume_binding_level): Make static.
13123 (namespace_bindings_p): Make static.
13124 (declare_namespace_level): Make static.
13125 (lookup_name_real): Make static.
13126 (duplicate_decls): Make static. Take register off NEWDECL and
13127 OLDDECL parm decls.
13128 * decl2.c (get_sentry): Make static.
13129 (temp_name_p): Delete fn.
13130 * except.c (auto_function): Delete decl.
13131 * lex.c (handle_{cp,sysv}_pragma): Make static.
13132 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
13133 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
13134 * pt.c (tsubst_expr_values): Make static.
13135 * rtti.c (combine_strings): Delete decl.
13137 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13139 * pt.c (push_template_decl): Handle getting a typedef.
13141 * call.c (build_new_function_call): Complain about void arg.
13143 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13145 * decl.c (duplicate_decls): Give pedwarn of different exceptions
13146 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
13148 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
13150 * except.c (expand_throw): Don't expand the cleanup tree here,
13151 since we are not going to write the rtl out. Fixes problem with
13154 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
13156 * Make-lang.in: Add $(exeext) as necessary.
13158 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
13160 * parse.y (handler_seq): Must have at least one catch clause.
13162 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13164 * call.c (add_builtin_candidate): Restore ?: hack.
13166 * decl.c (grok_op_properties): More warnings.
13168 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13170 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
13171 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
13173 * decl.c (duplicate_decls): Scale back to a warning, and only do
13176 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
13178 * decl.c (duplicate_decls): pedwarn mismatched exception
13181 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
13183 * call.c (build_new_method_call): Don't display the invisible
13184 argument for controlling virtual bases.
13186 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
13188 * new: Add nothrow new and delete, bad_alloc and throw specifications
13190 * decl.c (init_decl_processing): Add throw specification for delete.
13191 * new.cc (nothrow): Define.
13192 * lex.c (real_yylex): Removing warning that throw and friends are
13194 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
13195 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
13196 * Make-lang.in: Add new{1,2}.{cc,o}.
13198 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13200 * lex.c (cons_up_default_function): Fix return type of synth op=.
13202 * init.c (emit_base_init): Add warnings for uninitialized members
13205 * decl.c (xref_basetypes): Add warning for non-polymorphic type
13206 with destructor used as base type.
13208 * decl.c (grok_op_properties): Add warning for op= returning void.
13209 * typeck.c (c_expand_return): Add warning for op= returning anything
13212 * class.c (finish_struct_1): Add warning for class with pointers
13213 but not copy ctor or copy op=.
13215 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
13216 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
13217 (instantiate_template): If -fexternal-templates, add this
13218 instantiation to pending_templates.
13220 * decl2.c (copy_assignment_arg_p): Disable old hack to support
13223 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
13225 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
13227 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
13229 * call.c (standard_conversion): Handle getting references. Tack
13230 on RVALUE_CONV here. Do it for non-class types, too.
13231 (reference_binding): Pass references to standard_conversion.
13232 (implicit_conversion): Likewise.
13233 (add_builtin_candidate): Disable one ?: kludge.
13234 (convert_like): Handle RVALUE_CONVs for non-class types.
13235 (joust): Disable the other ?: kludge.
13237 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13239 * decl.c (init_decl_processing): Add code to build up common
13240 function types beforehand, to avoid creation then removal of
13241 things already in the hash table.
13243 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
13245 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
13248 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
13249 current_template_parms.
13251 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
13253 * search.c (lookup_field): Don't return a function, check want_type.
13255 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13257 * init.c (build_new): Make sure PLACEMENT has a type.
13259 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13261 * init.c (build_new): Support new (nothrow).
13263 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
13265 * pt.c (instantiate_decl): Also do push_to_top_level before setting
13268 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
13269 * pt.c (tsubst): Defer instantiation of default args.
13270 * call.c (build_over_call): Until here.
13272 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13274 * search.c (lookup_field): Make sure we have an
13275 IDENTIFIER_CLASS_VALUE before we try to return it.
13277 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13279 * call.c (build_method_call): Delete unused var PARM.
13280 (build_overload_call_real): Likewise.
13281 (build_object_call): Delete unused var P.
13282 (build_new_op): Likewise.
13283 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
13284 var definitions, which are never used.
13285 (shadow_tag): Delete unused var FN.
13286 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
13287 * init.c (build_new): Delete unused var ALLOC_TEMP.
13288 * method.c (hack_identifier): Delete unused var CONTEXT.
13289 (do_build_copy_constructor): Delete unused var NAME.
13290 (synthesize_method): Delete unused var BASE.
13291 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
13292 * rtti.c (build_headof): Delete unused var VPTR.
13293 (get_typeid): Delete unused var T.
13294 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
13296 (build_ptrmemfunc): Delete unused vars U and NINDEX.
13297 * typeck2.c (build_functional_cast): Delete unused var BINFO.
13299 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
13301 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
13302 things in a type being defined.
13303 * decl.c (finish_enum): Reverse the values so that they are in
13306 * pt.c (instantiate_class_template): Don't initialize
13307 BINFO_BASETYPES until the vector is filled out.
13308 (unify): Don't abort on conflicting bindings, just fail.
13309 (instantiate_decl): Do push_tinst_level before any tsubsting.
13311 * method.c (build_overload_value): Handle getting a
13312 TEMPLATE_CONST_PARM for a pointer.
13314 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
13316 * init.c (expand_member_init): Don't give 'not a base' error for
13319 * pt.c (instantiate_decl): Call import_export_decl later.
13321 * pt.c (instantiate_class_template): Return a value.
13323 * parse.y (extension): New rule for __extension__.
13324 (extdef, unary_expr, decl, component_decl): Use it.
13326 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
13328 * class.c (base_binfo): Remove unused base_has_virtual member.
13329 (finish_base_struct): Likewise.
13330 (finish_struct_1): Likewise.
13332 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
13334 * search.c (expand_upcast_fixups): Fix bogus code generation
13335 problem where the generated code uses the wrong index into the
13336 runtime built vtable on the stack. Old code could clobber random
13339 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
13341 * init.c (perform_member_init): Make sure the partial EH cleanups
13342 live on the function_obstack.
13344 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
13346 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
13347 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
13349 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
13351 * decl.c (grokvardecl): Avoid ANSI style initialization.
13353 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
13355 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
13357 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
13359 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
13361 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13363 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
13364 arguments we compare against. Start the count of I at 1, not 0,
13365 since argv[0] is still the command.
13367 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
13369 * lang-specs.h: Accept .cp as an C++ extension.
13371 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13373 * cp-tree.h (ptr_reasonably_similar): Add decl.
13375 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13377 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
13378 pointer. New local SPECBITS with the parm's value.
13379 (grokdeclarator): Pass &specbits down.
13381 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
13382 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
13384 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
13385 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
13387 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
13388 not an error_mark_node.
13390 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13392 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
13393 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
13395 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13397 * decl.c (grokdeclarator): When giving an anonymous struct a name,
13398 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
13401 * typeck2.c (build_m_component_ref): If component is a pointer
13402 to data member, resolve the OFFSET_REF now.
13404 * call.c (convert_like): Don't go into infinite recursion.
13406 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
13408 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
13409 * tree.c (layout_basetypes): And on the vbase ptr.
13411 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
13413 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
13414 CHAR_TYPE_SIZE so bool is always the same size as another type.
13416 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
13418 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
13420 * decl2.c (grok_x_components): Remove synthesized methods from
13421 TYPE_METHODS of an anonymous union, complain about member
13423 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
13425 (finish_function): Just clear the DECL_RTL of our arguments.
13427 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13429 * decl2.c (finish_file): Emit DWARF debugging info for static data
13432 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
13434 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
13436 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
13439 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
13441 * Make-lang.in (g++-cross$(exeext)): Fix typo.
13443 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13445 Make the g++ driver now be a standalone program, rather than one
13446 that tries to run the gcc driver after munging up the options.
13447 * Make-lang.in (g++.c, g++spec.o): New rules.
13448 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
13450 (g++$(exeext)): New rule, based on xgcc rule.
13451 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
13452 * g++spec.c: New file.
13453 * g++.c: Removed file.
13455 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
13457 * cvt.c (build_up_reference): Arrange for any temporary values
13458 that have been keep in registers until now to be put into memory.
13460 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13462 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
13463 that make -j3 bootstrap works better.
13465 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
13467 * decl.c (pushtag): Do pushdecl for anon tags.
13469 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
13471 * typeck.c (c_expand_return): Fix logic.
13472 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
13474 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
13476 * g++.c (main): Make sure arglist has a final NULL entry. Add
13477 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
13478 stdin/stdout of the invoked program are redirected to
13481 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13483 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
13485 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
13487 * init.c (resolve_offset_ref): Handle obj.vfn better.
13488 * typeck.c (build_component_ref): Set TREE_TYPE on result from
13491 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
13493 * typeck.c (convert_for_assignment): Also handle anachronistic
13494 implicit conversions from (::*)() to cv void*.
13495 * cvt.c (cp_convert_to_pointer): Likewise.
13497 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
13499 * lex.c (handle_cp_pragma): Fix bogus warning.
13501 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
13503 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
13504 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
13506 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13508 * class.c (finish_struct_1): Support DWARF2_DEBUG.
13509 * search.c (dfs_debug_mark): Likewise.
13510 * decl2.c (finish_vtable_vardecl): Likewise.
13511 * decl.c (pushtag, finish_enum): Likewise.
13512 * lex.c (check_newline): Use debug_* instead of calling *out
13513 functions directly.
13515 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13517 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
13518 on some picky hosts.
13520 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13522 * class.c (finish_struct_1): A class has a non-trivial copy
13523 constructor if it has virtual functions.
13525 * cvt.c (cp_convert): Always call a constructor.
13527 * call.c (reference_binding): Still tack on a REF_BIND
13528 for bad conversions.
13529 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
13531 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
13532 (c_expand_return): Likewise.
13533 * typeck2.c (digest_init): Likewise for { }.
13534 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
13535 * cvt.c (cp_convert): Handle failure better.
13537 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13539 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
13540 of GCC be path-relative.
13542 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
13544 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
13545 it does need choose-temp.o and pexecute.o.
13547 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13549 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
13550 that we still use it.
13551 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
13553 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
13555 * init.c (expand_default_init): Avoid calling constructors to
13556 initialize reference temps.
13558 * cvt.c (convert_to_reference): Fix.
13560 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13562 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
13563 (convert_to_reference): Likewise.
13564 * typeck.c (convert_for_initialization): Likewise.
13565 * init.c (expand_default_init): Likewise.
13566 (expand_aggr_init_1): Likewise.
13567 * cp-tree.h (CONV_NONCONVERTING): Lose.
13568 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
13570 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
13572 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
13574 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
13576 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13578 * init.c (expand_aggr_init_1): Don't crash on non-constructor
13581 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13583 * g++.c: Include gansidecl.h.
13584 (VPROTO, PVPROTO, VA_START): Delete.
13585 (choose_temp_base_try, choose_temp_base, perror_exec,
13586 run_dos) [__MSDOS__]: Delete fns.
13587 (pfatal_with_name): Delete fn.
13588 (temp_filename): Declare like in gcc.c.
13589 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
13590 (error_count, signal_count): Define.
13591 (error): Delete both definitions.
13592 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
13593 (pfatal_pexecute): Add fn from gcc.c.
13594 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
13595 code to use the pexecute stuff also used by gcc.c.
13596 (MIN_FATAL_STATUS): Define.
13597 * Make-lang.in (g++): Add dependency on and linking with
13598 choose-temp.o and pexecute.o.
13600 * cp-tree.h: Include gansidecl.h.
13601 (STDIO_PROTO): Delete #undef/#define.
13602 * cvt.c (NULL): Delete #undef/#define.
13603 * expr.c (NULL): Likewise.
13604 * init.c (NULL): Likewise.
13605 * rtti.c (NULL): Likewise.
13606 * xref.c (NULL): Likewise.
13608 * cp-tree.h (build_user_type_conversion): Add prototype.
13609 * call.c (build_user_type_conversion): Delete prototype. Correct
13610 decl of FLAGS arg to be an int.
13611 * cvt.c (build_user_type_conversion): Likewise.
13613 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
13615 * cp-tree.def: Add TRY_BLOCK and HANDLER.
13616 * except.c (expand_start_catch_block): Support templates.
13617 * parse.y (try_block, handler_seq): Likewise.
13618 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
13620 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
13622 * pt.c (current_template_args): New fn.
13623 (push_template_decl): Use it.
13624 * decl.c (grokdeclarator): Use it.
13626 * decl2.c (build_expr_from_tree): Dereference ref vars.
13628 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
13629 the decl-specifier-seq.
13631 * decl.c (grok_op_properties): Don't force the type of a conversion
13632 op to be complete. Don't warn about converting to the same type
13633 for template instantiations.
13635 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
13638 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
13640 * typeck.c (get_delta_difference): Remove previous bogusness.
13641 Don't give errors if force is set.
13643 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13645 * decl2.c (finish_file): Don't emit debug info.
13646 * decl.c (pushdecl): Lose obsolete code.
13647 (grokdeclarator): Still do the long long thing after complaining.
13648 * search.c (note_debug_info_needed): Don't do anything if we're in a
13650 * method.c (synthesize_method): For non-local classes,
13651 push_to_top_level first.
13653 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
13655 * typeck.c (get_delta_difference): Add no_error parameter.
13656 (build_ptrmemfunc): Call get_delta_difference with no_error set;
13657 we don't want error messages when converting unrelated
13658 pointer-to-member functions.
13660 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
13662 * error.c (dump_expr): Improve the wording on error messages that
13663 involve pointer to member functions.
13665 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
13667 * cvt.c (cp_convert_to_pointer): Move code for conversions from
13668 (::*)() to void* or (*)() up a bit, so that we can convert from
13669 METHOD_TYPEs as well.
13671 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13673 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
13674 There are no 'member' types.
13675 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
13676 (build_x_typeid): Handle errors.
13678 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
13680 * typeck.c (convert_for_assignment): Handle anachronistic implicit
13681 conversions from (::*)() to void* or (*)().
13682 * cvt.c (cp_convert_to_pointer): Likewise.
13683 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
13684 conversions from here.
13685 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
13686 * lang-options.h: Likewise.
13687 * decl2.c (warn_pmf2ptr): Define.
13688 * cp-tree.h: Declare it.
13689 * typeck2.c (digest_init): Allow pmfs down into
13690 convert_for_initialization.
13692 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
13694 * typeck.c (c_expand_return): Fix for returning overloaded fn.
13696 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13698 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
13699 * decl.c (grok_reference_init): Pass DIRECT_BIND.
13700 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
13702 * call.c (convert_like): Don't pass INDIRECT_BIND.
13703 * typeck.c (convert_arguments): Likewise.
13704 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
13706 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
13708 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
13709 similar code in build_up_ref.
13710 * cvt.c (build_up_reference): Drastically simplify.
13712 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
13714 * typeck.c (signed_or_unsigned_type): If the given type already
13715 as the correct signedness, then just return it.
13717 * typeck.c ({un,}signed_type): If can't do anything, call
13718 signed_or_unsigned_type.
13720 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
13722 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
13723 current_class_type is NULL.
13725 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
13727 * class.c (finish_struct_1): Avoid empty structs by adding a field
13728 so layout_type gets the mode right.
13730 * typeck.c (c_expand_return): Drastically simplify.
13732 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
13734 * typeck.c (decay_conversion): Handle overloaded methods.
13736 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
13738 * call.c (build_over_call): A TARGET_EXPR has side-effects.
13740 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
13742 * cvt.c (convert_to_pointer_force): Add code to support pointer to
13743 member function to pointer to function conversions.
13744 * init.c (resolve_offset_ref): Add code to allow faked up objects,
13745 ignoring them if they are not used, and giving an error, if they
13747 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
13748 code, and so that we can give an error, if we needed an object,
13749 and one was not provided.
13750 (build_c_cast): Don't call default_conversion when we want to
13751 convert to pointer to function from a METHOD_TYPE.
13753 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
13755 * Make-lang.in (cplib2.ready): Fix logic.
13757 * decl.c (shadow_tag): Only complain about non-artificial function
13760 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
13762 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
13764 * expr.c (cplus_expand_expr): Pre-tweak call_target like
13765 expand_inline_function would.
13767 * pt.c (mark_decl_instantiated): If extern_p, call
13768 mark_inline_for_output.
13770 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
13772 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
13775 * typeck.c (get_delta_difference): Fix wording, as we can be used
13776 for pointer to data members.
13778 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
13780 * pt.c (tsubst): If the function decl isn't a member of this
13781 template, return a copy of the decl (including copying the
13782 lang-specific part) so we don't hose ourselves later.
13784 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
13786 * class.c (finish_struct): Remove DWARF-specific tag handling.
13787 * decl.c (pushtag): Likewise.
13788 (finish_function): Always clear DECL_ARGUMENTS on function decls with
13790 * decl2.c (finish_file): Emit DWARF debugging info for static data
13793 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
13795 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
13796 isn't the same as the new one before we whack it.
13798 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
13800 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
13801 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
13802 warn_traditional and warn_strict_prototypes; remove ancient
13803 'overload' code; remove references to flag_traditional.
13805 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
13807 * input.c (sub_getch): Handle 8-bit characters in string literals.
13809 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
13811 * tree.c (mapcar): Handle CONSTRUCTORs.
13812 (copy_to_permanent): Handle expression_obstack properly.
13814 * Make-lang.in (cplib2.txt): Also depend on the headers.
13816 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
13818 (expand_class_desc): Use USItype for offset field.
13819 * tinfo.h (struct __class_type_info): Likewise.
13821 * method.c (build_overload_int): TYPE_PRECISION should be applied
13824 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
13826 * call.c (build_new_op): A COND_EXPR involving void must be a
13829 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13831 * typeck.c (build_x_component_ref): New fn.
13832 (build_object_ref): Use it.
13833 * parse.y (primary): Use it.
13834 * decl2.c (build_expr_from_tree): Use it.
13835 * cp-tree.h: Declare it.
13837 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
13838 * error.c (dump_type_suffix): Handle variable arrays.
13840 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13842 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
13844 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13846 * decl.c (lookup_name_real): Don't try to look up anything in a
13849 * tinfo2.cc (__throw_type_match_rtti): Oops.
13851 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13853 * Make-lang.in (exception.o): Use -fno-PIC for now.
13855 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
13857 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
13859 (get_tinfo_fn_dynamic): Extracted from build_typeid.
13860 * tinfo2.cc (__dynamic_cast): Adjust.
13862 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
13863 (build_x_typeid): Likewise.
13865 * parse.y: Call build_x_typeid instead of build_typeid.
13866 * cp-tree.def: Add TYPEID_EXPR.
13867 * pt.c (tsubst_copy): Handle typeid.
13868 * decl2.c (build_expr_from_tree): Likewise.
13869 * rtti.c (build_x_typeid): Throw bad_typeid from here.
13870 (build_typeid): Not here.
13871 * cp-tree.h: Declare build_x_typeid.
13873 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
13875 * call.c (convert_like): Pull out constant values.
13877 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
13879 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
13881 * decl.c (init_decl_processing): Create short int types before
13882 creating size_t in case a machine description needs to use
13883 unsigned short for size_t.
13885 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13887 * Make-lang.in (exception.o): Turn off pic.
13889 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
13890 type, multi-level ptr conversions.
13892 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
13893 (throw_bad_cast): Use it.
13894 (throw_bad_typeid): New fn.
13895 (build_typeid): Throw bad_typeid as needed.
13897 (synthesize_tinfo_fn): Handle functions and arrays before checking
13900 * Remove .h from standard C++ headers, add new.h, move into inc
13903 * exception*: Remove pointer from object, constructors. Add
13904 default exception::what that uses type_info::name. Add
13905 __throw_bad_typeid.
13907 * init.c (build_new): Don't add a cookie to new (void *) T[2].
13909 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
13911 * Make-lang.in: Building C++ code depends on cc1plus.
13913 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13915 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
13916 a HOST_WIDE_INT, not a tree.
13918 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
13920 * exception.cc: Don't include <stdlib.h>.
13922 * Make-lang.in (c++.clean): Remove cplib2.*.
13924 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
13926 * parse.y (component_decl_1, component_costructor_declarator case):
13927 Pass attributes/prefix_attributes in tree list.
13929 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
13931 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
13933 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13935 * lex.c (do_identifier): Don't do deferred lookup in a template
13938 * typeck2.c (store_init_value): Oops.
13940 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
13941 New files for C++ lang-support library.
13942 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
13943 (CXX_LIB2FUNCS): Define.
13944 And rules for building the C++ lang-support code.
13945 * config-lang.in (headers): Define.
13946 (lib2funcs): Define.
13948 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
13950 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
13952 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
13953 * typeck2.c (store_init_value): Check for initializing pmf with { }
13955 (process_init_constructor): Not here.
13957 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13959 * pt.c (begin_template_parm_list): Increment
13960 processing_template_decl here.
13961 (end_template_parm_list): Not here.
13962 (process_template_parm): No need to add 1 to it now.
13963 * *.c: Use processing_template_decl instead of current_template_parms
13964 to check for being in a template.
13966 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
13967 (tsubst_copy): Handle CONSTRUCTOR.
13968 (instantiate_decl): Set up context properly for variables.
13969 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
13970 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
13972 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13974 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
13976 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13978 * method.c (make_thunk): Call comdat_linkage before setting the
13981 * decl2.c (comdat_linkage): Use make_decl_one_only.
13982 (import_export_decl): Likewise.
13983 * decl.c (init_decl_processing): Check supports_one_only instead of
13986 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
13988 * decl2.c (grokfield): Tighten checking for access decls.
13990 * decl.c (make_typename_type): Resolve references to
13991 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
13992 (lookup_name_real): Types that depend on a template parameter get
13993 an implicit 'typename' unless they're in the current scope.
13994 (start_decl_1): We don't care about incomplete types that depend
13995 on a template parm.
13996 (grokdeclarator): Resolve 'typename's in the type specifier that
13997 refer to members of the current scope.
13999 * call.c (build_over_call): Remove 'inline called before
14000 definition' diagnostic.
14001 (build_method_call): Likewise.
14002 * decl.c (duplicate_decls): Downgrade 'used before declared
14003 inline' to a warning, only with -Winline.
14005 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
14007 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
14009 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14011 * call.c (build_method_call): When calling a signature
14012 default implementation, as in other cases, let instance_ptr simply
14015 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
14017 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
14019 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
14021 * except.c (expand_start_catch_block): Add a pushlevel so that -g
14022 works on hppa and SPARC.
14024 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14026 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
14028 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14030 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
14031 before testing whether it's a signature.
14033 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14035 * call.c (build_new_method_call): Don't complain about signature
14036 pointers and references not being an aggr type.
14037 (build_this): If a signature pointer or reference was passed in,
14039 (build_new_method_call): If instance is a signature pointer, set
14040 basetype to the signature type of instance.
14041 * sig.c (build_signature_method_call): Deleted basetype and
14042 instance parameters, they can be found as the DECL_CONTEXT of
14043 function and as the first argument passed in.
14044 * cp-tree.h: Changed declaration of build_signature_method_call.
14045 * call.c (build_method_call): Deleted first two arguments in call
14046 of build_signature_method_call.
14047 (build_over_call): Added call to build_signature_method_call.
14049 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14051 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
14054 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14056 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
14058 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
14060 * except.c (expand_start_try_stmts): Move to except.c in the backend.
14061 (expand_end_try_stmts): Remove.
14063 * init.c (perform_member_init): Use add_partial_entry () instead
14064 of directly manipulating lists.
14065 (emit_base_init): Likewise.
14067 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
14069 * except.c (expand_exception_blocks): Always make sure USE and
14070 CLOBBER insns that came at the end still do, the backend relies
14073 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
14075 * call.c (build_over_call): We can only use a TARGET_EXPR of the
14078 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
14080 * cvt.c (convert_to_reference): Revert last change, don't complain
14081 about temp without target decl.
14083 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
14085 * decl.c (grokdeclarator): Don't core dump when void() is given.
14087 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
14089 * decl.c (copy_args_p): Don't crash.
14091 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
14093 * pt.c (tsubst): And support template args inside the exception
14096 * pt.c (tsubst): Add support for exception specifications in
14097 template functions.
14099 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
14101 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
14103 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
14104 (start_function): Likewise.
14105 (start_method): Likewise.
14106 (grokfield): Likewise.
14107 (make_call_declarator): Add throw spec parameter.
14108 (set_quals_and_spec): Add routine.
14109 * lex.c (set_quals_and_spec): Likewise.
14110 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
14111 * decl.c (shadow_tag): Eliminate the throw spec parameter to
14113 (groktypename): Likewise.
14114 (start_decl): Eliminate the throw spec parameter. Eliminate the
14115 throw spec parameter to grokdeclarator. Eliminate the throw spec
14116 field in DECL_STMT.
14117 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
14118 (grokfndecl): Remove useless set of raises.
14119 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
14120 the throw spec parameter to start_decl. Pull the throw spec out
14121 of the call declarator.
14122 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
14123 (start_function): Eliminate the throw spec parameter. Eliminate
14124 the throw spec parameter to grokdeclarator.
14125 (start_method): Likewise.
14126 * decl2.c (grokfield): Likewise.
14127 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
14128 (grokoptypename): Likewise.
14129 (finish_file): Eliminate the throw spec parameter to
14130 start_function. Add throw spec to make_call_declarator.
14131 * except.c (init_exception_processing): Add throw spec to
14132 make_call_declarator. Eliminate the throw spec parameter to
14134 (expand_start_catch_block): Eliminate the throw spec parameter to
14136 (expand_builtin_throw): Add throw spec to make_call_declarator.
14137 Eliminate the throw spec parameter to start_function.
14138 (start_anon_func): Likewise.
14139 * lex.c (make_call_declarator): Add throw spec parameter.
14140 (set_quals_and_spec): New routine.
14141 (cons_up_default_function): Add throw spec to make_call_declarator.
14142 Eliminate the throw spec parameter to grokfield.
14143 * method.c (synthesize_method): Eliminate the throw spec parameter
14145 * pt.c (process_template_parm): Eliminate the throw spec parameter
14147 (tsubst): Add throw spec to make_call_declarator.
14148 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
14149 (do_function_instantiation): Eliminate the throw spec parameter to
14150 grokdeclarator. Eliminate the throw spec parameter to
14152 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
14154 * parse.y (datadef): Remove non-winning optimization.
14156 (fndef): Remove ambiguous error productions uncovered by grammar
14158 (constructor_declarator): Add exception_specification_opt here.
14159 (component_constructor_declarator): Likewise.
14160 (direct_after_type_declarator): Likewise.
14161 (complex_direct_notype_declarator): Likewise.
14162 (direct_abstract_declarator): Likewise.
14163 (fn.def1): Remove exception_specification_opt.
14164 (fn.def2): Likewise.
14165 (condition): Likewise.
14166 (initdcl0): Likewise.
14167 (initdcl): Likewise.
14168 (notype_initdcl0): Likewise.
14169 (nomods_initdcl0): Likewise.
14170 (component_decl_1): Likewise.
14171 (component_declarator): Likewise.
14172 (after_type_component_declarator0): Likewise.
14173 (after_type_component_declarator): Likewise.
14174 (notype_component_declarator): Likewise.
14176 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14178 * call.c (build_over_call): Also use an INIT_EXPR when
14179 initializing anything from an rvalue.
14181 * call.c (build_over_call): Call stabilize_reference when building
14182 an INIT_EXPR instead of calling the copy ctor.
14184 * call.c (joust): Extend the previous change to all comparisons.
14186 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
14187 NO_LINKAGE_HEURISTICS.
14189 * decl2.c (finish_file): Emit any statics that weren't already.
14191 * typeck.c (build_static_cast): Implement.
14192 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
14193 * decl.c (grokparms): Use can_convert_arg instead of
14194 implicit_conversion directly.
14195 (copy_args_p): New fn.
14196 * cvt.c (convert_to_reference): Don't complain about temp with
14198 (build_up_reference): Handle TARGET_EXPRs.
14199 * call.c (build_over_call): Elide unnecessary temps.
14200 (can_convert*): Use new overloading code.
14202 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
14204 * call.c: Move TYPE_PTR*_MACROS ...
14205 * cp-tree.h: To here.
14206 * typeck.c (build_reinterpret_cast): Implement.
14208 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
14210 (joust): If we're comparing a function to a builtin and the worst
14211 conversion for the builtin is worse than the worst conversion for the
14212 function, take the function.
14214 * typeck.c (build_const_cast): Implement.
14215 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
14216 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
14218 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
14220 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
14221 too early. Make sure we explode if exprtype turns out to be a
14222 NULL_TREE when it shouldn't be.
14224 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
14226 * cp-tree.h: New routine make_call_declarator.
14227 * lex.c (make_call_declarator): Define it.
14228 * except.c (init_exception_processing): Use it.
14229 (expand_builtin_throw): Likewise.
14230 (start_anon_func): Likewise.
14231 * decl2.c (finish_file): Likewise.
14232 * lex.c (cons_up_default_function): Likewise.
14233 * parse.y: Likewise.
14234 * pt.c (tsubst): Likewise.
14236 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
14238 * decl2.c (groktypefield): Remove unused code.
14240 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
14242 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
14243 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
14244 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
14245 nonempty_cv_qualifiers.
14248 * lex.c (make_pointer_declarator): Change type_quals into
14250 (make_reference_declarator): Likewise.
14252 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14254 * decl.c (start_function): Only check interface_* for templates
14255 with flag_alt_external_templates.
14257 * call.c (build_new_op): Check for comparison of different enum types.
14258 (build_over_call): Fix arg # output.
14260 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
14262 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
14264 * call.c (build_new_op): Check for erroneous args.
14266 * call.c (build_new_method_call): Add missing args to cp_error.
14268 * tree.c (error_type): Don't print reference-to-array.
14270 * typeck.c (convert_for_assignment): Don't say contravariance for
14273 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14275 * call.c (build_over_call): Diagnose bad convs for `this'.
14277 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
14280 * call.c (convert_like): Handle bad convs.
14281 (build_over_call): Handle bad convs better.
14283 * decl2.c: -fansi-overloading is now the default.
14285 * call.c (build_new_method_call): Check for erroneous args.
14287 * pt.c (instantiate_class_template): Propagate
14288 TYPE_USES_MULTIPLE_INHERITANCE.
14290 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
14292 * call.c (enforce_access): Add static to routine.
14294 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
14296 * call.c (build_user_type_conversion_1): Fix bad handling.
14297 (compare_ics): Likewise.
14299 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14301 * call.c (standard_conversion): Oops.
14303 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
14305 * g++.c: Update test for win32 (&& ! cygwin32).
14307 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14309 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
14310 (ptr_reasonably_similar): New fn.
14311 * call.c (BAD_RANK): New rank.
14312 (ICS_BAD_FLAG): New macro.
14313 (standard_conversion): Handle almost-right pointer conversions.
14314 (reference_binding): Handle bad rvalue bindings.
14315 (add_*_candidate): Stuff.
14316 (build_over_call): Pass bad conversions to convert_for_initialization.
14317 (compare_ics): Handle bad convs.
14320 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
14322 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
14323 integer_type_node when computing pointer offsets.
14325 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
14327 * tree.c (lvalue_type): New fn.
14328 (error_type): New fn.
14329 * call.c (op_error): Use error_type.
14330 (add_conv_candidate): Use lvalue_type.
14331 (add_builtin_candidates): Likewise.
14332 * error.c (args_as_string): Use error_type.
14334 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
14336 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
14337 (tsubst): Not here.
14339 * decl.c (init_decl_processing): With -ansi, __null's type is the
14340 signed integral type with the same number of bits as a pointer.
14341 Introduce a new variable null_node for it.
14342 * cp-tree.h: Adjust.
14343 * call.c (null_ptr_cst_p): Adjust.
14345 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
14347 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
14350 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14352 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
14353 fns of classes without virtual functions.
14355 * call.c (add_function_candidate): Handle `this' specially.
14356 (compare_ics): Likewise.
14358 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
14360 * typeck.c (build_conditional_expr): Fix handling of __null.
14362 * decl2.c (comdat_linkage): New fn.
14363 (import_export_vtable): Use it.
14364 (import_export_decl): Use it.
14365 * method.c (make_thunk): Use it.
14367 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
14369 * pt.c (end_template_decl): If we don't actually have parms, return.
14370 * parse.y (template_header): Accept 'template <>'.
14372 * errfn.c: Allow 5 args.
14374 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
14376 * tree.c (make_temp_vec): New fn.
14377 * pt.c (push_template_decl): Handle partial specs.
14378 (instantiate_class_template): Likewise.
14379 (more_specialized): Use get_bindings.
14380 (more_specialized_class): New fn.
14381 (get_class_bindings): New fn.
14382 (most_specialized_class): New fn.
14383 (do_function_instantiation): List candidates for ambiguous case.
14384 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
14385 (shadow_tag): Call push_template_decl for partial specializations.
14386 * parse.y: Likewise.
14387 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
14388 DECL_TEMPLATE_MEMBERS.
14389 * call.c (print_z_candidates): Reduce duplication.
14391 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14393 * decl2.c (lang_decode_option): Allow -fansi-overloading.
14395 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
14397 * pt.c (get_bindings): New fn.
14398 (most_specialized): Likewise.
14399 (do_function_instantiation): Use them.
14400 (add_maybe_template): New fn.
14401 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
14402 * call.c (build_new_op): Handle guiding decls.
14403 (build_new_function_call): Likewise.
14404 * decl2.c (finish_file): Likewise.
14406 * decl2.c (mark_used): Do synthesis here.
14407 * call.c (build_method_call): Not here.
14408 (build_over_call): Or here.
14409 * typeck.c (build_function_call_real): Or here.
14410 * tree.c (bot_manip): Call mark_used on functions used in default
14413 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14415 * decl2.c (import_export_vtable): Delete code that disabled vtable
14416 heuristic on systems with ASM_OUTPUT_EXTERNAL.
14418 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14420 * typeck.c (build_x_function_call): Handle static call context
14423 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
14424 the function, not its outer block.
14426 * call.c (build_field_call): Pass fields on to build_opfncall
14427 regardless of TYPE_OVERLOADS_CALL_EXPR.
14428 (build_method_call): Pass on to build_new_method_call sooner.
14430 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
14432 * class.c (instantiate_type): Don't put a POINTER_TYPE to
14433 METHOD_TYPE on an expression. Also make a copy of rhs instead of
14436 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
14438 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
14439 (add_builtin_candidate): Don't take enums for ++.
14440 (build_new_method_call): Handle non-aggregates and field calls.
14441 Move new overloading code from...
14444 * decl.c (grokparms): Don't check default args in templates.
14446 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
14448 * cvt.c (build_new_op): Fix args to build_unary_op.
14449 (add_builtin_candidates): Don't call type_promotes_to on float.
14451 * decl.c (grokparms): Check the type of the default arg.
14453 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
14454 returning NULL_TREE.
14456 * typeck.c (build_x_binary_op): Avoid doing extra work.
14457 (build_x_unary_op): Likewise.
14458 (build_x_conditional_expr): Likewise.
14459 * cvt.c (build_over_call): Return.
14460 (add_builtin_candidate): Fix MEMBER_REF.
14461 (build_new_op): Likewise.
14463 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
14465 * method.c (build_overload_name): Put bug fix into code but leave
14466 disabled for now so we can be bug compatible with older releases
14467 that do repeats incorrectly. In the future, we can enable it.
14469 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14471 * cvt.c (convert_like): Don't call build_cplus_new twice.
14473 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
14474 Control new overloading code with -fansi-overloading.
14476 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14478 * cvt.c (build_over_call): Call build_cplus_new.
14479 * call.c (build_method_call): Likewise.
14480 * typeck.c (build_function_call_real): Likewise.
14481 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
14482 the COND_EXPR in a TARGET_EXPR so they use the same slot.
14484 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
14486 * typeck.c (complete_type): Propagate
14487 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
14489 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14491 * cvt.c (joust): More ?: kludging. Sigh.
14492 (build_over_call): Don't try to synthesize global fns.
14494 * search.c (lookup_conversions): Use binfo marking.
14496 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
14498 * search.c (build_mi_matrix): Use the correct value of cid
14499 when determining the new mi_size.
14501 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
14503 * cvt.c (add_builtin_candidates): Do consider type conversion ops
14504 for the first parms of += et al.
14505 (strip_top_quals): New fn.
14506 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
14507 (implicit_conversion): Likewise.
14508 (add_builtin_candidates): Be careful about arrays.
14509 (build_new_method_call): Handle vtable optimization.
14511 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
14513 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
14514 * cvt.c (reference_binding): Use it.
14515 (implicit_conversion): Use it.
14516 (add_builtin_candidate, COND_EXPR): Use it.
14518 * cvt.c (build_new_function_call): Check for error args.
14520 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
14522 * gxx.gperf: Add __null.
14523 * hash.h: Regenerate.
14524 * lex.h: Add RID_NULL.
14525 * lex.c (init_lex): Create null_pointer_node here, stick it in
14527 * decl.c (init_decl_processing): Still set its type here.
14528 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
14529 (convert_to_pointer_force): Likewise.
14530 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
14532 * call.c (convert_harshness): Use null_ptr_cst_p.
14533 * typeck.c (convert_for_assignment): Likewise. Don't produce
14536 * error.c (args_as_string): Handle lists of actual args, too.
14537 * cvt.c (null_ptr_cst): Support (void*)0 for now.
14538 (build_user_type_conversion_1): Improve diagnostics.
14539 (build_new_function_call): Likewise.
14540 (build_object_call): Likewise.
14541 (build_new_method_call): Likewise. Move call before def diagnostic...
14542 (build_over_call): Here.
14544 * cvt.c (build_new_method_call): Don't complain about no match if
14545 LOOKUP_SPECULATIVELY.
14546 (build_over_call): Fix 'this' for virtual fn.
14547 (build_new_method_call): Add diagnostic.
14549 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14551 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
14552 constructors to be passed in.
14553 (build_over_call): Likewise.
14554 (build_user_type_conversion_1): Pass them in.
14555 (convert_like): Likewise.
14556 (build_object_call): Handle overloaded conversions.
14557 (build_over_call): Pass the right args to build_vfn_ref.
14558 (standard_conversion): Fix pmf convs.
14559 (joust): Handle comparing statics and non-statics.
14560 (build_new_method_call): New fn.
14561 * call.c (build_method_call): Call it if NEW_OVER.
14563 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
14565 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
14568 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
14570 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
14571 instead of just maybe_build_cleanup so that we deallocate the
14574 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14576 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
14577 * cp-tree.h (finish_prevtable_vardecl): Add decl.
14579 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
14581 * pt.c (instantiate_class_template): Call complete_type. Also, if
14582 we're at the end of the file and we just instantiated a template
14583 class with a vtable, call finish_prevtable_vardecl.
14585 * error.c (dump_decl): Don't explode (or explode more gracefully
14586 as appropriate) if the object being dumped has a null type.
14587 (dump_expr): Likewise.
14589 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
14590 by counting the number of nodes that we'll need before allocating
14592 (lookup_fnfields): Fix comment.
14593 (breadth_first_search): Fix comment.
14595 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
14597 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
14599 * class.c (finish_struct): Call cplus_decl_attributes here.
14600 (finish_struct_1): Not here.
14601 * cp-tree.h: Adjust.
14603 * pt.c (type_unification): New parameter STRICT.
14604 (unify): If STRICT, don't allow cv addition or base deduction.
14605 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
14607 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
14609 * search.c (get_template_base{_recursive}): New fns.
14610 * pt.c (more_specialized): New fn.
14611 (do_function_instantiation): Use it.
14612 (unify): Handle base deduction.
14613 * cvt.c (joust): Use more_specialized.
14614 Don't arbitrarily choose between non-builtin candidates.
14615 (build_over_call): Call require_complete_type.
14617 * decl.c (start_function): Statics are static even in a #pragma
14620 * decl2.c (import_export_vtable): Disable vtable heuristic on
14621 systems with ASM_OUTPUT_EXTERNAL.
14623 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
14624 (standard_conversion): No std conv to enum type.
14626 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
14629 * cvt.c (reference_binding): Bind directly to a base subobject of
14632 * cvt.c (build_new_op): Enforce access control.
14634 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
14636 * typeck2.c (process_init_constructor): When scanning the
14637 union for a named field, skip things that aren't FIELD_DECLs.
14639 * method.c (synthesize_method): Don't scan fndecl's rtl if
14640 we're at the end of the file; just assume the function can't
14643 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14645 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
14648 * cvt.c (build_user_type_conversion_1): Handle overloaded
14651 * cvt.c (add_builtin_candidates): Don't consider type conversion
14652 operators for the first parameter of operator=.
14654 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
14656 * typeck.c (complete_type): Only call layout_type if we're not
14657 expanding a template.
14659 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
14661 * cvt.c (compare_ics): Oops.
14663 * cvt.c (op_error): Oops.
14665 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
14666 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
14667 (build_conv): Use them.
14668 (implicit_conversion): Use them.
14669 (convert_like): Handle them.
14670 (build_new_op): Handle builtin COND_EXPR again.
14671 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
14672 in lists of types for COND_EXPR.
14673 (add_builtin_candidate): Add enum candidates for COND_EXPR.
14675 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
14677 * typeck.c (build_modify_expr): Always attempt to build a call to
14678 the assignment operator, even if we're using a default one.
14679 (convert_for_initialization): Call complete_type.
14681 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14683 * cvt.c (reference_binding): A REF_BIND gets the reference type.
14684 (implicit_conversion): Likewise.
14685 (convert_like): Likewise.
14686 (compare_ics): Likewise.
14687 (compare_qual): Likewise.
14688 (print_z_candidates): Handle no candidates.
14689 (build_new_op): Don't handle builtin COND_EXPR for now.
14691 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
14693 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
14695 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14697 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
14699 * cvt.c (build_builtin_candidate): Oops.
14700 (build_new_op): Oops.
14702 * method.c (build_opfncall): Pass COND_EXPR on.
14703 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
14704 (add_builtin_candidate{,s}): Likewise.
14705 (add_builtin_candidates): Likewise.
14706 (print_z_candidates, op_error, build_new_op): Likewise.
14707 (type_decays_to): New fn.
14708 * lex.c (init_lex): Just say ?: for COND_EXPR.
14710 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14712 * typeck.c (complete_type): Call layout_type rather than building
14715 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
14716 only use ptrdiff_t.
14718 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14720 * cvt.c: Always compile the new overloading code (but don't use it).
14721 (implicit_conversion): Add a BASE_CONV when converting to
14722 the same class type.
14723 (convert_like): Handle BASE_CONV.
14725 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14727 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
14728 (add_builtin_candidate): Likewise.
14731 * typeck.c (build_x_function_call): Try an operator function
14732 whenever we call an object of class type.
14733 * method.c (build_opfncall): Pass CALL_EXPRs through.
14734 * cvt.c (implicit_conversion): Do const-ref case first.
14735 (add_conv_candidate, build_object_call, op_error): New fns.
14736 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
14737 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
14738 builtin candidates.
14739 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
14740 Fall back on preincrement handling. Use op_error.
14742 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
14743 an error_mark_node.
14744 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
14747 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
14749 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
14751 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
14753 * typeck.c (build_component_ref_1): Use build_component_ref
14754 instead of open coding it here.
14756 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
14758 * g++.c (main): Don't link with -lg++.
14761 * cvt.c (convert_to_reference): Don't use convert_from_reference on
14762 result of build_type_conversion.
14763 (cp_convert): Only call build_method_call for ctors if
14764 build_type_conversion failed.
14765 (ptr_complete_ob): New function.
14766 (TYPE_PTR{,OB,MEM}_P): New macros.
14767 ({add,build}_builtin_candidate{,s}): New functions.
14768 (print_z_candidates): Handle builtins.
14769 (build_user_type_conversion_1): Don't use conversion fns for
14770 converting to a base type.
14771 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
14772 (build_user_type_conversion): Use convert_from_reference.
14773 (build_new_op): New function.
14774 (build_over_call): Fix handling of methods.
14775 (compare_ics): Handle AMBIG_CONV properly.
14776 * typeck2.c: Increment abort count.
14777 * method.c (build_opfncall): Forward most requests to build_new_op.
14778 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
14780 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14782 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
14783 invalid second argument to dump_expr_list.
14785 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
14787 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
14789 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
14791 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
14794 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
14796 * typeck2.c (process_init_constructor): New pedwarn for using { }
14797 to initialize a pointer to member function.
14798 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
14799 we can avoid the new error.
14801 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
14803 * typeck.c (build_ptrmemfunc1): New function to hide details of
14804 pointer to member functions better.
14806 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
14808 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
14809 methods into the actual method, as we know the implied object is
14812 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14814 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
14815 inside a system header.
14817 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
14819 * call.c (build_method_call): Call complete_type on the
14822 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
14824 * typeck.c (build_component_ref): Always build up an OFFSET_REF
14825 for obj_ptr->func so that we can know which object to use in a
14828 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
14830 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
14831 around things. Also improve maintainability.
14833 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
14835 * decl.c (grokdeclarator): Check for overflow when evaluating an
14838 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
14840 * cvt.c (cp_convert): Don't check for ambiguity with constructor
14843 * typeck.c (build_x_function_call): Pass function overload
14844 questions to new overloading code if NEW_OVER.
14845 * init.c (expand_aggr_init_1): Only check for type conversion ops
14846 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
14847 Don't check for ambiguity with constructor if NEW_OVER.
14848 * cvt.c (convert_to_reference): Dereference the result of a type
14849 conversion operator.
14850 (build_conv): Propagate ICS_USER_FLAG.
14851 (implicit_conversion): Call instantiate_type.
14852 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
14853 (add_function_candidate): Fix cv-quals on argtype.
14854 (print_z_candidates): New function.
14855 (build_new_function_call): Call it.
14856 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
14857 consider non-converting constructors.
14858 Call print_z_candidates.
14859 Return an AMBIG_CONV for an ambiguous conversion.
14860 (build_user_type_conversion): Handle AMBIG_CONV.
14861 (convert_like): Fix test for building TARGET_EXPR.
14862 Call instantiate_type.
14863 Handle AMBIG_CONV and LVALUE_CONV.
14864 (build_over_call): Handle 0 args and ellipsis.
14865 * cp-tree.def: Add AMBIG_CONV.
14867 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
14869 * decl.c (lookup_name_real): If we find mem in obj when parsing
14870 `obj->mem', make sure we return the right value.
14872 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
14874 * search.c (get_base_distance): Call complete_type.
14876 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
14878 * decl.c (store_bindings): Make static.
14880 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14882 * init.c (expand_aggr_init_1): Don't check type conversions if
14885 * cvt.c (z_candidate): Put back template field.
14886 (add_function_candidate): Set it.
14887 (add_template_candidate): Likewise.
14889 (compare_qual): Handle references and pointers to members.
14890 (compare_ics): Handle reference bindings.
14892 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
14894 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
14896 * call.c (compute_conversion_costs): Call complete_type.
14898 * tree.c (vec_binfo_member): Use comptypes instead of comparing
14899 pointers, so we can handle template parameters.
14901 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
14903 * cvt.c (cp_convert_to_pointer): We have to call complete_type
14904 here; let's make it explicit instead of a side effect of an
14907 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
14909 * cvt.c (z_candidate): Remove template field.
14910 (reference_binding): Handle binding to temporary.
14911 (implicit_conversion): Likewise.
14912 (add_function_candidate): Handle artificial constructor parms.
14913 Handle functions with too few parms.
14914 (add_template_candidate): New function.
14915 (build_user_type_conversion_1): Handle constructors.
14916 (convert_like): Likewise.
14917 (build_over_call): Likewise.
14918 (build_new_function_call): Support templates.
14919 (compare_ics): Fix reference, inheritance handling.
14921 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
14923 * decl.c: Add signed_size_zero_node.
14924 (init_decl_processing): Build it.
14925 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
14926 when we're trying to make a negative delta.
14928 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14930 Stop doing this damn index==strchr variable name confusion.
14931 * class.c (add_virtual_function): Change local var INDEX to be
14933 (add_method): Likewise.
14934 * lex.c (print_parse_statistics): Likewise.
14935 * search.c (make_memoized_table_entry): Likewise.
14936 (lookup_fnfields_here): Likewise.
14937 (lookup_field): Likewise.
14938 (lookup_fnfields): Likewise.
14939 (get_baselinks): Likewise.
14940 * sig.c (build_signature_table_constructor): Likewise.
14941 (build_signature_method_call): Likewise.
14942 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
14943 (get_member_function_from_ptrfunc): Likewise.
14944 (build_ptrmemfunc): Change local var INDEX to be IDX.
14945 (c_expand_start_case): Likewise.
14947 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
14949 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
14950 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
14951 (convert_to_reference): Use build_type_conversion to convert to
14952 the reference type directly.
14953 (standard_conversion): Fix void* case, non-conversions.
14954 (reference_binding): Fix expr == 0 case, non-conversions.
14955 (convert_like): Support REF_BIND.
14956 (compare_qual): Split out from compare_ics.
14957 (compare_ics): Use it, handle icses with only a qual_conv.
14959 * init.c (expand_vec_init): Don't crash if decl is NULL.
14961 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
14963 * mpw-config.in: New file, configury for Mac MPW.
14964 * mpw-make.sed: New file, makefile editing for MPW.
14966 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14968 * pt.c (instantiate_class_template): Call repo_template_used.
14970 * search.c (lookup_conversions): Only lookup conversions in
14973 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14975 * cp-tree.def: Renamed from tree.def, to avoid confusion with
14977 * cp-tree.h, lex.c: Include cp-tree.def.
14978 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
14980 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
14982 * init.c (build_vec_delete_1): Call complete_type.
14984 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
14986 * except.c (start_anon_func): Make sure anonymous functions are
14989 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
14991 * decl.c (finish_function): If function_depth > 1, set nested.
14993 * decl2.c (grokbitfield): Revert Bob's change.
14994 * class.c (finish_struct_1): Fix handling of named bitfield widths.
14996 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
14998 * pt.c (add_pending_template): Handle types.
14999 (lookup_template_class): With -fexternal-templates, just add the class
15000 to pending_templates instead of instantiating it now.
15001 * decl2.c (finish_file): Handle types in pending_templates.
15003 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
15005 * decl2.c (grokbitfield): Handle constant decls appropriately.
15006 Give an appropriate error message now instead of spewing core
15009 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
15011 * decl2.c: Don't turn on thunks by default for now.
15013 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
15015 * typeck.c (complete_type): Handle error_mark_node.
15016 (common_type, OFFSET_TYPE): Handle template_type_parms.
15018 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
15020 * pt.c (instantiate_decl): If at_eof, call import_export_decl
15021 regardless of DECL_INLINE.
15023 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
15025 * class.c (finish_struct_bits): Copy TYPE_SIZE.
15027 * rtti.c (build_dynamic_cast): Support templates.
15028 * tree.def: Support DYNAMIC_CAST_EXPR.
15029 * pt.c (tsubst_copy): Likewise.
15030 * decl2.c (build_expr_from_tree): Likewise.
15032 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15034 * typeck.c (build_static_cast): Support templates.
15035 (build_const_cast): Likewise.
15036 * tree.def: Support CONST/STATIC_CAST_EXPR.
15037 * pt.c (tsubst_copy): Likewise.
15038 * decl2.c (build_expr_from_tree): Likewise.
15040 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
15042 * decl2.c (finish_vtable_vardecl): Don't trust
15043 TREE_SYMBOL_REFERENCED for vtables of local classes.
15045 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15047 * pt.c (tsubst_copy): Handle operator T.
15049 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15051 * init.c (build_delete): Move creation of PARMS inside test of
15052 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
15054 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
15056 * typeck.c (build_conditional_expr): Don't assume that
15057 the arguments to ?: are always pointers or records.
15059 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15061 * decl2.c (import_export_decl): Still emit static/weak/comdat
15062 copies of inline template functions with -fno-implicit-templates.
15064 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
15066 * init.c (build_delete): Determine the complete basetype
15067 path to the destructor we're calling.
15069 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
15071 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
15072 initialize the enum, because we really and truly don't know where
15074 (start_enum): Don't copy integer_zero_node because
15075 build_enumerator will do it.
15077 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15079 * decl.c (finish_function): Do access control on base destructors.
15081 * pt.c (tsubst, case FUNCTION_DECL): Set up
15082 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
15085 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
15087 * cvt.c (build_up_reference): If we have already extended the
15088 lifetime of the temporary, don't try it again.
15089 * typeck.c (c_expand_return): Don't try and convert the return
15090 value twice when we want a reference, once is enough.
15092 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
15094 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
15095 LOOKUP_ONLYCONVERTING at all for now.
15097 * search.c (add_conversions): Put the conversion function in
15098 TREE_VALUE, the basetype in TREE_PURPOSE.
15099 * cvt.c (build_type_conversion): Adjust.
15100 * cvt.c (build_expr_type_conversion): Adjust.
15101 * call.c (user_harshness): Adjust.
15103 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
15105 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
15108 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
15110 * except.c (expand_start_catch_block): Add a dummy region, if we
15111 get an error, so that we can avoid core dumping later.
15113 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
15115 * cp-tree.h (OFFSET_REF): Remove.
15116 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
15117 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
15118 * init.c (expand_aggr_init_1): Likewise.
15119 (build_new): Likewise.
15120 * typeck.c (expand_target_expr): Likewise.
15122 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15124 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
15127 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
15129 * cvt.c (build_up_reference): Redo how and when temporaries are
15131 * decl.c (grok_reference_init): Don't try and be smart about
15134 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
15136 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
15137 (TARGET_EXPR...), now that it has 4 arguments.
15138 * tree.c (build_cplus_new): Likewise.
15140 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15142 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
15144 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
15145 * decl.c (struct saved_scope): Remove named_labels,
15146 {base,member}_init_list.
15147 (maybe_push_to_top_level): Don't set them. Call
15148 push_cp_function_context if appropriate.
15149 (pop_from_top_level): Likewise.
15151 * method.c (do_build_assign_ref): Remove obsolete check of
15152 TYPE_HAS_ASSIGN_REF (basetype).
15154 * decl.c (grokfndecl): Diagnose user definition of
15155 implicitly-declared methods.
15157 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
15159 * method.c (do_build_copy_constructor): Add code to give
15160 meaningful error messages instead of crashing.
15161 (do_build_assign_ref): Don't synthesize assignment operators for
15162 classes containing reference or const members.
15164 * class.c (struct base_info): Remove cant_synth_copy_ctor
15165 and cant_synth_asn_ref.
15166 (finish_base_struct): Remove the code that tries to conditionalize
15167 synthesis of copy constructors & assignment operators based on
15168 access permissions. Instead, let it fail when it tries to
15169 synthesize the copy constructor. This will give meaningful error
15170 messages instead of silently generating code to perform a bitcopy.
15172 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
15174 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
15175 determining types for constant values.
15177 * decl.c (struct named_label_list): Use instead of stuffing
15178 random items into a TREE_LIST node.
15179 (named_label_uses): Use the new struct.
15180 (poplevel): Likewise.
15181 (lookup_label): Likewise.
15182 (define_label): Add an error message to tell the user the line
15183 where the goto is located in addition to the destination of the
15185 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
15187 (finish_function): Likewise.
15189 (start_decl): Complain about defining a static data member
15190 in a different type from which it was declared.
15192 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15194 * cvt.c (build_expr_type_conversion): Adjust.
15196 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15198 * call.c (build_method_call): Always convert 'this' to the
15201 * search.c (add_conversions): Put the conversion function in
15202 TREE_VALUE, the type in TREE_PURPOSE.
15203 * cvt.c (build_type_conversion): Adjust.
15204 * call.c (user_harshness): Adjust.
15206 * method.c (emit_thunk): Call temporary_allocation and
15207 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
15209 * tree.c (build_cplus_array_type): Handle tweaking of
15210 TYPE_MAIN_VARIANT here.
15211 * typeck.c (common_type): Not here.
15213 * typeck.c (complete_type): Only try to complete an array type if
15216 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
15218 * decl.c (grokvardecl): Call complete_type.
15219 (grokdeclarator): Call complete_type for PARM_DECLs.
15221 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
15223 * pt.c (instantiate_class_template): Re-set
15224 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
15226 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
15228 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
15229 smart enough to do it right.
15230 * tree.c (cp_expand_decl_cleanup): Likewise.
15231 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
15232 cp_expand_decl_cleanup.
15233 (store_parm_decls): Likewise.
15234 (hack_incomplete_structures): Likewise.
15235 * except.c (push_eh_cleanup): Likewise.
15237 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
15239 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
15240 frontend to the backend where it belongs.
15241 * tree.c (unsave_expr): Likewise.
15242 (unsave_expr_now): Likewise.
15243 * tree.def (UNSAVE_EXPR): Likewise.
15244 * cp-tree.h (unsave_expr): Likewise.
15245 (unsave_expr_now): Likewise.
15247 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
15249 * init.c (emit_base_init): Make sure the partial EH cleanups live
15250 on the function_obstack.
15252 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
15254 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
15255 when checking for pointer types.
15257 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15259 * pt.c (instantiate_class_template): Remove obsolete check for
15260 access declarations.
15262 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
15264 * call.c (build_overload_call): Simplify calls to
15265 build_overload_call by removing last parameter.
15266 (build_method_call): Likewise.
15267 * cp-tree.h: Likewise.
15268 * method.c (build_opfncall): Likewise.
15269 * typeck.c (build_x_function_call): Likewise.
15271 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
15273 * call.c (default_parm_conversions): Factor out common code.
15274 (build_method_call): Use it.
15275 (build_overload_call_real): Use it.
15277 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
15279 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
15280 but pedwarn as the code is bogus.
15281 * typeck.c (decay_conversion): Likewise.
15282 (build_function_call_real): Use build_addr_func instead of
15283 default_conversion. Don't allow pointer-to-method functions down
15285 (build_unary_op): Use real pointer-to-member functions instead of
15287 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
15288 (convert_for_assignment): Removed some obsolete code.
15289 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
15290 build_x_function_call instead of current_class_ptr. Only call
15291 digest_init once on an initializer, we do this just checking
15293 (build_expr_from_tree): Pass current_class_ref to
15294 build_x_function_call instead of current_class_ptr.
15295 * init.c (build_member_call): Likewise.
15296 * pase.y: Likewise.
15297 * error.c (dump_expr): Handle OFFSET_REFs better.
15298 * pt.c (unify): Handle pointer-to-member functions better.
15299 * decl.c (finish_function): Clear out current_class_ref just like
15300 we do for current_class_ptr.
15302 * typeck.c (get_delta_difference): Handle virtual bases better.
15304 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
15306 * sig.c (build_signature_table_constructor): Use the delta for
15307 the original basetype for this virtual function with thunks.
15308 (build_signature_method_call): We still need to adjust 'this'
15311 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
15313 * call.c (build_addr_func): New routine. Used to get the `real'
15314 address of a function or a method. Needed to avoid getting a
15315 pointer-to-member function.
15316 (build_call): New routine to build CALL_EXPRs.
15317 (build_method_call): Use it.
15318 * cvt.c (convert_to_aggr): Likewise.
15319 * typeck.c (build_function_call_real): Likewise.
15320 * sig.c (build_signature_table_constructor): Use build_addr_func.
15321 * cp-tree.h (build_call, build_addr_func): Declare them.
15323 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
15325 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
15326 * parse.y: Remove uses of LOOKUP_AGGR.
15328 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
15330 * *.[chy]: Rename current_class_decl to current_class_ptr, and
15331 C_C_D to current_class_ref.
15333 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15335 * call.c (convert_harshness): Tighten up pointer conversions.
15337 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
15339 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
15340 (finish_file): Likewise.
15342 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
15344 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
15346 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
15349 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15351 * decl2.c: Turn on thunks by default where supported.
15353 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
15355 * cp-tree.h (build_overload_call_maybe): Removed.
15356 * call.c (build_overload_call_real): Invert meaning of last arg to
15357 be require_complete.
15358 (build_overload_call): Likewise.
15359 * typeck.c (build_x_function_call): Use build_overload_call_real
15360 instead of build_overload_call_maybe.
15362 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
15364 * decl2.c (finish_file): Don't try to emit functions that haven't
15367 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15369 * decl2.c (finish_vtable_vardecl): Oops.
15371 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
15372 Also store the bindings from previous_class_values.
15373 (pop_from_top_level): Restore them.
15375 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
15377 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
15378 symbol has been referenced.
15379 (finish_file): Re-join synthesis/vtable loop with inline emission
15380 loop, disable inlining when an inline is output.
15382 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
15384 * except.c (init_exception_processing): Setup saved_in_catch.
15385 (push_eh_cleanup): Reset __eh_in_catch.
15386 (expand_start_catch_block): Set __eh_in_catch.
15388 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
15390 * except.c (push_eh_cleanup): Add tracking for whether or not we
15391 have an active exception object.
15392 (expand_builtin_throw): Use it to make sure a rethrow without an
15393 exception object is caught.
15395 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15397 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
15400 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
15402 * decl2.c (finish_file): Also use sentries for vars with
15403 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
15406 * lex.c (handle_cp_pragma): Disable #pragma
15407 interface/implementation if SUPPORTS_ONE_ONLY > 1.
15409 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15411 * method.c (emit_thunk): Wrap default case in
15412 temporary/permanent_allocation.
15414 * method.c (make_thunk): Use DECL_ONE_ONLY.
15415 (emit_thunk): Call assemble_end_function.
15417 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
15419 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
15420 (import_export_decl): Likewise.
15421 (finish_prevtable_vardecl): Disable vtable hack if
15422 SUPPORTS_ONE_ONLY > 1.
15424 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
15426 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
15427 PREDECREMENT_EXPRs take two arguments, not one.
15429 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
15431 * class.c (build_vtable_entry): Don't build thunks for abstract
15434 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
15437 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
15439 * class.c (set_rtti_entry): Use size_zero_node.
15440 (build_vtable): Likewise.
15442 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
15444 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
15445 (prepare_fresh_vtable): Likewise.
15447 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
15449 * method.c (emit_thunk): Call mark_used on the target function.
15451 * call.c (build_method_call): Don't warn about pending templates.
15453 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
15455 * decl2.c (finish_file): Fix list walking logic.
15457 * typeck2.c (check_for_new_type): Only warn if -pedantic.
15459 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
15461 * class.c (finish_struct_1): Remove old code for
15462 dont_allow_type_definitions.
15463 * cp-tree.h: Likewise.
15464 * spew.c: Make sure cp-tree.h is included before parse.h, so the
15465 definition of flagged_type_tree is found before it is used.
15467 * parse.y: Added the ftype member to the type union, and changed a
15468 number of rules to use it instead of ttype. Added calls to
15469 check_for_new_type() as appropriate.
15470 * typeck2.c (check_for_new_type): New function for checking
15471 if a newly defined type appears in the specified tree.
15472 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
15473 for check_for_new_type().
15475 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
15477 * decl2.c (finish_file): Only use a sentry if the decl is public.
15479 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
15480 don't pass LOOKUP_ONLYCONVERTING.
15482 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
15484 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
15485 properly keeps track of const and volatile type modifiers.
15487 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15489 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
15490 * pt.c (comp_template_args): Use it.
15492 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
15493 assemble_external for artificial function decls.
15495 * decl.c (cp_finish_decl): Oops.
15497 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
15499 * decl2.c (import_export_decl): Put static data member templates
15500 into common storage, or make them weak, depending on whether they
15501 are dynamically or statically initialized.
15502 (get_sentry): New function.
15503 (finish_file): Do import_export_decl for static data members before
15504 building the init/fini functions. Don't init/fini a variable that's
15505 EXTERNAL. Use a sentry for variables in common. Fix mismatching
15506 push/pop_temp_slots.
15507 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
15508 expand_static_init thang.
15509 * method.c (get_id_2): New function.
15511 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
15513 * parse.y (empty_parms): Make sure we use C++-style prototypes
15514 when we're declaring member functions.
15516 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15518 * Makefile.in (CONFLICTS): 16 s/r conflicts.
15519 * parse.y (self_template_type): New nonterminal.
15521 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15523 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
15525 * parse.y (base_class.1): Allow 'typename foo::bar'.
15527 * lex.c (check_newline): Remove #pragma code that plays with the
15528 input stream, since we now deal with tokens. Clear nextchar when
15530 (handle_cp_pragma): Use real_yylex.
15531 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
15534 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
15536 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
15538 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15540 * parse.y: New token SELFNAME for potential constructor.
15541 * spew.c (yylex): Handle it.
15542 * lex.c (identifier_type): Produce it.
15544 * parse.y (complete_type_name): In :: case, don't push class binding.
15545 (complex_type_name): Likewise.
15547 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
15549 * typeck.c (build_reinterpret_cast): Handle pointer to member
15552 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15554 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
15556 (check_newline): Put the vtable/unit/implementation/interface pragma
15557 code into handle_cp_pragma, replacing it with a call.
15558 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
15559 args. Get the next token after handling the pragma token.
15561 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
15563 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
15564 (convert_to_pointer_force): Likewise.
15566 * init.c (build_new): Fix array new without -fcheck-new.
15568 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15570 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
15571 tree.c: Lose TYPE_NESTED_NAME.
15573 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
15576 * tree.def: Add VEC_INIT_EXPR.
15577 * expr.c (cplus_expand_expr): Handle it.
15578 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
15579 the extra file-scope symbol nastiness.
15581 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
15583 * method.c (make_thunk): Thunks are static.
15584 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
15586 * decl2.c (mark_vtable_entries): Emit thunks as needed.
15587 (finish_file): Don't emit them here.
15589 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
15591 * rtti.c (build_dynamic_cast): Handle null pointers.
15592 (ifnonnull): New function.
15594 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
15596 * call.c (build_method_call): Remember the original basetype we
15597 were called with. Give an error message instead of trying
15598 (incorrectly) to call a non-static member function through a
15599 non-inherited class.
15601 * search.c (expand_upcast_fixups): Mark the new fixup as
15604 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15606 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
15608 * class.c (set_rtti_entry): Fix for thunks.
15610 * decl2.c (import_export_decl): Still emit typeinfo fns for
15611 cv-variants of builtin types.
15613 * rtti.c (expand_class_desc): Set up base_info_type_node here.
15614 (init_rtti_processing): Instead of here.
15616 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15618 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
15619 (build_typeid): Only complain about taking dynamic typeid without
15622 * decl2.c: flag_rtti defaults to 1.
15624 * rtti.c (get_tinfo_var): The general class case is now smaller.
15625 (init_rtti_processing): Pack the latter three fields of base_info
15628 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
15630 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
15632 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
15634 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
15635 (push_memoized_context): Split out code to undefer pop_type_level to
15636 (clear_memoized_cache): here.
15637 (pop_memoized_context): We can only handle one layer of deferral of
15638 pop_type_level so clear the cache, if there was a previous level.
15640 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15642 * rtti.c (init_rtti_processing): Build up base_info_type_node.
15643 (expand_class_desc): Use one pointer to an array of base_info
15644 structs, passed using a CONSTRUCTOR.
15646 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
15648 * class.c (build_vbase_path): Remove block extern for
15649 flag_assume_nonnull_objects here.
15650 (build_vfn_ref): Split out functionality into build_vtbl_ref.
15651 (build_vtbl_ref): New routine.
15652 (build_vtable): Set up rtti info here.
15653 (add_virtual_function): Note in CLASSTYPE_RTTI the best
15654 place where we can get the rtti pointers from to avoid having to
15655 search around for a place.
15656 (finish_base_struct): Likewise.
15657 (finish_struct_1): Likewise. Never create totally new vtables
15658 with totally new vtable pointers for rtti. Disable code to layout
15659 vtable pointers better until we want to break binary
15661 * rtti.c (build_headof_sub): New routine to convert down to a
15662 sub-object that has an rtti pointer in the vtable.
15663 (build_headof): Use it. Also, use build_vtbl_ref now to be more
15665 (build_dynamic_cast): Make sure we have saved it, if we need to.
15666 * search.c (dfs_init_vbase_pointers): Disable code that deals with
15667 a more efficient vtable layout, enable later.
15668 * call.c (flag_assume_nonnull_objects): Moved declaration to
15669 * cp-tree.h: here. Declare build_vtbl_ref.
15670 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
15671 function calls that want a tree.
15673 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
15675 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
15676 other X subobjects in the most derived type. Ack.
15678 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
15679 get_typeid will do it for us.
15680 (get_typeid_1): Break out call-building for expand_*_desc to use.
15681 (get_typeid): Call it.
15682 (expand_*_desc): Likewise.
15683 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
15685 (init_decl_processing): Lose builtin_type_tdescs lossage.
15686 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
15688 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
15690 * pt.c (tsubst): When calling set_nested_typename, use
15691 TYPE_NESTED_NAME (current_class_type) instead of
15692 current_class_name.
15694 * decl.c (pushdecl): Likewise.
15695 (pushdecl_class_level): Likewise.
15696 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
15697 set_nested_typename.
15699 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
15701 * rtti.c (synthesize_tinfo_fn): Handle arrays.
15703 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
15705 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
15707 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
15708 (init_rtti_processing): Lose bad_cast_type.
15709 (build_dynamic_cast): Use throw_bad_cast.
15711 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
15713 * decl2.c (finish_file): Don't synthesize artificial functions
15714 that are external and not inline.
15716 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
15718 * decl2.c (finish_file): Handle having new inlines added to
15719 saved_inlines by synthesis.
15721 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
15723 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15725 RTTI rewrite to initialize nodes as needed, not require that
15726 users #include <typeinfo>, complete functionality and reduce wasted
15728 * rtti.c (init_rtti_processing): New fn.
15729 (build_typeid): The vtable entry is now a function.
15730 (get_tinfo_var): New fn.
15731 (get_tinfo_fn): Likewise.
15732 (get_typeid): Use it.
15733 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
15734 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
15736 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
15737 (synthesize_tinfo_fn): New fn.
15738 * method.c (build_t_desc_overload): Lose.
15739 (build_overload_with_type): More generic.
15740 * decl.c (init_decl_processing): Call init_rtti_processing.
15741 * class.c (set_rtti_entry): Use get_tinfo_fn.
15742 * decl2.c (mark_vtable_entries): Mark the rtti function.
15743 (finish_prevtable_vardecl): Don't build_t_desc.
15744 (import_export_decl): Handle tinfo functions.
15745 (finish_file): Likewise.
15746 * typeck.c (inline_conversion): New fn.
15747 (build_function_call_real): Use it.
15748 * cp-tree.h: Add decls.
15750 * method.c (hack_identifier): Also convert component_refs from
15753 * lex.c (cons_up_default_function): Use the type, not the name, in
15756 * decl2.c (import_export_vtable): Fix weak vtables.
15758 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
15760 * search.c (get_base_distance_recursive): Fix access checks for
15763 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15765 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
15767 (convert_harshness): Add prototypes wrapped by PROTO.
15768 * decl2.c (grok_function_init): Likewise.
15769 (do_toplevel_using_decl): Change to void return type.
15770 * class.c (build_vtable_entry): Remove decl of make_thunk.
15771 (merge_overrides): Fix order of arg definitions.
15772 (finish_vtbls): Likewise.
15773 (fixup_vtable_deltas): Likewise.
15774 (modify_all_direct_vtables): Likewise.
15775 (modify_all_indirect_vtables): Likewise.
15776 * search.c (get_base_distance_recursive): Likewise.
15777 (get_abstract_virtuals_1): Likewise.
15778 (fixup_virtual_upcast_offsets): Likewise.
15779 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
15780 * init.c (perform_member_init): Fix order of arg definitions.
15781 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
15782 * cp-tree.h (make_thunk): Add decl.
15783 (overload_template_name, push_template_decl): Add decls.
15784 (do_toplevel_using_decl): Change to void return type.
15785 (vec_binfo_member): Add decl.
15787 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15789 * typeck.c (mark_addressable, convert_for_assignment,
15790 convert_for_initialization, pointer_int_sum, pointer_diff,
15791 unary_complex_lvalue): Add prototypes wrapped by PROTO.
15792 (convert_sequence): #if 0 fn decl, since definition also is.
15794 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
15796 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
15797 cast to pointer types for type searching.
15799 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15801 * typeck.c (get_delta_difference): Use cp_error, not error, in the
15802 case where BINFO == 0.
15804 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
15806 * call.c (build_method_call): Fix wording of error messages so
15807 constructors come out right.
15809 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
15811 * decl.c (push_overloaded_decl): Don't warn about hidden
15812 constructors when both the type and the function are declared
15813 in a system header file.
15815 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
15817 * class.c (finish_struct_1): Propagate the TYPE_PACKED
15818 flag for the type to the type's fields.
15820 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15822 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
15824 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
15826 * class.c (base_info, finish_base_struct): Replace
15827 needs_virtual_dtor with base_has_virtual.
15829 (finish_struct_1): Remove the old code that tried to make default
15830 destructors virtual. Use base_has_virtual when checking if we need
15831 to add a vtable entry for the rtti code.
15833 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15835 * pt.c (push_template_decl): Complain about template decl with
15836 inappropriate declaration.
15838 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
15840 * typeck.c (build_x_unary_op): Remove bogus check for taking
15841 the address of a member function.
15843 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
15845 * parse.y (constructor_declarator): Only push the class if
15846 we are not already in the class.
15848 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
15850 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
15851 Add additional argument to INIT_CUMULATIVE_ARGS.
15853 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
15855 * decl.c (shadow_tag): Fix error about anon union with methods.
15857 * parse.y (self_reference): Only generate a self-reference if this
15858 is a non-template class.
15859 (opt.component_decl_list): Only use it if it was generated.
15861 * parse.y (component_decl_1): Use constructor_declarator.
15862 (fn.def2): Likewise.
15863 (notype_component_declarator0): Likewise.
15865 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
15867 * typeck.c (build_x_unary_op): Add checks for taking the address
15868 of a TARGET_EXPR or of a member function, and give appropriate
15871 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
15873 * pt.c (process_template_parm): Allow template type parms to be
15874 used as types for template const parms.
15876 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
15878 * init.c (expand_vec_init): Ensure the eh cleanups are on the
15881 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15883 * decl.c (lookup_name_real): Be even more picky about the
15884 ambiguous lookup warning.
15885 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
15886 * parse.y (constructor_declarator): Rather than here.
15888 * parse.y (constructor_declarator): New nonterminal.
15890 (explicit_instantiation): Likewise.
15892 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15894 Add implicit declaration of class name at class scope.
15895 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
15896 * parse.y (self_reference): New nonterminal.
15897 (opt.component_decl_list): Use it.
15898 (fn.def1): Add nested_name_specifier type_name cases.
15899 * class.c (build_self_reference): New function.
15900 (finish_struct): Handle access_default later, move self-reference
15902 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
15903 * cp-tree.h: Adjust.
15905 * pt.c (do_function_instantiation): Separate handling of member
15906 functions and non-member functions properly.
15908 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15910 * pt.c (process_template_parm): Improve error for 'volatile class K'.
15912 * class.c (finish_struct_1): Check the right slot for destructors.
15914 * decl.c (start_enum): Complain about enum templates.
15916 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
15918 * init.c (resolve_offset_ref): Offset pointers to member data by one.
15919 * typeck.c (unary_complex_lvalue): Likewise.
15921 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
15923 * typeck.c (c_expand_return): Check for a returned local
15924 array name, similar to the check for an ADDR_EXPR.
15926 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
15928 * decl.c (cp_finish_decl): Don't build cleanups for static
15931 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
15933 * typeck.c (build_modify_expr): Fix error messages to be more
15935 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
15936 assignment operators.
15937 * error.c (assop_as_string): Likewise. Add support for `%Q' for
15938 assignment operators.
15940 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
15942 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
15943 give an error if initialized. pedwarn about nested type with the
15944 same name as its enclosing class.
15946 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
15948 * typeck.c (require_complete_type): Be sure to instantiate the
15949 MAIN_VARIANT of the type.
15951 * decl2.c (finish_file): Instantiate pending templates before
15952 processing static constructors and destructors.
15954 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
15957 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
15959 * decl2.c (delete_sanity): If error_mark_node is passed
15960 in as an expression, quit while we're ahead.
15962 * decl.c (grokdeclarator): Give an error message if `friend'
15963 is combined with any storage class specifiers.
15965 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
15967 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
15968 definition of nonexistent nested type.
15970 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
15971 not to say 'typedef'.
15973 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15975 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
15976 * search.c (dfs_walk, dfs_init_vbase_pointers,
15977 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
15978 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
15980 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
15982 * except.c (build_throw): Support minimal parse.
15983 * pt.c (tsubst_copy): Support THROW_EXPR.
15984 * decl2.c (build_expr_from_tree): Likewise.
15986 * pt.c (mangle_class_name_for_template): Always allocate
15989 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
15991 * cvt.c (cp_convert_to_pointer): Give an appropriate error
15992 when trying to cast from an incomplete type.
15994 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15996 * pt.c (instantiate_class_template): Don't bother setting up
15997 CLASSTYPE_TAGS explicitly, as the nested types will add
16000 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
16002 * decl.c (shadow_tag): Remove old error check for usage of
16003 an enum without a previous declaration.
16004 (xref_tag): Add error message about usage of enums without a
16005 previous declaration.
16007 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16009 * lex.c (do_identifier): Only do name consistency check if we're
16012 * pt.c (push_template_decl): Don't crash if we get a member defn
16013 that doesn't match.
16015 * decl.c (xref_tag_from_type): New function to do an xref without
16016 always having to figure out code_type_node.
16017 * cp-tree.h: Declare it.
16018 * pt.c (instantiate_class_template): Use it for friend classes.
16019 (lookup_template_class): Use it.
16021 * typeck2.c (build_functional_cast): Pull out a single parm before
16022 passing it to build_c_cast.
16024 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
16026 * expr.c (do_case): Give an error message if a pointer is
16027 given as a case value.
16029 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16031 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
16034 * lex.c (cons_up_default_function): Really, now, interface hackery
16035 does not apply to synthesized methods.
16037 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
16039 * call.c (build_method_call): Ctors and dtors now have special names
16040 with respect to lookups.
16041 * class.c (add_method): Likewise.
16042 (grow_method): Likewise.
16043 (finish_struct_methods): Likewise.
16044 (warn_hidden): Likewise.
16045 (finish_struct_1): Likewise.
16046 * cvt.c (convert_to_reference): Likewise.
16047 (convert_to_aggr): Likewise.
16048 (cp_convert): Likewise.
16049 * decl2.c (check_classfn): Likewise.
16050 * init.c (expand_member_init): Likewise.
16051 (expand_default_init): Likewise.
16052 (expand_aggr_init_1): Likewise.
16053 (build_offset_ref): Likewise.
16054 (build_new): Likewise.
16055 (build_delete): Likewise.
16056 * lex.c (do_inline_function_hair): Likewise.
16057 * search.c (lookup_field_1): Likewise.
16058 (lookup_fnfields_here): Likewise.
16059 (lookup_field): Likewise.
16060 (lookup_fnfields): Likewise.
16061 (get_virtual_destructor): Likewise.
16062 (dfs_debug_mark): Likewise.
16063 (dfs_pushdecls): Likewise.
16064 (dfs_compress_decls): Likewise.
16065 * tree.c (layout_basetypes): Likewise.
16066 * typeck.c (build_component_ref): Likewise.
16067 (build_x_function_call): Likewise.
16068 (build_modify_expr): Likewise.
16069 (convert_for_initialization): Likewise.
16070 (build_functional_cast): Likewise.
16071 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
16074 * decl.c (ctor_identifier): New.
16075 (dtor_identifier): New.
16076 (init_decl_processing): Set them.
16078 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
16080 * typeck.c (build_component_ref): Don't get confused by fields whose
16081 context has no type name, like pointer to member functions.
16083 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
16085 * decl.c (grokdeclarator): Handle typedef without declarator.
16087 * pt.c (tsubst): Handle SCOPE_REF in declarator.
16089 * parse.y (bad_parm): Catch another case of missing `typename'.
16091 * lex.c (yyprint): Handle TYPE_DECLs.
16093 * decl.c (start_function): Don't try to be clever.
16095 * lex.c: Lose compiler_error_with_decl.
16096 * typeck2.c: Lose error_with_aggr_type.
16097 (incomplete_type_error): Use cp_* instead of old functions.
16098 (readonly_error): Likewise.
16099 * typeck.c (convert_arguments): Likewise.
16100 * search.c (lookup_nested_field): Likewise.
16101 * method.c (make_thunk): Likewise.
16102 * decl.c (grokparms): Likewise.
16103 * cp-tree.h: Update.
16105 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
16108 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
16110 * method.c (build_opfncall): When deleting a pointer to an
16111 array, build a new pointer to the tree past any ARRAY_TYPE
16114 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16116 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
16118 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16120 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
16123 * decl.c (finish_function): Don't set nested based on
16124 hack_decl_function_context.
16125 * parse.y (function_try_block): Check for nested function.
16126 (pending_inlines): Likewise.
16128 * decl2.c (build_expr_from_tree): If a unary op already has a
16129 type, just return it.
16131 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
16133 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
16134 (finish_file): Check the return value of walk_vtables.
16135 (finish_prevtable_vardecl): Return int.
16136 (finish_vtable_vardecl): Likewise.
16137 (prune_vtable_vardecl): Likewise.
16138 * lex.c (set_vardecl_interface_info): Likewise.
16139 * cp-tree.h: Adjust return types.
16141 * class.c (delete_duplicate_fields_1): Don't complain about
16142 duplicate nested types if they're the same type.
16143 (finish_struct): Remove check for duplicate.
16144 * decl2.c (grokfield): Don't check for typedef of anonymous type.
16146 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16148 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
16150 * decl.c (grokdeclarator): Lose special handling of class-level
16151 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
16152 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
16154 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
16156 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
16158 * search.c (compute_access): Fix handling of anonymous union
16160 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
16161 from anonymous unions to their members.
16163 * typeck.c (build_x_function_call): For static member functions,
16164 hand off to build_member_call.
16166 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
16168 * typeck.c (build_component_ref): Handle OFFSET_REFs.
16170 * init.c (expand_vec_init): Fix init == 0 case.
16172 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
16174 * init.c (build_new): pedwarn about init and array new.
16175 (expand_vec_init): Handle lists, use convert_for_initialization.
16177 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
16178 when converting to an aggregate type.
16179 * cvt.c (cp_convert): Pass it through.
16181 * typeck.c (build_conditional_expr): Handle user-defined
16182 conversions to slightly different types.
16184 * decl.c (grokdeclarator): Force an array type in a parm to be
16187 * decl2.c (do_using_directive): Sorry.
16188 (do_namespace_alias): Likewise.
16189 * lex.c (real_yylex): Warn about using the `namespace' keyword.
16191 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16193 * parse.y (datadef): Move call to note_list_got_semicolon up.
16195 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
16197 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
16199 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
16201 * decl.c (cp_finish_decl): The exception regions have to be
16202 nested, not overlapping. We start the exception region for a
16203 decl, after it has been fully built, and all temporaries for it
16204 have been cleaned up.
16206 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
16208 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
16210 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
16212 * tree.def: Add RETURN_INIT.
16213 * pt.c (instantiate_decl): Handle RETURN_INIT.
16214 * decl.c (store_return_init): Handle minimal_parse_mode.
16216 * tree.c (cp_build_type_variant): Just return an error_mark_node.
16217 * decl.c (make_typename_type): Don't try to get the file and line
16219 * typeck.c (comptypes): Handle TYPENAME_TYPE.
16221 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
16223 * decl.c (poplevel): Make sure we clear out and restore old local
16224 non-VAR_DECL values by default when they go out of scope.
16226 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16228 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
16229 referring to addresses of variables and functions.
16231 * error.c (dump_expr): Support SIZEOF_EXPR.
16233 * init.c (do_friend): Use the return value of check_classfn.
16235 * typeck.c (convert_arguments): Call complete_type.
16237 * method.c (hack_identifier): After giving an error, set value to
16240 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
16242 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
16243 lossage for local classes.
16244 * cp-tree.h: Declare it.
16245 * decl.c (lookup_name_real): Evil, painful hack for local classes.
16246 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
16247 Use hack_decl_function_context.
16248 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
16249 (start_function): Use hack_decl_function_context.
16250 (finish_function): Likewise.
16251 * method.c (synthesize_method): Likewise.
16252 * lex.c (process_next_inline): Likewise.
16253 (do_pending_inlines): Likewise.
16254 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
16257 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
16259 * sig.c (build_signature_pointer_or_reference_type): Align
16260 signature pointers/references on 8-byte boundaries so they can be
16261 grabbed 2 words at a time on a Sparc.
16263 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
16265 * method.c (hack_identifier): Requiring a static chain is now a
16267 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
16270 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16272 * init.c (build_offset_ref): Call complete_type.
16274 * decl.c (pop_from_top_level): Always pop previous_class_type.
16276 * parse.y: Handle multiple decls in a for-init-statement.
16277 * pt.c (tsubst_expr): Likewise.
16279 * pt.c (tsubst): Use tsubst_expr for the second operand of an
16282 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
16283 (poplevel_class): Set it here.
16284 (pop_from_top_level): Pop it here if we're returning to class scope.
16285 * class.c (pushclass): Don't set it here.
16287 * decl.c (maybe_push_to_top_level): Save current_template_parms,
16288 and clear it if !pseudo.
16289 (pop_from_top_level): Restore it.
16291 * decl2.c (finish_file): Push the dummy each time we walk the list
16294 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
16295 something for CAST_EXPR.
16297 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
16299 * cvt.c (cp_convert): Warn about implicit conversion of the
16300 address of a function to bool, as it is always true.
16302 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
16304 * typeck.c (c_expand_return): Fix warning for local externs returned.
16306 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
16308 * tree.c (mapcar): Propagate const and volatile properly.
16310 * typeck.c (complete_type): Be sure to instantiate the
16311 MAIN_VARIANT of the type.
16313 * method.c (synthesize_method): Class interface hackery does not
16314 apply to synthesized methods.
16316 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16318 * pt.c (comp_template_args): Use comptypes rather than just
16319 checking for TEMPLATE_TYPE_PARM equivalence.
16321 * typeck.c (build_x_function_call): Call complete_type before
16322 checking TYPE_OVERLOADS_CALL_EXPR.
16324 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
16326 * g++.c (main): Check also for new define ALT_LIBM.
16328 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16330 * pt.c (instantiate_class_template): If we don't have a pattern
16332 (coerce_template_parms): If we see a local class, bail.
16334 * decl.c (grok_reference_init): Make sure there's a type before
16337 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
16338 (push_template_decl): Likewise.
16340 * parse.y (named_class_head): Set
16341 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
16343 * decl.c (xref_tag): Diagnose redeclaration of template
16344 type-parameter name.
16346 * error.c (dump_type): Handle anonymous template type parms.
16348 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
16350 (coerce_template_parms): Likewise.
16352 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
16354 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
16355 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
16357 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
16359 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
16360 before trying to get its STUB_DECL.
16361 (coerce_template_parms): Likewise.
16363 * parse.y (template_type_parm): If they didn't use 'class',
16364 pretend they did after giving an error.
16366 * pt.c (coerce_template_parms): Diagnose use of local class.
16368 * decl.c (grok_reference_init): Use instantiate_type.
16370 * error.c (dump_expr): Handle TEMPLATE_DECLs.
16372 * parse.y (named_class_head): Diagnose mismatching types and tags.
16374 * decl.c (pushdecl): Type decls and class templates clash with
16375 artificial type decls, not hide them.
16377 * decl.c (redeclaration_error_message): Diagnose redefinition of
16378 templates properly.
16379 (duplicate_decls): Diagnose disallowed overloads for template
16382 * decl.c (start_decl): Call complete_type before checking for a
16385 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
16387 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
16389 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16391 * decl.c (grok_op_properties): Don't check for operator++(int) in
16394 * tree.c (perm_manip): Return a copy of variable and function
16395 decls with external linkage.
16397 * tree.def: Change some of the min tree codes to type "1".
16398 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
16399 * method.c (build_overload_int): Emit something arbitrary for
16400 anything but an INTEGER_CST if we're in a template.
16402 * decl.c (cp_finish_decl): Call complete_type before deciding
16403 whether or not to lay out the decl.
16405 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
16407 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
16409 * typeck2.c (build_x_arrow): Call complete_type.
16411 * pt.c (add_pending_template): Broken out.
16412 (lookup_template_class): If -fexternal-templates, call it for all
16413 the methods of implemented types.
16414 (instantiate_class_template): Instead of instantiating them here.
16415 (instantiate_decl): Handle -fexternal-templates earlier.
16417 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16419 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
16420 memoized lookup stuff inside GATHER_STATISTICS.
16422 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
16424 * decl.c (start_decl): Complain about array of incomplete type
16426 (grokdeclarator): Not here.
16428 * parse.y (template_parm): Expand full_parm inline so we can set
16429 the rule's precedence.
16431 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
16432 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
16433 * decl2.c (grokbitfield): Don't check for integer constant here.
16434 * class.c (finish_struct_1): Check here.
16436 * decl.c (define_label): Make the min decl go on permanent_obstack.
16438 * pt.c (unify): Don't handle CONST_DECLs.
16439 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
16440 (tsubst_copy): Likewise.
16442 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
16443 CONST_DECL for a template parm.
16445 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
16447 * decl.c (grokdeclarator): Complain about array of incomplete type
16449 (start_decl_1): Not here.
16451 * pt.c (tsubst): Handle pointer-to-function declarators.
16453 * method.c (hack_identifier): If pedantic, diagnose local class
16454 methods that require a static chain.
16456 * decl.c (grok_op_properties): No longer static.
16457 * cp-tree.h: Declare it.
16458 * pt.c (tsubst): Call it for operators.
16459 Use tsubst_copy for TREE_VECs.
16461 * parse.y (template_arg): The expr has precedence like '>'.
16463 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
16465 * pt.c (coerce_template_parms): Don't coerce an expression using
16467 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
16468 (tsubst): Don't use build_index_2_type if the max_value uses template
16470 * method.c (build_overload_int): Emit something arbitrary for an
16471 expression using template parms.
16473 * parse.y (template_close_bracket): New non-terminal to catch use
16474 of '>>' instead of '> >' in template class names.
16475 (template_type): Use it.
16476 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
16478 * tree.def: Add CAST_EXPR.
16479 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
16480 CONVERT_EXPR for minimal_parse_mode.
16481 * typeck.c (build_c_cast): Likewise.
16482 * pt.c (tsubst_copy): Likewise.
16483 * decl2.c (build_expr_from_tree): Likewise.
16484 * error.c (dump_expr): Likewise.
16486 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16488 * except.c (SetTerminate, SetUnexpected): Put back global vars.
16489 (init_exception_processing): Put back decl/init of
16490 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
16491 fns from libstdc++.
16493 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
16494 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
16496 * cp-tree.h (declare_uninstantiated_type_level,
16497 uninstantiated_type_level_p): Delete prototypes.
16499 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
16501 * pt.c (tsubst_expr): Add default return.
16503 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16505 * error.c (fndecl_as_string): Delete unused arg CNAME.
16506 * sig.c (build_signature_table_constructor,
16507 build_signature_method_call): Fix calls.
16509 * class.c (the_null_vtable_entry): Delete var definition.
16510 (init_class_processing): Delete tree the_null_vtable_entry init.
16511 * decl.c (no_print_{functions, builtins}): Declare as static.
16512 (__tp_desc_type_node): #if 0 var definition.
16513 (init_type_desc): #if 0 init of __tp_desc_type_node.
16514 (vb_off_identifier): Move var decl into init_decl_processing.
16515 (current_function_assigns_this): Declare as static.
16516 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
16517 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
16518 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
16519 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
16520 * init.c (BI_header_type, BI_header_size): Declare as static.
16521 * pt.c (template_classes): Delete unused var.
16522 (add_pending_template): Delete decl for non-existent fn.
16523 (lookup_template_class): Delete vars CODE and TAG_CODE.
16524 (instantiate_template): Delete unused var TARGS.
16525 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
16527 (__tp_desc_type_node): #if 0 var decl.
16528 (fndecl_as_string): Fix prototype.
16530 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16532 * tree.def: Add GOTO_STMT.
16533 * pt.c (tsubst_expr): Support goto and labels.
16534 * decl.c (define_label): Support minimal parsing.
16535 * parse.y (simple_stmt): Likewise.
16537 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16539 * xref.c (GNU_xref_member): Only define/set var I if
16540 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
16542 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
16543 (GNU_xref_end): Fix call.
16544 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
16545 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
16547 * tree.c (build_exception_variant): Delete unused vars I, A, T,
16549 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
16550 (mapcar): Delete unused var CODE.
16551 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
16552 (break_out_cleanups): Fix call.
16553 (bot_manip): Likewise.
16554 * call.c (build_method_call): Likewise.
16555 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
16557 * typeck.c (unary_complex_lvalue, build_modify_expr,
16558 convert_for_initialization): Likewise.
16559 * typeck2.c (build_functional_cast): Likewise.
16560 * cp-tree.h (build_cplus_new): Fix prototype.
16562 * repo.c (open_repo_file): Delete unused var Q.
16563 (repo_compile_flags, repo_template_declared,
16564 repo_template_defined, repo_class_defined, repo_inline_used,
16565 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
16566 (repo_get_id, repo_vtable_used): Declare as static.
16567 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
16570 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16572 * parse.y (pending_inlines): Add function_try_block case.
16574 * pt.c (unify): Fix for template const parms.
16576 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16578 * lex.c (extract_interface_info): Delete forward decl.
16579 (default_copy_constructor_body, default_assign_ref_body): Delete
16580 decls for non-existent functions.
16581 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
16582 (init_lex): Delete setting them.
16583 (cons_up_default_function): Delete unused vars FUNC_BUF,
16584 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
16585 #if 0'd synth code.
16586 (toplevel, expression_obstack): Delete unused extern decls.
16587 (tree_node_kind): Delete unused enum.
16588 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
16590 (tree_node_kind_names): Delete unused extern decl.
16591 (synth_obstack): Delete unused var.
16592 (init_lex): Don't set it.
16593 (init_parse): Add decl before use.
16594 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
16595 (current_unit_{name, language}): Delete unused vars.
16596 (check_newline): Don't bother setting them, just accept the #pragma.
16597 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
16598 (current_unit_{name, language}): Delete decls.
16600 * search.c: Wrap all of the memoized functions, macros, and
16601 variables inside #ifdef GATHER_STATISTICS.
16602 (lookup_field, lookup_fnfields): Likewise.
16603 (init_search_processing): Likewise.
16604 (reinit_search_statistics): Wrap whole function.
16605 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
16607 * decl.c (finish_function): Only call pop_memoized_context if
16608 GATHER_STATISTICS is defined.
16609 (start_function): Likewise for push_memoized_context.
16610 * class.c (pushclass, popclass): Likewise.
16612 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
16613 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
16615 * cvt.c (cp_convert): Delete unused local var FORM.
16616 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
16619 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16621 * pt.c (do_poplevel): Oops; really return what we get from
16622 poplevel this time.
16624 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16626 * cp-tree.h (is_aggr_type): Add prototype.
16628 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
16629 * method.c ({push,pop}_cp_function_context): Delete decls.
16630 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
16631 (SetUnexpected, SetTerminate): Delete unused vars.
16632 (init_exception_processing): Don't set SetUnexpected or
16633 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
16634 (output_exception_table_entry): Delete unused array LABEL.
16635 (expand_internal_throw): Delete unused var PARAMS.
16636 (expand_start_catch_block): Delete unused var CLEANUP.
16637 (emit_exception_table): Delete unused var EH_NODE_DECL.
16638 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
16639 GOTO_UNWIND_AND_THROW. Don't set them.
16640 (end_eh_unwinder): Add top decl.
16641 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
16642 (exception_section, push_rtl_perm, do_function_call,
16643 lang_interim_eh, push_eh_cleanup, eh_outer_context,
16644 expand_end_eh_spec, end_eh_unwinder): Declare as static.
16645 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
16646 throw_used): Likewise.
16647 * cp-tree.h (expand_end_eh_spec): Delete prototype.
16649 * search.c (dfs_mark, dfs_mark_vtable_path,
16650 dfs_unmark_vtable_path, dfs_mark_new_vtable,
16651 dfs_unmark_new_vtable, dfs_clear_search_slot,
16652 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
16653 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
16654 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
16656 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
16657 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
16658 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
16659 Only define #ifdef GATHER_STATISTICS.
16660 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
16662 (vbase_decl): Delete var definition.
16663 (init_search): Delete old decl.
16664 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
16665 never actually used.
16666 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
16667 (get_base_distance_recursive): Delete unused fourth arg
16668 BASETYPE_PATH. Fix call .
16669 (get_base_distance): Fix call.
16670 (push_class_decls): Delete unused var ID.
16671 (make_memoized_table_entry): Declare as static.
16672 (breadth_first_search): Declare as static.
16673 (tree_has_any_destructor_p): Declare as static.
16674 (pop_class_decls): Delete unused arg pop_class_decls.
16675 * class.c (popclass): Fix call to pop_class_decls.
16676 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
16677 tree_has_any_destructor_p): Delete prototypes.
16679 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
16680 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
16681 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
16682 (build_user_desc): Delete unused var T.
16683 (build_class_desc): Delete unused vars T and OFF.
16684 (build_t_desc): Delete unused var NAME_STRING.
16685 (build_headof): Make static.
16686 (get_bad_cast_node): Likewise.
16687 (get_def_to_follow): Likewise.
16688 * cp-tree.h (init_type_desc): Add prototype.
16689 (build_headof): Remove prototype.
16691 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16693 * pt.c (tsubst): Only look for matching decls at file scope for
16694 non-member functions.
16696 * call.c (build_scoped_method_call): Handle scoped destructor
16697 calls in templates.
16699 * decl.c (*_top_level): Also save previous_class_values.
16701 * pt.c (tsubst_expr): Support do {} while loops.
16702 * parse.y (simple_stmt): Likewise.
16703 * tree.def: Likewise.
16705 * method.c (build_overload_identifier): For a class nested in a
16706 template class, don't mangle in the template parms from our
16709 * lex.c, cp-tree.h: Remove support for template instantiations in
16710 the pending_inlines code.
16711 * pt.c: Remove dead functions and unused arguments.
16712 (uses_template_parms): TYPENAME_TYPEs always use template parms.
16713 * parse.y: Stop passing anything to end_template_decl.
16714 * tree.c (print_lang_statistics): Only print tinst info #ifdef
16717 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16719 * init.c (expand_recursive_init{,_1}): Delete decls.
16720 (sort_member_init): Delete unused var INIT.
16721 (emit_base_init): Delete unused var X.
16722 (build_offset_ref): Delete unused var CNAME.
16723 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
16724 (emit_base_init): Delete unused local var BASE. Delete extern
16725 decl of IN_CHARGE_IDENTIFIER.
16726 (build_delete): Delete unused local var VIRTUAL_SIZE.
16728 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
16729 (build_delete): Fix call.
16730 * decl2.c (delete_sanity): Likewise.
16731 * cp-tree.h (build_vec_delete): Update prototype.
16733 * typeck.c (common_base_type): Delete unused var TMP.
16734 (build_binary_op): Delete local var ARGS_SAVE.
16735 (build_array_ref): Delete unused var ITYPE.
16736 (c_expand_return): Delete unused var USE_TEMP.
16738 * typeck.c (compexcepttypes): Delete unused arg STRICT.
16739 (comptypes): Fix calls.
16740 * decl.c (duplicate_decls): Likewise.
16741 * cp-tree.h (compexcepttypes): Delete extra arg.
16743 * decl2.c (check_classfn): Delete unused second arg CNAME.
16744 * decl.c (start_decl, grokfndecl): Fix calls.
16745 * init.c (do_friend): Likewise.
16746 * cp-tree.h (check_classfn): Update prototype.
16748 * cp-tree.h (signature_error, import_export_vtable,
16749 append_signature_fields, id_in_current_class, mark_used,
16750 copy_assignment_arg_p): Add decls.
16751 * decl2.c (mark_used): Delete decl.
16753 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
16755 * class.c (get_vtable_entry): Disable unused function.
16756 (doing_hard_virtuals): Delete unused static global var.
16757 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
16758 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
16759 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
16760 (modify_one_vtable): Delete unused var OLD_RTTI.
16761 (finish_struct_anon): Delete unused vars OFFSET and X.
16762 (finish_struct_bits): Delete unused var METHOD_VEC.
16763 (get_basefndecls): Delete unused var PURPOSE. Delete unused
16764 for-scope local variable METHODS.
16766 * call.c (user_harshness): Delete unused/unneeded arg PARM.
16767 (ideal_candidate): Delete unused args BASETYPE and PARMS.
16768 (build_method_call): Delete unused args passed into ideal_candidate.
16769 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
16770 * cp-tree.h (synthesize_method): Add decl.
16772 * decl.c (note_level_for_for): Give void return type.
16773 (pushdecl_nonclass_level): Likewise.
16774 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
16775 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
16776 (suspend_binding_level): Delete unused var LEVEL.
16777 (duplicate_decls): Delete unused var CTYPE.
16778 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
16779 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
16781 (grokdeclarator): Delete unused var C.
16782 (grokdeclarator): Delete unused var SIZE_VARIES.
16783 (grokparms): Delete unused var SAW_VOID.
16784 (start_function): Delete unused var OLDDECL.
16785 (cplus_expand_expr_stmt): Delete unused var
16786 REMOVE_IMPLICIT_IMMEDIATELY.
16788 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
16790 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
16792 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
16794 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
16795 (build_min_nt): Likewise.
16796 * pt.c (do_pushlevel): Emit line note.
16797 (do_poplevel): Return what we get from poplevel.
16798 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
16799 * parse.y: Use do_pushlevel and do_poplevel.
16800 * cp-tree.h: Declare do_poplevel.
16802 * cp-tree.h: Declare at_eof.
16803 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
16804 * decl2.c (import_export_decl): Renamed from import_export_inline.
16805 (finish_file): Call it to do interface handling for statics.
16806 * pt.c (tsubst_copy): Call mark_used on variables and functions
16809 * decl2.c (finish_file): Don't emit statics we can't generate.
16810 * pt.c (instantiate_decl): Don't set interface on instantiations
16813 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
16814 * tree.c (print_lang_statistics): Print max template depth.
16815 * pt.c (push_tinst_level): Dump entire instantiation context.
16816 (instantiate_class_template): Use it and pop_tinst_level.
16817 (instantiate_decl): Likewise.
16819 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
16820 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
16822 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
16824 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
16825 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
16826 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
16827 the new template implementation.
16829 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16831 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
16833 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
16835 * decl.c (cp_finish_decl): Delay emitting the debug information for
16836 a typedef that has been installed as the canonical typedef, if the
16837 type has not yet been defined.
16839 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
16841 * decl2.c (grokfield): Still call pop_nested_class for access decls.
16843 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16845 * decl.c (lookup_label): Call label_rtx.
16847 * decl.c (make_binding_level): New function.
16848 (pushlevel, pushlevel_class): Call it instead of explicit
16849 duplicate calls to xmalloc.
16851 * decl.c (init_decl_processing): Delete useless build_pointer_type
16854 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
16855 (sizet_ftype_string): Delete variable.
16856 (init_decl_processing): Add built-in functions fabsf, fabsl,
16857 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
16858 variable strlen_ftype, used for strlen.
16860 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
16862 * decl.c (push_to_top_level): Start from current_binding_level
16863 again for now; the stl hacks depend on g++ being broken in this
16864 way, and it'll be fixed in the template rewrite.
16866 * tree.def: Add USING_DECL.
16867 * decl2.c (do_class_using_decl): Implement.
16868 (grokfield): Pass access decls off to do_class_using_decl instead of
16870 * error.c (dump_decl): Handle USING_DECLs.
16871 * decl.c (grokdeclarator): Remove code for handling access decls.
16872 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
16873 as access decls for now.
16874 (finish_struct): Don't check USING_DECLs for other uses of the name.
16876 * search.c (get_matching_virtual): Use cp_error_at.
16878 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16880 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
16882 (self_promoting_args_p): Move the check that TYPE is non-nil
16883 before trying to look at its main variant.
16884 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
16886 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
16888 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
16889 (do_friend): Delete call to xref_friend.
16890 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
16892 * typeck.c (convert_sequence): #if 0 unused function.
16894 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
16895 be in decl_in_memory_p.
16896 (decl_in_memory_p): Delete decl.
16897 * expr.c (decl_in_memory_p): Delete fn.
16898 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
16900 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
16902 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
16904 * class.c (finish_struct_1): Check for a pure-specifier on a
16905 non-virtual function here.
16907 * decl2.c (grok_function_init): Don't check whether the function
16909 (grokfield): Don't call check_for_override here.
16911 * decl.c (push_to_top_level): Start from inner_binding_level,
16912 check class_shadowed in class levels.
16914 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
16916 * decl.c (resume_level): Ignore things that don't have names, instead
16919 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16921 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
16923 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
16925 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
16928 * parse.y (complete_type_name): Bind global_scope earlier.
16929 (complex_type_name): Likewise.
16930 (qualified_type_name): Remove.
16932 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
16934 * decl.c (grokfndecl): Move code that looks for virtuals in base
16936 * class.c (check_for_override): ... to a new function.
16937 (finish_struct_1): Call it.
16939 * cp-tree.h: Declare warn_sign_compare.
16941 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
16942 rather than extra_warnings to decide whether to warn about
16943 comparison of signed and unsigned.
16945 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
16946 implies -Wsign-compare. -Wall doesn't imply -W.
16948 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
16950 * typeck.c (build_component_ref): Fix to handle anon unions in base
16953 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16955 * class.c (resolves_to_fixed_type_p): Delete code dealing with
16956 a WITH_CLEANUP_EXPR, since we don't generate them any more.
16957 * cvt.c (build_up_reference): Likewise.
16958 * decl.c (grok_reference_init): Likewise.
16959 (cp_finish_decl): Likewise.
16960 * error.c (dump_expr): Likewise.
16961 * tree.c (real_lvalue_p): Likewise.
16962 (lvalue_p): Likewise.
16963 (build_cplus_new): Likewise.
16964 (unsave_expr_now): Likewise.
16965 * typeck.c (unary_complex_lvalue, build_modify_expr,
16966 c_expand_return): Likewise.
16968 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16970 Make the C++ front-end pay attention to attributes for structures.
16971 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
16973 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
16974 Take out old round_up_size use and setting the DECL_ALIGN possibly
16975 using it. Take out setting of TYPE_ALIGN to round_up_size, which
16976 can override what the attribute set.
16977 * cp-tree.h (finish_struct): Update prototype.
16978 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
16979 attributes to finish_struct.
16980 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
16981 value down into finish_struct.
16982 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
16984 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
16986 * decl.c (poplevel): Re-word dead for local handling.
16987 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
16988 (cp_finish_decl): If is_for_scope, check for duplicates so
16989 we can disable is_for_scope. Otherwise, preserve_temp_slots.
16991 * lex.c (do_identifier): Use global binding in preference of
16992 dead for local variable.
16994 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
16996 * init.c (initializing_context): Handle anon union changes, the
16997 context where fields of anon unions can be initialized now has to be
16998 found by walking up the TYPE_CONTEXT chain.
17000 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
17002 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
17003 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
17004 (obscure_complex_init): If bss is supported, always set
17005 DECL_INITIAL to error_mark_node.
17007 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17009 * init.c (is_friend): Make sure there's a context before we see if
17012 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
17014 * init.c (is_friend): Classes are not friendly with nested classes.
17016 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
17018 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
17019 and record its result.
17021 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
17023 * class.c (finish_struct_anon): Switch around code to not move anon
17024 union elements around, nor mess up their contexts, nor offsets,
17025 instead we now build up the right number of COMPONENT_REFs for all
17026 the anon unions that may be present at build_component_ref time.
17027 * typeck.c (lookup_anon_field): New routine to handle field lookup
17028 on fields without names. We find them, based upon their unique type
17030 * typeck.c (build_component_ref): Allow FIELD_DECL components.
17031 Handle finding components in anonymous unions, and ensure that a
17032 COMPONENT_REF is built for each level as necessary.
17034 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
17036 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
17037 code that ensures that copy ctors are used if appropriate.
17039 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17041 * init.c (build_vec_delete): Only give an error if base isn't an
17044 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
17046 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
17047 (yylex): If we see `new', keep slurping.
17049 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
17051 * class.c (finish_struct_1): Move code for handling anon unions...
17052 (finish_struct_anon): to here. Fixup so that we do the offset
17053 calculations right, and so that the fields are physically moved to
17054 the containers's chain.
17056 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17058 * decl.c (grokdeclarator): Avoid trying to get an operand off an
17061 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
17063 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
17064 POINTER_SIZE to agree with expr.c.
17066 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
17068 * search.c (lookup_field): Don't report ambiguities if protect is 0,
17069 instead return NULL_TREE.
17071 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
17073 * class.c (finish_struct_1): Call warn_hidden if we want warnings
17074 about overloaded virtual functions.
17075 (warn_hidden): New routine to warn of virtual functions that are
17076 hidden by other virtual functions, that are not overridden.
17077 (get_basefndecls): New routine, used by warn_hidden.
17078 (mark_overriders): New routine, used by warn_hidden.
17079 * search.c (get_matching_virtual): Remove old warning that just
17082 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17084 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
17086 * typeck.c (null_ptr_cst_p): Delete unused fn.
17087 (build_function_call_maybe): Delete unused fn.
17089 * expr.c (extract_init): #if 0 the code after unconditional return 0
17092 Delete old cadillac code.
17093 * edsel.c: Remove file.
17094 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
17095 * Makefile.in (CXX_OBJS): Delete edsel.o.
17096 (edsel.o): Delete rule.
17097 * cp-tree.h (flag_cadillac): Delete var decl.
17098 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
17099 * decl2.c (flag_cadillac): Delete var definition.
17100 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
17101 (grokfield): Delete code depending on flag_cadillac.
17102 (finish_anon_union): Likewise.
17103 * class.c (finish_struct_1): Likewise.
17104 (pushclass): Likewise.
17105 (popclass): Likewise.
17106 (push_lang_context): Likewise.
17107 (pop_lang_context): Likewise.
17108 * decl.c (init_decl_processing): Likewise.
17109 (start_decl): Likewise.
17110 (cp_finish_decl): Likewise.
17111 (xref_tag): Likewise.
17112 (finish_enum): Likewise.
17113 (start_function): Likewise.
17114 (finish_function): Likewise.
17115 (finish_stmt): Likewise.
17116 * lex.c (lang_init): Likewise.
17117 (check_newline): Likewise.
17119 * lex.c (do_pending_inlines): Delete synthesized method kludge.
17121 Delete defunct, ancient garbage collection implementation.
17122 * rtti.c: New file with the RTTI stuff from gc.c.
17123 * gc.c: Removed file (moved the remaining stuff into rtti.c).
17124 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
17125 (rtti.o): New rule, replacing gc.o.
17126 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
17127 * cp-tree.h: Delete gc-related fn decls.
17128 (DECL_GC_OFFSET): Delete macro.
17129 (flag_gc): Delete extern decl.
17130 * decl.c (current_function_obstack_index): Delete var decl.
17131 (current_function_obstack_usage): Delete var decl.
17132 (start_function): Delete clearing of current_function_obstack_index
17133 and current_function_obstack_usage.
17134 (init_decl_processing): Delete code relying on -fgc.
17135 Delete call to init_gc_processing.
17136 (cp_finish_decl): Delete calls to build_static_gc_entry and
17137 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
17138 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
17139 and to expand_expr of a __gc_main call.
17140 (maybe_gc_cleanup): Delete var decl.
17141 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
17142 * decl2.c (flag_gc): Delete var decl.
17143 (lang_f_options): Delete offering of -fgc.
17144 (lang_decode_option): Delete -fgc and -fno-gc handling.
17145 (get_temp_regvar): Delete gc code.
17146 * init.c (build_new): Delete gc code.
17147 * lex.c (init_lex): Delete checking of flag_gc.
17149 * typeck.c (convert_arguments): Delete gc code.
17150 (build_component_addr): Delete -fgc warning.
17151 (build_modify_expr): Delete gc code.
17153 * decl2.c (build_push_scope): Delete fn.
17154 * cp-tree.h (build_push_scope): Delete decl.
17156 * search.c (clear_search_slots): Delete fn.
17157 * cp-tree.h (clear_search_slots): Delete decl.
17159 * search.c (tree_needs_constructor_p): Delete fn.
17160 * cp-tree.h (tree_needs_constructor_p): Delete decl.
17162 * tree.c (id_cmp): Delete fn.
17164 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
17165 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
17167 * tree.c (decl_value_member): Delete fn.
17168 * cp-tree.h (decl_value_member): Delete decl.
17170 * tree.c (list_hash_lookup_or_cons): Delete fn.
17171 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
17173 * method.c (cplus_exception_name): Delete fn.
17174 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
17176 * spew.c (shift_tokens): Delete fn.
17178 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17180 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
17182 * parse.y: Likewise.
17184 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17186 * tree.c (build_cplus_staticfn_type): Delete function definition;
17188 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
17190 * tree.c (virtual_member): Delete function definition; never used.
17191 * cp-tree.h (virtual_member): Delete decl.
17193 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
17195 * typeck.c (build_component_ref): Handle getting vbase pointers
17196 out of complex multiple inheritance better.
17198 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
17200 * typeck.c (build_object_ref): Make sure we use the real type, not
17201 any reference type.
17203 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
17205 * tree.c (build_exception_variant): Don't create new types if we
17206 don't have to, also build new types on the right obstack.
17208 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17210 * decl.c (store_bindings): Split out from push_to_top_level.
17211 (push_to_top_level): Call it for b->type_shadowed on class binding
17214 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
17216 * search.c (expand_upcast_fixups): Fix so that offsets stored in
17217 vbase_offsets are always right. Fixes a problem where virtual base
17218 upcasting and downcasting could be wrong during conversions on this
17219 during virtual function dispatch at ctor/dtor time when dynamic
17220 vtable fixups for deltas are needed. This only sounds easier than
17222 (fixup_virtual_upcast_offsets): Change to reflect new calling
17223 convention for expand_upcast_fixups.
17225 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17227 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
17228 check that it's usable as the bitfield width.
17230 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17232 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
17233 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
17234 only ever used for functions in it.
17236 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
17238 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
17239 (nested_type): Likewise.
17240 (nested_name_specifier): Use lastiddecl.
17242 * decl.c (grokdeclarator): Adjust accordingly.
17243 * init.c (expand_member_init): Likewise.
17244 * parse.y (base_class): Likewise.
17245 * typeck2.c (build_functional_cast): Likewise.
17247 * typeck2.c (build_functional_cast): Fill in name after we've
17248 checked for non-aggr type.
17250 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
17252 * decl2.c (warn_pointer_arith): Default to on.
17254 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
17256 * lex.c (is_rid): New function.
17257 * decl.c (grokdeclarator): Diagnose reserved words used as
17260 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
17262 * tree.c (get_decl_list): Don't lose cv-quals.
17264 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
17265 typespecs used as declarator-ids.
17267 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
17269 * decl.c (poplevel): When poping a level, don't give a warning for
17270 any subblocks that already exist.
17272 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17274 * typeck.c (build_object_ref): Finish what I started.
17276 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
17278 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
17280 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
17283 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
17285 * decl.c (xref_tag): Handle passing a type in directly.
17287 * parse.y (qualified_type_name): Pull out the type.
17288 (nested_type): Likewise.
17289 Take types directly instead of as identifiers.
17290 * call.c (build_scoped_method_call): Take types directly instead of
17292 * decl.c (xref_basetypes): Likewise.
17293 * init.c (expand_member_init): Likewise.
17294 (build_member_call): Likewise.
17295 (build_offset_ref): Likewise.
17296 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
17297 * method.c (do_build_assign_ref): Likewise.
17298 * decl.c (grokdeclarator): Handle a type appearing as the
17299 declarator-id for constructors.
17300 * method.c (do_build_copy_constructor): current_base_init_list now
17301 uses the types directly, not their names.
17302 * init.c (sort_base_init): Likewise.
17303 (expand_member_init): Likewise.
17304 * init.c (is_aggr_type): New function, like is_aggr_typedef.
17306 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
17308 * tree.c (layout_basetypes): Call build_lang_field_decl instead
17309 of build_lang_decl if first arg is a FIELD_DECL.
17311 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17313 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
17315 * except.c (expand_start_catch_block): Set TREE_USED to avoid
17316 warnings about the catch handler.
17318 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
17320 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
17321 expand_target_expr.
17323 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17325 Fix access control to use trees rather than integers.
17326 * class.c (access_{default, public, protected, private,
17327 default_virtual, public_virtual, private_virtual}_node): Add
17329 (init_class_processing): Do creation of those nodes.
17330 * cp-tree.h (access_type): Delete enum decl.
17331 (access_{default, public, protected, private, default_virtual,
17332 public_virtual, private_virtual}_node): Add decls.
17333 (compute_access): Change return type.
17334 * search.c (compute_access): Have tree return type, instead of enum.
17335 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
17336 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
17337 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
17338 * parse.y (VISSPEC): Make ttype rather than itype.
17339 (base_class_access_list): Likewise.
17340 * *.[cy]: Change all refs of `access_public' to `access_public_node',
17342 * call.c (build_method_call): Make ACCESS be a tree.
17343 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
17344 * cvt.c (convert_to_aggr): Likewise.
17345 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
17347 * method.c (hack_identifier): Likewise.
17348 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
17350 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
17352 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
17353 frontend, and make it more consistent with respect to
17354 warn_pointer_arith.
17356 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17358 * decl.c (pushdecl): Check for duplicate parameter names.
17360 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
17362 * decl.c (expand_static_init): Call assemble_external for atexit.
17364 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
17366 * except.c (do_unwind): Remove some generated dead code.
17367 (eh_outer_context): New routine, factor out some common code from
17368 expand_builtin_throw and end_eh_unwinder. Add code to do return
17369 address masking for the PA.
17370 (expand_builtin_throw): Use eh_outer_context instead of open coding
17372 (end_eh_unwinder): Likewise.
17374 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
17376 * except.c (expand_throw): Call assemble_external for __empty, if we
17379 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
17381 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
17382 NORMAL_RETURN_ADDR_OFFSET.
17383 (end_eh_unwinder): Likewise.
17385 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
17387 * gc.c (build_dynamic_cast): Make sure we don't cast away const
17388 when dealing with references, and make sure we handle dynamic
17389 casting to a cv qualified reference.
17391 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
17393 * except.c (struct eh_context): New structure top hold eh context
17395 (push_eh_context): New routine.
17396 (pop_eh_context): Likewise.
17397 * decl.c (push_cp_function_context): Use them.
17398 (pop_cp_function_context): Likewise.
17400 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
17402 * decl2.c (finish_file): Also prune uninteresting functions in the
17403 inline emission loop.
17405 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
17407 * sig.c (build_signature_table_constructor): Mark functions
17408 in the signature as referenced.
17410 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
17412 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
17413 the inline emission stuff.
17415 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
17417 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
17419 * lang-options.h: Add -f{no-,}weak.
17420 * decl.c (init_decl_processing): If the target does not support weak
17421 symbols, don't use them.
17422 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
17424 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
17426 * init.c (expand_member_init): warning for base init after members.
17428 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
17430 * cvt.c (build_expr_type_conversion): Don't convert to a reference
17433 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
17435 * method.c (report_type_mismatch): Improve wording for volatile
17438 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
17440 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
17441 expand_assignment, as the later doesn't handle things that have
17442 copy constructors well. The compiler would do bitwise copying,
17443 instead of ctor calling in some cases.
17445 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
17447 * g++.c (my_strerror): Return "cannot access" if errno is 0.
17448 (pfatal_with_name, perror_exec): Don't assume that
17449 the returned value from my_strerror contains no '%'s.
17451 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
17453 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
17455 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
17456 TYPE_METHODS/TREE_CHAIN mean what they used to.
17457 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
17458 instead of TYPE_METHODS.
17459 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
17460 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
17461 * cp-tree.h (CLASSTYPE_METHODS): Lose.
17462 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
17464 (struct lang_decl): Lose next_method field.
17465 (DECL_NEXT_METHOD): Lose.
17466 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
17467 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
17469 (finish_struct_methods): Don't mess with the TREE_CHAINs in
17472 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
17475 * call.c (build_method_call): Synthesize here even when not inlining.
17476 * typeck.c (build_function_call_real): Likewise.
17478 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
17480 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
17481 == DBX_DEBUG, call dbxout_start_new_source_file and
17482 dbxout_resume_previous_source_file when appropriate.
17484 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
17486 * except.c (start_anon_func): Push to the top level.
17487 (end_anon_func): Pop from the top level.
17489 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
17491 * cp-tree.h (build_cleanup): New routine to build cleanups.
17492 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
17493 call at ctor time and use atexit to run it later.
17494 * decl2.c (build_cleanup): New routine, taken from finish_file.
17495 (finish_file): Use build_cleanup instead, and don't put function
17496 local statics in global dtor list.
17498 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
17500 * except.c (expand_throw): Ensure that we have cleanups, if we try
17501 and expand cleanups.
17503 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
17505 * except.c (expand_throw): Add logic to manage dynamic cleanups for
17507 (expand_end_catch_block): Use the magic of expand_goto, instead of
17508 emit_jump so that we get the cleanup for any catch clause parameter
17509 and the cleanup for the exception object. Update to reflect label
17511 (push_eh_cleanup): New routine to register a cleanup for an
17513 (empty_fndecl): Used to default cleanup actions to
17515 (init_exception_processing): Setup empty_fndecl. Setup
17517 (expand_start_catch_block): Update to reflect label changes. Call
17518 push_eh_object to register the cleanup for the EH object.
17519 (start_anon_func): New routine to start building lambda expressions
17521 (end_anon_func): New routine to end them.
17522 (struct labelNode): Change so that we can use tree labels, or rtx
17524 (saved_cleanup): Object to check for dynamic cleanups for the
17525 exception handling object.
17526 (push_label_entry): Change so that we can use tree labels, or rtx
17528 (pop_label_entry): Likewise.
17529 (top_label_entry): Likewise.
17530 (expand_start_all_catch): Use tree label instead of rtx label, so
17531 that we can get the magic of expand_goto.
17532 (expand_end_all_catch): Update to reflect label changes.
17534 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
17536 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
17537 building_cleanup logic, as we now use UNSAVE_EXPRs.
17538 * cp-tree.h (unsave_expr): Declare it.
17539 * decl.c (building_cleanup): Remove.
17540 (maybe_build_cleanup): Remove building_cleanup logic, and use
17541 UNSAVE_EXPR instead.
17543 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
17545 * gc.c (build_t_desc): Update error message to say <typeinfo>.
17547 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17549 * decl.c (pushdecl): Only warn about shadowing a local variable if
17550 warn_shadow is true.
17552 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
17554 * typeck.c (build_binary_op_nodefault): Added warning about
17555 comparisons between different enum types with -Wall, unless
17556 -fenum-int-equiv set.
17558 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
17560 * class.c (finish_struct_1): Skip down to the inner type in
17561 multidimensional arrays. Ensures ctors will be made for types that
17564 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
17566 * decl.c (last_dtor_insn): New to track the last compiler generated
17568 (store_parm_decls): Set it.
17569 (finish_function): Use it to see if the dtor is empty. Avoid doing
17570 vtable setup all the time, if we can.
17571 (struct cp_function): Add last_dtor_insn.
17572 (push_cp_function_context): Save it.
17573 (pop_cp_function_context): Restore it.
17575 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
17577 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
17580 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
17582 * typeck.c (expand_target_expr): Make sure targets get put into the
17583 current temp_slot_level, so that the free_temp_slots call will reuse
17586 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
17588 * class.c (finish_struct_1): Delay delta fixups for virtual bases
17589 until after we have done the hard virtuals, to avoid a bogus `every
17590 virtual function must have a unique final overrider' for virtual
17591 functions that are only overridden by hard virtuals.
17593 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
17595 * pt.c (do_function_instantiation): Don't try to find a file-scope
17596 template for a member function.
17598 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
17600 * g++.c (main): Add handling of -nodefaultlibs.
17602 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
17604 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
17605 distinguish between direct bindings of reference variables, and
17606 indirect bindings of reference variables.
17607 * cvt.c (build_up_reference): Use it.
17608 * typeck.c (convert_arguments): Use it to indicate this is an
17610 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
17611 as they are unused.
17612 (expand_static_init): Likewise.
17613 (cplus_expand_expr_stmt): Likewise.
17614 * decl2.c (finish_file): Likewise.
17615 * init.c (perform_member_init): Likewise.
17616 (emit_base_init): Likewise.
17617 (expand_aggr_vbase_init_1): Likewise.
17619 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17621 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
17622 get a DECL_LANG_SPECIFIC node.
17623 * cp-tree.h (lang_decl_flags): Add new member `level'.
17624 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
17625 decl_flags level member.
17627 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17629 * call.c (build_method_call): Make sure instance has a
17630 TYPE_LANG_SPECIFIC node before we dive into it.
17632 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
17634 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
17636 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
17638 * decl.c (duplicate_decls): When smashing decls, smash staticness in
17641 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
17643 * decl.c (poplevel): Handle the merging of subblocks of cleanups
17644 when finishing blocks that have already been created (usually due to
17645 the fixup goto code). Fixes bad debugging information.
17647 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
17649 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
17650 that's not a list of overloaded functions.
17652 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17654 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
17655 before trying to use DECL_ABSTRACT_VIRTUAL_P.
17657 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
17659 * decl2.c (mark_used): New function for hooking into setting of
17660 TREE_USED on decls.
17661 * call.c (build_method_call): Use it.
17662 * class.c (instantiate_type): Likewise.
17663 * init.c (build_offset_ref): Likewise. Don't call assemble_external
17664 for all like-named functions.
17665 * method.c (hack_identifier): Likewise.
17666 (emit_thunk): Don't call assemble_external.
17667 (make_thunk): Create thunk as a FUNCTION_DECL so that it
17668 gets the right mode and ENCODE_SECTION_INFO works.
17670 * parse.y: Use mark_used. Pass operator names to do_identifier.
17671 * lex.c (do_identifier): Handle operator names.
17673 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
17675 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17677 * errfn.c: Include stdio.h.
17678 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
17680 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
17682 * typeck2.c (digest_init): Always convert initializers to the
17685 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
17687 * init.c (member_init_ok_or_else): Don't allow member initializers
17688 for indirect members, as it is invalid.
17690 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17692 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
17694 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
17696 * parse.y (for.init.statement): Catch compound statements inside for
17697 initializations, if we're being pedantic.
17699 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
17701 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
17704 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
17706 * error.c (dump_expr): Don't core dump when a boolean expression is
17707 used as a default argument.
17709 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
17711 * class.c (finish_struct_bits): Check aggregate_value_p instead of
17714 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
17716 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
17717 BLKmode type that would otherwise be returned in registers.
17719 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17721 * g++.c (WITHLIBC): New macro.
17722 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
17723 saw_libc and pass it at the end if it was set.
17725 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17727 * parse.y (fn.def1): Call split_specs_attrs in
17728 declmods notype_declarator case.