a77ca97bc9e18d3578f493524b04fc5572954462
[gcc.git] / gcc / cp / ChangeLog
1 1999-08-30 Mark Mitchell <mark@codesourcery.com>
2
3 * cp-tree.h (begin_init_stmts): Declare.
4 (finish_init_stmts): Likewise.
5 * cvt.c (build_up_reference): Wrap the declaration of a temporary
6 in a statement-expression so that we will see it when expanding
7 tree structure later.
8 * init.c (begin_init_stmts): Don't make it static.
9 (finish_init_stmts): Likewise.
10
11 * cp-tree.h (start_handler_parms): New function.
12 (expand_start_catch_block): Take only one parameter.
13 (start_handler_parms): New function.
14 * decl.c (start_handler_parms): Define it.
15 * except.c (process_start_catch_block): Take only one parameter.
16 Don't call grokdeclarator here.
17 (expand_start_catch_block): Don't call grokdeclarator here,
18 either.
19 * parse.y (handler_args): Adjust call to
20 expand_start_catch_block. Use start_handler_parms.
21 * pt.c (push_template_decl_real): Make permanent lists have
22 permanent elements.
23 (tsubst_expr): Adjust calls to expand_start_catch_block
24 appropriately.
25 * semantics.c (expand_stmt): Likewise.
26
27 1999-08-29 Alex Samuel <samuel@codesourcery.com>
28
29 * pt.c (push_template_decl_real): Use template declaration from
30 class type if it exists.
31
32 1999-08-29 Mark Mitchell <mark@codesourcery.com>
33
34 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
35 (maybe_inject_for_scope_var): Declare it.
36 (initialize_local_var): Likewise.
37 * decl.c (maybe_inject_for_scope_var): Make it global.
38 (initialize_local_var): Likewise. Move cleanup handling here,
39 from cp_finish_decl.
40 (make_rtl_for_nonlocal_decl): Use
41 push_obstacks_nochange/pop_obstacks, rather than
42 end_temporary_allocation/resume_temporary_allocation.
43 (cp_finish_decl): Try to complete the type of a variable when it
44 is declared. Move cleanup-handling to initialize_local_var.
45 (expand_static_init): Use tree-building code, rather than
46 RTL-building code.
47 * decl2.c (get_temp_name): Assert non-initializedness of
48 temporaries.
49 * init.c (create_temporary_var): Move RTL-assigning code to ...
50 (get_temp_regvar): Here.
51 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
52 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
53 call initialize_local_var to generate initialization code.
54
55 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
56
57 * cp-tree.h (fndecl_as_string, type_as_string,
58 type_as_string_real, args_as_string, decl_as_string,
59 expr_as_string, code_as_string, language_as_string,
60 parm_as_string, op_as_string, assop_as_string, cv_as_string,
61 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
62
63 * errfn.c (cp_printer): Likewise.
64
65 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
66 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
67 cp_file_of, code_as_string, language_as_string, parm_as_string,
68 op_as_string, assop_as_string, args_as_string, cv_as_string):
69 Likewise.
70
71 * tree.c (lang_printable_name): Likewise.
72
73 1999-08-28 Richard Henderson <rth@cygnus.com>
74
75 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
76
77 1999-08-28 Mark Mitchell <mark@codesourcery.com>
78
79 * cp-tree.h (strip_array_types): New function.
80 * decl.c (maybe_deduce_size_from_array_init): New function, split
81 out from cp_finish_decl.
82 (layout_var_decl): Likewise.
83 (maybe_commonize_var): Likewise.
84 (maybe_inject_for_scope_var): Likewise.
85 (initialize_local_var): Likewise.
86 (build_cleanup_on_safe_obstack): Likewise.
87 (check_initializer): Likewise.
88 (make_rtl_for_nonlocal_decl): Likewise.
89 (cp_finish_decl): Use them.
90 * typeck.c (strip_array_types): New function.
91
92 * cp-tree.def (LABEL_STMT): New tree node.
93 * cp-tree.h (LABEL_STMT_LABEL): New macro.
94 (shadow_label): Remove.
95 (declare_local_label): New function.
96 (finish_label_decl): Likewise.
97 * decl.c (make_label_decl): New function, split out from
98 lookup_label.
99 (shadowed_labels): Remove.
100 (binding_level): Add shadowed_labels.
101 (clear_binding_level): Remove.
102 (push_binding_level): Just bzero the new binding level.
103 (pushlevel): Fix indentation.
104 (pop_label): New function.
105 (pop_labels): Likewise, split out from poplevel.
106 (poplevel): Pop local labels. Use pop_labels.
107 (maybe_push_to_top_level): Don't clear shadowed_labels.
108 (lookup_label): Use make_label_decl.
109 (shadow_label): Remove.
110 (declare_local_label): New function.
111 (define_label): Simplify.
112 (start_function): Don't clear shadowed_labels.
113 (cp_function): Remove shadowed_labels.
114 (push_cp_function_context): Don't save shadowed_labels.
115 (pop_cp_function_context): Don't restore it.
116 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
117 * parse.y (label_decl): Use finish_label_decl.
118 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
119 declarations.
120 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
121 building_stmt_tree.
122 (finish_label_decl): New function.
123 (expand_stmt): Handle LABEL_STMTs and local label declarations.
124
125 1999-08-26 Mark Mitchell <mark@codesourcery.com>
126
127 * decl.c (lookup_label): Build labels on the permanent obstack
128 when building statement trees. Don't build RTL for labels when
129 building statement trees.
130 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
131 building statement trees.
132 (finish_label_stmt): Likewise.
133 (expand_stmt): Adjust accordingly.
134 * pt.c (tsubst_expr); Likewise.
135 (do_decl_instantiation): Robustify.
136
137 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
138 * tree.c (build_cplus_new): Set it.
139 * expr.c (cplus_expand_expr): Use it.
140 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
141
142 * decl.c (store_parm_decls): Reset immediate_size_expand.
143 (finish_function): Likewise.
144
145 * tree.c (cplus_unsave_expr_now): Don't return a value.
146
147 * semantics.c (do_poplevel): Always initialize the return value.
148
149 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
150
151 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
152 * tree.h (cplus_unsave_expr_now) : Same.
153
154 1999-08-25 Mark Mitchell <mark@codesourcery.com>
155
156 * decl.c (grokdeclarator): Amend comment.
157 * except.c (expand_start_catch_block): Call push_template_decl for
158 catch-block parameters.
159 * method.c (synthesize_method): Build an empty compound statement
160 for the body of a constructor.
161
162 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
163
164 * tree.c (cp_build_qualified_type_real): If we're asking for the
165 same quals we already have, just return.
166
167 1999-08-25 Mark Mitchell <mark@codesourcery.com>
168
169 * cp-tree.def (SUBOBJECT): New tree node.
170 * cp-tree.h (CLEANUP_P): New macro.
171 (SUBOBJECT_CLEANUP): Likewise.
172 (keep_next_level): Add parameter.
173 (get_temp_regvar): Don't declare.
174 (emit_base_init): Remove parameter.
175 (expand_aggr_init): Rename to build_aggr_init.
176 (expand_vec_init): Rename to build_vec_init.
177 (do_pushlevel): Remove.
178 (do_poplevel): Likewise.
179 (finish_cleanup): New function.
180 (finish_subobject): Likewise.
181 (stmts_are_full_exprs_p): New variable.
182 * decl.c (keep_next_level): Add parameter.
183 (cp_finish_decl): Use build_aggr_init, not
184 expand_aggr_init. Use finish_expr_stmt to expand the code.
185 (expand_static_init): Use tree-generating, not RTL-generating,
186 functions to handle the initialization.
187 (start_function): Remove dead code. Always have a momentary
188 obstack inside the function, even before hitting the first curly
189 brace.
190 (cplus_expand_expr_stmt): Move calls to
191 expand_{start,end}_target_temps into semantics.c.
192 (cp_function): Add stmts_are_full_exprs_p.
193 (push_cp_function_context): Save it.
194 (pop_cp_function_context): Restore it.
195 * decl2.c (get_temp_regvar): Move to init.c.
196 (do_static_initialization): Use build_{aggr,vec}_init.
197 (do_static_destruction): Fix typo in comment.
198 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
199 * except.c (expand_throw): Use create_temporary_var.
200 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
201 * init.c (expand_vec_init_try_block): Remove.
202 (expand_vec_init_catch_clause): Likewise.
203 (get_temp_regvar): New function.
204 (begin_init_stmts): Likewise.
205 (finish_init_stmts): Likewise.
206 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
207 structure here.
208 (emit_base_init): Likewise. Remove unused parameter.
209 (expand_virtual_init): Likewise.
210 (expand_cleanup_for_base): Use finish_subobject.
211 (expand_aggr_vbase_init_1): Simplify.
212 (construct_virtual_bases): Use tree-generating functions to build
213 up initialization.
214 (expand_aggr_init): Likewise. Rename to build_aggr_init.
215 (expand_default_init): Likewise.
216 (expand_aggr_init_1): Likewise.
217 (expand_vec_init): Rename to build_vec_init.
218 * method.c (do_build_copy_constructor): Use tree-generating
219 functions. Don't call clear_last_expr.
220 (do_build_assign_ref): Likewise.
221 (synthesize_method): Call clear_last_expr here.
222 * parse.y (base_init): Don't call clear_last_expr here.
223 (nodecls): Likewise.
224 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
225 * semantics.c (do_pushlevel): Move to here.
226 (do_poplevel): Likewise.
227 (stmts_are_full_exprs_p): New variable.
228 (finish_expr_stmt): Handle logic for temoprary cleanup here.
229 (finish_for_stmt): Use finish_expr_stmt.
230 (finish_cleanup): New function.
231 (finish_function_try_block): Fix indentation.
232 (finish_subobject): New function.
233 (setup_vtbl_ptr): Call keep_next_level here.
234 (finish_stmt_expr): Handle a block with no scope inside the
235 statement-expression.
236 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
237 SUBOBJECT.
238 * tree.c (search_tree): Handle INIT_EXPR.
239 (mapcar): Likewise.
240 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
241 * typeck2.c (store_init_value): Change expand_aggr_init to
242 build_aggr_init in comment.
243
244 1999-08-25 Mark Mitchell <mark@codesourcery.com>
245
246 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
247
248 1999-08-25 Nathan Sidwell <nathan@acm.org>
249
250 * decl2.c (handle_class_head): Be graceful about additional
251 scope qualifiers. Adjust comments to reflect reality.
252
253 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
254
255 * call.c (build_conditional_expr): Fix typo.
256 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
257 lvalue before trying to mess with the sides.
258
259 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
260
261 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
262
263 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
264
265 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
266
267 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
268 Return arbitrary pointer or NULL.
269 (check_eh_spec): Call __throw_type_match_rtti_2.
270 * tinfo.h (*::dcast): Return int. Add valp parm.
271 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
272 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
273 (__throw_type_match_rtti): Now just a wrapper.
274
275 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
276 (init_exception_processing): Don't initialize them.
277
278 1999-08-23 Paul Burchard <burchard@pobox.com>
279
280 * decl.c (check_default_argument): Fix typo.
281
282 1999-08-22 Mark Mitchell <mark@codesourcery.com>
283
284 * cp-tree.def (STMT_EXPR): Fix typo in node name.
285
286 * dump.c (dump_next_stmt): New function.
287 (dequeue_and_dump): Use it.
288
289 * pt.c (tsubst_copy): Make sure to initialize return value for a
290 STMT_EXPR, even when processing_template_decl.
291 * semantics.c (finish_stmt_expr): A statement-expression whose
292 last statement is not an expression-statement has type `void'.
293
294 1999-08-20 Mark Mitchell <mark@codesourcery.com>
295
296 * semantics.c (finish_stmt_expr): Fix typo in comment.
297 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
298 (mapcar): Likewise.
299 * init.c (build_vec_delete_1): Make the children of a permanent
300 BIND_EXPR permanent.
301 * pt.c (register_specialization): Don't register a specialization
302 more than once.
303
304 1999-08-18 Andrew Haley <aph@cygnus.com>
305
306 * method.c (process_overload_item): Call build_mangled_C9x_name ()
307 for all integer parameter types larger than long long.
308
309 1999-08-19 Mark Mitchell <mark@codesourcery.com>
310
311 * pt.c (redeclare_class_template): Merge default template
312 arguments in both directions.
313
314 * typeck.c (common_type): Undo 1999-08-18 change. Remove
315 compiler_error message.
316
317 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
318
319 * cp-tree.h: Declare flag_use_repository.
320 * pt.c (do_decl_instantiation): Don't complain about duplicate
321 instantiation with -frepo.
322 (do_type_instantiation): Likewise.
323
324 * pt.c (push_template_decl_real): Complain about everything
325 that isn't a valid template.
326
327 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
328 affect inlines.
329
330 1999-08-19 Mark Mitchell <mark@codesourcery.com>
331
332 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
333 * decl2.c (build_expr_from_tree): Handle it.
334 * error.c (dump_expr): Likewise.
335 * pt.c (for_each_template_parm): Likewise.
336 (tsubst_copy): Likewise.
337 * tree.c (search_tree): Likewise.
338 * semantics.c (finish_pseudo_destructor_call): Create it.
339
340 1999-08-18 Mark Mitchell <mark@codesourcery.com>
341
342 * search.c (setup_class_bindings): Robustify.
343 * typeck.c (common_type): Use same_type_p, not pointer equality,
344 to compare types.
345
346 * cp-tree.h (build_lang_field_decl): Remove.
347 * class.c (build_vtable): Replace calls to build_lang_field_decl
348 with build_lang_decl.
349 (prepare_fresh_vtable): Likewise.
350 (finish_struct_1): Likewise.
351 (init_class_processing): Likewise.
352 * decl.c (push_using_decl): Likewise.
353 (init_decl_processsing): Likewise.
354 (grokvardecl): Likewise.
355 (build_ptrmemfunc_type): Likewise.
356 (grokdeclarator): Likewise.
357 (build_enumerator): Likewise.
358 * decl2.c (grok_x_components): Likewise.
359 (do_class_using_decl): Likewise.
360 * except.c (call_eh_info): Likewise.
361 * init.c (init_init_processing): Likewise.
362 * rtti.c (expand_class_decl): Likewise.
363 * tree.c (build_base_fields): Likewise.
364 (build_vbase_pointer_fields): Likewise.
365 * lex.c (build_lang_decl): Build declarations on the permanent
366 obstack if we're building statmeent trees.
367 (retrofit_lang_decl): Handle both the full lang_decl and also the
368 smaller lang_decl_flags here.
369 (build_lang_field_decl): Remove.
370 * pt.c (push_template_decl_real): Issue errors for variable
371 declarations that are not static members.
372
373 1999-08-18 Richard Henderson <rth@cygnus.com>
374
375 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
376 (mapcar): Likewise.
377
378 1999-08-17 Mark Mitchell <mark@codesourcery.com>
379
380 * cp-tree.h (back_end_hook): New variable.
381 * decl2.c (back_end_hook): Define it.
382 (finish_file): If it's non-NULL, call it.
383
384 * decl.c (add_decl_to_level): New function.
385 (push_local_binding): Use it.
386 (find_binding): Fix typo in comment.
387 (pushdecl): Use add_decl_to_level. Put templates on the
388 corresponding namespace-scope binding levels.
389 * dump.c (dequeue_and_dump): Print the specializations of a
390 template.
391 * pt.c (push_template_decl_real): Don't push a template multiple
392 times.
393
394 1999-08-17 Mark Mitchell <mark@codesourcery.com>
395
396 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
397 (CALL_DECLARATOR_QUALS): Likewise.
398 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
399 * decl.c (grokdeclarator): Adjust to use them.
400 * decl2.c (grokfield): Likewise.
401 (reparse_absdcl_as_casts): Likewise.
402 * lex.c (make_call_declarator): Likewise.
403 (set_quals_and_spec): Likewise.
404 * pt.c (tsubst): Likewise.
405 * tree.c (mapcar): Remove special hack to handle third operand of
406 a CALL_EXPR.
407
408 1999-08-16 Mark Mitchell <mark@codesourcery.com>
409
410 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
411 * class.c (build_vtable): Use build_lang_field_decl to build the
412 VAR_DECLs for vtables.
413 (prepare_fresh_vtable): Likewise.
414 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
415 CAN_HAVE_FULL_LANG_DECL_P.
416 (push_using_decl): Use build_lang_decl to build USING_DECLs.
417 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
418 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
419 (build_lang_field_decl): Likewise.
420 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
421 to copy.
422
423 * cp-tree.def (STMT_EXPR): New tree node.
424 * cp-tree.h (STMT_EXPR_STMT): New macro.
425 (store_return_init): Change prototype.
426 (finish_named_return_value): New function.
427 (expand_stmt): Likewise.
428 (expand_body): Likewise.
429 (begin_stmt_tree): Likewise.
430 (finish_stmt_tree): Likewise.
431 (expanding_p): New variable.
432 (last_expr_type): Likewise.
433 (building_stmt_tree): New macro.
434 * decl.c (start_function): Use building_stmt_tree, not
435 processing_template_decl, where appropriate.
436 (store_parm_decls): Likewise.
437 (store_return_init): Move most of the body to semantics.c.
438 (finish_function): Use building_stmt_tree.
439 (finish_stmt): Clear last_expr_type here.
440 (cp_function): Add expanding_p, last_tree, last_expr_type.
441 (push_cp_function_context): Save them.
442 (pop_cp_function_context): Restore them.
443 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
444 * error.c (dump_expr): Handle STMT_EXPR.
445 * except.c (expand_start_catch_block): Use building_stmt_tree.
446 Use add_decl_stmt.
447 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
448 (do_case): Move add_tree call to semantics.c.
449 * parse.y (return_init): Use finish_named_return_value.
450 (for.init.statement): Use finish_expr_stmt.
451 * parse.c: Regenerated.
452 * pt.c (do_pushlevel): Move to semantics.c.
453 (do_poplevel): Likewise.
454 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
455 (tsubst_expr): Don't expand all the way to RTL here. Handle
456 RETURN_INIT and CTOR_INITIALIZER.
457 (instantiate_decl): Call expand_body after tsubst'ing into
458 DECL_SAVED_TREE.
459 * semantics.c (expand_stmts): New function.
460 (expanding_p): New variable.
461 (last_expr_type): Likewise.
462 (finish_expr_stmt): Use building_stmt_tree.
463 (begin_if_stmt): Likewise.
464 (finish_if_stmt_cond): Likewise.
465 (finish_then_clause): Likewise.
466 (begin_else_clause): Likewise.
467 (finish_else_clause): Likewise.
468 (begin_while_stmt): Likewise.
469 (finish_while_stmt_cond): Likewise.
470 (finish_while_stmt): Likewise.
471 (finish_do_body): Likewise.
472 (finish_do_stmt): Likewise.
473 (finish_return_stmt): Likewise.
474 (begin_for_stmt): Likewise.
475 (fnish_for_init_stmt): Likewise.
476 (finish_for_cond): Likewise.
477 (finish_for_expr): Likewise.
478 (finish_for_stmt): Likewise.
479 (finish_break_stmt): Likewise.
480 (finish_continue_stmt): Likewise.
481 (finish_switch_cond): Likewise.
482 (finish_switch_stmt): Likewise.
483 (finish_case_label): Call add_tree here if necessary.
484 (finish_goto_statement): Use building_stmt_tree.
485 (begin_try_block): Likewise.
486 (begin_function_try_block): Likewise.
487 (finish_try_block): Likewise.
488 (finish_function_try_block): Likewise.
489 (finish_handler_sequence): Likewise.
490 (finish_function_handler_sequence): Likewise.
491 (begin_handler): Likewise.
492 (finish_handler_parms): Likewise.
493 (finish_handler): Likewise.
494 (begin_compound_stmt): Likewise.
495 (finish_compound_stmt): Likewise.
496 (finish_asm_stmt): Likewise.
497 (finish_label_stmt): Likewise.
498 (finish_named_return_value): New function.
499 (setup_vtbl_ptr): Moved here from decl2.c.
500 (do_pushlevel): Moved here from pt.c.
501 (do_poplevel): Likewise.
502 (begin_stmt_expr): Use building_stmt_tree.
503 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
504 when building_stmt_tree.
505 (begin_stmt_tree): New function.
506 (finish_stmt_tree): Likewise.
507 (expand_stmt): Likewise.
508 (expand_body): Likewise.
509 * tree.c (build_cplus_method_type): Make sure the argument types
510 end up on the same obstack as the METHOD_TYPE.
511 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
512 THROW_EXPR, STMT_EXPR.
513 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
514 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
515 sorry, if an unsupported node is encountered.
516 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
517 (c_expand_return): Don't call add_tree here.
518
519 1999-08-15 Mark Mitchell <mark@codesourcery.com>
520
521 * pt.c (check_default_tmpl_args): Don't check in local scopes.
522 (tsubst_decl): Make sure the declaration is on a saveable
523 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
524 variable.
525 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
526
527 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
528
529 Speed up Koenig lookup.
530 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
531 to return namespaces we've looked at.
532 * decl2.c (lookup_using_namespace): Likewise.
533 (add_function): Don't call ovl_member.
534 (lookup_arg_dependent): Initialize k.namespaces to the list of
535 namespaces seen in unqualified lookup.
536 * call.c (equal_functions): Move here from tree.c.
537 (joust): Use it to handle duplicate candidates.
538 * tree.c (ovl_member): Use ==.
539
540 1999-08-13 Mark Mitchell <mark@codesourcery.com>
541
542 * cp-tree.def (DECL_STMT): Make it smaller.
543 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
544 (lang_decl): ... here. Add next.
545 (DECL_SAVED_TREE): Adjust accordingly.
546 (DECL_IMPLICIT_TYPEDEF_P): New macro.
547 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
548 (DECL_STMT_DECL): Likewise.
549 (create_implicit_typedef): New function.
550 (maybe_push_decl): Likewise.
551 (tsubst_default_argument): New function.
552 (at_function_scope_p): Likewise.
553 (add_decl_stmt): Likewise.
554 (push_permanent_obstack): Likewise.
555 * call.c (convert_default_arg): Use tsubst_default_argument.
556 * class.c (add_method): Use push_permanent_obstack.
557 (build_self_reference): Create a TEMPLATE_DECL for the
558 self-reference, if necessary.
559 * decl.c (pseudo_global_level_p): Only look at the current binding
560 level.
561 (push_binding): Use push_permanent_obstack.
562 (create_implicit_typedef): New function.
563 (pushtag): Use it.
564 (duplicate_decls): Use push_permanent_obstack.
565 (maybe_push_decl): New function.
566 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
567 (start_decl_1): Remove dead code.
568 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
569 pseudo_global_level_p.
570 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
571 template.
572 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
573 pseudo_global_level_p.
574 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
575 a template.
576 (get_sentry): Use push_permanent_obstack.
577 * dump.c (dequeue_and_dump): Enable DECL_STMT.
578 * except.c (call_eh_info): Use push_permanent_obstack.
579 (build_eh_type_ref): Likewise.
580 (do_pop_exception): Likewise.
581 (expand_eh_spec): Likewise.
582 (alloc_eh_object): Likewise.
583 (expand_throw): Likewise.
584 * init.c (build_java_class_ref): Likewise.
585 * lex.c (get_time_identifier): Likewise.
586 (free_lang_decl_chain): Correct type.
587 (retrofit_lang_decl): Adjust accordingly.
588 (build_lang_field_decl): Likewise.
589 * lex.h (free_lang_decl_chain): Likewise.
590 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
591 * parse.c: Regenerated.
592 * pt.c (tsubst_default_arguments): New function.
593 (retrieve_local_specialization): Likewise.
594 (register_local_specialization): Likewise.
595 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
596 pseudo_global_level_p to determine whether or not a template is
597 primary.
598 (lookup_template_class): Likewise. Use create_implicit_typedef.
599 (instantiate_class_template): Call tsubst_default_arguments for
600 member functions, if appropriate.
601 (tsubst_default_argument): New function.
602 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
603 * search.c (at_function_scope_p): New function.
604 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
605 (finish_label_stmt): Likewise.
606 (add_decl_stmt): New function.
607 (begin_class_definition): Likewise.
608 (finish_typeof): Likewise.
609 * tree.c (copy_template_template_parm): Likewise.
610 (copy_to_permanent): Likewise.
611 (push_permanent_obstack): Define.
612 (mark_addressable): Use it.
613 * typeck.c (mark_addressable): Likewise.
614
615 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
616
617 cp-tree.h (init_cplus_unsave): New.
618 (cplus_unsave_expr_now): New.
619 lex.c (init_parse): Call init_cplus_unsave.
620 tree.c (init_cplus_unsave): New.
621 (cplus_unsave_expr_now): New.
622
623 1999-08-13 Mark Mitchell <mark@codesourcery.com>
624
625 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
626 decl_constant_value to simplify array bounds.
627
628 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
629
630 * lang-options.h: Add -fms-extensions.
631 * cp-tree.h: Declare flag_ms_extensions.
632 * decl2.c: Define it.
633 * class.c (instantiate_type): Don't complain about taking the address
634 of a bound member function if -fms-extensions.
635 * typeck.c (build_unary_op): Likewise.
636 * decl.c (grokdeclarator): Or about implicit int.
637 * init.c (resolve_offset_ref): Or about implicit '&'.
638
639 1999-08-11 Mark Mitchell <mark@codesourcery.com>
640
641 * cp-tree.h (minimal_parse_mode): Remove.
642 (finish_label_stmt): New function.
643 * decl.c (saved_scope): Remove minimal parse mode.
644 (maybe_push_to_top_level): Don't save it.
645 (pop_from_top_level): Don't restore it.
646 (define_label): Split out template-handling code to semantics.c.
647 (start_decl): Don't use minimal_parse_mode.
648 (cp_finish_decl): Likewise.
649 (start_function): Don't increment it.
650 (store_return_init): Don't use it.
651 (finish_function): Don't decrement it.
652 * parse.y (label_colon): Use finish_label_stmt throughout.
653 * parse.c: Regenerated.
654 * pt.c (minimal_parse_mode): Don't define it.
655 (tsubst_expr): Use finish_label_stmt.
656 * semantics.c (finish_label_stmt): New function.
657
658 * dump.c (queue): Be careful when computing bitmasks.
659 (dequeue_and_dump): Describe binfos as binfos, not as
660 vectors.
661
662 * parse.y (pedantic): Give it itype. Adjust usage accordingly
663 throughout.
664 * parse.c: Regenerated.
665
666 * Make-lang.in (CXX_SRCS): Remove sig.c.
667 * Makefile.in (CXX_OBJS): Remove sig.o.
668 (sig.o): Remove.
669 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
670 (CPTI_SIGNATURE_TYPE): Likewise.
671 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
672 (opaque_type_node): Likewise.
673 (signature_type_node): Likewise.
674 (sigtable_entry_type): Likewise.
675 (flag_handle_signatures): Likewise.
676 (lang_type): Remove is_signature, is_signature_pointer,
677 is_signature_reference, has_opaque_typedecls,
678 sigtables_has_been_generated. Adjust dummy. Remove signature,
679 signature_pointer_to, signature_reference_to.
680 (IS_SIGNATURE): Remove.
681 (SET_SIGNATURE): Remove.
682 (CLEAR_SIGNATURE): Remove.
683 (IS_SIGNATURE_POINTER): Remove.
684 (IS_SIGNATURE_REFERENCE): Remove.
685 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
686 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
687 (CLASSTYPE_SIGNATURE): Remove.
688 (SIGNATURE_TYPE): Remove.
689 (SIGNATURE_METHOD_VEC): Remove.
690 (SIGNATURE_POINTER_TO): Remove.
691 (SIGNATURE_REFERENCE_TO): Remove.
692 (lang_decl_flags): Remove is_default_implementation. Rename
693 memfunc_pointer_to to saved_tree.
694 (IS_DEFAULT_IMPLEMENTATION): Remove.
695 (DECL_MEMFUNC_POINTER_TO): Remove.
696 (DECL_MEMFUNC_POINTING_TO): Remove.
697 (DECL_SAVED_TREE): Adjust definition.
698 (tag_types): Remove signature_type_node.
699 (SIGNATURE_FIELD_NAME): Remove.
700 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
701 (SIGNATURE_OPTR_NAME): Likewise.
702 (SIGNATURE_SPTR_NAME): Likewise.
703 (SIGNATURE_POINTER_NAME): Likewise.
704 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
705 (SIGNATURE_REFERENCE_NAME): Likewise.
706 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
707 (SIGTABLE_PTR_TYPE): Likewise.
708 (SIGTABLE_NAME_FORMAT): Likewise.
709 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
710 (SIGTABLE_TAG_NAME): Likewise.
711 (SIGTABLE_VB_OFF_NAME): Likewise.
712 (SIGTABLE_VT_OFF_NAME): Likewise.
713 (finish_base_specifiers): Change prototype.
714 (build_signature_pointer_type): Remove.
715 (build_signature_reference_type): Remove.
716 (build_signature_pointer_constructor): Remove.
717 (build_signature_method_call): Remove.
718 (build_optr_ref): Likewise.
719 (append_signature_fields): Likewise.
720 (signature_error): Likewise.
721 * call.c (build_this): Remove signature support.
722 (build_over_call): Likewise.
723 (build_new_method_call): Likewise.
724 * class.c (add_implicitly_declared_members): Likewise.
725 (finish_struct_1): Likewise.
726 (finish_struct): Likewise.
727 * cvt.c (cp_convert_to_pointer): Likewise.
728 (convert_to_pointer_force): Likewise.
729 (ocp_convert): Likewise.
730 * decl.c (sigtable_decl_p): Remove.
731 (init_decl_processing): Remove support for signatures.
732 (cp_finish_decl): Likewise.
733 (grokdeclarator): Likewise.
734 (grokparms): Likewise.
735 (xref_tag): Likewise.
736 (start_function): Likewise.
737 (start_method): Likewise.
738 * decl2.c (finish_sigtable_vardecl): Remove.
739 (flag_handle_signatures): Remove.
740 (lang_f_options): Remove handle-signatures.
741 (grokfield): Remove support for signatures.
742 (grokbitfield): Likewise.
743 (finish_file): Likewise.
744 (reparse_absdcl_as_casts): Likewise.
745 * error.c (dump_type_real): Likewise.
746 (dump_function_decl): Likewise.
747 * friend.c (make_friend_class): Likewise.
748 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
749 * hash.h: Regenerated.
750 * init.c (build_new_1): Remove support for signatures.
751 * lang-options.h: Remove -fhandle-signatures,
752 -fno-handle-signatures.
753 * lex.c (init_parse): Remove support for signatures.
754 (yyprint): Likewise.
755 * lex.h (rid): Remove RID_SIGNATURE.
756 * method.c (build_decl_overload_real): Remove support for
757 signatures.
758 (hack_identifier): Likewise.
759 * parse.y (base_class): Likewise.
760 (base_class.1): Likewise.
761 (access_specifier): Likewise.
762 * search.c (lookup_member): Likewise.
763 * semantics.c (finish_qualified_object_call_expr): Likewise.
764 (finish_template_type_parm): Likewise.
765 (begin_class_definition): Likewise.
766 (finish_base_specifier): Likewise.
767 * sig.c: Remove.
768 * tree.c (build_cplus_method_type): Remove support for signatures.
769 * typeck.c (require_complete_type): Likewise.
770 (c_sizeof): Likewise.
771 (c_alignof): Likewise.
772 (build_object_ref): Likewise.
773 (build_component_ref): Likewise.
774 (build_indirect_ref): Likewise.
775 (build_c_cast): Likewise.
776 (build_modify_expr): Likewise.
777 (convert_for_initialization): Likewise.
778 * typeck2.c (signature_error): Remove.
779 (store_init_value): Remove support for signatures.
780 (digest_init): Likewise.
781 (build_x_arrow): Likewise.
782 (build_functional_cast): Likewise.
783 * xref.c (GNU_xref_decl): Likewise.
784
785 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
786
787 * lex.c (do_identifier): Remove unnecessary lookup of class field.
788
789 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
790
791 * decl2.c (set_decl_namespace): Do not complain about non-matching
792 decls if processing a template.
793
794 1999-08-09 Mark Mitchell <mark@codesourcery.com>
795
796 * decl.c (build_ptrmemfunc_type): Handle qualified
797 pointer-to-member types here.
798 * tree.c (cp_build_qualified_type_real): Simplify handling here.
799
800 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
801
802 * decl.c: Remove redundant prototype for `print_error_function'.
803 (lang_print_error_function): Constify a char*.
804
805 * lex.c (lang_identify): Likewise.
806
807 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
808
809 * Makefile.in: Update dependencies.
810 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
811 NULL_RTX.
812 * decl.c: Include "function.h"
813 (cleanup_label, return_label): Delete declarations.
814 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
815 (finish_function): Rename last_parm_insn variable to
816 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
817 * decl2.c: Include "function.h".
818 (rtl_expr_chain): Delete declaration.
819 * method.c: Include "function.h"
820 * tree.c (build_vbase_pointer_fields): Don't initialize
821 DECL_SAVED_INSNS with NULL_RTX.
822 * typeck.c: Include "function.h"
823
824 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
825
826 * semantics.c (begin_function_try_block, finish_function_try_block,
827 finish_function_handler_sequence): New fns.
828 * parse.y (function_try_block): Use them.
829 * pt.c (instantiate_decl): Likewise.
830
831 * cp-tree.h: Declare in_function_try_handler.
832 * decl.c: Define it.
833 (start_function): Clear it.
834 (struct cp_function, push_cp_function_context): Save it.
835 (pop_cp_function_context): Restore it.
836 * parse.y (function_try_block): Set and clear it.
837 * except.c (expand_end_catch_block): Rethrow if we reach the end
838 of a function-try-block handler in a ctor or dtor.
839 * typeck.c (c_expand_return): Complain about returning from a
840 function-try-block handler of a ctor.
841
842 * parse.y (function_try_block): Call end_protect_partials
843 before expand_start_all_catch.
844
845 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
846
847 * decl.c (struct binding_level): Add eh_region field.
848 (push_binding_level): Set it.
849 (define_label): Complain about jumping into an EH block.
850
851 * ptree.c (print_lang_type): Print the real type of a PMF.
852 Print what exceptions a fn type throws.
853
854 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
855
856 * class.c (count_fields, add_fields_to_vec): Add static prototype.
857
858 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
859 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
860 char*.
861
862 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
863 Constify a char*.
864
865 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
866 char*.
867
868 * dump.c (queue_and_dump_index, dump_int, dump_string,
869 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
870 a char*.
871 (dump_stmt): Add static prototype.
872
873 * errfn.c (cp_thing): Constify a char*.
874
875 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
876 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
877 dump_expr): Constify a char*.
878
879 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
880 read_line_number): Add static prototype.
881 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
882 (real_yylex): Move label `letter' into the scope where it is used.
883
884 * method.c (build_mangled_template_parm_index, build_overload_int,
885 build_decl_overload_real, get_id_2): Constify a char*.
886
887 * search.c (check_final_overrider): Make static.
888
889 * typeck.c (composite_pointer_type): Constify a char*.
890
891 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
892
893 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
894 we're looking at a class.
895
896 * decl.c (lookup_name_real): Set the complain flag if we're
897 looking for a namespace member.
898
899 * lex.c (real_yylex): We can have a number with no digits.
900
901 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
902
903 * search.c (binfo_from_vbase): New fn.
904 * cp-tree.h: Declare it.
905 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
906 from pointer to member of virtual base.
907 * typeck.c (get_delta_difference): Likewise.
908
909 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
910
911 * pt.c (tsubst): Use build_index_type to build in-template array
912 index type. Fixes g++.oliva/dwarf1.C.
913 * decl.c (grokdeclarator): Likewise, just for consistency, as it
914 doesn't seem to trigger the bug without it.
915
916 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
917
918 * typeck2.c (add_exception_specifier): Use complete_type.
919
920 1999-08-06 Mark Mitchell <mark@codesourcery.com>
921
922 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
923 (dump_binary_op): Bulletproof.
924 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
925 * tree.c (search_tree): Don't enumerate all the nodes of classes
926 `1', `2', and `<'; handle them generically. Don't be sorry about
927 "unrecognized tree codes"; just abort.
928 (no_linkage_check): Don't do linkage checks for templates.
929
930 * tree.c (cp_build_qualified_type_real): Handle
931 pointer-to-member-function types correctly.
932
933 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
934
935 * decl.c (pushdecl): Only give an error for shadowing a parm
936 from *this* function.
937
938 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
939
940 * typeck2.c: Update URLs and mail addresses.
941
942 1999-08-04 Nathan Sidwell <nathan@acm.org>
943
944 * cp-tree.h (empty_except_spec): New global var.
945 (compexcepttypes): Remove prototype.
946 (comp_except_specs): Prototype new global function.
947 (add_exception_specifier): Prototype new global function.
948 * decl.c (empty_except_spec): Define new global var.
949 (duplicate_decls): Use comp_except_specs, reword error message.
950 (init_decl_processing): Initialize empty_except_spec.
951 Adjust build_exception_variant calls.
952 * parse.y (exception_specification_opt): Use empty_except_spec.
953 (ansi_raise_identifier): Call check_for_new_type.
954 (ansi_raise_identifiers): Use add_exception_specifier.
955 * pt.c (tsubst): Use add_exception_specifier to build exception
956 specifier.
957 * search.c (check_final_overrider): New static function, broken
958 out of get_matching_virtual. Check throw specifiers, reword
959 diagnostics.
960 (get_matching_virtual): Use check_final_overrider.
961 * tree.c (build_exception_variant): Use comp_except_specs.
962 * typeck.c (compexcepttypes): Remove.
963 (comp_except_types): New static function, helper for
964 comp_except_specs. Compare two types as exception specifiers.
965 (comp_except_specs): New global function, compare two exception
966 specifiers.
967 (comptypes): Adjust for comp_except_specs.
968 * typeck2.c (add_exception_specifier): New global function.
969
970 * class.c (check_for_override): Reword error message.
971
972 1999-08-03 Nathan Sidwell <nathan@acm.org>
973
974 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
975 * cp-tree.h (struct lang_type): Added non_pod_class flag.
976 (CLASSTYPE_NON_POD_P): New macro to access it.
977 * class.c (finish_struct_1): Determine non-PODness.
978 Check for arrays of pointers (-Weffc++).
979 Remove array inspection duplicated code.
980 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
981 Use CLASSTYPE_NON_POD_P.
982
983 1999-08-03 Nathan Sidwell <nathan@acm.org>
984
985 * class.c (duplicate_tag_error): Preserve template information.
986
987 1999-08-03 Nathan Sidwell <nathan@acm.org>
988
989 * decl.c (start_enum): Show location of previous definition.
990 * parse.y (enumlist_opt): New reduction.
991 (structsp): Simplify enum rules to use enumlist_opt.
992
993 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
994
995 * lex.c (yyprint): Handle PFUNCNAME.
996
997 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
998 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
999
1000 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
1001
1002 * decl.c (start_decl): Set attributes before duplicate_decls call.
1003
1004 1999-08-02 Mark Mitchell <mark@codesourcery.com>
1005
1006 * Make-lang.in (CXX_SRCS): Add dump.c.
1007 * Makefile.in (CXX_OBJS): Add dump.o.
1008 (dump.o): New target.
1009 * cp-tree.h (DECL_CONV_FN_P): Document.
1010 (DECL_OVERLOADED_OPERATOR_P): New function.
1011 (TYPE_PTRMEM_CLASS_TYPE): New macro.
1012 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1013 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
1014 (ASM_VOLATILE_P): New macro.
1015 (STMT_LINENO): Likewise.
1016 (cp_namespace_decls): New function.
1017 (dump_node_to_file): New function.
1018 * decl.c (cp_namespace_decls): New function.
1019 (walk_namespaces_r): Use it.
1020 (wrapup_globals_for_namespace): Likewise.
1021 * decl2.c (flag_dump_translation_unit): New variable.
1022 (lang_decode_option): Handle -fdump-translation-unit.
1023 (finish_file): If flag_dump_translation_unit is set, dump the
1024 translation unit.
1025 * dump.c: New file.
1026 * lang-options.h: Add -fdump-translation-unit.
1027 * pt.c (tsubst_template_parms): Robustify.
1028 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
1029 (tsubst_expr): Use STMT_LINENO.
1030 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
1031 for invalid cv-qualifiers even while building templates.
1032
1033 1999-08-02 Richard Henderson <rth@cygnus.com>
1034
1035 * call.c: Include defaults.h instead of expr.h.
1036 * decl.c: Likewise.
1037 * pt.c: Likewise.
1038 * typeck.c: Include defaults.h.
1039
1040 1999-08-02 Mark Mitchell <mark@codesourcery.com>
1041
1042 * lex.c (errorcount, sorrycount): Don't declare.
1043 * repo.c (errorcount, sorrycount): Likewise.
1044 * typeck2.c (errorcount, sorrycount): Likewise.
1045
1046 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
1047
1048 * call.c (convert_default_arg, build_over_call): Change all uses of
1049 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
1050 Ensure expr.h is included.
1051 * decl.c (grokparams): Ditto.
1052 * pt.c (tsubst_decl): Ditto.
1053 * typeck.c (convert_arguments): Ditto.
1054
1055 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
1056
1057 * class.c (mark_overriders): Fix order of args to overrides.
1058 (warn_hidden): Likewise. Fix for having virtual and non-virtual
1059 functions with the same name.
1060
1061 1999-08-02 Richard Henderson <rth@cygnus.com>
1062
1063 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
1064
1065 1999-08-01 Mark Mitchell <mark@codesourcery.com>
1066
1067 * call.c (build_conditional_expr): Fix typo in comment.
1068
1069 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
1070
1071 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
1072 case_stack; use in_control_zone_p.
1073 * typeck.c (c_expand_return): Likewise.
1074
1075 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
1076
1077 * except.c (catch_clauses): Delete declaration.
1078
1079 1999-07-30 Mark Mitchell <mark@codesourcery.com>
1080
1081 * call.c (build_conditional_expr): Call convert_from_reference to
1082 avoid reference/non-reference type confusion. Fix typo.
1083
1084 1999-07-30 Richard Henderson <rth@cygnus.com>
1085
1086 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
1087 * cp-tree.h (initializer_constant_valid_p): Remove.
1088
1089 1999-07-28 Mark Mitchell <mark@codesourcery.com>
1090
1091 * call.c (conditional_conversion): Don't build BASE_CONVs for
1092 conversions between things that have the same type.
1093 (build_conditional_expr): Tweak.
1094 (convert_like): Some BASE_CONVs really do require the generation
1095 of code.
1096
1097 * init.c (perform_member_init): Don't go through build_modify_expr
1098 for simple initializations.
1099
1100 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
1101
1102 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
1103 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
1104 virtual functions and MI. Simplify.
1105
1106 * method.c: Remove prototype for largest_union_member.
1107 * pt.c (determine_specialization): Fix uninitialized warning.
1108 * lex.c (real_yylex): Likewise.
1109
1110 1999-07-27 Mark Mitchell <mark@codesourcery.com>
1111
1112 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
1113 here too.
1114
1115 * cp-tree.h (BINFO_VIRTUALS): Document new format.
1116 * class.c (modify_one_vtable): Change prototype accordingly.
1117 (modify_all_vtables): Likewise.
1118 (modify_all_direct_vtables): Likewise.
1119 (modify_all_indirect_vtables): Likewise.
1120 (build_vtable_entry_for_fn): New function.
1121 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
1122 (modify_vtable_entry): Likewise.
1123 (add_virtual_function): Likewise.
1124 (build_vtbl_initializer): New function.
1125 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
1126 (fixup_vtable_deltas1): Likewise.
1127 (fixup_vtable_deltas): Likewise.
1128 (override_one_vtable): Likewise.
1129 (finish_struct_1): Likewise.
1130
1131 * error.c (dump_expr): Likewise.
1132 * search.c (get_abstract_virtuals_1): Likewise.
1133 (get_abstract_virtuals): Likewise.
1134 (expand_upcast_fixups): Likewise.
1135 * tree.c (debug_binfo): Likewise.
1136 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
1137 __pure_virtual here.
1138
1139 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1140
1141 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
1142 as per 1999-07-26 change.
1143
1144 * typeck.c (c_sizeof): Don't allow non-static data members.
1145 (expr_sizeof): Likewise.
1146
1147 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
1148
1149 * input.c (feed_input): Only touch lineno and input_filename
1150 if !USE_CPPLIB. Save the old values before setting the new ones.
1151
1152 * input.c (feed_input): Add file, line parms.
1153 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
1154 (real_yylex): Check linemode before input_redirected().
1155
1156 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
1157 from op new to warning.
1158
1159 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1160
1161 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
1162 * call.c: All uses changed.
1163 * typeck.c: Likewise.
1164
1165 1999-07-26 Nathan Sidwell <nathan@acm.org>
1166
1167 * exception.cc (__cplus_type_matcher): Match __eh_matcher
1168 prototype.
1169
1170 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1171
1172 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
1173 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
1174 (strip_top_quals): Declare.
1175 (ncp_convert): Likewise.
1176 (type_after_usual_arithmetic_converions): Likewise.
1177 (composite_pointer_type): Likewise.
1178 * call.c (strip_top_quals): Don't make it static.
1179 (promoted_arithmetic_type_p): New function.
1180 (conditional_conversion): Likewise.
1181 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
1182 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
1183 for converting a type to itself.
1184 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
1185 (implicit_conversion): Make sure the from and to types are
1186 complete.
1187 (add_builtin_candidate): Correct handling of ?: operator.
1188 (add_builtin_candidates): Improve documentation.
1189 (build_conditional_expr): New function.
1190 (can_convert): Implement in terms of can_convert_arg.
1191 (ncp_convert): New function.
1192 * typeck.c (type_after_usual_arithmetic_conversions): New
1193 function, split out from common_type.
1194 (composite_pointer_type): New function, split out from
1195 build_conditional_expr.
1196 (common_type): Use type_after_usual_arithmetic_conversions.
1197 Remove redundant attribute merging.
1198 (comptypes): Tidy. Handle COMPLEX_TYPE.
1199 (build_binary_op_nodefault): Use null_ptr_cst_p.
1200 (build_conditional_expr): Remove.
1201 (convert_for_assignment): Use new conversion functions.
1202
1203 * cp-tree.h (abstract_virtuals_error): Change declaration.
1204 * typeck2.c (abstract_virtuals_error): Check to see if an error
1205 ocurred, and return a boolean value accordingly.
1206 (build_functional_cast): Adjust accordingly.
1207 * class.c (finish_struct_1): Likewise.
1208 * cvt.c (ocp_convert): Likewise.
1209 * decl.c (cp_finish_decl): Likewise.
1210 (grokparams): Likewise.
1211 (grok_op_properties): Likewise.
1212 (start_function): Likewise.
1213 * init.c (build_new_1): Likewise.
1214
1215 * pt.c (unify): Don't get confused by pointers-to-member functions.
1216
1217 * search.c (build_cplus_new): Robustify.
1218
1219 1999-07-24 Richard Henderson <rth@cygnus.com>
1220
1221 * decl.c (ptr_type_node, va_list_type_node): New.
1222 * gxx.gperf (__builtin_va_arg): New.
1223 * parse.y (VA_ARG): New token.
1224 (unary_expr): Recognize it.
1225
1226 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
1227
1228 * g++FAQ.texi: Deleted per Joe Buck's request.
1229 * Makefile.in: Corresponding changes.
1230
1231 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
1232
1233 * lex.c: Sync with C frontend.
1234 (whitespace_cr): New fn.
1235 (skip_white_space): Use it.
1236 (init_parse): Reorder.
1237 (yyprint): Support CONSTANT.
1238 (pragma_getc, pragma_ungetc): Bring back.
1239 (read_line_number): Change in_system_header directly.
1240 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
1241 (parse_float): Update to C version.
1242 (yylex): Handle '$' under the letter case.
1243 Remove looking_for_typename handling.
1244 Support hex floating point constants.
1245 Follow C's lead for choosing type of integer constants.
1246 Rearrange stuff to match C frontend.
1247 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
1248 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
1249
1250 1999-07-23 Mark Mitchell <mark@codesourcery.com>
1251
1252 * call.c (reference_binding): Tweak.
1253 (mayble_handle_implicit_object): Use direct_reference_binding to
1254 create the right implicit conversion sequence.
1255
1256 1999-07-22 Mark Mitchell <mark@codesourcery.com>
1257
1258 * pt.c (convert_nontype_argument): Don't call decl_constant_value
1259 if we're converting to a reference type.
1260
1261 * call.c (NEED_TEMPORARY_P): New macro.
1262 (standard_conversion): Set it, for derived-to-base conversions.
1263 (reference_related_p): New function.
1264 (reference_compatible_p): Likewise.
1265 (convert_class_to_reference): Likewise.
1266 (direct_reference_binding): Likewise.
1267 (reference_binding): Rework for standards-compliance.
1268 (convert_like): Adjust accordingly.
1269 (maybe_handle_ref_bind): Simplify; the right conversion sequences
1270 are now built up in reference_binding.
1271 (initialize_reference): New function.
1272 * cp-tree.h (ICS_USER_FLAG): Document.
1273 (ICS_THIS_FLAG): Likewise.
1274 (ICS_BAD_FLAG): Likewise.
1275 (NEED_TEMPORARY_P): Likewise.
1276 (cp_lvalue_kind): New type.
1277 (real_lvalue_p): Return it.
1278 * error.c (dump_expr): Provide more accurate representation for
1279 AGGR_INIT_EXPRs.
1280 * init.c (expand_default_init): Do not try to perform implicit
1281 conversions for a brace-enclosed initializer.
1282 * search.c (lookup_conversions): Document.
1283 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
1284 appropriately.
1285 (real_lvalue_p): Adjust accordingly.
1286 (lvalue_p): Likewise.
1287 (build_cplus_new): Don't allow the creation of an abstract class.
1288 * typeck.c (convert_for_initialization): Use initialize_reference.
1289
1290 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
1291
1292 * lex.c (real_yylex) : Correct the test for overflow when lexing
1293 integer literals.
1294
1295 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
1296
1297 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
1298 not DECL_BUILT_IN, to determine if a function is internally declared.
1299 (duplicate_decls): Likewise. Improve handling of builtins.
1300 (push_overloaded_decl): Remove special handling of builtins.
1301
1302 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
1303
1304 * decl.c (grokdeclarator): Pull out decl_constant_value in
1305 templates, too.
1306
1307 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
1308 * cp-tree.h, pt.c, semantics.c: Adjust.
1309 * method.c (largest_union_member): Remove.
1310
1311 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
1312
1313 * lex.c (token_getch, token_put_back): New fns.
1314 (real_yylex): Use them.
1315
1316 * lex.c (lang_init): Generalize.
1317 (lang_init_options): Tell cpplib this is C++.
1318 (nextchar): Remove. Replace uses with put_back.
1319 (skip_white_space): Handle linemode here. Optimize for cpplib.
1320 (extend_token_buffer_to): New fn.
1321 (extend_token_buffer): Use it.
1322 (read_line_number, check_newline): Just deal with tokens.
1323 (real_yylex): More cpplib optimizations. Simplify. Don't produce
1324 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
1325 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
1326 * parse.y (PAREN_STAR_PAREN): Remove.
1327 * input.c: Don't use the putback machinery with cpplib.
1328 (sub_getch): Fold back into getch.
1329 (getch): Don't handle linemode here.
1330 (feed_input): Unget any text in the token buffer.
1331
1332 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
1333 nextyychar, nextyylval): Remove.
1334
1335 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
1336 Jason Merrill <jason@yorick.cygnus.com>
1337
1338 * lex.c (indent_level): New variable.
1339 (init_parse): Set cpp_token to CPP_DIRECTIVE.
1340 (consume_string): Make this smart about USE_CPPLIB.
1341 (yyungetc): Use put_back function.
1342 (pragma_getc, pragma_ungetc): Functions deleted.
1343 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
1344 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
1345 pragma_ungetc.
1346 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
1347 Also, clean up cases where we redundantly set token_buffer[0].
1348 (read_line_number): New fn.
1349 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
1350 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
1351 (sub_getch): Conditionalize out code that's not appropriate if
1352 USE_CPPLIB.
1353 (put_back): Rewrite in case USE_CPPLIB is defined.
1354 (input_redirected): Ditto.
1355
1356 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
1357
1358 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
1359 c_global_trees and accessor macros defined in c-common.h.
1360 (cp_tree_index): New enumeration.
1361 (cp_global_trees): Declare new array. Add accessor macros for it, and
1362 delete declarations of tree nodes replaced by it.
1363 (builtin_function): Delete macro, add declaration for new function.
1364 Include c-common.h.
1365 * decl.c: Delete definitions for tree nodes that were replaced by
1366 cp_global_trees and c_global_trees.
1367 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
1368 to generate the common builtins here.
1369 (builtin_function): New function.
1370 * decl2.c (abort_fndecl): Delete declaration.
1371 * except.c (expand_builtin_return_address): Delete declaration.
1372 (builtin_return_address_fndecl): Delete variable.
1373 (const_ptr_type_node): Delete declaration.
1374 * lex.c (cons_up_default_function): Delete declaration of
1375 void_list_node.
1376 * parse.y (void_list_node): Delete declaration.
1377 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
1378 Delete variables.
1379 (const_string_type_node): Delete declaration.
1380 * search.c (abort_fndecl): Delete declaration.
1381 * Makefile.in: Update dependencies.
1382
1383 1999-07-19 Mark Mitchell <mark@codesourcery.com>
1384
1385 * pt.c (check_default_tmpl_args): Move test for missing default
1386 arguments here, from ...
1387 (end_template_parm_list): Here.
1388
1389 1999-07-18 Mark Mitchell <mark@codesourcery.com>
1390
1391 * decl.c (lookup_nested_type): Remove.
1392 (pushtag): Don't call it.
1393
1394 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
1395
1396 * Makefile.in (INTERFACE): Bump to 2.
1397
1398 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
1399
1400 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
1401 instructions to gcc.gnu.org. Removed e-mail address.
1402
1403 1999-07-17 Mark Mitchell <mark@codesourcery.com>
1404
1405 * pt.c (determine_specialization): Tighten error-checking.
1406 (end_template_parm_list): Likewise.
1407
1408 1999-07-14 Mark Mitchell <mark@codesourcery.com>
1409
1410 * pt.c (check_default_tmpl_args): Handle friends defined in the
1411 class just like member functions defined in the class.
1412
1413 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
1414 Jason Merrill <jason@yorick.cygnus.com>
1415
1416 * cp-tree.h (struct lang_decl): Added field for storing sorted
1417 FIELD_DECLs (used in TYPE_DECLs).
1418 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
1419 (DECL_SORTED_FIELDS): New macro.
1420 * class.c (method_name_cmp): New function.
1421 (finish_struct_methods): Modified to support sorting and searching
1422 methods.
1423 (finish_struct_anon): Changed code in inner loop to use ELT rather
1424 than UELT (which required an extra indirection for every reference).
1425 (field_decl_cmp): New function to support sorting FIELD_DECLs.
1426 (finish_struct_1): Sort fields.
1427 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
1428 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
1429 Also, switch to using array indexing rather than a changing pointer.
1430 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
1431 DECL_SORTED_FIELDS.
1432
1433 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
1434
1435 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
1436 casts in system headers or extern "C" blocks.
1437
1438 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
1439 errors to pedwarn.
1440
1441 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
1442
1443 * decl2.c (write_virtuals): Deleted declaration.
1444 * cp-tree.h (write_virtuals): Deleted extern declaration.
1445 * class.c (finish_struct_1): Removed #if 0'd code that mentions
1446 write_virtuals.
1447 * semantics.c (begin_class_definition): Rewrite code to not depend
1448 on write_virtuals.
1449
1450 * lex.c (cp_pragma_interface): New function.
1451 (cp_pragma_implementation): Likewise.
1452 (handle_cp_pragma): Call them.
1453
1454 * typeck.c (comptypes): Simplify C code in look_hard.
1455
1456 * xref.c (PALLOC): Use xcalloc, not calloc.
1457 (SALLOC): Use xmalloc, not malloc.
1458
1459 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
1460
1461 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
1462 is NO_DEBUG.
1463
1464 * decl.c (duplicate_decls): If a redeclaration doesn't match the
1465 initial declaration, then don't save the inline info and by all
1466 means don't mark the function as a builtin function.
1467
1468 * decl.c (lookup_name_real): Set NONCLASS to 1 if
1469 CURRENT_CLASS_TYPE is 0.
1470
1471 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
1472 NULL_TREE.
1473
1474 * ptree.c (print_lang_type): Added vtable-needs-writing.
1475
1476 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
1477
1478 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
1479
1480 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
1481
1482 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
1483 Merged into c-common.
1484
1485 1999-07-05 Dave Brolley <brolley@cygnus.com>
1486
1487 * lex.c (errorcount): Declare it.
1488 (finish_parse): Update errorcount for when using CPPLIB.
1489
1490 1999-07-05 Mark Mitchell <mark@codesourcery.com>
1491
1492 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
1493 parameters.
1494 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
1495 * decl.c (push_class_binding): Use it.
1496 (lookup_name_real): Likewise.
1497
1498 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
1499
1500 * cp-tree.h (widest_integer_literal_type_node,
1501 widest_unsigned_literal_type) : New.
1502 * decl.c (widest_integer_literal_type_node,
1503 widest_unsigned_literal_type) : New.
1504 (init_decl_processing): Handle/use the two new types.
1505 * lex.c (real_yylex): Same.
1506 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
1507 Same.
1508
1509 1999-07-01 Mark Mitchell <mark@codesourcery.com>
1510
1511 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
1512 to anonymous cv-qualified types.
1513
1514 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
1515
1516 * lex.c (real_yylex) : Change integer literal overflow handling to
1517 be like c-lex.c.
1518
1519 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
1520
1521 1999-06-28 Richard Henderson <rth@cygnus.com>
1522
1523 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
1524
1525 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
1526
1527 * error.c (dump_type_real): Handle TREE_LIST again.
1528
1529 * typeck.c (comp_target_parms): Don't complain about
1530 converting from () to (...) if !flag_strict_prototype.
1531
1532 * decl.c (grokdeclarator): Update the names of all variants when
1533 de-anonymizing.
1534
1535 1999-06-21 Mark Mitchell <mark@codesourcery.com>
1536
1537 * init.c (expand_aggr_vbase_init): Rename to
1538 construct_virtual_bases. Conditionalize construction here,
1539 rather than ...
1540 (emit_base_init): Here.
1541
1542 1999-06-19 Mark Mitchell <mark@codesourcery.com>
1543
1544 * semantics.c (finish_asm_statement): Apply decay conversions to
1545 input operands.
1546
1547 * decl.c (expand_static_init): When building an anonymous function
1548 for use with atexit, compute its body before and after entering
1549 the function.
1550
1551 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
1552 EXIT_EXPR.
1553
1554 1999-06-18 Mark Mitchell <mark@codesourcery.com>
1555
1556 * init.c (expand_aggr_vbase_init): Add flag parameter.
1557 (build_partial_cleanup_for): Remove, inlining into ..
1558 (expand_cleanup_for_base): ... here. Take flag parameter.
1559 (emit_base_init): Pass the in_chrg parameter to
1560 emit_aggr_vbase_init.
1561 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
1562
1563 1999-06-16 Mark Mitchell <mark@codesourcery.com>
1564
1565 * decl2.c (import_export_decl): Use same_type_p, rather than
1566 relying on pointer-equality for types.
1567
1568 * method.c (do_build_copy_constructor): Simplify.
1569
1570 * call.c (build_method_call): Remove bogus code for two-argument
1571 delete.
1572 * init.c (build_new_1): Expand on comment, and remove dead code.
1573
1574 * init.c (expand_cleanup_for_base): New function, split out
1575 from ...
1576 (emit_base_init): Here.
1577 (expand_aggr_vbase_init): Use it.
1578
1579 1999-06-15 Mark Mitchell <mark@codesourcery.com>
1580
1581 * cp-tree.h (class_cache_firstobj): Declare.
1582 (maybe_push_cache_obstack): Rename to push_cache_obstack.
1583 * class.c (permanent_obstack): Remove declaration.
1584 (class_cache_firstobj): Make it global.
1585 (add_method): Don't use permanent_obstack directly.
1586 (pushclass): Only free the class_cache_obstack if we know how far
1587 back to free it.
1588 (maybe_push_cache_obstack): Rename to push_cache_obstack.
1589 * decl.c: Remove dead comment.
1590 (saved_scope): Add class_cache_firstobj.
1591 (push_to_top_level): Save it.
1592 (pop_from_top_level): Restore it.
1593 (push_class_level_binding): Use push_cache_obstack, not
1594 maybe_push_cache_obstack.
1595 * search.c (push_class_decls): Likewise.
1596
1597 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
1598
1599 * pt.c (tsubst_friend_function): Push into namespace of friend
1600 function before pushdecl'ing it.
1601
1602 1999-06-14 Nathan Sidwell <nathan@acm.org>
1603
1604 * call.c (build_new_op): Remove REF_BIND from all operands.
1605
1606 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
1607
1608 * init.c (build_new_1): Look up operator delete even if there was
1609 no explicit new placement.
1610
1611 1999-06-08 Nathan Sidwell <nathan@acm.org>
1612
1613 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
1614 of ...
1615 (build_throw): ... here. Call it.
1616 (process_start_catch_block): Call it.
1617
1618 1999-06-07 Mark Mitchell <mark@codesourcery.com>
1619
1620 * search.c (convert_pointer_to_single_level): Reimplement without
1621 using get_binfo.
1622
1623 1999-06-06 Mark Mitchell <mark@codesourcery.com>
1624
1625 * method.c (is_back_referenceable_type): Back-reference bools when
1626 not squangling.
1627
1628 1999-06-07 Dave Brolley <brolley@cygnus.com>
1629
1630 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
1631 * input.c (putback_buffer): New structure type.
1632 (putback): Replaces putback_char member.
1633 (putback): Replaces putback_char static variable.
1634 (feed_input): Use putback.
1635 (end_input): Use putback.
1636 (sub_getch): Use putback.
1637 (put_back): Use putback.
1638
1639 1999-06-05 Mark Mitchell <mark@codesourcery.com>
1640
1641 * decl.c (grokdeclarator): Fix typo in last change.
1642
1643 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
1644
1645 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
1646 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
1647
1648 1999-06-04 Nathan Sidwell <nathan@acm.org>
1649
1650 * except.c (build_throw): Check throw expression validity.
1651
1652 1999-06-03 Mark Mitchell <mark@codesourcery.com>
1653
1654 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
1655 just because flag_signed_bitfields is false.
1656
1657 1999-06-03 Nathan Sidwell <nathan@acm.org>
1658
1659 * semantics.c (begin_class_definition): Update the struct's
1660 location here ...
1661 * class.c (finish_struct): ... rather than here.
1662
1663 * decl.c (make_typename_type): Don't rely on uninitialized
1664 variable.
1665
1666 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1667
1668 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
1669
1670 1999-05-31 Mark Mitchell <mark@codesourcery.com>
1671
1672 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
1673 and friends rather than messing with current_obstack directly.
1674 (cp_build_qualified_type_real): Rework ARRAY_TYPE
1675 allocation to match practice throughout the rest of the
1676 compiler.
1677
1678 1999-05-30 Mark Mitchell <mark@codesourcery.com>
1679
1680 * lex.c (make_lang_type): Create TYPE_BINFO for
1681 TEMPLATE_TYPE_PARMs just like for non-template types.
1682
1683 * decl.c (start_decl): Move checks on initialization to ...
1684 (cp_finish_decl): Here. Tidy formatting slightly.
1685
1686 1999-05-28 Mark Mitchell <mark@codesourcery.com>
1687
1688 * decl.c (add_binding): Don't complain about a redeclaration of a
1689 semantically identical typedef in a local scope.
1690
1691 1999-05-28 Nathan Sidwell <nathan@acm.org>
1692
1693 * decl.c (complete_array_type): Allocate off same obstack. Fix
1694 DO_DEFAULT comment to match reality.
1695
1696 * friend.c (make_friend_class): Fix diagnostic typo.
1697
1698 1999-05-28 Mark Mitchell <mark@codesourcery.com>
1699
1700 * decl.c (lookup_namespace_name): Handle getting a
1701 TEMPLATE_ID_EXPR.
1702 (expand_static_init): Don't call pushdecl for implicitly declared
1703 `atexit' used to register destructors.
1704
1705 1999-05-25 Mark Mitchell <mark@codesourcery.com>
1706
1707 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
1708 intialize a vtable.
1709
1710 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
1711 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
1712 by combining TEMPLATE_INFO and LEVEL into a single union.
1713 (DECL_TEMPLATE_INFO): Reformat.
1714 (DECL_SAVED_TREE): Document.
1715 (DECL_TEMPLATE_INJECT): Remove.
1716 * class.c (finish_struct): Remove code to deal with
1717 DECL_TEMPLATE_INJECT.
1718
1719 * decl.c (maybe_process_template_type_declaration): Handle all new
1720 types in templates uniformly.
1721 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
1722 DECL_CONTEXT.
1723 * pt.c (lookup_template_class): Inject template instantiations of
1724 forward-declarations.
1725 (instantiate_class_template): Remove code processing
1726 DECL_TEMPLATE_INJECT.
1727
1728 * pt.c (lookup_template_class): Tweak lookup to find member
1729 templates.
1730
1731 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
1732 ASM_CV_QUAL.
1733 * semantics.c (finish_asm_stmt): Make strings permanent if they're
1734 used in a template.
1735
1736 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
1737
1738 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
1739 parts of pointer to data member types.
1740
1741 1999-05-24 Mark Mitchell <mark@codesourcery.com>
1742
1743 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
1744 and then make it look like `abort'. Just use `abort' instead.
1745
1746 * typeck.c (build_static_cast): Don't allow static_casts that cast
1747 away constness.
1748 (casts_away_constness_r): New function.
1749 (casts_away_constness): Likewise.
1750
1751 * decl.c (lookup_tag): Remove code no longer needed after
1752 name-lookup improvements.
1753 * decl2.c (handle_class_head): Make error-recovery more robust.
1754 * friend.c (make_friend_class): Reject templated typename types.
1755 * lex.c (is_global): A template parameter isn't global.
1756 * parse.y (class_head): Robustify.
1757 * parse.c: Regenerated.
1758
1759 1999-05-22 Mark Mitchell <mark@codesourcery.com>
1760
1761 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
1762 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
1763
1764 * cp-tree.h (push_nested_namespace): Declare.
1765 (pop_nested_namespace): Likewise.
1766 * decl.c (push_nested_namespace): New function.
1767 (pop_nested_namespace): Likewise.
1768 * pt.c (instantiate_class_template): Use them.
1769
1770 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
1771
1772 * cp-tree.h (cplus_expand_constant): Declare.
1773 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
1774 converted from one pointer-to-object type to another.
1775 * expr.c (cplus_expand_constant): Don't make it static.
1776 * typeck.c (build_component_ref): Don't crash when presented with
1777 a component which is a TEMPLATE_DECL.
1778 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
1779 cast from a pointer-to-member constant to its own type does not
1780 result in a valid non-type template argument.
1781
1782 1999-05-21 Mark Mitchell <mark@codesourcery.com>
1783 Nathan Sidwell <nathan@acm.org>
1784
1785 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
1786 * cp-tree.h: Fix typo in documentation on pointers-to-members.
1787 (cp_build_qualified_type): Make it a macro.
1788 (cp_build_qualified_type_real): Declare.
1789 * decl.c (grokdeclarator): Remove misleading comment. Avoid
1790 problem with template parameters and restrict-qualification.
1791 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
1792 * hash.h: Regenerated.
1793 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
1794 the enumeration.
1795 (NORID): Remove definition.
1796 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
1797 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
1798 (fn_type_unification): Check that the function type resulting from
1799 the deduction is legal.
1800 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
1801 (unify): Use cp_build_qualified_type_real.
1802 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
1803 (cp_build_qualified_type): Rename to ...
1804 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
1805 and modify appropriately.
1806
1807 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
1808 reveal optimization opportunities.
1809
1810 * pt.c (tsubst): Don't issue error messages when we're not
1811 complaining, even if we see a qualified function type.
1812 (check_cv_quals_for_unify): Don't allow a qualified function
1813 type.
1814
1815 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
1816
1817 * class.c (instantiate_type): Downgrade errors for object-dependent
1818 memfn refs to pedwarn.
1819
1820 1999-05-20 Mark Mitchell <mark@codesourcery.com>
1821
1822 * decl.c (grokdeclarator): Don't treat [] as indicating a
1823 zero-sized array in a typedef.
1824
1825 * call.c (build_object_call): Don't look at DECL_NAME for a type.
1826 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
1827 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
1828
1829 * pt.c (for_each_template_parm): Rework to match documentation.
1830 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
1831
1832 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
1833
1834 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
1835
1836 * class.c (finish_base_struct): Allow non-COM bases for COM classes
1837 except at the leftmost position.
1838 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
1839 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
1840 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
1841
1842 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
1843 (build_cplus_new): Make sure that what we return is of the right type.
1844
1845 1999-05-20 Mark Mitchell <mark@codesourcery.com>
1846
1847 * cp-tree.h (make_ptrmem_cst): New function.
1848 * expr.c (cplus_expand_constant): Split out from ...
1849 (cplus_expand_expr): Here. Use cplus_expand_constant.
1850 (init_cplus_expand): Set lang_expand_constant.
1851 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
1852
1853 * tree.c (make_ptrmem_cst): Define.
1854 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
1855 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
1856
1857 1999-05-19 Mark Mitchell <mark@codesourcery.com>
1858
1859 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
1860
1861 * decl2.c (start_static_storage_duration_function): Fix comment.
1862 (finish_file): Create static storage duration functions lazily.
1863
1864 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
1865
1866 Implement anonymous structs.
1867 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
1868 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
1869 * class.c (finish_struct_1): Remove redundant check for anon struct.
1870 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
1871 (check_tag_decl): Check for anonymous struct here.
1872 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
1873 * init.c (sort_member_init, emit_base_init): Handle getting fields
1874 as well as names in current_member_init_list.
1875 (perform_member_init): Handle getting an anon aggr.
1876 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
1877 (do_build_copy_constructor): Likewise.
1878
1879 1999-05-19 Mark Mitchell <mark@codesourcery.com>
1880
1881 * tree.c (cp_build_qualified_type): Don't allow qualified function
1882 types.
1883
1884 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
1885
1886 * gxxint.texi: Fix typo.
1887
1888 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
1889
1890 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
1891 * class.c (finish_struct_1): Use CLASS_TYPE_P.
1892 * ptree.c (print_lang_type): Likewise.
1893 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
1894 IS_AGGR_TYPE_CODE.
1895 * typeck2.c (digest_init): Likewise.
1896
1897 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
1898
1899 * call.c (joust): Compare the types of the conv ops, not the
1900 target types of the conversions.
1901
1902 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
1903
1904 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
1905 was not given.
1906
1907 1999-05-17 Mark Mitchell <mark@codesourcery.com>
1908
1909 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
1910 * decl.c (grokfndecl): Don't allow inline declarations of friend
1911 template specializations, or friend template specializations with
1912 default arguments.
1913 * pt.c (tsubst): Handle substitution into array types that does
1914 not yield a fixed upper bound, even when not processing a
1915 template.
1916 (tsubst_copy): Deal with the fact that the second operand to a
1917 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
1918 * search.c (marked_pushdecls_p): Don't descend into
1919 TEMPLATE_TYPE_PARMs and the like.
1920 (unmarked_pushdecls_p): Likewise.
1921
1922 * call.c (build_over_call): Don't throw away
1923 initializations/copies of empty classes; use MODIFY_EXPR and
1924 INIT_EXPR as for non-empty classes.
1925 * class.c (finish_struct_1): Put the padding byte for an empty
1926 class on the TYPE_NONCOPIED_PARTS list for the class.
1927
1928 1999-05-16 Mark Mitchell <mark@codesourcery.com>
1929
1930 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
1931 indicate a reference to a field that is a qualified name.
1932
1933 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
1934
1935 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
1936 ASM_OUTPUT_CONSTRUCTOR.
1937
1938 * friend.c (do_friend): Add attrlist arg. Remove support for
1939 getting a non-decl as 'decl'.
1940 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
1941 rtl.
1942 (grokdeclarator): Adjust.
1943 * cp-tree.h: Adjust.
1944
1945 1999-05-16 Mark Mitchell <mark@codesourcery.com>
1946
1947 * cp-tree.h (permanent_p): New function.
1948 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
1949 possibly complex tree node.
1950 * tree.c (mapcar): Adjust comments, and follow coding standards in
1951 conditional.
1952 (permanent_p): New function.
1953
1954 1999-05-13 Per Bothner <bothner@cygnus.com>
1955
1956 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
1957 primitive Java types, if we actually see `extern "Java"'.
1958
1959 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1960
1961 * lang-specs.h: Pass -$ to the preprocessor.
1962
1963 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
1964
1965 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
1966 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
1967 (resolve_offset_ref): Don't handle a raw baselink.
1968 * cvt.c (build_expr_type_conversion): Likewise.
1969 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
1970 convert_for_initialization): Likewise.
1971 * class.c (instantiate_type): Handle seeing a baselink under an
1972 OFFSET_REF.
1973 * error.c (dump_expr): Likewise.
1974 * pt.c (for_each_template_parm): Likewise.
1975 (resolve_overloaded_unification): Likewise.
1976 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
1977 * typeck.c (expr_sizeof): Also complain about other permutations
1978 of overloaded functions.
1979
1980 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
1981
1982 * init.c (resolve_offset_ref): Don't return a raw method.
1983 Use BASELINK_P.
1984 * typeck.c (decay_conversion): Don't handle a raw method.
1985 Resolve all OFFSET_REFs.
1986 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
1987 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
1988 same_type_p for pmf bits. Don't use build_binary_op to compare
1989 raw pointers to methods.
1990 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
1991 to decide when to call resolve_offset_ref.
1992 (build_c_cast, convert_for_initialization): Likewise.
1993 * cvt.c (build_expr_type_conversion): Likewise.
1994
1995 1999-05-06 Nathan Sidwell <nathan@acm.org>
1996
1997 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
1998
1999 1999-05-05 Mark Mitchell <mark@codesourcery.com>
2000
2001 * decl2.c (start_objects): Don't let static constructors and
2002 destructors get inlined.
2003
2004 * parse.y (nested_name_specifier): Make sure ordinary types are
2005 complete, just like template types.
2006 * parse.c: Regenerated.
2007
2008 * pt.c (check_explicit_specialization): Improve error messages.
2009
2010 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
2011
2012 * typeck.c (string_conv_p): Use same_type_p to check whether we
2013 try to convert between char and wchar_t.
2014
2015 1999-05-03 Mark Mitchell <mark@codesourcery.com>
2016
2017 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
2018 lookup to error_mark_node here.
2019 (lookup_member): Revise documentation. Add comments. Don't set
2020 the TREE_TYPE to error_mark_node here, and don't build up an extra
2021 TREE_LIST for ambiguous lookups.
2022 (setup_class_bindings): Adjust accordingly.
2023 (push_class_decls): Revise out-of-date comments.
2024
2025 * typeck.c (build_const_cast): Tighten checks for legality.
2026
2027 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
2028
2029 * init.c (build_member_call): Lookup names coming from
2030 namespace-scoped LOOKUP_EXPR.
2031
2032 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
2033
2034 * gxxint.texi: Add documentation for 'I'.
2035
2036 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
2037
2038 * tinfo.cc (operator==): Qualify type_info with std::.
2039
2040 1999-05-02 Mark Mitchell <mark@codesourcery.com>
2041
2042 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
2043 (DECL_COMDAT): Remove definition.
2044
2045 1999-05-01 Mark Mitchell <mark@codesourcery.com>
2046
2047 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
2048 change.
2049
2050 1999-04-30 Mark Mitchell <mark@codesourcery.com>
2051
2052 * class.c (build_vtable): Use build_lang_decl when building
2053 vtables, not just build_decl.
2054 (prepare_fresh_vtable): Likewise.
2055 * decl.c (wrapup_globals_for_namespace): Mark vtables as
2056 DECL_EXTERNAL when calling wrapup_global_declarations.
2057 * decl2.c (priority_info_s): Add initializations_p and
2058 destructions_p members.
2059 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
2060 when deciding what vtables to write out.
2061 (ssdf_decls): New variable.
2062 (ssdf_decls_used): Likewise.
2063 (start_static_storage_duration_function): Deal with being called
2064 multiple times. Avoid inlining this function.
2065 (generate_inits_for_priority): Deal with reuse of priority map.
2066 (get_priority_info): Clear initializations_p and destructions_p.
2067 (do_static_initialization): Tweak comment.
2068 (do_static_destruction): Likewise. Fix condition on sentries for
2069 destruction.
2070 (generate_ctor_or_dtor_function): Call all of the static storage
2071 duration functions.
2072 (generate_ctor_or_dtor_function_for_priority): Check
2073 initializations_p and destructions_p to see what priorities need
2074 initialization functions.
2075 (finish_file): Rework to generate multiple static storage duration
2076 functions, rather than just one.
2077
2078 * typeck.c (build_const_cast): Tweak last change to handle
2079 templates correctly.
2080
2081 * typeck.c (build_const_cast): Disallow use of const_cast to
2082 anything but a pointer or reference type.
2083
2084 1999-04-30 Nathan Sidwell <nathan@acm.org>
2085
2086 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
2087 signature type.
2088
2089 1999-04-29 Mark Mitchell <mark@codesourcery.com>
2090
2091 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
2092 (finish_file): Indent comments properly.
2093
2094 1999-04-29 Richard Henderson <rth@cygnus.com>
2095
2096 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
2097 (do_static_destruction): Likewise.
2098
2099 1999-04-29 Nathan Sidwell <nathan@acm.org>
2100
2101 * cp-tree.h (TYPE_NOTHROW_P): New macro.
2102 * decl2.c (delete_sanity): Warn on deleting void *.
2103 * init.c (build_new_1): Use TYPE_NOTHROW_P.
2104 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
2105 throwing operator new.
2106
2107 1999-04-28 Nathan Sidwell <nathan@acm.org>
2108
2109 * cp-tree.h (build_component_addr): Remove prototype.
2110 * typeck.c (build_component_addr): Make static. Remove MSG
2111 argument.
2112 (build_component_addr): Remove MSG parameter, clean up
2113 comment.
2114 (build_x_function_call): Use cp_error.
2115 (build_unary_op): Adjust call of build_component_addr.
2116
2117 1999-04-28 Mark Mitchell <mark@codesourcery.com>
2118
2119 * pt.c (tsubst_friend_class): Check for NULL.
2120
2121 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2122
2123 * search.c (binfo_for_vtable): Initialize bfvi.var.
2124
2125 1999-04-27 Nathan Sidwell <nathan@acm.org>
2126
2127 * rtti.c (build_x_typeid): Check rtti is enabled.
2128
2129 1999-04-26 Mark Mitchell <mark@codesourcery.com>
2130
2131 * search.c (is_subobject_of_p): Make sure we're looking at the
2132 right baseclasses.
2133
2134 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
2135
2136 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
2137
2138 1999-04-23 Mark Mitchell <mark@codesourcery.com>
2139
2140 * decl2.c (finish_file): Tweak handling of extern inlines so that
2141 they are not unnecessarily put out.
2142
2143 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
2144 such as base classes.
2145
2146 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
2147
2148 * tree.c (build_exception_variant): Fix typo: use the chain of U,
2149 not trying V, while cycling through U.
2150
2151 1999-04-22 Mark Mitchell <mark@codesourcery.com>
2152
2153 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
2154 preserves_first_arg. Enlarge dummy accordingly.
2155 (DECL_TINFO_FN_P): New macro.
2156 (SET_DECL_TINFO_FN_P): Likeiwse.
2157 (DECL_RETURNS_FIRST_ARG): Remove.
2158 (DECL_PRESERVES_THIS): Likewise.
2159 (DECL_INIT_PRIORITY): New macro.
2160 (finish_struct_1): Change prototype.
2161 (cat_namespace_levels): Remove prototype.
2162 (vtable_decl_p): New prototype.
2163 (vtype_decl_p): Likewise.
2164 (sigtable_decl_p): Likewise.
2165 (walk_globals_pred): New typedef.
2166 (walk_globals_fn): Likewise.
2167 (walk_globals): New prototype.
2168 (walk_namespaces_fn): New typedef.
2169 (walk_namespaces): New prototype.
2170 (wrapup_globals_for_namespace): Likewise.
2171 (walk_vtables): Remove prototype.
2172 (walk_sigtables): Likewise.
2173 (instantiate_pending_templates): New prototype.
2174 * class.c (finish_struct_1): Don't return a value.
2175 * decl.h (pending_statics): Remove declaration.
2176 * decl.c (walk_namespaces_r): New function.
2177 (walk_globals_r): Likewise.
2178 (vtable_decl_p): Likewise.
2179 (vtype_decl_p): Likewise.
2180 (sigtable_decl_p): Likewise.
2181 (walk_namespaces): Likewise.
2182 (walk_globals_data): New type.
2183 (walk_globals): New function.
2184 (wrapup_globals_for_namespace): Likewise.
2185 (expand_static_init): Remove assertion. Remove redundancy in
2186 conditional. Don't put static data members in static_aggregates
2187 Tidy.
2188 (finish_function): Remove redundancy in conditional. Don't set
2189 DECL_RETURNS_FIRST_ARG.
2190 (cat_namespace_levels): Remove.
2191 * decl2.c: Include splay-tree.h and varray.h.
2192 (priority_info_s): New structure.
2193 (finish_vtable_vardecl): Change prototype. Adjust for new calling
2194 conventions.
2195 (prune_vtable_vardecl): Likewise.
2196 (finish_sigtable_vardecl): Likewise.
2197 (setup_initp): Remove.
2198 (do_dtors): Remove.
2199 (do_ctors): Remove.
2200 (start_static_storage_duration_function): New function.
2201 (generate_inits_for_priority): Likewise.
2202 (finish_static_storage_duration_function): Likewise.
2203 (get_priority_info): Likewise.
2204 (do_static_initialization): Likewise.
2205 (do_static_destruction): Likewise.
2206 (do_static_initialization_and_destruction): Likewise.
2207 (generate_ctor_or_dtor_function): Likewise.
2208 (generate_ctor_and_dtor_functions_for_priority): Likewise.
2209 (pending_statics): Make it a varray.
2210 (pending_statics_used): New variable.
2211 (saved_inlines): Make it a varray.
2212 (saved_inlines_used): New variable.
2213 (finish_static_data_member): Change method of updating
2214 pending_statics.
2215 (mark_inline_for_output): Remove #if 0'd code. Change method of
2216 updating saved_inlines.
2217 (walk_vtables): Remove.
2218 (walk_sigtables): Likewise.
2219 (import_export_decl): Use DECL_TINFO_FN_P.
2220 (pending_templates): Remove declaration.
2221 (maybe_templates): Likewise.
2222 (static_aggregates_initp): Likewise.
2223 (setup_initp): Likewise.
2224 (finish_objects): Simplify.
2225 (INITIALIZE_P_IDENTIFIER): New macro.
2226 (PRIORITY_IDENTIFIER): New macro.
2227 (SSDF_IDENTIFIER): New macro.
2228 (initialize_p_decl): New variable.
2229 (priority_decl): Likewise.
2230 (ssdf_decl): Likewise.
2231 (priority_info_map): Likewise.
2232 (finish_file): Recode output of static intializers and other
2233 file-scope finalization tasks.
2234 * error.c (OB_END_TEMPLATE_ID): New macro.
2235 (dump_type_real): Use it.
2236 (dump_decl): Likewise.
2237 (dump_function_name): Likewise.
2238 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
2239 interface.
2240 (check_newline): Use walk_globals, not walk_vtables.
2241 * pt.c (pending_tempalte_expansions): Remove.
2242 (set_vardecl_interface_info): Likewise.
2243 (pending_templates): Make static.
2244 (maybe_templates): Likewise.
2245 (instantiate_class_template): Adjust call to finish_struct_1.
2246 (instantiate_pending_templates): New function.
2247 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
2248 * tree.c (static_aggregates_initp): Remove.
2249 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
2250 instead.
2251 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
2252
2253 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
2254 with the RTL code RETURN.
2255 * hash.h: Regenerated.
2256 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
2257 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
2258 * parse.c: Regenerated.
2259 * pt.c: Include varray.h. Include rtl.h since varray.h requires
2260 it.
2261 (inline_parm_levels): New variable.
2262 (inline_parm_levels_used): Likewise.
2263 (maybe_begin_member_template_processing): Update them.
2264 (maybe_end_member_template_processing): Use them, rather than
2265 guessing how many levels to pop.
2266
2267 * decl.c (make_typename_type): Tighten error-checking.
2268
2269 1999-04-20 Mark Mitchell <mark@codesourcery.com>
2270
2271 * cp-tree.h (build_binary_op): Remove unneeded parameter.
2272 * class.c (build_vrable_entry_ref): Adjust call to
2273 build_binary_op.
2274 * decl.c (expand_static_init): Likewise.
2275 (grokdeclarator): Likewise.
2276 (finish_function): Likewise.
2277 * decl2.c (delete_sanity): Likewise.
2278 (do_dtors): Likewise.
2279 (do_ctors): Likewise.
2280 * error.c (dump_type_suffix): Likewise.
2281 * expr.c (cplus_expand_expr): Likewise.
2282 * init.c (resolve_offset_ref): Likewise.
2283 (build_new): Likewise.
2284 (build_new_1): Likewise.
2285 (build_vec_delete_1): Likewise.
2286 (expand_vec_init_catch_clause): Likewise.
2287 (build_delete): Likewise.
2288 * pt.c (tsubst): Likewise.
2289 * rtti.c (synthesize_tinfo_fn): Likewise.
2290 * search.c (expand_upcast_fixups): Likewise.
2291 (expand_direct_vtbls_init): Likewise.
2292 * typeck.c (get_member_function_from_ptrfunc): Likewise.
2293 (build_binary_op_nodefault): Likewise.
2294 (point_int_sum): Likewise.
2295 (pointer_diff): Likewise.
2296 (build_unary_op): Likewise.
2297 (build_modify_expr): Likewise.
2298 (get_delta_difference): Likewise.
2299 (build_ptrmemfunc): Likewise.
2300 (expand_ptrmemfunc_cst): Likewise.
2301
2302 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
2303
2304 * decl.c (grokfndecl): Always call cplus_decl_attributes.
2305 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
2306
2307 1999-04-19 Mark Mitchell <mark@codesourcery.com>
2308
2309 * cp-tree.h (finish_static_data_member_decl): New function.
2310 * decl2.c (finish_static_data_member_decl): Split out from ...
2311 (grokfield): Here.
2312 * pt.c (instantiate_class_template): Use it here instead of
2313 trying to fake it.
2314 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
2315 finish_static_data_member_decl will do that. Explicit set
2316 DECL_EXTERNAL to match non-template processing.
2317
2318 1999-04-18 Mark Mitchell <mark@codesourcery.com>
2319
2320 * cp-tree.h (finish_class_definition): Add parameter.
2321 * parse.y (structsp): Use it. Don't call pop_scope here.
2322 * parse.c: Regenerated.
2323 * semantics.c (finish_class_definition): Pop it here.
2324
2325 1999-04-17 Mark Mitchell <mark@codesourcery.com>
2326
2327 * decl.c (xref_tag): Revise handling of nested template
2328 declarations.
2329 * pt.c (check_explicit_specialization): Tweak handling of friend
2330 templates in template classes.
2331 (tsubst_friend_class): Handle friend declarations for nested
2332 member template classes.
2333
2334 1999-04-16 Mark Mitchell <mark@codesourcery.com>
2335
2336 * class.c (finish_struct): Remove unused variable.
2337 (pushclass): Likewise.
2338 (invalidate_class_lookup_cache): Likewise.
2339 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
2340 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
2341 doesn't get obliterated.
2342 (make_typename_type): Handle template classes correctly.
2343
2344 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
2345 (storetags): Declare.
2346 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
2347 (pushclass): Likewise. Use storetags to install tag declarations,
2348 not pushtag.
2349 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
2350 * decl.c (storetags): Make it global.
2351 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
2352 implicit typename declaration.
2353 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
2354 * method.c (hack_identifier): Likewise.
2355 * search.c (lookup_member): Likewise.
2356
2357 * decl.c (warn_about_implicit_typename_lookup): New function.
2358 (lookup_name_real): Use it. Rework handling of implicit typename
2359 extension.
2360
2361 1999-04-15 Mark Mitchell <mark@codesourcery.com>
2362
2363 * cp-tree.h (lookup_nested_field): Remove.
2364 * class.c (push_nested_class): Handle UNION_TYPEs.
2365 (pop_nested_class): Likewise.
2366 * decl.c (lookup_name_real): Don't call lookup_nested_field.
2367 (start_decl): Use push_nested_class, not just pushclass.
2368 (cp_finish_decl): Use pop_nested_class, not just popclass.
2369 * search.c (lookup_nested_field): Remove.
2370
2371 * cp-tree.h (lang_type): Add documentation.
2372 * decl2.c (handle_class_head): Create template declarations here,
2373 as appropriate.
2374 * parse.y (class_head): Return whether or not we entered a new
2375 scope, as well as the type named.
2376 (named_class_head): Likewise.
2377 (named_complex_class_head_sans_basetype): Likewise.
2378 (structsp): Adjust accordingly. Pop scope when required.
2379 * parse.c: Regenerated.
2380 * pt.c (check_default_tmpl_args): Robustify.
2381 (redeclare_class_template): Likewise.
2382 (instantiate_class_template): An instantiation of an
2383 anonymous union is itself an anonymous union.
2384 * semantics.c (begin_class_definition): Don't create template
2385 declarations here.
2386
2387 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
2388
2389 * parse.y (after_type_declarator_intern): New nonterminal.
2390 (after_type_declarator): Use it.
2391 (direct_after_type_declarator): Likewise. Move above
2392 nonnested_type to fix reduce/reduce conflict resolution.
2393 (declmods): Reducing from just 'attributes' has EMPTY precedence.
2394 * Makefile.in (CONFLICTS): Update.
2395
2396 * decl.c (define_label): Downgrade error for jumping over a
2397 non-POD decl to pedwarn.
2398
2399 1999-04-14 Mark Mitchell <mark@codesourcery.com>
2400
2401 * cp-tree.h (popclass): Change declaration.
2402 (pop_nested_class): Likewise.
2403 (poplevel_class): Remove declaration.
2404 * call.c (convert_default_argument): Pass no arguments to
2405 popclass.
2406 * class.c (finish_struct_1): Likewise.
2407 (finish_struct): Likewise.
2408 (popclass): Remove argument. Simplify code accordingly.
2409 (pop_nested_class): Likewise.
2410 * decl.c (poplevel_class): Declare it here, and make it static.
2411 (poplevel): Handle class scopes.
2412 (poplevel_class): Don't take an rgument. Simplify.
2413 (pop_everything): Pass no arguments to pop_nested_class.
2414 (cp_finish_decl): Pass no arguments to popclass.
2415 (grokdeclarator): Pass no arguments to pop_nested_class.
2416 (finish_function): Likewise.
2417 * decl2.c (grokfield): Likewise.
2418 (pop_scope): Pass no arguments to popclass.
2419 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
2420 * pt.c (instantiate_class_template): Move call to pushclass, and
2421 document. Pass no arguments to popclass.
2422 (regenerate_decl_from_template): Likewise.
2423
2424 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
2425
2426 * typeck.c (build_unary_op): Handle taking the address of a unique
2427 bound non-static member function.
2428
2429 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
2430
2431 * lang-options.h (-Wdeprecated): New flag.
2432 * decl2.c (warn_deprecated): New flag.
2433 (lang_decode_option): Deprecated this-is-variable,
2434 external-templates, alt-external-templates.
2435 Support -Wdeprecated.
2436 * errfn.c (cp_deprecated): New function.
2437
2438 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
2439
2440 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
2441 of the decls themselves.
2442
2443 * pt.c (tsubst_function_type): Copy attributes over.
2444
2445 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
2446 and com_interface.
2447 * cp-tree.h: Add prototype.
2448 * decl.c (init_decl_processing): Set valid_lang_attribute.
2449
2450 1999-04-13 Mark Mitchell <mark@codesourcery.com>
2451
2452 * class.c (finish_struct_1): Look at the const-ness of the field's
2453 type, not the TREE_READONLY-ness of the declaration.
2454 * method.c (synthesize_method): Likewise.
2455 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
2456 creating new declarations.
2457
2458 1999-04-13 Mike Stump <mrs@wrs.com>
2459
2460 * decl2.c (import_export_decl): Because vtables always reference
2461 virtual functions, even if they are inlined, don't allow
2462 -fno-implement-inlines to not emit them, instead, emit them with
2463 the vtable.
2464 * decl.c (start_function): Likewise.
2465
2466 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
2467
2468 * cp-tree.h (struct lang_type): Add com_interface.
2469 (CLASSTYPE_COM_INTERFACE): New macro.
2470 * class.c (set_rtti_entry): COM interface classes have no RTTI
2471 entries in their vtables; adjust.
2472 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
2473 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
2474 finish_struct_1): Likewise.
2475 * decl2.c (mark_vtable_entries): Likewise.
2476 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
2477 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
2478 expand_upcast_fixups): Likewise.
2479 * tree.c (debug_binfo): Likewise.
2480
2481 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
2482 * typeck.c (comptypes): If we get it, ignore attributes.
2483 * class.c (instantiate_type): Use BASELINK_P. Change complain
2484 parameter to flags; 2 means ignore attributes.
2485 * call.c (build_op_delete_call): Pass it.
2486
2487 * decl.c (xref_tag): Only complain once about using a typedef-name
2488 with 'struct'. Downgrade to pedwarn.
2489
2490 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
2491
2492 * parse.y (absdcl_intern): New nonterminal.
2493 (absdcl, direct_abstract_declarator): Use it.
2494
2495 * pt.c (lookup_template_class): Look through implict typename.
2496
2497 1999-04-11 Mark Mitchell <mark@codesourcery.com>
2498
2499 * friend.c (add_friend): Deal gracefully with error_mark_node.
2500 * method.c (build_overload_value): Handle pointers-to-members as
2501 template parameters.
2502
2503 * decl.c (push_binding): Fix typo in comment.
2504
2505 1999-04-10 Mark Mitchell <mark@codesourcery.com>
2506
2507 * error.c (dump_type_real): If a typename is a template-id, put
2508 out the template arguments.
2509 (dump_expr): Handle TEMPLATE_ID_EXPR.
2510 * pt.c (lookup_template_class): Now that full arguments are
2511 available everywhere, remove code that tried to guess them.
2512
2513 1999-04-09 Mark Mitchell <mark@codesourcery.com>
2514
2515 * decl.c (make_typename_type): Complain if we don't find a type
2516 when trying to make a typename type for a non-template type.
2517
2518 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
2519
2520 * decl.c (start_decl): Pass attributes to grokdeclarator.
2521 (grokdeclarator): Handle attributes on constructor-syntax
2522 initializers.
2523
2524 1999-04-08 Mark Mitchell <mark@codesourcery.com>
2525
2526 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
2527 don't have types.
2528
2529 * search.c (template_self_reference_p): Tweak.
2530
2531 1999-04-07 Mark Mitchell <mark@codesourcery.com>
2532
2533 * init.c (build_offset_ref): Don't build yet another weird data
2534 structure to describe overloaded functions.
2535
2536 1999-04-06 Mark Mitchell <mark@codesourcery.com>
2537
2538 * cp-tree.h (BASELINK_P): New macro.
2539 (SET_BASELINK_P): Likewise.
2540 * init.c (build_member_call): Remove needless assignment in if
2541 statement.
2542 * search.c (lookup_field_r): Fix handling when we are looking
2543 specifically for a type; these are not hidden by functions and
2544 variables.
2545 (lookup_member): Use SET_BASELINK_P.
2546 * tree.c (is_overloaded_fn): Use BASELINK_P.
2547 (really_overloaed_fn): Likewise.
2548 (get_first_fn): Likewise.
2549
2550 1999-04-05 Mark Mitchell <mark@codesourcery.com>
2551
2552 * decl.c (lookup_name_current_level): Tweak, and improve
2553 documentation.
2554
2555 * class.c (maybe_fixup_vptrs): Remove declaration.
2556 (build_class_init_list): Likewise.
2557 * decl.c (pushdecl_class_level): Call check_template_shadow here
2558 ...
2559 (push_class_level_binding): ... not here.
2560 * search.c (dfs_push_type_decls): Only avoid
2561 template-self-reference TYPE_DECLs if they are from base classes.
2562
2563 1999-04-04 Mark Mitchell <mark@codesourcery.com>
2564
2565 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
2566 nodes. Tidy.
2567
2568 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
2569
2570 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
2571 (finish_struct_1): Don't call build_class_init_list.
2572
2573 1999-04-02 Mark Mitchell <mark@codesourcery.com>
2574
2575 * tinfo.h (__class_type_info): Fix illegal declaration.
2576
2577 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
2578 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
2579 (IDENTIFIER_CLASS_VALUE): Improve documentation.
2580 (is_properly_derived_from): Declare.
2581 (invalidate_class_lookup_cache): Likewise.
2582 (maybe_maybe_note_name_used_in_class): Likewise.
2583 (note_name_declared_in_class): Likewise.
2584 (push_using_decl): Remove duplicate declaration.
2585 (id_in_current_class): Remove declaration.
2586 (push_class_binding): Change prototype.
2587 (clear_identitifer_class_values): Declare.
2588 * call.c (is_properly_derived_from): Make it global.
2589 (build_new_function_call): Be careful about updating candidates.
2590 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
2591 asked to make illegal calls.
2592 * class.c: Include splay-tree.h.
2593 (class_stack_node): Add names_used slot.
2594 (check_member_decl_is_same_in_complete_scope): Remove.
2595 (add_method): Fix comment. Push the declaration into class
2596 scope.
2597 (finish_struct_1): When popping the class, pop the bindings too.
2598 Remove check for data member/function member conflict.
2599 (finish_struct): Remove calls to
2600 check_member_decl_is_same_in_complete_scope. Change calls to
2601 popclass.
2602 (pushclass): Clear names_used in the class stack entry.
2603 Use invalidate_class_lookup_cache to remove cached entries, rather
2604 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
2605 before entering a new class. Remove dead code. Don't mess with
2606 current_function_decl when pushing declarations.
2607 (invalidate_class_lookup_cache): New function, split out from ...
2608 (popclass): Here. Clean up names_used on our way out.
2609 (instantiate_type): Adjust.
2610 (build_self_reference): Don't push the declaration here.
2611 (maybe_note_name_used_in_class): New function.
2612 (note_name_declared_in_class): Likewise.
2613 * decl.c (add_binding): Change prototype.
2614 (find_class_binding_level): New function.
2615 (innermost_nonclass_level): Likewise.
2616 (current_binding_level): Update documentation.
2617 (inner_binding_level): Remove. Replace with current_binding_level
2618 throughout.
2619 (push_binding_level): Remove special handling of
2620 class_binding_level.
2621 (pop_binding_level): Likewise. Use find_class_binding_level.
2622 (suspend_binding_level): Likewise.
2623 (global_bindings_p): Use innermost_nonclass_level.
2624 (toplevel_bindings_p): Likewise.
2625 (namespace_bindings_p): Likewise.
2626 (pseudo_global_level_p): Likewise.
2627 (push_binding): Clear INHERITED_VALUE_BINDING_P.
2628 (add_binding): Check for illegal multiple declarations. Return a
2629 value indicating whether or not the new binding was legal.
2630 (push_local_binding): Skip over class binding levels. Check
2631 return value from add_binding.
2632 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
2633 note_name_declared_in_class.
2634 (pushlevel_class): Remove "fake out the rest of the compiler"
2635 code.
2636 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
2637 (clear_identifier_class_values): New function.
2638 (pop_from_top_level): Use it.
2639 (pop_everything): Tweak.
2640 (maybe_process_template_type_declaration): Don't push the
2641 declaration for the template here.
2642 (pushtag): Don't push tag declarations into class scope here.
2643 (pushdecl): Apply DeMorgan's law for readability.
2644 (pushdecl_class_level): Remove special-case code for
2645 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
2646 (push_class_level_bindng): Deal with inherited bindings.
2647 (lookup_name_real): Remove special-case code for
2648 TYPE_BEING_DEFINED, and some implicit typename magic.
2649 (grokdeclarator): Handle COMPONENT_REF for a template function.
2650 (build_enumerator): Don't call pushdecl_class_level here.
2651 (id_in_current_class): Remove.
2652 * decl2.c (grokfield): Don't call pushdecl_class_level or
2653 check_template_shadow.
2654 * errfn.c (cp_file_of): Don't declare.
2655 (cp_line_of): Likewise.
2656 * error.c (dump_decl): Handle an OVERLOAD.
2657 (cp_file_of): Likewise.
2658 (cp_line_of): Likewise.
2659 * init.c (build_member_call): Handle a COMPONENT_REF.
2660 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
2661 pushdecl_class_level.
2662 * method.c (hack_identifier): Build COMPONENT_REFs for references
2663 to member templates as well as member functions. Remove dead
2664 code.
2665 * parse.y (left_curly): Remove.
2666 (nonnested_type): Call maybe_note_name_used_in_class, not
2667 pushdecl_class_level.
2668 * parse.c: Regenerated.
2669 (nested_name_specifier_1): Likewise.
2670 * pt.c (check_explicit_specialization): Adjust, for robustness.
2671 (check_template_shadow): Handle OVERLOADs.
2672 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
2673 TEMPLATE_DECL, if appropriate.
2674 * search.c (envelope_add_decl): Remove.
2675 (dfs_pushdecls): Likewise.
2676 (dfs_compress_decls): Likewise.
2677 (dfs_push_decls): New function.
2678 (dfs_push_type_decls): Likewise.
2679 (setup_class_bindings): Likewise.
2680 (template_self_reference_p): Likewise.
2681 (lookup_field_r): Use it.
2682 (looup_member): Remove old comment. Deal with ambiguity.
2683 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
2684 and remove envelope processing.
2685 * semantics.c (begin_class_definition): Let pushclass push
2686 declarations for base classes.
2687 (finish_member_declaration): Push declarations into class scope.
2688 * typeck.c (build_component_ref): Just put an OVERLOAD into the
2689 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
2690 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
2691 * Makefile.in (class.o): Depend on splay-tree.h.
2692
2693 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
2694
2695 * cvt.c (convert_pointer_to_real): Use same_type_p.
2696 * typeck.c (comp_target_types): Use same_type_p.
2697
2698 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
2699
2700 * semantics.c (begin_inline_definitions,
2701 finish_inline_definitions): Rename from finish_default_args and
2702 begin_inline_definitions, respectively, to something that isn't a
2703 total lie. :)
2704 * parse.y (structsp): Adjust.
2705
2706 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
2707 (list_hash_lookup): Likewise.
2708 (hash_tree_chain): Adjust.
2709 * pt.c (tsubst): Adjust.
2710 (tsubst_arg_types): Use plain hash_tree_cons.
2711 * cp-tree.h (hash_tree_cons_simple): Lose.
2712 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
2713
2714 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2715
2716 * Makefile.in (hash.h): Generate using gperf language 'C', not
2717 'KR-C', so gperf uses the `const' keyword on strings.
2718
2719 * gxx.gperf (resword): Const-ify a char*.
2720
2721 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
2722
2723 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
2724 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
2725 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
2726 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
2727 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
2728 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
2729 tree.c: Adjust.
2730
2731 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
2732
2733 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
2734
2735 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
2736
2737 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
2738
2739 1999-03-27 Mark Mitchell <mark@codesourcery.com>
2740
2741 * cp-tree.h (add_friend): Declare.
2742 (add_friends): Likewise.
2743 * friend.c (add_friend): Make it global. Don't add to
2744 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
2745 (add_friends): Make it global.
2746 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
2747 befriending class is a template.
2748 * parse.y (component_decl_1): Fix typo in comment.
2749 * parse.c: Regenerated.
2750 * pt.c (instantiate_class_template): Use add_friend and
2751 add_friends rather that duplicating some of their functionality
2752 here.
2753
2754 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
2755
2756 * call.c (build_field_call): Unify 'this' and non-'this' cases.
2757
2758 * typeck.c (build_indirect_ref): Check for 'this' sooner.
2759
2760 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2761
2762 * call.c (op_error): Const-ify a char*.
2763 (add_candidate, source_type, add_warning): Add static prototype.
2764 (print_z_candidates): Const-ify a char*.
2765
2766 * class.c (resolve_address_of_overloaded_function,
2767 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
2768 (get_vtable_name, finish_struct_1): Const-ify a char*.
2769
2770 * cvt.c (convert_to_reference): Likewise.
2771
2772 * decl.c (redeclaration_error_message, record_builtin_type,
2773 record_unknown_type, member_function_or_else, bad_specifiers):
2774 Likewise.
2775 (find_binding, select_decl, unqualified_namespace_lookup,
2776 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
2777 Add static prototype.
2778 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
2779 implicitly_declare, record_builtin_java_type, define_function,
2780 grok_op_properties, tag_name): Const-ify a char*.
2781
2782 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
2783 (define_function, finish_builtin_type): Const-ify a char*.
2784 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
2785 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
2786 (file_name_nondirectory): Const-ify a char*.
2787 (init_filename_times): Don't prototype.
2788 (compiler_error): Prototype.
2789 (yyerror, init_repo): Const-ify a char*.
2790 (build_srcloc): Don't prototype.
2791 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
2792 Const-ify a char*.
2793 (warn_for_assignment): Don't prototype.
2794 (convert_for_initialization, readonly_error, check_for_new_type,
2795 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
2796 Const-ify a char*.
2797
2798 * decl2.c (acceptable_java_type, output_vtable_inherit,
2799 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
2800 merge_functions, decl_namespace, validate_nonmember_using_decl,
2801 do_nonmember_using_decl): Add static prototype.
2802 (lang_f_options): Const-ify a char*.
2803 (finish_builtin_type): Likewise.
2804 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
2805 prototype.
2806
2807 * errfn.c: Include cp-tree.h.
2808 (cp_thing): Add static prototype.
2809 (compiler_error): Don't protoptype.
2810 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
2811 passing it to `cp_thing'.
2812
2813 * error.c (interesting_scope_p): Add static prototype.
2814
2815 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
2816 a char*.
2817
2818 * init.c (compiler_error): Don't prototype.
2819 (member_init_ok_or_else): Const-ify a char*.
2820 (build_java_class_ref): Add static prototype.
2821
2822 * lex.c (compiler_error): Don't prototype.
2823 (get_time_identifier, interface_strcmp, extend_token_buffer,
2824 handle_cp_pragma): Const-ify a char*.
2825 (is_global, init_filename_times): Add static prototype.
2826 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
2827 (compiler_error): Change from fixed args to variable args.
2828 (yyerror): Const-ify a char*.
2829
2830 * parse.y (cond_stmt_keyword): Const-ify a char*.
2831 (parse_decl): Add static prototype.
2832
2833 * pt.c (template_args_equal, print_template_context): Likewise.
2834 (print_candidates, check_default_tmpl_args): Const-ify a char*.
2835 (instantiate_class_template): Likewise.
2836
2837 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
2838
2839 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
2840 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
2841
2842 * search.c (lookup_field_info, lookup_member): Likewise.
2843 (lookup_member): Cast the first argument of `bzero' to a PTR.
2844
2845 * sig.c (compiler_error): Don't prototype.
2846 (build_signature_pointer_or_reference_nam): Const-ify a char*.
2847 (get_sigtable_name, build_member_function_pointer): Likewise.
2848
2849 * tree.c (compiler_error): Don't prototype.
2850 (no_linkage_helper, build_srcloc): Add static prototype.
2851 (build_vbase_pointer_fields): Const-ify a char*.
2852 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
2853
2854 * typeck.c (compiler_error): Don't prototype.
2855 (convert_for_assignment): Const-ify a char*.
2856 (comp_cv_target_types): Add static prototype.
2857 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
2858 build_component_addr, build_unary_op, convert_for_initialization):
2859 Const-ify a char*.
2860
2861 * typeck2.c (ack): Add static prototype and change from fixed args
2862 to variable args.
2863 (readonly_error, check_for_new_type): Const-ify a char*.
2864
2865 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
2866 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
2867 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
2868 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
2869 gen_assign, GNU_xref_member): Const-ify a char*.
2870
2871 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
2872
2873 * gxxint.texi: Remove old discussion on copying virtual bases.
2874
2875 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
2876
2877 * Make-lang.in: Remove all references to g++.o/g++.c.
2878 Link g++ from gcc.o.
2879
2880 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
2881
2882 * decl2.c (comdat_linkage): Treat vtables like functions.
2883
2884 1999-03-25 Mark Mitchell <mark@codesourcery.com>
2885
2886 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
2887
2888 1999-03-25 Nathan Sidwell <nathan@acm.org>
2889
2890 * decl.c (init_decl_processing): Add `signed' type as a synonym
2891 for `int'.
2892
2893 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
2894
2895 * typeck.c (common_type): Handle cv-qual unification for pointers
2896 to members.
2897
2898 * decl.c (unqualified_namespace_lookup): Return error_mark_node
2899 on error.
2900 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
2901 * lex.c (do_identifier): If we got error_mark_node, call
2902 lookup_name again.
2903
2904 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
2905
2906 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
2907 classes.
2908
2909 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
2910
2911 * decl.c (lookup_name_real): Do nested field lookup regardless of
2912 TYPE_BEING_DEFINED.
2913
2914 1999-03-24 Mark Mitchell <mark@codesourcery.com>
2915
2916 * cp-tree.h (lang_type): Remove has_assignment and
2917 has_real_assignment. Add befriending_classes.
2918 (TYPE_HAS_ASSIGNMENT): Remove.
2919 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
2920 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
2921 (lang_decl): Document.
2922 (DECL_BEFRIENDING_CLASSES): New macro.
2923 (FRIEND_NAME): Move declaration to more obvious location.
2924 (FRIEND_DECLS): Likewise.
2925 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
2926 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
2927 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
2928 (grok_op_properties): Likewise.
2929 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
2930 (add_friend): Likewise. Don't do weird things with assignment
2931 operators. Update DECL_BEFRIENDING_CLASSES.
2932 (add_friends): Don't do weird things with assignment operators.
2933 (make_friend_class): Likewise. Update
2934 CLASSTYPE_BEFRIENDING_CLASSES.
2935 * pt.c (instantiate_class_template): Don't set
2936 TYPE_HAS_ASSIGNMENT.
2937 (tsubst_copy): Substitute the TREE_TYPE for more unary
2938 expressions.
2939 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
2940 * search.c (protected_accessible_p): New function.
2941 (friend_accessible_p): Likewise.
2942 (accessible_p): Use them.
2943
2944 1999-03-23 Mark Mitchell <mark@codesourcery.com>
2945
2946 * pt.c (convert_nontype_argument): Don't create things that aren't
2947 PTRMEM_CSTs when applying a qualification conversion to a
2948 PTRMEM_CST.
2949
2950 1999-03-23 Mark Mitchell <mark@codesourcery.com>
2951
2952 * Makefile.in (OBJS): Don't mention hash.o.
2953 (OBJDEPS): Likewise.
2954
2955 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
2956
2957 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
2958 * decl.c (expand_static_init): Make sure we don't add any after
2959 then.
2960
2961 * decl.c (cp_finish_decl): Move intelligence about handling
2962 DECL_COMDAT for variables from here...
2963 * decl2.c (comdat_linkage): ...to here.
2964 (maybe_make_one_only): Tweak.
2965 (import_export_decl): Call comdat_linkage for variables, too.
2966 (finish_file): Handle template statics properly.
2967
2968 1999-03-22 Mark Mitchell <mark@codesourcery.com>
2969
2970 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
2971 Document internals of pointer-to-member-functions.
2972 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
2973 (PFN_FROM_PTRMEMFUNC): Likewise.
2974 (build_type_conversion): Remove unused parameter.
2975 (build_ptrmemfunc1): Declare.
2976 (expand_ptrmemfunc_cst): New function.
2977 (delta2_from_ptrmemfunc): Likewise.
2978 (pfn_from_ptrmemfunc): Likewise.
2979 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
2980 build_type_conversion. Use TYPE_PTRMEM_P for readability.
2981 (convert_to_reference): Remove unused parameter to
2982 build_type_conversion.
2983 (ocp_convert): Likewise.
2984 (build_user_type_conversion): Likewise.
2985 * error.c (dump_expr): Handle NULL pointer-to-member functions.
2986 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
2987 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
2988 open when handling pointer-to-member functions.
2989 * pt.c (convert_nontype_argument): Clean up error messages. Be
2990 more stringent with pointers-to-members.
2991 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
2992 (build_unary_op): Tidy ever-so-slightly.
2993 (build_conditional_expr): Remove extra parameter to
2994 build_type_conversion.
2995 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
2996 we're using.
2997 (expand_ptrmemfunc_cst): Define.
2998 (delta2_from_ptrmemfunc): Likewise.
2999 (pfn_from_ptrmemfunc): Likewise.
3000
3001 1999-03-19 Mark Mitchell <mark@codesourcery.com>
3002
3003 * init.c (build_member_call): Handle template-id expressions
3004 correctly.
3005 * typeck.c (build_x_function_call): Likewise.
3006
3007 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
3008
3009 * friend.c (make_friend_class): Avoid core dump when
3010 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
3011
3012 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
3013
3014 * decl.c (start_function): Suppress normal linkage heuristics
3015 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
3016
3017 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
3018
3019 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
3020 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
3021
3022 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
3023
3024 * parse.y (named_complex_class_head_sans_basetype):
3025 Do not push a scope for error_mark_node.
3026 (maybe_base_class_list): Likewise.
3027
3028 * decl.c (start_decl): Check for error_mark_node as a type.
3029 Detected by g++.brendan/array-refs.C.
3030 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
3031 (maybe_build_cleanup_1): Likewise. Detected by
3032 g++.jason/incomplete1.C.
3033
3034 * tree.c (build_dummy_object): Use void_zero_node instead of the
3035 error_mark_node.
3036 (is_dummy_object): Check for such a node.
3037 Detected by g++.bob/inherit1.C
3038
3039 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
3040
3041 * method.c (old_backref_index): Split out...
3042 (flush_repeats): From here. Rename back from try_old_backref.
3043 (build_mangled_name): Put back some old-style repeat handling.
3044
3045 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3046
3047 * lex.c: Don't include setjmp.h.
3048 (parse_float): New static function.
3049 (pf_args): New struct.
3050 (real_yylex): Use them in call to `do_float_handler'.
3051
3052 1999-03-15 Mark Mitchell <mark@markmitchell.com>
3053
3054 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
3055 * tree.c (layout_basetypes): Not here.
3056 * search.c (dfs_search): Remove; no longer used.
3057
3058 1999-03-12 Mark Mitchell <mark@markmitchell.com>
3059
3060 * decl2.c (validate_nonmember_using_decl): Issue sensible
3061 error-messages on bogus qualifiers.
3062
3063 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
3064
3065 * call.c (add_function_candidate): Fix uninitialized variable.
3066
3067 * Makefile.in (search.o): Add dependency on varray.h.
3068
3069 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
3070
3071 * decl.c (duplicate_decls): Use same_type_p.
3072 * method.c (try_old_backref): Renamed from flush_repeats. Use
3073 same_type_p. Don't try to handle repeats. Return success.
3074 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
3075 calls from old-style code, too.
3076 (check_ktype): Use same_type_p.
3077 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
3078 (build_qualified_name): Simplify logic.
3079 (process_overload_item): Strip typedefs and quals at the top.
3080 (build_mangled_name_for_type_with_Gcode): Remove call to
3081 type_canonical_variant.
3082 (build_mangled_name): Likewise. Remove support for old-style
3083 repeats, which have been disabled since 2.7.2. Don't mess with
3084 TREE_USED.
3085 (build_decl_overload_real): Don't mess with TREE_USED.
3086
3087 1999-03-13 Nathan Sidwell <nathan@acm.org>
3088
3089 * error.c (cp_printers): Add 'F' escape character.
3090 (dump_type_real): Remove TREE_LIST (fnargs) printing.
3091 Functionality moved to dump_parameters.
3092 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
3093 (dump_function_decl): Extend meaning of V parameter. Use
3094 dump_parameters and dump_exception_spec.
3095 (dump_parameters): New static function.
3096 (dump_exception_spec): New static function.
3097 (fndecl_as_string): Change argument semantics. Use
3098 dump_function_decl directly.
3099
3100 * sig.c (build_signature_table_constructor): Use cp_error.
3101
3102 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
3103
3104 * semantics.c (finish_switch_cond): Handle error cases gracefully.
3105 Detected by g++.law/enum5.C.
3106
3107 * typeck.c (build_modify_expr): Check for errors after resolving
3108 offsets. Detected by g++.brendan/static1.C.
3109
3110 * decl.c (complete_array_type): Ignore initial_value if it is an
3111 error. Detected by g++.benjamin/17930.C.
3112
3113 * typeck2.c (process_init_constructor): Return error if one argument
3114 is in error. Detected by g++.benjamin/13478.C.
3115
3116 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
3117
3118 * decl.c (select_decl): Allow class templates when we need types.
3119 * decl2.c (ambiguous_decl): Likewise.
3120
3121 1999-03-12 Mark Mitchell <mark@markmitchell.com>
3122
3123 * lex.c (do_identifier): Correct call to enforce_access.
3124 * search.c (accessible_p): Tweak comment.
3125
3126 1999-03-10 Mark Mitchell <mark@markmitchell.com>
3127
3128 * semantics.c (begin_class_definition): Call build_self_reference.
3129 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
3130
3131 * search.c (assert_canonical_unmarked): Fix typo in prototype.
3132
3133 * search.c (dfs_canonical_queue): New function.
3134 (dfs_assert_unmarked_p): Likewise.
3135 (assert_canonical_unmarked): Likewise.
3136 (access_in_type): Use it.
3137 (accessible_p): Likewise. Walk the whole tree when umarking.
3138
3139 * sig.c (build_signature_table_constructor): Use accessible_p
3140 instead of compute_access.
3141
3142 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
3143
3144 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
3145
3146 1999-03-09 Mark Mitchell <mark@markmitchell.com>
3147
3148 * cp-tree.h (flag_access_control): Declare.
3149 (TREE_VIA_PPUBLIC): Document.
3150 (DECL_NONSTATIC_MEMBER_P): New macro.
3151 (enforce_access): Return an indication of whether or not access
3152 was permitted.
3153 (build_self_reference): Change prototype.
3154 (compute_access): Replace with ...
3155 (accessible_p): New function.
3156 (dfs_walk): Change prototype.
3157 (dfs_unmark): Likewise.
3158 (markedp): Likewise.
3159 * call.c (enforce_access): Use accessible_p.
3160 * class.c (build_self_reference): Insert the declaration into the
3161 list of members for this type, and make it public.
3162 * decl.c (xref_basetypes): Avoid ill-timed recursion.
3163 * init.c (build_offset_ref): Use lookup_member, not three separate
3164 name-lookups. Call enforce_access rather than checking for
3165 illegal accesses here.
3166 (resolve_offset_ref): Likewise.
3167 * lex.c (do_identifier): Likewise.
3168 * method.c (hack_identifier): Likewise.
3169 * parse.y (self_reference): Remove.
3170 (opt_component_decl_list): Don't use it.
3171 * parse.c: Regenerated.
3172 * pt.c (print_candidates): Generalize to handle lists of
3173 overloaded functions.
3174 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
3175 not set.
3176 (get_template_base): Use new calling convention for dfs_walk.
3177 * search.c: Include varray.h. Add prototypes.
3178 (dfs_walk): Accept a data pointer to pass to the work functions.
3179 All callers changed. All work functions changed.
3180 (breadth_first_search): Rename to bfs_walk, and make consistent
3181 with dfs_walk.
3182 (dfs_walk_real): New function.
3183 (canonical_binfo): New function.
3184 (context_for_name_lookup): Likewise.
3185 (shared_marked_p): Likewise.
3186 (shared_unmarked_p): Likewise.
3187 (lokup_field_queue_p): Likewise.
3188 (lookup_field_r): Generalize to handle both functions and fields.
3189 (lookup_field): Just call lookup_member.
3190 (lookup_fnfields): Likewise.
3191 (lookup_member): Move body of lookup_field here and generalize.
3192 (dfs_accessible_queue_p): Likewise.
3193 (dfs_accessible_p): Likewise.
3194 (dfs_access_in_type): Likewise.
3195 (access_in_type): Likewise.
3196 (compute_access): Remove, and replace with ...
3197 (accessible_p): New function.
3198 (vbase_types): Remove.
3199 (vbase_decl_ptr_intermediate): Likewise.
3200 (vbase_decl_ptr): Likewise.
3201 (vbase_init_result): Likewise.
3202 (closed_envelopes): Likewise.
3203 (bvtable): Likewise.
3204
3205 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
3206
3207 * call.c (add_function_candidate): Check for proper number of args
3208 before checking the validity of those args.
3209
3210 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
3211
3212 * cp-tree.h (struct lang_type): Add anon_union field.
3213 (ANON_UNION_TYPE_P): Use it instead of examining type.
3214 (SET_ANON_UNION_TYPE_P): New macro.
3215 * decl.c (check_tag_decl): Use it.
3216
3217 * search.c (compute_access): Handle non-type contexts earlier, and
3218 handle NULL_TREE.
3219
3220 * tree.c (build_exception_variant): Use copy_to_permanent.
3221
3222 * decl2.c (setup_initp): Give statics with no priority the default
3223 priority here.
3224 (do_dtors, do_ctors, finish_file): Remove special handling of
3225 non-prioritized statics.
3226
3227 1999-03-05 Mark Mitchell <mark@markmitchell.com>
3228
3229 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
3230 * decl.c (make_typename_type): Don't issue an error if an
3231 immediate lookup fails; it migt be resolved later.
3232 * friend.c (is_friend): Add comment.
3233 * search.c (breadth_first_search): Add POSTFN and DATA
3234 parameters. Tidy. All callers changed.
3235 (lookup_field_queue_p): New function.
3236 (lookup_field_r): Likewise.
3237 (lookup_field_post): Likewise.
3238 (lookup_field): Use them, via breadth_first_search, instead of
3239 duplicating logic.
3240 (compute_access): Robustify.
3241 (lookup_fnfield_info): New structure.
3242
3243 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
3244
3245 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
3246
3247 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
3248
3249 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
3250 cc happy.
3251
3252 * decl2.c (import_export_class): Also return if
3253 CLASSTYPE_INTERFACE_ONLY is set.
3254
3255 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
3256
3257 * decl.c (push_overloaded_decl): Only overwrite the old binding if
3258 there was one.
3259 * decl2.c (do_local_using_decl): Fix loop termination.
3260
3261 1999-03-02 Mark Mitchell <mark@markmitchell.com>
3262
3263 * cp-tree.h (determine_specialization): Don't declare.
3264 * pt.c (determine_specialization): Make it static. Eliminate
3265 complain parameter. Note that decl is always non-NULL now, and
3266 simplify accordingly.
3267
3268 * decl.c (maybe_push_to_top_level): Always call
3269 push_cp_function_context.
3270 (pop_from_top_level): Always call pop_cp_function_context.
3271
3272 1999-02-26 Nathan Sidwell <nathan@acm.org>
3273
3274 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
3275 diagnostics.
3276 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
3277 * init.c (build_new_1): Extra arg to complete_type_or_else.
3278 (build_delete): Likewise.
3279 * typeck.c (require_complete_type): Likewise.
3280 (pointer_int_sum): Likewise.
3281 (pointer_diff): Likewise.
3282 (build_component_ref): Likewise.
3283
3284 * typeck2.c (incomplete_type_error): Always use cp_error.
3285 Show declaration of undefined type, if appropriate.
3286 Deal with UNKNOWN_TYPE nodes.
3287
3288 * typeck.c (require_complete_type): Use TYPE_SIZE as
3289 size_zero_node to mean incomplete type.
3290 (require_complete_type_in_void): New function.
3291 (build_compound_expr): Call complete_type_in_void for LHS.
3292 (build_c_cast): Call complete_type_in_void for void cast.
3293 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
3294 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
3295 require_complete_type_in_void. Call it.
3296 * cp-tree.h (require_complete_type_in_void): Prototype new function.
3297
3298 * typeck.c (convert_arguments): Use alternative format for
3299 function decls. Don't require_complete_type here. Simplify
3300 diagnostic printing.
3301 (convert_for_initialization): Don't require_complete_type on RHS yet.
3302 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
3303
3304 * call.c (build_over_call): Cope with qualified void return type.
3305 * semantics.c (finish_call_expr): Likewise.
3306 * typeck.c (build_function_call_real): Likewise.
3307 (c_expand_return): Likewise.
3308 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
3309
3310 * call.c (print_z_candidates): Use alternate print format, to be
3311 consistent with (pt.c) print_candidates.
3312 * method.c (hack_identifier): List candidate members.
3313 * search.c (lookup_field): Build ambiguous list, and show it, if
3314 ambiguous.
3315
3316 1999-02-26 Mark Mitchell <mark@markmitchell.com>
3317
3318 * typeck.c (decay_conversion): Don't confuse constant array
3319 variables with their initializers.
3320
3321 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
3322 merging decls.
3323 * pt.c (regenerate_decl_from_template): Tweak for clarity.
3324 (instantiate_decl): Mark a decl instantiated before regenerating
3325 it to avoid recursion.
3326 * tree.c (mapcar): Don't call decl_constant_value unless we know
3327 something is TREE_READONLY_DECL_P.
3328
3329 * class.c (check_for_override): Don't stop checking when we find
3330 the first overridden function. Delete #if 0'd code.
3331 * search.c (get_matching_virtual): Likewise.
3332
3333 1999-02-25 Richard Henderson <rth@cygnus.com>
3334
3335 * lang-specs.h: Define __FAST_MATH__ when appropriate.
3336
3337 1999-02-24 Mike Stump <mrs@wrs.com>
3338
3339 * typeck.c (convert_for_assignment): Allow boolean integral constant
3340 expressions to convert to null pointer.
3341
3342 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
3343
3344 * decl.c (lookup_namespace_name): Resolve namespace aliases.
3345
3346 * class.c (push_nested_class): Allow namespaces.
3347
3348 * decl2.c (set_decl_namespace): Add friendp parameter.
3349 * decl.c (grokfndecl): Pass it.
3350 (grokvardecl): Likewise.
3351 * cp-tree.h: Change declaration.
3352
3353 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
3354
3355 * pt.c (tsubst): Allow an array of explicit size zero.
3356
3357 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
3358
3359 * errfn.c: Change varargs code to look like toplev.c.
3360
3361 * method.c (process_modifiers): Don't prepend 'U' for char or
3362 wchar_t.
3363
3364 1999-02-20 Craig Burley <craig@jcb-sc.com>
3365
3366 * Make-lang.in (cplib2.ready): Don't consider updating
3367 cplib2 stuff if the current directory isn't writable, as
3368 it won't work (such as during a `make install').
3369
3370 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
3371
3372 * decl2.c (start_objects): Make file scope constructors and
3373 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
3374 ASM_OUTPUT_DESTRUCTOR are defined.
3375
3376 1999-02-19 Mark Mitchell <mark@markmitchell.com>
3377
3378 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
3379 (fn_type_unification): Adjust prototype.
3380 (lookup_fnfields_1): Declare.
3381 * call.c (add_template_candidate_real): Adjust call to
3382 fn_type_unification.
3383 * class.c (add_method): Don't allow duplicate declarations of
3384 constructors or destructors.
3385 (resolve_address_of_overloaded_function): Remove unused variable.
3386 Adjust call to fn_type_unification.
3387 * decl.c (grokfndecl): Be more robust in the face of illegal
3388 specializations.
3389 * decl2.c (check_classfn): Remove hokey handling of member
3390 templates.
3391 * pt.c (determine_specialization): Improve comments. Adjust to
3392 handle template argument deduction as per the standard.
3393 (check_explicit_specialization): Fix comment spacing. Handle
3394 type-conversion operators correctly. Improve error-recovery.
3395 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
3396 (get_bindings_real): Simplify handling of static members.
3397 * search.c (lookup_fnfields_1): Make it have external linkage.
3398 * typeck.c (compparms): Fix comment.
3399 (build_unary_op): Don't try to figure out which template
3400 specialization is being referred to when when the address-of
3401 operator is used with a template function.
3402
3403 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3404
3405 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
3406 keyword to match an analogous change at the top level.
3407
3408 * tree.c (lvalue_or_else): Likewise.
3409
3410 1999-02-17 Mark Mitchell <mark@markmitchell.com>
3411
3412 * decl.c (xref_basetypes): Comment.
3413 * pt.c (instantiate_class_template): Use xref_basetypes.
3414
3415 1999-02-16 Mark Mitchell <mark@markmitchell.com>
3416
3417 * cp-tree.h (tsubst): Change prototype.
3418 (tsubst_expr): Likewise.
3419 (tsubst_copy): Likewise.
3420 (type_unification): Remove prototype.
3421 * call.c (convert_default_arg): Adjust call to tsubst_expr.
3422 * class.c (resolve_address_of_overloaded_function): Just use
3423 fn_type_unification.
3424 * decl.c (grokdeclarator): Adjust call to tsubst.
3425 * method.c (build_template_parm_names): Likewise.
3426 * pt.c (GTB_VIA_VIRTUAL): New macro.
3427 (GTB_IGNORE_TYPE): Likewise.
3428 (resolve_overloaded_unification): Add `complain' parameter.
3429 (try_one_overload): Likewise.
3430 (tsubst_template_arg_vector): Likewise.
3431 (tsubst_template_parms): Likewise.
3432 (tsubst_aggr_type): Likewise.
3433 (tsubst_arg_types): Likewise.
3434 (tsubst_call_declarator_parms): Likewise.
3435 (unify): Remove explicit_mask.
3436 (type_unification_real): Likewise.
3437 (get_template_base_recursive): Likewise.
3438 (coerce_template_template_parms): Provide prototype.
3439 (tsubst_function_type): Likewise.
3440 (try_class_unification): New function.
3441 All callers changed to use new complain parameter.
3442 (get_template_base): Use try_class_unification.
3443 (unify): Adjust handling of classes derived from template types.
3444 (fn_type_unification): Substitute explicit arguments before
3445 unification.
3446
3447 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3448
3449 * decl.c (pushdecl): Remove dead code.
3450
3451 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
3452
3453 * decl2.c (finish_objects): Fix code I missed in previous change.
3454
3455 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
3456
3457 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
3458 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
3459
3460 * pt.c (maybe_process_partial_specialization): Complain about
3461 'template <>' on non-specialization.
3462
3463 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
3464
3465 * decl.c (grokdeclarator): Catch wierd declarators.
3466 * decl2.c (finish_file): Don't abort because of namespace parsing
3467 failure.
3468 (check_decl_namespace): Remove.
3469
3470 1999-02-09 Mark Mitchell <mark@markmitchell.com>
3471
3472 * cp-tree.h (get_template_base): Don't declare.
3473 (dfs_walk): Declare.
3474 (dfs_unmark): Likewise.
3475 (markedp): Likewise.
3476 * pt.c (unify): Remove duplicate declaration. Pass tparms and
3477 targs to get_template_base.
3478 (get_template_base_recursive): Move here from search.c. Check to
3479 see that the base found can be instantiated to form the desired
3480 type.
3481 (get_template_base): Likewise.
3482 (get_class_bindings): Simplify.
3483 * search.c (get_template_base_recursive): Move to pt.c.
3484 (get_template_base): Likewise.
3485 (markedp): Make it global.
3486 (dfs_walk): Likewise.
3487 (dfs_unmark): Likewise.
3488
3489 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
3490
3491 * pt.c (maybe_process_partial_specialization): Complain about
3492 specialization in wrong namespace.
3493 * tree.c (decl_namespace_context): New fn.
3494
3495 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3496
3497 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
3498 * pt.c (coerce_template_template_parms): Handle nested
3499 template template parameters.
3500
3501 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
3502
3503 * typeck2.c: Update email addresses.
3504
3505 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3506
3507 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
3508 turned off.
3509
3510 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
3511
3512 * lex.c (retrofit_lang_decl): Split out...
3513 (build_lang_decl): From here.
3514 * decl.c (pushdecl): Call it for functions generated by the middle
3515 end that don't have DECL_LANG_SPECIFIC.
3516 * cp-tree.h: Declare it.
3517
3518 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
3519 (start_objects, finish_objects): Only use special
3520 init_priority code if the user specified a priority.
3521 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
3522 objects.
3523
3524 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
3525
3526 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
3527 mkstemp.o. Get them from libiberty now.
3528 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
3529
3530 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3531
3532 * decl2.c (lang_decode_option): Use read_integral_parameter.
3533
3534 1999-02-01 Mark Mitchell <mark@markmitchell.com>
3535
3536 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
3537 before calling complete_type_or_else.
3538
3539 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3540
3541 * input.c (inline): Don't define, its handled by system.h.
3542
3543 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
3544
3545 * decl2.c: Don't define flag_no_ident here. Don't process
3546 -f(no-)ident here.
3547 * cp-tree.h: Don't declare flag_no_ident here.
3548 * lang-specs.h: Map -Qn to -fno-ident.
3549
3550 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
3551
3552 * cp-tree.h (struct tree_binding): Replace scope field with a union.
3553 (BINDING_SCOPE): Adjust.
3554 * decl.c (BINDING_LEVEL): Adjust.
3555
3556 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
3557
3558 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
3559 member constants.
3560
3561 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
3562 a ctor initializer.
3563
3564 * tree.c (equal_functions): Fix name in prototype.
3565
3566 * decl.c (push_local_binding): Add FLAGS argument.
3567 (pushdecl, push_overloaded_decl): Pass it.
3568 * decl2.c (do_local_using_decl): Likewise.
3569 * cp-tree.h: Adjust prototype.
3570 * decl.c (poplevel): Fix logic.
3571
3572 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
3573 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
3574 (cat_namespace_levels): Don't loop forever.
3575
3576 1999-01-25 Richard Henderson <rth@cygnus.com>
3577
3578 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
3579
3580 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
3581
3582 * class.c (resolve_address_of_overloaded_function): Mark the
3583 chosen function used.
3584
3585 * call.c (build_call): Make sure that a function coming in has
3586 been marked used already.
3587 * decl.c (expand_static_init): Call mark_used instead of
3588 assemble_external.
3589 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
3590 alloc_eh_object, expand_throw): Likewise.
3591 * init.c (build_builtin_delete_call): Likewise.
3592 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
3593 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
3594 expand_generic_desc): Likewise.
3595
3596 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
3597
3598 * tree.c (equal_functions): New function.
3599 (ovl_member): Call it.
3600
3601 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
3602
3603 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
3604
3605 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
3606
3607 * decl.c (decls_match): Return 1 if old and new are identical.
3608 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
3609
3610 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
3611
3612 * decl.c (start_function): Make member functions one_only on windows.
3613 * decl2.c (import_export_decl): Likewise.
3614
3615 * decl.c (grokdeclarator): Don't complain about implicit int in
3616 a system header. Change same-name field check to not complain in
3617 a system header instead of within extern "C".
3618
3619 1999-01-21 Mark Mitchell <mark@markmitchell.com>
3620
3621 * cp-tree.h (PUSH_GLOBAL): New macro.
3622 (PUSH_LOCAL): Likewise.
3623 (PUSH_USING): Likewise.
3624 (namespace_bindings_p): Declare.
3625 (push_overloaded_decl): Likewise.
3626 * decl.c (push_overloaded_decl): Don't make it static. Check for
3627 illegal declarations after using declarations here.
3628 (namespace_bindings_p): Likewise.
3629 (duplicate_decls): Don't consider declarations from different
3630 namespaces to be the same.
3631 (pushdecl): Use symbolic PUSH_ constants in calls to
3632 push_overloaded_decl.
3633 (push_overloaded_decl_1): Likewise.
3634 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
3635 (do_nonmember_using_decl): Check for illegal using declarations
3636 after ordinary declarations here.
3637 (do_local_using_decl): Call pushdecl to insert declarations.
3638
3639 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
3640
3641 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
3642
3643 1999-01-21 Mark Mitchell <mark@markmitchell.com>
3644
3645 * tree.c (build_cplus_array_type_1): Don't call build_array_type
3646 for types involving template parameters.
3647
3648 * cp-tree.h (PARM_DECL_EXPR): Delete.
3649 (convert_default_arg): Change prototype.
3650 (check_default_argument): Declare.
3651 (search_tree): Likewise.
3652 * call.c (convert_default_arg): Take the function to which the
3653 default argument belongs as a parameter, and do any necessary
3654 instantiation here, instead of ...
3655 (build_over_call): Here.
3656 * decl.c (local_variable_p): New function.
3657 (check_default_argument): Likewise, split out and tidied from ...
3658 (grokparms): Here.
3659 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
3660 * pt.c (tsubst_call_declarator_parms): New function.
3661 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
3662 with CALL_EXPRs, rather than trying to be clever.
3663 (tsubst): Use tsubst_call_declarator_parms.
3664 * tree.c (search_tree): Don't make it static.
3665 * typeck.c (convert_arguments): Use new interface to
3666 convert_default_arg.
3667
3668 1999-01-20 Mark Mitchell <mark@markmitchell.com>
3669
3670 * error.c (dump_function_decl): Don't print the argument types for
3671 a function when the verbosity level is negative.
3672
3673 * call.c (build_over_call): Check format attributes at call-time.
3674
3675 * pt.c (tsubst_copy): Fix comment.
3676 (unify): Don't allow unification with variable-sized arrays.
3677
3678 * semantics.c (finish_stmt_expr): When processing a template make
3679 the BIND_EXPR long-lived.
3680
3681 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
3682
3683 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
3684 (import_export_vtable): Not here.
3685
3686 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
3687
3688 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
3689 non-static member function.
3690
3691 1999-01-18 Nathan Sidwell <nathan@acm.org>
3692
3693 * class.c (instantiate_type): Only diagnose illegal address of member
3694 function if complaining.
3695
3696 * decl.c (lookup_name_real): Remove duplicate code.
3697
3698 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
3699
3700 * tree.c (copy_template_template_parm): Use permanent_obstack.
3701
3702 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3703
3704 * pt.c (unify): Remove restrictions on deduction of argument
3705 of template template parameters.
3706
3707 1999-01-18 Nathan Sidwell <nathan@acm.org>
3708
3709 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
3710
3711 * class.c (resolve_address_of_overloaded_function): Show list of
3712 all candidates, when none of them match.
3713
3714 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
3715
3716 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
3717 definition of 'casting away const' in reinterpret_cast<>.
3718
3719 1999-01-18 Graham <grahams@rcp.co.uk>
3720
3721 * cvt.c: Add include for decl.h, remove extern for
3722 static_aggregates which is now provided by decl.h.
3723
3724 * Makefile.in (cvt.o): Add dependency for decl.h and missing
3725 dependencies for convert.h and flags.h.
3726
3727 1999-01-18 Nathan Sidwell <nathan@acm.org>
3728
3729 * decl2.c (do_dtors): Set current location to that of the
3730 decl, for sensible diagnostics and debugging.
3731 (check_classfn): Issue `incomplete type' error, if
3732 class is not defined.
3733
3734 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
3735
3736 * cp-tree.h: Add prototype for bound_pmf_p.
3737
3738 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
3739 Manfred Hollstein <manfred@s-direktnet.de>
3740
3741 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
3742 -Wreturn-type.
3743
3744 1999-01-16 Nathan Sidwell <nathan@acm.org>
3745
3746 * cp-tree.h (struct lang_type): Added has_mutable flag.
3747 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
3748 (TYPE_HAS_MUTABLE_P): New macro to read it.
3749 (cp_has_mutable_p): Prototype for new function.
3750 * class.c (finish_struct_1): Set has_mutable from members.
3751 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
3752 it contains a mutable.
3753 * typeck.c (cp_has_mutable_p): New function.
3754
3755 1999-01-15 Mark Mitchell <mark@markmitchell.com>
3756
3757 * pt.c (process_template_parm): Ignore top-level qualifiers on
3758 non-type parameters.
3759
3760 * decl.c (start_function): Use current_function_parms in the call
3761 to require_complete_type_for_parms, not the probably empty
3762 DECL_ARGUMENTS.
3763
3764 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
3765
3766 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
3767
3768 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
3769 that we don't suppress the other copies.
3770 * lex.c (handle_cp_pragma): Likewise.
3771
3772 1999-01-13 Mark Mitchell <mark@markmitchell.com>
3773
3774 * decl.c (grokdeclarator): Undo 1998-12-14 change.
3775 * tree.c (build_cplus_array_type_1): Likewise.
3776 * pt.c (instantiate_class_template): Remove misleading comment.
3777 (tsubst_aggr_type): Substitute if there are template parameters,
3778 regardless of whether or not they use template arguments.
3779 (unify): Likewise, but for unification.
3780
3781 1999-01-12 Richard Henderson <rth@cygnus.com>
3782
3783 * cp-tree.h (flag_permissive): Declare extern.
3784
3785 1999-01-06 Mark Mitchell <mark@markmitchell.com>
3786
3787 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
3788 here.
3789 (lang_type): Add is_partial_instantiation. Decrease width of
3790 dummy.
3791 (PARTIAL_INSTANTIATION_P): New macro.
3792 (OPERATOR_TYPENAME_P): Remove.
3793 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
3794 OPERATOR_TYPENAME_P.
3795 (grok_op_properties): Likewise.
3796 * friend.c (do_friend): Handle friends that are member functions
3797 correctly.
3798 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
3799 * pt.c (instantiate_class_template): Rework for clarity. Avoid
3800 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
3801 any more partial instantiation than is absolutely necessary for
3802 implicit typename. Set PARTIAL_INSTANTIATION_P.
3803 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
3804 * semantics.c (begin_class_definition): Handle partial
3805 specializations of a type that was previously partially
3806 instantiated.
3807
3808 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
3809
3810 * g++spec.c (LIBSTDCXX): Provide default definition.
3811 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
3812
3813 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3814
3815 * Make-lang.in (g++.o): Depend on prefix.h.
3816
3817 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
3818
3819 * tree.c (bound_pmf_p): New fn.
3820 * typeck.c (build_c_cast): Use it.
3821
3822 * decl.c (grok_op_properties): Use same_type_p.
3823
3824 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3825
3826 * Makefile.in (cvt.o): Depend on toplev.h.
3827
3828 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
3829
3830 * cvt.c: Include toplev.h.
3831
3832 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
3833 definitions.
3834
3835 * init.c (expand_vec_init): Initialize variable `itype'.
3836
3837 * lex.c (yyerror): Cast the argument passed to a ctype function to
3838 an unsigned char.
3839
3840 * method.c (build_mangled_C9x_name): Wrap prototype and definition
3841 in "HOST_BITS_PER_WIDE_INT >= 64".
3842
3843 * typeck.c (build_binary_op): Mark parameter `convert_p' with
3844 ATTRIBUTE_UNUSED.
3845
3846 1998-12-22 Mark Mitchell <mark@markmitchell.com>
3847
3848 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
3849 * tree.c (build_exception_variant): Don't crash on empty throw
3850 specs.
3851
3852 1998-12-18 DJ Delorie <dj@cygnus.com>
3853
3854 * cvt.c (convert_to_reference): Check for both error_mark_node
3855 and NULL_NODE after call to convert_for_initialization.
3856
3857 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
3858
3859 * error.c (interesting_scope_p): New fn.
3860 (dump_simple_decl): Use it.
3861 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
3862 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
3863
3864 1998-12-16 Mark Mitchell <mark@markmitchell.com>
3865
3866 * class.c (resolve_address_of_overloaded_function): Do conversion
3867 to correct type here, rather than ...
3868 (instantiate_type): Here.
3869
3870 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
3871 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
3872 (decl_template_parm_p): Remove.
3873 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
3874 parameter.
3875 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
3876 * pt.c (push_inline_template_parms_recursive): Set it.
3877 (decl_template_parm_p): Remove.
3878 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
3879 (process_template_parm): Set it.
3880
3881 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
3882
3883 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
3884 if configured with cpplib.
3885
3886 1998-12-15 Mark Mitchell <mark@markmitchell.com>
3887
3888 * decl.c (poplevel): Make sure ns_binding is initialized.
3889
3890 * decl.c (finish_function): Undo inadvertent change in previous
3891 patch.
3892
3893 1998-12-14 Mark Mitchell <mark@markmitchell.com>
3894
3895 * class.c (pushclass): Tweak handling of class-level bindings.
3896 (resolve_address_of_overloaded_function): Update pointer-to-member
3897 handling.
3898 (instantiate_type): Likewise.
3899 * cvt.c (cp_convert_to_pointer): Likewise.
3900 * decl.c (pop_binding): Take the DECL to pop, not just the name.
3901 Deal with `struct stat' hack.
3902 (binding_level): Add to documentation.
3903 (push_binding): Clear BINDING_TYPE.
3904 (add_binding): New function.
3905 (push_local_binding): Use it.
3906 (push_class_binding): Likewise.
3907 (poplevel): Adjust calls to pop_binding.
3908 (poplevel_class): Likewise.
3909 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
3910 declarations to current binding level.
3911 (push_class_level_binding): Likewise.
3912 (push_overloaded_decl): Adjust handling of OVERLOADs in local
3913 bindings.
3914 (lookup_namespace_name): Don't crash when confronted with a
3915 TEMPLATE_DECL.
3916 (lookup_name_real): Do `struct stat' hack in local binding
3917 contexts.
3918 (build_ptrmemfunc_type): Adjust documentation.
3919 (grokdeclarator): Don't avoid building real array types when
3920 processing templates unless really necessary.
3921 (finish_method): Adjust calls to pop_binding.
3922 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
3923 not reparse_decl_as_expr.
3924 (build_expr_from_tree): Deal with a template-id as the function to
3925 call in a METHOD_CALL_EXPR.
3926 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
3927 (maybe_adjust_types_For_deduction): Don't do peculiar things with
3928 METHOD_TYPEs here.
3929 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
3930 pointer-to-member types where necessary.
3931 * tree.c (build_cplus_array_type_1): Don't avoid building real
3932 array types when processing templates unless really necessary.
3933 (build_exception_variant): Compare the exception lists correctly.
3934
3935 1998-12-13 Mark Mitchell <mark@markmitchell.com>
3936
3937 * cp-tree.def (CPLUS_BINDING): Update documentation.
3938 * cp-tree.h (LOCAL_BINDING_P): New macro.
3939 (lang_identifier): Rename local_value to bindings.
3940 (tree_binding): Make `scope' of type `void*', not `tree'.
3941 (BINDING_SCOPE): Update documentation.
3942 (IDENTIFIER_LOCAL_VALUE): Remove.
3943 (IDENTIFIER_CLASS_VALUE): Document.
3944 (IDENTIFIER_BINDING): New macro.
3945 (IDENTIFIER_VALUE): Likewise.
3946 (TIME_IDENTIFIER_TIME): Likewise.
3947 (TIME_IDENTIFIER_FILEINFO): Likewise.
3948 (IMPLICIT_TYPENAME_P): Likewise.
3949 (set_identifier_local_value): Remove.
3950 (push_local_binding): New function.
3951 (push_class_binding): Likewise.
3952 * class.c (pushclass): Update comments; use push_class_binding.
3953 * decl.c (set_identifier_local_value_with_scope): Remove.
3954 (set_identifier_local_value): Likewise.
3955 (push_binding): New function.
3956 (pop_binding): Likewise.
3957 (binding_level): Update documentation. Remove shadowed.
3958 (BINDING_LEVEL): New macro.
3959 (free_binding_nodes): New variable.
3960 (poplevel): Adjust for new name-lookup scheme. Don't mess up
3961 BLOCK_VARs when doing for-scope extension. Remove effectively
3962 dead code.
3963 (pushlevel_class): Tweak formatting.
3964 (poplevel_class): Adjust for new name-lookup scheme.
3965 (print_binding_level): Likewise.
3966 (store_bindings): Likewise.
3967 (pushdecl): Likewise.
3968 (pushdecl_class_level): Likewise.
3969 (push_class_level_binding): Likewise.
3970 (push_overloaded_decl): Update comments. Adjust for new
3971 name-lookup scheme.
3972 (lookup_name_real): Likewise.
3973 (lookup_name_current_level): Likewise.
3974 (cp_finish_decl): Likewise.
3975 (require_complete_types_for_parms): Likewise. Remove misleading
3976 #if 0'd code.
3977 (grok_parms): Likewise. Don't call
3978 require_complete_types_for_parms here.
3979 (grok_ctor_properties): Don't treat templates as copy
3980 constructors.
3981 (grop_op_properties): Or as assignment operators.
3982 (start_function): Document. Adjust for new name-lookup scheme.
3983 (finish_function): Likewise.
3984 * decl2.c (do_local_using_decl): Use push_local_binding.
3985 * lex.c (begin_definition_of_inclass_inline): New function, split
3986 out from ...
3987 (do_pending_inlines): Here, and ...
3988 (process_next_inline): Here.
3989 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
3990 (init_filename_times): Likewise.
3991 (extract_interface_info): Likewise.
3992 (ste_typedecl_interface_info): Likewise.
3993 (check_newline): Likewise.
3994 (dump_time_statistics): Likewise.
3995 (handle_cp_pragma): Likewise.
3996 (do_identifier): Adjust for new name-lookup scheme.
3997 * parse.y (function_try_block): Return ctor_initializer_opt value.
3998 (fndef): Use it.
3999 (fn.defpen): Pass appropriate values to start_function.
4000 (pending_inline): Use functor_try_block value, and pass
4001 appropriate values to finish_function.
4002 * pt.c (is_member_template): Update documentation; remove handling
4003 of FUNCTION_DECLs. As per name, this function should deal only in
4004 TEMPLATE_DECLs.
4005 (decl_template_parm_p): Change name of olddecl parameter to decl.
4006 (check_template_shadow): Adjust for new name-lookup scheme.
4007 (lookup_template_class): Likewise.
4008 (tsubst_decl): Tweak so as not to confuse member templates with
4009 copy constructors and assignment operators.
4010 (unify): Handle UNION_TYPEs.
4011 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
4012 (lang_print_xnode): Adjust for new name-lookup scheme.
4013 * typeck.c (mark_addressable): Likewise.
4014 (c_expand_return): Likewise.
4015
4016 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
4017
4018 * decl.c (grokdeclarator): Allow field with same name as class
4019 in extern "C".
4020
4021 * decl.c (lookup_name_real): Don't limit field lookup to types.
4022 * class.c (check_member_decl_is_same_in_complete_scope): No error
4023 if icv and x are the same.
4024 * lex.c (do_identifier): Tweak error message.
4025
4026 1998-12-10 Mark Mitchell <mark@markmitchell.com>
4027
4028 * decl.c (start_enum): Use push_obstacks, not
4029 end_temporary_allocation.
4030 (finish_enum): Call pop_obstacks.
4031
4032 1998-12-10 Mark Mitchell <mark@markmitchell.com>
4033
4034 * class.c (instantiate_type): Return error_mark_node rather than
4035 junk.
4036
4037 1998-12-09 Mark Mitchell <mark@markmitchell.com>
4038
4039 * cp-tree.h (most_specialized_instantiation): New function.
4040 (print_candidates): Likewise.
4041 * class.c (validate_lhs): Remove.
4042 (resolve_address_of_overloaded_function): New function, split out
4043 and then substantially reworked, from ...
4044 (instantiate_type): Use it. Simplify.
4045 * cvt.c (convert_to_reference): Complain when caller has indicated
4046 that's the right thing to do. Don't crash if instantiate_type
4047 fails.
4048 * pt.c: Substitute `parameters' for `paramters' throughout.
4049 (print_candidates): Don't make it static.
4050 (most_specialized_instantiation): Split out from ...
4051 (most_specialized): Here.
4052
4053 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
4054
4055 * lex.c (lang_init_options): Initialize cpplib.
4056 * decl2.c (parse_options,cpp_initialized): Removed.
4057 (lang_decode_option): Move initialization of cpplib to
4058 lang_init_options.
4059
4060 1998-12-09 Mark Mitchell <mark@markmitchell.com>
4061
4062 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
4063 well as the TYPE_DECL, when a typedef name is assigned to a
4064 previously anonymous type.
4065
4066 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
4067
4068 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
4069 __cp_eh_info for getting the eh info pointer. Add table_index to
4070 field list.
4071 (push_eh_cleanup): Don't increment 'handlers' data field.
4072 (process_start_catch_block): Don't set the 'caught' field.
4073
4074 * cp/exception.cc (CP_EH_INFO): New macro for getting the
4075 exception info pointer within library routines.
4076 (__cp_eh_info): Use CP_EH_INFO.
4077 (__start_cp_handler): Get exception info pointer, set caught field,
4078 and increment the handlers field. Avoids this being done by handlers.
4079 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
4080 (uncaught_exception): Use CP_EH_INFO macro.
4081
4082 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
4083
4084 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
4085
4086 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
4087
4088 * lex.c (check_newline): Add support for \ as `natural'
4089 characters in file names in #line to be consistent with #include
4090 handling. We support escape processing in the # 1 "..." version of
4091 the command. See also support in cp/lex.c.
4092
4093 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
4094
4095 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
4096 structure.
4097
4098 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
4099
4100 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
4101
4102 * error.c (dump_simple_decl): Also print namespace context.
4103 (dump_function_decl): Likewise.
4104
4105 * decl2.c (ambiguous_decl): Don't print old value if it's
4106 error_mark_node.
4107
4108 * decl.c (lookup_name_real): Fix handling of local types shadowed
4109 by a non-type decl. Remove obsolete code.
4110 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
4111
4112 * lang-options.h: Add -fpermissive.
4113 * decl2.c: Likewise.
4114 * cp-tree.h: Add flag_permissive.
4115 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
4116 were specified, set flag_pedantic_errors.
4117 * call.c (build_over_call): Turn dropped qualifier messages
4118 back into pedwarns.
4119 * cvt.c (convert_to_reference): Likewise.
4120 * typeck.c (convert_for_assignment): Likewise.
4121
4122 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
4123
4124 * decl2.c (coerce_new_type): Use same_type_p.
4125 (coerce_delete_type): Likewise.
4126
4127 * call.c (check_dtor_name): Return 1, not error_mark_node.
4128
4129 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
4130
4131 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
4132 if MULTIPLE_SYMBOL_SPACES.
4133
4134 * pt.c (check_template_shadow): New fn.
4135 * decl2.c (grokfield): Use it.
4136 * decl.c (pushdecl): Likewise.
4137 (pushdecl_class_level): Likewise.
4138 (start_method): Likewise.
4139 (xref_tag): Don't try to use 't' if we're defining.
4140
4141 * call.c (check_dtor_name): Just return an error_mark_node.
4142 * pt.c (lookup_template_class): Complain about using non-template here.
4143 * parse.y (apparent_template_type): Not here.
4144
4145 * pt.c (check_explicit_specialization): Complain about specialization
4146 with C linkage.
4147
4148 * lang-options.h: Add -f{no-,}implicit-inline-templates.
4149
4150 * pt.c (convert_nontype_argument): Don't assume that any integer
4151 argument is intended to be a constant-expression.
4152
4153 1998-12-03 Mark Mitchell <mark@markmitchell.com>
4154
4155 * class.c (handle_using_decl): Fix comment. Don't lookup
4156 constructors in base classes.
4157 (validate_lhs): Fix typo in comment.
4158 * search.c (lookup_field_1): Don't return a USING_DECL.
4159
4160 * cp-tree.h (DECL_ACCESS): Improve documentation.
4161
4162 * decl.c (expand_static_init): Don't set the initialization-done
4163 flag until the initialization is done.
4164
4165 1998-12-02 Mark Mitchell <mark@markmitchell.com>
4166
4167 * decl2.c (validate_nonmember_using_decl): Complain about using
4168 declarations for class members.
4169
4170 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
4171
4172 * typeck2.c (process_init_constructor): Use same_type_p.
4173
4174 * decl.c (check_tag_decl): Don't warn about null decl inside a
4175 class.
4176
4177 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
4178 UNIFY_ALLOW_NONE.
4179 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
4180 (resolve_overloaded_unification): Strip baselinks.
4181
4182 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4183
4184 * g++spec.c: Don't prototype xmalloc.
4185
4186 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
4187
4188 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
4189
4190 * decl.c (check_tag_decl): Do complain about null friend decl at
4191 file scope.
4192
4193 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4194
4195 * lex.c (make_lang_type): Clear the whole struct lang_type, not
4196 only the first multiple of sizeof (int).
4197
4198 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
4199
4200 * decl.c (start_decl): An explicit specialization of a static data
4201 member is only a definition if it has an initializer.
4202
4203 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
4204 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
4205 cp_finish_decl.
4206 * init.c (expand_default_init): Check for DIRECT_BIND instead of
4207 DECL_ARTIFICIAL.
4208
4209 * call.c (build_over_call): Use build_decl.
4210
4211 * except.c (expand_throw): Just use convert, not
4212 build_reinterpret_cast.
4213
4214 * lex.c (handle_generic_pragma): Use token_buffer.
4215
4216 * decl.c (check_tag_decl): Don't complain about null friend decl.
4217
4218 1998-11-24 Dave Pitts <dpitts@cozx.com>
4219
4220 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
4221 first position.
4222 * lex.c (check_newline): Use ISALPHA.
4223 (readescape): Use ISGRAPH.
4224 (yyerror): Use ISGRAPH.
4225
4226 1998-11-24 Nathan Sidwell <nathan@acm.org>
4227
4228 * search.c (get_abstract_virtuals): Do not use initial
4229 CLASSTYPE_ABSTRACT_VIRTUALS.
4230 * typeck2.c (abstract_virtuals_error): Show location of abstract
4231 declaration.
4232 * call.c (build_new_method_call): Use
4233 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
4234 * class.c (finish_struct_bits): Don't bother working out whether
4235 get_abstract_virtuals will do anything, just do it.
4236
4237 1998-11-24 Graham <grahams@rcp.co.uk>
4238
4239 * typeck.c (build_component_ref): Remove unused statement.
4240
4241 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
4242
4243 * class.c (add_method): Catch invalid overloads.
4244
4245 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
4246 * search.c (lookup_conversions): Handle getting real OVERLOADs.
4247 (add_conversions): Likewise. Revert last change.
4248 * call.c (add_conv_candidate): Pass totype to add_candidate instead
4249 of fn. Don't add a new candidate if the last one was for the same
4250 type.
4251 (print_z_candidates): Handle getting a type as a function.
4252 (joust): If we got two conversion candidates to the same type,
4253 just pick one.
4254 (build_object_call): Lose 'templates'.
4255 (build_user_type_conversion_1): Handle getting real OVERLOADs.
4256
4257 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
4258
4259 * typeck2.c (process_init_constructor): If there are elements
4260 that don't have initializers and they need to have constructors
4261 run, supply them with initializers.
4262
4263 * class.c (finish_struct_1): A class with a 0-width bitfield is
4264 still empty.
4265
4266 1998-11-23 Mark Mitchell <mark@markmitchell.com>
4267
4268 * pt.c (instantiate_class_template): Don't try to figure out what
4269 specialization to use for a partial instantiation. Correct
4270 typos in a couple of comments. Avoid calling uses_template_parms
4271 multiple times.
4272
4273 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
4274
4275 * method.c (process_overload_item): Add call to
4276 build_mangled_C9x_name for intTI_type_nodes.
4277 (build_mangled_C9x_name): Add prototype, define.
4278 * decl.c (init_decl_processing): Add names for
4279 TImode_type_node.
4280
4281 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
4282
4283 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
4284
4285 * class.c (finish_struct_1): Set things up for 0-width bitfields
4286 like we do for others.
4287
4288 * decl.c (check_tag_decl): New fn.
4289 (shadow_tag): Split out from here.
4290 * decl2.c (grok_x_components): Call it.
4291
4292 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
4293
4294 * decl.c: Lose warn_about_return_type.
4295 (grokdeclarator): Always complain about implicit int, except for
4296 `main () { ... }'.
4297
4298 * decl.c (tag_name): New fn.
4299 (xref_tag): Complain about using typedef-name after class-key.
4300
4301 * init.c (expand_vec_init): Also keep going if from_array.
4302
4303 * tree.c (is_overloaded_fn): Also handle the output of
4304 build_offset_ref.
4305
4306 * decl.c (grokdeclarator): Use constructor_name when comparing
4307 field name against enclosing class.
4308 * class.c (finish_struct_anon): Likewise.
4309
4310 1998-11-22 Mark Mitchell <mark@markmitchell.com>
4311
4312 * decl.c (poplevel): Remove code to handle KEEP == 2.
4313 (finish_function): Don't confuse BLOCK-order when
4314 processing a destructor.
4315
4316 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
4317
4318 * decl.c (require_complete_types_for_parms): Call layout_decl
4319 after we've completed the type.
4320
4321 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
4322
4323 * decl2.c (validate_nonmember_using_decl): Allow using templates
4324 from the global namespace.
4325
4326 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
4327
4328 Handle specifying template args to member function templates.
4329 * tree.c (build_overload): Always create an OVERLOAD for a template.
4330 * search.c (add_conversions): Handle finding an OVERLOAD.
4331 * decl2.c (check_classfn): Likewise.
4332 * lex.c (identifier_type): See through a baselink.
4333 * parse.y (do_id): Don't call do_identifier if we got a baselink.
4334 * class.c (instantiate_type, case TREE_LIST): Recurse.
4335
4336 * decl.c (grokdeclarator): Allow a boolean constant for array
4337 bounds, odd as that sounds.
4338
4339 * pt.c (unify): Be more strict about non-type parms, except for
4340 array bounds.
4341 (UNIFY_ALLOW_INTEGER): New macro.
4342
4343 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
4344
4345 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
4346
4347 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
4348
4349 * semantics.c (begin_class_definition): Call
4350 maybe_process_partial_specialization before push_template_decl.
4351 Don't call push_template_decl for a specialization.
4352 * search.c (lookup_field): Do return a member template class.
4353 * decl2.c (handle_class_head): Handle member template classes.
4354
4355 * decl.c (grokdeclarator): A parm type need not be complete.
4356
4357 * pt.c (convert_nontype_argument): Fix thinko.
4358
4359 1998-11-18 Mark Mitchell <mark@markmitchell.com>
4360
4361 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
4362 (global_delete_fndecl): New variable.
4363 * decl.c (global_delete_fndecl): Define it.
4364 (init_decl_processing): Set it.
4365 * init.c (build_builtin_delete_call): Use it.
4366 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
4367 nodes.
4368
4369 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
4370
4371 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
4372 type.
4373
4374 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
4375 * call.c (build_object_call): Also support references to functions.
4376 * typeck.c (convert_for_initialization): Don't decay a function
4377 if the target is a reference to function.
4378
4379 * search.c (add_conversions): Get all the overloads from a class.
4380
4381 * decl.c (grok_ctor_properties): Complain about any constructor
4382 that will take a single arg of the class type by value.
4383
4384 * typeck2.c (build_functional_cast): Can't create objects of
4385 abstract classes this way.
4386 * cvt.c (ocp_convert): Likewise.
4387
4388 * decl.c (grokfndecl): Member functions of local classes are not
4389 public.
4390
4391 1998-11-18 Mark Mitchell <mark@markmitchell.com>
4392
4393 * Make-lang.in (cc1plus): Add dependency on hash.o.
4394
4395 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
4396
4397 * search.c (get_abstract_virtuals): Complain about virtuals with
4398 no final overrider.
4399 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
4400 with no final overrider.
4401 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
4402 on virtuals with no final overrider.
4403
4404 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
4405
4406 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
4407 after layout_type.
4408
4409 * friend.c (do_friend): Don't set_mangled_name_for_decl.
4410
4411 * class.c (finish_struct_anon): Complain about non-fields.
4412 * decl2.c (build_anon_union_vars): Likewise.
4413
4414 * decl.c (grokdeclarator): Normal data members can't have the same
4415 name as the class, either.
4416 * class.c (finish_struct_anon): Neither can members of an
4417 anonymous union.
4418
4419 1998-11-17 Mark Mitchell <mark@markmitchell.com>
4420
4421 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
4422 (TYPE_BINFO): Likewise.
4423 (IS_AGGR_TYPE): Tweak.
4424 (SET_IS_AGGR_TYPE): New macro.
4425 (CLASS_TYPE_P): Tweak.
4426 (lang_type): Group mark bitfields together. Remove linenum.
4427 (CLASSTYPE_SOURCE_LINE): Remove macro.
4428 (CLASSTYPE_MARKED_N): New macro.
4429 (SET_CLASSTYPE_MARKED_N): Likewise.
4430 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
4431 (CLASS_TYPE_MARKED_*): Use them.
4432 (SET_CLASSTYPE_MARKED_*): Likewise.
4433 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
4434 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4435 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
4436 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
4437 * class.c (class_cache_obstack): New variable.
4438 (class_cache_firstobj): Likewise.
4439 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
4440 (pushclass): Free the cache, when appropriate.
4441 (popclass): Tidy.
4442 (maybe_push_cache_obstack): Use class_cache_obstack.
4443 * decl.c (include hash.h).
4444 (typename_hash): New function.
4445 (typename_compare): Likewise.
4446 (build_typename_type): Check the hash table to avoid creating
4447 duplicates.
4448 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
4449 (grokdeclarator): Use CLASS_TYPE_P.
4450 (xref_basetypes): Likewise.
4451 (start_function): Likewise. Don't put current_class_ref on the
4452 permanent obstack.
4453 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
4454 and TYPE_TI_ARGS.
4455 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
4456 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
4457 fields for types other than class types. Do clear TYPE_ALIAS_SET
4458 for types other than class types, though.
4459 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
4460 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4461 * pt.c (process_template_parm): Don't set
4462 CLASSTYPE_GOT_SEMICOLON.
4463 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4464 Coerce arguments on the momentary obstack.
4465 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4466 (instantiate_class_template): Calculate template arguments on the
4467 momentary obstack. Tidy.
4468 (tsubst_template_arg_vector): Use make_temp_vec.
4469 (tsubst_aggr_type): Put template arguments on the momentary
4470 obstack.
4471 (tsubst_decl): Likewise.
4472 (tsubst): Copy the array bounds index to the permanent obstack
4473 before building index types. Use new macros.
4474 (unify): Use new macros.
4475 (do_type_instantiation): Likewise.
4476 * search.c (lookup_fnfields_1): Use new macros.
4477 (dfs_pushdecls): Build envelopes on the cache obstack.
4478 (dfs_compress_decls): Use new macros.
4479 (push_class_decls): Build on the cache obstack.
4480 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
4481 * sign.c (build_signature_pointer_or_reference_type): Use
4482 SET_IS_AGGR_TYPE.
4483 * tree.c (make_binfo): Check CLASS_TYPE_P.
4484 (copy_template_template_parm): Adjust.
4485 (make_temp_vec): Use push_expression_obstack.
4486 * typeck.c (complete_type): Use new macros.
4487 (comptypes): Likewise.
4488
4489 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
4490
4491 * pt.c (tsubst): Add diagnostics for invalid array, reference
4492 and pointer to member types.
4493
4494 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
4495
4496 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
4497
4498 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
4499 Simplify.
4500
4501 * parse.y (structsp): Fix cut-and-paste error.
4502
4503 * init.c (build_new): Complain about non-integral size.
4504
4505 * parse.y (unary_expr): Complain about defining types in sizeof.
4506
4507 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
4508
4509 * rtti.c (build_x_typeid): Complain about typeid without
4510 including <typeinfo>.
4511 (get_typeid): Likewise. Complain about typeid of incomplete type.
4512 (get_tinfo_fn_dynamic): Likewise.
4513 (get_typeid_1): Not static anymore.
4514 * except.c (build_eh_type_type): Use get_typeid_1.
4515
4516 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
4517 ambiguous or private bases. Fix warning for reference cast.
4518
4519 1998-11-16 Mark Mitchell <mark@markmitchell.com>
4520
4521 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
4522 * decl.c (duplicate_decls): Remove special-case code to deal with
4523 template friends, and just do the obvious thing.
4524 * pt.c (register_specialization): Tweak for clarity, and also to
4525 clear DECL_INITIAL for an instantiation before it is merged with a
4526 specialization.
4527 (check_explicit_specialization): Fix indentation.
4528 (tsubst_friend_function): Handle both definitions in friend
4529 declaration and outside friend declarations.
4530 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
4531 (regenerate_decl_from_template): Tweak accordingly.
4532 (instantiate_decl): Likewise.
4533
4534 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
4535
4536 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
4537 member function reference to error.
4538 * cvt.c (ocp_convert): Complain about converting an overloaded
4539 function to void.
4540
4541 * init.c (build_offset_ref): Just return a lone static member
4542 function.
4543
4544 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
4545 not internal ones.
4546
4547 * typeck.c (build_binary_op_nodefault): Improve error handling.
4548
4549 * decl.c (grokfndecl): Complain about making 'main' a template.
4550
4551 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
4552
4553 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
4554 TYPE_DECL in a template.
4555
4556 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
4557
4558 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
4559
4560 * decl.c (struct cp_function): Add named_label_uses.
4561 (push_cp_function_context): Save it.
4562 (pop_cp_function_context): Restore it.
4563 (define_label): Also complain about jumping into the scope of
4564 non-POD objects that don't have constructors.
4565 * tree.c (pod_type_p): New fn.
4566
4567 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
4568 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
4569 (get_tinfo_fn): Not here.
4570 * repo.c (repo_get_id): Abort if we get called for an incomplete
4571 type.
4572
4573 1998-11-13 Mark Mitchell <mark@markmitchell.com>
4574
4575 * except.c (expand_throw): Make sure first argument to
4576 __cp_push_exception is of type `void*' to avoid spurious error
4577 messages.
4578
4579 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
4580
4581 * pt.c (try_one_overload): Take orig_targs again. Only check for
4582 mismatches against them; we don't care what a previous call found.
4583 (resolve_overloaded_unification): Adjust.
4584
4585 * search.c (lookup_field): Don't return anything for a non-type
4586 field from a dependent type.
4587 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
4588 in an array declarator.
4589 (start_decl): Push into the class before looking for the field.
4590
4591 1998-11-08 Mark Mitchell <mark@markmitchell.com>
4592
4593 * method.c (build_overload_value): Handle REFERENCE_TYPE.
4594
4595 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
4596
4597 * decl.c (grokdeclarator): Allow namespace-scoped members if they
4598 are friends.
4599
4600 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
4601
4602 * pt.c (tsubst_decl): Don't mess with the global value of an
4603 un-mangled DECL_ASSEMBLER_NAME.
4604
4605 1998-11-03 Christopher Faylor <cgf@cygnus.com>
4606
4607 * decl.c (init_decl_processing): Remove CYGWIN conditional
4608 since CYGWIN is now able to deal with trapping signals.
4609
4610 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4611
4612 * cp-tree.h: Don't include gansidecl.h.
4613 * exception.cc: Include gansidecl.h (since we don't include config.h)
4614 * g++spec.c: Don't include gansidecl.h.
4615
4616 1998-11-06 Mark Mitchell <mark@markmitchell.com>
4617
4618 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
4619 size of dummy.
4620 (DECL_DEFINED_IN_CLASS_P): New macro.
4621 (TEMPLATE_PARMS_FOR_INLINE): Document.
4622 (check_static_variable_definition): New function.
4623 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
4624 appropriate.
4625 (check_static_variable_definition): Split out from ...
4626 (grokdeclarator): Here.
4627 * pt.c (check_default_tmpl_args): New function, split out from ...
4628 (push_template_decl_real): Here.
4629 (instantiate_template): Fix comment.
4630
4631 1998-11-04 Mark Mitchell <mark@markmitchell.com>
4632
4633 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
4634 (CP_TYPE_VOLATILE_P): Likewise.
4635 (CP_TYPE_RESTRICT_P): Likewise.
4636
4637 1998-11-03 Mark Mitchell <mark@markmitchell.com>
4638
4639 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
4640
4641 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
4642
4643 * class.c (instantiate_type): Be more helpful.
4644
4645 * decl2.c (import_export_decl): Call import_export_class.
4646
4647 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
4648 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
4649 * pt.c (tsubst_copy): Likewise.
4650
4651 1998-11-02 Mark Mitchell <mark@markmitchell.com>
4652
4653 * init.c (expand_vec_init): Fix off-by-one error.
4654
4655 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
4656
4657 * parse.y (apparent_template_type): New type.
4658 (named_complex_class_head_sans_basetype): Use it.
4659 * Makefile.in (CONFLICTS): One new conflict.
4660 * parse.c: Regenerated.
4661
4662 1998-11-01 Mark Mitchell <mark@markmitchell.com>
4663
4664 * cp-tree.h (COMPARE_STRICT): New macro.
4665 (COMPARE_BASE): Likewise.
4666 (COMPARE_RELAXED): Likewise.
4667 (COMPARE_REDECLARATION): Likewise.
4668 (same_type_p): Likewise.
4669 (same_or_base_type_p): Likewise.
4670 * call.c (standard_conversion): Use them, in place of comptypes
4671 with numeric arguments.
4672 (reference_binding): Likewise.
4673 (convert_like): Likewise.
4674 (build_over_call): Likewise.
4675 (is_subseq): Likewise.
4676 (is_properly_derived_from): Likewise.
4677 (compare_ics): Likewise.
4678 (joust): Likewise.
4679 * class.c (delete_duplicate_fields_1): Likewise.
4680 (resolves_to_fixed_type_p): Likewise.
4681 (instantiate_type): Likewise. Remove #if 0'd code.
4682 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
4683 (pushdecl): Likewise.
4684 (lookup_name_real): Likewise.
4685 (grokdeclarator): Likewise. Check for illegal array declarations.
4686 (grokparms): Likewise.
4687 (grok_op_properties): Likewise.
4688 * decl2.c (check_classfn): Likewise.
4689 * friend.c (is_friend): Likewise.
4690 (make_friend_class): Likewise.
4691 * init.c (expand_aggr_init): Likewise.
4692 (expand_vec_init): Likewise.
4693 * pt.c (is_member_template_class): Remove declaration.
4694 (is_specialization_of): Use COMPARE_* and new macros.
4695 (comp_template_parms): Likewise.
4696 (convert_nontype_argument): Likewise.
4697 (coerce_template_template_parms): Likewise.
4698 (template_args_equal): Likewise.
4699 (lookup_template_class): Likewise.
4700 (type_unification_real): Likewise.
4701 (unify): Likewise.
4702 (get_bindings_real): Likewise.
4703 * search.c (covariant_return_p): Likewise.
4704 (get_matching_virtual): Likewise.
4705 * sig.c (match_method_types): Likewise.
4706 * tree.c (vec_binfo_member): Likewise.
4707 (cp_tree_equal): Likewise.
4708 * typeck.c (common_type): Likewise.
4709 (comp_array_types): Likewise. Get issues involving unknown array
4710 bounds right.
4711 (comptypes): Update comments. Use new flags.
4712 (comp_target_types): Use new macros.
4713 (compparms): Likewise.
4714 (comp_target_parms): Likewise.
4715 (string_conv_p): Likewise.
4716 (build_component_ref): Likewise.
4717 (build_indirect_ref): Likewise.
4718 (build_conditional_expr): Likewise.
4719 (build_static_cast): Likewise.
4720 (build_reinterpret_cast): Likewise.
4721 (build_const_cast): Likewise.
4722 (build_modify_expr): Likewise.
4723 (convert_for_assignment): Likewise.
4724 (comp_ptr_ttypes_real): Likewise.
4725 (ptr_reasonably_similar): Likewise.
4726 (comp_ptr_ttypes_const): Likewise.
4727
4728 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
4729
4730 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
4731
4732 1998-10-30 Mark Mitchell <mark@markmitchell.com>
4733
4734 * decl2.c (delete_sanity): Pass integer_zero_node, not
4735 integer_two_node, to build_vec_delete.
4736 * init.c (build_array_eh_cleanup): Remove.
4737 (expand_vec_init_try_block): New function.
4738 (expand_vec_init_catch_clause): Likewise.
4739 (build_vec_delete_1): Don't deal with case that auto_delete_vec
4740 might be integer_two_node anymore.
4741 (expand_vec_init): Rework for initialization-correctness and
4742 exception-correctness.
4743 * typeck2.c (process_init_constructor): Make mutual exclusivity
4744 of cases more obvious.
4745
4746 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
4747
4748 * decl.c (lookup_name_real): OK, only warn if not lexing.
4749 Simplify suggested fix.
4750
4751 * cp-tree.h (IDENTIFIER_MARKED): New macro.
4752 * search.c (lookup_conversions): Use breadth_first_search.
4753 (add_conversions): Avoid adding two conversions to the same type.
4754 (breadth_first_search): Work with base binfos, rather
4755 than binfos and base indices.
4756 (get_virtual_destructor): Adjust.
4757 (tree_has_any_destructor_p): Adjust.
4758 (get_matching_virtual): Adjust.
4759
4760 * pt.c (push_template_decl_real): Generalize check for incorrect
4761 number of template parms.
4762 (is_member_template_class): #if 0.
4763
4764 1998-10-29 Richard Henderson <rth@cygnus.com>
4765
4766 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
4767 last.
4768
4769 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
4770
4771 * lex.c: Call check_newline from lang_init always. After
4772 calling cpp_start_read, set yy_cur and yy_lim to read from the
4773 cpplib token buffer.
4774
4775 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
4776
4777 * class.c (instantiate_type): Don't consider templates for a normal
4778 match.
4779
4780 * class.c (finish_struct_1): Don't complain about non-copy
4781 assignment ops in union members.
4782
4783 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
4784 (prepare_fresh_vtable): Likewise.
4785 (finish_struct_1): Don't call import_export_class.
4786 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
4787 (finish_prevtable_vardecl): Lose.
4788 (finish_file): Don't call it.
4789 * pt.c (instantiate_class_template): Likewise.
4790 * cp-tree.h: Remove it.
4791
4792 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
4793 * decl.c (finish_function): Not here.
4794 (start_function): Do set DECL_INITIAL.
4795
4796 * pt.c (push_template_decl_real): Complain about default template
4797 args for enclosing classes.
4798
4799 * call.c (add_function_candidate): Treat conversion functions
4800 as coming from the argument's class.
4801 * cp-tree.h (DECL_CONV_FN_P): New fn.
4802 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
4803 * class.c (add_method): Use DECL_CONV_FN_P.
4804 * decl2.c (check_classfn): Likewise.
4805 * error.c (dump_function_name): Likewise.
4806 (dump_function_decl): Likewise.
4807 * pt.c (fn_type_unification): Likewise.
4808 * search.c (add_conversions): Likewise.
4809
4810 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
4811
4812 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
4813 * method.c (hack_identifier): Also check for using RESULT_DECL
4814 from outer context.
4815
4816 1998-10-27 Mark Mitchell <mark@markmitchell.com>
4817
4818 * decl.c (grokdeclarator): Use type_quals, rather than constp,
4819 consistently.
4820
4821 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
4822
4823 * call.c (standard_conversion): instantiate_type here.
4824 (reference_binding): And here.
4825 (implicit_conversion): Not here.
4826 (build_op_delete_call): No need to cons up an OVERLOAD.
4827 * cvt.c (cp_convert_to_pointer): instantiate_type here.
4828 (convert_to_reference): And here.
4829 * decl.c (grok_reference_init): Not here.
4830 (grokparms): Or here.
4831 * typeck2.c (digest_init): Or here.
4832 * typeck.c (decay_conversion): Take the address of overloaded
4833 functions, too.
4834 (require_instantiated_type): Lose.
4835 (convert_arguments): Don't handle unknown types here.
4836 (build_c_cast): Likewise.
4837 (build_binary_op): Gut.
4838 (build_conditional_expr): Don't require_instantiated_type.
4839 (build_modify_expr): Likewise.
4840 (build_static_cast): Don't instantiate_type.
4841 (build_reinterpret_cast): Likewise.
4842 (build_const_cast): Likewise.
4843 (convert_for_initialization): Likewise.
4844 (build_ptrmemfunc): Use type_unknown_p.
4845 (convert_for_assignment): Also do default_conversion on overloaded
4846 functions. Hand them off to ocp_convert.
4847
4848 1998-10-26 Mark Mitchell <mark@markmitchell.com>
4849
4850 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
4851 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
4852
4853 * class.c (finish_struct_1): Use build_cplus_array_type to build
4854 array types.
4855 * decl.c (init_decl_processing): Likewise.
4856 * except.c (expand_end_eh_spec): Likewise.
4857 * search.c (expand_upcast_fixups): Simplify very slightly.
4858
4859 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
4860
4861 * decl.c (grokdeclarator): Complain about a variable using
4862 constructor syntax coming back null from start_decl.
4863
4864 * friend.c (make_friend_class): Complain about trying to make
4865 a non-class type a friend.
4866
4867 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
4868 (start_function): Not here.
4869
4870 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
4871
4872 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
4873
4874 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
4875
4876 * typeck2.c (process_init_constructor): Only skip anonymous fields
4877 if they are bitfields.
4878
4879 * cp-tree.def (TYPEOF_TYPE): New code.
4880 * error.c (dump_type_real): Handle it.
4881 * pt.c (tsubst): Likewise.
4882 * tree.c (search_tree): Likewise.
4883 * semantics.c (finish_typeof): New fn.
4884 * parse.y (typespec): Use it.
4885 * cp-tree.h: Declare it.
4886
4887 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
4888
4889 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
4890
4891 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
4892
4893 * typeck.c (convert_arguments): Don't handle pmf references
4894 specially.
4895
4896 * init.c (build_member_call): Don't try to convert to the base type
4897 if it's ambiguous or pedantic.
4898
4899 * typeck2.c (check_for_new_type): Only depend on pedantic for
4900 C-style casts.
4901
4902 1998-10-25 Mark Mitchell <mark@markmitchell.com>
4903
4904 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
4905 non-converting constructors.
4906
4907 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
4908
4909 * gxxint.texi: Correct documentation for n, N, Q, and B.
4910
4911 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
4912
4913 * parse.y (condition): Convert VAR_DECL from reference to indirect
4914 reference.
4915
4916 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
4917
4918 * exception.cc (__cp_pop_exception): Free the original exception
4919 value, not the potentially coerced one.
4920
4921 1998-10-23 Mark Mitchell <mark@markmitchell.com>
4922
4923 * Makefile.in (hash.h): Run gperf when necessary.
4924
4925 * cp-tree.h (CP_TYPE_READONLY): Remove.
4926 (CP_TYPE_VOLATILE): Likewise.
4927 (CP_TYPE_QUALS): New macro.
4928 (CP_TYPE_CONST_P): Likewise.
4929 (CP_TYPE_VOLATILE_P): Likewise.
4930 (CP_TYPE_RESTRICT_P): Likewise.
4931 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
4932 (cp_build_type_variant): Rename to ...
4933 (cp_build_qualified_type): New function.
4934 (c_apply_type_quals_to_decl): Declare.
4935 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
4936 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
4937 (cp_type_qual_from_rid): New function.
4938 (compparms): Remove unused parameter. All callers changed.
4939 (cp_type_quals): New function.
4940 (at_least_as_qualified_p): Likewise.
4941 (more_qualified_p): Likewise.
4942
4943 * call.c (standard_conversion): Replace calls to
4944 cp_build_type_variant with cp_build_qualified_type. Use
4945 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
4946 compare them. Use CP_TYPE_* macros to check qualifiers.
4947 (reference_binding): Likewise.
4948 (implicit_conversion): Likewise.
4949 (add_builtin_candidates): Likewise.
4950 (build_over_call): Likewise.
4951 * class.c (overrides): Compare all qualifiers, not just `const',
4952 on method declarations.
4953 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
4954 (convert_pointer_to_real): Likewise.
4955 (type_promotes_to): Likewise.
4956 * decl.c (check_for_uninitialized_const_var): New function.
4957 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
4958 (cp_finish_decl): Use check_for_uninitialized_const_var.
4959 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
4960 handle `restrict'.
4961 (grok_ctor_properties): Likewise.
4962 (grok_op_properties): Likewise.
4963 (start_function): Likewise.
4964 (rever_static_member_fn): Likewise.
4965 * decl2.c (grok_method_quals): Likewise.
4966 (grokfield): Likewise.
4967 * error.c (dump_readonly_or_volatile): Rename to ...
4968 (dump_qualifiers): New function. Handle `restrict'.
4969 (dump_type_real): Use it.
4970 (dump_aggr_type): Likewise.
4971 (dump_type_prefix): Likewise.
4972 (dump_type_suffix): Likewise.
4973 (dump_function_decl): Likewise.
4974 (cv_as_string): Likewise.
4975 * gxx.gperf: Add __restrict and __restrict__.
4976 * gxxint.texi: Document `u' as used for `__restrict', and a few
4977 other previously undocumented codes.
4978 * hash.h: Regenerated.
4979 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
4980 (build_member_call): Likewise.
4981 (build_new_1): Likewise.
4982 * lex.c (init_parse): Add entry for RID_RESTRICT.
4983 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
4984 (cp_type_qual_from_rid): Define.
4985 * lex.h (enum rid): Add RID_RESTRICT.
4986 * method.c (process_modifiers): Deal with `restrict'.
4987 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
4988 * parse.c: Regenerated.
4989 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
4990 (tsubst_aggr_type): Likewise.
4991 (tsubst): Likewise.
4992 (check_cv_quals_for_unify): Likewise.
4993 (unify): Likewise.
4994 * rtti.c (init_rtti_processing): Likewise.
4995 (build_headof): Likewise.
4996 (get_tinfo_var): Likewise.
4997 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
4998 (expand_class_desc): Likewise.
4999 (expand_attr_desc): Likewise.
5000 (synthesize_tinfo_fn): Likewise.
5001 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
5002 (get_matching_virtual): Likewise.
5003 (expand_upcast_fixups): Likewise.
5004 * sig.c (build_signature_pointer_or_reference_name): Take
5005 type_quals, not constp and volatilep.
5006 (build_signature_pointer_or_reference_type): Likewise.
5007 (match_method_types): More CP_TYPE_QUALS conversion, etc.
5008 (build_signature_pointer_constructor): Likewise.
5009 (build_signature_method_call): Likewise.
5010 * tree.c (build_cplus_array_type): Likewise.
5011 (cp_build_type_variant): Rename to ...
5012 (cp_build_qualified_type): New function. Deal with `__restrict'.
5013 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
5014 (build_exception_variant): Likewise.
5015 (mapcar): Likewise.
5016 * typeck.c (qualif_type): Likewise.
5017 (common_type): Likewise.
5018 (comptypes): Likewise.
5019 (comp_cv_target_types): Likewise.
5020 (at_least_as_qualified_p): Define.
5021 (more_qualified_p): Likewise.
5022 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
5023 (compparms): Likewise.
5024 (inline_conversion): Likewise.
5025 (string_conv_p): Likewise.
5026 (build_component_ref): Likewise.
5027 (build_indirect_ref): Likewise.
5028 (build_array_ref): Likewise.
5029 (build_unary_op): Likewise.
5030 (build_conditional_expr): Likewise.
5031 (build_static_cast): Likewise.
5032 (build_c_cast): Likewise.
5033 (build_modify_expr): Likewise.
5034 (convert_For_assignment): Likewise.
5035 (comp_ptr_ttypes_real): Likewise.
5036 (cp_type_quals): New function.
5037
5038 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
5039
5040 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
5041 (CP_TYPE_VOLATILE): Likewise.
5042 * decl.c (grokdeclarator): Use them.
5043 * tree.c (canonical_type_variant): Likewise.
5044
5045 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
5046
5047 * parse.y (named_class_head): Push into class while parsing the
5048 base class list.
5049 * decl2.c (push_scope, pop_scope): New functions.
5050 * cp-tree.h: Declare them.
5051 * init.c (build_new_1): Delay cleanup until end of full expression.
5052
5053 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
5054
5055 * typeck.c (build_component_ref): Use of a type here is an error.
5056
5057 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
5058
5059 Revamp references to member functions.
5060 * method.c (hack_identifier): Call build_component_ref for a
5061 reference to a member function.
5062 * typeck.c (build_component_ref): Only return a single function
5063 if it's static. Otherwise, return a COMPONENT_REF.
5064 (build_x_function_call): Handle a COMPONENT_REF.
5065 (build_unary_op): Handle all unknown-type things.
5066 * decl2.c (arg_assoc): Handle COMPONENT_REF.
5067 * class.c (instantiate_type): Complain if the function we get is a
5068 nonstatic member function. Remove code for finding "compatible"
5069 functions.
5070 * pt.c (tsubst_copy): Handle NOP_EXPR.
5071 * tree.c (build_dummy_object): New fn.
5072 (maybe_dummy_object): New fn.
5073 (is_dummy_object): New fn.
5074 * cp-tree.h: Declare them.
5075 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
5076 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
5077 * init.c (build_member_call): Use maybe_dummy_object and
5078 is_dummy_object.
5079 (build_offset_ref): Use maybe_dummy_object.
5080 (resolve_offset_ref): Use is_dummy_object.
5081 * typeck.c (build_x_function_call): Call build_dummy_object.
5082 (unary_complex_lvalue): Call is_dummy_object.
5083
5084 * typeck.c (build_component_addr): Make sure field is a field.
5085
5086 * call.c (build_new_op): Delete obsolete code.
5087
5088 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
5089
5090 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
5091
5092 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
5093 std if std is ignored.
5094
5095 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
5096
5097 * decl.c (grokvardecl): Fix thinko.
5098
5099 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5100 not the left.
5101
5102 * parse.y (fn.def2): Fix 'attrs' format.
5103
5104 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
5105
5106 * Makefile.in (CONFLICTS): Update.
5107 * parse.y (expr_or_declarator_intern): New rule.
5108 (expr_or_declarator, direct_notype_declarator, primary,
5109 functional_cast): Use it.
5110 (notype_declarator_intern): New rule.
5111 (notype_declarator, complex_notype_declarator): Use it.
5112
5113 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
5114
5115 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
5116 (grokvardecl): Likewise.
5117
5118 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5119
5120 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
5121 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
5122
5123 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
5124
5125 * pt.c (process_partial_specialization): Cast 1st argument of
5126 `bzero' to (PTR).
5127
5128 * tree.c (build_base_fields): Cast `base_align' to (int) when
5129 comparing against one.
5130
5131 1998-10-16 Mark Mitchell <mark@markmitchell.com>
5132
5133 * decl.c (lookup_name_real): Handle template parameters for member
5134 templates where said parameters have the same name as the
5135 surrounding class.
5136
5137 * decl.c (expand_static_init): Build cleanups before entering the
5138 anonymous function used to do them to avoid access-checking
5139 confusion.
5140
5141 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
5142 accidentally removed by previous change, and make DECL_RTL here.
5143 * class.c (add_method): Don't make DECL_RTL here.
5144
5145 * pt.c (for_each_template_parm): Don't examine uninstantiated
5146 default arguments.
5147
5148 1998-10-16 Dave Brolley <brolley@cygnus.com>
5149
5150 * lex.c (real_yylex): Fix unaligned access of wchar_t.
5151
5152 1998-10-16 Mark Mitchell <mark@markmitchell.com>
5153
5154 * class.c (add_method): Fix documentation to reflect previous
5155 changes. Check for duplicate method declarations here.
5156 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
5157 correctly; such things never match.
5158 (grokfndecl): Don't look for duplicate methods here.
5159 * decl2.c (check_classfn): Don't assume names are mangled.
5160 Don't add bogus member function declarations to a class before the
5161 class type is complete.
5162 (grokfield): Reformat error message.
5163 * method.c (set_mangled_name_for_decl): Don't mangle names while
5164 processing_template_decl.
5165
5166 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
5167
5168 * typeck.c (build_indirect_ref): Complain about a pointer to data
5169 member, too.
5170 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
5171 data member.
5172 * init.c (resolve_offset_ref): Don't undo the above.
5173
5174 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
5175 (struct lang_decl_flags): Add `bitfield'.
5176 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
5177 DECL_BIT_FIELD.
5178 * decl2.c (grokbitfield, grok_alignof): Likewise.
5179 * init.c (build_offset_ref): Likewise.
5180 * typeck.c (build_component_addr, expr_sizeof): Likewise.
5181 * cvt.c (build_up_reference): Don't crash if taking the address
5182 returns error_mark_node.
5183
5184 * decl.c (grokfndecl): Also check ctype when checking for ::main().
5185
5186 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
5187
5188 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
5189 Do mangling here.
5190 (grokdeclarator): Instead of here.
5191 * friend.c (do_friend): Lose special handling of ::main and
5192 __builtin_*.
5193 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
5194
5195 * spew.c (yylex): Clear looking_for_typename if we got
5196 'enum { ... };'.
5197
5198 1998-10-15 Mark Mitchell <mark@markmitchell.com>
5199
5200 * class.c (maybe_warn_about_overly_private_class): Improve error
5201 messages for class with only private constructors.
5202
5203 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
5204 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
5205 (build_typename_type): New function.
5206 * decl.c (build_typename_type): Broken out from ...
5207 (make_typename_type): Use it.
5208 * search.c (lookup_field): Likewise.
5209
5210 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5211
5212 * pt.c (convert_nontype_argument): Check against type_referred_to.
5213 * decl.c (grokvardecl): Check for declarator name before building
5214 DECL_ASSEMBLER_NAME.
5215
5216 1998-10-14 Mark Mitchell <mark@markmitchell.com>
5217
5218 * pt.c (lookup_template_class): Add comment.
5219 (instantiate_class_template): Don't mark the _TYPE node for
5220 member class templates as an instantiation.
5221
5222 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
5223
5224 * decl.c (grokfndecl): Fix my thinko.
5225
5226 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
5227
5228 * tinfo2.cc (fast_compare): Remove.
5229 (before): Just use strcmp.
5230 * tinfo.cc (operator==): Just use strcmp.
5231
5232 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
5233
5234 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
5235 declarations.
5236
5237 1998-10-13 Mark Mitchell <mark@markmitchell.com>
5238
5239 * cp-tree.h (specializations_of_same_template_p): Remove.
5240 * search.c (get_template_base): Don't use it.
5241 (get_template_base_recursive): Likewise.
5242 * pt.c (specializations_of_same_template_p): Remove.
5243 (unify): Don't use it.
5244 (lookup_template_class): Find the correct parent when setting
5245 CLASSTYPE_TI_TEMPLATE.
5246
5247 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
5248
5249 * tinfo.cc (operator==): Always compare names.
5250
5251 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
5252
5253 * decl.c (start_function): Fix cut-and-paste error.
5254
5255 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
5256
5257 * inc/typeinfo: Add #pragma interface.
5258 (operator!=): Just call operator==.
5259 * tinfo.cc: Add #pragma implementation.
5260 (operator==): Move from inc/typeinfo and tinfo2.cc.
5261 Check __COMMON_UNRELIABLE instead of _WIN32.
5262
5263 * typeck2.c (my_friendly_abort): Add URL.
5264
5265 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
5266
5267 * decl.c (start_method): Added extra parameter for attributes.
5268 * cp-tree.h (start_method): Update prototype.
5269 * parse.y (fn.def2): Update start_method parameter list.
5270
5271 1998-10-11 Mark Mitchell <mark@markmitchell.com>
5272
5273 * cp-tree.h (specializations_of_same_template_p): Declare.
5274 * pt.c (specializations_of_same_template_p): New function.
5275 (unify): Use it.
5276 * search.c (get_template_base): Use it.
5277 (get_template_base_recursive): Likewise.
5278
5279 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
5280
5281 * decl2.c (start_objects): Add new variable `joiner' and
5282 initialize it properly.
5283
5284 1998-10-09 Mark Mitchell <mark@markmitchell.com>
5285
5286 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
5287 change to vtable types.
5288
5289 * cvt.c (ocp_convert): Avoid infinite recursion caused by
5290 1998-10-03 change.
5291
5292 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
5293
5294 * pt.c (resolve_overloaded_unification): New fn.
5295 (try_one_overload): Likewise.
5296 (unify): Don't fail on unknown type.
5297 (type_unification_real): Likewise. Use resolve_overloaded_unification
5298 to handle an overloaded argument.
5299 (template_args_equal): Split out...
5300 (comp_template_args): From here.
5301 (determine_specialization): Also allow a template with more
5302 parms than were explicitly specified.
5303 * cp-tree.h: Add template_args_equal.
5304 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
5305
5306 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
5307
5308 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
5309 change.
5310
5311 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
5312
5313 * typeck.c (unsigned_type): Only return TItype nodes when
5314 HOST_BITS_PER_WIDE_INT is >= 64 bits.
5315 (signed_type): Likewise.
5316 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
5317 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5318 (init_decl_processing): Only create TItype nodes when
5319 HOST_BITS_PER_WIDE_INT is >= 64 bits.
5320 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
5321 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5322
5323 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5324
5325 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
5326 (gxx.gperf): Update comments describing invocation flags.
5327 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
5328
5329 1998-10-07 Mark Mitchell <mark@markmitchell.com>
5330
5331 * class.c (finish_struct_1): Add commentary on previous change.
5332
5333 * cp-tree.h (vtbl_ptr_type_node): New variable.
5334 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
5335 already of the right type.
5336 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
5337 Simplify code to grow vtable.
5338 * decl.c (vtbl_ptr_type_node): Define.
5339 (init_decl_processing): Initialize it.
5340
5341 1998-10-06 Mark Mitchell <mark@markmitchell.com>
5342
5343 * cp-tree.def (PTRMEM_CST): New tree node.
5344 * cp-tree.h (ptrmem_cst): New type.
5345 (lang_type): Remove local_typedecls.
5346 (dummy): Increase to 12 bits from 11.
5347 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
5348 (PTRMEM_CST_CLASS): New macro.
5349 (PTRMEM_CST_MEMBER): Likewise.
5350 (current_access_specifier): New variable.
5351 (current_class_type): Remove duplicate declaration.
5352 (finish_struct): Change prototype.
5353 (unreverse_member_declarations): New function.
5354 (pushdecl_class_level): Change prototype.
5355 (grok_enum_decls): Remove.
5356 (fixup_anonymous_union): New function.
5357 (grok_x_components): Change prototype.
5358 (tsubst_chain): Remove.
5359 (finish_member_template_decl): Likewise.
5360 (check_explicit_specialization): Fix indentation.
5361 (finish_class_definition): Change prototype.
5362 (finish_member_class_template): Likewise.
5363 (finish_member_declaration): New function.
5364 (check_multiple_declarators): Likewise.
5365 * class.c (class_stack_node_t): New type.
5366 (current_class_base): Remove.
5367 (current_class_stack): Change type.
5368 (current_access_specifier): New variable.
5369 (grow_method): Remove.
5370 (check_member_decl_is_same_in_complete_scope): Break out from
5371 finish_struct.
5372 (make_method_vec): New function.
5373 (free_method_vec): Likewise.
5374 (add_implicitly_declared_members): Break out from finish_struct_1.
5375 (free_method_vecs): New variable.
5376 (add_method): Rework for direct use from parser.
5377 (handle_using_decl): Watch for NULL_TREE while iterating through
5378 CLASSTYPE_METHOD_VEC.
5379 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
5380 just do some error-checking.
5381 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
5382 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
5383 (finish_struct): Change prototype. Simplify; fields and methods
5384 are already set up at this point.
5385 (init_class_processing): Set up current_class_stack.
5386 (pushclass): Save current_access_specifier.
5387 (popclass): Restore it.
5388 (currently_open_class): Simplify.
5389 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
5390 * decl.c (saved_scope): Add access_specifier.
5391 (maybe_push_to_top_level): Save it.
5392 (pop_from_top_level): Restore it.
5393 (maybe_process_template_type_declaration): Use
5394 finish_member_declaration.
5395 (pushtag): Likewise.
5396 (pushdecl_class_level): Don't return a value.
5397 (fixup_anonymous_union): Break out from grok_x_components.
5398 (shadow_tag): Use it.
5399 (xref_tag): Complain about using an elaborated type specifier to
5400 reference a template type parameter or typedef name.
5401 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
5402 (current_local_enum): Remove.
5403 (build_enumerator): Call finish_member_declaration.
5404 (grok_enum_decls): Remove.
5405 * decl2.c (grok_x_components): Simplify.
5406 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
5407 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
5408 (merge_functions): Add to comment.
5409 (arg_assoc_type): Prototype.
5410 (arg_assoc): Pass as many arguments as there are parameters.
5411 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
5412 OFFSET_REF.
5413 * expr.c (cpls_expand_expr): Remove dead code. Handle
5414 PTRMEM_CST.
5415 * friend.c (do_friend): Lookup friends when in nested classes.
5416 Change comments.
5417 * init.c (build_offset_ref): Do lookup even for classes that are
5418 only partially defined.
5419 (decl_constant_value): Remove dead code.
5420 * method.c (build_overload_value): Remove hack where by TYPE was
5421 not a TYPE. Handle PTRMEM_CST.
5422 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
5423 should go.
5424 * parse.y (components, notype_components, component_decl,
5425 component_decl_1, component_declarator, component_declarator0):
5426 Now all are itype rather than ttype. Rework to add members to
5427 classes on the fly.
5428 (typesqpecqual_reserved): Use check_multiple_declarators.
5429 (structsp): Update class to finish_class_definition.
5430 (do_xref_defn): Unsplit into named_class_head.
5431 (access_specifier): Set current_access_specifier.
5432 * pt.c (set_current_access_from_decl): New function.
5433 (finish_member_template_decl): Don't take the parameters.
5434 (comp_template_args): Make more robust.
5435 (lookup_template_class): Don't use current_local_enum.
5436 (for_each_template_parm): Handle PTRMEM_CST.
5437 (instantiate_class_template): Use set_current_access_from_decl,
5438 finish_member_declaration and unreverse_member_declarations. Set
5439 lineno/input_filename before generating implicit member functions.
5440 (type_unification_real): Don't assume back-unification happens
5441 only for the last argument.
5442 (regenerate_decl_from_template): Call pushclass a bit earlier.
5443 (tsubst_chain): Remove.
5444 (tsubst_enum): Use set_current_access_from_decl.
5445 (set_mangled_name_for_template_decl): Fix indentation.
5446 * search.c (lookup_fnfields_1): Change iteration through
5447 CLASSTYPE_METHOD_VEC.
5448 (dfs_pushdecls): Likewise.
5449 (dfs_compress_decls): Likewise.
5450 (add_conversions): Likewise.
5451 * semantics.c (finish_class_definition): Don't take components.
5452 Change call to finish_struct.
5453 (finish_member_declaration): New function.
5454 (finish_member_class_template): Don't take template parameters.
5455 Change call to grok_x_components. Call finish_member_template_decl.
5456 (check_multiple_declarators): New function.
5457 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
5458 a passed in fieldlist.
5459 * tree.c (search_tree): Handle PTRMEM_CST.
5460 (mapcar): Likewise.
5461 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
5462 INTEGER_CSTs, for pointer-to-data members.
5463
5464 * call.c (resolve_args): Resolve template specializations, if
5465 possible.
5466
5467 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5468
5469 * Makefile.in (spew.o): Depend on toplev.h.
5470
5471 * call.c (compare_ics): Initialize variables `deref_from_type2',
5472 `deref_to_type1' and `deref_to_type2'.
5473
5474 * except.c (get_eh_type): Hide prototype and definition.
5475 (process_start_catch_block_old): Remove unused static prototype.
5476
5477 * pt.c (tsubst_decl): Initialize variable `argvec'.
5478
5479 * spew.c: Include toplev.h.
5480
5481 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
5482
5483 * pt.c (instantiate_decl): Do save and restore file position.
5484
5485 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
5486
5487 * method.c (build_decl_overload_real): Clear
5488 numeric_output_need_bar after __.
5489
5490 1998-10-05 Nathan Sidwell <nathan@acm.org>
5491
5492 * call.c (build_new_method_call): Issue 'incomplete type' error,
5493 if class is not defined.
5494
5495 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5496
5497 * call.c (build_object_call): Move declaration of variable
5498 `fn' into the scope where it is used. Don't access variable
5499 `fn' when it is uninitialized, instead use `fns'.
5500
5501 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5502
5503 * errfn.c (cp_thing): Print buf as a string not as a printf format
5504 to avoid problems with the operator%. Consequently, `%%' sequences
5505 in format are copied as `%' in buf.
5506
5507 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
5508
5509 * pt.c (pop_tinst_level): Call extract_interface_info.
5510 (instantiate_decl): Don't save and restore file position.
5511
5512 * decl.c (cp_finish_decl): Make statics in extern inlines and
5513 templates common, if possible and the target doesn't support weak
5514 symbols.
5515
5516 * decl.c (grokdeclarator): Remove redundant calls to
5517 build_type_variant and some duplicated code.
5518 * sig.c (build_signature_reference_type): Only take the type parm.
5519 (build_signature_pointer_type): Likewise.
5520 * tree.c (build_cplus_method_type): Adjust.
5521 * cp-tree.h: Update.
5522
5523 1998-10-04 Mark Mitchell <mark@markmitchell.com>
5524
5525 * call.c (build_over_call): Make pedwarns about dropped qualifiers
5526 into full-fledged errors.
5527 * cvt.c (convert_to_reference): Likewise.
5528 * typeck.c (convert_for_assignment): Likewise.
5529
5530 * search.c (expand_upcast_vtables): In addition to unsetting
5531 TREE_READONLY, remove top-level const type qualifier.
5532
5533 1998-10-03 Mark Mitchell <mark@markmitchell.com>
5534
5535 * class.c (current_class_ptr, current_class_ref): Clarify
5536 documentation.
5537 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
5538 NOP type conversions.
5539 * decl.c (decls_match): Use comptypes directly; ignore
5540 qualifiers on the DECL.
5541 (duplicate_decls): Remove qualifier checks on DECL.
5542 (grokdeclarator): Make the type built up include top-level
5543 qualifiers.
5544 * decl2.c (do_dtors): Fix spelling error.
5545 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
5546 when printing type information.
5547 * init.c (build_new_1): Add documentation. Deal with the fact
5548 that type of allocated memory now contains qualifiers.
5549 * lex.c (is_global): Improve error-recovery.
5550 * sig.c (build_member_function_pointer): Don't cast away const
5551 on fields of sigtable_entry_type.
5552 * tree.c (lvalue_type): Don't look at top-level qualifiers on
5553 expressions.
5554 * typeck.c (decay_conversion): Likewise.
5555 (build_component_ref): Make sure the type of the COMPONENT_REF
5556 contains top-level qualifiers, as appropriate. Improve
5557 error-handling.
5558 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
5559 (build_array_ref): Likewise.
5560 (build_unary_op): Improve error-recovery.
5561 (unary_complex_lvalue): Make taking the address a bound member
5562 function an error, not a sorry.
5563 (build_conditional_expr): Look at the type qualifiers, not the
5564 qualifiers on the expression itself.
5565
5566 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
5567
5568 * decl2.c (merge_functions): Remove duplicates.
5569
5570 * decl2.c: Add -f{no-,}implicit-inline-templates.
5571 (import_export_decl): Check it.
5572
5573 * decl.c (lookup_name_real): Template parms also take precedence
5574 over implicit typename. Only warn if yylex.
5575
5576 * typeck.c (build_conditional_expr): Only fold if ifexp is an
5577 INTEGER_CST.
5578
5579 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
5580 instead of linkage.
5581
5582 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
5583
5584 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
5585 * class.c (build_vbase_pointer): Use it.
5586 * rtti.c (expand_class_desc): Likewise.
5587 * tree.c (build_vbase_pointer_fields): Likewise.
5588
5589 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
5590
5591 * decl.c (start_decl): Add invocation of
5592 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
5593 (start_function): Add invocation of
5594 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
5595
5596 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
5597 HANDLE_GENERIC_PRAGMAS.
5598
5599 1998-09-28 Anthony Green <green@cygnus.com>
5600
5601 * semantics.c (finish_asm_stmt): Always permit volatile asms.
5602
5603 1998-09-28 Mark Mitchell <mark@markmitchell.com>
5604
5605 * decl.c (grokdeclarator): Tighten checks for invalid
5606 destructors. Improve error-messages and error-recovery.
5607 * decl2.c (check_classfn): Don't assume that mangled destructor
5608 names contain type information.
5609
5610 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
5611
5612 * search.c (get_base_distance): Remove assert.
5613
5614 * decl2.c (build_anon_union_vars): Don't process a field with no
5615 name.
5616 (finish_anon_union): Also complain about local anon unions with no
5617 members.
5618
5619 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
5620
5621 * decl.c (lookup_namespace_name): If the name is a namespace,
5622 return it immediately.
5623
5624 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5625
5626 * cp-tree.h (define_case_label): Remove unused parameter.
5627 (check_java_method): Likewise.
5628 (grokclassfn): Likewise.
5629 (expand_aggr_init): Likewise.
5630 (build_x_delete): Likewise.
5631 (maybe_end_member_template_processing): Likewise.
5632 (unshare_base_binfos): Add prototype.
5633 (string_conv_p): Likewise.
5634 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
5635
5636 * cvt.c (build_up_reference): Remove unused parameter
5637 `checkconst', all callers changed.
5638 (build_type_conversion): Mark parameter `code' with
5639 ATTRIBUTE_UNUSED.
5640 (build_expr_type_conversion): Initialize variable `conv'.
5641
5642 * decl.c (push_namespace): Initialize variable `d'.
5643 (define_case_label): Remove unused parameter `decl', all callers
5644 changed.
5645
5646 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
5647 `argc' with ATTRIBUTE_UNUSED.
5648 (grokclassfn): Remove unused parameter `cname', all callers
5649 changed.
5650 (check_java_method): Likewise for parameter `ctype'.
5651 (copy_assignment_arg_p): Mark parameter `virtualp' with
5652 ATTRIBUTE_UNUSED.
5653 (finish_prevtable_vardecl): Likewise for parameter `prev'.
5654
5655 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
5656
5657 * init.c (expand_aggr_init_1): Remove unused parameter
5658 `alias_this', all callers changed.
5659 (expand_aggr_init): Likewise.
5660 (expand_default_init): Likewise.
5661 (build_new_1): Initialize variable `susp'.
5662 (build_x_delete): Remove unused parameter `type', all callers
5663 changed.
5664
5665 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
5666 ATTRIBUTE_UNUSED.
5667 (readescape): Use (unsigned) value in shift.
5668 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
5669 comparing to a signed quantity.
5670
5671 * pt.c (maybe_end_member_template_processing): Remove unused
5672 parameter `decl', all callers changed.
5673 (check_explicit_specialization): Add braces around empty body in
5674 an else-statement.
5675 (current_template_args): Initialize variable `args'.
5676 (lookup_template_class): Likewise for variable `prev_local_enum'.
5677 (tsubst_decl): Likewise for variable `r'.
5678 (set_mangled_name_for_template_decl): Initialize variable
5679 `context'.
5680
5681 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
5682 Likewise for variable `i'.
5683 (yylex): Initialize variable `trrr'.
5684
5685 * typeck.c (compparms): Mark variable `strict' with
5686 ATTRIBUTE_UNUSED.
5687
5688 * xref.c (simplify_type): Cast argument of ctype function to
5689 `unsigned char'.
5690
5691 1998-09-24 Mark Mitchell <mark@markmitchell.com>
5692
5693 * cp-tree.h (language_lvalue_valid): Remove.
5694 * decl.c (grokdeclarator): Don't disallow references to functions.
5695 * tree.c (lvalue_p_1): New function, combining duplicated
5696 code from ...
5697 (lvalue_p): Use it.
5698 (real_lvalue_p): Likewise.
5699 * typeck.c (language_lvalue_valid): Remove.
5700 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
5701 they don't have TREE_READONLY set.
5702 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
5703
5704 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
5705
5706 * spew.c (yylex): Give diagnostic.
5707 * hash.h (is_reserved_word): Add export.
5708 * gxx.gperf: Likewise.
5709 * lex.h (rid): Add RID_EXPORT.
5710 * lex.c (init_parse): Likewise.
5711
5712 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
5713
5714 * friend.c (do_friend): Make warning a full sentence.
5715
5716 1998-09-22 Mark Mitchell <mark@markmitchell.com>
5717
5718 * parse.y (component_decl_list): Improve error-recovery.
5719
5720 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
5721
5722 * decl.c (make_typename_type): Move error to point where name
5723 variable can be used by dump_type.
5724
5725 1998-09-22 Mark Mitchell <mark@markmitchell.com>
5726
5727 * decl.c (grokfndecl): Improve error-recovery.
5728 * decl2.c (grokfield): Likewise.
5729 * pt.c (finish_member_template_decl): Likewise.
5730
5731 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
5732
5733 * method.c (hack_identifier): Finding multiple members is always
5734 an error.
5735
5736 1998-09-21 Per Bothner <bothner@cygnus.com>
5737
5738 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
5739
5740 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
5741
5742 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
5743
5744 1998-09-20 Mark Mitchell <mark@markmitchell.com>
5745
5746 * class.c (maybe_warn_about_overly_private_class): Reformat.
5747
5748 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
5749
5750 * exception.cc (__cplus_type_matcher): Realign some code.
5751
5752 1998-09-16 Mark Mitchell <mark@markmitchell.com>
5753
5754 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
5755 (tinfo2.o): Likewise.
5756 (exception.o): Likewise.
5757 (new.o): Likewise.
5758 (opnew.o): Likewise.
5759 (opnewnt.o): Likewise.
5760 (opvnew.o): Likewise.
5761 (opvnewnt.o): Likewise.
5762 (opdel.o): Likewise.
5763 (opdelnt.o): Likewise.
5764 (opvdel.o): Likewise.
5765 (opvdelnt.o): Likewise.
5766
5767 1998-09-16 Richard Henderson <rth@cygnus.com>
5768
5769 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
5770
5771 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
5772
5773 * call.c (build_field_call): Handle static data members too.
5774
5775 * typeck.c (comptypes): When comparing pointer types, check
5776 whether referred types match even in strictest modes.
5777
5778 1998-09-15 Mark Mitchell <mark@markmitchell.com>
5779
5780 * cp-tree.h: Revert previous change.
5781 (finish_struct_methods): Remove declaration.
5782 * class.c: Revert previous change.
5783 (maybe_warn_about_overly_private_class): New function.
5784 (finish_struct_methods): Declare here, and make static. Remove
5785 unnecessary parameters. Tidy slightly. Use
5786 maybe_warn_about_overly_private_class.
5787 (finish_struct_1): Adjust. Remove check for private constructors,
5788 now done elsewhere.
5789 (finish_struct): Adjust.
5790
5791 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
5792
5793 * except.c (expand_start_catch_block): No need to check for new
5794 exception model.
5795 (process_start_catch_block_old): Deleted.
5796 (process_start_catch_block): Add call to start_decl_1().
5797 (expand_end_catch_block): Add call to end_catch_handler().
5798 * exception.cc (__cplus_type_matcher): Only check the exception
5799 language if there is an exception table.
5800
5801 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
5802
5803 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
5804 as used to prevent conflicts with virtual function tables.
5805
5806 1998-09-14 Mark Mitchell <mark@markmitchell.com>
5807
5808 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
5809 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
5810 * class.c (maybe_class_too_private_p): New function.
5811 (finish_struct_methods): Use it.
5812 (finish_struct_1): Likewise.
5813 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
5814 appropriate.
5815
5816 * pt.c (check_specialization_scope): Fix spelling error.
5817 (check_explicit_specialization): Remove code to handle explicit
5818 specializations in class scope; they are now correctly diagnosed
5819 as errors.
5820
5821 1998-09-10 Mark Mitchell <mark@markmitchell.com>
5822
5823 * decl.c (pushdecl): Don't copy types if the
5824 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
5825 type.
5826
5827 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5828
5829 * class.c (get_enclosing_class): New function.
5830 (is_base_of_enclosing_class): Likewise.
5831 * cp-tree.h (get_enclosing_class): Declare.
5832 (is_base_of_enclosing_class): Likewise.
5833 * pt.c (coerce_template_parms): Use them.
5834
5835 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
5836
5837 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
5838 null to decide whether to use it.
5839
5840 * error.c (dump_type_real): Handle NAMESPACE_DECL.
5841 * parse.y (base_class.1): Avoid crash on error.
5842
5843 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
5844
5845 * decl.c (make_typename_type): If context is a namespace, the code
5846 is in error.
5847
5848 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
5849
5850 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
5851
5852 1998-09-08 Mark Mitchell <mark@markmitchell.com>
5853
5854 * cp-tree.h (anonymous_namespace_name): Declare.
5855 * decl.c: Define it.
5856 (push_namespace): Use anonymous_namespace_name, rather than local
5857 static anon_name.
5858 * error.c (dump_decl): If a namespace is named
5859 anonymous_namespace_name, call it {anonymous}.
5860
5861 * decl.c (grokparms): Distinguish between references and pointers
5862 in error message.
5863
5864 1998-09-08 Richard Henderson <rth@cygnus.com>
5865 Mark Mitchell <mark@markmitchell.com>
5866
5867 * pt.c (process_partial_specialization): Consistently allocate
5868 and zero tpd.parms based on ntparms. Use tpd2.parms, not
5869 tpd.parms, where appropriate.
5870
5871 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
5872
5873 * Makefile.in (INCLUDES): Update after recent toplevel gcc
5874 reorganizations.
5875
5876 1998-09-05 Mark Mitchell <mark@markmitchell.com>
5877
5878 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
5879 * class.c (finish_struct): Remove hackery to deal with explicit
5880 specializations in class scope.
5881 * decl.c (grokfndecl): Improve error-recovery.
5882 * decl2.c (grokfield): Likewise.
5883 * pt.c (check_specialization_scope): New function.
5884 (begin_specialization): Call it.
5885 (process_partial_specialization): New function, split out from
5886 push_template_decl. Check partial specializations more
5887 stringently.
5888 (push_template_decl): Call it.
5889 (check_explicit_specialization): Don't attempt to handle explicit
5890 specializations in class scope.
5891 (template_parm_data): Document. Add current_arg and
5892 arg_uses_template_parms.
5893 (mark_template_parm): Set it.
5894 (tsubst_arg_types): Remove unused variable.
5895 * semantics.c (begin_class_definition): Tweak.
5896
5897 1998-09-04 Mark Mitchell <mark@markmitchell.com>
5898
5899 * inc/typeinfo (type_info::type_info(const char*)): Make
5900 `explicit'.
5901
5902 * cp-tree.h (hash_tree_cons_simple): New macro.
5903 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
5904 (coerce_template_parms): Use make_temp_vec, instead of
5905 make_tree_vec. Document this behavior.
5906 (lookup_template_class): Likewise.
5907 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
5908 Remove dead code (and add assertion to check its deadness). Fix
5909 bug w.r.t. exception specifications.
5910
5911 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
5912
5913 * decl2.c (import_export_vtable): Always make artificials comdat.
5914 (import_export_decl): Likewise.
5915 * pt.c (mark_decl_instantiated): Likewise.
5916
5917 1998-09-03 Mark Mitchell <mark@markmitchell.com>
5918
5919 * cp-tree.h (finish_globally_qualified_member_call_expr):
5920 Rename to ...
5921 (finish_qualified_call_expr).
5922 * semantics.c: Likewise.
5923 * parse.y (primary): Use it.
5924 * method.c (hack_identifier): Remove redundant code.
5925
5926 * init.c (resolve_offset_ref): Call convert_from_reference to
5927 handle members of reference type. Improve error recovery.
5928
5929 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
5930
5931 * cp-tree.h: Declare warn_nontemplate_friend.
5932 * decl2.c (lang_decode_option): Set.
5933 * lang-options.h: Add -Wnon-template-friend.
5934 * friend.c (do_friend): Use to toggle non-template function warning.
5935
5936 1998-09-03 Mark Mitchell <mark@markmitchell.com>
5937
5938 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
5939 corresponding INTEGER_CSTs when processing_template_decl.
5940 * pt.c (tsubst_enum): Tweak accordingly.
5941
5942 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5943
5944 * decl.c (pushdecl_class_level): Add warning here.
5945 (pushdecl): Tweak.
5946
5947 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
5948
5949 * cvt.c (convert_pointer_to_real): Tidy.
5950 * search.c (get_base_distance_recursive): Simplify.
5951 (get_base_distance): Likewise.
5952
5953 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
5954 parms.
5955
5956 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
5957
5958 * lex.c (check_newline): Call HANDLE_PRAGMA before
5959 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
5960 if unknown pragmas are encountered.
5961 (handle_sysv_pragma): Interpret return code from
5962 handle_pragma_token (). Return success/failure indication rather
5963 than next unprocessed character.
5964 (pragma_getc): New function: retrieves characters from the
5965 input stream. Defined when HANDLE_PRAGMA is defined.
5966 (pragma_ungetc): New function: replaces characters back into the
5967 input stream. Defined when HANDLE_PRAGMA is defined.
5968
5969 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
5970
5971 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
5972 * class.c (build_vtable_entry_ref): Likewise.
5973
5974 1998-09-01 Mark Mitchell <mark@markmitchell.com>
5975
5976 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
5977 * decl2.c (import_export_decl): Likewise.
5978 * pt.c (instantiate_decl): Use it.
5979
5980 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
5981
5982 * decl.c (lookup_name_real): Also do implicit typename thing for
5983 artificial TYPE_DECLs.
5984 * search.c (lookup_field): Likewise.
5985 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
5986 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
5987 (enter_scope_of): Extract type from implicit typename.
5988 (begin_class_definition): Likewise.
5989 * lex.c (identifier_type): Handle implicit typename when checking
5990 for SELFNAME.
5991
5992 * cp-tree.h: Declare flag_strict_prototype.
5993 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
5994 -fstrict-prototype.
5995 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
5996 specified, set it to the value of pedantic.
5997
5998 1998-09-01 Mark Mitchell <mark@markmitchell.com>
5999
6000 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
6001
6002 1998-08-31 Mark Mitchell <mark@markmitchell.com>
6003
6004 * decl.c (finish_enum): Handle member enums of classes declared in
6005 template functions.
6006
6007 * decl2.c (grok_x_components): Strip attributes before calling
6008 groktypename.
6009
6010 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
6011
6012 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
6013 -fenum-int-equivalence and -fno-nonnull-objects.
6014 * class.c (check_for_override): Remove support for -fall-virtual.
6015 (finish_struct_1): Likewise.
6016 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
6017 * typeck.c (build_binary_op_nodefault): Likewise.
6018 * cvt.c (ocp_convert): Likewise.
6019 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
6020 * class.c (build_vbase_path): Likewise.
6021
6022 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
6023
6024 * Makefile.in (INTERFACE): New, set to 1.
6025
6026 1998-08-30 Mark Mitchell <mark@markmitchell.com>
6027
6028 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
6029 comparing with global_namespace.
6030 (dump_aggr_type): Likewise.
6031
6032 * decl.c (grokfndecl): Issue error on declaration of friend
6033 templates with explicit template arguments.
6034
6035 * pt.c (convert_template_argument): New function, split out
6036 from...
6037 (coerce_template_parms): Here.
6038 (tsubst): Attempt better error-recovery.
6039
6040 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
6041
6042 * pt.c (decl_template_parm_p): Add checks for
6043 TEMPLATE_TEMPLATE_PARM.
6044
6045 1998-08-28 Mark Mitchell <mark@markmitchell.com>
6046
6047 * lex.c (do_identifier): Fix thinko in previous change.
6048
6049 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
6050
6051 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
6052 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
6053
6054 1998-08-28 Richard Henderson <rth@cygnus.com>
6055
6056 Add support for discarding unused virtual functions.
6057 * lang-options.h: Add -fvtable-gc.
6058 * cp-tree.h: Add flag_vtable_gc.
6059 * decl2.c (output_vtable_inherit): New fn.
6060 (finish_vtable_vardecl): Call it.
6061 * class.c (build_vtable_entry_ref): New fn.
6062 (build_vtbl_ref): Call it.
6063
6064 1998-08-28 Mark Mitchell <mark@markmitchell.com>
6065
6066 * cp-tree.h (build_enumerator): Take the enumeration type as a
6067 parameter.
6068 * decl.c (finish_enum): Don't set the TREE_TYPE for the
6069 enumeration constant values if we're processing_template_decls.
6070 Don't set the type for the CONST_DECLs either; that's done in
6071 build_enumerator.
6072 (build_enumerator): Take the enumeration type as a
6073 parameter.
6074 * lex.c (do_identifier): Don't resolve enumeration constants while
6075 processing template declarations, even if they happen to be
6076 TEMPLATE_PARM_INDEXs.
6077
6078 * parse.y (current_enum_type): New variable.
6079 (primary): Don't allow statement-expression in local classes just
6080 as we don't in global classes.
6081 (structsp): Use current_enum_type.
6082 (enum_list): Likewise.
6083 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
6084 finish_enum; they no longer occur.
6085
6086 * cp-tree.h (finish_base_specifier): New function.
6087 * parse.y (base_class): Use it.
6088 * semantics.c (finish_base_specifier): Define it.
6089
6090 * parse.y (structsp): Warn on use of typename outside of template
6091 declarations.
6092
6093 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
6094
6095 * lex.c (handle_cp_pragma): Remove #pragma vtable.
6096 * lang-options.h: Remove +e options.
6097 * decl2.c (lang_decode_option): Likewise.
6098 (import_export_vtable): Don't check write_virtuals.
6099 (finish_vtable_vardecl, finish_file): Likewise.
6100 * search.c (dfs_debug_mark): Likewise.
6101 * semantics.c (begin_class_definition): Likewise.
6102 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
6103
6104 * call.c (build_over_call): Check flag_elide_constructors.
6105 * decl2.c: flag_elide_constructors defaults to 1.
6106 * typeck.c (convert_arguments): Remove return_loc parm.
6107 (build_function_call_real): Adjust.
6108
6109 * search.c: Tear out all mi_matrix and memoize code.
6110 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
6111 * lang-options.h: Remove documentation for -fhandle-exceptions,
6112 -fmemoize-lookups and -fsave-memoized.
6113 * cp-tree.h: Lose mi_matrix and memoize support.
6114 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
6115 * class.c: Lose struct class_level.
6116 (pushclass, popclass): Lose memoize support.
6117 * init.c (build_offset_ref): Likewise.
6118
6119 Never change BINFO_INHERITANCE_CHAIN.
6120 * init.c (emit_base_init): Change modification of
6121 BINFO_INHERITANCE_CHAIN to an assert.
6122 * search.c (get_base_distance_recursive): Likewise.
6123 (get_base_distance): Likewise.
6124 (lookup_member): Likewise.
6125 (convert_pointer_to_single_level): Likewise.
6126 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
6127 (lookup_fnfields): Likewise.
6128 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
6129 (unshare_base_binfos): Don't call propagate_binfo_offsets.
6130 (layout_basetypes): Call propagate_binfo_offsets instead of
6131 unshare_base_binfos.
6132 * decl.c (xref_basetypes): Call unshare_base_binfos.
6133 * pt.c (instantiate_class_template): Likewise.
6134 * tree.c (reverse_path): Remove 'copy' parm; always make a
6135 temporary copy.
6136 * class.c (build_vbase_path): Just call it.
6137 * search.c (compute_access): Likewise. Don't re-reverse.
6138
6139 1998-08-27 Mark Mitchell <mark@markmitchell.com>
6140
6141 * class.c (build_vbase_path): Use reverse_path.
6142 (finish_base_struct): Move warnings for inaccessible bases to
6143 layout_basetypes.
6144 (modify_one_vtable): Remove check of TREE_USED (binfo).
6145 (fixup_vtable_deltas1): Likewise.
6146 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
6147 (xref_tag): Remove binfos parameter.
6148 (make_binfo): Remove chain parameter.
6149 (reverse_path): Add copy parameter.
6150 * decl.c (init_decl_processing): Change calls to xref_tag.
6151 (xref_tag): Remove binfos parameter.
6152 (xref_basetypes): Change calls to make_binfo.
6153 * decl2.c (grok_x_components): Change calls to xref_tag.
6154 (handle_class_head): Likewise.
6155 * friend.c (do_friend): Likewise.
6156 * lex.c (make_lang_type): Change calls to make_binfo.
6157 * parse.y (structsp): Change calls to xref_tag.
6158 (named_complex_class_head_sans_basetype): Likewise.
6159 (named_class_head): Likewise.
6160 * rtti.c (init_rtti_processing): Likewise.
6161 * search.c (compute_access): Change calls to reverse_path.
6162 (dfs_get_vbase_types): Change calls to make_binfo.
6163 (get_vbase_types): Remove dead code.
6164 * tree.c (unshare_base_binfos): Change calls to make_binfo.
6165 (layout_basetypes): Warn here about inaccessible bases.
6166 (make_binfo): Remove chain parameter.
6167 (reverse_path): Add copy parameter.
6168
6169 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
6170
6171 * class.c: #if 0 complete_type_p.
6172 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
6173 * method.c (process_overload_item): Likewise.
6174 * typeck.c (comp_target_types): Likewise.
6175
6176 Stop sharing binfos for indirect virtual bases.
6177 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
6178 (layout_basetypes): Likewise.
6179 (unshare_base_binfos): Copy vbases, too.
6180 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
6181 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
6182 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
6183 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
6184 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
6185 reference to BINFO_VIA_PUBLIC.
6186 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
6187 (push_class_decls): Use them.
6188 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
6189 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
6190
6191 1998-08-27 Mark Mitchell <mark@markmitchell.com>
6192
6193 * decl.c (build_enumerator): Set DECL_CONTEXT for the
6194 CONST_DECLs.
6195
6196 1998-08-26 Mark Mitchell <mark@markmitchell.com>
6197
6198 * cp-tree.h (finish_enum): Change prototype.
6199 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
6200 VALUES parameter. Don't try to compute mins/maxs if
6201 processing_template_decl.
6202 * parse.y (structsp): Use new calling sequence for finish_enum.
6203 * pt.c (tsubst_enum): Likewise. Take the new type as input.
6204 (lookup_template_class): Remove unused variables. Tweak.
6205 Register enums on instantiation list before substituting
6206 enumeration constants.
6207 (tsubst_decl): Remove unused variables.
6208 (regenerate_decl_from_template): Likewise.
6209
6210 * decl.c (duplicate_decls): Don't obliterate the
6211 DECL_TEMPLATE_INFO for a template if we're not replacing it with
6212 anything.
6213
6214 * lex.c (do_identifier): Fix typo in comment.
6215
6216 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6217
6218 * errfn.c: Remove stdarg.h/varargs.h.
6219 * tree.c: Likewise.
6220
6221 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
6222
6223 * pt.c (tsubst_copy): Only do typename overloading on an
6224 IDENTIFIER_NODE that happens to look like a typename if it actually
6225 has a type for us to use.
6226
6227 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
6228
6229 * typeck.c (comp_cv_target_types): Split out...
6230 (comp_target_types): From here. Don't allow cv-qual changes under
6231 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
6232 (build_ptrmemfunc): Pass 1 to nptrs.
6233 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
6234
6235 1998-08-25 Mark Mitchell <mark@markmitchell.com>
6236
6237 * search.c (dependent_base_p): Don't compare a binfo to
6238 current_class_type; use the TREE_TYPE of the binfo instead.
6239
6240 * cp-tree.h (CLASS_TYPE_P): Revise definition.
6241
6242 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
6243
6244 * decl.c (duplicate_decls): Don't complain about different
6245 exceptions from an internal decl even if pedantic.
6246
6247 * typeck.c (convert_for_assignment): Converting from pm of vbase
6248 to derived is an error, not a sorry.
6249
6250 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
6251 * class.c (fixed_type_or_null): Rename from
6252 resolves_to_fixed_type_p. Return the dynamic type of the
6253 expression, if fixed, or null.
6254 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
6255 does not match the static type.
6256 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
6257 resolves_to_fixed_type_p again.
6258
6259 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6260
6261 * pt.c (tsubst_decl): Move special case code for dealing with
6262 tricky friend templates here from ...
6263 (regenerate_decl_from_template): Here.
6264
6265 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6266
6267 * decl.c (start_decl): Remove redundant linkage check.
6268
6269 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
6270
6271 * typeck.c (c_expand_return): Handle the case that valtype
6272 is wider than the functions return type.
6273
6274 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6275
6276 * cp-tree.h (CLASS_TYPE_P): New macro.
6277 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
6278 * pt.c (process_template_parm): Undo previous change.
6279
6280 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
6281
6282 * cp-tree.h: Declare.
6283 * pt.c (decl_template_parm_p): New function.
6284 * decl.c (pushdecl): Check decls for redeclaring template parms.
6285 (xref_tag): Make redeclaration an error, print decl.
6286 * decl2.c (grokfield): Check field_decls for redeclaration as well.
6287
6288 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6289
6290 * parse.y (primary): Fix up the type of string constants.
6291
6292 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6293
6294 * typeck.c (convert_for_initialization): Move check for odd uses
6295 of NULL to avoid duplicate warnings.
6296
6297 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6298
6299 * tree.c (lvalue_type): Fix for arrays.
6300 * typeck.c (string_conv_p): New fn.
6301 (convert_for_assignment): Use it.
6302 (build_unary_op): Use lvalue_type.
6303 * call.c (standard_conversion, convert_like): Use string_conv_p.
6304 (add_function_candidate): Use lvalue_type.
6305 * cvt.c (convert_to_reference): Likewise.
6306 * decl2.c (lang_decode_option): Ignore -traditional.
6307 * decl.c (init_decl_processing): flag_writable_strings inhibits
6308 flag_const_strings.
6309
6310 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
6311
6312 * lang-options.h (lang_options): Add fconst-strings to the list
6313 of valid options.
6314 * decl2.c (lang_f_options, lang_decode_option): Likewise.
6315
6316 1998-08-24 Nathan Sidwell <nathan@acm.org>
6317
6318 * lex.c (real_yylex): Don't warn about long long constants if
6319 we're allowing long long.
6320
6321 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6322
6323 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
6324 accessing bindings directly.
6325
6326 * search.c (my_tree_cons): Reimplement.
6327
6328 * lang-specs.h: Remove __HONOR_STD.
6329 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
6330
6331 1998-08-23 Mark Mitchell <mark@markmitchell.com>
6332
6333 * decl.c (grokdeclarator): Complain about in-class initialization
6334 of aggregates and/or references.
6335 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
6336 TEMPLATE_TYPE_PARMs.
6337
6338 * decl2.c (grok_array_decl): Add comment.
6339 (mark_used): Don't instantiate an explicit instantiation.
6340 * friend.c (make_friend_class): Remove bogus comment. Fix check
6341 for partial specializations.
6342 * pt.c (check_explicit_specialization): Don't
6343 SET_DECL_EXPLICIT_INSTANTIATION here.
6344 (mark_decl_instantiated): Or here.
6345 (do_decl_instantiation): Do it here, instead. Add checks for
6346 duplicate explicit instantiations, etc. Tidy.
6347 (do_type_instantiation): Likewise.
6348 (instantiate_decl): Improve comments. Complain about explicit
6349 instantiations where no definition is available.
6350
6351 * cp-tree.h (ansi_null_node): Remove.
6352 * call.c (build_over_call): Warn about converting NULL to an
6353 arithmetic type.
6354 * cvt.c (build_expr_type_conversion): Likewise. Use
6355 null_ptr_cst_p instead of expanding it inline.
6356 * decl.c (ansi_null_node): Remove.
6357 (init_decl_processing): Make null_node always have integral type.
6358 * except.c (build_throw): Warn about converting NULL to an
6359 arithmetic type.
6360 * lex.c (init_parse): Remove handling of ansi_null_node.
6361 * pt.c (type_unification_real): Don't convert NULL to void* type.
6362 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
6363 (convert_for_assignment): Warn about converting NULL to an
6364 arithmetic type.
6365 (convert_for_initialization): Likewise.
6366
6367 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
6368
6369 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
6370 * pt.c (coerce_template_parms): Use no_linkage_check.
6371 * decl.c (grokvardecl): Likewise.
6372 (grokfndecl): Likewise. Members of anonymous types have no linkage.
6373
6374 * method.c (process_overload_item): Remove useless code.
6375
6376 1998-08-20 Per Bothner <bothner@cygnus.com>
6377
6378 Handle new'ing of Java classes.
6379 * init.c (build_class_classref): New function.
6380 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
6381 constructor does not return this; don't need to exception-protect.
6382
6383 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
6384 * decl2.c (acceptable_java_type): Handle template-derived types.
6385
6386 1998-08-20 Per Bothner <bothner@cygnus.com>
6387
6388 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
6389
6390 1998-08-20 Mark Mitchell <mark@markmitchell.com>
6391
6392 * decl.c (duplicate_decls): Always merge the old and new patterns
6393 for templates, regardless of whether or not the new one has
6394 DECL_INITIAL. Don't throw away specializations. Merge
6395 DECL_SAVED_TREE.
6396 * pt.c (tsubst_decl): Use the right pattern when calculating the
6397 complete args for a new template instance.
6398 (do_decl_instantiation): Fix typo in comment.
6399 (regenerate_decl_from_template): Deal with tricky friend template
6400 case.
6401 (instantiate_decl): Likewise.
6402
6403 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
6404
6405 * init.c (build_builtin_delete_call): Add missing assemble_external
6406 call.
6407
6408 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
6409
6410 * parse.y (notype_unqualified_id): Also accept ~A<int>.
6411
6412 1998-08-19 Mark Mitchell <mark@markmitchell.com>
6413
6414 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
6415 arithmetic.
6416 * except.c (build_throw): Warn when NULL is thrown, even with
6417 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
6418 thrown expression.
6419
6420 * cp-tree.h (ansi_null_node): New variable.
6421 * decl.c (ansi_null_node): New variable.
6422 (init_decl_processing): Initialize its type.
6423 * lex.c (init_parse): Initialize its value. Use ansi_null_node
6424 for null_node in non-ANSI mode.
6425 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
6426 place of null_node to avoid spurious errors.
6427
6428 1998-08-17 Mark Mitchell <mark@markmitchell.com>
6429
6430 * cp-tree.h (enter_scope_of): New function.
6431 * parse.y (complex_direct_notype_declarator): Use it.
6432 * semantics.c (enter_scope_of): New function.
6433
6434 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
6435
6436 * decl.c (grokparms): No, here.
6437
6438 * decl.c (grokdeclarator): Catch parm with pointer to array of
6439 unknown bound here...
6440 * method.c (process_overload_item): ...not here.
6441
6442 * gxxint.texi: Remove obsolete documentation of overloading code.
6443
6444 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
6445 * class.c (finish_struct_bits): Likewise.
6446
6447 * tree.c (lvalue_type): Fix for arrays.
6448 * typeck.c (build_unary_op): Use lvalue_type.
6449 * call.c (add_function_candidate): Likewise.
6450 * cvt.c (convert_to_reference): Likewise.
6451
6452 * decl2.c (lang_decode_option): Ignore -traditional.
6453
6454 * init.c (build_offset_ref): Don't mess with error_mark_node.
6455 * lex.c (do_scoped_id): Use cp_error.
6456
6457 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
6458
6459 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
6460
6461 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
6462
6463 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
6464
6465 * cp-tree.h (set_identifier_local_value): Provide prototype.
6466
6467 * decl2.c (do_namespace_alias): Remove unused variables `binding'
6468 and `old'.
6469
6470 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
6471
6472 * Makefile.in: Rename BBISON to BISON so that it can be properly
6473 inherited from the parent makefile.
6474
6475 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
6476
6477 * lang-options.h: Add -finit-priority.
6478 * decl2.c: Likewise. Check flag_init_priority instead of
6479 USE_INIT_PRIORITY.
6480
6481 * decl2.c (setup_initp): New fn.
6482 (start_objects, finish_objects, do_ctors): Handle init_priority.
6483 (do_dtors, finish_file): Likewise.
6484
6485 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
6486
6487 * pt.c (tsubst_copy): Hush warning.
6488
6489 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
6490
6491 1998-08-12 Mark Mitchell <mark@markmitchell.com>
6492
6493 * pt.c (print_template_context): Don't abort when instantiating a
6494 synthesized method.
6495
6496 * decl.c (grokdeclarator): Issue errors on namespace qualified
6497 declarators in parameter lists or in class scope.
6498
6499 1998-08-09 Mark Mitchell <mark@markmitchell.com>
6500
6501 * pt.c (check_explicit_specialization): Don't abort on bogus
6502 explicit instantiations.
6503
6504 1998-08-07 Mark Mitchell <mark@markmitchell.com>
6505
6506 * typeck.c (require_complete_type): Use complete_type_or_else.
6507 (complete_type_or_else): Always return NULL_TREE on failure, as
6508 documented.
6509
6510 * pt.c (tsubst_aggr_type): Prototype.
6511 (tsubst_decl): New function, split out from tsubst. Set
6512 input_filename and lineno as appropriate.
6513 (pop_tinst_level): Restore the file and line number saved in
6514 push_tinst_level.
6515 (instantiate_class_template): Set input_filename and lineno as
6516 appropriate.
6517 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
6518 context for a TYPENAME_TYPE is complete.
6519
6520 * decl2.c (grokbitfield): Issue errors on bitfields declared with
6521 function type.
6522 (do_dtors): As in do_ctors, pretend to be a member of the same
6523 class as a static data member while generating a call to its
6524 destructor.
6525
6526 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
6527 conversions, even in complex virtual base class hierarchies.
6528
6529 1998-08-06 Mark Mitchell <mark@markmitchell.com>
6530
6531 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
6532 (TYPE_TEMPLATE_INFO): Likewise.
6533 (SET_TYPE_TEMPLATE_INFO): Likewise.
6534 (ENUM_TI_TEMPLATE): Likewise.
6535 (ENUM_TI_ARGS): Likewise.
6536 (lookup_nested_type_by_name): Remove.
6537 * decl.c (maybe_process_template_type_declaration): Handle enums.
6538 (start_enum): Don't check for primary-template enum declarations
6539 here.
6540 (finish_enum): Clean up, document. Make sure template enum
6541 constants get the correct type.
6542 (build_enumerator): Copy initializers for template enumerations,
6543 too.
6544 (grok_enum_decls): Document.
6545 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
6546 better. Build LOOKUP_EXPRs for local variables, even if they are
6547 TREE_PERMANENT.
6548 * pt.c (tsubst_enum): Remove field_chain parameter.
6549 (template_class_depth): Include the depth of surrounding function
6550 contexts.
6551 (push_template_decl): Check for primary-template enum declarations
6552 here. Deal with enumeration templates.
6553 (lookup_template_class): Likewise.
6554 (for_each_template_parm): Likewise.
6555 (instantiate_class_template): Don't call tsubst_enum directly,
6556 call tsubst instead, to instantiate enums. Deal with all
6557 field_chain issues here, not in tsubst_enum.
6558 (lookup_nested_type_by_name): Remove.
6559 (tsubst_aggr_type): Revise handling of enumeration types.
6560 (tsubst): Likewise.
6561 (tsubst_copy): Likewise.
6562 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
6563
6564 1998-08-04 Mark Mitchell <mark@markmitchell.com>
6565
6566 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
6567 uses template parameters.
6568 * method.c (build_template_parm_names): Use the full set of
6569 template arguments for tsubst'ing.
6570 (build_overload_identifier): Pass the full set of template
6571 arguments to build_template_parm_names, not just the
6572 innermost_args.
6573 * pt.c (TMPL_ARGS_DEPTH): Define using
6574 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
6575 (NUM_TMPL_ARGS): New macro.
6576 (add_outermost_template_args): Deal with the case where the outer
6577 args will be completely discarded.
6578 (coerce_template_parms): Use the full set of template arguments
6579 for tsubst'ing. Simplify. Add some asserts. Improve
6580 error messages.
6581 (lookup_template_class): Pass the full set of template arguments
6582 to coerce_template_parms.
6583 (tsubst): Add assertion.
6584 (do_type_instantiation): Don't instantiate member template
6585 classes.
6586
6587 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
6588 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
6589
6590 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
6591
6592 * method.c (set_mangled_name_for_decl): Change return type to void.
6593
6594 * decl.c (lookup_name_real): A namespace-level decl takes priority
6595 over implicit typename. Avoid doing the same lookup twice.
6596
6597 * search.c (dependent_base_p): New fn.
6598 (dfs_pushdecls, dfs_compress_decls): Use it.
6599
6600 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
6601 virtual functions if the type doesn't have any.
6602
6603 1998-08-03 Mark Mitchell <mark@markmitchell.com>
6604
6605 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
6606 uses template parameters.
6607
6608 1998-08-02 Mark Mitchell <mark@markmitchell.com>
6609
6610 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
6611 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
6612 * lex.c (do_identifier): Don't use a second argument, or a type,
6613 when building LOOKUP_EXPRs.
6614 (do_identifier): Likewise.
6615 (do_scoped_id): Likewise.
6616 * method.c (hack_identifier): Improve error message.
6617 * pt.c (lookup_template_function): Don't needlessly call
6618 copy_to_permanent or build_min.
6619 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
6620 necessary.
6621 (do_decl_instantiation): Improve error message.
6622 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
6623 (build_min): Copy the type to the permanent obstack, too.
6624
6625 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
6626
6627 * init.c (init_init_processing): Remove BI* handling.
6628 (build_builtin_call): Remove.
6629 (build_builtin_delete_call): New fn.
6630 (build_delete): Use it.
6631
6632 1998-07-31 Mark Mitchell <mark@markmitchell.com>
6633
6634 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
6635 (maybe_check_template_type): New function.
6636 * decl.c (maybe_process_template_type_declaration): New function,
6637 split out from pushtag Call maybe_check_template_type.
6638 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
6639 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
6640 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
6641 * pt.c (template_class_depth_real): Generalization of ...
6642 (template_class_depth): Use it.
6643 (register_specialization): Use duplicate_decls for duplicate
6644 declarations of specializations.
6645 (maybe_check_template_type): New function.
6646 (push_template_decl_real): Fix comment.
6647 (convert_nontype_argument): Likewise.
6648 (lookup_template_class): Likewise. Avoid an infinite loop on
6649 erroneous code.
6650 (tsubst_friend_function): Fix comment.
6651 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
6652 an IDENTIFIER_NODE.
6653 * semantics.c (begin_function_definition): Use
6654 reset_specialization to note that template headers don't apply
6655 directly to declarations after the opening curly for a function.
6656
6657 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
6658
6659 * decl.c (push_overloaded_decl): Use current_namespace instead of
6660 DECL_CONTEXT (decl) to determine where we go.
6661
6662 * decl.c (lookup_name_real): Fix typo.
6663
6664 1998-07-28 Mark Mitchell <mark@markmitchell.com>
6665
6666 * friend.c (is_friend): Be lenient with member functions to deal
6667 with nested friends.
6668
6669 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
6670
6671 * class.c (finish_struct_1): Convert integer_zero_node to
6672 ssizetype before passing it to set_rtti_entry.
6673 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
6674 of any size to a pointer.
6675
6676 1998-07-27 Mark Mitchell <mark@markmitchell.com>
6677
6678 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
6679 (build_template_decl_overload): Remove.
6680 (set_mangled_name_for_decl): New function.
6681 (innermost_args): Remove is_spec parameter.
6682 (most_specialized, most_specialized_class): Remove declarations.
6683 (lookup_template_class): Add entering_scope parameter.
6684 (maybe_process_partial_specialization): New function.
6685 (finish_template_decl): Likewise.
6686 (finish_template_type): Likewise.
6687 * class.c (finish_struct): Clean up processing of member template
6688 specializations.
6689 * decl.c (pushtag): Fix formatting.
6690 (lookup_tag): Improve handling of pseudo-global levels.
6691 (make_typename_type): Adjust call to lookup_template_class.
6692 (shadow_tag): Use maybe_process_partial_specialization.
6693 (xref_tag): Improve handling of member friends.
6694 (start_function): Call push_nested_class before
6695 push_template_decl. Don't call push_template_decl for
6696 specializations.
6697 * decl2.c (grok_x_components): Don't call xref_tag for
6698 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
6699 (grokclassfn): Use set_mangled_name_for_decl.
6700 (arg_assoc_class): Adjust call to innermost_args.
6701 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
6702 * error.c (dump_function_name): Improve printing of template
6703 function names.
6704 * friend.c (is_friend): Don't compare types of decls to determine
6705 friendship, unless flag_guiding_decls.
6706 (make_friend_class): Partial specializations cannot be friends.
6707 (do_friend): Use set_mangled_name_for_decl. Call
6708 push_template_decl_real instead of push_template_decl.
6709 * method.c (build_decl_overload_real): Remove prototype. Give it
6710 external linkage.
6711 (build_overload_identififer): Adjust call to innermost_args.
6712 (build_template_decl_overload): Remove.
6713 (set_mangled_name_for_decl): New function.
6714 * parse.y (.finish_template_type): New non-terminal.
6715 (template_def): Use finish_template_decl. Use template_extdef
6716 instead of extdef.
6717 (template_extdef, template_datadef): New non-terminals, containing
6718 only those rules for things which can be templates.
6719 (datadef): Tidy.
6720 (template_type, self_template_type): Use .finish_template_type.
6721 (named_class_head): Use maybe_process_partial_specialization.
6722 * pt.c (mangle_class_name_for_template): Remove context parameter.
6723 (get_class_bindings): Remove outer_args parameter.
6724 (complete_template_args): Remove.
6725 (add_outermost_template_args): New function.
6726 (register_specialization): Return the specialization.
6727 (unregister_specialization): New function.
6728 (tsubst_template_parms): Likewise.
6729 (most_specialized, most_specialized_class): Prototype here as
6730 static.
6731 (original_template): Rename to most_general_template.
6732 (tsubst_template_parms): New function.
6733 (set_mangled_name_for_template_decl): Likewise.
6734 (TMPL_ARGS_DEPTH): New macro.
6735 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
6736 (TMPL_ARGS_LEVEL): New macro.
6737 (SET_TMPL_ARGS_LEVEL): Likewise.
6738 (TMPL_ARG): Likewise.
6739 (SET_TMPL_ARG): Likewise.
6740 (TMPL_ARGS_DEPTH): Likewise.
6741 (finish_member_template_decl): Use finish_template_decl.
6742 (maybe_process_partial_specialization): New function, split out
6743 from tsubst.
6744 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
6745 (maybe_begin_member_template_processing): Use new macros.
6746 (is_member_template): Likewise.
6747 (is_member_template_class): Likewise.
6748 (add_to_template_args): Likewise. Deal with multiple levels of
6749 args.
6750 (maybe_process_partial_specialization): New function.
6751 (retrieve_specialization): Add consistency check.
6752 (determine_specialization): Return full argument list.
6753 (check_explicit_specialization): Tweak friend handling. Use full
6754 argument lists. Simplify.
6755 (current_template_args): Use new macros.
6756 (push_template_decl_real): Change ill-named mainargs to specargs.
6757 Check that a partial specialization actually specializes at least
6758 one parameter. Improve friend handling. Modify for full
6759 template arguments.
6760 (classtype_mangled_name): Don't mangle the names of
6761 specializations.
6762 (lookup_template_class): Add entering_scope parameter. Use it to
6763 avoid finding a template type when an instantiation is required.
6764 Simplify. Use full template arguments.
6765 (tsubst_friend_function): Use unregister_specialization. Use new
6766 macros. Use full template arguments.
6767 (tsubst_friend_class): Substitute, using tsubst_template_parms,
6768 into the template parameters before passing them to
6769 redeclare_class_template.
6770 (instantiate_class_template): Simplify. Use full template
6771 arguments. Adjust calls to get_class_bindings. Use
6772 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
6773 (innermost_args): Use new macros.
6774 (tsubst_aggr_type): New function, split out from tsubst.
6775 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
6776 conventions for lookup_template_class. Refine handling of partial
6777 instantiations. Remove calls to complete_template_args.
6778 Simplify. Add consistency checks. Use set_mangled_name_for_decl
6779 and set_mangled_name_for_template_decl.
6780 (tsubst_copy): Use tsubst_aggr_type.
6781 (instantiate_template): Use full template arguments.
6782 (more_specialized): Improve formatting.
6783 (more_specialized_class): Adjust calls to get_class_bindings.
6784 (get_bindings_real): Don't call complete_template_args.
6785 (most_specialized): Don't overwrite input; create a new list.
6786 (most_specialized_class): Use most_general_template.
6787 (regenerate_decl_from_template): Use unregister_specialization.
6788 Use full template arguments.
6789 (instantiate_decl): Use full template arguments.
6790 (set_mangled_name_for_template_decl): New function.
6791 * semantics.c (begin_class_definition): Use
6792 maybe_process_partial_specialization.
6793 (finish_member_class_template): New function.
6794 (finish_template_decl): Likewise.
6795 (finish_template_type): Likewise.
6796 (typeck.c): Don't crash after issuing a compiler_error.
6797 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
6798
6799 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
6800
6801 * typeck2.c (build_functional_cast): Handle default-initialization.
6802
6803 * call.c (build_over_call): Pass 1 to popclass.
6804
6805 * parse.y (direct_notype_declarator): Add precedence declaration
6806 to notype_unqualified_id case.
6807 * Makefile.in (EXPECT): Adjust.
6808
6809 * tree.c (ovl_member): Fix for single function in OVL.
6810
6811 1998-07-27 Dave Brolley <brolley@cygnus.com>
6812
6813 * c-lex.c (yylex): Fix boundary conditions in character literal and
6814 string literal loops.
6815
6816 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
6817
6818 * decl.c (lookup_name_real): OK, do return the from_obj value
6819 unless got_object depends on template parms.
6820
6821 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
6822
6823 * pt.c (coerce_template_parms): Also complain about local enums.
6824
6825 * cp-tree.h: Add prototype for set_identifier_local_value.
6826 * decl.c (set_identifier_local_value_with_scope): Make static,
6827 prototype.
6828 * search.c (covariant_return_p): Likewise.
6829 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
6830
6831 * call.c (build_method_call): Only pull out the type of a destructor
6832 if it's a template type parm.
6833 * decl.c (lookup_name_real): Never return the from_obj value.
6834
6835 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
6836
6837 * except.c (process_start_catch_block_old): Call start_decl_1 for
6838 catch parm.
6839 * decl.c (start_decl_1): Avoid duplicate error.
6840
6841 * init.c (expand_default_init): Only perform the initialization if
6842 it will do something.
6843
6844 1998-07-23 H.J. Lu (hjl@gnu.org)
6845
6846 * parse.y (base_class): Check for invalid base class.
6847
6848 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
6849
6850 * decl2.c (import_export_template): Fold in...
6851 (import_export_class): ...to here. Handle dllimport/export.
6852
6853 * class.c (build_vtable): Pass at_eof to import_export_vtable.
6854 (prepare_fresh_vtable): Likewise.
6855 * decl2.c (import_export_class): Split out...
6856 (finish_prevtable_vardecl): From here.
6857 * class.c (finish_struct_1): Call import_export_class if at_eof.
6858
6859 * decl.c (start_function): #if 0 mysterious code I wrote and have
6860 forgotten why.
6861 * rtti.c (get_tinfo_fn): If this is for a class type, set
6862 DECL_CONTEXT.
6863
6864 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
6865
6866 * inc/exception: Change terminate and unexpected to ().
6867
6868 * parse.y (named_class_head_sans_basetype_defn): A
6869 named_class_head_sans_basetype followed by '{' or ':' is a defn.
6870
6871 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
6872
6873 * tree.c (canonical_type_variant): New fn to handle arrays.
6874 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
6875 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
6876 * method.c (process_overload_item): Use build_overload_value for
6877 arrays.
6878
6879 1998-07-20 Dave Brolley <brolley@cygnus.com>
6880
6881 * lex.c (mbchar.h): #include it.
6882 (GET_ENVIRONMENT): New macro.
6883 (init_parse): Set character set based on LANG environment variable.
6884 (real_yylex): Handle multibyte characters in character literals.
6885 (real_yylex): Handle multibyte characters in string literals.
6886
6887 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
6888
6889 * lex.c (do_identifier): Look for class value even if we don't
6890 have a global value. Do implicit declaration if parsing is 2.
6891 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
6892 lookup.
6893
6894 1998-07-19 Mark Mitchell <mark@markmitchell.com>
6895
6896 * decl.c (pushtag): Revert previous change.
6897 * pt.c (lookup_template_class): Don't put out debugging
6898 information for types that use template parameters.
6899
6900 * decl.c (pushtag): Don't put out debugging information for
6901 compiler-generated typedefs.
6902
6903 * error.c (dump_type_real): Don't crash when presented with
6904 intQI_type_node or the like.
6905
6906 * semantics.c (finish_translation_unit): Fix spelling error in
6907 comment.
6908
6909 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
6910
6911 * decl.c (lookup_name_real): Pull out single function here.
6912 (select_decl): Not here.
6913 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
6914
6915 * decl.c (qualify_lookup): Tweak again.
6916
6917 * pt.c (lookup_template_class): Don't mess with the context of the
6918 instantiation.
6919 * decl2.c (current_decl_namespace): Remove special handling for
6920 templates.
6921
6922 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
6923 a member template specialization.
6924
6925 * tree.c (ovl_member): Use decls_match to compare functions.
6926 * decl.c (decls_match): Check the context of a function.
6927
6928 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
6929 in Koenig lookup support rules.
6930 * semantics.c (finish_call_expr): Handle the new cases.
6931
6932 * typeck.c (build_x_function_call): Handle overloaded methods.
6933
6934 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
6935
6936 1998-07-16 Mark Mitchell <mark@markmitchell.com>
6937
6938 * semantics.c (finish_object_call_expr): Revert previous change.
6939 * call.c (build_new_method_call): Likewise. Instead, convert
6940 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
6941
6942 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
6943
6944 * decl.c (qualify_lookup): Handle templates.
6945
6946 * decl2.c (do_using_directive): Don't pass ancestor.
6947 * decl.c (push_using_directive): Calculate ancestor.
6948
6949 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
6950 * decl.c (pushdecl): Move type shadowing handling from here...
6951 (duplicate_decls): ...to here.
6952 * decl.c (set_identifier_local_value_with_scope): New fn.
6953 (pushdecl): Use it.
6954 (set_identifier_local_value, lookup_type_current_level): New fns.
6955 * decl2.c (do_local_using_decl): Handle types and binding level
6956 stuff properly.
6957
6958 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
6959 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
6960 (lookup_namespace_name): Likewise.
6961 * typeck.c (build_unary_op): Not here anymore.
6962
6963 * decl2.c (do_class_using_decl): Make sure we get an identifier.
6964 * class.c (handle_using_decl): Ignore TYPE_DECLs.
6965
6966 * decl.c (qualify_lookup): New fn.
6967 (lookup_name_real): Use it.
6968
6969 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
6970
6971 * decl2.c (add_using_namespace): When directly using a namespace
6972 that was indirect before, promote it.
6973
6974 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
6975 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
6976 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
6977 * decl.c (select_decl): Replace two flag parameters by one.
6978 (unqualified_namespace_lookup): Likewise, pass flag.
6979 (lookup_flags): New function.
6980 (lookup_name_real): Compute flags, pass them.
6981 (lookup_namespace_name): Call with zero-flag.
6982 * decl2.c (ambiguous_decl): Add flag parameter, complain only
6983 according to flags.
6984 (lookup_using_namespace, qualified_lookup_using_namespace):
6985 Add flag parameter, pass them through.
6986 * lex.c (do_scoped_id): Call with zero-flag.
6987
6988 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
6989
6990 * typeck.c (convert_for_assignment): Use comptypes.
6991
6992 1998-07-16 Mark Mitchell <mark@markmitchell.com>
6993
6994 * semantics.c (finish_object_call_expr): Move test for the
6995 function called being a TYPE_DECL to ...
6996 * call.c (build_new_method_call): Here.
6997
6998 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
6999
7000 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
7001 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
7002
7003 * lex.c (looking_for_typename): Don't initialize.
7004
7005 * decl2.c (ambiguous_decl): Clarify error message.
7006
7007 * decl.c (push_using_directive): Iterate over namespaces used
7008 indirectly.
7009
7010 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7011
7012 * decl2.c (add_using_namespace): Iterate over namespaces used
7013 indirectly.
7014
7015 * decl.c (lookup_name_real): Accept namespace aliases as locals.
7016 (cat_namespace_levels): Ignore aliases.
7017 (duplicate_decls): Ignore duplicate aliases.
7018 * decl2.c (do_namespace_alias): Process block level namespace
7019 aliases. Store alias with pushdecl. Remove odr errors.
7020 * parse.y (namespace_alias): New non-terminal.
7021 (extdef): Use it.
7022
7023 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
7024
7025 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
7026 Handle TEMPLATE_TYPE_PARM.
7027 (arg_assoc): Rewrite.
7028
7029 * pt.c (complete_template_args): Don't look at the context unless
7030 we have to.
7031
7032 * method.c (build_decl_overload_real): Fix namespace handling.
7033
7034 * typeck.c (build_unary_op): Extract a lone function from an
7035 OVERLOAD.
7036
7037 * call.c (build_scoped_method_call): Handle getting a namespace
7038 for basetype in a destructor call.
7039 (check_dtor_name): Handle enums.
7040
7041 * parse.y (using_directive): New nonterminal.
7042 (extdef, simple_stmt): Use it.
7043
7044 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7045
7046 * decl2.c (add_function): Move error message ...
7047 (arg_assoc_namespace): ... from here.
7048
7049 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
7050
7051 * parse.y (namespace_qualifier): Fix multiple level handling.
7052 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
7053 (arg_assoc): Don't skip the first argument of a function.
7054
7055 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
7056
7057 * search.c (my_tree_cons): Clean up.
7058
7059 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
7060
7061 * call.c (joust): Don't warn about "confusing" conversions to the
7062 same type.
7063
7064 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7065
7066 * class.c (push_nested_class): Complain about namespaces.
7067 * decl.c (start_decl): Enter the object's namespace.
7068 (cp_finish_decl): Leave it.
7069 (grokdeclarator): Likewise.
7070 * decl2.c (check_decl_namespace): New function.
7071 (finish_file): Call it.
7072 * parse.y (complex_direct_notype_declarator): Set complexity
7073 of namespace-qualified ids to -1, enter the namespace.
7074
7075 * method.c (build_template_decl_overload): Expect _DECL as first
7076 parameter. Put context temporarily into current_namespace.
7077 * pt.c (check_explicit_specialization): Change caller.
7078 (tsubst): Likewise.
7079
7080 * init.c (build_offset_ref): Call mark_used and
7081 convert_from_reference for namespace members.
7082
7083 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
7084
7085 * search.c (my_tree_cons): The bitfield is at index 2.
7086
7087 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
7088
7089 * lang-options.h: Format changed to work with new --help support
7090 in gcc/toplev.c
7091
7092 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7093
7094 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
7095 Do Koenig lookup in CALL_EXPR.
7096 (arg_assoc): Handle error_mark.
7097 * lex.c (is_global): New function.
7098 (do_identifier): Expect arguments for Koenig lookup.
7099 * parse.y (primary): Add rules for calls of unqualified function calls.
7100 (do_id): Change call of do_identifier.
7101 * pt.c (finish_stmt_expr): Likewise.
7102 * semantics.c (finish_id_expr): Likewise.
7103 (finish_call_expr): Add integer parameter to indicate
7104 argument-dependent lookup.
7105
7106 * decl.c (struct binding_level): New field using_directives.
7107 (push_using_decl): Not sorry anymore.
7108 (push_using_directive): New function.
7109 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
7110 (unqualified_namespace_lookup): New function, code from ...
7111 (lookup_name_real): ... here.
7112 * decl2.c (lookup_using_namespace): Pass using list instead of
7113 initial scope.
7114 (validate_nonmember_using_decl): New function.
7115 (do_nonmember_using_decl): New function.
7116 (do_toplevel_using_decl): Use them.
7117 (do_local_using_decl): New function.
7118 (do_using_directive): Support block-level directives.
7119 * parse.y (simple_stmt): Support using declarations and
7120 directives.
7121 (namespace_qualifier, namespace_using_decl): New non-terminals.
7122
7123 * xref.c (classname): New function.
7124 (GNU_xref_hier): Change class and base parameters to tree.
7125 * decl.c (xref_baseypes): Change caller.
7126 * friend.c (make_friend_class): Likewise.
7127
7128 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7129
7130 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
7131 comparison.
7132
7133 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
7134 template template parameter, record its use.
7135 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
7136 its template arguments if exists.
7137
7138 * pt.c (coerce_template_template_parms): New function equivalent
7139 to coerce_template_parms when IS_TMPL_PARM is true.
7140 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
7141 all callers changed.
7142
7143 (coerce_template_parms): Access ARGLIST properly when creating a
7144 new vector. Only accept implicit TYPE_DECL as valid argument for
7145 a template template parameter when it is a base class of
7146 current_class_type. Don't display error message when COMPLAIN is
7147 false.
7148
7149 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
7150
7151 * repo.c (get_base_filename): Use file_name_nondirectory.
7152 (open_repo_file): Likewise.
7153 * cp-tree.h (file_name_nondirectory): Add prototype.
7154
7155 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
7156
7157 * friend.c (do_friend): Pull the identifier out of declarator.
7158 Use cp_error and friends.
7159 * decl2.c (qualified_lookup_using_namespace): Fix call to
7160 purpose_member.
7161 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
7162 (grokvardecl): Use DECL_CLASS_SCOPE_P.
7163 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
7164 * class.c (warn_hidden): Fix for OVERLOAD.
7165 From grahams@rcp.co.uk:
7166 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
7167 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
7168
7169 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
7170
7171 * g++.1 (-traditional): Remove duplicated documentation.
7172
7173 1998-07-11 Mark Mitchell <mark@markmitchell.com>
7174
7175 * method.c (flush_repeats): Add nrepeats parameter.
7176 (issue_nrepeats): Likewise.
7177 (is_back_referenceable_type): New function. Don't back-reference
7178 TEMPLATE_TYPE_PARMs as well as simple types like integers.
7179 (build_mangled_name_for_type): Likewise.
7180 (build_mangled_name_for_type_with_Gcode): Likewise.
7181 (lasttype): Remove.
7182 (nrepeats): Likewise.
7183 (Nrepeats): Likewise.
7184 (start_squangling): Don't clear the variables removed above.
7185 (end_squangling): Likewise.
7186 (flush_repeats): Tidy. Use nrepeats parameter rather than
7187 Nrepeats global.
7188 (issue_nrepeats): Likewise, but with nrepeats global. Use
7189 is_backreferenceable_type.
7190 (build_overload_nested_name): Tidy. Add comment. Use
7191 build_mangled_name_for_type.
7192 (build_underscore_int): Comment.
7193 (build_overload_scope_ref): Use build_mangled_name_for_type.
7194 (build_overload_int): Likewise.
7195 (build_template_template_parm_names): Tidy.
7196 (build_template_parm_names): Use build_mangled_name_for_type.
7197 (build_overload_identifier): Add comments.
7198 (build_mangled_name_for_type_with_Gcode): Split out from
7199 build_mangled_name.
7200 (build_mangled_name_for_type): Use it.
7201 (build_mangled_name): Rework to use build_mangled_name_for_type
7202 and to not use global nrepeats/Nrepeats. Tidy.
7203 (process_modifiers): Tidy.
7204 (check_btype): Use is_backreferenceable_type. Add comment.
7205 Rename `node' to `type'.
7206 (process_overload_item): Set numeric_output_need_bar here.
7207 Use build_mangled_name_for_type. Tidy.
7208 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
7209 build_mangled_name_for_type.
7210
7211 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
7212 for TYPE_DECLs.
7213
7214 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
7215
7216 * cp-tree.h (warn_long_long): Define.
7217 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
7218 warning "ANSI C++ does not support `long long'".
7219 * decl2.c (warn_long_long): Define.
7220 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
7221
7222 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
7223
7224 * decl.c (xref_tag): Handle attributes between 'class' and name.
7225 * parse.y (aggr): Likewise.
7226 * semantics.c (finish_class_definition): Likewise.
7227 * Makefile.in (EXPECTED): Adjust.
7228
7229 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
7230 * decl2.c: Define them.
7231 (lang_decode_option): Handle them.
7232 * lang-options.h: Add -foptional-diags.
7233 * class.c (finish_struct): Don't complain about multiple meanings of
7234 name if -fno-optional-diags.
7235 * decl.c (pushdecl_class_level): Likewise.
7236 * lex.c (real_yylex): Check warn_multichar.
7237
7238 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
7239
7240 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
7241
7242 * tree.c (make_binfo): Fix length.
7243
7244 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
7245
7246 * decl2.c (lang_decode_option): Remove warn_template_debugging.
7247 * lang-options.h: Likewise.
7248
7249 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7250
7251 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
7252 (process_start_catch_block): Likewise for variables
7253 `false_label_rtx', `call_rtx' and `return_value_rtx'.
7254
7255 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
7256
7257 * tree.c (build_srcloc): Make sure we allocate this node on the
7258 permanent obstack.
7259
7260 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
7261
7262 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
7263 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
7264 (lang_specific_driver): Only add -lm automatically if need_math is
7265 nonzero.
7266
7267 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
7268
7269 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
7270
7271 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7272
7273 * Makefile.in (EXPR_H): New dependency variable.
7274 (decl2.o): Depend on $(EXPR_H).
7275 (typeck.o): Likewise.
7276 (init.o): Likewise.
7277 (expr.o): Likewise.
7278
7279 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
7280
7281 * decl.c (start_enum): Put local enums on permanent_obstack.
7282
7283 1998-06-25 Mark Mitchell <mark@markmitchell.com>
7284
7285 * cp-tree.h (c_get_alias_set): Declare.
7286 * decl.c (init_decl_processing): Set lang_get_alias_set.
7287
7288 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
7289
7290 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
7291 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
7292 flag for all function decls which are in the exception table.
7293 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
7294 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
7295 code is emitted for any referenced rtti function.
7296
7297 1998-06-25 Dave Brolley <brolley@cygnus.com>
7298
7299 * lang-specs.h: Use new | syntax to eliminate
7300 string concatenation.
7301
7302 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
7303
7304 * cp-tree.h (CP_DECL_CONTEXT): New macro.
7305 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
7306 * method.c (build_overload_nested_name): Likewise.
7307 * sig.c (build_signature_pointer_or_reference_type): Don't set
7308 DECL_CONTEXT.
7309
7310 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7311
7312 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
7313 * cp-tree.h (FROB_CONTEXT): New macro.
7314 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
7315 * decl.c (namespace_binding): Replace NULL_TREE with
7316 global_namespace.
7317 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
7318 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
7319 Likewise.
7320 * decl.c (pushtag): Use FROB_CONTEXT.
7321 (pushdecl, make_typename_type, define_function, grokdeclarator):
7322 Likewise.
7323 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
7324 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
7325 Likewise.
7326 * decl2.c (decl_namespace): Return global_namespace if no context.
7327 * method.c (build_overload_nested_name): Expect null as context.
7328 * pt.c (mangle_class_name_for_template): Do nothing for null
7329 contexts.
7330 (lookup_template_class): Allow for null id_context.
7331
7332 1998-06-25 Richard Henderson <rth@cygnus.com>
7333
7334 * method.c (emit_thunk): Set current_function_is_thunk for the
7335 ASM_OUTPUT_MI_THUNK case as well.
7336
7337 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
7338
7339 * exception.cc (__cplus_type_matcher): Get a match_info pointer
7340 instead of an exception table entry as a parameter.
7341
7342 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
7343
7344 * parse.y (function_try_block): Don't call start_catch_handler.
7345 * except.c (call_eh_info): Remove coerced field from declaration.
7346 (build_eh_type_type_ref): New function to create an address of a
7347 rtti function for the new style exception tables.
7348 (expand_start_catch_block): Split function, this contains the
7349 common part.
7350 (process_start_catch_block_old): New function to perform the rest
7351 of expand_start_catch_block under old style exceptions.
7352 (process_start_catch_block_old): New function to perform the rest
7353 of expand_start_catch_block under new style exceptions.
7354 (expand_end_catch_block): Only pop the false label off the stack under
7355 the old style of exceptions.
7356 * semantics.c (finish_try_block): Don't call start_catch_handler.
7357 * exception.cc (struct cp_eh_info): Add original_value field.
7358 (__cplus_type_matcher): Perform type matching on the original exception
7359 value, and if we have a match, set the current value.
7360 (__cp_push_exception): Set the original exception value.
7361
7362 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
7363
7364 * call.c (joust): Fix confusing conversion warning.
7365
7366 * call.c (build_op_delete_call): Add placement parm. Check
7367 LOOKUP_SPECULATIVELY.
7368 * cp-tree.h, decl2.c, init.c: Adjust.
7369 * decl.c (finish_function): Use it.
7370
7371 * pt.c (tsubst): Diagnose creating void fields or variables.
7372
7373 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7374
7375 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
7376
7377 * cp-tree.h (check_dtor_name): Add prototype.
7378
7379 * init.c (expand_member_init): Remove unused variables
7380 `ptr_type_node', `parm' and `rval'.
7381
7382 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
7383 in call to fprintf.
7384 (lang_print_xnode): Likewise.
7385
7386 * typeck2.c (enum_name_string): Cast argument to sprintf to long
7387 and use %ld specifier.
7388
7389 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
7390 specifier in call to fprintf.
7391 (GNU_xref_member): Cast argument to sprintf to int.
7392
7393 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7394
7395 * typeck2.c (pop_init_level): Warn about implicit zero initialization
7396 of struct members.
7397
7398 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7399
7400 * cp-tree.h: Prototype function `check_java_method'.
7401
7402 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
7403
7404 * class.c (finish_struct): Make conflicting use of id a pedwarn.
7405 * decl.c (pushdecl_class_level): Likewise.
7406
7407 1998-06-17 Mark Mitchell <mark@markmitchell.com>
7408
7409 * pt.c (convert_nontype_argument): Issue an error when presented
7410 with an integer (real) constant that cannot be simplified to an
7411 INT_CST (REAL_CST).
7412
7413 * cp-tree.h (c_get_alias_set): Remove declaration added in
7414 1998-06-13 change that should never have been checked in.
7415
7416 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
7417
7418 * typeck.c (build_binary_op_nodefault): Change % in format strings
7419 to %%.
7420
7421 * decl.c (grokvardecl): Don't build_static_name for decls that
7422 aren't at namespace scope.
7423
7424 * init.c (perform_member_init): Catch default-initialization of
7425 references.
7426
7427 1998-06-17 Mark Mitchell <mark@markmitchell.com>
7428
7429 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
7430
7431 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
7432
7433 * method.c (hack_identifier): Complain about getting a namespace
7434 or class template.
7435 * typeck.c (decay_conversion): Remove check for namespaces.
7436 * typeck2.c (incomplete_type_error): Likewise.
7437 * parse.y (template_arg): Add PTYPENAME expansion.
7438
7439 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
7440
7441 * decl.c (grokvardecl): Don't build external assembler names for
7442 TYPENAMEs in other namespaces as there is no declarator.
7443 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
7444 info from DECL_CONTEXT if it is NULL.
7445
7446 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
7447
7448 * call.c (check_dtor_name): Split out.
7449 (build_scoped_method_call): Use it.
7450 (build_method_call): Use it.
7451 * init.c (build_offset_ref): Use it.
7452
7453 * typeck.c (build_static_cast): Fix handling of pointers to members.
7454
7455 * decl.c (finish_function): Just return nothing from a constructor.
7456 * typeck.c (c_expand_return): Complain about returning a void
7457 expression from a destructor.
7458
7459 1998-06-13 Mark Mitchell <mark@markmitchell.com>
7460
7461 * class.c (alter_access): Accept a BINFO explaining how to get
7462 from the entity whose accessed is being altered to the type doing
7463 the altering.
7464 (handle_using_decl): New function containing code split out from ...
7465 (finish_struct_1): Here.
7466
7467 * cp-tree.h (complete_type_or_else): Declare.
7468 * init.c (build_new_1, build_delete): Use it.
7469 * typeck.c (require_complete_type): Use complete_type, rather than
7470 expanding it inline.
7471 (complete_type_or_else): New function.
7472 (build_component_ref): Use it.
7473 (pointer_int_sum): Make sure the type pointed to is complete.
7474 (pointer_diff): Likewise.
7475
7476 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
7477 types.
7478
7479 * search.c (get_matching_virtual): Note that member templates
7480 cannot override virtual functions.
7481
7482 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
7483
7484 * pt.c (check_explicit_specialization): If DECLARATOR turned into
7485 an error_mark_node from lookup_template_function, return the same.
7486 (determine_specialization): Also make sure TEMPLATE_ID isn't an
7487 error_mark_node, before we try to read its operands.
7488 * decl.c (grokdeclarator): If we got an error_mark_node from
7489 check_explicit_specialization, just return it right back.
7490
7491 1998-06-12 Mark Mitchell <mark@markmitchell.com>
7492
7493 * class.c (instantiate_type): Don't treat template-ids that don't
7494 specify any template arguments as equivalent to ordinary
7495 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
7496 pointer-to-members for member templates. Tidy slightly.
7497 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
7498 * init.c (build_offset_ref): Handle template-ids like ordinary
7499 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
7500 offset part of the OFFSET_REF.
7501 * typeck.c (build_unary_op): Change check for unknown types to
7502 look for OFFSET_REFs, not SCOPE_REFs.
7503
7504 1998-06-11 Mark Mitchell <mark@markmitchell.com>
7505
7506 * pt.c (is_member_template_class): New function.
7507 (push_template_decl_real): Use it.
7508
7509 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
7510
7511 * friend.c (do_friend): Add support for nested classes using
7512 member functions of the enclosing class as friends.
7513
7514 1998-06-10 Mark Mitchell <mark@markmitchell.com>
7515
7516 * call.c (convert_default_arg): Make global, not static.
7517 (convert_arg_for_ellipsis): Split out from ...
7518 (build_over_call): Here.
7519 * cp-tree.h (convert_default_arg); Declare.
7520 (convert_arg_to_ellipsis): Likewise.
7521 (do_member_init): Remove.
7522 * init.c (do_member_init): Remove; this code is dead.
7523 (expand_member_init): Remove much of this code; it is dead.
7524 * typeck.c (convert_arguments): Use convert_default_arg and
7525 convert_arg_for_ellipsis, rather than duplicating here.
7526
7527 * call.c (convert_like): Don't fail silently if
7528 build_user_type_conversion fails. Always return error_mark_node
7529 for failure.
7530
7531 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
7532
7533 * search.c (covariant_return_p): Complain about ambiguous base.
7534
7535 * typeck.c (build_component_ref): Diagnose ref to nested type.
7536
7537 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
7538
7539 * decl.c (grokparms): Check that INIT isn't an error_mark_node
7540 before giving error about invalid type for default arg.
7541
7542 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
7543
7544 * call.c (build_method_call): Fix thinko.
7545
7546 1998-06-10 Dave Brolley <brolley@cygnus.com>
7547
7548 * decl2.c (lang_decode_option): New argc/argv interface.
7549 * cp-tree.h (lang_decode_option): New argc/argv interface.
7550 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
7551 specified for cpplib-enabled compilers.
7552 * lex.c (lang_init): Don't check_newline for cpplib.
7553 (init_parse): Don't initialize cpplib here.
7554
7555 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
7556
7557 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
7558 piece before checking DECL_MUTABLE_P.
7559
7560 1998-06-10 John Carr <jfc@mit.edu>
7561
7562 * tree.c (debug_binfo): Make printf format match arguments.
7563
7564 * error.c (OB_PUTI): Make printf format match arguments.
7565
7566 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
7567
7568 * init.c (perform_member_init): Handle default-initialization.
7569
7570 * except.c (build_throw): Handle throwing NULL.
7571
7572 * typeck.c (build_x_function_call): Use resolve_offset_ref.
7573
7574 * search.c (compute_access): Only strip an anonymous union
7575 for a FIELD_DECL.
7576
7577 * call.c (add_builtin_candidates): Tweak.
7578
7579 * cvt.c (build_expr_type_conversion): Restore code for conversion
7580 from class types.
7581 * decl2.c (delete_sanity): Use it. Clean up.
7582
7583 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
7584
7585 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
7586
7587 * typeck.c (c_expand_return): Don't warn about void expressions on
7588 return statements in functions returning void.
7589
7590 1998-06-09 Mark Mitchell <mark@markmitchell.com>
7591
7592 * pt.c (fn_type_unification): Revise documentation. Tidy.
7593 (type_unification): Likewise.
7594
7595 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
7596
7597 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
7598 expand_end_catch.
7599 * parse.y (function_try_block): Rename expand_start_catch, and delete
7600 expand_end_catch.
7601 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
7602 expand_end_catch.
7603
7604 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
7605
7606 * search.c (lookup_member): New fn.
7607 * class.c (finish_struct_1): Use it.
7608 * decl.c (lookup_name_real): Use it.
7609
7610 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7611
7612 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
7613
7614 * cp-tree.h: Add prototype for `maybe_print_template_context' and
7615 `maybe_make_one_only'.
7616
7617 * decl.c (auto_function): Remove unused variable `decl'.
7618
7619 * decl2.c: Include dwarf2out.h and dwarfout.h.
7620
7621 * lex.c: Remove redundant declarations of `set_float_handler' and
7622 `asm_out_file'.
7623
7624 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
7625
7626 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
7627 time flag. Call __cp_eh_info instead of __cp_exception_info.
7628 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
7629 (__cp_exception_info): Return offset into cp_eh_info structure to
7630 match what use to be the start of this structure.
7631 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
7632 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
7633 compile time flag.
7634 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
7635 __cp_eh_info instead of __cp_exception_info.
7636
7637 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
7638
7639 * decl.c (cp_finish_decl): Disable inlining of extern inlines
7640 with static variables.
7641
7642 1998-06-08 Mark Mitchell <mark@markmitchell.com>
7643
7644 * init.c (build_offset_ref): Correct previous change to use build,
7645 not build_min.
7646
7647 1998-06-07 Mark Mitchell <mark@markmitchell.com>
7648
7649 * class.c (instantiate_type): Handle pointer-to-members where the
7650 member is a template.
7651 * init.c (build_offset_ref): Likewise.
7652 * typeck.c (build_unary_op): Likewise.
7653
7654 1998-06-07 Richard Henderson <rth@cygnus.com>
7655
7656 * lex.c (lang_init_options): New function.
7657 (lang_init): Remove flag_exceptions == 2 hack.
7658
7659 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
7660
7661 * search.c (envelope_add_decl): Tweak for implicit typename.
7662
7663 * call.c (joust): Also warn about confusing conversion op/constructor
7664 overload resolution.
7665
7666 * spew.c (yylex): Also return the TYPE_DECL if got_object.
7667 Don't clear got_object after '~'.
7668 * call.c (build_scoped_method_call): Tweak destructor handling.
7669 (build_method_call): Likewise.
7670 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
7671 TYPE_MAIN_VARIANT for destructors.
7672 * semantics.c (finish_object_call_expr): Complain about calling a
7673 TYPE_DECL.
7674
7675 1998-06-05 Per Bothner <bothner@cygnus.com>
7676
7677 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
7678 Define - update needed by gcc.c change.
7679
7680 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
7681
7682 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
7683
7684 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
7685
7686 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
7687 * decl.c (lookup_name_real): Add namespaces_only parameter.
7688 If set, return only NAMESPACE_DECLs.
7689 (select_decl): Likewise.
7690 (identifier_type_value): Give additional parameter.
7691 (lookup_name_nonclass): Likewise.
7692 (lookup_name): Likewise.
7693 (find_binding): Skip namespace aliases.
7694 (binding_for_name): Likewise.
7695 (push_namespace): Check for namespace aliases.
7696 (lookup_name_namespace_only): New function.
7697 (begin_only_namespace_names, end_only_namespace_names): New functions.
7698 * decl2.c (set_decl_namespace): Skip namespace aliases.
7699 (do_using_directive): Likewise.
7700 (do_namespace_alias): Produce namespace aliases, fix alias
7701 redeclaration.
7702 * error.c (dump_decl): Support SCOPE_REF.
7703 * parse.y (extdef): Wrap lookup with namespace_only for namespace
7704 aliases and using declarations.
7705
7706 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
7707
7708 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
7709
7710 * error.c (dump_expr): Clean up NEW_EXPR case.
7711
7712 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
7713
7714 Suggested by Brendan Kehoe
7715 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
7716 treat it as using ::decl.
7717
7718 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
7719
7720 * tree.c (mapcar): Support NEW_EXPR.
7721
7722 * error.c (dump_expr): Support NEW_EXPR.
7723
7724 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
7725
7726 * method.c (make_thunk): Use overload machinery to make name.
7727 * search.c (covariant_return_p): New fn.
7728 (get_matching_virtual): Use it.
7729
7730 * init.c (build_new_1): Fix check for void.
7731
7732 1998-06-01 Per Bothner <bothner@cygnus.com>
7733
7734 * cp-tree.h (TYPE_FOR_JAVA): New macro.
7735 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
7736 java_int_type_node, java_long_type_node, java_float_type_node,
7737 java_double_type_node, java_char_type_node, java_boolean_type_node):
7738 New "primitive" types, with predefined names __java_byte etc.
7739 (record_builtin_java_type): New function.
7740 (init_decl_processing): Make Java types with record_builtin_java_type.
7741 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
7742 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
7743 (grokfndecl): Call check_java_method for Java classes.
7744 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
7745 (process_overload_item): Match types against specific
7746 java_XX_type_node types, rather than using is_java_type.
7747 * class.c (finish_struct_1): Don't add default copy constructor
7748 or operator= if TYPE_FOR_JAVA.
7749 (pop_lang_conext): Restore strict_prototyp proper if Java.
7750 * decl2.c (acceptable_java_type, check_java_method): New functions.
7751 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
7752 (tsubst): Move common statement after if statement.
7753 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
7754
7755 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
7756
7757 * pt.c (for_each_template_parm): Use first_rtl_op.
7758
7759 * tree.c (build_cplus_array_type_1): Also check index_type for
7760 template parms.
7761
7762 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
7763
7764 * pt.c (tsubst): Always copy BINFO_BASETYPES.
7765
7766 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
7767
7768 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
7769 TYPE_SIZE_UNIT too.
7770
7771 1998-05-29 Mark Mitchell <mark@markmitchell.com>
7772
7773 * decl.c (grokdeclarator): Don't complain about in-class
7774 initialization of static consts if we don't really know the type
7775 of the variable.
7776
7777 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
7778
7779 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
7780 * method.c (build_destructor_name): New fn.
7781 * decl2.c (maybe_retrofit_in_chrg): Split out...
7782 (grokclassfn): From here. Reorganize.
7783 * decl.c (grok_ctor_properties): Make sure ctors for types with
7784 vbases have the in_chrg parm.
7785 * pt.c (instantiate_class_template): Update
7786 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
7787 grok_*_properties.
7788 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
7789
7790 1998-05-28 Mark Mitchell <mark@markmitchell.com>
7791
7792 * pt.c (instantiate_decl): Make test for whether or not static
7793 variables should be instantiated early match its comment.
7794
7795 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
7796
7797 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
7798 a member.
7799 (start_function): Call check_default_args.
7800 * decl2.c (grokfield): Don't call check_default_args.
7801 (check_default_args): Use cp_error_at.
7802 * lex.c (do_pending_defargs): Call check_default_args.
7803
7804 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
7805
7806 * call.c (build_method_call): Make sure get_type_value returns
7807 something before we try to use its TYPE_MAIN_VARIANT.
7808 (build_scoped_method_call): Likewise.
7809
7810 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
7811
7812 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
7813 initialize an array.
7814
7815 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
7816 DECL_VIRTUAL_P.
7817
7818 * friend.c (do_friend): Clarify template warning.
7819
7820 1998-05-27 Mark Mitchell <mark@markmitchell.com>
7821
7822 * decl.c (shadow_label): Don't treat decls as identifiers.
7823 (maybe_push_to_top_level): Clear shadowed_labels.
7824
7825 * pt.c (instantiate_decl): Reset lineno and filename after calling
7826 regenerate_decl_from_template.
7827
7828 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
7829 error_mark_node.
7830
7831 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
7832
7833 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
7834
7835 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7836
7837 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
7838 (convert_nontype_argument): Handle cases when nontype template
7839 parameters become classes after substitution.
7840
7841 1998-05-26 Mark Mitchell <mark@markmitchell.com>
7842
7843 * friend.c (is_friend): Use comptypes, rather than == to compare
7844 types. Modify for new representation of template friends.
7845 (make_friend_class): Likewise.
7846 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
7847 (instantiate_class_template): Deal with template friends.
7848
7849 * decl.c (store_parm_decls): Remove redundant call to
7850 expand_main_function.
7851
7852 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
7853
7854 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
7855 DECL_USE_TEMPLATE.
7856
7857 1998-05-26 Per Bothner <bothner@cygnus.com>
7858
7859 * language_as_string: Handle lang_java.
7860
7861 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
7862
7863 * decl.c (pushdecl): Don't copy the type_decl.
7864
7865 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7866
7867 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
7868 current_class_type.
7869 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
7870
7871 * parse.y (complex_direct_notype_declarator): Use $1 to access
7872 scope of notype_qualified_id.
7873
7874 1998-05-26 Dave Brolley <brolley@cygnus.com>
7875
7876 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
7877 (init_parse): Initialize cpplib interface.
7878
7879 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
7880 empty continuation.
7881
7882 1998-05-26 Mark Mitchell <mark@markmitchell.com>
7883
7884 * decl.c (pushtag): Avoid crashing on erroneous input.
7885
7886 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7887
7888 * decl.c (push_namespace): Only produce one unique name for
7889 anonymous namespaces.
7890 (get_unique_name): Remove.
7891
7892 1998-05-25 Mark Mitchell <mark@markmitchell.com>
7893
7894 * call.c (tourney): Don't do any extra comparisons.
7895
7896 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
7897
7898 * cp-tree.h (processing_template_parmlist): Declare.
7899 * decl.c (pushtag): Don't call push_template_decl when we
7900 shouldn't.
7901 * pt.c (processing_template_parmlist): New variable.
7902 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
7903 (complete_template_args): Use it.
7904 (add_to_template_args): Likewise.
7905 (innermost_args): Likewise.
7906 (tsubst): Likewise.
7907 (begin_template_parm_list): Use processing_template_parmlist.
7908 (end_template_parm_list): Likewise.
7909
7910 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
7911 * decl.c (grokdeclarator): Use it.
7912 * decl2.c (grok_x_components): Likewise.
7913 * init.c (initializing_context): Likewise.
7914 * method.c (do_build_copy_constructor): Likewise.
7915 (do_build_assign_ref): Likewise.
7916 * search.c (compute_access): Likewise.
7917 * typeck.c (build_component_ref): Likewise.
7918
7919 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
7920 unnamed type a typedef name "for linkage purposes".
7921
7922 * pt.c (lookup_template_class): Don't look at
7923 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
7924
7925 * method.c (build_overload_int): Handle error cases gracefully.
7926
7927 * pt.c (instantiate_decl): Handle static member variables
7928 correctly.
7929
7930 * pt.c (tsubst): Use the tsubst'd type when producing new
7931 TEMPLATE_PARM_INDEX nodes.
7932
7933 1998-05-24 Mark Mitchell <mark@markmitchell.com>
7934
7935 * tree.c (cp_tree_equal): Handle pointers to member functions.
7936
7937 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
7938 sure the type of the REF_BIND is a reference type.
7939 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
7940 target_type for clarity.
7941
7942 * parse.y (xcond): Move call to condition_conversion ...
7943 * semantics.c (finish_for_cond): Here.
7944 * parse.c: Regenerated.
7945
7946 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
7947
7948 * decl.c (push_namespace): Namespaces have type void.
7949 * typeck2.c (incomplete_type_error): Complain about namespace
7950 used as expression.
7951 * typeck.c (decay_conversion): Likewise.
7952
7953 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
7954
7955 * error.c (dump_expr): Support namespaces.
7956
7957 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
7958
7959 * cp-tree.def: Add SRCLOC.
7960 * cp-tree.h: Add struct tree_srcloc and accessor macros.
7961 * tree.c (build_srcloc, build_srcloc_here): New fns.
7962 * pt.c (add_pending_template): Use build_srcloc_here.
7963 (push_tinst_level): Update last_template_error_tick before erroring.
7964 (instantiate_decl): Restore lineno and input_filename before
7965 calling add_pending_template.
7966 * decl2.c (finish_file): Set up lineno and input_filename for
7967 pending templates.
7968
7969 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
7970
7971 * decl.c (lang_print_error_function): New fn.
7972 (init_decl_processing): Set print_error_function to use it.
7973 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
7974
7975 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
7976 ICS_BAD_FLAG.
7977
7978 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
7979 copy-initialization.
7980
7981 * class.c (build_vtable_entry): Use int_fits_type_p.
7982 (build_vtable): Pass a signed offset to build_vtable_entry.
7983 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
7984 set_rtti_entry): Likewise.
7985
7986 1998-05-22 Per Bothner <bothner@cygnus.com>
7987
7988 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
7989 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
7990
7991 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
7992
7993 * pt.c (print_template_context): Use fprintf instead of cp_error.
7994
7995 * pt.c (determine_specialization): Just return an error_mark_node.
7996 Also print the decl we want in error messages. If we complain,
7997 return error_mark_node.
7998 (tsubst_friend_function): Set lineno and input_filename so
7999 error messages will be useful.
8000 (instantiate_template): Just return an error_mark_node.
8001 (check_explicit_specialization): Don't mess with a returned
8002 error_mark_node.
8003
8004 * pt.c (print_template_context): Add new argument.
8005 (maybe_print_template_context): New fn.
8006 (push_tinst_level): Increment tinst_level_tick.
8007 (pop_tinst_level): Likewise.
8008 * errfn.c (cp_thing): Call maybe_print_template_context. Use
8009 xrealloc instead of xmalloc.
8010
8011 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
8012
8013 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
8014
8015 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
8016 if the template we looked up is the same as the one we already
8017 have.
8018
8019 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
8020
8021 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
8022 (cpp_reader,parse_in): Add for cpplib.
8023 (check_newline): Call handle_sysv_pragma with new interface.
8024 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
8025
8026 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
8027 (sub_getch): Call GETC for cpplib.
8028
8029 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
8030 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
8031
8032 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
8033
8034 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
8035
8036 * decl2.c (maybe_make_one_only): New fn.
8037 (import_export_vtable): Use it.
8038 (import_export_decl): Likewise.
8039 * pt.c (mark_decl_instantiated): Likewise.
8040
8041 1998-05-21 Mark Mitchell <mmitchell@usa.net>
8042
8043 * decl2.c (find_representative_member): Rename to ...
8044 (build_anon_union_vars): New function.
8045 (finish_anon_union): Fix stupidity of previous change.
8046
8047 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
8048
8049 * decl.c (grokfndecl): Handle definition of specialization in
8050 friend declaration.
8051
8052 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
8053
8054 1998-05-20 Mark Mitchell <mmitchell@usa.net>
8055
8056 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
8057 to look for type declarations.
8058 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
8059 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
8060 (finish_member_class_template): Declare.
8061 * decl.c (pushtag): Put member class templates on the
8062 CLASSTYPE_TAGS list, just as for ordinary member classes.
8063 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
8064 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
8065 IDENTIFIER_NAMESPACE_VALUEs.
8066 * parse.y (component_decl): Move code to ...
8067 * semantics.c (finish_member_class_template): New function.
8068 Don't put member class templates on the list of components for a
8069 class.
8070 * parse.c: Regenerated.
8071 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
8072 In fact, don't use DECL_CONTEXT at all here.
8073
8074 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
8075
8076 * decl.c (record_unknown_type): New function.
8077 (init_decl_processing): Call it for the unknown and global type
8078 nodes.
8079
8080 1998-05-20 Mark Mitchell <mmitchell@usa.net>
8081
8082 * decl2.c (find_representative_member): New function.
8083 (finish_anon_union): Use it.
8084
8085 * cp-tree.h (MAIN_NAME_P): New macro.
8086 (DECL_MAIN_P): Likwise.
8087 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
8088 (grokfndecl): Use the new macros.
8089 (grokdeclarator): Likewise.
8090 (start_function): Likewise.
8091 (store_parm_decls): Likewise.
8092 (finsh_function): Likewise.
8093 * friend.c (do_friend): Likewise.
8094 * typeck.c (build_function_call_real): Likewise.
8095 (build_unary_op): Likewise.
8096
8097 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
8098
8099 * decl2.c (start_objects, finish_objects, do_dtors,
8100 do_ctors): Split out from...
8101 (finish_file): ...here.
8102
8103 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
8104
8105 * tree.c (is_overloaded_fn): Don't abort on placeholders from
8106 push_class_decls.
8107
8108 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
8109
8110 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
8111
8112 * error.c (dump_expr): Handle an ARROW_EXPR.
8113
8114 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
8115
8116 * decl.c (saveable_obstack): Declare.
8117 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
8118 declare, if necessary.
8119
8120 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
8121
8122 * call.c (compare_qual): Remove.
8123 (is_subseq): Tweak.
8124 (is_properly_derived_from): New function.
8125 (maybe_handle_ref_bind): Likewise.
8126 (maybe_handle_implicit_object): Likewise.
8127 (compare_ics): Modify substantially to bring into conformance with
8128 the standard.
8129 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
8130 (comp_cv_qualification): Declare.
8131 (comp_cv_qual_signature): Likewise.
8132 * typeck.c (comp_cv_qualification): Likewise.
8133 (comp_cv_qual_signature): Likewise.
8134
8135 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8136
8137 * Makefile.in (parse.o): Depend on toplev.h.
8138
8139 * class.c (typecode_p): Remove prototype and definition.
8140
8141 * cp-tree.h (currently_open_class, is_empty_class, member_p):
8142 Add prototype.
8143
8144 * decl.c (push_overloaded_decl_top_level): Remove prototype and
8145 definition.
8146
8147 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
8148 in call to `cp_thing'.
8149 (cp_warning): Likewise for function pointer `warning'.
8150
8151 * except.c (do_function_call): Remove prototype and definition.
8152 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
8153
8154 * method.c (is_java_type): Add prototype and make it static.
8155
8156 * parse.y: Include toplev.h.
8157
8158 * pt.c (type_unification): Remove unused variable `arg'.
8159 (instantiate_decl): Likewise for `save_ti'.
8160
8161 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
8162
8163 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
8164
8165 * init.c (build_member_call): Handle template_ids.
8166 * parse.y (primary): Add global_scope template_id.
8167
8168 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
8169
8170 * decl2.c (get_sentry): Use end_temporary_allocation.
8171 Don't declare permanent_obstack.
8172
8173 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
8174
8175 * parse.y (.finish_new_placement): New non-terminal.
8176 (unary_expr, new_type_id): Use it.
8177 * parse.c: Regenerated.
8178
8179 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
8180
8181 * pt.c (redeclare_class_template): Say where the original definition
8182 of the template-parameter's default argument appeared.
8183
8184 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
8185
8186 * call.c (build_over_call): Tweak empty class handling.
8187
8188 * decl.c (make_typename_type): Use currently_open_class.
8189
8190 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
8191
8192 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8193
8194 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
8195 for a type unless it is one.
8196
8197 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
8198
8199 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
8200
8201 * Makefile.in (program_transform_name, objdir): Define.
8202
8203 * Makefile.in (BISON): Use bison from the build tree if it exists.
8204 (FLEX): Likewise.
8205
8206 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8207
8208 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
8209
8210 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
8211
8212 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
8213
8214 * call.c (build_scoped_method_call): Likewise.
8215
8216 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
8217
8218 * init.c (build_new_1): Call suspend_momentary around the creation
8219 of values that must be saved for exception handling.
8220 * parse.y (.build_new_placement): New non-terminal.
8221 (unary_expr, new_placement): Use it.
8222 * parse.c: Regenerated.
8223
8224 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
8225
8226 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
8227 old and new types.
8228
8229 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
8230 canonical type.
8231
8232 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
8233
8234 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
8235
8236 * decl.c (start_decl): Revert problem change.
8237
8238 * Makefile.in (CONFLICTS): Fix.
8239
8240 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8241
8242 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
8243
8244 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
8245
8246 * class.c (finish_struct_1): Use BINFO_SIZE.
8247
8248 * decl.c (start_decl): Use 'tem'.
8249
8250 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
8251
8252 * exception.cc: Include eh-common.h.
8253 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
8254 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
8255 (__cp_push_exception): Initialize eh_info struct as well.
8256 * except.c: Remove local structs and include eh-common.h.
8257 (init_exception_processing): Set language and version codes.
8258 (call_eh_info): Add presence of eh_info to runtime description of
8259 struct cp_eh_info.
8260 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
8261 * semantics.c (finish_try_block): Call start_catch_block() and
8262 end_catch_block().
8263 * parse.y (function_try_block): Call start_catch_block() and
8264 end_catch_block().
8265
8266 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
8267
8268 * typeck.c (original_type): New function.
8269 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
8270 to see if they're actually the same.
8271 * cp-tree.h (original_type): Declare.
8272
8273 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8274
8275 * Makefile.in (lex.o): Depend on output.h.
8276
8277 * call.c (add_function_candidate): Remove unused variable `cand'.
8278 (add_conv_candidate): Likewise.
8279 (build_builtin_candidate): Likewise.
8280
8281 * cp-tree.h: Add prototype for `types_overlap_p'.
8282
8283 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
8284
8285 * decl2.c (merge_functions): Remove unused variables `tmp' and
8286 `tempn'.
8287
8288 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
8289 (code_as_string): Likewise.
8290 (language_as_string): Likewise.
8291 (parm_as_string): Likewise.
8292 (op_as_string): Likewise.
8293 (assop_as_string): Likewise.
8294 (cv_as_string): Likewise.
8295
8296 * lex.c: Include output.h.
8297
8298 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
8299
8300 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
8301 ATTRIBUTE_UNUSED.
8302
8303 * tinfo.cc (__class_type_info::dcast): Change the type of variable
8304 `i' from int to size_t.
8305
8306 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
8307 ATTRIBUTE_UNUSED.
8308
8309 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
8310
8311 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
8312 DECL_NAMESPACE_SCOPE_P.
8313 (lang_decl_name): Likewise.
8314 * pt.c (tsubst_friend_function, tsubst): Likewise.
8315 * decl.c (pushdecl, redeclaration_error_message, start_decl,
8316 cp_finish_decl, start_function): Likewise.
8317 * class.c (finish_struct_1): Likewise.
8318 * call.c (build_over_call): Likewise.
8319 (compare_ics): Use DERIVED_FROM_P.
8320
8321 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
8322
8323 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
8324 * method.c (build_mangled_name): Use it.
8325 (build_decl_overload_real): Likewise.
8326
8327 * error.c (dump_simple_decl): New function, broken out from ...
8328 (dump_decl): Use it.
8329
8330 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
8331
8332 * ptree.c (lang_print_xnode): Add missing `break'.
8333
8334 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
8335
8336 * call.c (add_template_candidate): Adjust for changes to
8337 fn_type_unification.
8338 (add_template_candidate_real): Likewise.
8339 (add_template_conv_candidate): Likewise.
8340 (build_user_type_conversion_1): Likewise.
8341 (build_new_function_call): Likewise.
8342 (build_object_call): Likewise.
8343 (build_new_op): Likewise.
8344 (build_new_method_call): Likewise.
8345 * class.c (instantiate_type): Likewise.
8346 * cp-tree.h (unification_kind_t): New type.
8347 (fn_type_unification): Adjust prototype.
8348 (type_unificaiton): Likewise.
8349 * pt.c (UNIFY_ALLOW_NONE): New macro.
8350 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
8351 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
8352 (UNIFY_ALLOW_DERIVED): Likewise.
8353 (unify): Change prototype.
8354 (maybe_adjust_types_for_deduction): New function.
8355 (check_cv_quals_for_unify): Likewise.
8356 (determine_specialization): Adjust.
8357 (fn_type_unification): Likewise.
8358 (type_unification): Likewise.
8359 (type_unification_real): Likewise. Use
8360 maybe_adjust_types_for_deduction. Fix mishandling of
8361 back-unification of template functions passed as arguments. Pass
8362 appropriate combination of UNIFY_ALLOW_* to unify.
8363 (unify): Remove unused NTPARMS parameter. Use
8364 check_cv_quals_for_unify. Remove bogus code that allowed
8365 too-generous unification in order to adhere more closely to standard.
8366 (get_bindings_real): Adjust.
8367 (get_class_bindings): Likewise.
8368
8369 * method.c (build_overload_identifier): Only use the innermost
8370 template arguments when mangling.
8371 * pt.c (tsubst_template_argument_vector): New function.
8372 (complete_template_args): Deal with the situation where the
8373 extra_args contain more than one level of arguments.
8374 (lookup_template_class): Deal with member template classes, which
8375 may have more than one level of arguments.
8376 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
8377 Improve handling of member template classes. Use
8378 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
8379 tsubst_template_argument_vector where appropriate.
8380 (regenerate_decl_from_template): Break out from ...
8381 (instantiate_decl): Here.
8382
8383 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
8384 * parse.h: Regenerated.
8385 * parse.c: Really regenerated.
8386
8387 * cp-tree.h (finish_unary_op_expr): New function.
8388 (finish_id_expr): Likewise.
8389 (begin_new_placement): Likewise.
8390 (finish_new_placement): Likewise.
8391 (finish_declarator): Likewise.
8392 (finish_translation_unit): Likewise.
8393 (finish_parmlist): Likewise.
8394 (begin_class_definition): Likewise.
8395 (finish_class_definition): Likewise.
8396 (finish_default_args): Likewise.
8397 (finish_inline_definitions): Likewise.
8398 * parse.y (GCC_ASM_KEYWORD): Remove.
8399 (TYPENAME_ELLIPSIS): Likewise.
8400 * parse.c: Regenerated.
8401 Use new functions in semantics.c in the actions for many rules.
8402 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
8403 * hash.h: Regenerated.
8404 * semantics.c (finish_expr_stmt): Allow NULL expr.
8405 (finish_unary_op_expr): New function, containing
8406 code previously in parse.y.
8407 (finish_id_expr): Likewise.
8408 (begin_new_placement): Likewise.
8409 (finish_new_placement): Likewise.
8410 (finish_declarator): Likewise.
8411 (finish_translation_unit): Likewise.
8412 (finish_parmlist): Likewise.
8413 (begin_class_definition): Likewise.
8414 (finish_class_definition): Likewise.
8415 (finish_default_args): Likewise.
8416 (finish_inline_definitions): Likewise.
8417
8418 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
8419
8420 * typeck.c (build_c_cast): Don't decay arrays and functions to
8421 pointer type when converting to a class type.
8422
8423 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
8424
8425 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
8426 (DECL_CLASS_SCOPE_P): Likewise.
8427
8428 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
8429
8430 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
8431 * decl2.c (constructor_name_full): Likewise.
8432
8433 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
8434
8435 * tree.c (mapcar): Add OVERLOAD support.
8436
8437 * init.c (resolve_offset_ref): We must use basetype_path before we
8438 destroy it with a call to convert_pointer_to.
8439
8440 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
8441
8442 * class.c (currently_open_class): New fn.
8443 * decl.c (lookup_name_real): Use it.
8444 * search.c (lookup_field): Likewise.
8445
8446 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
8447
8448 * cp-tree.def (OVERLOAD): New node.
8449 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
8450 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
8451 (NAMESPACE_BINDING): Remove.
8452 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
8453 namespace_binding.
8454 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
8455 Define.
8456 (tree_overload): New struct.
8457 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
8458 (REAL_IDENTIFIER_TYPE_VALUE): Define.
8459 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
8460 (lang_decl_flags): Remove in_namespace.
8461 (lang_decl): Remove chain.
8462 (DECL_CHAIN, DECL_NAMESPACE): Remove.
8463 (flag_honor_std): Declare extern.
8464 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
8465 namespace_binding, set_namespace_binding,
8466 lookup_function_nonclass, cat_namespace_levels,
8467 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
8468 scratch_ovl_cons, ovl_member, build_overload): Declare.
8469 (decl_list_length, get_namespace_id, current_namespace_id,
8470 overloaded_globals_p): Remove.
8471 (lookup_using_namespace, qualified_lookup_using_namespace): Change
8472 return type.
8473 (push_scratch_obstack): New macro.
8474 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
8475 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
8476 convs, fns.
8477 (build_new_function_call): Iterate using OVL_CHAIN.
8478 Print DECL_NAME in when reporting ambiguities.
8479 (build_object_call): Iterate using OVL_NEXT for fns, convs.
8480 (build_new_op): Call lookup_function_nonclass.
8481 Iterate using OVL_NEXT.
8482 (build_op_delete_call): Change detection of members.
8483 Do not wrap TREE_LIST around fields and single global functions.
8484 (build_over_call): Don't push a class level if the context is a
8485 namespace.
8486 (build_new_method_call): Iterate using OVL_NEXT.
8487 * class.c (add_method): Chain overloaded members using
8488 build_overload. Remove copying of method.
8489 (grow_method): When iterating through the obstack, expect OVERLOAD
8490 nodes. Chain overload members.
8491 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
8492 nodes in call to get_baselinks.
8493 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
8494 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
8495 fdecls that are OVERLOAD nodes.
8496 (validate_lhs): New function.
8497 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
8498 code. Use DECL_NAME in error messages. Split code between global
8499 and member function processing.
8500 * decl.c (global_type_node): New static variable.
8501 (in_std): New global.
8502 (struct binding_level): New field usings.
8503 (resume_binding_level): Assert that we are not in a class.
8504 (toplevel_bindings_p): Just check for namespace_p or
8505 pseudo_global.
8506 (resume_level): Remove.
8507 (find_binding): New function.
8508 (binding_for_name): Call it.
8509 (namespace_binding, set_namespace_binding): New functions.
8510 (push_namespace): Associate binding level with new namespace,
8511 resume_binding_level for existing namespace. Remove old code.
8512 Fake std by counting.
8513 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
8514 (maybe_push_to_top_level): Save current namespace.
8515 (pop_from_top_level): Restore saved namespace.
8516 (pop_namespace): Call suspend_binding_level. Remove old code.
8517 (cat_namespace_levels): New function.
8518 (set_identifier_type_value_with_scope): For namespace bindings,
8519 set BINDING_TYPE, and use global_type_node.
8520 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
8521 (identifier_type_value): New function.
8522 (pushtag): If no context, use current_namespace.
8523 (duplicate_decls): Don't process DECL_CHAIN.
8524 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
8525 already set. Never reset it to NULL_TREE. Lookup global variables
8526 in their namespace. Push overloaded templates if they are on
8527 namespace level.
8528 (pushdecl_namespace_level): New function.
8529 (pushdecl_top_level): Implement using pushdecl_namespace_level.
8530 (pushdecl_using_decl): New function.
8531 (overloaded_globals_p): Remove.
8532 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
8533 them. Use namespace_binding and set_namespace_value.
8534 (redeclaration_error_message): Complain if the declarations come
8535 from different namespaces.
8536 (lookup_tag): On namespace level, look in the BINDING_TYPE.
8537 (lookup_namespace_name): Pass tree_bindings from stack. Remove
8538 old code.
8539 (select_decl): New function.
8540 (lookup_name_real): Call it for qualified and unqualified lookup.
8541 Pass tree_bindings from the stack.
8542 If prefer_type is 1, also accept namespaces.
8543 (lookup_function_nonclass): New function.
8544 (init_decl_processing): Set the binding level of the global
8545 namespace to global_binding_level.
8546 Build a proper type list for __builtin_apply.
8547 Initialize std_node to "fake std" if flag_honor_std is set.
8548 Initialize global_type_node.
8549 Allocated bad_alloc in namespace std if flag_honor_std.
8550 (define_function): Set the DECL_CONTEXT to the current_namespace.
8551 (start_decl): A namespace is not considered as a context here. If
8552 the DECL_CONTEXT is a namespace, push the decl.
8553 (cp_finish_decl): Check for namespaces used as initializers.
8554 (grokfndecl): Add namespace parameter. Remove processing of
8555 DECL_CHAIN.
8556 (grokvardecl): Add namespace parameter.
8557 (grokdeclarator): Process SCOPEs that are namespaces. For
8558 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
8559 (start_function): Check for contexts that are namespaces.
8560 Set context for declarations that have not been pushed.
8561 (store_parm_decls): Check for ::main only.
8562 (finish_function): Likewise.
8563 (start_method): Check for contexts that are namespaces.
8564 (start_method): Remove DECL_CHAIN processing.
8565 * decl2.c (flag_honor_std): Declare.
8566 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
8567 (decl_namespace_list): New static global.
8568 (grok_x_components): Ignore namespaces as type contexts.
8569 (check_classfn): Expect OVERLOAD nodes.
8570 (grokfield): Remove DECL_CHAIN processing.
8571 (finish_file): Call cat_namespace_levels.
8572 (merge_functions): New function.
8573 (ambiguous_decl): Rewrite.
8574 (lookup_using_namespace): Produce tree_bindings.
8575 (qualified_lookup_using_namespace): Likewise.
8576 (set_decl_namespace, decl_namespace, current_decl_namespace,
8577 push_decl_namespace, pop_decl_namespace): New functions.
8578 (arg_lookup): New struct.
8579 (add_function, arg_assoc_namespace, arg_assoc_class,
8580 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
8581 New functions.
8582 (get_namespace_id, current_namespace_id): Remove.
8583 (do_toplevel_using_decl): Rewrite.
8584 (do_class_using_decl): Complain about namespace qualifiers.
8585 (do_using_directive): Sorry if not on namespace level. Complain
8586 about unknown namespaces.
8587 * error.c (dump_aggr_type): Check for namespace contexts.
8588 * except.c (init_exception_processing): Push terminate into std.
8589 * friend.c (is_friend): A namespace is not a context, here.
8590 * init.c (expand_member_init): Remove DECL_CHAIN processing.
8591 (build_offset_ref): Process OVERLOAD nodes.
8592 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
8593 * lex.c (identifier_type): Loop using OVL_CHAIN.
8594 (see_typename): Set looking_for_typename to 2.
8595 (real_yylex): Likewise.
8596 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
8597 (do_scoped_id): Expect OVERLOAD nodes.
8598 Change calling convention for qualified_lookup_using_namespace.
8599 (build_lang_decl): Don't set in_namespace anymore.
8600 * method.c (typevec_size): New global.
8601 (build_overload_nested_name): Return if global_namespace.
8602 Otherwise, always expect a declaration context.
8603 (build_qualified_name): Likewise.
8604 Make sure we don't write beyond typevec_size.
8605 (build_decl_overload_real): Likewise.
8606 Allocate one extra slot for the namespace.
8607 (hack_identifier): Mark code dead.
8608 Process OVERLOAD and NAMESPACE_DECL nodes.
8609 * parse.y (program): Pop namespaces until in global namespace.
8610 (extdef): In a using-declaration, don't discard the identifier if
8611 there is no declaration.
8612 (left_curly): Ignore type contexts which are namespaces.
8613 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
8614 used as scope.
8615 * pt.c (template_class_depth): Expect types to be namespaces.
8616 (determine_specialization): Simplify by expecting OVERLOAD nodes.
8617 (push_template_decl): Push into namespace level.
8618 Reset ctx if it is a namespace.
8619 Set DECL_CONTEXT to current_namespace if not set already.
8620 Ignore real contexts that are namespaces.
8621 (mangle_class_name_for_template): Skip global_namespace.
8622 Mangle other namespaces as declarations.
8623 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
8624 (lookup_template_class): Push into namespace of context.
8625 If the context is a namespace, set it to global_namespace.
8626 Use id_context for mangling.
8627 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
8628 (tsubst_friend_function): Ignore namespace contexts.
8629 Push into namespace level.
8630 (tsubst): Handle NAMESPACE_DECL nodes.
8631 Remove DECL_CHAIN processing.
8632 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
8633 * ptree.c (print_lang_identifier): Print bindings.
8634 (lang_print_xnode): Print OVERLOAD nodes.
8635 * rtti.c (init_rtti_processing): Push type_info into std.
8636 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
8637 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
8638 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
8639 lookup_fnfields_here): Likewise.
8640 Process all nodes, instead of going through TREE_CHAIN.
8641 * sig.c (build_signature_pointer_or_reference_type): Set context
8642 to global_namespace.
8643 (build_signature_table_constructor): Expect OVERLOAD nodes.
8644 * spew.c (yylex): Save old setting of looking_for_typename.
8645 * tree.c (decl_list_length): Remove.
8646 (binding_init): New function.
8647 (count_functions): Rewrite.
8648 (is_overloaded_fn): Expect OVERLOAD nodes.
8649 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
8650 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
8651 ovl_member): New functions.
8652 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
8653 (type_unknown_p): Likewise.
8654 (require_instantiated_type): Likewise.
8655 (build_component_ref): Declare code dead.
8656 (build_x_function_call): Create and expect OVERLOAD nodes.
8657 (build_function_call_real): Check for ::main only.
8658 (build_unary_op): Likewise. Expect OVERLOAD nodes.
8659 (convert_for_assignment): Check for TREE_LIST before accessing
8660 TREE_VALUE.
8661 * decl.c (duplicate_decls): Check for namespace bindings instead
8662 of global bindings.
8663 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
8664 lookup_name_current_level, start_decl, xref_tag,
8665 finish_enum): Likewise.
8666 * init.c (build_offset_ref): Likewise.
8667 * search.c (lookup_field): Likewise.
8668 (lookup_fnfields): Likewise.
8669 (dfs_debug_mark): Likewise.
8670 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
8671 (poplevel_class, pop_from_top_level): Likewise.
8672 * decl2.c (finish_method): Likewise.
8673 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
8674 * decl.c (record_builtin_type): Likewise.
8675 (init_decl_processing, grokfndecl): Likewise.
8676 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
8677 (make_lang_type): Likewise.
8678 * parse.y (make_thunk): Likewise.
8679 * pt.c (tsubst): Likewise.
8680 * tree.c (debug_binfo): Likewise.
8681 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
8682 tinfo2.cc, inc/new.h: Add std qualifications.
8683 * inc/new: Wrap with namespace std if __HONOR_STD.
8684 * inc/typeinfo: Likewise.
8685
8686 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
8687
8688 * call.c (build_user_type_conversion_1): Handle second_conv
8689 properly for templates.
8690
8691 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
8692
8693 * method.c (build_decl_overload_real): Set TREE_USED flag to
8694 zero for build_type_variants nodes as well.
8695
8696 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
8697
8698 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
8699
8700 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
8701
8702 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
8703 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
8704 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
8705 xref.o): Add toplev.h dependencies.
8706
8707 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
8708
8709 * errfn.c (cp_error, cp_warning): Remove declarations for
8710 error and warning respectively.
8711
8712 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8713
8714 * error.c: Convert to using ctype macros defined in system.h.
8715 * method.c: Likewise.
8716 * xref.c: Likewise.
8717 * lex.c: Likewise. Also remove redundant system header stuff.
8718
8719 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
8720
8721 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
8722 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
8723 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
8724 xref.c: Add include of toplev.h.
8725
8726 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
8727
8728 * tree.c (perm_manip): Also regenerate the RTL of an extern.
8729 (copy_to_permanent): Use end_temporary_allocation.
8730
8731 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
8732
8733 * init.c (expand_vec_init): The initialization of each array
8734 element is a full-expression.
8735
8736 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
8737
8738 * method.c (build_mangled_name): Add a call to build_type_variant
8739 to get the right type.
8740
8741 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
8742
8743 * Makefile.in: Add .SUFFIXES.
8744
8745 * cp-tree.def: Remove NAMESPACE_DECL.
8746
8747 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
8748
8749 * call.c (build_over_call): Do evaluate arg even if it has empty
8750 class type.
8751 * decl.c (start_function): Don't push a member function.
8752
8753 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
8754
8755 * Makefile.in (g++FAQ.info): Put -o option before input file.
8756
8757 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
8758
8759 * gxxint.texi: Add info for squangling codes K and B.
8760
8761 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
8762
8763 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
8764 the expression in templates.
8765 (finish_stmt_expr): Likewise.
8766
8767 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
8768
8769 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
8770
8771 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
8772
8773 * decl.c (maybe_push_to_top_level): Always clear
8774 current_template_parms and processing_template_decl.
8775 (pushtag): Remove check of current_class_type and some comments,
8776 since maybe_push_to_top_level no longer creates confusion.
8777
8778 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
8779
8780 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
8781 (DECL_CLASS_TEMPLATE_P): Likewise.
8782 (DECL_PRIMARY_TEMPLATE): Likewise.
8783 (PRIMARY_TEMPLATE_P): Use it.
8784 (push_template_decl_real): New function.
8785 (redeclare_class_template): Take new template parameters as
8786 input.
8787 (is_specialization_of): New function.
8788 (comp_template_args): Declare.
8789 * decl.c (pushtag): Handle friend template classes.
8790 (xref_tag): Likewise. Use new calling convention for
8791 redeclare_class_template.
8792 * decl2.c (grok_x_components): Handle friend templates.
8793 * friend.c (is_friend): Use is_specialization_of where
8794 appropriate. Deal with friend class templates.
8795 (make_friend_class): Let a class template be friends with itself.
8796 * pt.c (comp_template_args): Remove declaration.
8797 (tsubst_friend_class): New function.
8798 (push_template_decl_real): New function.
8799 (push_template_decl): Use it.
8800 (redeclare_class_template): Adjust for new calling convention.
8801 (comp_template_args): Give it external linkage.
8802 (instantiate_class_type): Use tsubst_friend_class to deal
8803 with friend templates.
8804 * typeck.c (comptypes): Use comp_template_args, rather than
8805 expanding it inline.
8806 * parse.y (component_decl): Handle a nested template type
8807 like other component type declarations.
8808
8809 * pt.c (check_explicit_specialization): Handle overloaded
8810 constructors correctly.
8811
8812 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
8813 (lookup_template_class): Use it.
8814
8815 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
8816
8817 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
8818 * cp-tree.h: Add WRAPPER support.
8819 * call.c (add_candidate): Split out from add_*_candidate fns.
8820 (build_over_call): Take the candidate instead of function and args.
8821 Enforce access control here. Emit overload warnings here.
8822 (add_warning): New fn.
8823 (joust): Add WARN parm. If not set, call add_warning instead of
8824 printing a warning. Re-enable some warnings.
8825 (tourney): Pass it.
8826 (convert_like): Adjust.
8827 (build_new_op): Adjust.
8828 (build_new_function_call): Adjust.
8829 (build_user_type_conversion_1): Adjust.
8830 (USER_CONV_FN): Adjust.
8831 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
8832 build_int_wrapper): New fns.
8833
8834 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
8835
8836 * pt.c (unify): Fix typo in previous change.
8837
8838 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
8839
8840 * error.c (dump_type_real): Declare canonical_name.
8841
8842 * typeck.c (comp_target_types): Fix PMFs.
8843
8844 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
8845
8846 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
8847 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
8848 TEMPLATE_DECL.
8849
8850 * pt.c (tsubst): Decrease the template-level of
8851 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
8852 TEMPLATE_PARM_INDEX.
8853 (template_decl_level): New function.
8854 (unify): Make sure to record unifications for template
8855 parameters, even when the parameters exactly match the arguments.
8856 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
8857 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
8858 aren't from the level we're currently working on.
8859
8860 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
8861
8862 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
8863
8864 * decl2.c (check_member_template): Set DECL_IGNORED for member
8865 class templates, too.
8866
8867 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
8868
8869 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8870
8871 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
8872
8873 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
8874
8875 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
8876 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
8877 (init_decl_processing): Handle TI types.
8878 * typeck.c (unsigned_type, signed_type): Handle TI types.
8879
8880 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
8881
8882 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
8883 New local added_libraries. Increment count when add library to
8884 arglist.
8885
8886 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
8887
8888 * cp-tree.h (type_as_string_real): New function.
8889 * pt.c (mangle_class_name_for_template): Use it.
8890 * error.c (dump_aggr_type): Change prototype.
8891 (dump_type_prefix): Likewise.
8892 (dump_type_suffix): Likewise.
8893 (dump_type_real): Convert from dump_type. If desired, the
8894 "canonica" name of a typedef, i.e., the name of the underlying
8895 type, can be printed.
8896 (dump_type): Call dump_type_real.
8897
8898 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
8899
8900 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
8901
8902 * typeck.c (comp_target_types): Tweak pedantic case.
8903 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
8904 Return -1 or 1 instead of 1 or 2.
8905 (compparms): Remove STRICT handling.
8906 (convert_for_assignment): Fix handling of pmfs.
8907
8908 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
8909
8910 * typeck.c (comp_target_types): Handle references like pointers.
8911 (comp_target_parms): Note that return code from comp_target_types
8912 can be negative to indicate failure.
8913
8914 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8915
8916 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
8917 which requires a working target compiler to build.
8918
8919 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
8920
8921 * tree.c (avoid_overlap): Add prototype.
8922
8923 * spew.c (num_tokens): Add prototype.
8924 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
8925
8926 * search.c (dfs_check_overlap): Add prototype.
8927 (dfs_no_overlap_yet): Likewise.
8928
8929 * pt.c (original_template): Add prototype.
8930 (inline_needs_template_parms): Likewise.
8931 (push_inline_template_parms_recursive): Likewise.
8932 (retrieve_specialization, register_specialization): Likewise.
8933 (print_candidates, reduce_template_parm_level): Likewise.
8934 (build_template_decl, mark_template_parm): Likewise.
8935 (tsubst_friend_function, get_bindings_real): Likewise.
8936
8937 * method.c (start_squangling): Add prototype.
8938 (end_squangling, check_ktype, issue_ktype): Likewise.
8939 (build_overloaded_scope_ref, check_btype): Likewise.
8940 (build_mangled_template_parm_index): Likewise.
8941
8942 * lex.c (init_cpp_parse): Add prototype.
8943 (handle_cp_pragma, handle_sysv_pragma): Likewise.
8944 (reduce_cmp, token_cmp): Likewise.
8945
8946 * except.c (call_eh_info): Add prototype.
8947 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
8948 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
8949
8950 * decl2.c (is_namespace_ancestor): Add prototype.
8951 (namespace_ancestor, add_using_namespace): Likewise.
8952 (ambiguous_decl): Likewise.
8953
8954 * decl.c (indent): Add prototype.
8955
8956 * call.c (add_template_candidate_real): Add prototype.
8957
8958 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
8959
8960 * decl2.c (build_expr_from_tree): Just return a PMF.
8961
8962 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
8963
8964 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
8965 when doing initializations.
8966
8967 * pt.c (unify): Use comptypes to compare type args.
8968
8969 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
8970
8971 * decl.c (duplicate_decls): Fix check for when it's safe to free
8972 the new decl.
8973
8974 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
8975 to type_as_string.
8976
8977 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
8978
8979 * pt.c (build_template_parm_index): Add prototype.
8980
8981 * search.c (my_tree_cons): Don't clear words outside the
8982 newly allocated node.
8983
8984 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
8985
8986 * lex.c (init_parse): Now returns char* containing the filename.
8987
8988 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
8989 Jeff Law <law@cygnus.com>
8990
8991 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
8992 than a pointer.
8993
8994 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8995
8996 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
8997
8998 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
8999
9000 * decl.c (duplicate_decls): Don't warn for redundant decls if
9001 friend: let add_friend take care of it.
9002
9003 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9004
9005 * sig.c (build_signature_pointer_constructor): Don't set
9006 TREE_HAS_CONSTRUCTOR for a signature pointer.
9007 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
9008 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
9009 here, too.
9010 * typeck.c (build_unary_op): Only allow taking the address of a
9011 real constructor.
9012 * typeck2.c (digest_init): Simplify.
9013 (store_init_value): Don't pedwarn about using { } for pmfs.
9014
9015 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
9016
9017 * cp-tree.h (start_decl): Update prototype.
9018 * decl.c (start_decl): Like the C version, new parameters
9019 for the attributes. Call cplus_decl_attributes here,
9020 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
9021 (grokdeclarator): Pass NULL for new start_decl arguments.
9022 * pt.c (tsubst_expr): Likewise.
9023 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
9024 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
9025 * lex.c (build_lang_decl): Add lang_name_java.
9026 * class.c (push_lang_context): Add lang_name_java.
9027 * method.c (build_mangled_name): Check for is_java_type.
9028
9029 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
9030
9031 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
9032 * call.c (build_scoped_method_call): Check for TREE_CODE for
9033 VOID_TYPE instead of type == void_type_node.
9034 (build_method_call): Likewise.
9035 * decl.c (lookup_name_real): Likewise.
9036 (grokdeclarator): Likewise.
9037 (start_decl): Likewise.
9038 (grokparms): Likewise.
9039 (start_function): Likewise.
9040 (finish_function): Likewise.
9041 (start_method): Likewise.
9042
9043 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
9044
9045 * lex.c (finput): New variable.
9046 (init_cpp_parse): Renamed from init_parse.
9047 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
9048 (finish_parse): New function.
9049 * cp-tree.h (init_lex, init_parse): Remove declarations.
9050
9051 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
9052
9053 * call.c (build_call): Still evaluate the actual argument.
9054 * class.c (is_empty_class): Update for -fnew-abi.
9055
9056 * decl2.c: -fnew-abi implies -fsquangle.
9057
9058 * method.c (do_build_assign_ref): Don't do anything to copy
9059 an empty class.
9060 (do_build_copy_constructor): Likewise.
9061 * call.c (build_over_call): Likewise.
9062
9063 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9064
9065 * tree.c (avoid_overlap): Return a value.
9066
9067 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
9068
9069 * method.c (check_btype): Add missing argument to xrealloc.
9070 (check_ktype): Likewise.
9071
9072 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9073
9074 Implement empty base optimization.
9075 * class.c (finish_struct_1): Add vbase fields earlier. Set
9076 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
9077 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
9078 (types_overlap_p): New fn.
9079 * tree.c (avoid_overlap): New fn.
9080 (build_base_fields): Use it to avoid overlapping empty bases.
9081 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
9082
9083 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
9084
9085 Re-implement allocation of base class subobjects.
9086 * tree.c (unshare_base_binfos): New fn.
9087 (layout_basetypes): Use it. Now handles offsets of both virtual and
9088 non-virtual bases, after layout_type.
9089 (layout_vbasetypes): Remove.
9090 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
9091 (build_vbase_pointer_fields): Split out from old layout_basetypes.
9092 * class.c (finish_base_struct): Lose offset handling code.
9093 Move nonvdtor warning here. Don't mess with t_binfo anymore.
9094 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
9095 * cp-tree.h: Adjust.
9096
9097 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
9098
9099 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
9100 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
9101 * class.c (duplicate_tag_error): Likewise.
9102 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
9103 * tree.c (layout_vbasetypes): Update from layout_record, remove
9104 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
9105 (layout_basetypes): Likewise.
9106
9107 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
9108
9109 * class.c, Make sure system.h is included just after config.h.
9110 Delete lingering stdio and errno references too.
9111 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
9112
9113 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
9114
9115 * friend.c (is_friend): Fix access control for local classes.
9116
9117 * class.c (is_empty_class): New fn.
9118 * call.c (build_call): Don't pass empty class objects to a function.
9119
9120 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
9121
9122 * call.c (build_over_call): Do name resolution for default
9123 arguments of function templates in the scope of the templates.
9124
9125 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
9126
9127 * call.c: Include system.h. Remove includes, declarations and
9128 defines provided by system.h.
9129 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
9130 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
9131 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
9132 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
9133 * typeck2.c, xref.c: Likewise.
9134 * Makefile.in: Dependencies updated as appropriate.
9135 * Make-lang.in: Likewise.
9136
9137 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
9138
9139 * pt.c (fn_type_unification): Allow incomplete unification without
9140 an immediate error message.
9141
9142 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
9143
9144 * tree.c (member_p): New fn.
9145 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
9146 initializing class members.
9147
9148 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
9149 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
9150
9151 * call.c (build_method_call): Handle non-scoped destructors, too.
9152 * pt.c (tsubst_copy): Likewise.
9153
9154 * pt.c (print_template_context): Split out...
9155 (push_tinst_level): ...from here.
9156
9157 * friend.c (is_friend): Don't pass a type to decl_function_context.
9158
9159 * typeck.c (convert_for_initialization): Always hand off
9160 conversions to class type.
9161
9162 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9163
9164 * friend.c (is_friend): Local classes have the same access as the
9165 enclosing function.
9166
9167 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
9168
9169 * typeck.c (expand_target_expr): Delete dead function.
9170
9171 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
9172
9173 * repo.c (save_string): Delete dead function.
9174
9175 * method.c (thunk_printable_name): Delete dead function.
9176
9177 * lex.c (yynextch): Delete dead function.
9178
9179 * expr.c (tree_extract_aggr_init): #if 0 out.
9180
9181 * except.c (do_unwind): Delete dead function.
9182 (easy_expand_asm): Likewise.
9183
9184 * cvt.c (build_conversion_type_1): Delete dead function.
9185
9186 * cp-tree.h (push_expression_obstack): Declare.
9187
9188 * call.c (source_type): #if 0 out.
9189
9190 * class.c (alter_access): Remove unused label. Add braces
9191 around empty else clause.
9192
9193 * lex.c (yyprint): Fix argument to printf.
9194
9195 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
9196
9197 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
9198
9199 * pt.c (instantiate_class_template): Make sure template
9200 arguments are permanent.
9201 * init.c (resolve_offset_ref): Don't go looking around in
9202 template types.
9203
9204 * semantics.c: Add routines to handle expressions, and some
9205 declaration processing.
9206 * parse.y: Use them.
9207 (current_class_depth): Move declaration to cp-tree.h.
9208 * parse.c: Regenerated.
9209 * cp-tree.h: Use them.
9210 (current_class_depth): Declare.
9211 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
9212
9213 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
9214
9215 * error.c (dump_decl): Be a bit more explicit with template
9216 type arguments, when verbose.
9217
9218 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
9219
9220 * inc/exception: Reorder closing braces.
9221
9222 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
9223
9224 * pt.c (redeclare_class_template): New function.
9225 * cp_tree.h (redeclare_class_template): Declare it.
9226 * decl.c (xref_tag): Use it.
9227
9228 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
9229
9230 * call.c (build_over_call): Check IS_AGGR_TYPE, not
9231 TYPE_LANG_SPECIFIC.
9232 * typeck.c (convert_arguments): Likewise.
9233
9234 * decl.c (grokdeclarator): Remove const and volatile from type after
9235 setting constp and volatilep.
9236
9237 * class.c (finish_struct_1): Don't warn about bool bitfield larger
9238 than one bit.
9239
9240 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
9241
9242 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
9243
9244 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
9245
9246 * call.c (build_object_call): Complain about ambiguous operator(),
9247 rather that crashing.
9248 (build_new_op): Likewise.
9249 (build_op_delete_call): Likewise.
9250
9251 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
9252
9253 * cvt.c (perform_qualification_conversions): Use comp_target_types
9254 instead of comp_ptr_ttypes.
9255
9256 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
9257
9258 * cp-tree.h (enforce_access): Declare.
9259 * call.c (enforce_access): Make it extern, not static.
9260 * class.c (alter_access): Use enforce_access; modify code for ISO
9261 compliance, rather than ARM rules.
9262
9263 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9264
9265 * cp-tree.h: Fix typo.
9266
9267 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
9268
9269 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
9270 if (aggregate_value_p (type)).
9271
9272 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
9273
9274 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
9275
9276 * tree.c (mapcar): When dealing with a DECL, use it's constant
9277 value, if any.
9278 * pt.c (lookup_template_class): Don't mangle the names of template
9279 classes whose arguments are unknown.
9280
9281 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
9282
9283 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
9284
9285 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
9286
9287 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
9288
9289 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
9290 boolean_type_node to 1.
9291
9292 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
9293
9294 * error.c (dump_expr): Remove unused variable `l'.
9295
9296 * pt.c (for_each_template_parm): New function, created by
9297 converting uses_template_parms.
9298 (tree_fn_t): New typedef.
9299 (uses_template_parms): Use it.
9300 (mark_template_parm): New function.
9301 (push_template_decl): Check that the argument list of a partial
9302 specialization uses all the template parameters.
9303
9304 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
9305 with it; we might want it for debugging.
9306 * cp-tree.h (type_unification): Change interface.
9307 * class.c (finish_struct_1): Skip nested template types, just like
9308 ordinary nested types.
9309 (instantiate_type): Use new interface to type_unification.
9310 * lex.c (init_lex): Add __sz as opname for sizeof.
9311 * method.c (build_overload_scope_ref): New function.
9312 (build_overload_int): Handle complex expressions. Set
9313 numeric_output_need_bar if necessary.
9314 (build_overload_value): Handle non-PARM_DECL nodes; this
9315 routine is now used by build_overload_int. Remove some
9316 assignments to numeric_output_need_bar. Use
9317 build_overload_scope_ref.
9318 (build_qualified_name): Note that some template mangled names end
9319 with digits, and set numeric_output_need_bar appropriately. Use
9320 build_underscore_int.
9321 * pt.c (unify): Change interface.
9322 (type_unification_real): Likewise.
9323 (determine_specialization): Use new interfaces.
9324 (tsubst): Deal gracefully with situations in which the argument
9325 vector is not fully filled.
9326 (fn_type_unification): Use new interfaces.
9327 (type_unification): Likewise. Remove NOP_EXPR hack.
9328 (type_unification_real): Likewise.
9329 (unify): Likewise. Deal with unification of complex expressions.
9330
9331 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9332
9333 * pt.c (complete_template_args): Initialize skip properly.
9334
9335 * decl.c (make_typename_type): Revert.
9336 (make_implicit_typename): Remove.
9337 (lookup_name_real): Don't call it. Call lookup_field if we see a
9338 TYPE_DECL from a template base.
9339 * search.c (lookup_field): Do implicit typename stuff.
9340
9341 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
9342 Geoff Noer <noer@cygnus.com>
9343
9344 * Makefile.in: Various fixes for building cygwin32 native toolchains.
9345 * Make-lang.in: Likewise.
9346
9347 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9348
9349 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
9350
9351 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
9352
9353 * decl.c (make_implicit_typename): Rewrite removed code.
9354 (make_typename_type): Call it if the type we look up comes from
9355 a base that uses template parms.
9356
9357 * pt.c (complete_template_args): Rewrite.
9358 (tsubst, FUNCTION_DECL): Use it.
9359
9360 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
9361
9362 * semantics.c (finish_asm_stmt): Fix combine strings. Call
9363 c_expand_asm_operands () if output_operands, input_operands or
9364 clobbers is not NULL_TREE.
9365
9366 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9367
9368 * pt.c (complete_template_args): New function.
9369 (get_bindings): Deal with specializations of function templates
9370 with return type containing parameters from outer class
9371 templates.
9372 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
9373 substitute arguments and compose a new type.
9374
9375 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
9376
9377 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
9378 FUNCTION_DECLs.
9379
9380 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9381
9382 * decl.c (make_implicit_typename): Lose useless code.
9383
9384 * call.c (standard_conversion): Handle A* -> const A* properly.
9385
9386 * pt.c (get_bindings_real): Rename from get_bindings. Add
9387 check_rettype parm.
9388 (get_bindings): Pass 1.
9389 (get_bindings_overload): Pass 0.
9390
9391 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
9392
9393 * pt.c (check_explicit_specialization): When reverting a static
9394 member function, also remove the `this' parameter from
9395 last_function_parms.
9396
9397 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9398
9399 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
9400 a function context.
9401
9402 * decl.c (store_bindings): Use free_binding_vecs.
9403 (pop_from_top_level): Likewise.
9404
9405 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
9406
9407 * decl.c (make_implicit_typename): Only change the type of a
9408 TYPENAME_TYPE.
9409
9410 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
9411
9412 * semantics.c: New file, containing routines to perform the
9413 semantic phase of parsing.
9414 * parse.y: Use it.
9415 * pt.c (tsubst_expr): Likewise.
9416 * cp-tree.h: Declare the various functions in semantics.c.
9417 Provide macros to access _STMT tree nodes.
9418 * cp-tree.def: Add ASM_STMT tree node.
9419 * Makefile.in, Make-lang.in: Add dependencies on and for
9420 semantics.c.
9421
9422 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
9423
9424 * pt.c (push_template_decl): Only check primary templates.
9425
9426 * pt.c (check_explicit_specialization): Complain about default args
9427 in explicit specialization.
9428
9429 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
9430 constructor_declarator.
9431
9432 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
9433
9434 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
9435 has no overloaded operator ->.
9436
9437 * call.c (build_field_call): Don't crash when presented with a
9438 field that is actually a nested type.
9439
9440 * decl.c (pushtag): Deal with friend class injection in local
9441 classes.
9442
9443 * call.c (build_object_call): Don't crash if OBJ is a
9444 pointer-to-member-function.
9445
9446 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
9447
9448 * pt.c (push_template_decl): Complain about template with C linkage,
9449 anonymous template class.
9450
9451 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
9452
9453 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
9454 * search.c: Likewise.
9455
9456 * lex.c (do_pending_defargs): Only call
9457 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
9458
9459 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
9460
9461 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
9462
9463 * parse.y: Deal with CONSTRUCTORS in new_initializers.
9464
9465 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
9466
9467 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
9468 closely mimics the behavior in parse.y.
9469 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
9470 into a compound statement.
9471
9472 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
9473
9474 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
9475 * pt.c (inline_needs_template_parms): New fn.
9476 (original_template): New fn.
9477 (push_inline_template_parms_recursive): New fn.
9478 (maybe_begin_member_template_processing): Use them.
9479 (maybe_end_member_template_processing): Likewise.
9480 (is_member_or_friend_template): Rename to is_member_template.
9481 Member functions of local classes are never member templates.
9482
9483 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9484
9485 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
9486 added in the class scope to catch redefinition error.
9487
9488 * pt.c (reduce_template_parm_level): Also copy
9489 the DECL_TEMPLATE_PARMS field.
9490
9491 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
9492
9493 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
9494 reduced-level template type parameter.
9495
9496 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
9497
9498 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
9499 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
9500 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
9501 * decl.c (duplicate_decls): Propagate it.
9502 * typeck2.c (abstract_virtuals_error): Use two loops to emit
9503 abstract virtual functions and virtual functions which need a
9504 final overrider separately.
9505
9506 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
9507
9508 * lang-specs.h: Properly put brackets around array elements in
9509 initializer.
9510
9511 * typeck.c (build_binary_op_nodefault): Correctly place parens around
9512 && and || in expression.
9513
9514 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
9515
9516 * call.c (default_parm_conversions): Remove prototype definition.
9517 (build_method_call): Remove unused variable result.
9518
9519 * cvt.c (ocp_convert): Remove unused variable conversion.
9520
9521 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
9522
9523 * except.c (do_unwind): #if 0 definition of unused variables fcall
9524 and next_pc.
9525
9526 * expr.c (extract_scalar_init): #if 0 prototype and function
9527 definition.
9528
9529 * init.c (expand_aggr_init_1): Remove unused variable init_type.
9530 (build_new_1): Remove unused variable t.
9531
9532 * pt.c (instantiate_class_template): Remove unused variable newtag;
9533 cast called function return value to void.
9534 (do_decl_instantiation): Remove unused variables name and fn.
9535
9536 * tree.c (get_type_decl): Add default return to shut up compiler from
9537 complaining control reaches end of non-void function.
9538
9539 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
9540
9541 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
9542
9543 * call.c (default_parm_conversions): Remove prototype definition.
9544 (build_method_call): Remove unused variable result.
9545 (build_over_call): Add default case in enumeration switch.
9546
9547 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
9548
9549 * decl2.c (lang_decode_option): Change j's type to size_t.
9550
9551 * tree.c (layout_vbasetypes): record_align and desired_align are of
9552 type unsigned int; const_size and nonvirtual_const_size likewise.
9553
9554 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
9555
9556 * parse.y (new_initializer): Make sure all initializers are
9557 lists.
9558
9559 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
9560
9561 * decl2.c (import_export_decl): Mark tinfo functions for
9562 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
9563
9564 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
9565
9566 * method.c: Fix typo.
9567
9568 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9569
9570 * method.c: Include "system.h" to get stdlib.h, stdio.h,
9571 ctype.h, string.h, etc.
9572 (issue_nrepeats): Add default case in enumeration switch.
9573 (check_btype): Likewise.
9574 (process_overload_item): Likewise.
9575
9576 * Makefile.in (method.o): Depend on system.h.
9577
9578 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9579
9580 * lex.c (do_scoped_id): Fix parenthesizing.
9581
9582 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
9583
9584 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
9585 FLAG_RTTI is unset, initialize type info machinery and continue
9586 with FLAG_RTTI enabled.
9587 (get_typeid): Likewise.
9588
9589 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
9590
9591 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
9592 from B.
9593
9594 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
9595
9596 * pt.c (finish_member_template_decl): Deal more gracefully with
9597 invalid declarations.
9598
9599 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
9600
9601 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
9602 cp-tree.h: Clean up more old overloading code, old RTTI code, and
9603 some formatting quirks.
9604
9605 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
9606 method.c, pt.c, ptree.c, typeck.c: Remove support for
9607 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
9608 * class.h: Remove.
9609 * Makefile.in: Adjust.
9610
9611 * pt.c (unify): Don't allow reduced cv-quals when strict.
9612
9613 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
9614 *type_unification* and unify.
9615
9616 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
9617
9618 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
9619 (nested_name_specifier): And add it before this use.
9620 (typename_sub0): And this use. Also add use without the keyword.
9621 (typename_sub1): Likewise.
9622 * pt.c (instantiate_class_template): Don't actually instantiate
9623 anything if our type uses template parms.
9624
9625 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
9626
9627 * decl.c (start_function): Don't call temporary_allocation for a
9628 nested function.
9629
9630 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9631
9632 * pt.c (instantiate_class_template): Don't mess with friends if
9633 our type uses template parms.
9634
9635 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
9636
9637 * parse.y (nested_name_specifier): Use explicit_template_type.
9638 (typename_sub): Allow a template_type, an explicit_template_type,
9639 or an implicit template type at the end.
9640 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
9641 * decl.c (make_typename_type): Handle template-id where the name
9642 is a TEMPLATE_DECL.
9643 * call.c (build_scoped_method_call): Handle member template
9644 destructor call.
9645 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
9646 destructor is represented by the type.
9647
9648 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
9649 * parse.y (nested_name_specifier): Add 'template' case.
9650 (explicit_template_type): New rule.
9651 (typename_sub): Use it.
9652 * decl.c (make_typename_type): Handle getting a template-id for NAME.
9653 * pt.c (tsubst): Likewise.
9654
9655 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
9656
9657 * pt.c (add_to_template_args): Fix thinko.
9658 (instantiate_class_template): Call it later.
9659
9660 * pt.c (get_class_bindings): Add outer_args parm.
9661 (most_specialized_class): Likewise.
9662 (instantiate_class_template): Pass it.
9663 (more_specialized_class): Likewise.
9664 (lookup_template_class): Get context from template if none
9665 was specified.
9666 (finish_member_template_decl): Don't do anything with a
9667 partial specialization.
9668 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
9669 AGGREGATE_TYPE_P.
9670 * class.c (finish_struct): Member class templates have already been
9671 checked for name clashes.
9672 * decl.c (pushdecl_with_scope): Handle pushing at class level.
9673
9674 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
9675
9676 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
9677 (tsubst, *_PARM): Support multiple levels of template classes.
9678 (instantiate_class_template): Look up the pattern from the
9679 original template.
9680 (lookup_template_class): Handle getting a template for d1.
9681 (push_template_decl): Correct setting of 'primary'.
9682 (reduce_template_parm_level): Add 'levels' parm.
9683 (finish_member_template_decl): Support member class templates.
9684 (template_class_depth): Handle multiple levels.
9685 * parse.y (component_decl_1, fn.def2): Remove member template case.
9686 (component_decl): Add member template cases.
9687 * decl2.c (check_member_template): We now handle member template
9688 classes.
9689 * decl.c (pushtag): Handle member templates.
9690 * method.c (do_inline_function_hair): Don't touch
9691 IDENTIFIER_GLOBAL_VALUE.
9692 * init.c (build_offset_ref): If name isn't an identifier, just
9693 return it.
9694 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
9695
9696 * typeck.c (get_delta_difference): Do adjust for conversions to
9697 and from virtual base.
9698
9699 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
9700
9701 * typeck.c (get_delta_difference): Give hard error for conversion
9702 from virtual base.
9703
9704 * cp-tree.h: Tweak formatting.
9705
9706 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
9707
9708 * decl.c (push_namespace): Handle redeclaration error.
9709
9710 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
9711 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
9712 (NAMESPACE_BINDING): New macro.
9713 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
9714 * *.c: Use them.
9715
9716 * pt.c (push_template_decl): Use innermost_args.
9717
9718 * decl.c (get_unique_name): Tweak from earlier in the name.
9719
9720 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
9721
9722 * cp-tree.def: Add CPLUS_BINDING node.
9723 * cp-tree.h (tree_binding): New struct.
9724 (BINDING_SCOPE, BINDING_VALUE): New macros.
9725 (current_namespace, global_namespace): Declare extern.
9726 (struct lang_decl_flags): New field in_namespace.
9727 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
9728 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
9729 (TREE_INDIRECT_USING): New macro.
9730 * decl2.c (current_namespace, global_namespace): Declare. The
9731 value is a NAMESPACE_DECL now, not a TREE_LIST.
9732 (is_namespace_ancestor, namespace_ancestor): New static functions.
9733 (add_using_namespace, ambiguous_decl): Likewise.
9734 (lookup_using_namespace): New support function for lookup_name.
9735 (qualified_lookup_using_namespace): New support function for
9736 do_scoped_id and lookup_namespace_name.
9737 (get_namespace_id): Mark as obsolete.
9738 (current_namespace_id): Likewise.
9739 (do_namespace_alias): Implement.
9740 (do_using_directive): Implement as call to add_using_namespace.
9741 * decl.c (binding_for_name): New function.
9742 (push_namespace, pop_namespace): Implement.
9743 (push_decl): Don't install a FUNCTION_DECL in the global branch.
9744 (lookup_namespace_name): Implement using qualified lookup.
9745 (lookup_name_real): For global scoping, lookup in
9746 global_namespace. For namespace scoping, lookup in given
9747 namespace. For unscoped lookup, iterate over namespace,
9748 considering using directives.
9749 (init_decl_processing): Initialize global_namespace.
9750 (grokvardecl): Build assembler name as static name for globals.
9751 (grokdeclarator): Remove old namespace mangling.
9752 (xref_tag): When installing a global binding for the
9753 tag, make sure we have an identifier.
9754 * method.c (build_overload_nested_name): Mangle namespaces.
9755 (build_qualified_name): Likewise.
9756 (build_decl_overload_real): Likewise.
9757 * lex.c (build_lang_decl): Set namespace for new declaration to
9758 current_namespace.
9759 (do_scoped_id): Find global names in global or current
9760 namespace, or using qualified namespace lookup, depending on
9761 context.
9762 * init.c (build_member_call): When scope is namespace, use
9763 build_x_function_call instead.
9764 (build_offset_ref): When scope is namespace, collapse processing
9765 to lookup_namespace_name instead.
9766 * error.c (dump_decl): Support NAMESPACE_DECL.
9767 * decl.c (pushdecl): Bind globals to current namespace.
9768 (push_overloaded_decl): Likewise.
9769 (lookup_tag): Likewise.
9770 (lookup_name_current_level): Likewise.
9771 (xref_tag): Likewise.
9772 (start_function): Likewise.
9773 * lex.c (do_identifier): Likewise.
9774 (identifier_typedecl_value): Likewise.
9775 (real_yylex): Likewise.
9776 * method.c (do_inline_function_hair): Likewise.
9777 * parse.y (unscoped): Likewise.
9778 * pt.c (check_explicit_specialization): Likewise.
9779 (lookup_template_class): Likewise.
9780 * rtti.c (call_void_fn): Likewise.
9781 * sig.c (build_sigtable): Likewise.
9782 * ptree.c (lang_print_xnode): New function.
9783
9784 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
9785
9786 * pt.c (instantiate_class_template): Don't instantiate if pedantic
9787 and the args use template parms.
9788
9789 * pt.c (push_tinst_level): If the instantiation uses template parms,
9790 fail silently.
9791 * decl.c (xref_basetypes): Do call complete_type for basetypes
9792 that involve template parameters.
9793
9794 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
9795
9796 * typeck2.c (process_init_constructor): Fix labeled init check.
9797
9798 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
9799
9800 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
9801 argument to tsubst and friends.
9802
9803 * pt.c (tsubst, FUNCTION_DECL): Tidy.
9804
9805 * typeck.c (build_x_function_call): Handle static member function
9806 templates like non-templates. Handle friend templates like normal
9807 function templates.
9808 * pt.c (tsubst, *_PARM): Don't use orig_level.
9809 (get_bindings): Don't call add_to_template_args.
9810 (instantiate_template): Likewise.
9811 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
9812 * ptree.c (print_lang_type): Print index/level for template parms.
9813
9814 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
9815
9816 * Make-lang.in (cc1plus): Note that cc1plus depends on
9817 cp/cp-tree.h and cp/cp-tree.def.
9818
9819 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
9820 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
9821 position in a template parameter list.
9822 * cp-tree.h (template_parm_index): New structure, used as the tree
9823 structure for a TEMPLATE_PARM_INDEX.
9824 (TEMPLATE_PARM_IDX): New macro.
9825 (TEMPLATE_PARM_LEVEL): Likewise.
9826 (TEMPLATE_PARM_DESCENDANTS): Likewise.
9827 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
9828 (TEMPLATE_PARM_DECL): Likewise.
9829 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
9830 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
9831 (TEMPLATE_TYPE_DECL): Likewise.
9832 (TEMPLATE_CONST_IDX): Remove.
9833 (TEMPLATE_CONST_LEVEL): Likewise.
9834 (TEMPLATE_CONST_SET_INFO): Likewise.
9835 (TEMPLATE_TYPE_SET_INFO): Likewise.
9836 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
9837 node.
9838 (TEMPLATE_TYPE_LEVEL): Likewise.
9839 * decl.c (decls_match): Call comp_template_parms, rather than
9840 expanding it inline.
9841 (duplicate_decls): If two template declarations are being merged,
9842 then their TEMPLATE_INFOs should be merged as well.
9843 (grokfndecl): Save template-id information when declaring a friend
9844 with explicit template arguments. Pass arguments to
9845 check_explicit_specialization via correct convention; at some
9846 point check_explicit_specialization changed, but these call-sites
9847 did not.
9848 (grokdeclarator): Tidy up slightly.
9849 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
9850 two template functions with the same DECL_ASSEMBLER_NAME the same,
9851 since the names are not yet mangled.
9852 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
9853 TEMPLATE_CONST_PARM.
9854 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
9855 decl for a non-type parameter, rather than printing `<tparm ...>'.
9856 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
9857 (do_friend): Deal with template friends.
9858 * lex.c (do_pending_inlines): Call
9859 maybe_begin_member_template_processing, rather than
9860 conditionally calling begin_member_template_processing.
9861 (process_next_inline): Likewise. Call
9862 maybe_end_member_template_processing, rather than
9863 conditionally calling end_member_template_processing.
9864 (do_pending_defargs): Likewise.
9865 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
9866 TEMPLATE_CONST_PARM.
9867 * method.c (build_mangled_template_parm_index): New function.
9868 (build_overload_value): Use it.
9869 (build_overload_name): Likewise.
9870 * pt.c (finish_member_template_decl): Allow friend declarations.
9871 (template_class_depth): New function.
9872 (is_member_template): Rename, and modify, to become...
9873 (is_member_or_friend_template): New function.
9874 (end_member_template_processing): Rename, and modify, to become...
9875 (maybe_end_member_template_processing).
9876 (build_template_parm_index): New function.
9877 (reduce_template_parm_level): New function.
9878 (process_template_parm): Modify to use build_template_parm_index.
9879 (push_template_decl): Deal with friend templates.
9880 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
9881 TEMPLATE_CONST_PARM.
9882 (tsubst_friend_function): New function.
9883 (instantiate_class_template): Generate the DECL_FRIENDLIST
9884 for a new instantiation by using tsubst_friend_function rather
9885 than just tsubst.
9886 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
9887 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
9888 appropriate new macros. Use reduce_template_parm_level to
9889 generate lower-level template parameters. Handle tsubst'ing into
9890 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
9891 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
9892 templates. Similarly for the template parameters for a new
9893 template.
9894 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
9895 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
9896 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
9897 (get_bindings): Call add_to_template_args if necessary.
9898 (instantiate_decl): Handle instantiations of friend templates.
9899 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
9900 TEMPLATE_TYPE_PARM as a list of fields; it's not!
9901 * spew.c (yylex): Do a little manual constant propagation to
9902 clarify the code.
9903
9904 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
9905
9906 * error.c: Include sys/types.h.
9907
9908 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
9909
9910 * method.c (build_mangled_name): Start CPP directives in column zero.
9911
9912 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9913
9914 * typeck2.c (process_init_constructor): Sorry about non-trivial
9915 labeled initializers.
9916 * parse.y (initlist): Re-enable labeled initializers.
9917
9918 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9919
9920 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
9921 all callers changed. Rely on the new parameter instead of arg
9922 being a TREE_LIST when determine whether we are working inside
9923 template template parameter. Clean up is_type test.
9924
9925 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
9926
9927 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
9928 * typeck2.c (initializer_constant_valid_p): Allow conversions
9929 between pointers and references.
9930
9931 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
9932
9933 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
9934 if pedantic || warn_pointer_arith.
9935
9936 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9937
9938 * pt.c (unify): Handle TEMPLATE_DECL.
9939
9940 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
9941
9942 * cp-tree.h (strip_attrs): Remove decl.
9943
9944 1998-02-18 Doug Evans <devans@cygnus.com>
9945
9946 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
9947 Update olddecl's attributes too.
9948 (strip_attrs): Remove function.
9949 * typeck.c (common_type): Call merge_machine_type_attributes.
9950
9951 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
9952
9953 * parse.y (initdcl0_innards): New grammar symbol.
9954 (nomods_initdecls, nomods_initdcl0): Change type from itype to
9955 none, since the resulting value is never used.
9956 (parse_decl): New function.
9957 (datadef): Remove redundant actions.
9958 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
9959 * parse.c: Regenerated.
9960
9961 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
9962
9963 * parse.y (simple_stmt): Use getdecls() to check for decl.
9964
9965 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
9966
9967 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
9968 macros.
9969 (c++.install-common): Install c++filt properly as native or as cross
9970 variant.
9971 (c++.uninstall): Add c++filt.
9972
9973 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9974
9975 * call.c (standard_conversion): Fix multi-level ptr conversions.
9976
9977 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
9978
9979 * init.c (build_new): Propagate error_mark_node up.
9980
9981 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
9982
9983 * parse.y (simple_stmt): If the condition isn't a declaration,
9984 start the controlled block after the test.
9985
9986 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9987
9988 * call.c (build_over_call): Convert builtin abs, labs and fabs to
9989 tree-codes.
9990 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
9991 builtins.
9992
9993 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
9994
9995 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
9996
9997 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9998
9999 * cp-tree.h: Add access_protected_virtual_node.
10000 * class.c (init_class_processing): Initialize it.
10001 * decl.c (xref_basetypes): Use it.
10002 * parse.y (base_class_access_list): Likewise.
10003
10004 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
10005 (c++.install-common): Install c++filt.
10006
10007 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10008
10009 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
10010
10011 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
10012
10013 * call.c (reference_binding): Use comptypes when comparing
10014 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
10015
10016 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
10017
10018 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
10019 (really_overloaded_fn): Move check here from is_overloaded_fn.
10020 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
10021
10022 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
10023
10024 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
10025 conversions.
10026
10027 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
10028
10029 * cp-tree.h (push_template_decl): Return the decl passed in, or an
10030 equivalent duplicate.
10031 * decl.c (pushtag): Use the return value from push_template_decl.
10032 (duplicate_decls): When duplicating a template declaration, merge
10033 the DECL_TEMPLATE_RESULTs as well.
10034 (make_implicit_typename): Don't try to dive into typename types to
10035 find a context for making a new implicit typename.
10036 (start_decl): Use the return value from push_template_decl.
10037 (grokdeclarator): Complain about declarations list `const operator
10038 int'. Since we don't correctly handle in-class initializations of
10039 non-static data members, complain about this (now illegal)
10040 practice. Issue an error for initializations of non-const statics
10041 since that is illegal as well, and since we don't handle that case
10042 correctly either.
10043 (start_function): Use the return value from push_template_decl.
10044 (start_method): Likewise.
10045 * decl2.c (grokfield): Likewise. Since the change to
10046 grokdeclarator ensures that all initialized fields are in fact
10047 static, remove a redundant test for TREE_PUBLIC.
10048 * parse.y (initlist): Disable labeled initializers since they do
10049 not work as per the documentation, and since they do not use the
10050 same syntax as the C front end.
10051 * pt.c (push_template_decl): Return the decl passed in, or an
10052 equivalent duplicate.
10053 (lookup_template_class): When searching in a nested context,
10054 use the right arguments.
10055 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
10056 * typeck.c (build_component_ref): Assign the correct type to the
10057 result of build_vfn_ref.
10058
10059 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
10060
10061 * pt.c (convert_nontype_argument): Fix typo.
10062 (check_explicit_specialization): Allow old-style specialization
10063 of class template members.
10064
10065 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
10066 Manfred Hollstein <manfred@s-direktnet.de>
10067
10068 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
10069 when deciding to override DECL_ASSEMBLER_NAME.
10070
10071 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
10072
10073 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
10074 * cp-tree.h (flag_do_squangling): Add declaration.
10075 * lang-options.h: Add -fsquangle and -fno-squangle.
10076 * method.c: Add macros and static variables for squangling.
10077 (build_overload_name): Rename to build_mangled_name, add logic for B
10078 compression, and split into process_modifiers and
10079 process_overload_item.
10080 (process_modifiers): New function, to handle constant, reference,
10081 and pointer types.
10082 (process_overload_item): New function, handles issue of type codes.
10083 (build_overload_name): New function, start squangling and call
10084 build_mangled_name.
10085 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
10086 (start_squangling): New function to initialize squangling structs.
10087 (end_squangling): New function to destroy squangling structs.
10088 (nrepeats): Rename variable to Nrepeats.
10089 (issue_nrepeats): New function for issuing 'n' type repeats.
10090 (check_ktype): New function to check for type K name compression.
10091 (build_overload_nested_name): Add a check for K name compression.
10092 (build_qualified_name): Add a check for K name compression and don't
10093 use DECL_ASSEMBLER_NAME when squangling is on.
10094 (check_btype): New function, checks for B type compression.
10095 (build_static_name, build_decl_overload_real): Initiate squangling.
10096 (build_typename_overload, build_overload_with_type): Initiate
10097 squangling
10098
10099 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
10100
10101 * method.c (make_thunk): Avoid name buffer overflow.
10102
10103 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
10104
10105 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
10106 don't define them yet.
10107
10108 * parse.y (nomods_initdcl0): Add constructor_declarator case.
10109
10110 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10111
10112 * config-lang.in (diff_excludes): Use basename only.
10113
10114 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
10115
10116 * tinfo2.cc: Add tinfo for signed char.
10117
10118 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
10119
10120 * search.c (compute_access): Handle protected constructors in derived
10121 classes as accessible.
10122
10123 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
10124
10125 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
10126 Call convert_from_reference sooner.
10127
10128 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
10129
10130 * cvt.c (ocp_convert): Obtain the constant values from constant
10131 decls even if the destination type is the same as the type of the
10132 decl.
10133
10134 * decl2.c (finish_file): Make sure that static inlines with
10135 definitions are not marked DECL_EXTERNAL before returning.
10136
10137 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10138
10139 * decl.c: Lose arg_looking_for_template.
10140 (lookup_name_real): Likewise.
10141 * parse.y: Lose processing_template_arg, template_arg1.
10142 (primary): Likewise.
10143 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
10144
10145 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10146
10147 * error.c (dump_decl): Fix type of default arguments for template
10148 template parameters and nontype template parameters.
10149 * parse.y (template_parm): Handle invalid default template
10150 template arguments here.
10151
10152 * parse.y (template_parm): Use template_arg instead of PTYPENAME
10153 for default template template argument.
10154 * pt.c (coerce_template_parms): Merge default template argument
10155 codes. Can treat RECORD_TYPE as template name if it is implicitly
10156 created. Fix argument index in error message.
10157 * typeck.c (comptypes): Merge template argument comparison codes in
10158 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
10159
10160 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
10161
10162 * lex.c (file_name_nondirectory): Also check for '/'.
10163
10164 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
10165
10166 * parse.y (primary): Deal with statement-expressions in
10167 templates.
10168 * pt.c (tsubst_copy): Handle BIND_EXPR.
10169 * tree.c (mapcar): Likewise.
10170
10171 * call.c (add_template_candidate_real): Pass extra parameter to
10172 fn_type_unification.
10173 * cp-tree.h (fn_type_unification): Add parameter.
10174 * pt.c (fn_type_unification): Add additional parameter to deal with
10175 static member functions.
10176 (get_bindings): Deal with static member functions.
10177
10178 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
10179 (revert_static_member_fn): Declare.
10180 * decl.c (revert_static_member_fn): Remove declaration. Change
10181 linkage from internal to external.
10182 (cp_finish_decl): Deal with virtual functions in classes local to
10183 template functions.
10184 * decl2.c (finish_file): Don't forget to emit increment/decrement
10185 expressions in initializers for file-scope variables.
10186 * parse.y (typename_sub2): If the typename doesn't names a
10187 template, rather than a type, issue an error message.
10188 * pt.c (check_explicit_specialization): Handle specializations of
10189 static member functions.
10190 (coerce_template_parms): Handle offset references to lists of
10191 member functions.
10192 * search.c (note_debug_info_needed): Don't crash when handed a
10193 type which is being defined.
10194 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
10195 that can happen with some illegal code.
10196
10197 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10198
10199 * call.c (user_harshness): Initialize `code' to 0.
10200 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
10201 (null_ptr_cst_p): Add parentheses around && within ||.
10202 (standard_conversion): Likewise.
10203 (z_candidate): Likewise.
10204 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
10205 (build_object_call): Likewise for `mem_args'.
10206 (build_new_op): Likewise for `mem_arglist'. Add `return' from
10207 default case in enumeration switch.
10208
10209 * class.c (build_vtable_entry): Add explicit braces to avoid
10210 ambiguous `else'.
10211 (build_class_init_list): Likewise.
10212 (finish_struct_1): Initialize `width' to 0.
10213 (instantiate_type): Initialize `name' to NULL_TREE. Add
10214 explicit braces to avoid ambiguous `else'.
10215
10216 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
10217 `else'.
10218
10219 * decl.c (grok_reference_init): Eliminate unused parameter, all
10220 callers changed.
10221 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
10222 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
10223 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
10224 (grokdeclarator): Add parentheses around && within ||. Add
10225 explicit braces to avoid ambiguous `else'.
10226 (grokparms): Initialize `type' to NULL_TREE.
10227 (xref_tag): Remove unused label `just_return'.
10228 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
10229 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
10230 (hack_incomplete_structures): Add parentheses around assignment
10231 used as truth value.
10232
10233 * decl2.c (coerce_delete_type): Hide definition of `e3'.
10234
10235 * error.c: Include <stdlib.h>.
10236 (dump_expr): Change the type of `i' to size_t. Remove unused
10237 label `error'.
10238
10239 * except.c (init_exception_processing): Remove unused variable `d'.
10240 (expand_throw): Likewise for `label'.
10241
10242 * friend.c (add_friends): Add explicit braces to avoid ambiguous
10243 `else'.
10244
10245 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
10246 (sort_base_init): Likewise for `binfo'.
10247 (expand_member_init): Likewise for `rval'.
10248 (build_member_call): Add parentheses around assignment used as
10249 truth value.
10250 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
10251 (build_new): Initialize `nelts' to NULL_TREE. Initialize
10252 `old_immediate_size_expand' to 0.
10253 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
10254 (build_vec_delete_1): Remove unused variable `block'.
10255 (expand_vec_init): Initialize `itype' to NULL_TREE.
10256
10257 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
10258 declaration of `index' and `rindex' with autoconf macros.
10259 (reinit_parse_for_expr): Remove unused variables
10260 `look_for_semicolon' and `look_for_lbrac'.
10261 (cons_up_default_function): Initialize `args' to NULL_TREE.
10262 (readescape): Initialize `firstdig' to 0.
10263 (real_yylex): Add parentheses around assignment used as truth value.
10264
10265 * method.c: Include <strings.h> if we don't have <string.h>.
10266 Protect declaration of `index' with autoconf macro.
10267
10268 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
10269 Initialize `type' to NULL_TREE.
10270 (structsp): Remove unused variable `id'.
10271
10272 * pt.c (coerce_template_parms): Add explicit braces to avoid
10273 ambiguous `else'.
10274 (lookup_template_class): Initialize `template' to NULL_TREE.
10275 (instantiate_class_template): Remove unused variable `name' and `e'.
10276 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
10277 (do_poplevel): Initialize `saved_warn_unused' to 0.
10278 (type_unification): Remove unused varable `parm'.
10279 (unify): Likewise for `j'.
10280
10281 * repo.c (init_repo): Add parentheses around assignment used as
10282 truth value.
10283 (finish_repo): Remove unused varable `p'.
10284
10285 * search.c (get_binfo): Initialize `type' to NULL_TREE.
10286 (get_base_distance): Likewise.
10287 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
10288 and `new_v' to NULL_TREE.
10289 (lookup_fnfields): Likewise for `rval_binfo_h'.
10290 (breadth_first_search): Add parentheses around assignment used as
10291 truth value.
10292 (get_template_base): Initialize `type' to NULL_TREE.
10293
10294 * sig.c (append_signature_fields): Initialize `last_mfptr' to
10295 NULL_TREE.
10296 (build_signature_table_constructor): Likewise for
10297 `last_rhs_field', `pfn' and `vt_off'.
10298 (build_sigtable): Likewise for `init'.
10299
10300 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
10301 (propagate_binfo_offsets): Likewise for `delta'.
10302 (hash_tree_cons): Initialize hashcode to 0.
10303 (can_free): Likewise for `size'.
10304 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
10305
10306 * typeck.c (convert_sequence): Hide prototype.
10307 (common_type): Add explicit braces to avoid ambiguous `else'.
10308 (comp_target_types): Likewise.
10309 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
10310 (build_function_call_real): Add explicit braces to avoid ambiguous
10311 `else'.
10312 (convert_arguments): Initialize `called_thing' to 0.
10313 (convert_for_initialization): Initialize `savew' and `savee' to 0.
10314
10315 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
10316 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
10317 (build_x_arrow): Likewise for `last_rval'.
10318
10319 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
10320
10321 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
10322
10323 * decl.c (init_decl_processing): Use set_sizetype.
10324 * decl2.c (sizetype): Don't declare.
10325 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
10326 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
10327 (build_component_addr, unary_complex_lvalue): Likewise.
10328 * rtti.c (expand_class_desc): Likewise.
10329 * class.c (get_vfield_offset): Likewise.
10330
10331 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
10332
10333 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
10334 early to avoid bogus error. Handle overloaded function
10335 names provided as template arguments correctly.
10336 (coerce_template_parms): Don't mishandle overloaded functions when
10337 dealing with template template parameters.
10338 (lookup_template_class): Issue an error message, rather than
10339 crashing, when the TYPE_DECL provided is not a template type.
10340
10341 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
10342
10343 * class.c (instantiate_type): Don't just return a known type if
10344 it's wrong.
10345
10346 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
10347
10348 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
10349 since that code could never be reached.
10350
10351 * error.c (dump_decl): Avoid aborting in the midst of printing an
10352 error message about an illegal template declaration.
10353
10354 * parse.y (structsp): Print an error message, rather than crashing,
10355 when a class-head does not name a class.
10356
10357 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
10358 template arguments as a g++ extension.
10359
10360 * cp-tree.def (ALIGNOF_EXPR): New tree code.
10361 * decl2.c (grok_alignof): If processing_template_decl, just store
10362 the expression.
10363 * typeck.c (c_alignof): Likewise.
10364 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
10365 * error.c (dump_expr): Likewise.
10366 * pt.c (tsubst_copy): Likewise.
10367 * tree.c (cp_tree_equal): Likewise.
10368 * pt.c (uses_template_parms): Correctly determine whether or not a
10369 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
10370 folding can be done.
10371
10372 * cp-tree.h (grok_enum_decls): Remove type parameter.
10373 * decl.c (grok_enum_decls): Likewise.
10374 * decl2.c (grok_x_components): Call grok_enum_decls
10375 unconditionally, since it will do nothing if there is no
10376 current_local_enum. Use the new calling sequence.
10377 * pt.c (tsubst_enum): Use the new calling sequence for
10378 grok_enum_decls.
10379
10380 * decl.c (start_function): Make member functions of local classes
10381 in extern inline functions have comdat linkage here...
10382 (grokdeclarator): Rather than here.
10383
10384 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
10385
10386 * pt.c (convert_nontype_argument): Use decl_constant_value.
10387
10388 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
10389
10390 * call.c (add_template_candidate_real): New function.
10391 (add_template_candidate): Use it.
10392 (add_template_conv_candidate): Likewise.
10393 (joust): Pass extra argument to more_specialized.
10394 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
10395 (is_local_class): Remove.
10396 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
10397 * cp-tree.h (is_local_class): Remove.
10398 (perform_array_to_pointer_conversion): Likewise.
10399 (finish_member_template_decl): Add.
10400 (check_explicit_specialization): Return a tree, not an int.
10401 (more_specialized): Take additional argument.
10402 (get_bindings): Likewise.
10403 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
10404 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10405 (perform_array_to_pointer_conversion): Remove.
10406 * decl.c (saved_scope): Add processing_specialization,
10407 processing_explicit_instantiation fields.
10408 (maybe_push_to_top_level): Save them.
10409 (pop_from_top_level): Restore them.
10410 (grokfndecl): Use new return value from
10411 check_explicit_specialization.
10412 (start_decl): Don't check flag_guiding_decls before pushing
10413 decls.
10414 (cp_finish_decl): Remove previous (bogus) change.
10415 (grok_declarator): Use decl_function_context rather than
10416 is_local_class.
10417 * decl2.c (finish_file): Pass extra argument to get_bindings.
10418 (build_expr_from_tree): Let build_x_component_ref check
10419 validity of arguments rather than doing it here.
10420 * lex.c (cons_up_default_function): Remove code fooling with
10421 processing_specialization, processing_explicit_instantiation
10422 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
10423 * method.c (build_overload_identifier): Mangle local classes in
10424 template functions correctly.
10425 * parse.y (finish_member_template_decl): Move to pt.c.
10426 * pt.c (finish_member_template_decl): Moved here from parse.y.
10427 (print_candidates): New function.
10428 (determine_specialization): Change interface. Properly look for
10429 most specialized versions of template candidates.
10430 (check_explicit_specialization): Fully process explicit
10431 instantiations.
10432 (push_template_decl): Avoid looking at CLASSTYPE fields in
10433 FUNCTION_DECLS.
10434 (determine_overloaded_function): Remove.
10435 (convert_nontype_argument): Change name from
10436 convert_nontype_parameter. Use determine_overloaded_function
10437 instead of instantiate_type.
10438 (mangle_class_name_for_template): Handle type contexts as well as
10439 function contexts.
10440 (classtype_mangled_name): Likewise.
10441 (lookup_template_class): Likewise.
10442 (tsubst): Likewise.
10443 (more_specialized): Take explict template arguments as a
10444 parameter.
10445 (most_specialized): Likewise.
10446 (get_bindings): Likewise. Check that return types match before
10447 proclaiming a function a match.
10448 (do_decl_instantiation): Remove code searching for function to
10449 instantiate; that is now done in check_explicit_specialization.
10450 (add_maybe_template): Pass extra argument to get_bindings.
10451 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
10452 implementation.
10453 * typeck.c (build_component_ref): Check for invalid arguments.
10454
10455 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
10456
10457 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
10458 return_target and call_target are equivalent.
10459
10460 * pt.c (type_unification_real): Just accept function parms that
10461 don't use any template parms.
10462
10463 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
10464
10465 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
10466 unset DECL_NOT_REALLY_EXTERN.
10467
10468 * parse.y (typename_sub*): Fix std::.
10469
10470 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
10471
10472 * error.c (dump_decl): Fix type default template args.
10473 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
10474
10475 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
10476
10477 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
10478 (file_name_nondirectory): Use.
10479
10480 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10481
10482 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
10483 that are not really present. Substitute default arguments in
10484 template template arguments. Correctly convert TEMPLATE_DECL to
10485 TEMPLATE_TEMPLATE_PARM.
10486 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
10487 are no longer treated specially here.
10488 * parse.y (template_template_parm): Fix copy error.
10489 * decl.c (grokdeclarator): Warn about missing `typename' for nested
10490 type created from template template parameters.
10491 * parse.y (bad_parm): Likewise
10492
10493 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
10494 (push_nested_class): Likewise.
10495 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
10496 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
10497 (copy_template_template_parm): Declare.
10498 * decl.c (arg_looking_for_template): New variable.
10499 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
10500 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
10501 node if arg_looking_for_template is nonzero.
10502 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
10503 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
10504 (grokdeclarator): Handle TEMPLATE_DECL.
10505 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
10506 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
10507 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
10508 (dump_decl): Handle unnamed template type parameters.
10509 Handle template template parameters.
10510 (dump_function_name): Handle template template parameters.
10511 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
10512 Handle TEMPLATE_TEMPLATE_PARM.
10513 * method.c (build_template_template_parm_names): New function.
10514 (build_template_parm_names): Handle TEMPLATE_DECL.
10515 (build_overload_nested_name, build_overload_name):
10516 Handle TEMPLATE_TEMPLATE_PARM.
10517 * parse.y (maybe_identifier): New nonterminal.
10518 (template_type_parm): Use it.
10519 (template_template_parm, template_arg1): New nonterminal.
10520 (template_parm): Add template_template_parm rules.
10521 (template_arg): Set processing_template_arg.
10522 (template_arg1): Rules moved from template_arg.
10523 (primary, nonnested_type): Set arg_looking_for_template if we are
10524 processing template arguments.
10525 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
10526 (process_template_parm): Handle template template parameters.
10527 (coerce_template_parms, comp_template_args): Likewise.
10528 (mangle_class_name_for_template, lookup_template_class): Likewise.
10529 (uses_template_parms): Handle TEMPLATE_DECL and
10530 TEMPLATE_TEMPLATE_PARM.
10531 (current_template_args): Handle TEMPLATE_DECL.
10532 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
10533 * search.c (dfs_walk, dfs_record_inheritance):
10534 Handle TEMPLATE_TEMPLATE_PARM.
10535 * tree.c (copy_template_template_parm): New function.
10536 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
10537 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
10538
10539 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
10540
10541 * decl.c (start_decl): Don't allow duplicate definitions of static
10542 data members.
10543
10544 * call.c (build_user_type_conversion_1): Handle user-defined
10545 template conversion operators correctly.
10546
10547 * decl2.c (build_expr_from_tree): Issue an error message if the
10548 object in a COMPONENT_REF is a TEMPLATE_DECL.
10549
10550 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
10551
10552 * class.c (is_local_class): New function.
10553 * cp-tree.h (is_local_class): Declare it.
10554 (last_tree): Likewise.
10555 (begin_tree): Likewise.
10556 (end_tree): Likewise.
10557 (lookup_template_class): Change prototype.
10558 * decl.c (cp_finish_decl): Check for NULL where necessary.
10559 Consider FUNCTION_DECLS to declare objects with top-level binding,
10560 when calling make_decl_rtl.
10561 (grokdeclarator): Give members of local classes internal linkage.
10562 (start_function): Remove declaration of last_tree.
10563 (finish_function): Set flag_keep_inline_functions around call to
10564 rest_of_compilation if we are processing a member function in a
10565 local class.
10566 (start_method): Call push_template_decl for member functions of
10567 local classes in template functions.
10568 * decl2.c (import_export_decl): Don't give external linkage to
10569 instantiations of templates with internal linkage.
10570 * parse.y (last_tree): Remove declaration.
10571 (template_type): Pass extra parameter to lookup_template_class.
10572 (self_template_type): Likewise.
10573 (structsp): Move call to reset_specialization into left_curly.
10574 (left_curly): Call reset_specialization, and begin_tree.
10575 * pt.c (saved_trees): New variable.
10576 (mangle_class_name_for_template): Change prototype. Use
10577 additional function context to name local classes in templates
10578 correctly.
10579 (classtype_mangled_name): Pass the context.
10580 (push_template_decl): Handle local classes and templates, and
10581 member functions for such classes.
10582 (convert_nontype_parameter): Fix handling of pointer-to-member
10583 constants.
10584 (lookup_template_class): Handle local classes in templates.
10585 (tsubst): Likewise. Don't assume that template instantiations
10586 have external linkage; pay attention to the template declaration.
10587 (mark_decl_instantiated): Likewise.
10588 (begin_tree): New function.
10589 (end_tree): Likewise.
10590
10591 * decl.c (xref_basetypes): Don't call complete_type for basetypes
10592 that involve template parameters; that can lead to infinite
10593 recursion unnecessarily.
10594
10595 * pt.c (register_specialization): Do not register specializations
10596 that aren't ready to be registered yet.
10597 (check_explicit_specialization): Handle explicit specialization of
10598 constructors and destructors.
10599 (build_template_decl): New function.
10600 (push_template_delc): Handle out-of-class specializations of
10601 member templates.
10602
10603 * pt.c (check_explicit_specialization): Set up the template
10604 information before registering the specialization.
10605 (coerce_template_parms): Fix thinko.
10606 (tsubst): Handle specializations of member templates correctly.
10607
10608 * class.c (finish_struct_methods): Remove calls to
10609 check_explicit_specialization from here.
10610 (finish_struct): And insert them here.
10611 * cp-tree.h (perform_qualification_conversions): New function.
10612 (perform_array_to_pointer_conversion): Likewise.
10613 (begin_explicit_instantiation): Likewise.
10614 (end_explicit_instantiation): Likewise.
10615 (determine_specialization): Renamed from
10616 determine_explicit_specialization.
10617 (comp_template_parms): New function.
10618 (processing_explicit_instantiation): New variable.
10619 * cvt.c (perform_qualification_conversions): New function.
10620 (perform_array_to_pointer_conversion): Likewise.
10621 * decl.c (duplicate_decls): Don't consider template functions
10622 alike unless they have the same parameters. Refine handling of
10623 instantiation/specialization mismatches.
10624 (start_decl): Don't call pushdecl for template specializations,
10625 since they don't affect overloading.
10626 (start_function): Likewise.
10627 (grokfndecl): Call check_explicit_specialization a little later.
10628 Don't call duplicate_decls for memberm template specializations.
10629 (grokdeclarator): Don't update template_count for classes that are
10630 themselves specializations. Remove use of `2' as parameter to
10631 grokfndecl since that value isn't used.
10632 * lex.c (cons_up_default_function): Save and restore
10633 processing_explicit_instantiation around calls to grokfield.
10634 * parse.y (finish_member_template_decl): New function.
10635 (component_decl_1): Use it.
10636 (fn.def2): Likewise.
10637 (template_arg_list_opt): New nonterminal.
10638 (template_type): Use it.
10639 (self_template_type): Likewise.
10640 (template_id): Likewise.
10641 (object_template_id): Likewise.
10642 (notype_template_declarator): Likwise.
10643 (begin_explicit_instantiation): Likewise.
10644 (end_explicit_instantiation): Likewise.
10645 (explicit_instantiation): Use them.
10646 * pt.c (coerce_template_parms): Add parameters.
10647 (processing_explicit_instantiation): New variable.
10648 (convert_nontype_parameter): New function.
10649 (determine_overloaded_function): Likewise.
10650 (begin_explicit_instantiation): Likewise.
10651 (end_explicit_instantiation): Likewise.
10652 (retrieve_specialization): Likewise.
10653 (register_specialization): Likewise.
10654 (processing_explicit_specialization): Removed.
10655 (determine_specialization): Handle specializations of member
10656 functions of template class instantiations.
10657 (check_explicit_specialization): Refine to conform to standard.
10658 (comp_template_parms): New function.
10659 (coerce_template_parms): Call convert_nontype_parameter.
10660 (tsubst): Refine handling of member templates. Use
10661 register_specialization.
10662 (instantiate_template): Use retrieve_specialization.
10663 (do_decl_instantiation): Likewise.
10664 (instantiate_decl): Likewise.
10665 (type_unification): Improve handling of explict template
10666 arguments.
10667 * tree.c (mapcar): Return error_mark_node, rather than aborting,
10668 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
10669 * typeck.c (build_unary_op): Call determine_specialization, rather
10670 than determine_explicit_specialization.
10671
10672 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
10673
10674 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
10675
10676 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10677
10678 * error.c (dump_decl): For enum tags, output the tag, not its value.
10679
10680 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
10681
10682 * decl.c (init_decl_processing): Only call init_rtti_processing
10683 FLAG_RTTI is set.
10684
10685 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
10686
10687 * init.c (build_new_1): Split out from build_new.
10688 (build_new): Just return a NEW_EXPR.
10689 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
10690
10691 * decl2.c (get_temp_regvar): Tweak.
10692
10693 * cp-tree.h (TREE_CALLS_NEW): Comment out.
10694 * class.c (resolves_to_fixed_type_p): Remove use.
10695 * method.c (build_opfncall): Likewise.
10696 * call.c (build_new_op): Likewise.
10697
10698 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
10699
10700 * exception.cc (__eh_alloc, __eh_free): New fns.
10701 (__cp_push_exception, __cp_pop_exception): Use them.
10702 (__uncatch_exception): Call terminate here if no exception.
10703 * except.c (build_terminate_handler): New fn.
10704 (expand_start_catch_block): Use it.
10705 (expand_exception_blocks): Likewise.
10706 (alloc_eh_object): New fn.
10707 (expand_throw): Use it. Protect exception init with terminate.
10708 * typeck.c (build_modify_expr): Remove code that ignores trivial
10709 methods.
10710
10711 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10712
10713 * call.c (add_builtin_candidate): Add default case in enumeration
10714 switch.
10715 (build_new_op): Likewise.
10716 (convert_like): Likewise.
10717 * cvt.c (build_expr_type_conversion): Likewise.
10718 * tree.c (real_lvalue_p): Likewise.
10719 (lvalue_p): Likewise.
10720 (cp_tree_equal): Likewise.
10721 * typeck.c (comptypes): Likewise.
10722 (build_component_ref): Likewise.
10723 (build_function_call_real): Likewise.
10724 (build_binary_op_nodefault): Likewise.
10725 (build_unary_op): Likewise.
10726 (build_modify_expr): Likewise.
10727 * typeck2.c (initializer_constant_valid_p): Likewise.
10728
10729 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
10730
10731 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
10732
10733 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
10734
10735 * pt.c (coerce_template_parms): Make sure to digest_init if
10736 possible.
10737
10738 * decl.c (duplicate_decls): Make the newdecl virtual if the
10739 olddecl was, just as is done with other attributes of olddecl.
10740
10741 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
10742
10743 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
10744 address of an OFFSET_REF.
10745
10746 * cp-tree.def: Add AGGR_INIT_EXPR.
10747 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
10748 AGGR_INIT_EXPR where appropriate.
10749 * expr.c (cplus_expand_expr): Likewise. Simplify.
10750
10751 * decl2.c (finish_file): Remove call to register_exception_table.
10752
10753 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10754
10755 * pt.c (instantiate_class_template): Don't do injection when
10756 processing_template_decl is true, as pollutes current_binding_level
10757 for base classes.
10758
10759 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
10760
10761 * pt.c (maybe_fold_nontype_arg): Add prototype.
10762
10763 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
10764
10765 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
10766 * error.c (dump_expr): Likewise.
10767
10768 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
10769
10770 * typeck.c (build_function_call_real): Remove "inline called before
10771 definition" pedwarn.
10772
10773 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
10774
10775 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
10776
10777 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
10778
10779 * pt.c (type_unification_real): Change __null to type void* with
10780 a warning.
10781
10782 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
10783
10784 * call.c (implicit_conversion): Don't call
10785 build_user_type_conversion_1 with a NULL expr, since it will
10786 crash.
10787
10788 * pt.c (unify): Don't try to unify array bounds if either array is
10789 unbounded.
10790
10791 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
10792
10793 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
10794 Replace extern decls with casts.
10795
10796 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
10797 Update last_parm_cleanup_insn.
10798 (store_after_parms): Remove.
10799 * cp-tree.h: Adjust.
10800
10801 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
10802
10803 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
10804 (finish_file): Check DECL_COMDAT instead of weak|one_only.
10805 (import_export_vtable): Use make_decl_one_only instead of
10806 comdat_linkage for win32 tweak.
10807 (import_export_decl): Likewise.
10808 * pt.c (mark_decl_instantiated): Likewise.
10809
10810 * decl2.c (finish_file): Lose handling of templates in pending_statics.
10811
10812 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
10813
10814 * decl2.c (finish_file): Lose call to expand_builtin_throw.
10815 * except.c (expand_builtin_throw): Remove.
10816 * cp-tree.h: Remove ptr_ptr_type_node.
10817 * decl.c: Likewise.
10818
10819 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
10820
10821 * decl.c (ptr_ptr_type_node): Define.
10822 (init_decl_processing): Initialize it.
10823 * cp-tree.h: Declare it.
10824 * exception.cc (__cp_exception_info): Use __get_eh_info.
10825 (__cp_push_exception): Likewise.
10826 (__cp_pop_exception): Likewise.
10827
10828 From Scott Snyder <snyder@d0sgif.fnal.gov>:
10829 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
10830 saved_pc.
10831 (init_exception_processing): Removed saved_pc initialization.
10832
10833 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
10834
10835 * pt.c (instantiate_decl): Defer all templates but inline functions.
10836
10837 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
10838
10839 * init.c (expand_vec_init): Don't fold a list of parameters.
10840
10841 * decl.c (copy_args_p): Handle copy elision for types with virtual
10842 bases.
10843 * call.c (build_over_call): Likewise.
10844
10845 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
10846
10847 * pt.c (lookup_template_function): Copy the template arguments,
10848 not just the list containing them, to the permanent obstack.
10849
10850 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
10851
10852 * except.c (expand_start_catch_block): suspend_momentary for the
10853 terminate handler.
10854
10855 * error.c (dump_decl): Handle LOOKUP_EXPR.
10856
10857 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
10858
10859 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
10860 permanent obstack if we are processing a template decl.
10861 * typeck.c (build_static_cast): Likewise.
10862 (build_const_cast): Likewise.
10863 (build_reinterpret_cast): Likewise.
10864
10865 * pt.c (coerce_template_parms): Coerce some expressions, even
10866 when processing_template_decl.
10867
10868 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10869
10870 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
10871 handling of pointer difference expressions.
10872
10873 * typeck.c (comp_target_types): Comparison of function/method types
10874 is independent of nptrs.
10875
10876 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
10877
10878 * pt.c (tsubst): Avoid creating pointer to reference and
10879 reference to reference types.
10880
10881 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
10882
10883 * parse.y (do_id): New nonterminal.
10884 (template_id): Use it.
10885
10886 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
10887
10888 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
10889 * spew.c (yylex): Don't do_identifier here.
10890 * decl2.c (build_expr_from_tree): Revert last change.
10891
10892 * decl2.c (build_expr_from_tree): Expand the name for a method call.
10893 * parse.y (object_template_id): Don't try to take the DECL_NAME.
10894
10895 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
10896
10897 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
10898 alloc_expr.
10899 * call.c (build_op_delete_call): Adjust.
10900
10901 * except.c (expand_end_catch_block): Lose rethrow region.
10902 (expand_start_catch_block): Likewise.
10903 (expand_end_catch_block): Don't expand_leftover_cleanups.
10904
10905 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10906
10907 * pt.c (tsubst): Remove tree_cons call (places redundant info into
10908 DECL_TEMPLATE_INSTANTIATION).
10909
10910 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
10911
10912 * tree.c (is_overloaded_fn): Handle getting a fn template.
10913 (really_overloaded_fn): Likewise.
10914 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
10915 * pt.c (check_explicit_specialization): Tweak.
10916 (determine_explicit_specialization): Tweak.
10917
10918 * tree.c, cp-tree.h (get_target_expr): New fn.
10919
10920 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
10921
10922 * pt.c (check_explicit_specialization): Fix misspelling in
10923 diagnostic: `preceeded'.
10924 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
10925 `conversiona'.
10926
10927 1997-12-02 Mark Mitchell <mmitchell@usa.net>
10928
10929 * pt.c (determine_explicit_specialization): Avoid an internal
10930 error for bad specializations.
10931
10932 * method.c (build_overload_value): Handle SCOPE_REF.
10933
10934 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
10935
10936 * class.c (prepare_fresh_vtable): Enable even more complex MI
10937 vtable names.
10938
10939 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
10940
10941 * exception.cc (__check_eh_spec): Optimize a bit.
10942
10943 * exception.cc (__cp_pop_exception): Lose handler arg.
10944 * except.c (do_pop_exception): Likewise.
10945 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
10946 (expand_end_catch_block): Likewise.
10947
10948 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
10949
10950 * pt.c (check_explicit_specialization): Complain about using a
10951 template-id for a non-specialization.
10952
10953 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
10954
10955 * repo.c: Prototype rindex only if needed.
10956 * xref.c: Likewise.
10957
10958 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
10959
10960 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
10961
10962 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
10963
10964 * typeck.c (build_const_cast): Handle references here instead of
10965 handing off to convert_to_reference.
10966
10967 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
10968 TerminateFunctionCall.
10969 (init_exception_processing): Likewise. Terminate et al are now
10970 the fns, not ADDR_EXPRs.
10971 (various): Lose redundant assemble_external calls.
10972 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
10973
10974 * cp-tree.h (struct lang_decl_flags): Add comdat.
10975 (DECL_COMDAT): New macro.
10976 * decl.c (duplicate_decls): Propagate it.
10977 (cp_finish_decl): Handle it.
10978 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
10979
10980 * class.c: Remove static pending_hard_virtuals.
10981 (add_virtual_function): Take pointers to pending_virtuals
10982 and pending_hard_virtuals.
10983 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
10984
10985 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
10986
10987 * decl2.c (import_export_vtable): If we support one_only but not
10988 weak symbols, mark instantiated template vtables one_only.
10989 (import_export_decl): Likewise for tinfo functions.
10990 (finish_vtable_vardecl): Also write out vtables from explicitly
10991 instantiated template classes.
10992 * pt.c (mark_class_instantiated): Revert last change.
10993
10994 * except.c (expand_throw): Call mark_used on the destructor.
10995
10996 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
10997
10998 * lex.c (lang_init): Enable flag_exceptions by default if no
10999 command line switch was specified.
11000
11001 1997-11-26 Mark Mitchell <mmitchell@usa.net>
11002
11003 * pt.c (unify): Handle `void' template parameters in
11004 specializations.
11005
11006 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
11007
11008 * rtti.c (build_dynamic_cast): Handle template case here.
11009 (build_dynamic_cast_1): Not here.
11010
11011 * typeck2.c (digest_init): Make copies where appropriate.
11012
11013 * decl2.c (delete_sanity): resolve_offset_ref.
11014
11015 * except.c: Call terminate without caching so many bits.
11016
11017 * except.c (expand_start_catch_block): Fix catching a reference
11018 to pointer.
11019
11020 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
11021
11022 * init.c (build_new): Copy size to the saveable obstack.
11023
11024 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
11025 TRY_CATCH_EXPR for now.
11026
11027 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
11028
11029 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
11030 has DECL_LANG_SPECIFIC.
11031
11032 * exception.cc (struct cp_eh_info): Add handlers field.
11033 (__cp_push_exception): Initialize it.
11034 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
11035 (__throw_bad_exception): Remove.
11036 * except.c (call_eh_info): Add handlers field.
11037 (get_eh_handlers): New fn.
11038 (push_eh_cleanup): Increment handlers.
11039
11040 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
11041
11042 * except.c (expand_start_eh_spec): Use the try/catch code.
11043 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
11044 doing everything inline.
11045 (init_exception_processing): throw_type_match now takes
11046 const void pointers.
11047 * exception.cc (__check_eh_spec): New fn.
11048 * inc/exception: Neither terminate nor unexpected return.
11049 * decl.c: Make const_ptr_type_node public.
11050 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
11051
11052 * except.c (expand_start_catch_block): We only need the rethrow
11053 region for non-sjlj exceptions.
11054 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
11055
11056 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
11057
11058 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
11059 (various.o): Likewise.
11060 * inc/new: Add placement deletes. Add throw specs for default new.
11061 * new.cc (set_new_handler): Move here from libgcc2.
11062 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
11063 (new): Move from libgcc2. Throw bad_alloc.
11064 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
11065 * decl.c (init_decl_processing): Update exception specs on new and
11066 delete.
11067
11068 * method.c (build_decl_overload_real): Don't mess with global
11069 placement delete.
11070
11071 * init.c (build_new): Check for null throw spec, not nothrow_t.
11072
11073 * decl.c (duplicate_decls): Don't complain about different exceptions
11074 from an internal declaration.
11075
11076 * call.c (build_op_delete_call): Fix check for member fns again.
11077
11078 * decl2.c (import_export_decl): Interface hackery affects
11079 virtual synthesized methods.
11080
11081 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11082
11083 * decl.c (start_decl): Don't just complain about a mismatched
11084 scope, fix it.
11085
11086 * decl.c (make_implicit_typename): Handle case where t is not
11087 actually from context.
11088 * tree.c (get_type_decl): Lose identifier case.
11089 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
11090 * parse.y (nonnested_type): Just use lookup_name.
11091 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
11092
11093 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
11094
11095 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
11096 T was built in C language context (for example, by
11097 output_func_start_profiler).
11098
11099 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
11100
11101 * decl.c (make_implicit_typename): New fn.
11102 (lookup_name_real): Use it. Use current_class_type as the context.
11103
11104 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
11105
11106 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
11107
11108 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11109
11110 * friend.c (do_friend): Warn about non-template friends in templates.
11111
11112 * call.c (build_op_delete_call): Fix handling of inherited delete.
11113
11114 * search.c (dfs_record_inheritance): Ignore template type parms.
11115
11116 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
11117
11118 * call.c (build_new_op): Fix copy error.
11119 (build_op_new_call): New fn.
11120 (build_op_delete_call): New fn.
11121 * cp-tree.h: Declare them.
11122 * init.c (build_new): Use them. Support placement delete.
11123 (build_x_delete): Use build_op_delete_call.
11124 (build_delete): Likewise.
11125 * decl2.c (delete_sanity): Likewise.
11126 (coerce_delete_type): Don't complain about placement delete.
11127
11128 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11129
11130 * call.c (build_new_function_call): Remove unused 'obj' parm.
11131 * cp-tree.h, typeck.c: Adjust.
11132
11133 * init.c (build_new): Make the cleanup last longer.
11134 (expand_vec_init): Call do_pending_stack_adjust.
11135
11136 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
11137
11138 * pt.c (do_type_instantiation): Fix typo.
11139 (mark_class_instantiated): If we support one_only but not weak
11140 symbols, don't mark this as known.
11141
11142 * init.c (build_new): Handle vec delete in EH cleanup.
11143
11144 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11145
11146 * call.c (build_method_call): Call complete_type before checking
11147 for destructor.
11148
11149 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
11150
11151 * decl.c (add_block_current_level): Delete.
11152 * init.c (build_vec_delete_1): Delete build_block and
11153 add_block_current_level calls.
11154
11155 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
11156
11157 * init.c (build_new): Handle freeing allocated memory when the
11158 constructor throws.
11159
11160 * call.c (build_new_method_call): Fix flags arg.
11161
11162 * pt.c (do_type_instantiation): Don't try to instantiate
11163 member templates.
11164 (mark_decl_instantiated): If we support one_only but not
11165 weak symbols, mark this one_only.
11166 * decl2.c (import_export_vtable): Don't defer handling of vtables
11167 if MULTIPLE_SYMBOL_SPACES.
11168
11169 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11170
11171 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
11172
11173 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
11174
11175 * except.c (do_pop_exception): Return a value.
11176
11177 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
11178
11179 * call.c (build_new_method_call): Handle getting a
11180 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
11181 if we got template parms.
11182 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
11183 not just the args.
11184 * decl2.c (build_expr_from_tree): Tweak last change.
11185 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
11186 (maybe_fold_nontype_arg): Split out from tsubst_copy.
11187 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
11188
11189 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11190
11191 * pt.c (tsubst_copy): Handle explicit template arguments in
11192 function calls.
11193 * typeck.c (build_x_function_call): Likewise.
11194 * decl2.c (build_expr_from_tree): Lookup function name if it
11195 hasn't been done.
11196
11197 * pt.c (tsubst): Instantiate template functions properly when
11198 template parameter does not appear in function arguments and return
11199 type.
11200 (comp_template_args): Handle member templates required by tsubst.
11201
11202 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11203
11204 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
11205 previous change.
11206
11207 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11208
11209 * pt.c (coerce_template_parms): Tweak error message.
11210
11211 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
11212 return type defaults to `int', even if there are storage-class
11213 specifiers.
11214
11215 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11216
11217 Complete nested exception support.
11218 * except.c (do_pop_exception): Split out...
11219 (push_eh_cleanup): From here. Handle the EH region by hand.
11220 (expand_start_catch_block): Add a new level for the catch parm.
11221 Move the rethrow region outside the two cleanup regions.
11222 Protect the initializer for the catch parm with terminate.
11223 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
11224 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
11225 popping off the middle of the stack.
11226 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
11227 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
11228 (build_cplus_new): Only wrap CALL_EXPRs.
11229 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
11230 the constructor call.
11231
11232 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11233
11234 * Make-lang.in (c++.distdir): Make inc subdirectory.
11235
11236 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11237
11238 * decl2.c (finish_file): Put back some code.
11239
11240 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11241
11242 * decl2.c (finish_file): Remove redundant code.
11243 * method.c (emit_thunk): Don't let the backend defer generic thunks.
11244
11245 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
11246
11247 * except.c (call_eh_info): Split out...
11248 (push_eh_info): From here.
11249 (expand_builtin_throw): Use it.
11250 (expand_start_catch_block): Move region start back.
11251
11252 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
11253
11254 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
11255 (real_yylex): Record wide strings using target endianness, not host.
11256
11257 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
11258
11259 * repo.c (rindex): Add decl unconditionally.
11260 (get_base_filename, open_repo_file): Don't cast rindex.
11261 * xref.c (rindex): Add decl unconditionally.
11262 (index): Remove unused decl.
11263 (open_xref_file): Don't cast rindex.
11264
11265 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11266
11267 * class.c (build_vbase_path): Propagate the result type properly.
11268
11269 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
11270
11271 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
11272 remaining use of saved_throw_type with a call to get_eh_type.
11273
11274 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
11275
11276 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
11277 (file_name_nondirectory): New function, doing the same as the macro.
11278 (set_typedecl_interface_info): Use it instead of the macro.
11279 (check_newline): Likewise.
11280 (handle_cp_pragma): Likewise.
11281
11282 * repo.c (get_base_filename): Cast result of rindex to char*.
11283 (open_repo_file): Likewise.
11284 * xref.c (open_xref_file): Likewise.
11285 * error.c (dump_char): Make its arg int, not char.
11286
11287 * except.c (push_eh_info): Pass the number of fields - 1 down, not
11288 the exact number of fields.
11289
11290 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
11291
11292 Support for nested exceptions.
11293 * tinfo2.cc (__is_pointer): New fn.
11294 * exception.cc (struct cp_eh_info): Define.
11295 (__cp_exception_info, __uncatch_exception): New fns.
11296 (__cp_push_exception, __cp_pop_exception): New fns.
11297 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
11298 Lose empty_fndecl.
11299 (init_exception_processing): Likewise. __eh_pc is now external.
11300 (push_eh_info): New fn.
11301 (get_eh_{info,value,type,caught}): New fns.
11302 (push_eh_cleanup): Just call __cp_pop_exception.
11303 (expand_start_catch_block): Use push_eh_info. Start the eh region
11304 sooner.
11305 (expand_end_eh_spec): Use push_eh_info.
11306 (expand_throw): Call __cp_push_exception to set up the exception info.
11307 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
11308 when we rethrow.
11309 (expand_builtin_throw): Don't refer to empty_fndecl.
11310
11311 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
11312
11313 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
11314
11315 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
11316
11317 * method.c (build_template_parm_names, build_decl_overload_real):
11318 Add static to definitions.
11319 * pt.c (add_to_template_args, note_template_header,
11320 processing_explicit_specialization, type_unification_real): Likewise.
11321 ({determine,check}_explicit_specialization): Use a single string for
11322 error messages.
11323
11324 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
11325
11326 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
11327 (expand_end_catch_block): Likewise.
11328 (expand_end_eh_spec): Likewise.
11329
11330 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
11331
11332 * decl.c (duplicate_decls): Handle template specializations
11333 correctly.
11334 * error.c (dump_function_name): Fix printing of specializations of
11335 member functions that are not member templates.
11336 * cp-tree.h (processing_specialization): Make global.
11337 * pt.c (processing_specialization): Likewise.
11338 * lex.c (cons_up_default_function): Save and restore
11339 processing_specialization to avoid confusion.
11340
11341 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11342
11343 * decl.c (init_decl_processing): Give null_node unknown* type.
11344 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
11345 (common_type): Likewise.
11346 * error.c (args_as_string): Recognize null_node.
11347
11348 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11349
11350 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
11351 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
11352
11353 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
11354
11355 * Make-lang.in (g++): Include prefix.o.
11356
11357 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
11358
11359 * pt.c (determine_explicit_specialization): Initialize "dummy"
11360 to keep Purify quiet.
11361
11362 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
11363
11364 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
11365 (build_overload_int): Not here.
11366
11367 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
11368
11369 * class.c (build_type_pathname): Remove.
11370 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
11371
11372 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
11373
11374 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
11375 &&label GNU extension.
11376
11377 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
11378
11379 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
11380 so as to avoid incorrect manglings.
11381 * method.c (build_decl_overload_real): Don't mangle return types
11382 for constructors.
11383
11384 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11385
11386 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
11387 scratch_tree_cons): Define as macros for now.
11388 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
11389 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
11390 typeck2.c: Use them and the expression_obstack variants.
11391
11392 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11393
11394 * decl.c (store_return_init): Allow classes with explicit ctors to
11395 be used with the named return values extension.
11396
11397 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
11398
11399 * pt.c (instantiate_decl): Fix previous change.
11400
11401 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
11402
11403 * pt.c (tsubst): Fix thinko.
11404 (instantiate_decl): Really use the original template.
11405
11406 * call.c (build_new_method_call): Use simple constructor_name for
11407 error messages.
11408
11409 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
11410
11411 * method.c (build_underscore_int): Don't use ANSI specific
11412 features.
11413
11414 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11415
11416 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
11417 for our key method; it might have been inlined by -O3.
11418
11419 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
11420
11421 * decl.c (make_typename_type): Do not try to call lookup_field for
11422 non-aggregate types.
11423
11424 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
11425
11426 * typeck.c (build_reinterpret_cast): Tweak.
11427
11428 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
11429
11430 * typeck.c (build_reinterpret_cast): Converting a void pointer
11431 to function pointer with a reinterpret_cast produces a warning
11432 if -pedantic is issued.
11433
11434 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11435
11436 * typeck.c (c_expand_return): Don't warn about returning a
11437 reference-type variable as a reference.
11438
11439 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11440
11441 * method.c (build_static_name): Fix typo.
11442
11443 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
11444
11445 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
11446 OLDDECL before we try to do DECL_USE_TEMPLATE.
11447
11448 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11449
11450 * decl.c (duplicate_decls): Don't warn about template instances.
11451
11452 * typeck.c (mark_addressable): Lose ancient code that unsets
11453 DECL_EXTERNAL.
11454
11455 * pt.c (do_decl_instantiation): Lose support for instantiating
11456 non-templates.
11457
11458 * call.c (build_new_function_call): Fix handling of null explicit
11459 template args.
11460 (build_new_method_call): Likewise.
11461
11462 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
11463
11464 * method.c (build_underscore_int): Fix typo.
11465
11466 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
11467
11468 * tree.c (print_lang_statistics): #if 0 call to
11469 print_inline_obstack_statistics until its definition is checked in.
11470
11471 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
11472
11473 * decl2.c (finish_file): Move dump_tree_statistics to end.
11474
11475 * pt.c (instantiate_decl): Look for the original template.
11476 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
11477 of member templates.
11478
11479 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11480
11481 * Makefile.in (g++FAQ.*): New rules.
11482 (CONFLICTS): Update.
11483 * g++FAQ.texi: Moved from libg++.
11484
11485 * parse.y (PFUNCNAME): Only specify the type once.
11486
11487 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
11488
11489 * lex.c (real_yylex): Clean up the code to fully behave the way
11490 the c-lex.c parser does for complex and real numbers.
11491
11492 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11493
11494 * method.c (build_decl_overload_real): Reformat.
11495
11496 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
11497
11498 * method.c (synthesize_method): If at_eof, determine our linkage.
11499
11500 1997-09-29 Paul Eggert <eggert@twinsun.com>
11501
11502 * lex.c (real_yylex): Treat `$' just like `_', except issue a
11503 diagnostic if !dollars_in_ident or if pedantic.
11504
11505 * lang-specs.h (@c++): -ansi no longer implies -$.
11506
11507 * decl2.c (lang_decode_option):
11508 -traditional and -ansi now do not mess with
11509 dollars_in_ident.
11510
11511 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
11512
11513 * Makefile.in (parse.o, decl.o): Also depend on
11514 $(srcdir)/../except.h $(srcdir)/../output.h.
11515 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
11516 $(srcdir)/../except.h $(srcdir)/../output.h.
11517 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
11518 ../insn-codes.h.
11519
11520 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
11521
11522 * expr.c (cplus_expand_expr): Make it static.
11523
11524 * decl2.c, init.c, typeck.c: Include "expr.h".
11525 (expand_expr): Use proper values when calling the function.
11526
11527 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
11528
11529 * lang-options.h: New -Wold-style-cast flag.
11530 * cp-tree.h (warn_old_style_cast): New variable.
11531 * decl2.c (warn_old_style_cast): Likewise.
11532 (lang_decode_option): Support -Wold-style-cast.
11533 (reparse_absdcl_as_casts): Produce old-style-cast warning.
11534
11535 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11536
11537 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
11538 TREE_USED, reset value based on already_used.
11539
11540 * init.c (expand_member_init): Revert change.
11541
11542 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
11543
11544 * cp-tree.h, decl.c, decl2.c, pt.c:
11545 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
11546
11547 * decl2.c (lang_decode_option): Add missing ;.
11548
11549 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
11550
11551 * friend.c (do_friend): Disable injection for all template-derived
11552 decls.
11553 * decl2.c (lang_decode_option): Handle -fguiding-decls.
11554 * parse.y (notype_template_declarator): New nonterminal.
11555 (direct_notype_declarator): Use it.
11556 (complex_direct_notype_declarator): Likewise.
11557 (object_template_id): Accept any kind of identifier after TEMPLATE.
11558 (notype_qualified_id): Don't add template declarators here.
11559
11560 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
11561
11562 * call.c (add_template_candidate): Add explicit_targs parameter.
11563 (build_scoped_method_call): Use it.
11564 (build_overload_call_real): Likewise.
11565 (build_user_type_conversion_1): Likewise.
11566 (build_new_function_call): Likewise.
11567 (build_object_call): Likewise.
11568 (build_new_op): Likewise.
11569 (build_new_method_call): Likewise.
11570 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
11571 (build_new_method_call): Likewise.
11572
11573 * class.c (finish_struct_methods): Add specialization pass to
11574 determine which methods were specializing which other methods.
11575 (instantiate_type): Handle TEMPLATE_ID_EXPR.
11576
11577 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
11578
11579 * cp-tree.h (name_mangling_version): New variable.
11580 (flag_guiding_decls): Likewise.
11581 (build_template_decl_overload): New function.
11582 (begin_specialization): Likewise.
11583 (reset_specialization): Likewise.
11584 (end_specialization): Likewise.
11585 (determine_explicit_specialization): Likewise.
11586 (check_explicit_specialization): Likewise.
11587 (lookup_template_function): Likewise.
11588 (fn_type_unification): Add explicit_targs parameter.
11589 (type_unification): Likewise.
11590
11591 * decl.c (duplicate_decls): Add smarts for explicit
11592 specializations.
11593 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
11594 specializations.
11595 (grokfndecl): Call check_explicit_specialization.
11596
11597 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
11598 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
11599 (check_classfn): Handle specializations.
11600
11601 * error.c (dump_function_name): Print specialization arguments.
11602
11603 * friend.c (do_friend): Don't call pushdecl for template
11604 instantiations.
11605
11606 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
11607
11608 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
11609 and -fno-guiding-decls.
11610
11611 * lex.c (identifier_type): Return PFUNCNAME for template function
11612 names.
11613
11614 * method.c (build_decl_overload_real): New function.
11615 (build_template_parm_names): New function.
11616 (build_overload_identifier): Use it.
11617 (build_underscore_int): New function.
11618 (build_overload_int): Use it. Add levels for template
11619 parameters.
11620 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
11621 (build_overload_nested_names): Handle template type parameters.
11622 (build_template_decl_overload): New function.
11623
11624 * parse.y (YYSTYPE): New ntype member.
11625 (nested_name_specifier): Use it.
11626 (nested_name_specifier_1): Likewise.
11627 (PFUNCNAME): New token.
11628 (template_id, object_template_id): New non-terminals.
11629 (template_parm_list): Note specializations.
11630 (template_def): Likewise.
11631 (structsp): Likewise.
11632 (fn.def2): Handle member template specializations.
11633 (component_decl_1): Likewise.
11634 (direct_notype_declarator): Handle template-ids.
11635 (component_decl_1): Likewise.
11636 (direct_notype_declarator): Handle template-ids.
11637 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
11638
11639 * pt.c (processing_specializations): New variable.
11640 (template_header_count): Likewise.
11641 (type_unification_real): New function.
11642 (processing_explicit_specialization): Likewise.
11643 (note_template_header): Likewise.
11644 (is_member_template): Handle specializations.
11645 (end_template_decl): Call reset_specialization.
11646 (push_template_decl): Handle member template specializations.
11647 (tsubst): Likewise.
11648 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
11649 (instantiate_template): Handle specializations.
11650 (instantiate_decl): Likewise.
11651 (fn_type_unification): Handle explicit_targs.
11652 (type_unification): Likewise. Allow incomplete unification
11653 without an error message, if allow_incomplete.
11654 (get_bindings): Use new calling sequence for fn_type_unification.
11655
11656 * spew.c (yylex): Handle PFUNCNAME.
11657
11658 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
11659 (really_overloaded_fn): Likewise.
11660 (get_first_fn): Handle function templates.
11661
11662 * typeck.c (build_x_function_call): Use really_overloaded_fn.
11663 Handle TEMPLATE_ID_EXPR.
11664 (build_x_unary_op): Likewise.
11665 (build_unary_op): Likewise.
11666 (mark_addressable): Templates whose address is taken are marked
11667 as used.
11668
11669 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
11670
11671 * decl.c (init_decl_processing): Declare __builtin_constant_p as
11672 accepting any kind of type, not only int.
11673
11674 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
11675
11676 * search.c (get_matching_virtual): Notice virtual bases when sorrying
11677 about covariant returns.
11678
11679 * parse.y (member_init): Also imply typename here. Remove ancient
11680 extension for initializing base members.
11681
11682 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
11683
11684 Handle multi-level typenames and implicit typename in base list.
11685 * parse.y (typename_sub{,[0-2]}): New rules.
11686 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
11687 (nonnested_type): New rule.
11688 (complete_type_name): Use it.
11689 (base_class.1): Use typename_sub and nonnested_type.
11690 (nested_name_specifier): Don't elide std:: here.
11691 * decl.c (make_typename_type): Handle getting a type for NAME.
11692 (lookup_name_real): Turn std:: into :: here.
11693
11694 Rvalue conversions were removed in London.
11695 * call.c (is_subseq): Don't consider lvalue transformations.
11696 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
11697 (joust): Re-enable ?: kludge.
11698
11699 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
11700
11701 * decl.c (start_function): Up warning of no return type to be a
11702 pedwarn.
11703
11704 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11705
11706 * init.c (expand_member_init): Don't set TREE_USED.
11707 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
11708 set,don't clear TREE_USED wholesale.
11709
11710 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
11711
11712 * call.c (build_over_call): Do require_complete_type before
11713 build_cplus_new.
11714
11715 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
11716
11717 * search.c (lookup_field): Call complete_type in all cases.
11718
11719 * decl.c (finish_function): Just warn about flowing off the end.
11720
11721 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
11722
11723 * decl.c (grokparms): Don't bash a permanent list node if we're
11724 in a function.
11725
11726 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
11727
11728 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
11729
11730 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
11731
11732 * call.c (build_new_op): Give better error for syntactically
11733 correct, but semantically invalid, use of undeclared template.
11734
11735 * call.c (compare_qual): Handle pmfs.
11736
11737 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
11738 after the exception spec.
11739
11740 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
11741
11742 * call.c (null_ptr_cst_p): Integer type, not integral type.
11743
11744 * call.c (joust): Disable warnings until they can be moved to the
11745 right place.
11746
11747 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
11748
11749 * Makefile.in, config-lang.in: Convert to autoconf.
11750
11751 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
11752
11753 * decl.c (lookup_name_real): Add implicit 'typename' to types from
11754 base classes.
11755
11756 * pt.c (most_specialized_class): Fix typo.
11757 (tsubst): Move constant folding to TREE_VEC case.
11758
11759 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
11760
11761 * pt.c (do_poplevel): Don't warn about unused local variables
11762 while processing_template_decl since we don't always know whether
11763 or not they will need constructing/destructing.
11764
11765 * pt.c (uses_template_parms): Check the values of an enumeration
11766 type to make sure they don't depend on template parms.
11767
11768 * decl.c (make_typename_type): Don't lookup the field if the
11769 context uses template parms, even if we're not
11770 processing_template_decl at the moment.
11771
11772 * pt.c (coerce_template_parms): Avoid looking at the
11773 TYPE_LANG_DECL portion of a typename type, since there won't be
11774 one.
11775 (tsubst): Do constant folding as necessary to make sure that
11776 arguments passed to lookup_template_class really are constants.
11777
11778 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
11779
11780 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
11781 * decl2.c (finish_file): Only register exception tables if we
11782 need to.
11783
11784 * decl.c (init_decl_processing): Add __builtin_[fs]p.
11785
11786 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11787
11788 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
11789
11790 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
11791
11792 * error.c (dump_decl): Avoid crashing when presented with a
11793 uninitialized constant, as can occur with a template parameter.
11794 (dump_expr): Make sure that there are enough levels of
11795 current_template_parms before we start diving through them.
11796
11797 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
11798
11799 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
11800 c-typeck.c.
11801
11802 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11803
11804 * except.c (expand_throw): Call build_delete for all
11805 exception types, not just objects with destructors.
11806
11807 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
11808
11809 * decl.c (current_local_enum): Remove static.
11810 * pt.c (tsubst_enum): Save and restore value of current_local_enum
11811 in case template is expanded in enum decl.
11812 (instantiate_class_template): Use new tsubst_enum signature.
11813 (tsubst_expr): Likewise.
11814
11815 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
11816
11817 * pt.c (begin_member_template_processing): Take a function as
11818 argument, not a set of template arguments. Use the template
11819 parameters, rather than the arguments. Handle non-type parameters
11820 correctly. Push a binding level for the parameters so that multiple
11821 member templates using the same parameter names can be declared.
11822 (end_member_template_processing): Pop the binding level.
11823 (push_template_decl): Mark member templates as static when
11824 appropriate.
11825
11826 * lex.c (do_pending_inlines): Pass the function, not its template
11827 arguments, to begin_member_template_processing.
11828 (process_next_inline): Likewise.
11829 (do_pending_defargs): Likewise.
11830
11831 * error.c (dump_expr): Obtain the correct declaration for a
11832 TEMPLATE_CONST_PARM.
11833
11834 * call.c (add_template_conv_candidate): New function.
11835 (build_object_call): Handle member templates, as done in the other
11836 build_ functions.
11837
11838 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
11839
11840 * decl.c (replace_defag): Undo previous change.
11841 * lex.c (do_pending_defargs): Deal with member templates.
11842
11843 * pt.c (is_member_template): Avoid crashing when passed a
11844 non-function argument.
11845
11846 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11847
11848 * class.c (grow_method): Remove check for redeclaration.
11849
11850 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
11851
11852 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
11853 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
11854 (PRIMARY_TEMPLATE_P): Use it.
11855 * call.c (build_overload_call_real): Use it.
11856 * class.c (instantiate_type): Likewise.
11857 * decl.c (decls_match): Likewise.
11858 * method.c (build_overload_identifier): Likewise.
11859 * pt.c (push_template_decl): Likewise.
11860 (classtype_mangled_name): Likewise.
11861 (lookup_template_class): Likewise.
11862
11863 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
11864 DECL_NTPARMS to conform to usage elsewhere.
11865 * call.c (add_template_candidate): Likewise.
11866 * class.c (instantiate_type): Likewise.
11867 * pt.c (instantiate_template): Likewise.
11868 (get_bindings): Likewise.
11869
11870 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
11871 is_member_template.
11872
11873 * pt.c (unify): Undo changes to allow multiple levels of template
11874 parameters.
11875 (type_unification): Likewise.
11876 (fn_type_unification): Likewise.
11877 (get_class_bindings): Likewise.
11878 * cp-tree.h (Likewise).
11879
11880 * decl.c (replace_defarg): Check that the type of the default
11881 parameter does not invlove a template type before complaining
11882 about the initialization.
11883
11884 * error.c (dump_expr): Deal with template constant parameters in
11885 member templates correctly.
11886
11887 * pt.c (is_member_template): Deal with class specializations
11888 correctly.
11889 (tsubst): Handle "partial instantiation" of member templates
11890 correctly.
11891
11892 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
11893
11894 * pt.c (type_unification): Change calling sequence to allow for
11895 multiple levels of template parameters.
11896 (tsubst_expr): Likewise.
11897 (tsubst): Likewise.
11898 (tsubst_copy): Likewise.
11899 (instantiate_template): Likewise.
11900 (unify): Likewise.
11901 * call.c (build_overload_call_real): Use it.
11902 (add_builtin_candidate): Use it.
11903 (build_new_method_call): Use it.
11904 * class.c (instantiate_type): Use it.
11905 * decl.c (grokdeclarator): Use it.
11906 * decl2.c (finish_file): Use it.
11907 * method.c (build_overload_identifier): Use it.
11908
11909 * call.c (add_template_candidate): Add additional parameter for
11910 the function return type. Call fn_type_unification istead of
11911 type_unification.
11912 (build_user_type_conversion_1): Handle member templates.
11913 (build_new_function_call): Likewise.
11914 (build_new_op): Likewise.
11915 (build_new_method_call): Likewise.
11916
11917 * class.c (grow_method): Don't give an error message indicating
11918 that two member templates with the same name are ambiguous.
11919 (finish_struct): Treat member template functions just like member
11920 functions.
11921
11922 * cp-tree.h (check_member_template): Add declaration.
11923 (begin_member_template_processing): Likewise.
11924 (end_member_template_processing): Likewise.
11925 (fn_type_unification): Likewise.
11926 (is_member_template): Likewise.
11927 (tsubst): Change prototype.
11928 (tsubst_expr): Likewise.
11929 (tsubst_copy): Likewise.
11930 (instantiate_template): Likewise.
11931 (get_bindings): Likewise.
11932
11933 * decl.c (decls_match): Handle multiple levels of template
11934 parameters.
11935 (pushdecl): Handle template type params just like other type
11936 declarations.
11937 (push_class_level_binding): Return immediately if the
11938 class_binding_level is NULL.
11939 (grokfndecl): If check_classfn() returns a member_template, use
11940 the result of the template, not the template itself.
11941
11942 * decl2.c (check_member_template): New function. Check to see
11943 that the entity declared to be a member template can be one.
11944 (check_classfn): Allow redeclaration of member template functions
11945 with different types; the new functions can be specializations or
11946 explicit instantiations.
11947
11948 * error.c (dump_decl): Handle multiple levels of template
11949 parameters.
11950 (dump_function_decl): Update to handle function templates.
11951
11952 * lex.c (do_pending_inlines): Set up template parameter context
11953 for member templates.
11954 (process_next_inline): Likewise.
11955
11956 * method.c (build_overload_identifier): Adjust for multiple levels
11957 of template parameters.
11958
11959 * parse.y (fn.def2): Add member templates.
11960 (component_decl_1): Likewise.
11961
11962 * pt.c (begin_member_template_processing): New function.
11963 (end_member_template_processing): Likewise.
11964 (is_member_template): Likewise.
11965 (fn_type_unification): Likewise.
11966 (current_template_parms): Return a vector of all the template
11967 parms, not just the innermost level of parms.
11968 (push_template_decl): Deal with the possibility of member
11969 templates.
11970 (lookup_template_class): Likewise.
11971 (uses_template_parms): Likewise.
11972 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
11973 TEMPLATE_CONST_PARM to deal with multiple levels of template
11974 arguments. Add processing of TEMPLATE_DECL to produce new
11975 TEMPLATE_DECLs from old ones.
11976 (do_decl_instantiation): Handle member templates.
11977
11978 * search.c (lookup_fnfields_1): Handle member template conversion
11979 operators.
11980
11981 * tree.c (cp_tree_equal): Check the levels, as well as the
11982 indices, of TEMPLATE_CONST_PARMs.
11983
11984 * typeck.c (comptypes): Check the levels, as well as the indices,
11985 fo TEMPLATE_TYPE_PARMs.
11986 (build_x_function_call): Treat member templates like member
11987 functions.
11988
11989 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
11990
11991 * typeck.c (c_expand_return): Always convert_for_initialization
11992 before checking for returning a pointer to local.
11993
11994 * pt.c (type_unification): If strict and the function parm doesn't
11995 use template parms, just compare types.
11996
11997 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
11998
11999 * method.c (build_overloaded_value): Replace direct call
12000 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
12001
12002 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12003
12004 * typeck.c (convert_arguments): Don't arbitrarily choose the first
12005 of a set of overloaded functions.
12006
12007 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12008
12009 * lex.c (real_yylex): Don't elide __FUNCTION__.
12010
12011 * method.c (build_overload_value): Add in_template parm.
12012 (build_overload_int): Likewise.
12013 (build_overload_identifier): Pass it.
12014
12015 * decl.c (duplicate_decls): Don't bash a previous template
12016 definition with a redeclaration.
12017
12018 * pt.c (unify): float doesn't match double.
12019
12020 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
12021 TYPE_DECL. Handle getting non-template types.
12022 * parse.y (explicit_instantiation): Use typespec instead of
12023 aggr template_type.
12024
12025 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
12026
12027 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
12028
12029 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
12030
12031 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
12032 (compare_ics): Likewise.
12033
12034 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12035
12036 * call.c (joust): Warn about choosing one conversion op over
12037 another because of 'this' argument when the other return type is
12038 better.
12039 (source_type): New fn.
12040
12041 * call.c (build_new_op): Strip leading REF_BIND from first operand
12042 to builtin operator.
12043
12044 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
12045 use its RTL.
12046
12047 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
12048
12049 * call.c (null_ptr_cst_p): Remove support for (void*)0.
12050
12051 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
12052
12053 * typeck.c (expand_target_expr): Make definition match declaration.
12054
12055 * class.c (get_basefndecls): Make definition match declaration.
12056
12057 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
12058
12059 * input.c (sub_getch): Eventually give up and release the input file.
12060
12061 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
12062 right place.
12063
12064 * call.c (joust): Tweak message.
12065
12066 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
12067
12068 * error.c (type_as_string): Put const/volatile on template type
12069 parameters where appropriate.
12070
12071 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
12072
12073 * call.c (strictly_better): Make arguments unsigned ints.
12074
12075 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
12076
12077 * lex.c (real_yylex): Refer to __complex instead of complex.
12078
12079 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
12080
12081 * lex.c (real_yylex): Don't use getc directly.
12082
12083 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12084
12085 * call.c (is_subseq): Don't try to be clever.
12086
12087 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
12088
12089 * parse.y, pt.c: Include "except.h".
12090 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
12091 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
12092 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
12093 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
12094 prototyping.
12095
12096 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
12097
12098 * decl2.c (mark_vtable_entries): Instead of replacing pure
12099 virtuals with a reference to __pure_virtual, copy the decl and
12100 change the RTL.
12101
12102 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12103
12104 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
12105
12106 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
12107
12108 * pt.c (instantiate_class_template): Call repo_template_used
12109 before finish_prevtable_vardecl.
12110
12111 * call.c (is_subseq): New fn.
12112 (compare_ics): Use it.
12113
12114 * repo.c (finish_repo): Don't crash on no args.
12115
12116 * parse.y (named_complex_class_head_sans_basetype): Handle
12117 explicit global scope.
12118 * decl2.c (handle_class_head): New fn.
12119
12120 * pt.c (unify): Add CONST_DECL case.
12121
12122 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12123
12124 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
12125
12126 * cp-tree.h (report_type_mismatch): Add prototype.
12127 * call.c (build_overload_call_real): Remove erroneous fourth
12128 argument to report_type_mismatch.
12129 (build_user_type_conversion_1): Remove erroneous second arg to
12130 tourney.
12131 (build_new_function_call): Likewise.
12132 (build_object_call): Likewise.
12133 (build_new_op): Likewise.
12134 (build_new_method_call): Likewise.
12135
12136 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12137
12138 * error.c (dump_decl): Don't bother processing a function with no
12139 DECL_LANG_SPECIFIC.
12140
12141 * method.c (emit_thunk): Call init_function_start in the macro case.
12142
12143 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
12144
12145 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
12146 defined and used to set flag_vtable_thunks.
12147
12148 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12149
12150 * parse.y: Don't clear the inlines from their obstack until they've
12151 all been processed.
12152
12153 * decl.c (duplicate_decls): Don't complain about exception
12154 specification mismatch if flag_exceptions is off.
12155
12156 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
12157
12158 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
12159
12160 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
12161
12162 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
12163 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
12164 Include <stdio.h> before include files that formerly used STDIO_PROTO.
12165
12166 * decl.c, g++spec.c, lex.c, method.c, repo.c:
12167 Include "config.h" first, as per autoconf manual.
12168
12169 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12170
12171 * decl.c (duplicate_decls): Tweak wording.
12172 * lex.c (do_pending_defargs): Don't die if we see a default arg
12173 that isn't a DEFAULT_ARG.
12174 * error.c (dump_expr): Handle DEFAULT_ARG.
12175
12176 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
12177 * lang-options.h: Add -fhandle-exceptions.
12178
12179 * class.c (build_vtable): Vtables are artificial.
12180 (prepare_fresh_vtable): Likewise.
12181
12182 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12183
12184 * cvt.c (ocp_convert): After converting to the target type, set
12185 LOOKUP_NO_CONVERSION.
12186
12187 * call.c (joust): Warn about potentially confusing promotion rules
12188 with -Wsign-promo.
12189 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
12190
12191 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
12192
12193 * exception.cc: Declare __terminate_func with noreturn attribute.
12194
12195 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
12196
12197 * parse.y: Break out eat_saved_input, handle errors.
12198 (function_try_block): Use compstmt instead of compstmt_or_error.
12199
12200 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12201
12202 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
12203
12204 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12205
12206 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
12207 existence of cc1plus check whether $(LANGUAGES) contains C++.
12208
12209 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12210
12211 * method.c (do_build_copy_constructor): When copying an anonymous
12212 union member loop around to handle nested anonymous unions. Use
12213 the offset of the member relative to the outer structure, not the
12214 union.
12215
12216 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12217
12218 * call.c (resolve_args): New fn.
12219 (build_new_function_call): Use it.
12220 (build_object_call): Likewise.
12221 (build_new_method_call): Likewise.
12222
12223 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12224
12225 * call.c (build_over_call): tsubst all default parms from templates.
12226
12227 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12228
12229 * decl.c (struct cp_function): Add static_labelno.
12230 (push_cp_function_context): Save it.
12231 (pop_cp_function_context): Restore it.
12232
12233 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12234
12235 * typeck.c (build_component_ref_1): Convert from reference.
12236
12237 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12238
12239 * parse.y (current_declspecs, prefix_attributes): Initialize to
12240 NULL_TREE.
12241
12242 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
12243 before we try to force it to be a TREE_LIST.
12244 (decl): Make sure $1.t is non-nil.
12245
12246 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12247
12248 * pt.c (uses_template_parms): Handle template first-parse codes.
12249
12250 * decl.c (cp_finish_decl): Only warn about user-defined statics.
12251
12252 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12253
12254 * pt.c (unify): Handle BOOLEAN_TYPE.
12255
12256 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
12257 * pt.c (tsubst): Don't set it.
12258 * call.c (build_over_call): Use uses_template_parms.
12259
12260 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
12261
12262 * method.c (build_overload_nested_name): Use static_labelno
12263 instead of var_labelno.
12264 (build_qualified_name): New fn.
12265 (build_overload_name): Split out from here.
12266 (build_static_name): Use build_qualified_name.
12267 * decl.c (cp_finish_decl): Statics in extern inline functions
12268 have comdat linkage.
12269 (start_function): Initialize static_labelno.
12270
12271 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12272
12273 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
12274 before "all member functions in class [] are private".
12275
12276 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12277
12278 * lex.c (do_scoped_id): convert_from_reference.
12279 * init.c (build_offset_ref): Likewise.
12280
12281 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
12282
12283 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
12284
12285 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12286
12287 * typeck.c (get_member_function_from_ptrfunc): Promote index
12288 before saving it.
12289
12290 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12291
12292 * tree.c (layout_basetypes): Move non-virtual destructor warning.
12293 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
12294
12295 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12296
12297 * decl.c (grokdeclarator): Call add_defarg_fn for the function
12298 type, too.
12299 * lex.c (add_defarg_fn): Adjust.
12300 (do_pending_defargs): Adjust. Don't skip the first parm.
12301
12302 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
12303
12304 * decl.c (build_enumerator): Global enumerators are also readonly.
12305
12306 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
12307 (build_dynamic_cast): Call it and convert_from_reference.
12308
12309 * lex.c (add_defarg_fn): New fn.
12310 (snarf_defarg): Don't add to defarg_types.
12311 (do_pending_defargs): Lose defarg_types. All fns we process now
12312 have defargs.
12313 * decl.c (grokfndecl): Call add_defarg_fn.
12314
12315 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
12316 * cp-tree.def: Add DEFAULT_ARG.
12317 * spew.c (yylex): Call snarf_defarg as appropriate.
12318 * parse.y: New tokens DEFARG and DEFARG_MARKER.
12319 (defarg_again, pending_defargs, defarg, defarg1): New rules.
12320 (structsp): Use pending_defargs.
12321 (parms, full_parm): Use defarg.
12322 * lex.c (init_lex): Initialize inline_text_firstobj.
12323 (do_pending_inlines): Never pass the obstack to feed_input.
12324 (process_next_inline): Call end_input instead of restore_pending_input.
12325 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
12326 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
12327 * input.c (end_input): New fn.
12328 (sub_getch): At the end of some fed input, just keep returning EOF
12329 until someone calls end_input.
12330 Remove 'obstack' field from struct input_source.
12331 * decl.c (grokparms): Handle DEFAULT_ARG.
12332 (replace_defarg): New fn.
12333 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
12334
12335 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12336
12337 * call.c (implicit_conversion): If nothing else works, try binding
12338 an rvalue to a reference.
12339
12340 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
12341
12342 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
12343 ifndef for Cygwin32 to include SIGSEGV.
12344
12345 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
12346
12347 * class.c (finish_struct_1): Only complain about pointers without
12348 copy stuff if there are any constructors.
12349
12350 * rtti.c (build_dynamic_cast): Call complete_type on the types.
12351
12352 * decl.c (grokfndecl): If the function we chose doesn't actually
12353 match, die.
12354
12355 * decl2.c (grokclassfn): Don't specify 'const int' for the
12356 artificial destructor parm.
12357
12358 * pt.c (type_unification): If we are called recursively, nothing
12359 decays.
12360
12361 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
12362
12363 * decl.c (init_decl_processing): Stop trying to catch signals
12364 other than SIGABRT since the Cygwin32 library doesn't support
12365 them correctly yet. This fixes a situation in which g++ causes
12366 a hang on SIGSEGVs and other such signals in our Win32-hosted
12367 tools.
12368
12369 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
12370
12371 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
12372
12373 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
12374
12375 * typeck2.c (store_init_value): Always return the value if our
12376 type needs constructing.
12377
12378 * method.c (hack_identifier): Convert class statics from
12379 reference, too.
12380
12381 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12382
12383 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
12384
12385 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
12386
12387 * typeck.c (c_expand_return): Make sure we clean up temporaries at
12388 the end of return x;
12389
12390 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12391
12392 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
12393
12394 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
12395
12396 * except.c (expand_builtin_throw): Add support
12397 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
12398
12399 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
12400
12401 * repo.c (extract_string): Null-terminate.
12402
12403 * cp-tree.h (TI_SPEC_INFO): New macro.
12404 (CLASSTYPE_TI_SPEC_INFO): New macro.
12405 * pt.c (push_template_decl): Correctly determine # of template parms
12406 for partial specs.
12407
12408 * call.c (compare_ics): Really fix 'this' conversions.
12409
12410 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
12411 non-template fn.
12412
12413 * pt.c (push_template_decl): Complain about mismatch in # of
12414 template parms between a class template and a member template.
12415
12416 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12417
12418 * method.c (synthesize_method): You can't call
12419 function_cannot_inline_p after finish_function.
12420 * decl.c (finish_function): Turn on flag_inline_functions and turn
12421 off DECL_INLINE before handing a synthesized method to the
12422 backend.
12423
12424 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12425
12426 * method.c (synthesize_method): Remove July 30 change to never set
12427 DECL_INLINE if at_eof.
12428
12429 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
12430
12431 * xref.c (GNU_xref_member): Ensure that the node has a
12432 decl_lang_specific part before checking DECL_FRIEND_P.
12433
12434 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
12435
12436 * pt.c (instantiate_class_template): Diagnose non-class types used
12437 as bases.
12438
12439 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
12440
12441 * typeck.c (build_conditional_expr): Use convert_for_initialization
12442 instead of convert_and_check.
12443
12444 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12445
12446 * parse.y (typespec): Don't pedwarn for typeof.
12447
12448 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
12449
12450 * repo.c (finish_repo): Only check changes if we would write a
12451 repo file.
12452
12453 * call.c (compare_ics): Fix handling of 'this' conversions.
12454
12455 * pt.c (do_decl_instantiation): Support static data too. Rename
12456 from do_function_instantiation.
12457 * cp-tree.h: Adjust.
12458 * parse.y: Adjust.
12459
12460 * repo.c (extract_string): New fn.
12461 (get_base_filename): Use it.
12462 (init_repo): Compare old args with current args.
12463
12464 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
12465
12466 * Makefile.in, Make-lang.in: Protect C-ls with a comment
12467 character, idea from Paul Eggert <eggert@twinsun.com>.
12468
12469 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
12470
12471 * typeck.c (c_expand_return): Be more persistent in looking for
12472 returned temps.
12473
12474 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
12475 pointer to reference.
12476
12477 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
12478
12479 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
12480
12481 * init.c (build_member_call, build_offset_ref):
12482 Use do_scoped_id instead of do_identifier.
12483
12484 * cvt.c (convert): Remove bogosity.
12485
12486 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12487
12488 * cvt.c (build_up_reference): Do checks of ARGTYPE and
12489 TARGET_TYPE before trying to use get_binfo.
12490
12491 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
12492
12493 * cvt.c (build_up_reference): Call get_binfo to get access control.
12494
12495 * decl2.c (import_export_decl): If we don't support weaks, leave
12496 statics undefined.
12497
12498 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
12499
12500 * except.c (expand_builtin_throw): Add support for machines that
12501 cannot access globals after throw's epilogue when
12502 -fno-sjlj-exceptions is used.
12503
12504 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
12505
12506 * parse.y: 'std::' becomes '::'.
12507 * lex.c (real_yylex): Remove 'namespace' warning.
12508 * init.c (build_member_call): Ignore 'std::'.
12509 (build_offset_ref): Likewise.
12510 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
12511 (do_toplevel_using_decl): Ignore 'using std::whatever'.
12512 * decl.c (push_namespace): Just sorry.
12513 (pop_namespace): Nop.
12514 (init_decl_processing): Declare std namespace.
12515
12516 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
12517
12518 * search.c (push_class_decls): A name which ambiguously refers to
12519 several instantiations of the same template just refers to the
12520 template.
12521
12522 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
12523
12524 * decl.c (build_enumerator): Fix problem with unsigned long
12525 enumerated values being smashed to ints, causing overflow
12526 when computing next enumerated value (for enum values around
12527 MAX_VAL).
12528
12529 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12530
12531 * typeck.c (build_component_ref): Only call mark_used on a decl.
12532
12533 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12534
12535 * typeck.c (build_c_cast): Make the check for a ptr to function
12536 more specific before possible default_conversion call.
12537
12538 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
12539
12540 * except.c (expand_exception_blocks): Simplify and fix and make
12541 sure we don't end a region in a sequence, as expand_end_bindings
12542 doesn't like it.
12543
12544 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
12545
12546 * except.c (init_exception_processing): Mark terminate as not
12547 returning so that the optimizer can optimize better.
12548
12549 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
12550
12551 * cvt.c (convert): Don't do any extra work, if we can avoid it
12552 easily.
12553
12554 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
12555
12556 * *.[chy]: Change cp_convert to ocp_convert, change convert to
12557 cp_convert. convert is now reserved for the backend, and doesn't
12558 have the semantics a frontend person should ever want.
12559
12560 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
12561
12562 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
12563 Lose -traditional support.
12564
12565 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12566
12567 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
12568
12569 * parse.y (self_reference): Do it for templates, too.
12570 * class.c (pushclass): Don't overload_template_name; the alias
12571 generated by build_self_reference serves the same purpose.
12572
12573 * tree.c (list_hash): Make static, take more args.
12574 (list_hash_lookup): Likewise.
12575 (list_hash_add): Make static.
12576 (list_hash_canon): Lose.
12577 (hash_tree_cons): Only build a new node if one isn't already in the
12578 hashtable.
12579 (hash_tree_chain): Use hash_tree_cons.
12580 * cp-tree.h: Adjust.
12581 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
12582 of calling lookup_name.
12583
12584 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
12585
12586 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
12587 doesn't refer to the CONST_DECLs.
12588
12589 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
12590
12591 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
12592 is bigger.
12593 (expand_class_desc): Convert the last argument to a sizetype.
12594
12595 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12596
12597 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
12598 __real__): Add reswords.
12599 * hash.h: Regenerate.
12600 * lex.h (rid): Add RID_COMPLEX.
12601 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
12602 * lex.c (init_lex): Add building of RID_COMPLEX.
12603 (real_yylex): General cleanup in line with what c-lex.c also has,
12604 sans the cruft for traditional; add handling of SPEC_IMAG, complex
12605 types, and imaginary numeric constants.
12606 * parse.y (REALPART, IMAGPART): Add tokens.
12607 (unary_expr): Add REALPART and IMAGPART rules.
12608 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
12609 * decl.c (complex_{integer,float,double,long}_type_node): Define
12610 types.
12611 (init_decl_processing): Set up the types.
12612 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
12613 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
12614 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
12615 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
12616 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
12617 COMPLEX_TYPE case.
12618 * method.c (build_overload_name): Add handling of the different
12619 COMPLEX_TYPEs, prefixing them with `J'.
12620 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
12621 as a template parm.
12622 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
12623 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
12624 (mapcar): Handle COMPLEX_CST.
12625 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
12626 (common_type): Add code for complex types.
12627 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
12628 (convert_for_assignment): Likewise.
12629 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
12630
12631 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
12632
12633 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
12634 tsubst_expr, as it might try to do overload resolution.
12635
12636 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
12637
12638 * pt.c (instantiate_class_template): Oops.
12639
12640 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12641
12642 * cp-tree.def: Add TAG_DEFN.
12643 * pt.c (tsubst_enum): New fn.
12644 (instantiate_class_template): Use it.
12645 (tsubst_expr): Support TAG_DEFN.
12646 (tsubst): Support local enums.
12647 (tsubst_copy): Likewise.
12648 * decl.c (finish_enum): Likewise.
12649 (start_enum): If this is a local enum, switch to permanent_obstack.
12650
12651 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
12652
12653 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
12654 (finish_function): Put the base init code for constructors just
12655 after the parm cleanup insns.
12656 (struct cp_function): Add last_parm_cleanup_insn.
12657 (push_cp_function_context): Likewise.
12658 (pop_cp_function_context): Likewise.
12659
12660 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12661
12662 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
12663
12664 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12665
12666 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
12667 for THUNK_FNDECL before we switch to temporary allocation.
12668
12669 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12670
12671 * call.c (build_new_op): Handle null arg2 for ?:.
12672
12673 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
12674
12675 * except.c (expand_exception_blocks): Ensure that we flow through
12676 the end of the exception region for the exception specification.
12677 Move exception region for the exception specification in, so that
12678 it doesn't protect the parm cleanup. Remove some obsolete code.
12679 * decl.c (store_parm_decls): Likewise.
12680 (finish_function): Likewise.
12681
12682 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
12683
12684 * init.c (build_new): Fix nothrow handling.
12685
12686 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12687
12688 * init.c (emit_base_init): Don't warn about the initialization
12689 list for an artificial member.
12690
12691 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12692
12693 * expr.c (do_case): Handle !START case for the error msg.
12694
12695 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
12696
12697 * decl2.c, lang-options.h: New option -Weffc++.
12698 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
12699 to -Weffc++.
12700
12701 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
12702 to MULTIPLE_SYMBOL_SPACES.
12703
12704 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
12705
12706 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
12707
12708 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
12709
12710 * typeck.c (c_expand_return): Don't complain about returning void
12711 to void in an artificial function.
12712 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
12713 don't set DECL_RESULT, set DECL_ARTIFICIAL.
12714 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
12715
12716 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
12717
12718 * init.c (init_decl_processing): Add support for setjmp/longjmp based
12719 exception handling.
12720 * except.c (init_exception_processing): Likewise.
12721 (expand_end_catch_block): Likewise.
12722 (expand_exception_blocks): Likewise.
12723 (expand_throw): Likewise.
12724 * exception.cc (__default_terminate): Likewise.
12725
12726 * init.c (perform_member_init): Use new method of expr level
12727 cleanups, instead of cleanups_this_call and friends.
12728 (emit_base_init): Likewise.
12729 (expand_aggr_vbase_init_1): Likewise.
12730 (expand_vec_init): Likewise.
12731 * decl.c (cp_finish_decl): Likewise.
12732 (expand_static_init): Likewise.
12733 (store_parm_decls): Likewise.
12734 (cplus_expand_expr_stmt): Likewise.
12735 * decl2.c (finish_file): Likewise.
12736
12737 * Make-lang.in (exception.o): Ok to compile with -O now.
12738
12739 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
12740 we know it will be done later by the backend.
12741
12742 * decl2.c (lang_f_options): Remove support for short temps.
12743 * lang-options.h: Likewise.
12744
12745 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
12746
12747 * tree.c (varargs_function_p): New fn.
12748 * method.c (emit_thunk): Replace broken generic code with code to
12749 generate a heavyweight thunk function.
12750
12751 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
12752
12753 * pt.c (process_template_parm): pedwarn about floating-point parms.
12754
12755 * decl.c (grokdeclarator): inline no longer implies static.
12756
12757 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
12758
12759 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
12760
12761 * class.c (check_for_override): The signature of an overriding
12762 function is not changed.
12763
12764 * call.c (build_over_call): Move setting of conv into the loop.
12765 Note: this change, along with the related changes of the 18th thru
12766 the 20th of April, fix an infinite loop problem in conversions.
12767
12768 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12769
12770 * call.c (build_user_type_conversion_1): Really ignore rvalue
12771 conversions when looking for a REFERENCE_TYPE.
12772
12773 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
12774 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
12775 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
12776 (build_unary_op): Likewise.
12777 * call.c (build_over_call): See through a CONVERT_EXPR around the
12778 ADDR_EXPR for on a temporary.
12779 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
12780 the ADDR_EXPR for a local variable.
12781
12782 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
12783
12784 * call.c (build_user_type_conversion_1): If we're trying to
12785 convert to a REFERENCE_TYPE, only consider lvalue conversions.
12786 (build_new_function_call): Print candidates.
12787 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
12788 (reference_binding): Binding a temporary of a reference-related type
12789 is BAD.
12790
12791 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12792
12793 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
12794 * tinfo2.cc (type_info::before): Likewise.
12795
12796 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
12797
12798 * call.c (implicit_conversion): Oops.
12799
12800 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
12801
12802 * call.c (implicit_conversion): Try to find a reference conversion
12803 before binding a const reference to a temporary.
12804
12805 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
12806
12807 * exception.cc (__default_unexpected): Call terminate by default,
12808 so that if the user overrides terminate, the correct function will
12809 be called.
12810
12811 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
12812
12813 * parse.y (left_curly): Avoid trying to use any fields of
12814 error_mark_node, as there aren't any.
12815
12816 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12817
12818 * lex.c (do_identifier): Avoid breaking on overloaded methods
12819 as default arguments.
12820
12821 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
12822
12823 * call.c (add_template_candidate): Initialize the variable "dummy".
12824
12825 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
12826
12827 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
12828 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
12829
12830 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12831
12832 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
12833 (debug_binfo): Delete decl, not needed.
12834
12835 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
12836 promotes_to_aggr_type): Delete fns.
12837 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
12838 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
12839 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
12840
12841 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
12842
12843 * friend.c (is_friend_type): Delete fn.
12844 * cp-tree.h (is_friend_type): Delete decl.
12845
12846 * decl.c (original_result_rtx, double_ftype_double,
12847 double_ftype_double_double, int_ftype_int, long_ftype_long,
12848 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
12849 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
12850
12851 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
12852 fwd decls.
12853 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
12854
12855 * decl.c (pushdecl_nonclass_level): #if 0, unused.
12856 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
12857
12858 * lex.c (reinit_lang_specific): #if 0, unused.
12859 * cp-tree.h (reinit_lang_specific): #if 0 decl.
12860
12861 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
12862 * cp-tree.h (revert_static_member_fn): Delete decl.
12863
12864 * class.c (root_lang_context_p): Delete fn.
12865 * cp-tree.h (root_lang_context_p): Delete decl.
12866
12867 * decl.c (set_current_level_tags_transparency): #if 0, unused.
12868 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
12869
12870 * lex.c (set_vardecl_interface_info): Make static.
12871 * cp-tree.h (set_vardecl_interface_info): Delete decl.
12872
12873 * call.c (find_scoped_type): Make static.
12874 * cp-tree.h (find_scoped_type): Delete decl.
12875
12876 * search.c (convert_pointer_to_vbase): Make static.
12877 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
12878
12879 * decl.c (const_ptr_type_node): Likewise.
12880 * cp-tree.h (const_ptr_type_node): Delete decl.
12881
12882 * typeck.c (common_base_type): Make static.
12883 * cp-tree.h (common_base_types): Delete erroneous decl.
12884
12885 * pt.c (classtype_mangled_name): Make static.
12886 * cp-tree.h (classtype_mangled_name): Delete decl.
12887
12888 * lex.c (check_newline): Make static.
12889 * cp-tree.h (check_newline): Delete decl.
12890
12891 * typeck.c (build_x_array_ref): Delete fn, same idea as
12892 grok_array_decl.
12893 * cp-tree.h (build_x_array_ref): Delete decl.
12894
12895 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
12896 copy_lang_decl.
12897 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
12898
12899 * class.c (build_vtable_entry): Make static.
12900 * cp-tree.h (build_vtable_entry): Delete decl.
12901
12902 * class.c (build_vbase_pointer): Make static.
12903 * cp-tree.h (build_vbase_pointer): Delete decl.
12904
12905 * sig.c (build_sptr_ref): Add forward decl and make static.
12906 * cp-tree.h (build_sptr_ref): Delete decl.
12907
12908 * call.c (build_new_method_call): Add forward decl and make static.
12909 * cp-tree.h (build_new_method_call): Delete decl.
12910
12911 * call.c (build_object_call): Make static.
12912 * class.c (check_for_override, complete_type_p, mark_overriders):
12913 Likewise.
12914 * decl.c (cp_function_chain): Likewise.
12915 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
12916 Likewise.
12917 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
12918 Likewise.
12919 * tree.c (build_cplus_array_type_1): Likewise.
12920 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
12921 (comp_target_parms): Likewise.
12922
12923 * init.c (build_builtin_call): Make static.
12924 * cp-tree.h (build_builtin_call): Delete decl.
12925
12926 * typeck.c (binary_op_error): Delete decl.
12927 * cp-tree.h (binary_op_error): Likewise.
12928
12929 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12930
12931 * call.c (build_method_call): Compare against error_mark_node
12932 directly, rather than the ERROR_MARK tree code.
12933 * cvt.c (cp_convert): Likewise.
12934 * decl.c (print_binding_level): Likewise.
12935 (duplicate_decls): Likewise.
12936 (grokdeclarator): Likewise.
12937 (grokdeclarator): Likewise.
12938 * init.c (expand_aggr_init_1): Likewise.
12939 (decl_constant_value): Likewise.
12940 * method.c (build_opfncall): Likewise.
12941 (hack_identifier): Likewise.
12942 * typeck.c (build_modify_expr): Likewise.
12943
12944 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
12945
12946 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12947
12948 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
12949
12950 * pt.c (coerce_template_parms): Add new error message.
12951
12952 * method.c (build_overload_value): Implement name mangling for
12953 floating-point template arguments.
12954
12955 * method.c (build_overload_int, icat, dicat): Fix mangling of template
12956 arguments whose absolute value doesn't fit in a signed word.
12957
12958 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12959
12960 * friend.c: New file; put all of the friend stuff in here.
12961 * init.c: Instead of here.
12962 * Makefile.in (CXX_OBJS): Add friend.o.
12963 (friend.o): Add dependencies.
12964 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
12965
12966 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
12967
12968 * call.c (build_scoped_method_call): Complain if the scope isn't a
12969 base.
12970
12971 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
12972
12973 * parse.y (left_curly): Don't crash on erroneous type.
12974
12975 * init.c (build_delete): Fix type of ref.
12976
12977 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12978
12979 * search.c (get_vbase_1): Renamed from get_vbase.
12980 (get_vbase): Wrapper, now non-static.
12981 (convert_pointer_to_vbase): Now static.
12982
12983 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
12984 * init.c (build_delete): Pass one.
12985 (build_partial_cleanup_for): Use build_scoped_method_call.
12986 * decl.c (finish_function): Pass a binfo.
12987
12988 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12989
12990 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
12991
12992 * typeck.c (build_c_cast): Lose other reference to flag.
12993
12994 * call.c (build_field_call): Don't look for [cd]tor_identifier.
12995 * decl2.c (delete_sanity): Remove meaningless use of
12996 LOOKUP_HAS_IN_CHARGE.
12997 * decl.c (finish_function): Use build_scoped_method_call instead
12998 of build_delete for running vbase dtors.
12999 * init.c (build_delete): Call overload resolution code instead of
13000 duplicating it badly.
13001
13002 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
13003
13004 * call.c (build_over_call): Call mark_used before trying to elide
13005 the call.
13006
13007 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
13008
13009 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13010
13011 * typeck.c (build_modify_expr): Always pedwarn for a cast to
13012 non-reference used as an lvalue.
13013
13014 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13015
13016 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
13017
13018 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13019
13020 * parse.y (handler): Fix template typo.
13021
13022 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13023
13024 * error.c (lang_decl_name): New fn.
13025 * tree.c (lang_printable_name): Use it.
13026
13027 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
13028
13029 * g++spec.c: Include config.h so that we can catch bzero #defines
13030 from the config file.
13031
13032 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
13033
13034 * new1.cc: Include a declaration for malloc, to avoid warning, and
13035 avoid lossing on systems that require one (ones that define malloc
13036 in xm.h).
13037
13038 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13039
13040 * decl2.c (max_tinst_depth): New variable.
13041 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
13042 option.
13043 * pt.c (max_tinst_depth): Variable moved.
13044 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
13045 as legal.
13046
13047 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
13048
13049 * decl.c (xref_basetypes): Allow a base class that depends on
13050 template parms to be incomplete.
13051
13052 * decl2.c (build_expr_from_tree): Support typeid(type).
13053 * rtti.c (get_typeid): Support templates.
13054 (expand_si_desc, expand_class_desc): Fix string length.
13055 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
13056
13057 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
13058
13059 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
13060
13061 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
13062
13063 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13064
13065 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
13066 smashes together template and non-template decls of the same
13067 signature.
13068
13069 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
13070
13071 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
13072
13073 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13074
13075 * decl.c (duplicate_decls): Next route, pedwarn about different
13076 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
13077
13078 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13079
13080 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
13081 (struct lang_type): Delete has_default_implementation member.
13082 Increase dummy to 21.
13083 * decl.c (start_method): Delete usage.
13084
13085 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
13086 store_after_parms, start_decl_1, auto_function): Add decls.
13087 (get_arglist_len_in_bytes, declare_implicit_exception,
13088 have_exceptions_p, make_type_decl, typedecl_for_tag,
13089 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
13090 build_component_type_expr, cplus_exception_name,
13091 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
13092 * call.c (build_this): Make static.
13093 (is_complete): Likewise.
13094 (implicit_conversion): Likewise.
13095 (reference_binding): Likewise.
13096 (standard_conversion): Likewise.
13097 (strip_top_quals): Likewise.
13098 (non_reference): Likewise.
13099 (build_conv): Likewise.
13100 (user_harshness): Likewise.
13101 (rank_for_ideal): Likewise.
13102 * decl.c (start_decl_1): Delete forward decl.
13103 (push_decl_level): Make static.
13104 (resume_binding_level): Make static.
13105 (namespace_bindings_p): Make static.
13106 (declare_namespace_level): Make static.
13107 (lookup_name_real): Make static.
13108 (duplicate_decls): Make static. Take register off NEWDECL and
13109 OLDDECL parm decls.
13110 * decl2.c (get_sentry): Make static.
13111 (temp_name_p): Delete fn.
13112 * except.c (auto_function): Delete decl.
13113 * lex.c (handle_{cp,sysv}_pragma): Make static.
13114 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
13115 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
13116 * pt.c (tsubst_expr_values): Make static.
13117 * rtti.c (combine_strings): Delete decl.
13118
13119 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13120
13121 * pt.c (push_template_decl): Handle getting a typedef.
13122
13123 * call.c (build_new_function_call): Complain about void arg.
13124
13125 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13126
13127 * decl.c (duplicate_decls): Give pedwarn of different exceptions
13128 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
13129
13130 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
13131
13132 * except.c (expand_throw): Don't expand the cleanup tree here,
13133 since we are not going to write the rtl out. Fixes problem with
13134 -g -O on SPARC.
13135
13136 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
13137
13138 * Make-lang.in: Add $(exeext) as necessary.
13139
13140 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
13141
13142 * parse.y (handler_seq): Must have at least one catch clause.
13143
13144 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13145
13146 * call.c (add_builtin_candidate): Restore ?: hack.
13147
13148 * decl.c (grok_op_properties): More warnings.
13149
13150 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13151
13152 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
13153 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
13154
13155 * decl.c (duplicate_decls): Scale back to a warning, and only do
13156 'em if -pedantic.
13157
13158 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
13159
13160 * decl.c (duplicate_decls): pedwarn mismatched exception
13161 specifications.
13162
13163 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
13164
13165 * call.c (build_new_method_call): Don't display the invisible
13166 argument for controlling virtual bases.
13167
13168 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
13169
13170 * new: Add nothrow new and delete, bad_alloc and throw specifications
13171 for delete.
13172 * decl.c (init_decl_processing): Add throw specification for delete.
13173 * new.cc (nothrow): Define.
13174 * lex.c (real_yylex): Removing warning that throw and friends are
13175 keywords.
13176 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
13177 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
13178 * Make-lang.in: Add new{1,2}.{cc,o}.
13179
13180 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13181
13182 * lex.c (cons_up_default_function): Fix return type of synth op=.
13183
13184 * init.c (emit_base_init): Add warnings for uninitialized members
13185 and bases.
13186
13187 * decl.c (xref_basetypes): Add warning for non-polymorphic type
13188 with destructor used as base type.
13189
13190 * decl.c (grok_op_properties): Add warning for op= returning void.
13191 * typeck.c (c_expand_return): Add warning for op= returning anything
13192 other than *this.
13193
13194 * class.c (finish_struct_1): Add warning for class with pointers
13195 but not copy ctor or copy op=.
13196
13197 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
13198 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
13199 (instantiate_template): If -fexternal-templates, add this
13200 instantiation to pending_templates.
13201
13202 * decl2.c (copy_assignment_arg_p): Disable old hack to support
13203 Booch components.
13204
13205 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
13206
13207 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
13208
13209 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
13210
13211 * call.c (standard_conversion): Handle getting references. Tack
13212 on RVALUE_CONV here. Do it for non-class types, too.
13213 (reference_binding): Pass references to standard_conversion.
13214 (implicit_conversion): Likewise.
13215 (add_builtin_candidate): Disable one ?: kludge.
13216 (convert_like): Handle RVALUE_CONVs for non-class types.
13217 (joust): Disable the other ?: kludge.
13218
13219 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13220
13221 * decl.c (init_decl_processing): Add code to build up common
13222 function types beforehand, to avoid creation then removal of
13223 things already in the hash table.
13224
13225 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
13226
13227 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
13228 the arguments.
13229
13230 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
13231 current_template_parms.
13232
13233 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
13234
13235 * search.c (lookup_field): Don't return a function, check want_type.
13236
13237 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13238
13239 * init.c (build_new): Make sure PLACEMENT has a type.
13240
13241 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13242
13243 * init.c (build_new): Support new (nothrow).
13244
13245 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
13246
13247 * pt.c (instantiate_decl): Also do push_to_top_level before setting
13248 up DECL_INITIAL.
13249
13250 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
13251 * pt.c (tsubst): Defer instantiation of default args.
13252 * call.c (build_over_call): Until here.
13253
13254 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13255
13256 * search.c (lookup_field): Make sure we have an
13257 IDENTIFIER_CLASS_VALUE before we try to return it.
13258
13259 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13260
13261 * call.c (build_method_call): Delete unused var PARM.
13262 (build_overload_call_real): Likewise.
13263 (build_object_call): Delete unused var P.
13264 (build_new_op): Likewise.
13265 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
13266 var definitions, which are never used.
13267 (shadow_tag): Delete unused var FN.
13268 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
13269 * init.c (build_new): Delete unused var ALLOC_TEMP.
13270 * method.c (hack_identifier): Delete unused var CONTEXT.
13271 (do_build_copy_constructor): Delete unused var NAME.
13272 (synthesize_method): Delete unused var BASE.
13273 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
13274 * rtti.c (build_headof): Delete unused var VPTR.
13275 (get_typeid): Delete unused var T.
13276 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
13277 and ORIG_OP2.
13278 (build_ptrmemfunc): Delete unused vars U and NINDEX.
13279 * typeck2.c (build_functional_cast): Delete unused var BINFO.
13280
13281 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
13282
13283 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
13284 things in a type being defined.
13285 * decl.c (finish_enum): Reverse the values so that they are in
13286 the correct order.
13287
13288 * pt.c (instantiate_class_template): Don't initialize
13289 BINFO_BASETYPES until the vector is filled out.
13290 (unify): Don't abort on conflicting bindings, just fail.
13291 (instantiate_decl): Do push_tinst_level before any tsubsting.
13292
13293 * method.c (build_overload_value): Handle getting a
13294 TEMPLATE_CONST_PARM for a pointer.
13295
13296 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
13297
13298 * init.c (expand_member_init): Don't give 'not a base' error for
13299 templates.
13300
13301 * pt.c (instantiate_decl): Call import_export_decl later.
13302
13303 * pt.c (instantiate_class_template): Return a value.
13304
13305 * parse.y (extension): New rule for __extension__.
13306 (extdef, unary_expr, decl, component_decl): Use it.
13307
13308 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
13309
13310 * class.c (base_binfo): Remove unused base_has_virtual member.
13311 (finish_base_struct): Likewise.
13312 (finish_struct_1): Likewise.
13313
13314 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
13315
13316 * search.c (expand_upcast_fixups): Fix bogus code generation
13317 problem where the generated code uses the wrong index into the
13318 runtime built vtable on the stack. Old code could clobber random
13319 stack values.
13320
13321 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
13322
13323 * init.c (perform_member_init): Make sure the partial EH cleanups
13324 live on the function_obstack.
13325
13326 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
13327
13328 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
13329 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
13330
13331 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
13332
13333 * decl.c (grokvardecl): Avoid ANSI style initialization.
13334
13335 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
13336
13337 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
13338
13339 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
13340
13341 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
13342
13343 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13344
13345 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
13346 arguments we compare against. Start the count of I at 1, not 0,
13347 since argv[0] is still the command.
13348
13349 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
13350
13351 * lang-specs.h: Accept .cp as an C++ extension.
13352
13353 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13354
13355 * cp-tree.h (ptr_reasonably_similar): Add decl.
13356
13357 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13358
13359 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
13360 pointer. New local SPECBITS with the parm's value.
13361 (grokdeclarator): Pass &specbits down.
13362
13363 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
13364 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
13365
13366 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
13367 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
13368
13369 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
13370 not an error_mark_node.
13371
13372 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13373
13374 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
13375 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
13376
13377 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13378
13379 * decl.c (grokdeclarator): When giving an anonymous struct a name,
13380 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
13381 not affected).
13382
13383 * typeck2.c (build_m_component_ref): If component is a pointer
13384 to data member, resolve the OFFSET_REF now.
13385
13386 * call.c (convert_like): Don't go into infinite recursion.
13387
13388 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
13389
13390 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
13391 * tree.c (layout_basetypes): And on the vbase ptr.
13392
13393 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
13394
13395 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
13396 CHAR_TYPE_SIZE so bool is always the same size as another type.
13397
13398 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
13399
13400 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
13401
13402 * decl2.c (grok_x_components): Remove synthesized methods from
13403 TYPE_METHODS of an anonymous union, complain about member
13404 functions.
13405 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
13406 anonymous unions.
13407 (finish_function): Just clear the DECL_RTL of our arguments.
13408
13409 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13410
13411 * decl2.c (finish_file): Emit DWARF debugging info for static data
13412 members.
13413
13414 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
13415
13416 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
13417
13418 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
13419 IDENTIFIER_NODE.
13420
13421 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
13422
13423 * Make-lang.in (g++-cross$(exeext)): Fix typo.
13424
13425 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13426
13427 Make the g++ driver now be a standalone program, rather than one
13428 that tries to run the gcc driver after munging up the options.
13429 * Make-lang.in (g++.c, g++spec.o): New rules.
13430 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
13431 added.
13432 (g++$(exeext)): New rule, based on xgcc rule.
13433 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
13434 * g++spec.c: New file.
13435 * g++.c: Removed file.
13436
13437 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
13438
13439 * cvt.c (build_up_reference): Arrange for any temporary values
13440 that have been keep in registers until now to be put into memory.
13441
13442 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13443
13444 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
13445 that make -j3 bootstrap works better.
13446
13447 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
13448
13449 * decl.c (pushtag): Do pushdecl for anon tags.
13450
13451 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
13452
13453 * typeck.c (c_expand_return): Fix logic.
13454 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
13455
13456 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
13457
13458 * g++.c (main): Make sure arglist has a final NULL entry. Add
13459 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
13460 stdin/stdout of the invoked program are redirected to
13461 nowheresville.
13462
13463 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13464
13465 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
13466
13467 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
13468
13469 * init.c (resolve_offset_ref): Handle obj.vfn better.
13470 * typeck.c (build_component_ref): Set TREE_TYPE on result from
13471 build_vfn_ref.
13472
13473 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
13474
13475 * typeck.c (convert_for_assignment): Also handle anachronistic
13476 implicit conversions from (::*)() to cv void*.
13477 * cvt.c (cp_convert_to_pointer): Likewise.
13478
13479 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
13480
13481 * lex.c (handle_cp_pragma): Fix bogus warning.
13482
13483 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
13484
13485 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
13486 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
13487
13488 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13489
13490 * class.c (finish_struct_1): Support DWARF2_DEBUG.
13491 * search.c (dfs_debug_mark): Likewise.
13492 * decl2.c (finish_vtable_vardecl): Likewise.
13493 * decl.c (pushtag, finish_enum): Likewise.
13494 * lex.c (check_newline): Use debug_* instead of calling *out
13495 functions directly.
13496
13497 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13498
13499 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
13500 on some picky hosts.
13501
13502 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13503
13504 * class.c (finish_struct_1): A class has a non-trivial copy
13505 constructor if it has virtual functions.
13506
13507 * cvt.c (cp_convert): Always call a constructor.
13508
13509 * call.c (reference_binding): Still tack on a REF_BIND
13510 for bad conversions.
13511 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
13512
13513 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
13514 (c_expand_return): Likewise.
13515 * typeck2.c (digest_init): Likewise for { }.
13516 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
13517 * cvt.c (cp_convert): Handle failure better.
13518
13519 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13520
13521 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
13522 of GCC be path-relative.
13523
13524 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
13525
13526 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
13527 it does need choose-temp.o and pexecute.o.
13528
13529 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13530
13531 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
13532 that we still use it.
13533 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
13534
13535 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
13536
13537 * init.c (expand_default_init): Avoid calling constructors to
13538 initialize reference temps.
13539
13540 * cvt.c (convert_to_reference): Fix.
13541
13542 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13543
13544 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
13545 (convert_to_reference): Likewise.
13546 * typeck.c (convert_for_initialization): Likewise.
13547 * init.c (expand_default_init): Likewise.
13548 (expand_aggr_init_1): Likewise.
13549 * cp-tree.h (CONV_NONCONVERTING): Lose.
13550 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
13551 * *.c: Adjust.
13552 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
13553
13554 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
13555
13556 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
13557
13558 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13559
13560 * init.c (expand_aggr_init_1): Don't crash on non-constructor
13561 TARGET_EXPR.
13562
13563 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13564
13565 * g++.c: Include gansidecl.h.
13566 (VPROTO, PVPROTO, VA_START): Delete.
13567 (choose_temp_base_try, choose_temp_base, perror_exec,
13568 run_dos) [__MSDOS__]: Delete fns.
13569 (pfatal_with_name): Delete fn.
13570 (temp_filename): Declare like in gcc.c.
13571 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
13572 (error_count, signal_count): Define.
13573 (error): Delete both definitions.
13574 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
13575 (pfatal_pexecute): Add fn from gcc.c.
13576 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
13577 code to use the pexecute stuff also used by gcc.c.
13578 (MIN_FATAL_STATUS): Define.
13579 * Make-lang.in (g++): Add dependency on and linking with
13580 choose-temp.o and pexecute.o.
13581
13582 * cp-tree.h: Include gansidecl.h.
13583 (STDIO_PROTO): Delete #undef/#define.
13584 * cvt.c (NULL): Delete #undef/#define.
13585 * expr.c (NULL): Likewise.
13586 * init.c (NULL): Likewise.
13587 * rtti.c (NULL): Likewise.
13588 * xref.c (NULL): Likewise.
13589
13590 * cp-tree.h (build_user_type_conversion): Add prototype.
13591 * call.c (build_user_type_conversion): Delete prototype. Correct
13592 decl of FLAGS arg to be an int.
13593 * cvt.c (build_user_type_conversion): Likewise.
13594
13595 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
13596
13597 * cp-tree.def: Add TRY_BLOCK and HANDLER.
13598 * except.c (expand_start_catch_block): Support templates.
13599 * parse.y (try_block, handler_seq): Likewise.
13600 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
13601
13602 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
13603
13604 * pt.c (current_template_args): New fn.
13605 (push_template_decl): Use it.
13606 * decl.c (grokdeclarator): Use it.
13607
13608 * decl2.c (build_expr_from_tree): Dereference ref vars.
13609
13610 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
13611 the decl-specifier-seq.
13612
13613 * decl.c (grok_op_properties): Don't force the type of a conversion
13614 op to be complete. Don't warn about converting to the same type
13615 for template instantiations.
13616
13617 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
13618 methods.
13619
13620 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
13621
13622 * typeck.c (get_delta_difference): Remove previous bogusness.
13623 Don't give errors if force is set.
13624
13625 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13626
13627 * decl2.c (finish_file): Don't emit debug info.
13628 * decl.c (pushdecl): Lose obsolete code.
13629 (grokdeclarator): Still do the long long thing after complaining.
13630 * search.c (note_debug_info_needed): Don't do anything if we're in a
13631 template.
13632 * method.c (synthesize_method): For non-local classes,
13633 push_to_top_level first.
13634
13635 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
13636
13637 * typeck.c (get_delta_difference): Add no_error parameter.
13638 (build_ptrmemfunc): Call get_delta_difference with no_error set;
13639 we don't want error messages when converting unrelated
13640 pointer-to-member functions.
13641
13642 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
13643
13644 * error.c (dump_expr): Improve the wording on error messages that
13645 involve pointer to member functions.
13646
13647 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
13648
13649 * cvt.c (cp_convert_to_pointer): Move code for conversions from
13650 (::*)() to void* or (*)() up a bit, so that we can convert from
13651 METHOD_TYPEs as well.
13652
13653 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13654
13655 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
13656 There are no 'member' types.
13657 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
13658 (build_x_typeid): Handle errors.
13659
13660 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
13661
13662 * typeck.c (convert_for_assignment): Handle anachronistic implicit
13663 conversions from (::*)() to void* or (*)().
13664 * cvt.c (cp_convert_to_pointer): Likewise.
13665 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
13666 conversions from here.
13667 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
13668 * lang-options.h: Likewise.
13669 * decl2.c (warn_pmf2ptr): Define.
13670 * cp-tree.h: Declare it.
13671 * typeck2.c (digest_init): Allow pmfs down into
13672 convert_for_initialization.
13673
13674 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
13675
13676 * typeck.c (c_expand_return): Fix for returning overloaded fn.
13677
13678 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13679
13680 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
13681 * decl.c (grok_reference_init): Pass DIRECT_BIND.
13682 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
13683 DIRECT_BIND.
13684 * call.c (convert_like): Don't pass INDIRECT_BIND.
13685 * typeck.c (convert_arguments): Likewise.
13686 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
13687
13688 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
13689
13690 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
13691 similar code in build_up_ref.
13692 * cvt.c (build_up_reference): Drastically simplify.
13693
13694 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
13695
13696 * typeck.c (signed_or_unsigned_type): If the given type already
13697 as the correct signedness, then just return it.
13698
13699 * typeck.c ({un,}signed_type): If can't do anything, call
13700 signed_or_unsigned_type.
13701
13702 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
13703
13704 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
13705 current_class_type is NULL.
13706
13707 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
13708
13709 * class.c (finish_struct_1): Avoid empty structs by adding a field
13710 so layout_type gets the mode right.
13711
13712 * typeck.c (c_expand_return): Drastically simplify.
13713
13714 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
13715
13716 * typeck.c (decay_conversion): Handle overloaded methods.
13717
13718 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
13719
13720 * call.c (build_over_call): A TARGET_EXPR has side-effects.
13721
13722 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
13723
13724 * cvt.c (convert_to_pointer_force): Add code to support pointer to
13725 member function to pointer to function conversions.
13726 * init.c (resolve_offset_ref): Add code to allow faked up objects,
13727 ignoring them if they are not used, and giving an error, if they
13728 are needed.
13729 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
13730 code, and so that we can give an error, if we needed an object,
13731 and one was not provided.
13732 (build_c_cast): Don't call default_conversion when we want to
13733 convert to pointer to function from a METHOD_TYPE.
13734
13735 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
13736
13737 * Make-lang.in (cplib2.ready): Fix logic.
13738
13739 * decl.c (shadow_tag): Only complain about non-artificial function
13740 members.
13741
13742 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
13743
13744 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
13745
13746 * expr.c (cplus_expand_expr): Pre-tweak call_target like
13747 expand_inline_function would.
13748
13749 * pt.c (mark_decl_instantiated): If extern_p, call
13750 mark_inline_for_output.
13751
13752 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
13753
13754 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
13755 pmd conversions.
13756
13757 * typeck.c (get_delta_difference): Fix wording, as we can be used
13758 for pointer to data members.
13759
13760 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
13761
13762 * pt.c (tsubst): If the function decl isn't a member of this
13763 template, return a copy of the decl (including copying the
13764 lang-specific part) so we don't hose ourselves later.
13765
13766 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
13767
13768 * class.c (finish_struct): Remove DWARF-specific tag handling.
13769 * decl.c (pushtag): Likewise.
13770 (finish_function): Always clear DECL_ARGUMENTS on function decls with
13771 no saved RTX.
13772 * decl2.c (finish_file): Emit DWARF debugging info for static data
13773 members.
13774
13775 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
13776
13777 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
13778 isn't the same as the new one before we whack it.
13779
13780 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
13781
13782 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
13783 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
13784 warn_traditional and warn_strict_prototypes; remove ancient
13785 'overload' code; remove references to flag_traditional.
13786
13787 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
13788
13789 * input.c (sub_getch): Handle 8-bit characters in string literals.
13790
13791 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
13792
13793 * tree.c (mapcar): Handle CONSTRUCTORs.
13794 (copy_to_permanent): Handle expression_obstack properly.
13795
13796 * Make-lang.in (cplib2.txt): Also depend on the headers.
13797
13798 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
13799 INT_TYPE_SIZE.
13800 (expand_class_desc): Use USItype for offset field.
13801 * tinfo.h (struct __class_type_info): Likewise.
13802
13803 * method.c (build_overload_int): TYPE_PRECISION should be applied
13804 to types.
13805
13806 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
13807
13808 * call.c (build_new_op): A COND_EXPR involving void must be a
13809 builtin.
13810
13811 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
13812
13813 * typeck.c (build_x_component_ref): New fn.
13814 (build_object_ref): Use it.
13815 * parse.y (primary): Use it.
13816 * decl2.c (build_expr_from_tree): Use it.
13817 * cp-tree.h: Declare it.
13818
13819 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
13820 * error.c (dump_type_suffix): Handle variable arrays.
13821
13822 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13823
13824 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
13825
13826 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13827
13828 * decl.c (lookup_name_real): Don't try to look up anything in a
13829 TYPENAME_TYPE.
13830
13831 * tinfo2.cc (__throw_type_match_rtti): Oops.
13832
13833 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13834
13835 * Make-lang.in (exception.o): Use -fno-PIC for now.
13836
13837 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
13838
13839 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
13840 calling them.
13841 (get_tinfo_fn_dynamic): Extracted from build_typeid.
13842 * tinfo2.cc (__dynamic_cast): Adjust.
13843
13844 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
13845 (build_x_typeid): Likewise.
13846
13847 * parse.y: Call build_x_typeid instead of build_typeid.
13848 * cp-tree.def: Add TYPEID_EXPR.
13849 * pt.c (tsubst_copy): Handle typeid.
13850 * decl2.c (build_expr_from_tree): Likewise.
13851 * rtti.c (build_x_typeid): Throw bad_typeid from here.
13852 (build_typeid): Not here.
13853 * cp-tree.h: Declare build_x_typeid.
13854
13855 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
13856
13857 * call.c (convert_like): Pull out constant values.
13858
13859 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
13860
13861 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
13862
13863 * decl.c (init_decl_processing): Create short int types before
13864 creating size_t in case a machine description needs to use
13865 unsigned short for size_t.
13866
13867 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13868
13869 * Make-lang.in (exception.o): Turn off pic.
13870
13871 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
13872 type, multi-level ptr conversions.
13873
13874 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
13875 (throw_bad_cast): Use it.
13876 (throw_bad_typeid): New fn.
13877 (build_typeid): Throw bad_typeid as needed.
13878 Use build_call.
13879 (synthesize_tinfo_fn): Handle functions and arrays before checking
13880 for cv-quals.
13881
13882 * Remove .h from standard C++ headers, add new.h, move into inc
13883 subdirectory.
13884
13885 * exception*: Remove pointer from object, constructors. Add
13886 default exception::what that uses type_info::name. Add
13887 __throw_bad_typeid.
13888
13889 * init.c (build_new): Don't add a cookie to new (void *) T[2].
13890
13891 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
13892
13893 * Make-lang.in: Building C++ code depends on cc1plus.
13894
13895 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13896
13897 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
13898 a HOST_WIDE_INT, not a tree.
13899
13900 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
13901
13902 * exception.cc: Don't include <stdlib.h>.
13903
13904 * Make-lang.in (c++.clean): Remove cplib2.*.
13905
13906 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
13907
13908 * parse.y (component_decl_1, component_costructor_declarator case):
13909 Pass attributes/prefix_attributes in tree list.
13910
13911 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
13912
13913 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
13914
13915 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13916
13917 * lex.c (do_identifier): Don't do deferred lookup in a template
13918 header.
13919
13920 * typeck2.c (store_init_value): Oops.
13921
13922 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
13923 New files for C++ lang-support library.
13924 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
13925 (CXX_LIB2FUNCS): Define.
13926 And rules for building the C++ lang-support code.
13927 * config-lang.in (headers): Define.
13928 (lib2funcs): Define.
13929
13930 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
13931
13932 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
13933 digest_init.
13934 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
13935 * typeck2.c (store_init_value): Check for initializing pmf with { }
13936 here.
13937 (process_init_constructor): Not here.
13938
13939 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13940
13941 * pt.c (begin_template_parm_list): Increment
13942 processing_template_decl here.
13943 (end_template_parm_list): Not here.
13944 (process_template_parm): No need to add 1 to it now.
13945 * *.c: Use processing_template_decl instead of current_template_parms
13946 to check for being in a template.
13947
13948 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
13949 (tsubst_copy): Handle CONSTRUCTOR.
13950 (instantiate_decl): Set up context properly for variables.
13951 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
13952 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
13953
13954 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13955
13956 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
13957
13958 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13959
13960 * method.c (make_thunk): Call comdat_linkage before setting the
13961 TREE_CODE.
13962
13963 * decl2.c (comdat_linkage): Use make_decl_one_only.
13964 (import_export_decl): Likewise.
13965 * decl.c (init_decl_processing): Check supports_one_only instead of
13966 SUPPORTS_WEAK.
13967
13968 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
13969
13970 * decl2.c (grokfield): Tighten checking for access decls.
13971
13972 * decl.c (make_typename_type): Resolve references to
13973 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
13974 (lookup_name_real): Types that depend on a template parameter get
13975 an implicit 'typename' unless they're in the current scope.
13976 (start_decl_1): We don't care about incomplete types that depend
13977 on a template parm.
13978 (grokdeclarator): Resolve 'typename's in the type specifier that
13979 refer to members of the current scope.
13980
13981 * call.c (build_over_call): Remove 'inline called before
13982 definition' diagnostic.
13983 (build_method_call): Likewise.
13984 * decl.c (duplicate_decls): Downgrade 'used before declared
13985 inline' to a warning, only with -Winline.
13986
13987 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
13988
13989 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
13990
13991 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
13992
13993 * call.c (build_method_call): When calling a signature
13994 default implementation, as in other cases, let instance_ptr simply
13995 be instance.
13996
13997 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
13998
13999 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
14000
14001 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
14002
14003 * except.c (expand_start_catch_block): Add a pushlevel so that -g
14004 works on hppa and SPARC.
14005
14006 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14007
14008 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
14009
14010 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14011
14012 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
14013 before testing whether it's a signature.
14014
14015 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14016
14017 * call.c (build_new_method_call): Don't complain about signature
14018 pointers and references not being an aggr type.
14019 (build_this): If a signature pointer or reference was passed in,
14020 just return it.
14021 (build_new_method_call): If instance is a signature pointer, set
14022 basetype to the signature type of instance.
14023 * sig.c (build_signature_method_call): Deleted basetype and
14024 instance parameters, they can be found as the DECL_CONTEXT of
14025 function and as the first argument passed in.
14026 * cp-tree.h: Changed declaration of build_signature_method_call.
14027 * call.c (build_method_call): Deleted first two arguments in call
14028 of build_signature_method_call.
14029 (build_over_call): Added call to build_signature_method_call.
14030
14031 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14032
14033 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
14034 target_expr.
14035
14036 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14037
14038 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
14039
14040 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
14041
14042 * except.c (expand_start_try_stmts): Move to except.c in the backend.
14043 (expand_end_try_stmts): Remove.
14044
14045 * init.c (perform_member_init): Use add_partial_entry () instead
14046 of directly manipulating lists.
14047 (emit_base_init): Likewise.
14048
14049 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
14050
14051 * except.c (expand_exception_blocks): Always make sure USE and
14052 CLOBBER insns that came at the end still do, the backend relies
14053 upon this.
14054
14055 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
14056
14057 * call.c (build_over_call): We can only use a TARGET_EXPR of the
14058 right type.
14059
14060 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
14061
14062 * cvt.c (convert_to_reference): Revert last change, don't complain
14063 about temp without target decl.
14064
14065 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
14066
14067 * decl.c (grokdeclarator): Don't core dump when void() is given.
14068
14069 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
14070
14071 * decl.c (copy_args_p): Don't crash.
14072
14073 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
14074
14075 * pt.c (tsubst): And support template args inside the exception
14076 specification.
14077
14078 * pt.c (tsubst): Add support for exception specifications in
14079 template functions.
14080
14081 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
14082
14083 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
14084 fields now.
14085 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
14086 (start_function): Likewise.
14087 (start_method): Likewise.
14088 (grokfield): Likewise.
14089 (make_call_declarator): Add throw spec parameter.
14090 (set_quals_and_spec): Add routine.
14091 * lex.c (set_quals_and_spec): Likewise.
14092 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
14093 * decl.c (shadow_tag): Eliminate the throw spec parameter to
14094 grokdeclarator.
14095 (groktypename): Likewise.
14096 (start_decl): Eliminate the throw spec parameter. Eliminate the
14097 throw spec parameter to grokdeclarator. Eliminate the throw spec
14098 field in DECL_STMT.
14099 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
14100 (grokfndecl): Remove useless set of raises.
14101 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
14102 the throw spec parameter to start_decl. Pull the throw spec out
14103 of the call declarator.
14104 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
14105 (start_function): Eliminate the throw spec parameter. Eliminate
14106 the throw spec parameter to grokdeclarator.
14107 (start_method): Likewise.
14108 * decl2.c (grokfield): Likewise.
14109 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
14110 (grokoptypename): Likewise.
14111 (finish_file): Eliminate the throw spec parameter to
14112 start_function. Add throw spec to make_call_declarator.
14113 * except.c (init_exception_processing): Add throw spec to
14114 make_call_declarator. Eliminate the throw spec parameter to
14115 start_decl.
14116 (expand_start_catch_block): Eliminate the throw spec parameter to
14117 grokdeclarator.
14118 (expand_builtin_throw): Add throw spec to make_call_declarator.
14119 Eliminate the throw spec parameter to start_function.
14120 (start_anon_func): Likewise.
14121 * lex.c (make_call_declarator): Add throw spec parameter.
14122 (set_quals_and_spec): New routine.
14123 (cons_up_default_function): Add throw spec to make_call_declarator.
14124 Eliminate the throw spec parameter to grokfield.
14125 * method.c (synthesize_method): Eliminate the throw spec parameter
14126 to start_function.
14127 * pt.c (process_template_parm): Eliminate the throw spec parameter
14128 to grokdeclarator.
14129 (tsubst): Add throw spec to make_call_declarator.
14130 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
14131 (do_function_instantiation): Eliminate the throw spec parameter to
14132 grokdeclarator. Eliminate the throw spec parameter to
14133 start_function.
14134 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
14135 to start_function.
14136 * parse.y (datadef): Remove non-winning optimization.
14137 (decl): Likewise.
14138 (fndef): Remove ambiguous error productions uncovered by grammar
14139 fixing.
14140 (constructor_declarator): Add exception_specification_opt here.
14141 (component_constructor_declarator): Likewise.
14142 (direct_after_type_declarator): Likewise.
14143 (complex_direct_notype_declarator): Likewise.
14144 (direct_abstract_declarator): Likewise.
14145 (fn.def1): Remove exception_specification_opt.
14146 (fn.def2): Likewise.
14147 (condition): Likewise.
14148 (initdcl0): Likewise.
14149 (initdcl): Likewise.
14150 (notype_initdcl0): Likewise.
14151 (nomods_initdcl0): Likewise.
14152 (component_decl_1): Likewise.
14153 (component_declarator): Likewise.
14154 (after_type_component_declarator0): Likewise.
14155 (after_type_component_declarator): Likewise.
14156 (notype_component_declarator): Likewise.
14157
14158 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14159
14160 * call.c (build_over_call): Also use an INIT_EXPR when
14161 initializing anything from an rvalue.
14162
14163 * call.c (build_over_call): Call stabilize_reference when building
14164 an INIT_EXPR instead of calling the copy ctor.
14165
14166 * call.c (joust): Extend the previous change to all comparisons.
14167
14168 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
14169 NO_LINKAGE_HEURISTICS.
14170
14171 * decl2.c (finish_file): Emit any statics that weren't already.
14172
14173 * typeck.c (build_static_cast): Implement.
14174 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
14175 * decl.c (grokparms): Use can_convert_arg instead of
14176 implicit_conversion directly.
14177 (copy_args_p): New fn.
14178 * cvt.c (convert_to_reference): Don't complain about temp with
14179 static_cast.
14180 (build_up_reference): Handle TARGET_EXPRs.
14181 * call.c (build_over_call): Elide unnecessary temps.
14182 (can_convert*): Use new overloading code.
14183
14184 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
14185
14186 * call.c: Move TYPE_PTR*_MACROS ...
14187 * cp-tree.h: To here.
14188 * typeck.c (build_reinterpret_cast): Implement.
14189
14190 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
14191 ptr_complete_ob.
14192 (joust): If we're comparing a function to a builtin and the worst
14193 conversion for the builtin is worse than the worst conversion for the
14194 function, take the function.
14195
14196 * typeck.c (build_const_cast): Implement.
14197 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
14198 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
14199
14200 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
14201
14202 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
14203 too early. Make sure we explode if exprtype turns out to be a
14204 NULL_TREE when it shouldn't be.
14205
14206 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
14207
14208 * cp-tree.h: New routine make_call_declarator.
14209 * lex.c (make_call_declarator): Define it.
14210 * except.c (init_exception_processing): Use it.
14211 (expand_builtin_throw): Likewise.
14212 (start_anon_func): Likewise.
14213 * decl2.c (finish_file): Likewise.
14214 * lex.c (cons_up_default_function): Likewise.
14215 * parse.y: Likewise.
14216 * pt.c (tsubst): Likewise.
14217
14218 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
14219
14220 * decl2.c (groktypefield): Remove unused code.
14221
14222 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
14223
14224 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
14225 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
14226 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
14227 nonempty_cv_qualifiers.
14228 * hash.h: Rebuild.
14229
14230 * lex.c (make_pointer_declarator): Change type_quals into
14231 cv_qualifiers.
14232 (make_reference_declarator): Likewise.
14233
14234 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14235
14236 * decl.c (start_function): Only check interface_* for templates
14237 with flag_alt_external_templates.
14238
14239 * call.c (build_new_op): Check for comparison of different enum types.
14240 (build_over_call): Fix arg # output.
14241
14242 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
14243
14244 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
14245
14246 * call.c (build_new_op): Check for erroneous args.
14247
14248 * call.c (build_new_method_call): Add missing args to cp_error.
14249
14250 * tree.c (error_type): Don't print reference-to-array.
14251
14252 * typeck.c (convert_for_assignment): Don't say contravariance for
14253 removing const.
14254
14255 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14256
14257 * call.c (build_over_call): Diagnose bad convs for `this'.
14258
14259 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
14260 on _ctor_arg.
14261
14262 * call.c (convert_like): Handle bad convs.
14263 (build_over_call): Handle bad convs better.
14264
14265 * decl2.c: -fansi-overloading is now the default.
14266
14267 * call.c (build_new_method_call): Check for erroneous args.
14268
14269 * pt.c (instantiate_class_template): Propagate
14270 TYPE_USES_MULTIPLE_INHERITANCE.
14271
14272 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
14273
14274 * call.c (enforce_access): Add static to routine.
14275
14276 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
14277
14278 * call.c (build_user_type_conversion_1): Fix bad handling.
14279 (compare_ics): Likewise.
14280
14281 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14282
14283 * call.c (standard_conversion): Oops.
14284
14285 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
14286
14287 * g++.c: Update test for win32 (&& ! cygwin32).
14288
14289 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14290
14291 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
14292 (ptr_reasonably_similar): New fn.
14293 * call.c (BAD_RANK): New rank.
14294 (ICS_BAD_FLAG): New macro.
14295 (standard_conversion): Handle almost-right pointer conversions.
14296 (reference_binding): Handle bad rvalue bindings.
14297 (add_*_candidate): Stuff.
14298 (build_over_call): Pass bad conversions to convert_for_initialization.
14299 (compare_ics): Handle bad convs.
14300 (joust): Likewise.
14301
14302 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
14303
14304 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
14305 integer_type_node when computing pointer offsets.
14306
14307 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
14308
14309 * tree.c (lvalue_type): New fn.
14310 (error_type): New fn.
14311 * call.c (op_error): Use error_type.
14312 (add_conv_candidate): Use lvalue_type.
14313 (add_builtin_candidates): Likewise.
14314 * error.c (args_as_string): Use error_type.
14315
14316 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
14317
14318 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
14319 (tsubst): Not here.
14320
14321 * decl.c (init_decl_processing): With -ansi, __null's type is the
14322 signed integral type with the same number of bits as a pointer.
14323 Introduce a new variable null_node for it.
14324 * cp-tree.h: Adjust.
14325 * call.c (null_ptr_cst_p): Adjust.
14326
14327 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
14328
14329 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
14330 optimize.
14331
14332 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14333
14334 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
14335 fns of classes without virtual functions.
14336
14337 * call.c (add_function_candidate): Handle `this' specially.
14338 (compare_ics): Likewise.
14339
14340 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
14341
14342 * typeck.c (build_conditional_expr): Fix handling of __null.
14343
14344 * decl2.c (comdat_linkage): New fn.
14345 (import_export_vtable): Use it.
14346 (import_export_decl): Use it.
14347 * method.c (make_thunk): Use it.
14348
14349 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
14350
14351 * pt.c (end_template_decl): If we don't actually have parms, return.
14352 * parse.y (template_header): Accept 'template <>'.
14353
14354 * errfn.c: Allow 5 args.
14355
14356 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
14357
14358 * tree.c (make_temp_vec): New fn.
14359 * pt.c (push_template_decl): Handle partial specs.
14360 (instantiate_class_template): Likewise.
14361 (more_specialized): Use get_bindings.
14362 (more_specialized_class): New fn.
14363 (get_class_bindings): New fn.
14364 (most_specialized_class): New fn.
14365 (do_function_instantiation): List candidates for ambiguous case.
14366 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
14367 (shadow_tag): Call push_template_decl for partial specializations.
14368 * parse.y: Likewise.
14369 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
14370 DECL_TEMPLATE_MEMBERS.
14371 * call.c (print_z_candidates): Reduce duplication.
14372
14373 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14374
14375 * decl2.c (lang_decode_option): Allow -fansi-overloading.
14376
14377 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
14378
14379 * pt.c (get_bindings): New fn.
14380 (most_specialized): Likewise.
14381 (do_function_instantiation): Use them.
14382 (add_maybe_template): New fn.
14383 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
14384 * call.c (build_new_op): Handle guiding decls.
14385 (build_new_function_call): Likewise.
14386 * decl2.c (finish_file): Likewise.
14387
14388 * decl2.c (mark_used): Do synthesis here.
14389 * call.c (build_method_call): Not here.
14390 (build_over_call): Or here.
14391 * typeck.c (build_function_call_real): Or here.
14392 * tree.c (bot_manip): Call mark_used on functions used in default
14393 args.
14394
14395 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14396
14397 * decl2.c (import_export_vtable): Delete code that disabled vtable
14398 heuristic on systems with ASM_OUTPUT_EXTERNAL.
14399
14400 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14401
14402 * typeck.c (build_x_function_call): Handle static call context
14403 better.
14404
14405 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
14406 the function, not its outer block.
14407
14408 * call.c (build_field_call): Pass fields on to build_opfncall
14409 regardless of TYPE_OVERLOADS_CALL_EXPR.
14410 (build_method_call): Pass on to build_new_method_call sooner.
14411
14412 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
14413 gives us.
14414 * class.c (instantiate_type): Don't put a POINTER_TYPE to
14415 METHOD_TYPE on an expression. Also make a copy of rhs instead of
14416 modifying it.
14417
14418 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
14419
14420 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
14421 (add_builtin_candidate): Don't take enums for ++.
14422 (build_new_method_call): Handle non-aggregates and field calls.
14423 Move new overloading code from...
14424 * cvt.c: Here.
14425
14426 * decl.c (grokparms): Don't check default args in templates.
14427
14428 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
14429
14430 * cvt.c (build_new_op): Fix args to build_unary_op.
14431 (add_builtin_candidates): Don't call type_promotes_to on float.
14432
14433 * decl.c (grokparms): Check the type of the default arg.
14434
14435 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
14436 returning NULL_TREE.
14437
14438 * typeck.c (build_x_binary_op): Avoid doing extra work.
14439 (build_x_unary_op): Likewise.
14440 (build_x_conditional_expr): Likewise.
14441 * cvt.c (build_over_call): Return.
14442 (add_builtin_candidate): Fix MEMBER_REF.
14443 (build_new_op): Likewise.
14444
14445 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
14446
14447 * method.c (build_overload_name): Put bug fix into code but leave
14448 disabled for now so we can be bug compatible with older releases
14449 that do repeats incorrectly. In the future, we can enable it.
14450
14451 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14452
14453 * cvt.c (convert_like): Don't call build_cplus_new twice.
14454
14455 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
14456 Control new overloading code with -fansi-overloading.
14457
14458 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14459
14460 * cvt.c (build_over_call): Call build_cplus_new.
14461 * call.c (build_method_call): Likewise.
14462 * typeck.c (build_function_call_real): Likewise.
14463 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
14464 the COND_EXPR in a TARGET_EXPR so they use the same slot.
14465
14466 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
14467 recursive calls.
14468 * typeck.c (complete_type): Propagate
14469 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
14470
14471 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14472
14473 * cvt.c (joust): More ?: kludging. Sigh.
14474 (build_over_call): Don't try to synthesize global fns.
14475
14476 * search.c (lookup_conversions): Use binfo marking.
14477
14478 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
14479
14480 * search.c (build_mi_matrix): Use the correct value of cid
14481 when determining the new mi_size.
14482
14483 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
14484
14485 * cvt.c (add_builtin_candidates): Do consider type conversion ops
14486 for the first parms of += et al.
14487 (strip_top_quals): New fn.
14488 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
14489 (implicit_conversion): Likewise.
14490 (add_builtin_candidates): Be careful about arrays.
14491 (build_new_method_call): Handle vtable optimization.
14492
14493 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
14494
14495 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
14496 * cvt.c (reference_binding): Use it.
14497 (implicit_conversion): Use it.
14498 (add_builtin_candidate, COND_EXPR): Use it.
14499
14500 * cvt.c (build_new_function_call): Check for error args.
14501
14502 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
14503
14504 * gxx.gperf: Add __null.
14505 * hash.h: Regenerate.
14506 * lex.h: Add RID_NULL.
14507 * lex.c (init_lex): Create null_pointer_node here, stick it in
14508 RID_NULL.
14509 * decl.c (init_decl_processing): Still set its type here.
14510 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
14511 (convert_to_pointer_force): Likewise.
14512 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
14513 if (! pedantic).
14514 * call.c (convert_harshness): Use null_ptr_cst_p.
14515 * typeck.c (convert_for_assignment): Likewise. Don't produce
14516 null_pointer_node.
14517
14518 * error.c (args_as_string): Handle lists of actual args, too.
14519 * cvt.c (null_ptr_cst): Support (void*)0 for now.
14520 (build_user_type_conversion_1): Improve diagnostics.
14521 (build_new_function_call): Likewise.
14522 (build_object_call): Likewise.
14523 (build_new_method_call): Likewise. Move call before def diagnostic...
14524 (build_over_call): Here.
14525
14526 * cvt.c (build_new_method_call): Don't complain about no match if
14527 LOOKUP_SPECULATIVELY.
14528 (build_over_call): Fix 'this' for virtual fn.
14529 (build_new_method_call): Add diagnostic.
14530
14531 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14532
14533 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
14534 constructors to be passed in.
14535 (build_over_call): Likewise.
14536 (build_user_type_conversion_1): Pass them in.
14537 (convert_like): Likewise.
14538 (build_object_call): Handle overloaded conversions.
14539 (build_over_call): Pass the right args to build_vfn_ref.
14540 (standard_conversion): Fix pmf convs.
14541 (joust): Handle comparing statics and non-statics.
14542 (build_new_method_call): New fn.
14543 * call.c (build_method_call): Call it if NEW_OVER.
14544
14545 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
14546
14547 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
14548 %D instead.
14549
14550 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
14551
14552 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
14553 instead of just maybe_build_cleanup so that we deallocate the
14554 thrown object.
14555
14556 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14557
14558 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
14559 * cp-tree.h (finish_prevtable_vardecl): Add decl.
14560
14561 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
14562
14563 * pt.c (instantiate_class_template): Call complete_type. Also, if
14564 we're at the end of the file and we just instantiated a template
14565 class with a vtable, call finish_prevtable_vardecl.
14566
14567 * error.c (dump_decl): Don't explode (or explode more gracefully
14568 as appropriate) if the object being dumped has a null type.
14569 (dump_expr): Likewise.
14570
14571 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
14572 by counting the number of nodes that we'll need before allocating
14573 the array.
14574 (lookup_fnfields): Fix comment.
14575 (breadth_first_search): Fix comment.
14576
14577 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
14578
14579 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
14580 TYPE_ALIGN.
14581 * class.c (finish_struct): Call cplus_decl_attributes here.
14582 (finish_struct_1): Not here.
14583 * cp-tree.h: Adjust.
14584
14585 * pt.c (type_unification): New parameter STRICT.
14586 (unify): If STRICT, don't allow cv addition or base deduction.
14587 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
14588
14589 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
14590
14591 * search.c (get_template_base{_recursive}): New fns.
14592 * pt.c (more_specialized): New fn.
14593 (do_function_instantiation): Use it.
14594 (unify): Handle base deduction.
14595 * cvt.c (joust): Use more_specialized.
14596 Don't arbitrarily choose between non-builtin candidates.
14597 (build_over_call): Call require_complete_type.
14598
14599 * decl.c (start_function): Statics are static even in a #pragma
14600 interface file.
14601
14602 * decl2.c (import_export_vtable): Disable vtable heuristic on
14603 systems with ASM_OUTPUT_EXTERNAL.
14604
14605 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
14606 (standard_conversion): No std conv to enum type.
14607
14608 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
14609 for ptm's.
14610
14611 * cvt.c (reference_binding): Bind directly to a base subobject of
14612 a class rvalue.
14613
14614 * cvt.c (build_new_op): Enforce access control.
14615
14616 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
14617
14618 * typeck2.c (process_init_constructor): When scanning the
14619 union for a named field, skip things that aren't FIELD_DECLs.
14620
14621 * method.c (synthesize_method): Don't scan fndecl's rtl if
14622 we're at the end of the file; just assume the function can't
14623 be inlined.
14624
14625 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14626
14627 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
14628 it failed.
14629
14630 * cvt.c (build_user_type_conversion_1): Handle overloaded
14631 conversion ops.
14632
14633 * cvt.c (add_builtin_candidates): Don't consider type conversion
14634 operators for the first parameter of operator=.
14635
14636 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
14637
14638 * typeck.c (complete_type): Only call layout_type if we're not
14639 expanding a template.
14640
14641 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
14642
14643 * cvt.c (compare_ics): Oops.
14644
14645 * cvt.c (op_error): Oops.
14646
14647 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
14648 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
14649 (build_conv): Use them.
14650 (implicit_conversion): Use them.
14651 (convert_like): Handle them.
14652 (build_new_op): Handle builtin COND_EXPR again.
14653 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
14654 in lists of types for COND_EXPR.
14655 (add_builtin_candidate): Add enum candidates for COND_EXPR.
14656
14657 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
14658
14659 * typeck.c (build_modify_expr): Always attempt to build a call to
14660 the assignment operator, even if we're using a default one.
14661 (convert_for_initialization): Call complete_type.
14662
14663 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14664
14665 * cvt.c (reference_binding): A REF_BIND gets the reference type.
14666 (implicit_conversion): Likewise.
14667 (convert_like): Likewise.
14668 (compare_ics): Likewise.
14669 (compare_qual): Likewise.
14670 (print_z_candidates): Handle no candidates.
14671 (build_new_op): Don't handle builtin COND_EXPR for now.
14672
14673 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
14674
14675 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
14676
14677 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14678
14679 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
14680
14681 * cvt.c (build_builtin_candidate): Oops.
14682 (build_new_op): Oops.
14683
14684 * method.c (build_opfncall): Pass COND_EXPR on.
14685 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
14686 (add_builtin_candidate{,s}): Likewise.
14687 (add_builtin_candidates): Likewise.
14688 (print_z_candidates, op_error, build_new_op): Likewise.
14689 (type_decays_to): New fn.
14690 * lex.c (init_lex): Just say ?: for COND_EXPR.
14691
14692 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
14693
14694 * typeck.c (complete_type): Call layout_type rather than building
14695 a new array type.
14696
14697 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
14698 only use ptrdiff_t.
14699
14700 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14701
14702 * cvt.c: Always compile the new overloading code (but don't use it).
14703 (implicit_conversion): Add a BASE_CONV when converting to
14704 the same class type.
14705 (convert_like): Handle BASE_CONV.
14706
14707 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14708
14709 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
14710 (add_builtin_candidate): Likewise.
14711
14712 NEW_OVER changes:
14713 * typeck.c (build_x_function_call): Try an operator function
14714 whenever we call an object of class type.
14715 * method.c (build_opfncall): Pass CALL_EXPRs through.
14716 * cvt.c (implicit_conversion): Do const-ref case first.
14717 (add_conv_candidate, build_object_call, op_error): New fns.
14718 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
14719 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
14720 builtin candidates.
14721 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
14722 Fall back on preincrement handling. Use op_error.
14723 Handle warn_synth.
14724 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
14725 an error_mark_node.
14726 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
14727 properly.
14728
14729 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
14730
14731 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
14732
14733 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
14734
14735 * typeck.c (build_component_ref_1): Use build_component_ref
14736 instead of open coding it here.
14737
14738 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
14739
14740 * g++.c (main): Don't link with -lg++.
14741
14742 NEW_OVER changes:
14743 * cvt.c (convert_to_reference): Don't use convert_from_reference on
14744 result of build_type_conversion.
14745 (cp_convert): Only call build_method_call for ctors if
14746 build_type_conversion failed.
14747 (ptr_complete_ob): New function.
14748 (TYPE_PTR{,OB,MEM}_P): New macros.
14749 ({add,build}_builtin_candidate{,s}): New functions.
14750 (print_z_candidates): Handle builtins.
14751 (build_user_type_conversion_1): Don't use conversion fns for
14752 converting to a base type.
14753 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
14754 (build_user_type_conversion): Use convert_from_reference.
14755 (build_new_op): New function.
14756 (build_over_call): Fix handling of methods.
14757 (compare_ics): Handle AMBIG_CONV properly.
14758 * typeck2.c: Increment abort count.
14759 * method.c (build_opfncall): Forward most requests to build_new_op.
14760 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
14761
14762 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14763
14764 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
14765 invalid second argument to dump_expr_list.
14766
14767 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
14768
14769 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
14770
14771 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
14772
14773 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
14774 ASSEMBLE_EXTERNAL.
14775
14776 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
14777
14778 * typeck2.c (process_init_constructor): New pedwarn for using { }
14779 to initialize a pointer to member function.
14780 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
14781 we can avoid the new error.
14782
14783 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
14784
14785 * typeck.c (build_ptrmemfunc1): New function to hide details of
14786 pointer to member functions better.
14787
14788 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
14789
14790 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
14791 methods into the actual method, as we know the implied object is
14792 not used.
14793
14794 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14795
14796 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
14797 inside a system header.
14798
14799 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
14800
14801 * call.c (build_method_call): Call complete_type on the
14802 instance type.
14803
14804 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
14805
14806 * typeck.c (build_component_ref): Always build up an OFFSET_REF
14807 for obj_ptr->func so that we can know which object to use in a
14808 method call.
14809
14810 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
14811
14812 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
14813 around things. Also improve maintainability.
14814
14815 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
14816
14817 * decl.c (grokdeclarator): Check for overflow when evaluating an
14818 array dimension.
14819
14820 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
14821
14822 * cvt.c (cp_convert): Don't check for ambiguity with constructor
14823 if NEW_OVER.
14824
14825 * typeck.c (build_x_function_call): Pass function overload
14826 questions to new overloading code if NEW_OVER.
14827 * init.c (expand_aggr_init_1): Only check for type conversion ops
14828 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
14829 Don't check for ambiguity with constructor if NEW_OVER.
14830 * cvt.c (convert_to_reference): Dereference the result of a type
14831 conversion operator.
14832 (build_conv): Propagate ICS_USER_FLAG.
14833 (implicit_conversion): Call instantiate_type.
14834 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
14835 (add_function_candidate): Fix cv-quals on argtype.
14836 (print_z_candidates): New function.
14837 (build_new_function_call): Call it.
14838 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
14839 consider non-converting constructors.
14840 Call print_z_candidates.
14841 Return an AMBIG_CONV for an ambiguous conversion.
14842 (build_user_type_conversion): Handle AMBIG_CONV.
14843 (convert_like): Fix test for building TARGET_EXPR.
14844 Call instantiate_type.
14845 Handle AMBIG_CONV and LVALUE_CONV.
14846 (build_over_call): Handle 0 args and ellipsis.
14847 * cp-tree.def: Add AMBIG_CONV.
14848
14849 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
14850
14851 * decl.c (lookup_name_real): If we find mem in obj when parsing
14852 `obj->mem', make sure we return the right value.
14853
14854 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
14855
14856 * search.c (get_base_distance): Call complete_type.
14857
14858 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
14859
14860 * decl.c (store_bindings): Make static.
14861
14862 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14863
14864 * init.c (expand_aggr_init_1): Don't check type conversions if
14865 NEW_OVER.
14866
14867 * cvt.c (z_candidate): Put back template field.
14868 (add_function_candidate): Set it.
14869 (add_template_candidate): Likewise.
14870 (joust): Use it.
14871 (compare_qual): Handle references and pointers to members.
14872 (compare_ics): Handle reference bindings.
14873
14874 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
14875
14876 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
14877
14878 * call.c (compute_conversion_costs): Call complete_type.
14879
14880 * tree.c (vec_binfo_member): Use comptypes instead of comparing
14881 pointers, so we can handle template parameters.
14882
14883 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
14884
14885 * cvt.c (cp_convert_to_pointer): We have to call complete_type
14886 here; let's make it explicit instead of a side effect of an
14887 error check.
14888
14889 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
14890
14891 * cvt.c (z_candidate): Remove template field.
14892 (reference_binding): Handle binding to temporary.
14893 (implicit_conversion): Likewise.
14894 (add_function_candidate): Handle artificial constructor parms.
14895 Handle functions with too few parms.
14896 (add_template_candidate): New function.
14897 (build_user_type_conversion_1): Handle constructors.
14898 (convert_like): Likewise.
14899 (build_over_call): Likewise.
14900 (build_new_function_call): Support templates.
14901 (compare_ics): Fix reference, inheritance handling.
14902
14903 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
14904
14905 * decl.c: Add signed_size_zero_node.
14906 (init_decl_processing): Build it.
14907 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
14908 when we're trying to make a negative delta.
14909
14910 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14911
14912 Stop doing this damn index==strchr variable name confusion.
14913 * class.c (add_virtual_function): Change local var INDEX to be
14914 named IDX.
14915 (add_method): Likewise.
14916 * lex.c (print_parse_statistics): Likewise.
14917 * search.c (make_memoized_table_entry): Likewise.
14918 (lookup_fnfields_here): Likewise.
14919 (lookup_field): Likewise.
14920 (lookup_fnfields): Likewise.
14921 (get_baselinks): Likewise.
14922 * sig.c (build_signature_table_constructor): Likewise.
14923 (build_signature_method_call): Likewise.
14924 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
14925 (get_member_function_from_ptrfunc): Likewise.
14926 (build_ptrmemfunc): Change local var INDEX to be IDX.
14927 (c_expand_start_case): Likewise.
14928
14929 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
14930
14931 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
14932 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
14933 (convert_to_reference): Use build_type_conversion to convert to
14934 the reference type directly.
14935 (standard_conversion): Fix void* case, non-conversions.
14936 (reference_binding): Fix expr == 0 case, non-conversions.
14937 (convert_like): Support REF_BIND.
14938 (compare_qual): Split out from compare_ics.
14939 (compare_ics): Use it, handle icses with only a qual_conv.
14940
14941 * init.c (expand_vec_init): Don't crash if decl is NULL.
14942
14943 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
14944
14945 * mpw-config.in: New file, configury for Mac MPW.
14946 * mpw-make.sed: New file, makefile editing for MPW.
14947
14948 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14949
14950 * pt.c (instantiate_class_template): Call repo_template_used.
14951
14952 * search.c (lookup_conversions): Only lookup conversions in
14953 complete types.
14954
14955 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14956
14957 * cp-tree.def: Renamed from tree.def, to avoid confusion with
14958 gcc's tree.def.
14959 * cp-tree.h, lex.c: Include cp-tree.def.
14960 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
14961
14962 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
14963
14964 * init.c (build_vec_delete_1): Call complete_type.
14965
14966 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
14967
14968 * except.c (start_anon_func): Make sure anonymous functions are
14969 never external.
14970
14971 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
14972
14973 * decl.c (finish_function): If function_depth > 1, set nested.
14974
14975 * decl2.c (grokbitfield): Revert Bob's change.
14976 * class.c (finish_struct_1): Fix handling of named bitfield widths.
14977
14978 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
14979
14980 * pt.c (add_pending_template): Handle types.
14981 (lookup_template_class): With -fexternal-templates, just add the class
14982 to pending_templates instead of instantiating it now.
14983 * decl2.c (finish_file): Handle types in pending_templates.
14984
14985 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
14986
14987 * decl2.c (grokbitfield): Handle constant decls appropriately.
14988 Give an appropriate error message now instead of spewing core
14989 later.
14990
14991 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
14992
14993 * decl2.c: Don't turn on thunks by default for now.
14994
14995 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
14996
14997 * typeck.c (complete_type): Handle error_mark_node.
14998 (common_type, OFFSET_TYPE): Handle template_type_parms.
14999
15000 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
15001
15002 * pt.c (instantiate_decl): If at_eof, call import_export_decl
15003 regardless of DECL_INLINE.
15004
15005 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
15006
15007 * class.c (finish_struct_bits): Copy TYPE_SIZE.
15008
15009 * rtti.c (build_dynamic_cast): Support templates.
15010 * tree.def: Support DYNAMIC_CAST_EXPR.
15011 * pt.c (tsubst_copy): Likewise.
15012 * decl2.c (build_expr_from_tree): Likewise.
15013
15014 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15015
15016 * typeck.c (build_static_cast): Support templates.
15017 (build_const_cast): Likewise.
15018 * tree.def: Support CONST/STATIC_CAST_EXPR.
15019 * pt.c (tsubst_copy): Likewise.
15020 * decl2.c (build_expr_from_tree): Likewise.
15021
15022 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
15023
15024 * decl2.c (finish_vtable_vardecl): Don't trust
15025 TREE_SYMBOL_REFERENCED for vtables of local classes.
15026
15027 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15028
15029 * pt.c (tsubst_copy): Handle operator T.
15030
15031 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15032
15033 * init.c (build_delete): Move creation of PARMS inside test of
15034 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
15035
15036 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
15037
15038 * typeck.c (build_conditional_expr): Don't assume that
15039 the arguments to ?: are always pointers or records.
15040
15041 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15042
15043 * decl2.c (import_export_decl): Still emit static/weak/comdat
15044 copies of inline template functions with -fno-implicit-templates.
15045
15046 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
15047
15048 * init.c (build_delete): Determine the complete basetype
15049 path to the destructor we're calling.
15050
15051 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
15052
15053 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
15054 initialize the enum, because we really and truly don't know where
15055 it came from.
15056 (start_enum): Don't copy integer_zero_node because
15057 build_enumerator will do it.
15058
15059 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15060
15061 * decl.c (finish_function): Do access control on base destructors.
15062
15063 * pt.c (tsubst, case FUNCTION_DECL): Set up
15064 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
15065 hose us.
15066
15067 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
15068
15069 * cvt.c (build_up_reference): If we have already extended the
15070 lifetime of the temporary, don't try it again.
15071 * typeck.c (c_expand_return): Don't try and convert the return
15072 value twice when we want a reference, once is enough.
15073
15074 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
15075
15076 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
15077 LOOKUP_ONLYCONVERTING at all for now.
15078
15079 * search.c (add_conversions): Put the conversion function in
15080 TREE_VALUE, the basetype in TREE_PURPOSE.
15081 * cvt.c (build_type_conversion): Adjust.
15082 * cvt.c (build_expr_type_conversion): Adjust.
15083 * call.c (user_harshness): Adjust.
15084
15085 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
15086
15087 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
15088 backend's benefit.
15089
15090 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
15091
15092 * except.c (expand_start_catch_block): Add a dummy region, if we
15093 get an error, so that we can avoid core dumping later.
15094
15095 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
15096
15097 * cp-tree.h (OFFSET_REF): Remove.
15098 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
15099 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
15100 * init.c (expand_aggr_init_1): Likewise.
15101 (build_new): Likewise.
15102 * typeck.c (expand_target_expr): Likewise.
15103
15104 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15105
15106 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
15107 TARGET_EXPR.
15108
15109 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
15110
15111 * cvt.c (build_up_reference): Redo how and when temporaries are
15112 created.
15113 * decl.c (grok_reference_init): Don't try and be smart about
15114 running cleanups.
15115
15116 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
15117
15118 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
15119 (TARGET_EXPR...), now that it has 4 arguments.
15120 * tree.c (build_cplus_new): Likewise.
15121
15122 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15123
15124 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
15125
15126 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
15127 * decl.c (struct saved_scope): Remove named_labels,
15128 {base,member}_init_list.
15129 (maybe_push_to_top_level): Don't set them. Call
15130 push_cp_function_context if appropriate.
15131 (pop_from_top_level): Likewise.
15132
15133 * method.c (do_build_assign_ref): Remove obsolete check of
15134 TYPE_HAS_ASSIGN_REF (basetype).
15135
15136 * decl.c (grokfndecl): Diagnose user definition of
15137 implicitly-declared methods.
15138
15139 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
15140
15141 * method.c (do_build_copy_constructor): Add code to give
15142 meaningful error messages instead of crashing.
15143 (do_build_assign_ref): Don't synthesize assignment operators for
15144 classes containing reference or const members.
15145
15146 * class.c (struct base_info): Remove cant_synth_copy_ctor
15147 and cant_synth_asn_ref.
15148 (finish_base_struct): Remove the code that tries to conditionalize
15149 synthesis of copy constructors & assignment operators based on
15150 access permissions. Instead, let it fail when it tries to
15151 synthesize the copy constructor. This will give meaningful error
15152 messages instead of silently generating code to perform a bitcopy.
15153
15154 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
15155
15156 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
15157 determining types for constant values.
15158
15159 * decl.c (struct named_label_list): Use instead of stuffing
15160 random items into a TREE_LIST node.
15161 (named_label_uses): Use the new struct.
15162 (poplevel): Likewise.
15163 (lookup_label): Likewise.
15164 (define_label): Add an error message to tell the user the line
15165 where the goto is located in addition to the destination of the
15166 goto.
15167 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
15168 named_label_uses.
15169 (finish_function): Likewise.
15170
15171 (start_decl): Complain about defining a static data member
15172 in a different type from which it was declared.
15173
15174 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15175
15176 * cvt.c (build_expr_type_conversion): Adjust.
15177
15178 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15179
15180 * call.c (build_method_call): Always convert 'this' to the
15181 appropriate type.
15182
15183 * search.c (add_conversions): Put the conversion function in
15184 TREE_VALUE, the type in TREE_PURPOSE.
15185 * cvt.c (build_type_conversion): Adjust.
15186 * call.c (user_harshness): Adjust.
15187
15188 * method.c (emit_thunk): Call temporary_allocation and
15189 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
15190
15191 * tree.c (build_cplus_array_type): Handle tweaking of
15192 TYPE_MAIN_VARIANT here.
15193 * typeck.c (common_type): Not here.
15194
15195 * typeck.c (complete_type): Only try to complete an array type if
15196 it has a domain.
15197
15198 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
15199
15200 * decl.c (grokvardecl): Call complete_type.
15201 (grokdeclarator): Call complete_type for PARM_DECLs.
15202
15203 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
15204
15205 * pt.c (instantiate_class_template): Re-set
15206 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
15207
15208 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
15209
15210 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
15211 smart enough to do it right.
15212 * tree.c (cp_expand_decl_cleanup): Likewise.
15213 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
15214 cp_expand_decl_cleanup.
15215 (store_parm_decls): Likewise.
15216 (hack_incomplete_structures): Likewise.
15217 * except.c (push_eh_cleanup): Likewise.
15218
15219 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
15220
15221 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
15222 frontend to the backend where it belongs.
15223 * tree.c (unsave_expr): Likewise.
15224 (unsave_expr_now): Likewise.
15225 * tree.def (UNSAVE_EXPR): Likewise.
15226 * cp-tree.h (unsave_expr): Likewise.
15227 (unsave_expr_now): Likewise.
15228
15229 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
15230
15231 * init.c (emit_base_init): Make sure the partial EH cleanups live
15232 on the function_obstack.
15233
15234 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
15235
15236 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
15237 when checking for pointer types.
15238
15239 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15240
15241 * pt.c (instantiate_class_template): Remove obsolete check for
15242 access declarations.
15243
15244 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
15245
15246 * call.c (build_overload_call): Simplify calls to
15247 build_overload_call by removing last parameter.
15248 (build_method_call): Likewise.
15249 * cp-tree.h: Likewise.
15250 * method.c (build_opfncall): Likewise.
15251 * typeck.c (build_x_function_call): Likewise.
15252
15253 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
15254
15255 * call.c (default_parm_conversions): Factor out common code.
15256 (build_method_call): Use it.
15257 (build_overload_call_real): Use it.
15258
15259 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
15260
15261 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
15262 but pedwarn as the code is bogus.
15263 * typeck.c (decay_conversion): Likewise.
15264 (build_function_call_real): Use build_addr_func instead of
15265 default_conversion. Don't allow pointer-to-method functions down
15266 here.
15267 (build_unary_op): Use real pointer-to-member functions instead of
15268 fake ones.
15269 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
15270 (convert_for_assignment): Removed some obsolete code.
15271 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
15272 build_x_function_call instead of current_class_ptr. Only call
15273 digest_init once on an initializer, we do this just checking
15274 TREE_TYPE.
15275 (build_expr_from_tree): Pass current_class_ref to
15276 build_x_function_call instead of current_class_ptr.
15277 * init.c (build_member_call): Likewise.
15278 * pase.y: Likewise.
15279 * error.c (dump_expr): Handle OFFSET_REFs better.
15280 * pt.c (unify): Handle pointer-to-member functions better.
15281 * decl.c (finish_function): Clear out current_class_ref just like
15282 we do for current_class_ptr.
15283
15284 * typeck.c (get_delta_difference): Handle virtual bases better.
15285
15286 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
15287
15288 * sig.c (build_signature_table_constructor): Use the delta for
15289 the original basetype for this virtual function with thunks.
15290 (build_signature_method_call): We still need to adjust 'this'
15291 with thunks.
15292
15293 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
15294
15295 * call.c (build_addr_func): New routine. Used to get the `real'
15296 address of a function or a method. Needed to avoid getting a
15297 pointer-to-member function.
15298 (build_call): New routine to build CALL_EXPRs.
15299 (build_method_call): Use it.
15300 * cvt.c (convert_to_aggr): Likewise.
15301 * typeck.c (build_function_call_real): Likewise.
15302 * sig.c (build_signature_table_constructor): Use build_addr_func.
15303 * cp-tree.h (build_call, build_addr_func): Declare them.
15304
15305 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
15306
15307 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
15308 * parse.y: Remove uses of LOOKUP_AGGR.
15309
15310 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
15311
15312 * *.[chy]: Rename current_class_decl to current_class_ptr, and
15313 C_C_D to current_class_ref.
15314
15315 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15316
15317 * call.c (convert_harshness): Tighten up pointer conversions.
15318
15319 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
15320
15321 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
15322 (finish_file): Likewise.
15323
15324 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
15325
15326 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
15327
15328 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
15329 code.
15330
15331 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15332
15333 * decl2.c: Turn on thunks by default where supported.
15334
15335 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
15336
15337 * cp-tree.h (build_overload_call_maybe): Removed.
15338 * call.c (build_overload_call_real): Invert meaning of last arg to
15339 be require_complete.
15340 (build_overload_call): Likewise.
15341 * typeck.c (build_x_function_call): Use build_overload_call_real
15342 instead of build_overload_call_maybe.
15343
15344 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
15345
15346 * decl2.c (finish_file): Don't try to emit functions that haven't
15347 been compiled.
15348
15349 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15350
15351 * decl2.c (finish_vtable_vardecl): Oops.
15352
15353 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
15354 Also store the bindings from previous_class_values.
15355 (pop_from_top_level): Restore them.
15356
15357 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
15358
15359 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
15360 symbol has been referenced.
15361 (finish_file): Re-join synthesis/vtable loop with inline emission
15362 loop, disable inlining when an inline is output.
15363
15364 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
15365
15366 * except.c (init_exception_processing): Setup saved_in_catch.
15367 (push_eh_cleanup): Reset __eh_in_catch.
15368 (expand_start_catch_block): Set __eh_in_catch.
15369
15370 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
15371
15372 * except.c (push_eh_cleanup): Add tracking for whether or not we
15373 have an active exception object.
15374 (expand_builtin_throw): Use it to make sure a rethrow without an
15375 exception object is caught.
15376
15377 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15378
15379 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
15380 cache.
15381
15382 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
15383
15384 * decl2.c (finish_file): Also use sentries for vars with
15385 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
15386 created).
15387
15388 * lex.c (handle_cp_pragma): Disable #pragma
15389 interface/implementation if SUPPORTS_ONE_ONLY > 1.
15390
15391 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15392
15393 * method.c (emit_thunk): Wrap default case in
15394 temporary/permanent_allocation.
15395
15396 * method.c (make_thunk): Use DECL_ONE_ONLY.
15397 (emit_thunk): Call assemble_end_function.
15398
15399 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
15400
15401 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
15402 (import_export_decl): Likewise.
15403 (finish_prevtable_vardecl): Disable vtable hack if
15404 SUPPORTS_ONE_ONLY > 1.
15405
15406 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
15407
15408 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
15409 PREDECREMENT_EXPRs take two arguments, not one.
15410
15411 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
15412
15413 * class.c (build_vtable_entry): Don't build thunks for abstract
15414 virtuals.
15415
15416 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
15417 frontend.
15418
15419 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
15420
15421 * class.c (set_rtti_entry): Use size_zero_node.
15422 (build_vtable): Likewise.
15423
15424 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
15425
15426 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
15427 (prepare_fresh_vtable): Likewise.
15428
15429 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
15430
15431 * method.c (emit_thunk): Call mark_used on the target function.
15432
15433 * call.c (build_method_call): Don't warn about pending templates.
15434
15435 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
15436
15437 * decl2.c (finish_file): Fix list walking logic.
15438
15439 * typeck2.c (check_for_new_type): Only warn if -pedantic.
15440
15441 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
15442
15443 * class.c (finish_struct_1): Remove old code for
15444 dont_allow_type_definitions.
15445 * cp-tree.h: Likewise.
15446 * spew.c: Make sure cp-tree.h is included before parse.h, so the
15447 definition of flagged_type_tree is found before it is used.
15448 * lex.c: Likewise.
15449 * parse.y: Added the ftype member to the type union, and changed a
15450 number of rules to use it instead of ttype. Added calls to
15451 check_for_new_type() as appropriate.
15452 * typeck2.c (check_for_new_type): New function for checking
15453 if a newly defined type appears in the specified tree.
15454 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
15455 for check_for_new_type().
15456
15457 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
15458
15459 * decl2.c (finish_file): Only use a sentry if the decl is public.
15460
15461 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
15462 don't pass LOOKUP_ONLYCONVERTING.
15463
15464 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
15465
15466 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
15467 properly keeps track of const and volatile type modifiers.
15468
15469 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15470
15471 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
15472 * pt.c (comp_template_args): Use it.
15473
15474 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
15475 assemble_external for artificial function decls.
15476
15477 * decl.c (cp_finish_decl): Oops.
15478
15479 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
15480
15481 * decl2.c (import_export_decl): Put static data member templates
15482 into common storage, or make them weak, depending on whether they
15483 are dynamically or statically initialized.
15484 (get_sentry): New function.
15485 (finish_file): Do import_export_decl for static data members before
15486 building the init/fini functions. Don't init/fini a variable that's
15487 EXTERNAL. Use a sentry for variables in common. Fix mismatching
15488 push/pop_temp_slots.
15489 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
15490 expand_static_init thang.
15491 * method.c (get_id_2): New function.
15492
15493 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
15494
15495 * parse.y (empty_parms): Make sure we use C++-style prototypes
15496 when we're declaring member functions.
15497
15498 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15499
15500 * Makefile.in (CONFLICTS): 16 s/r conflicts.
15501 * parse.y (self_template_type): New nonterminal.
15502
15503 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15504
15505 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
15506 name.
15507 * parse.y (base_class.1): Allow 'typename foo::bar'.
15508
15509 * lex.c (check_newline): Remove #pragma code that plays with the
15510 input stream, since we now deal with tokens. Clear nextchar when
15511 we're done.
15512 (handle_cp_pragma): Use real_yylex.
15513 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
15514 in one place.
15515
15516 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
15517
15518 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
15519
15520 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15521
15522 * parse.y: New token SELFNAME for potential constructor.
15523 * spew.c (yylex): Handle it.
15524 * lex.c (identifier_type): Produce it.
15525
15526 * parse.y (complete_type_name): In :: case, don't push class binding.
15527 (complex_type_name): Likewise.
15528
15529 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
15530
15531 * typeck.c (build_reinterpret_cast): Handle pointer to member
15532 functions.
15533
15534 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15535
15536 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
15537 pragmas.
15538 (check_newline): Put the vtable/unit/implementation/interface pragma
15539 code into handle_cp_pragma, replacing it with a call.
15540 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
15541 args. Get the next token after handling the pragma token.
15542
15543 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
15544
15545 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
15546 (convert_to_pointer_force): Likewise.
15547
15548 * init.c (build_new): Fix array new without -fcheck-new.
15549
15550 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15551
15552 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
15553 tree.c: Lose TYPE_NESTED_NAME.
15554
15555 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
15556 as identifiers.
15557
15558 * tree.def: Add VEC_INIT_EXPR.
15559 * expr.c (cplus_expand_expr): Handle it.
15560 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
15561 the extra file-scope symbol nastiness.
15562
15563 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
15564
15565 * method.c (make_thunk): Thunks are static.
15566 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
15567
15568 * decl2.c (mark_vtable_entries): Emit thunks as needed.
15569 (finish_file): Don't emit them here.
15570
15571 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
15572
15573 * rtti.c (build_dynamic_cast): Handle null pointers.
15574 (ifnonnull): New function.
15575
15576 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
15577
15578 * call.c (build_method_call): Remember the original basetype we
15579 were called with. Give an error message instead of trying
15580 (incorrectly) to call a non-static member function through a
15581 non-inherited class.
15582
15583 * search.c (expand_upcast_fixups): Mark the new fixup as
15584 DECL_ARTIFICIAL.
15585
15586 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15587
15588 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
15589
15590 * class.c (set_rtti_entry): Fix for thunks.
15591
15592 * decl2.c (import_export_decl): Still emit typeinfo fns for
15593 cv-variants of builtin types.
15594
15595 * rtti.c (expand_class_desc): Set up base_info_type_node here.
15596 (init_rtti_processing): Instead of here.
15597
15598 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15599
15600 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
15601 (build_typeid): Only complain about taking dynamic typeid without
15602 -frtti.
15603
15604 * decl2.c: flag_rtti defaults to 1.
15605
15606 * rtti.c (get_tinfo_var): The general class case is now smaller.
15607 (init_rtti_processing): Pack the latter three fields of base_info
15608 into 32 bits.
15609
15610 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
15611
15612 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
15613
15614 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
15615
15616 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
15617 (push_memoized_context): Split out code to undefer pop_type_level to
15618 (clear_memoized_cache): here.
15619 (pop_memoized_context): We can only handle one layer of deferral of
15620 pop_type_level so clear the cache, if there was a previous level.
15621
15622 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15623
15624 * rtti.c (init_rtti_processing): Build up base_info_type_node.
15625 (expand_class_desc): Use one pointer to an array of base_info
15626 structs, passed using a CONSTRUCTOR.
15627
15628 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
15629
15630 * class.c (build_vbase_path): Remove block extern for
15631 flag_assume_nonnull_objects here.
15632 (build_vfn_ref): Split out functionality into build_vtbl_ref.
15633 (build_vtbl_ref): New routine.
15634 (build_vtable): Set up rtti info here.
15635 (add_virtual_function): Note in CLASSTYPE_RTTI the best
15636 place where we can get the rtti pointers from to avoid having to
15637 search around for a place.
15638 (finish_base_struct): Likewise.
15639 (finish_struct_1): Likewise. Never create totally new vtables
15640 with totally new vtable pointers for rtti. Disable code to layout
15641 vtable pointers better until we want to break binary
15642 compatibility.
15643 * rtti.c (build_headof_sub): New routine to convert down to a
15644 sub-object that has an rtti pointer in the vtable.
15645 (build_headof): Use it. Also, use build_vtbl_ref now to be more
15646 maintainable.
15647 (build_dynamic_cast): Make sure we have saved it, if we need to.
15648 * search.c (dfs_init_vbase_pointers): Disable code that deals with
15649 a more efficient vtable layout, enable later.
15650 * call.c (flag_assume_nonnull_objects): Moved declaration to
15651 * cp-tree.h: here. Declare build_vtbl_ref.
15652 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
15653 function calls that want a tree.
15654
15655 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
15656
15657 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
15658 other X subobjects in the most derived type. Ack.
15659
15660 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
15661 get_typeid will do it for us.
15662 (get_typeid_1): Break out call-building for expand_*_desc to use.
15663 (get_typeid): Call it.
15664 (expand_*_desc): Likewise.
15665 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
15666 and void *.
15667 (init_decl_processing): Lose builtin_type_tdescs lossage.
15668 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
15669
15670 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
15671
15672 * pt.c (tsubst): When calling set_nested_typename, use
15673 TYPE_NESTED_NAME (current_class_type) instead of
15674 current_class_name.
15675
15676 * decl.c (pushdecl): Likewise.
15677 (pushdecl_class_level): Likewise.
15678 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
15679 set_nested_typename.
15680
15681 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
15682
15683 * rtti.c (synthesize_tinfo_fn): Handle arrays.
15684
15685 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
15686
15687 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
15688
15689 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
15690 (init_rtti_processing): Lose bad_cast_type.
15691 (build_dynamic_cast): Use throw_bad_cast.
15692
15693 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
15694
15695 * decl2.c (finish_file): Don't synthesize artificial functions
15696 that are external and not inline.
15697
15698 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
15699
15700 * decl2.c (finish_file): Handle having new inlines added to
15701 saved_inlines by synthesis.
15702
15703 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
15704
15705 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15706
15707 RTTI rewrite to initialize nodes as needed, not require that
15708 users #include <typeinfo>, complete functionality and reduce wasted
15709 space.
15710 * rtti.c (init_rtti_processing): New fn.
15711 (build_typeid): The vtable entry is now a function.
15712 (get_tinfo_var): New fn.
15713 (get_tinfo_fn): Likewise.
15714 (get_typeid): Use it.
15715 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
15716 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
15717 points __rtti_*.
15718 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
15719 (synthesize_tinfo_fn): New fn.
15720 * method.c (build_t_desc_overload): Lose.
15721 (build_overload_with_type): More generic.
15722 * decl.c (init_decl_processing): Call init_rtti_processing.
15723 * class.c (set_rtti_entry): Use get_tinfo_fn.
15724 * decl2.c (mark_vtable_entries): Mark the rtti function.
15725 (finish_prevtable_vardecl): Don't build_t_desc.
15726 (import_export_decl): Handle tinfo functions.
15727 (finish_file): Likewise.
15728 * typeck.c (inline_conversion): New fn.
15729 (build_function_call_real): Use it.
15730 * cp-tree.h: Add decls.
15731
15732 * method.c (hack_identifier): Also convert component_refs from
15733 references.
15734
15735 * lex.c (cons_up_default_function): Use the type, not the name, in
15736 declspecs.
15737
15738 * decl2.c (import_export_vtable): Fix weak vtables.
15739
15740 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
15741
15742 * search.c (get_base_distance_recursive): Fix access checks for
15743 protected bases.
15744
15745 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15746
15747 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
15748 cp-tree.h.
15749 (convert_harshness): Add prototypes wrapped by PROTO.
15750 * decl2.c (grok_function_init): Likewise.
15751 (do_toplevel_using_decl): Change to void return type.
15752 * class.c (build_vtable_entry): Remove decl of make_thunk.
15753 (merge_overrides): Fix order of arg definitions.
15754 (finish_vtbls): Likewise.
15755 (fixup_vtable_deltas): Likewise.
15756 (modify_all_direct_vtables): Likewise.
15757 (modify_all_indirect_vtables): Likewise.
15758 * search.c (get_base_distance_recursive): Likewise.
15759 (get_abstract_virtuals_1): Likewise.
15760 (fixup_virtual_upcast_offsets): Likewise.
15761 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
15762 * init.c (perform_member_init): Fix order of arg definitions.
15763 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
15764 * cp-tree.h (make_thunk): Add decl.
15765 (overload_template_name, push_template_decl): Add decls.
15766 (do_toplevel_using_decl): Change to void return type.
15767 (vec_binfo_member): Add decl.
15768
15769 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15770
15771 * typeck.c (mark_addressable, convert_for_assignment,
15772 convert_for_initialization, pointer_int_sum, pointer_diff,
15773 unary_complex_lvalue): Add prototypes wrapped by PROTO.
15774 (convert_sequence): #if 0 fn decl, since definition also is.
15775
15776 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
15777
15778 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
15779 cast to pointer types for type searching.
15780
15781 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15782
15783 * typeck.c (get_delta_difference): Use cp_error, not error, in the
15784 case where BINFO == 0.
15785
15786 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
15787
15788 * call.c (build_method_call): Fix wording of error messages so
15789 constructors come out right.
15790
15791 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
15792
15793 * decl.c (push_overloaded_decl): Don't warn about hidden
15794 constructors when both the type and the function are declared
15795 in a system header file.
15796
15797 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
15798
15799 * class.c (finish_struct_1): Propagate the TYPE_PACKED
15800 flag for the type to the type's fields.
15801
15802 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15803
15804 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
15805
15806 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
15807
15808 * class.c (base_info, finish_base_struct): Replace
15809 needs_virtual_dtor with base_has_virtual.
15810
15811 (finish_struct_1): Remove the old code that tried to make default
15812 destructors virtual. Use base_has_virtual when checking if we need
15813 to add a vtable entry for the rtti code.
15814
15815 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15816
15817 * pt.c (push_template_decl): Complain about template decl with
15818 inappropriate declaration.
15819
15820 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
15821
15822 * typeck.c (build_x_unary_op): Remove bogus check for taking
15823 the address of a member function.
15824
15825 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
15826
15827 * parse.y (constructor_declarator): Only push the class if
15828 we are not already in the class.
15829
15830 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
15831
15832 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
15833 Add additional argument to INIT_CUMULATIVE_ARGS.
15834
15835 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
15836
15837 * decl.c (shadow_tag): Fix error about anon union with methods.
15838
15839 * parse.y (self_reference): Only generate a self-reference if this
15840 is a non-template class.
15841 (opt.component_decl_list): Only use it if it was generated.
15842
15843 * parse.y (component_decl_1): Use constructor_declarator.
15844 (fn.def2): Likewise.
15845 (notype_component_declarator0): Likewise.
15846
15847 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
15848
15849 * typeck.c (build_x_unary_op): Add checks for taking the address
15850 of a TARGET_EXPR or of a member function, and give appropriate
15851 warnings.
15852
15853 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
15854
15855 * pt.c (process_template_parm): Allow template type parms to be
15856 used as types for template const parms.
15857
15858 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
15859
15860 * init.c (expand_vec_init): Ensure the eh cleanups are on the
15861 function_obstack.
15862
15863 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15864
15865 * decl.c (lookup_name_real): Be even more picky about the
15866 ambiguous lookup warning.
15867 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
15868 * parse.y (constructor_declarator): Rather than here.
15869
15870 * parse.y (constructor_declarator): New nonterminal.
15871 (fn.def1): Use it.
15872 (explicit_instantiation): Likewise.
15873
15874 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15875
15876 Add implicit declaration of class name at class scope.
15877 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
15878 * parse.y (self_reference): New nonterminal.
15879 (opt.component_decl_list): Use it.
15880 (fn.def1): Add nested_name_specifier type_name cases.
15881 * class.c (build_self_reference): New function.
15882 (finish_struct): Handle access_default later, move self-reference
15883 decl to the end.
15884 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
15885 * cp-tree.h: Adjust.
15886
15887 * pt.c (do_function_instantiation): Separate handling of member
15888 functions and non-member functions properly.
15889
15890 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15891
15892 * pt.c (process_template_parm): Improve error for 'volatile class K'.
15893
15894 * class.c (finish_struct_1): Check the right slot for destructors.
15895
15896 * decl.c (start_enum): Complain about enum templates.
15897
15898 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
15899
15900 * init.c (resolve_offset_ref): Offset pointers to member data by one.
15901 * typeck.c (unary_complex_lvalue): Likewise.
15902
15903 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
15904
15905 * typeck.c (c_expand_return): Check for a returned local
15906 array name, similar to the check for an ADDR_EXPR.
15907
15908 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
15909
15910 * decl.c (cp_finish_decl): Don't build cleanups for static
15911 variables here.
15912
15913 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
15914
15915 * typeck.c (build_modify_expr): Fix error messages to be more
15916 accurate.
15917 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
15918 assignment operators.
15919 * error.c (assop_as_string): Likewise. Add support for `%Q' for
15920 assignment operators.
15921
15922 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
15923
15924 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
15925 give an error if initialized. pedwarn about nested type with the
15926 same name as its enclosing class.
15927
15928 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
15929
15930 * typeck.c (require_complete_type): Be sure to instantiate the
15931 MAIN_VARIANT of the type.
15932
15933 * decl2.c (finish_file): Instantiate pending templates before
15934 processing static constructors and destructors.
15935
15936 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
15937 unless at_eof.
15938
15939 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
15940
15941 * decl2.c (delete_sanity): If error_mark_node is passed
15942 in as an expression, quit while we're ahead.
15943
15944 * decl.c (grokdeclarator): Give an error message if `friend'
15945 is combined with any storage class specifiers.
15946
15947 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
15948
15949 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
15950 definition of nonexistent nested type.
15951
15952 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
15953 not to say 'typedef'.
15954
15955 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15956
15957 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
15958 * search.c (dfs_walk, dfs_init_vbase_pointers,
15959 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
15960 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
15961
15962 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
15963
15964 * except.c (build_throw): Support minimal parse.
15965 * pt.c (tsubst_copy): Support THROW_EXPR.
15966 * decl2.c (build_expr_from_tree): Likewise.
15967
15968 * pt.c (mangle_class_name_for_template): Always allocate
15969 scratch_firstobj.
15970
15971 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
15972
15973 * cvt.c (cp_convert_to_pointer): Give an appropriate error
15974 when trying to cast from an incomplete type.
15975
15976 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15977
15978 * pt.c (instantiate_class_template): Don't bother setting up
15979 CLASSTYPE_TAGS explicitly, as the nested types will add
15980 themselves.
15981
15982 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
15983
15984 * decl.c (shadow_tag): Remove old error check for usage of
15985 an enum without a previous declaration.
15986 (xref_tag): Add error message about usage of enums without a
15987 previous declaration.
15988
15989 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
15990
15991 * lex.c (do_identifier): Only do name consistency check if we're
15992 parsing.
15993
15994 * pt.c (push_template_decl): Don't crash if we get a member defn
15995 that doesn't match.
15996
15997 * decl.c (xref_tag_from_type): New function to do an xref without
15998 always having to figure out code_type_node.
15999 * cp-tree.h: Declare it.
16000 * pt.c (instantiate_class_template): Use it for friend classes.
16001 (lookup_template_class): Use it.
16002
16003 * typeck2.c (build_functional_cast): Pull out a single parm before
16004 passing it to build_c_cast.
16005
16006 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
16007
16008 * expr.c (do_case): Give an error message if a pointer is
16009 given as a case value.
16010
16011 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16012
16013 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
16014 an overload list.
16015
16016 * lex.c (cons_up_default_function): Really, now, interface hackery
16017 does not apply to synthesized methods.
16018
16019 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
16020
16021 * call.c (build_method_call): Ctors and dtors now have special names
16022 with respect to lookups.
16023 * class.c (add_method): Likewise.
16024 (grow_method): Likewise.
16025 (finish_struct_methods): Likewise.
16026 (warn_hidden): Likewise.
16027 (finish_struct_1): Likewise.
16028 * cvt.c (convert_to_reference): Likewise.
16029 (convert_to_aggr): Likewise.
16030 (cp_convert): Likewise.
16031 * decl2.c (check_classfn): Likewise.
16032 * init.c (expand_member_init): Likewise.
16033 (expand_default_init): Likewise.
16034 (expand_aggr_init_1): Likewise.
16035 (build_offset_ref): Likewise.
16036 (build_new): Likewise.
16037 (build_delete): Likewise.
16038 * lex.c (do_inline_function_hair): Likewise.
16039 * search.c (lookup_field_1): Likewise.
16040 (lookup_fnfields_here): Likewise.
16041 (lookup_field): Likewise.
16042 (lookup_fnfields): Likewise.
16043 (get_virtual_destructor): Likewise.
16044 (dfs_debug_mark): Likewise.
16045 (dfs_pushdecls): Likewise.
16046 (dfs_compress_decls): Likewise.
16047 * tree.c (layout_basetypes): Likewise.
16048 * typeck.c (build_component_ref): Likewise.
16049 (build_x_function_call): Likewise.
16050 (build_modify_expr): Likewise.
16051 (convert_for_initialization): Likewise.
16052 (build_functional_cast): Likewise.
16053 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
16054 (CTOR_NAME): New.
16055 (DTOR_NAME): New.
16056 * decl.c (ctor_identifier): New.
16057 (dtor_identifier): New.
16058 (init_decl_processing): Set them.
16059
16060 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
16061
16062 * typeck.c (build_component_ref): Don't get confused by fields whose
16063 context has no type name, like pointer to member functions.
16064
16065 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
16066
16067 * decl.c (grokdeclarator): Handle typedef without declarator.
16068
16069 * pt.c (tsubst): Handle SCOPE_REF in declarator.
16070
16071 * parse.y (bad_parm): Catch another case of missing `typename'.
16072
16073 * lex.c (yyprint): Handle TYPE_DECLs.
16074
16075 * decl.c (start_function): Don't try to be clever.
16076
16077 * lex.c: Lose compiler_error_with_decl.
16078 * typeck2.c: Lose error_with_aggr_type.
16079 (incomplete_type_error): Use cp_* instead of old functions.
16080 (readonly_error): Likewise.
16081 * typeck.c (convert_arguments): Likewise.
16082 * search.c (lookup_nested_field): Likewise.
16083 * method.c (make_thunk): Likewise.
16084 * decl.c (grokparms): Likewise.
16085 * cp-tree.h: Update.
16086
16087 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
16088 and value.
16089
16090 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
16091
16092 * method.c (build_opfncall): When deleting a pointer to an
16093 array, build a new pointer to the tree past any ARRAY_TYPE
16094 nodes.
16095
16096 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16097
16098 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
16099
16100 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16101
16102 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
16103 and ! DECL_INLINE.
16104
16105 * decl.c (finish_function): Don't set nested based on
16106 hack_decl_function_context.
16107 * parse.y (function_try_block): Check for nested function.
16108 (pending_inlines): Likewise.
16109
16110 * decl2.c (build_expr_from_tree): If a unary op already has a
16111 type, just return it.
16112
16113 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
16114
16115 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
16116 (finish_file): Check the return value of walk_vtables.
16117 (finish_prevtable_vardecl): Return int.
16118 (finish_vtable_vardecl): Likewise.
16119 (prune_vtable_vardecl): Likewise.
16120 * lex.c (set_vardecl_interface_info): Likewise.
16121 * cp-tree.h: Adjust return types.
16122
16123 * class.c (delete_duplicate_fields_1): Don't complain about
16124 duplicate nested types if they're the same type.
16125 (finish_struct): Remove check for duplicate.
16126 * decl2.c (grokfield): Don't check for typedef of anonymous type.
16127
16128 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16129
16130 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
16131
16132 * decl.c (grokdeclarator): Lose special handling of class-level
16133 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
16134 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
16135
16136 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
16137
16138 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
16139
16140 * search.c (compute_access): Fix handling of anonymous union
16141 members.
16142 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
16143 from anonymous unions to their members.
16144
16145 * typeck.c (build_x_function_call): For static member functions,
16146 hand off to build_member_call.
16147
16148 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
16149
16150 * typeck.c (build_component_ref): Handle OFFSET_REFs.
16151
16152 * init.c (expand_vec_init): Fix init == 0 case.
16153
16154 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
16155
16156 * init.c (build_new): pedwarn about init and array new.
16157 (expand_vec_init): Handle lists, use convert_for_initialization.
16158
16159 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
16160 when converting to an aggregate type.
16161 * cvt.c (cp_convert): Pass it through.
16162
16163 * typeck.c (build_conditional_expr): Handle user-defined
16164 conversions to slightly different types.
16165
16166 * decl.c (grokdeclarator): Force an array type in a parm to be
16167 permanent.
16168
16169 * decl2.c (do_using_directive): Sorry.
16170 (do_namespace_alias): Likewise.
16171 * lex.c (real_yylex): Warn about using the `namespace' keyword.
16172
16173 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16174
16175 * parse.y (datadef): Move call to note_list_got_semicolon up.
16176
16177 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
16178
16179 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
16180
16181 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
16182
16183 * decl.c (cp_finish_decl): The exception regions have to be
16184 nested, not overlapping. We start the exception region for a
16185 decl, after it has been fully built, and all temporaries for it
16186 have been cleaned up.
16187
16188 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
16189
16190 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
16191
16192 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
16193
16194 * tree.def: Add RETURN_INIT.
16195 * pt.c (instantiate_decl): Handle RETURN_INIT.
16196 * decl.c (store_return_init): Handle minimal_parse_mode.
16197
16198 * tree.c (cp_build_type_variant): Just return an error_mark_node.
16199 * decl.c (make_typename_type): Don't try to get the file and line
16200 of an identifier.
16201 * typeck.c (comptypes): Handle TYPENAME_TYPE.
16202
16203 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
16204
16205 * decl.c (poplevel): Make sure we clear out and restore old local
16206 non-VAR_DECL values by default when they go out of scope.
16207
16208 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16209
16210 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
16211 referring to addresses of variables and functions.
16212
16213 * error.c (dump_expr): Support SIZEOF_EXPR.
16214
16215 * init.c (do_friend): Use the return value of check_classfn.
16216
16217 * typeck.c (convert_arguments): Call complete_type.
16218
16219 * method.c (hack_identifier): After giving an error, set value to
16220 error_mark_node.
16221
16222 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
16223
16224 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
16225 lossage for local classes.
16226 * cp-tree.h: Declare it.
16227 * decl.c (lookup_name_real): Evil, painful hack for local classes.
16228 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
16229 Use hack_decl_function_context.
16230 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
16231 (start_function): Use hack_decl_function_context.
16232 (finish_function): Likewise.
16233 * method.c (synthesize_method): Likewise.
16234 * lex.c (process_next_inline): Likewise.
16235 (do_pending_inlines): Likewise.
16236 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
16237 done with it.
16238
16239 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
16240
16241 * sig.c (build_signature_pointer_or_reference_type): Align
16242 signature pointers/references on 8-byte boundaries so they can be
16243 grabbed 2 words at a time on a Sparc.
16244
16245 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
16246
16247 * method.c (hack_identifier): Requiring a static chain is now a
16248 hard error.
16249 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
16250 functions.
16251
16252 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16253
16254 * init.c (build_offset_ref): Call complete_type.
16255
16256 * decl.c (pop_from_top_level): Always pop previous_class_type.
16257
16258 * parse.y: Handle multiple decls in a for-init-statement.
16259 * pt.c (tsubst_expr): Likewise.
16260
16261 * pt.c (tsubst): Use tsubst_expr for the second operand of an
16262 ARRAY_REF.
16263
16264 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
16265 (poplevel_class): Set it here.
16266 (pop_from_top_level): Pop it here if we're returning to class scope.
16267 * class.c (pushclass): Don't set it here.
16268
16269 * decl.c (maybe_push_to_top_level): Save current_template_parms,
16270 and clear it if !pseudo.
16271 (pop_from_top_level): Restore it.
16272
16273 * decl2.c (finish_file): Push the dummy each time we walk the list
16274 of vtables.
16275
16276 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
16277 something for CAST_EXPR.
16278
16279 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
16280
16281 * cvt.c (cp_convert): Warn about implicit conversion of the
16282 address of a function to bool, as it is always true.
16283
16284 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
16285
16286 * typeck.c (c_expand_return): Fix warning for local externs returned.
16287
16288 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
16289
16290 * tree.c (mapcar): Propagate const and volatile properly.
16291
16292 * typeck.c (complete_type): Be sure to instantiate the
16293 MAIN_VARIANT of the type.
16294
16295 * method.c (synthesize_method): Class interface hackery does not
16296 apply to synthesized methods.
16297
16298 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16299
16300 * pt.c (comp_template_args): Use comptypes rather than just
16301 checking for TEMPLATE_TYPE_PARM equivalence.
16302
16303 * typeck.c (build_x_function_call): Call complete_type before
16304 checking TYPE_OVERLOADS_CALL_EXPR.
16305
16306 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
16307
16308 * g++.c (main): Check also for new define ALT_LIBM.
16309
16310 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16311
16312 * pt.c (instantiate_class_template): If we don't have a pattern
16313 yet, that's OK.
16314 (coerce_template_parms): If we see a local class, bail.
16315
16316 * decl.c (grok_reference_init): Make sure there's a type before
16317 checking its code.
16318
16319 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
16320 (push_template_decl): Likewise.
16321
16322 * parse.y (named_class_head): Set
16323 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
16324
16325 * decl.c (xref_tag): Diagnose redeclaration of template
16326 type-parameter name.
16327
16328 * error.c (dump_type): Handle anonymous template type parms.
16329
16330 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
16331 TYPE_STUB_DECL.
16332 (coerce_template_parms): Likewise.
16333
16334 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
16335
16336 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
16337 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
16338
16339 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
16340
16341 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
16342 before trying to get its STUB_DECL.
16343 (coerce_template_parms): Likewise.
16344
16345 * parse.y (template_type_parm): If they didn't use 'class',
16346 pretend they did after giving an error.
16347
16348 * pt.c (coerce_template_parms): Diagnose use of local class.
16349
16350 * decl.c (grok_reference_init): Use instantiate_type.
16351
16352 * error.c (dump_expr): Handle TEMPLATE_DECLs.
16353
16354 * parse.y (named_class_head): Diagnose mismatching types and tags.
16355
16356 * decl.c (pushdecl): Type decls and class templates clash with
16357 artificial type decls, not hide them.
16358
16359 * decl.c (redeclaration_error_message): Diagnose redefinition of
16360 templates properly.
16361 (duplicate_decls): Diagnose disallowed overloads for template
16362 functions, too.
16363
16364 * decl.c (start_decl): Call complete_type before checking for a
16365 destructor.
16366
16367 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
16368
16369 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
16370
16371 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16372
16373 * decl.c (grok_op_properties): Don't check for operator++(int) in
16374 a template.
16375
16376 * tree.c (perm_manip): Return a copy of variable and function
16377 decls with external linkage.
16378
16379 * tree.def: Change some of the min tree codes to type "1".
16380 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
16381 * method.c (build_overload_int): Emit something arbitrary for
16382 anything but an INTEGER_CST if we're in a template.
16383
16384 * decl.c (cp_finish_decl): Call complete_type before deciding
16385 whether or not to lay out the decl.
16386
16387 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
16388
16389 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
16390
16391 * typeck2.c (build_x_arrow): Call complete_type.
16392
16393 * pt.c (add_pending_template): Broken out.
16394 (lookup_template_class): If -fexternal-templates, call it for all
16395 the methods of implemented types.
16396 (instantiate_class_template): Instead of instantiating them here.
16397 (instantiate_decl): Handle -fexternal-templates earlier.
16398
16399 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16400
16401 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
16402 memoized lookup stuff inside GATHER_STATISTICS.
16403
16404 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
16405
16406 * decl.c (start_decl): Complain about array of incomplete type
16407 here.
16408 (grokdeclarator): Not here.
16409
16410 * parse.y (template_parm): Expand full_parm inline so we can set
16411 the rule's precedence.
16412
16413 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
16414 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
16415 * decl2.c (grokbitfield): Don't check for integer constant here.
16416 * class.c (finish_struct_1): Check here.
16417
16418 * decl.c (define_label): Make the min decl go on permanent_obstack.
16419
16420 * pt.c (unify): Don't handle CONST_DECLs.
16421 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
16422 (tsubst_copy): Likewise.
16423
16424 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
16425 CONST_DECL for a template parm.
16426
16427 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
16428
16429 * decl.c (grokdeclarator): Complain about array of incomplete type
16430 here.
16431 (start_decl_1): Not here.
16432
16433 * pt.c (tsubst): Handle pointer-to-function declarators.
16434
16435 * method.c (hack_identifier): If pedantic, diagnose local class
16436 methods that require a static chain.
16437
16438 * decl.c (grok_op_properties): No longer static.
16439 * cp-tree.h: Declare it.
16440 * pt.c (tsubst): Call it for operators.
16441 Use tsubst_copy for TREE_VECs.
16442
16443 * parse.y (template_arg): The expr has precedence like '>'.
16444
16445 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
16446
16447 * pt.c (coerce_template_parms): Don't coerce an expression using
16448 template parms.
16449 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
16450 (tsubst): Don't use build_index_2_type if the max_value uses template
16451 parms.
16452 * method.c (build_overload_int): Emit something arbitrary for an
16453 expression using template parms.
16454
16455 * parse.y (template_close_bracket): New non-terminal to catch use
16456 of '>>' instead of '> >' in template class names.
16457 (template_type): Use it.
16458 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
16459
16460 * tree.def: Add CAST_EXPR.
16461 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
16462 CONVERT_EXPR for minimal_parse_mode.
16463 * typeck.c (build_c_cast): Likewise.
16464 * pt.c (tsubst_copy): Likewise.
16465 * decl2.c (build_expr_from_tree): Likewise.
16466 * error.c (dump_expr): Likewise.
16467
16468 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16469
16470 * except.c (SetTerminate, SetUnexpected): Put back global vars.
16471 (init_exception_processing): Put back decl/init of
16472 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
16473 fns from libstdc++.
16474
16475 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
16476 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
16477 Delete unused fns.
16478 * cp-tree.h (declare_uninstantiated_type_level,
16479 uninstantiated_type_level_p): Delete prototypes.
16480
16481 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
16482
16483 * pt.c (tsubst_expr): Add default return.
16484
16485 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16486
16487 * error.c (fndecl_as_string): Delete unused arg CNAME.
16488 * sig.c (build_signature_table_constructor,
16489 build_signature_method_call): Fix calls.
16490
16491 * class.c (the_null_vtable_entry): Delete var definition.
16492 (init_class_processing): Delete tree the_null_vtable_entry init.
16493 * decl.c (no_print_{functions, builtins}): Declare as static.
16494 (__tp_desc_type_node): #if 0 var definition.
16495 (init_type_desc): #if 0 init of __tp_desc_type_node.
16496 (vb_off_identifier): Move var decl into init_decl_processing.
16497 (current_function_assigns_this): Declare as static.
16498 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
16499 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
16500 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
16501 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
16502 * init.c (BI_header_type, BI_header_size): Declare as static.
16503 * pt.c (template_classes): Delete unused var.
16504 (add_pending_template): Delete decl for non-existent fn.
16505 (lookup_template_class): Delete vars CODE and TAG_CODE.
16506 (instantiate_template): Delete unused var TARGS.
16507 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
16508 Delete decls.
16509 (__tp_desc_type_node): #if 0 var decl.
16510 (fndecl_as_string): Fix prototype.
16511
16512 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16513
16514 * tree.def: Add GOTO_STMT.
16515 * pt.c (tsubst_expr): Support goto and labels.
16516 * decl.c (define_label): Support minimal parsing.
16517 * parse.y (simple_stmt): Likewise.
16518
16519 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16520
16521 * xref.c (GNU_xref_member): Only define/set var I if
16522 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
16523 used.
16524 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
16525 (GNU_xref_end): Fix call.
16526 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
16527 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
16528
16529 * tree.c (build_exception_variant): Delete unused vars I, A, T,
16530 T2, and CNAME.
16531 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
16532 (mapcar): Delete unused var CODE.
16533 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
16534 (break_out_cleanups): Fix call.
16535 (bot_manip): Likewise.
16536 * call.c (build_method_call): Likewise.
16537 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
16538 Likewise.
16539 * typeck.c (unary_complex_lvalue, build_modify_expr,
16540 convert_for_initialization): Likewise.
16541 * typeck2.c (build_functional_cast): Likewise.
16542 * cp-tree.h (build_cplus_new): Fix prototype.
16543
16544 * repo.c (open_repo_file): Delete unused var Q.
16545 (repo_compile_flags, repo_template_declared,
16546 repo_template_defined, repo_class_defined, repo_inline_used,
16547 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
16548 (repo_get_id, repo_vtable_used): Declare as static.
16549 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
16550 prototypes.
16551
16552 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16553
16554 * parse.y (pending_inlines): Add function_try_block case.
16555
16556 * pt.c (unify): Fix for template const parms.
16557
16558 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16559
16560 * lex.c (extract_interface_info): Delete forward decl.
16561 (default_copy_constructor_body, default_assign_ref_body): Delete
16562 decls for non-existent functions.
16563 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
16564 (init_lex): Delete setting them.
16565 (cons_up_default_function): Delete unused vars FUNC_BUF,
16566 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
16567 #if 0'd synth code.
16568 (toplevel, expression_obstack): Delete unused extern decls.
16569 (tree_node_kind): Delete unused enum.
16570 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
16571 GATHER_STATISTICS.
16572 (tree_node_kind_names): Delete unused extern decl.
16573 (synth_obstack): Delete unused var.
16574 (init_lex): Don't set it.
16575 (init_parse): Add decl before use.
16576 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
16577 (current_unit_{name, language}): Delete unused vars.
16578 (check_newline): Don't bother setting them, just accept the #pragma.
16579 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
16580 (current_unit_{name, language}): Delete decls.
16581
16582 * search.c: Wrap all of the memoized functions, macros, and
16583 variables inside #ifdef GATHER_STATISTICS.
16584 (lookup_field, lookup_fnfields): Likewise.
16585 (init_search_processing): Likewise.
16586 (reinit_search_statistics): Wrap whole function.
16587 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
16588
16589 * decl.c (finish_function): Only call pop_memoized_context if
16590 GATHER_STATISTICS is defined.
16591 (start_function): Likewise for push_memoized_context.
16592 * class.c (pushclass, popclass): Likewise.
16593
16594 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
16595 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
16596
16597 * cvt.c (cp_convert): Delete unused local var FORM.
16598 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
16599 prototypes.
16600
16601 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16602
16603 * pt.c (do_poplevel): Oops; really return what we get from
16604 poplevel this time.
16605
16606 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16607
16608 * cp-tree.h (is_aggr_type): Add prototype.
16609
16610 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
16611 * method.c ({push,pop}_cp_function_context): Delete decls.
16612 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
16613 (SetUnexpected, SetTerminate): Delete unused vars.
16614 (init_exception_processing): Don't set SetUnexpected or
16615 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
16616 (output_exception_table_entry): Delete unused array LABEL.
16617 (expand_internal_throw): Delete unused var PARAMS.
16618 (expand_start_catch_block): Delete unused var CLEANUP.
16619 (emit_exception_table): Delete unused var EH_NODE_DECL.
16620 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
16621 GOTO_UNWIND_AND_THROW. Don't set them.
16622 (end_eh_unwinder): Add top decl.
16623 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
16624 (exception_section, push_rtl_perm, do_function_call,
16625 lang_interim_eh, push_eh_cleanup, eh_outer_context,
16626 expand_end_eh_spec, end_eh_unwinder): Declare as static.
16627 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
16628 throw_used): Likewise.
16629 * cp-tree.h (expand_end_eh_spec): Delete prototype.
16630
16631 * search.c (dfs_mark, dfs_mark_vtable_path,
16632 dfs_unmark_vtable_path, dfs_mark_new_vtable,
16633 dfs_unmark_new_vtable, dfs_clear_search_slot,
16634 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
16635 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
16636 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
16637 functions.
16638 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
16639 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
16640 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
16641 Only define #ifdef GATHER_STATISTICS.
16642 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
16643 is defined.
16644 (vbase_decl): Delete var definition.
16645 (init_search): Delete old decl.
16646 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
16647 never actually used.
16648 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
16649 (get_base_distance_recursive): Delete unused fourth arg
16650 BASETYPE_PATH. Fix call .
16651 (get_base_distance): Fix call.
16652 (push_class_decls): Delete unused var ID.
16653 (make_memoized_table_entry): Declare as static.
16654 (breadth_first_search): Declare as static.
16655 (tree_has_any_destructor_p): Declare as static.
16656 (pop_class_decls): Delete unused arg pop_class_decls.
16657 * class.c (popclass): Fix call to pop_class_decls.
16658 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
16659 tree_has_any_destructor_p): Delete prototypes.
16660
16661 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
16662 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
16663 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
16664 (build_user_desc): Delete unused var T.
16665 (build_class_desc): Delete unused vars T and OFF.
16666 (build_t_desc): Delete unused var NAME_STRING.
16667 (build_headof): Make static.
16668 (get_bad_cast_node): Likewise.
16669 (get_def_to_follow): Likewise.
16670 * cp-tree.h (init_type_desc): Add prototype.
16671 (build_headof): Remove prototype.
16672
16673 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16674
16675 * pt.c (tsubst): Only look for matching decls at file scope for
16676 non-member functions.
16677
16678 * call.c (build_scoped_method_call): Handle scoped destructor
16679 calls in templates.
16680
16681 * decl.c (*_top_level): Also save previous_class_values.
16682
16683 * pt.c (tsubst_expr): Support do {} while loops.
16684 * parse.y (simple_stmt): Likewise.
16685 * tree.def: Likewise.
16686
16687 * method.c (build_overload_identifier): For a class nested in a
16688 template class, don't mangle in the template parms from our
16689 context.
16690
16691 * lex.c, cp-tree.h: Remove support for template instantiations in
16692 the pending_inlines code.
16693 * pt.c: Remove dead functions and unused arguments.
16694 (uses_template_parms): TYPENAME_TYPEs always use template parms.
16695 * parse.y: Stop passing anything to end_template_decl.
16696 * tree.c (print_lang_statistics): Only print tinst info #ifdef
16697 GATHER_STATISTICS.
16698
16699 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16700
16701 * init.c (expand_recursive_init{,_1}): Delete decls.
16702 (sort_member_init): Delete unused var INIT.
16703 (emit_base_init): Delete unused var X.
16704 (build_offset_ref): Delete unused var CNAME.
16705 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
16706 (emit_base_init): Delete unused local var BASE. Delete extern
16707 decl of IN_CHARGE_IDENTIFIER.
16708 (build_delete): Delete unused local var VIRTUAL_SIZE.
16709
16710 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
16711 (build_delete): Fix call.
16712 * decl2.c (delete_sanity): Likewise.
16713 * cp-tree.h (build_vec_delete): Update prototype.
16714
16715 * typeck.c (common_base_type): Delete unused var TMP.
16716 (build_binary_op): Delete local var ARGS_SAVE.
16717 (build_array_ref): Delete unused var ITYPE.
16718 (c_expand_return): Delete unused var USE_TEMP.
16719
16720 * typeck.c (compexcepttypes): Delete unused arg STRICT.
16721 (comptypes): Fix calls.
16722 * decl.c (duplicate_decls): Likewise.
16723 * cp-tree.h (compexcepttypes): Delete extra arg.
16724
16725 * decl2.c (check_classfn): Delete unused second arg CNAME.
16726 * decl.c (start_decl, grokfndecl): Fix calls.
16727 * init.c (do_friend): Likewise.
16728 * cp-tree.h (check_classfn): Update prototype.
16729
16730 * cp-tree.h (signature_error, import_export_vtable,
16731 append_signature_fields, id_in_current_class, mark_used,
16732 copy_assignment_arg_p): Add decls.
16733 * decl2.c (mark_used): Delete decl.
16734
16735 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
16736
16737 * class.c (get_vtable_entry): Disable unused function.
16738 (doing_hard_virtuals): Delete unused static global var.
16739 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
16740 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
16741 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
16742 (modify_one_vtable): Delete unused var OLD_RTTI.
16743 (finish_struct_anon): Delete unused vars OFFSET and X.
16744 (finish_struct_bits): Delete unused var METHOD_VEC.
16745 (get_basefndecls): Delete unused var PURPOSE. Delete unused
16746 for-scope local variable METHODS.
16747
16748 * call.c (user_harshness): Delete unused/unneeded arg PARM.
16749 (ideal_candidate): Delete unused args BASETYPE and PARMS.
16750 (build_method_call): Delete unused args passed into ideal_candidate.
16751 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
16752 * cp-tree.h (synthesize_method): Add decl.
16753
16754 * decl.c (note_level_for_for): Give void return type.
16755 (pushdecl_nonclass_level): Likewise.
16756 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
16757 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
16758 (suspend_binding_level): Delete unused var LEVEL.
16759 (duplicate_decls): Delete unused var CTYPE.
16760 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
16761 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
16762 PTR_ENDLINK.
16763 (grokdeclarator): Delete unused var C.
16764 (grokdeclarator): Delete unused var SIZE_VARIES.
16765 (grokparms): Delete unused var SAW_VOID.
16766 (start_function): Delete unused var OLDDECL.
16767 (cplus_expand_expr_stmt): Delete unused var
16768 REMOVE_IMPLICIT_IMMEDIATELY.
16769
16770 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
16771
16772 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
16773
16774 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
16775
16776 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
16777 (build_min_nt): Likewise.
16778 * pt.c (do_pushlevel): Emit line note.
16779 (do_poplevel): Return what we get from poplevel.
16780 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
16781 * parse.y: Use do_pushlevel and do_poplevel.
16782 * cp-tree.h: Declare do_poplevel.
16783
16784 * cp-tree.h: Declare at_eof.
16785 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
16786 * decl2.c (import_export_decl): Renamed from import_export_inline.
16787 (finish_file): Call it to do interface handling for statics.
16788 * pt.c (tsubst_copy): Call mark_used on variables and functions
16789 used here.
16790
16791 * decl2.c (finish_file): Don't emit statics we can't generate.
16792 * pt.c (instantiate_decl): Don't set interface on instantiations
16793 we can't generate.
16794
16795 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
16796 * tree.c (print_lang_statistics): Print max template depth.
16797 * pt.c (push_tinst_level): Dump entire instantiation context.
16798 (instantiate_class_template): Use it and pop_tinst_level.
16799 (instantiate_decl): Likewise.
16800
16801 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
16802 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
16803
16804 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
16805
16806 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
16807 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
16808 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
16809 the new template implementation.
16810
16811 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16812
16813 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
16814
16815 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
16816
16817 * decl.c (cp_finish_decl): Delay emitting the debug information for
16818 a typedef that has been installed as the canonical typedef, if the
16819 type has not yet been defined.
16820
16821 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
16822
16823 * decl2.c (grokfield): Still call pop_nested_class for access decls.
16824
16825 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16826
16827 * decl.c (lookup_label): Call label_rtx.
16828
16829 * decl.c (make_binding_level): New function.
16830 (pushlevel, pushlevel_class): Call it instead of explicit
16831 duplicate calls to xmalloc.
16832
16833 * decl.c (init_decl_processing): Delete useless build_pointer_type
16834 call.
16835
16836 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
16837 (sizet_ftype_string): Delete variable.
16838 (init_decl_processing): Add built-in functions fabsf, fabsl,
16839 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
16840 variable strlen_ftype, used for strlen.
16841
16842 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
16843
16844 * decl.c (push_to_top_level): Start from current_binding_level
16845 again for now; the stl hacks depend on g++ being broken in this
16846 way, and it'll be fixed in the template rewrite.
16847
16848 * tree.def: Add USING_DECL.
16849 * decl2.c (do_class_using_decl): Implement.
16850 (grokfield): Pass access decls off to do_class_using_decl instead of
16851 grokdeclarator.
16852 * error.c (dump_decl): Handle USING_DECLs.
16853 * decl.c (grokdeclarator): Remove code for handling access decls.
16854 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
16855 as access decls for now.
16856 (finish_struct): Don't check USING_DECLs for other uses of the name.
16857
16858 * search.c (get_matching_virtual): Use cp_error_at.
16859
16860 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16861
16862 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
16863 match c-typeck.c.
16864 (self_promoting_args_p): Move the check that TYPE is non-nil
16865 before trying to look at its main variant.
16866 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
16867
16868 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
16869 Delete macros.
16870 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
16871 (do_friend): Delete call to xref_friend.
16872 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
16873
16874 * typeck.c (convert_sequence): #if 0 unused function.
16875
16876 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
16877 be in decl_in_memory_p.
16878 (decl_in_memory_p): Delete decl.
16879 * expr.c (decl_in_memory_p): Delete fn.
16880 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
16881
16882 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
16883
16884 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
16885
16886 * class.c (finish_struct_1): Check for a pure-specifier on a
16887 non-virtual function here.
16888
16889 * decl2.c (grok_function_init): Don't check whether the function
16890 is virtual here.
16891 (grokfield): Don't call check_for_override here.
16892
16893 * decl.c (push_to_top_level): Start from inner_binding_level,
16894 check class_shadowed in class levels.
16895
16896 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
16897
16898 * decl.c (resume_level): Ignore things that don't have names, instead
16899 of core dumping.
16900
16901 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16902
16903 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
16904
16905 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
16906
16907 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
16908 synthesized dtor.
16909
16910 * parse.y (complete_type_name): Bind global_scope earlier.
16911 (complex_type_name): Likewise.
16912 (qualified_type_name): Remove.
16913
16914 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
16915
16916 * decl.c (grokfndecl): Move code that looks for virtuals in base
16917 classes...
16918 * class.c (check_for_override): ... to a new function.
16919 (finish_struct_1): Call it.
16920
16921 * cp-tree.h: Declare warn_sign_compare.
16922
16923 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
16924 rather than extra_warnings to decide whether to warn about
16925 comparison of signed and unsigned.
16926
16927 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
16928 implies -Wsign-compare. -Wall doesn't imply -W.
16929
16930 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
16931
16932 * typeck.c (build_component_ref): Fix to handle anon unions in base
16933 classes as well.
16934
16935 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16936
16937 * class.c (resolves_to_fixed_type_p): Delete code dealing with
16938 a WITH_CLEANUP_EXPR, since we don't generate them any more.
16939 * cvt.c (build_up_reference): Likewise.
16940 * decl.c (grok_reference_init): Likewise.
16941 (cp_finish_decl): Likewise.
16942 * error.c (dump_expr): Likewise.
16943 * tree.c (real_lvalue_p): Likewise.
16944 (lvalue_p): Likewise.
16945 (build_cplus_new): Likewise.
16946 (unsave_expr_now): Likewise.
16947 * typeck.c (unary_complex_lvalue, build_modify_expr,
16948 c_expand_return): Likewise.
16949
16950 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16951
16952 Make the C++ front-end pay attention to attributes for structures.
16953 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
16954 finish_struct_1.
16955 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
16956 Take out old round_up_size use and setting the DECL_ALIGN possibly
16957 using it. Take out setting of TYPE_ALIGN to round_up_size, which
16958 can override what the attribute set.
16959 * cp-tree.h (finish_struct): Update prototype.
16960 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
16961 attributes to finish_struct.
16962 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
16963 value down into finish_struct.
16964 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
16965
16966 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
16967
16968 * decl.c (poplevel): Re-word dead for local handling.
16969 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
16970 (cp_finish_decl): If is_for_scope, check for duplicates so
16971 we can disable is_for_scope. Otherwise, preserve_temp_slots.
16972
16973 * lex.c (do_identifier): Use global binding in preference of
16974 dead for local variable.
16975
16976 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
16977
16978 * init.c (initializing_context): Handle anon union changes, the
16979 context where fields of anon unions can be initialized now has to be
16980 found by walking up the TYPE_CONTEXT chain.
16981
16982 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
16983
16984 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
16985 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
16986 (obscure_complex_init): If bss is supported, always set
16987 DECL_INITIAL to error_mark_node.
16988
16989 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16990
16991 * init.c (is_friend): Make sure there's a context before we see if
16992 it's an aggr type.
16993
16994 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
16995
16996 * init.c (is_friend): Classes are not friendly with nested classes.
16997
16998 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
16999
17000 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
17001 and record its result.
17002
17003 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
17004
17005 * class.c (finish_struct_anon): Switch around code to not move anon
17006 union elements around, nor mess up their contexts, nor offsets,
17007 instead we now build up the right number of COMPONENT_REFs for all
17008 the anon unions that may be present at build_component_ref time.
17009 * typeck.c (lookup_anon_field): New routine to handle field lookup
17010 on fields without names. We find them, based upon their unique type
17011 instead.
17012 * typeck.c (build_component_ref): Allow FIELD_DECL components.
17013 Handle finding components in anonymous unions, and ensure that a
17014 COMPONENT_REF is built for each level as necessary.
17015
17016 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
17017
17018 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
17019 code that ensures that copy ctors are used if appropriate.
17020
17021 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17022
17023 * init.c (build_vec_delete): Only give an error if base isn't an
17024 error_mark_node.
17025
17026 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
17027
17028 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
17029 (yylex): If we see `new', keep slurping.
17030
17031 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
17032
17033 * class.c (finish_struct_1): Move code for handling anon unions...
17034 (finish_struct_anon): to here. Fixup so that we do the offset
17035 calculations right, and so that the fields are physically moved to
17036 the containers's chain.
17037
17038 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17039
17040 * decl.c (grokdeclarator): Avoid trying to get an operand off an
17041 identifier node.
17042
17043 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
17044
17045 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
17046 POINTER_SIZE to agree with expr.c.
17047
17048 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
17049
17050 * search.c (lookup_field): Don't report ambiguities if protect is 0,
17051 instead return NULL_TREE.
17052
17053 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
17054
17055 * class.c (finish_struct_1): Call warn_hidden if we want warnings
17056 about overloaded virtual functions.
17057 (warn_hidden): New routine to warn of virtual functions that are
17058 hidden by other virtual functions, that are not overridden.
17059 (get_basefndecls): New routine, used by warn_hidden.
17060 (mark_overriders): New routine, used by warn_hidden.
17061 * search.c (get_matching_virtual): Remove old warning that just
17062 isn't very useful.
17063
17064 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17065
17066 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
17067
17068 * typeck.c (null_ptr_cst_p): Delete unused fn.
17069 (build_function_call_maybe): Delete unused fn.
17070
17071 * expr.c (extract_init): #if 0 the code after unconditional return 0
17072 for now.
17073
17074 Delete old cadillac code.
17075 * edsel.c: Remove file.
17076 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
17077 * Makefile.in (CXX_OBJS): Delete edsel.o.
17078 (edsel.o): Delete rule.
17079 * cp-tree.h (flag_cadillac): Delete var decl.
17080 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
17081 * decl2.c (flag_cadillac): Delete var definition.
17082 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
17083 (grokfield): Delete code depending on flag_cadillac.
17084 (finish_anon_union): Likewise.
17085 * class.c (finish_struct_1): Likewise.
17086 (pushclass): Likewise.
17087 (popclass): Likewise.
17088 (push_lang_context): Likewise.
17089 (pop_lang_context): Likewise.
17090 * decl.c (init_decl_processing): Likewise.
17091 (start_decl): Likewise.
17092 (cp_finish_decl): Likewise.
17093 (xref_tag): Likewise.
17094 (finish_enum): Likewise.
17095 (start_function): Likewise.
17096 (finish_function): Likewise.
17097 (finish_stmt): Likewise.
17098 * lex.c (lang_init): Likewise.
17099 (check_newline): Likewise.
17100
17101 * lex.c (do_pending_inlines): Delete synthesized method kludge.
17102
17103 Delete defunct, ancient garbage collection implementation.
17104 * rtti.c: New file with the RTTI stuff from gc.c.
17105 * gc.c: Removed file (moved the remaining stuff into rtti.c).
17106 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
17107 (rtti.o): New rule, replacing gc.o.
17108 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
17109 * cp-tree.h: Delete gc-related fn decls.
17110 (DECL_GC_OFFSET): Delete macro.
17111 (flag_gc): Delete extern decl.
17112 * decl.c (current_function_obstack_index): Delete var decl.
17113 (current_function_obstack_usage): Delete var decl.
17114 (start_function): Delete clearing of current_function_obstack_index
17115 and current_function_obstack_usage.
17116 (init_decl_processing): Delete code relying on -fgc.
17117 Delete call to init_gc_processing.
17118 (cp_finish_decl): Delete calls to build_static_gc_entry and
17119 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
17120 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
17121 and to expand_expr of a __gc_main call.
17122 (maybe_gc_cleanup): Delete var decl.
17123 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
17124 * decl2.c (flag_gc): Delete var decl.
17125 (lang_f_options): Delete offering of -fgc.
17126 (lang_decode_option): Delete -fgc and -fno-gc handling.
17127 (get_temp_regvar): Delete gc code.
17128 * init.c (build_new): Delete gc code.
17129 * lex.c (init_lex): Delete checking of flag_gc.
17130
17131 * typeck.c (convert_arguments): Delete gc code.
17132 (build_component_addr): Delete -fgc warning.
17133 (build_modify_expr): Delete gc code.
17134
17135 * decl2.c (build_push_scope): Delete fn.
17136 * cp-tree.h (build_push_scope): Delete decl.
17137
17138 * search.c (clear_search_slots): Delete fn.
17139 * cp-tree.h (clear_search_slots): Delete decl.
17140
17141 * search.c (tree_needs_constructor_p): Delete fn.
17142 * cp-tree.h (tree_needs_constructor_p): Delete decl.
17143
17144 * tree.c (id_cmp): Delete fn.
17145
17146 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
17147 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
17148
17149 * tree.c (decl_value_member): Delete fn.
17150 * cp-tree.h (decl_value_member): Delete decl.
17151
17152 * tree.c (list_hash_lookup_or_cons): Delete fn.
17153 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
17154
17155 * method.c (cplus_exception_name): Delete fn.
17156 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
17157
17158 * spew.c (shift_tokens): Delete fn.
17159
17160 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17161
17162 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
17163 to cp_finish_decl.
17164 * parse.y: Likewise.
17165
17166 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17167
17168 * tree.c (build_cplus_staticfn_type): Delete function definition;
17169 never used.
17170 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
17171
17172 * tree.c (virtual_member): Delete function definition; never used.
17173 * cp-tree.h (virtual_member): Delete decl.
17174
17175 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
17176
17177 * typeck.c (build_component_ref): Handle getting vbase pointers
17178 out of complex multiple inheritance better.
17179
17180 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
17181
17182 * typeck.c (build_object_ref): Make sure we use the real type, not
17183 any reference type.
17184
17185 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
17186
17187 * tree.c (build_exception_variant): Don't create new types if we
17188 don't have to, also build new types on the right obstack.
17189
17190 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17191
17192 * decl.c (store_bindings): Split out from push_to_top_level.
17193 (push_to_top_level): Call it for b->type_shadowed on class binding
17194 levels.
17195
17196 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
17197
17198 * search.c (expand_upcast_fixups): Fix so that offsets stored in
17199 vbase_offsets are always right. Fixes a problem where virtual base
17200 upcasting and downcasting could be wrong during conversions on this
17201 during virtual function dispatch at ctor/dtor time when dynamic
17202 vtable fixups for deltas are needed. This only sounds easier than
17203 it is. :-)
17204 (fixup_virtual_upcast_offsets): Change to reflect new calling
17205 convention for expand_upcast_fixups.
17206
17207 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17208
17209 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
17210 check that it's usable as the bitfield width.
17211
17212 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17213
17214 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
17215 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
17216 only ever used for functions in it.
17217
17218 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
17219
17220 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
17221 (nested_type): Likewise.
17222 (nested_name_specifier): Use lastiddecl.
17223
17224 * decl.c (grokdeclarator): Adjust accordingly.
17225 * init.c (expand_member_init): Likewise.
17226 * parse.y (base_class): Likewise.
17227 * typeck2.c (build_functional_cast): Likewise.
17228
17229 * typeck2.c (build_functional_cast): Fill in name after we've
17230 checked for non-aggr type.
17231
17232 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
17233
17234 * decl2.c (warn_pointer_arith): Default to on.
17235
17236 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
17237
17238 * lex.c (is_rid): New function.
17239 * decl.c (grokdeclarator): Diagnose reserved words used as
17240 declarator-ids.
17241
17242 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
17243
17244 * tree.c (get_decl_list): Don't lose cv-quals.
17245
17246 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
17247 typespecs used as declarator-ids.
17248
17249 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
17250
17251 * decl.c (poplevel): When poping a level, don't give a warning for
17252 any subblocks that already exist.
17253
17254 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17255
17256 * typeck.c (build_object_ref): Finish what I started.
17257
17258 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
17259
17260 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
17261
17262 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
17263 scope.
17264
17265 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
17266
17267 * decl.c (xref_tag): Handle passing a type in directly.
17268
17269 * parse.y (qualified_type_name): Pull out the type.
17270 (nested_type): Likewise.
17271 Take types directly instead of as identifiers.
17272 * call.c (build_scoped_method_call): Take types directly instead of
17273 as identifiers.
17274 * decl.c (xref_basetypes): Likewise.
17275 * init.c (expand_member_init): Likewise.
17276 (build_member_call): Likewise.
17277 (build_offset_ref): Likewise.
17278 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
17279 * method.c (do_build_assign_ref): Likewise.
17280 * decl.c (grokdeclarator): Handle a type appearing as the
17281 declarator-id for constructors.
17282 * method.c (do_build_copy_constructor): current_base_init_list now
17283 uses the types directly, not their names.
17284 * init.c (sort_base_init): Likewise.
17285 (expand_member_init): Likewise.
17286 * init.c (is_aggr_type): New function, like is_aggr_typedef.
17287
17288 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
17289
17290 * tree.c (layout_basetypes): Call build_lang_field_decl instead
17291 of build_lang_decl if first arg is a FIELD_DECL.
17292
17293 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17294
17295 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
17296 non-empty.
17297 * except.c (expand_start_catch_block): Set TREE_USED to avoid
17298 warnings about the catch handler.
17299
17300 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
17301
17302 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
17303 expand_target_expr.
17304
17305 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17306
17307 Fix access control to use trees rather than integers.
17308 * class.c (access_{default, public, protected, private,
17309 default_virtual, public_virtual, private_virtual}_node): Add
17310 definitions.
17311 (init_class_processing): Do creation of those nodes.
17312 * cp-tree.h (access_type): Delete enum decl.
17313 (access_{default, public, protected, private, default_virtual,
17314 public_virtual, private_virtual}_node): Add decls.
17315 (compute_access): Change return type.
17316 * search.c (compute_access): Have tree return type, instead of enum.
17317 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
17318 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
17319 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
17320 * parse.y (VISSPEC): Make ttype rather than itype.
17321 (base_class_access_list): Likewise.
17322 * *.[cy]: Change all refs of `access_public' to `access_public_node',
17323 etc.
17324 * call.c (build_method_call): Make ACCESS be a tree.
17325 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
17326 * cvt.c (convert_to_aggr): Likewise.
17327 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
17328 Likewise.
17329 * method.c (hack_identifier): Likewise.
17330 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
17331
17332 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
17333
17334 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
17335 frontend, and make it more consistent with respect to
17336 warn_pointer_arith.
17337
17338 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17339
17340 * decl.c (pushdecl): Check for duplicate parameter names.
17341
17342 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
17343
17344 * decl.c (expand_static_init): Call assemble_external for atexit.
17345
17346 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
17347
17348 * except.c (do_unwind): Remove some generated dead code.
17349 (eh_outer_context): New routine, factor out some common code from
17350 expand_builtin_throw and end_eh_unwinder. Add code to do return
17351 address masking for the PA.
17352 (expand_builtin_throw): Use eh_outer_context instead of open coding
17353 it here.
17354 (end_eh_unwinder): Likewise.
17355
17356 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
17357
17358 * except.c (expand_throw): Call assemble_external for __empty, if we
17359 use it.
17360
17361 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
17362
17363 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
17364 NORMAL_RETURN_ADDR_OFFSET.
17365 (end_eh_unwinder): Likewise.
17366
17367 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
17368
17369 * gc.c (build_dynamic_cast): Make sure we don't cast away const
17370 when dealing with references, and make sure we handle dynamic
17371 casting to a cv qualified reference.
17372
17373 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
17374
17375 * except.c (struct eh_context): New structure top hold eh context
17376 information.
17377 (push_eh_context): New routine.
17378 (pop_eh_context): Likewise.
17379 * decl.c (push_cp_function_context): Use them.
17380 (pop_cp_function_context): Likewise.
17381
17382 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
17383
17384 * decl2.c (finish_file): Also prune uninteresting functions in the
17385 inline emission loop.
17386
17387 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
17388
17389 * sig.c (build_signature_table_constructor): Mark functions
17390 in the signature as referenced.
17391
17392 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
17393
17394 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
17395 the inline emission stuff.
17396
17397 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
17398
17399 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
17400 weak symbols.
17401 * lang-options.h: Add -f{no-,}weak.
17402 * decl.c (init_decl_processing): If the target does not support weak
17403 symbols, don't use them.
17404 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
17405
17406 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
17407
17408 * init.c (expand_member_init): warning for base init after members.
17409
17410 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
17411
17412 * cvt.c (build_expr_type_conversion): Don't convert to a reference
17413 type.
17414
17415 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
17416
17417 * method.c (report_type_mismatch): Improve wording for volatile
17418 mismatches.
17419
17420 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
17421
17422 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
17423 expand_assignment, as the later doesn't handle things that have
17424 copy constructors well. The compiler would do bitwise copying,
17425 instead of ctor calling in some cases.
17426
17427 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
17428
17429 * g++.c (my_strerror): Return "cannot access" if errno is 0.
17430 (pfatal_with_name, perror_exec): Don't assume that
17431 the returned value from my_strerror contains no '%'s.
17432 (concat): Remove.
17433 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
17434
17435 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
17436
17437 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
17438 TYPE_METHODS/TREE_CHAIN mean what they used to.
17439 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
17440 instead of TYPE_METHODS.
17441 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
17442 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
17443 * cp-tree.h (CLASSTYPE_METHODS): Lose.
17444 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
17445 TYPE_METHODS.
17446 (struct lang_decl): Lose next_method field.
17447 (DECL_NEXT_METHOD): Lose.
17448 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
17449 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
17450 anymore.
17451 (finish_struct_methods): Don't mess with the TREE_CHAINs in
17452 fn_fields.
17453
17454 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
17455 vector.
17456
17457 * call.c (build_method_call): Synthesize here even when not inlining.
17458 * typeck.c (build_function_call_real): Likewise.
17459
17460 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
17461
17462 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
17463 == DBX_DEBUG, call dbxout_start_new_source_file and
17464 dbxout_resume_previous_source_file when appropriate.
17465
17466 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
17467
17468 * except.c (start_anon_func): Push to the top level.
17469 (end_anon_func): Pop from the top level.
17470
17471 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
17472
17473 * cp-tree.h (build_cleanup): New routine to build cleanups.
17474 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
17475 call at ctor time and use atexit to run it later.
17476 * decl2.c (build_cleanup): New routine, taken from finish_file.
17477 (finish_file): Use build_cleanup instead, and don't put function
17478 local statics in global dtor list.
17479
17480 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
17481
17482 * except.c (expand_throw): Ensure that we have cleanups, if we try
17483 and expand cleanups.
17484
17485 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
17486
17487 * except.c (expand_throw): Add logic to manage dynamic cleanups for
17488 the EH object.
17489 (expand_end_catch_block): Use the magic of expand_goto, instead of
17490 emit_jump so that we get the cleanup for any catch clause parameter
17491 and the cleanup for the exception object. Update to reflect label
17492 changes.
17493 (push_eh_cleanup): New routine to register a cleanup for an
17494 exception object.
17495 (empty_fndecl): Used to default cleanup actions to
17496 nothing.
17497 (init_exception_processing): Setup empty_fndecl. Setup
17498 saved_cleanup.
17499 (expand_start_catch_block): Update to reflect label changes. Call
17500 push_eh_object to register the cleanup for the EH object.
17501 (start_anon_func): New routine to start building lambda expressions
17502 from trees.
17503 (end_anon_func): New routine to end them.
17504 (struct labelNode): Change so that we can use tree labels, or rtx
17505 labels.
17506 (saved_cleanup): Object to check for dynamic cleanups for the
17507 exception handling object.
17508 (push_label_entry): Change so that we can use tree labels, or rtx
17509 labels.
17510 (pop_label_entry): Likewise.
17511 (top_label_entry): Likewise.
17512 (expand_start_all_catch): Use tree label instead of rtx label, so
17513 that we can get the magic of expand_goto.
17514 (expand_end_all_catch): Update to reflect label changes.
17515
17516 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
17517 use UNSAVE_EXPRs.
17518 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
17519 building_cleanup logic, as we now use UNSAVE_EXPRs.
17520 * cp-tree.h (unsave_expr): Declare it.
17521 * decl.c (building_cleanup): Remove.
17522 (maybe_build_cleanup): Remove building_cleanup logic, and use
17523 UNSAVE_EXPR instead.
17524
17525 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
17526
17527 * gc.c (build_t_desc): Update error message to say <typeinfo>.
17528
17529 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17530
17531 * decl.c (pushdecl): Only warn about shadowing a local variable if
17532 warn_shadow is true.
17533
17534 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
17535
17536 * typeck.c (build_binary_op_nodefault): Added warning about
17537 comparisons between different enum types with -Wall, unless
17538 -fenum-int-equiv set.
17539
17540 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
17541
17542 * class.c (finish_struct_1): Skip down to the inner type in
17543 multidimensional arrays. Ensures ctors will be made for types that
17544 need constructing.
17545
17546 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
17547
17548 * decl.c (last_dtor_insn): New to track the last compiler generated
17549 insn in a dtor.
17550 (store_parm_decls): Set it.
17551 (finish_function): Use it to see if the dtor is empty. Avoid doing
17552 vtable setup all the time, if we can.
17553 (struct cp_function): Add last_dtor_insn.
17554 (push_cp_function_context): Save it.
17555 (pop_cp_function_context): Restore it.
17556
17557 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
17558
17559 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
17560 warnings.
17561
17562 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
17563
17564 * typeck.c (expand_target_expr): Make sure targets get put into the
17565 current temp_slot_level, so that the free_temp_slots call will reuse
17566 them.
17567
17568 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
17569
17570 * class.c (finish_struct_1): Delay delta fixups for virtual bases
17571 until after we have done the hard virtuals, to avoid a bogus `every
17572 virtual function must have a unique final overrider' for virtual
17573 functions that are only overridden by hard virtuals.
17574
17575 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
17576
17577 * pt.c (do_function_instantiation): Don't try to find a file-scope
17578 template for a member function.
17579
17580 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
17581
17582 * g++.c (main): Add handling of -nodefaultlibs.
17583
17584 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
17585
17586 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
17587 distinguish between direct bindings of reference variables, and
17588 indirect bindings of reference variables.
17589 * cvt.c (build_up_reference): Use it.
17590 * typeck.c (convert_arguments): Use it to indicate this is an
17591 indirect binding.
17592 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
17593 as they are unused.
17594 (expand_static_init): Likewise.
17595 (cplus_expand_expr_stmt): Likewise.
17596 * decl2.c (finish_file): Likewise.
17597 * init.c (perform_member_init): Likewise.
17598 (emit_base_init): Likewise.
17599 (expand_aggr_vbase_init_1): Likewise.
17600
17601 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17602
17603 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
17604 get a DECL_LANG_SPECIFIC node.
17605 * cp-tree.h (lang_decl_flags): Add new member `level'.
17606 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
17607 decl_flags level member.
17608
17609 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17610
17611 * call.c (build_method_call): Make sure instance has a
17612 TYPE_LANG_SPECIFIC node before we dive into it.
17613
17614 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
17615
17616 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
17617
17618 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
17619
17620 * decl.c (duplicate_decls): When smashing decls, smash staticness in
17621 the usual way.
17622
17623 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
17624
17625 * decl.c (poplevel): Handle the merging of subblocks of cleanups
17626 when finishing blocks that have already been created (usually due to
17627 the fixup goto code). Fixes bad debugging information.
17628
17629 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
17630
17631 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
17632 that's not a list of overloaded functions.
17633
17634 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17635
17636 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
17637 before trying to use DECL_ABSTRACT_VIRTUAL_P.
17638
17639 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
17640
17641 * decl2.c (mark_used): New function for hooking into setting of
17642 TREE_USED on decls.
17643 * call.c (build_method_call): Use it.
17644 * class.c (instantiate_type): Likewise.
17645 * init.c (build_offset_ref): Likewise. Don't call assemble_external
17646 for all like-named functions.
17647 * method.c (hack_identifier): Likewise.
17648 (emit_thunk): Don't call assemble_external.
17649 (make_thunk): Create thunk as a FUNCTION_DECL so that it
17650 gets the right mode and ENCODE_SECTION_INFO works.
17651
17652 * parse.y: Use mark_used. Pass operator names to do_identifier.
17653 * lex.c (do_identifier): Handle operator names.
17654
17655 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
17656
17657 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17658
17659 * errfn.c: Include stdio.h.
17660 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
17661
17662 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
17663
17664 * typeck2.c (digest_init): Always convert initializers to the
17665 right type.
17666
17667 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
17668
17669 * init.c (member_init_ok_or_else): Don't allow member initializers
17670 for indirect members, as it is invalid.
17671
17672 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17673
17674 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
17675
17676 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
17677
17678 * parse.y (for.init.statement): Catch compound statements inside for
17679 initializations, if we're being pedantic.
17680
17681 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
17682
17683 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
17684 looking for.
17685
17686 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
17687
17688 * error.c (dump_expr): Don't core dump when a boolean expression is
17689 used as a default argument.
17690
17691 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
17692
17693 * class.c (finish_struct_bits): Check aggregate_value_p instead of
17694 RETURN_IN_MEMORY.
17695
17696 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
17697
17698 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
17699 BLKmode type that would otherwise be returned in registers.
17700
17701 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17702
17703 * g++.c (WITHLIBC): New macro.
17704 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
17705 saw_libc and pass it at the end if it was set.
17706
17707 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17708
17709 * parse.y (fn.def1): Call split_specs_attrs in
17710 declmods notype_declarator case.