tree.c (cp_tree_equal): Adjust final switch formatting.
[gcc.git] / gcc / cp / ChangeLog
1 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
2
3 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
4 't' case.
5
6 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
7
8 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9 (layout_empty_base): Return at end flag.
10 (build_base_field): Likewise.
11 (build_base_fields): Likewise.
12 (layout_virtual_bases): Don't add 1 to eoc value.
13 (end_of_class): Use full size for empty bases.
14 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
15 empty bases. Don't add 1 to eoc value. Only add trailing padding
16 if we're an empty class with no empty bases.
17 (dump_class_hierarchy): Dump size and alignment.
18
19 2001-04-20 Jakub Jelinek <jakub@redhat.com>
20
21 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
22 ICS_BAD_FLAG.
23
24 2001-04-20 Jakub Jelinek <jakub@redhat.com>
25
26 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
27 is found, look first if name does not match the structure name.
28
29 2001-04-19 Mark Mitchell <mark@codesourcery.com>
30
31 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
32 set.
33 (SET_DECL_LANGUAGE): New macro.
34 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
35 (pushdecl): Likewise.
36 (build_library_fn_1): Likewise.
37 (build_cp_library_fn): Likewise.
38 (grokfndecl): Likewise.
39 (grokvardecl): Mark `extern "C"' variables as having C linkage.
40 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
41 * lex.c (retrofit_lang_decl): Likewise.
42 * mangle.c (mangle_decl_string): Don't mangle the names of
43 variables declared with C language linkage.
44 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
45
46 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
47
48 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
49 flag_access_control from uninitialized storage.
50
51 2001-04-15 Mark Mitchell <mark@codesourcery.com>
52
53 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
54 * mangle.c (write_pointer_to_member_type): Fix mangling of
55 pointers to cv-qualified member function types.
56
57 * init.c (build_delete): Create a SAVE_EXPR for the address if
58 we're going to use it more than once.
59
60 2001-04-13 Mark Mitchell <mark@codesourcery.com>
61
62 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
63 (expand_ptremfunc_cst): Change prototype.
64 (delta2_from_ptrmemfunc): Remove.
65 * expr.c (cplus_expand_constant): Adjust call to
66 expand_ptrmemfunc_cst.
67 * typeck.c (build_ptrmemfunc1): Simplify.
68 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
69 results in a constant.
70 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
71 (delta2_from_ptrmemfunc): Remove.
72 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
73
74 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
75
76 * cp-tree.h (decl_namespace_list): New macro.
77 (struct saved_scope): Add decl_ns_list.
78 * decl.c (mark_saved_scope): Mark it.
79 * decl2.c: Lose static decl_namespace_list.
80 (init_decl2): Don't save it.
81
82 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
83
84 * cp-tree.h (warn_return_type, yylex): Delete redundant
85 declarations.
86
87 * decl.c (current_class_depth, global_namespace): Likewise.
88
89 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
90
91 * repo.c (flag_use_repository): Likewise.
92
93 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
94
95 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
96 set_block, pushdecl, getdecls, gettags, init_decl_processing,
97 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
98 lvalue_or_else, print_lang_statistics, comp_target_types,
99 unsigned_type, signed_type, signed_or_unsigned_type,
100 build_function_call, mark_addressable, incomplete_type_error):
101 Delete redundant declarations.
102
103 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
104
105 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
106 (TYPE_ANONYMOUS_P): New macro.
107 (TAGGED_TYPE_P): New macro.
108 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
109 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
110 * tree.c (no_linkage_helper): Likewise.
111 * semantics.c (begin_class_definition): Likewise.
112 * pt.c (convert_template_argument): Likewise.
113 * lex.c (check_for_missing_semicolon): Likewise.
114
115 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
116
117 * class.c (dfs_unshared_virtual_bases): New function.
118 (mark_primary_bases): Call it.
119 (check_bases): Ignore virtual bases when determining
120 nearly-emptiness.
121
122 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
123
124 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
125
126 2001-04-11 Mark Mitchell <mark@codesourcery.com>
127
128 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
129 cloned function to the clone.
130
131 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
132
133 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
134
135 * semantics.c: Include expr.h.
136
137 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
138
139 * method.c (implicitly_declare_fn): Commonize code for copy ctor
140 and assignment op. Set TREE_USED for parameter.
141
142 2001-04-10 Mark Mitchell <mark@codesourcery.com>
143
144 * class.c (find_final_overrider_data): Add `candidates'.
145 (dfs_find_final_overrider): Don't issue error messages
146 prematurely.
147 (find_final_overrider): Issue error messages here.
148 (build_base_field): Don't warn about amgibuous direct bases here.
149 (warn_about_ambiguous_direct_bases): New function.
150 (layout_class_type): Use it.
151
152 2001-04-10 Richard Henderson <rth@redhat.com>
153
154 * typeck.c (build_array_ref): Push the array reference inside
155 COMPOUND_EXPR and COND_EXPR.
156
157 2001-04-05 Mark Mitchell <mark@codesourcery.com>
158
159 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
160 * decl.c (duplicate_decls): Adjust accordingly.
161 (maybe_commonize_var): Likewise.
162 (grokfndecl): Likewise.
163 (start_function): Likewise.
164 (start_method): Likewise.
165 * decl2.c (key_method): Likewise.
166 (import_export_decl): Likewise.
167 * method.c (implicitly_declare_fn): Likewise.
168 * optimize.c (maybe_clone_body): Likewise.
169
170 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
171
172 * lang-specs.h: Add __DEPRECATED.
173
174 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
175
176 * search.c (get_dynamic_cast_base_type): When building a new
177 constant, set its type to ssizetype.
178
179 2001-04-04 Jakub Jelinek <jakub@redhat.com>
180
181 * optimize.c (expand_call_inline): Only add newly inlined statements
182 into inlined_stmts.
183
184 2001-04-03 Mark Mitchell <mark@codesourcery.com>
185
186 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
187 (OPERATOR_FORMAT): Likewise.
188 (OPERATOR_TYPENAME_FORMAT): Likewise.
189 * operators.def: Remove old name-mangling information.
190 * decl.c (grok_op_properties): Adjust accordingly.
191 * lex.c (init_operators): Likewise.
192 * rtti.c (get_tinfo_decl): Issue error messages about types that
193 have variable size.
194
195 2001-04-03 Mark Mitchell <mark@codesourcery.com>
196
197 * decl2.c (import_export_decl): Don't call import_export_class
198 when processing an inline member function.
199 * semantics.c (expand_body): Call import_export_decl before
200 emitting inline functions.
201
202 2001-03-28 Richard Henderson <rth@redhat.com>
203
204 IA-64 ABI Exception Handling:
205 * cp-tree.def (EH_SPEC_BLOCK): New.
206 (MUST_NOT_THROW_EXPR): New.
207 * cp-tree.h: Update changed function declarations.
208 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
209 (CPTI_CALL_UNEXPECTED): New.
210 (struct cp_language_function): Rename x_eh_spec_try_block
211 to x_eh_spec_block.
212 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
213 * decl.c (current_binding_level): If no current function
214 bindings, revert to scope_chain.
215 (initialize_predefined_identifiers): Remove __cp_push_exception.
216 (store_parm_decls): Use begin_eh_spec_block.
217 (finish_function): Use finish_eh_spec_block.
218 (mark_lang_function): Update for name changes.
219 * decl2.c (finish_file): No mark_all_runtime_matches.
220 * dump.c (cp_dump_tree): Handle new tree codes.
221 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
222 * except.c (catch_language_init, catch_language): Remove.
223 (init_exception_processing): Don't set language code.
224 Initialize call_unexpected_node, protect_cleanup_actions,
225 eh_personality_libfunc, lang_eh_runtime_type.
226 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
227 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
228 (prepare_eh_type): Split out type canonicalizations ...
229 (build_eh_type_type): ... from here.
230 (build_eh_type_type_ref): Remove.
231 (mark_all_runtime_matches): Remove.
232 (build_exc_ptr): New.
233 (do_begin_catch, do_end_catch): New.
234 (do_pop_exception): Remove.
235 (build_terminate_handler): Remove.
236 (choose_personality_routine): Split out language choice from ...
237 (initialize_handler_parm): ... here.
238 Use MUST_NOT_THROW_EXPR.
239 (expand_start_catch_block): Use do_begin_catch. Simplify Java
240 exception object handling.
241 (expand_start_eh_spec, expand_end_eh_spec): Remove.
242 (expand_exception_blocks, alloc_eh_object): Remove.
243 (begin_eh_spec_block, finish_eh_spec_block): New.
244 (do_allocate_exception, do_free_exception): New.
245 (expand_throw): Merge into ...
246 (build_throw): ... here. Update for abi.
247 * expr.c (cplus_expand_expr): No expand_internal_throw.
248 Handle MUST_NOT_THROW_EXPR.
249 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
250 * semantics.c (*) Update for except.h name changes.
251 (genrtl_try_block): No protect_with_terminate.
252 (genrtl_eh_spec_block): New.
253 (genrtl_handler): Don't emit the goto here.
254 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
255 (genrtl_finish_function): Don't expand_exception_blocks.
256 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
257
258 2001-03-28 Richard Henderson <rth@redhat.com>
259
260 * decl.c (struct named_label_list): Rename eh_region to
261 in_try_scope, add in_catch_scope.
262 (struct binding_level): Rename eh_region to is_try_scope,
263 add is_catch_scope.
264 (note_level_for_try): Rename from note_level_for_eh.
265 (note_level_for_catch): New.
266 (poplevel): Copy both is_try_scope and is_catch_scope to
267 the named_label_list struct.
268 (check_previous_goto_1): Don't check for catch block via
269 DECL_ARTIFICIAL; use in_try_scope instead.
270 (check_goto): Likewise.
271 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
272 * except.c (expand_start_catch_block): Call note_level_for_catch.
273 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
274
275 2001-03-27 Richard Henderson <rth@redhat.com>
276
277 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
278 exceptions_via_longjmp.
279
280 2001-03-27 Phil Edwards <pme@sources.redhat.com>
281
282 * pt.c (check_default_tmpl_args): Make error messages clearer.
283
284 2001-03-26 Phil Edwards <pme@sources.redhat.com>
285
286 * error.c: Also undefine 'A' macro used for cp_printers definition.
287
288 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
289
290 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
291
292 2001-03-26 Mike Yang <yang@research.att.com>
293 Mark Mitchell <mark@codesourcery.com>
294
295 * dump.c (dump_access): New function.
296 (cp_dump_tree): Use it. Dump basetype information for class
297 types.
298
299 2001-03-26 Mark Mitchell <mark@codesourcery.com>
300
301 * Makefile.in (optimize.o): Depend on params.h.
302 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
303 (init_decl_processing): Set flag_no_inline when doing
304 inlining-on-trees.
305 * optimize.c: Include params.h.
306 (struct inline_data): Improve documentation of FNS. Add
307 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
308 (INSNS_PER_STMT): New macro.
309 (remap_block): Use CLONING_P.
310 (inlinable_function_p): Don't inline big functions.
311 (expand_call_inline): Keep track of how much inlining we've done.
312 (optimize_function): Set FIRST_INLINED_FN.
313 (maybe_clone_body): Set CLONING_P.
314 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
315 tree nodes.
316 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
317 rest_of_compilation. Clear DECL_RTL for local variables
318 afterwards.
319 (clear_decl_rtl): New function.
320
321 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
322
323 Implement DR 209
324 * cp-tree.h (skip_type_access_control,
325 reset_type_access_control): Prototype.
326 * decl.c (grokdeclarator): Access of friends is not checked.
327 * parse.y (component_decl_list): Reset type access control.
328 * semantics.c (decl_type_access_control): Clear
329 current_type_lookups.
330 (save_type_access_control): Don't save if not deferring.
331 (skip_type_access_control, reset_type_access_control): New
332 functions.
333 (begin_class_definition): Do type access control for basetypes.
334 Start deferred access control.
335 (finish_class_definition): Resume immediate access control if
336 this is a local class.
337
338 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
339
340 * class.c (add_method): Use memcpy/memmove, not bcopy.
341
342 * decl.c (duplicate_decls): Likewise.
343
344 2001-03-23 Jakub Jelinek <jakub@redhat.com>
345
346 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
347 not `_'.
348
349 2001-03-23 Jakub Jelinek <jakub@redhat.com>
350
351 * decl.c (local_names): Define.
352 (push_local_name): New.
353 (grok_reference_init): Return init if initializing static reference
354 variable with non-constant instead of emitting it.
355 Move expand_static_init call to cp_finish_decl.
356 (layout_var_decl): Call push_local_name.
357 (maybe_commonize_var): Allow inlining functions even if they have
358 static local variables, use comdat_linkage for them if flag_weak.
359 (check_initializer): Call obscure_complex_init if
360 grok_reference_init returned non-zero.
361 (save_function_data): Clear x_local_names.
362 (pop_cp_function_context): Free x_local_names.
363 (mark_inlined_fns): Remove.
364 (mark_lang_function): Mark x_local_names.
365 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
366 Mark inlined_fns as tree, remove call to mark_inlined_fns.
367 * class.c (alter_access): Ensure DECL_ACCESS is never set if
368 DECL_DISCRIMINATOR_P.
369 * cp-tree.h (cp_language_function): Add x_local_names.
370 (lang_decl_flags): Add discriminator into u2.
371 (lang_decl_inlined_fns): Remove.
372 (lang_decl): inlined_fns is now a TREE_VEC.
373 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
374 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
375 TREE_VEC, not a custom structure.
376 (optimize_function): Likewise.
377 * mangle.c (discriminator_for_local_entity): Discriminate among
378 VAR_DECL local entities.
379 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
380 is not valid.
381
382 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
383
384 Add support for Java interface method calls.
385 * cp-tree.h (struct lang_type): Add java_interface flag.
386 (TYPE_JAVA_INTERFACE): New macro.
387 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
388 by setting TYPE_JAVA_INTERFACE.
389 * call.c (java_iface_lookup_fn): New static.
390 (build_over_call): If calling a method declared in a
391 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
392 expression which resolves the function address.
393 (build_java_interface_fn_ref): New function.
394
395 2001-03-22 Richard Henderson <rth@redhat.com>
396
397 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
398 * except.c: Don't include it.
399
400 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
401 based on an idea from Joe Buck <jbuck@synopsys.com>
402
403 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
404 New nonterminals.
405 (data_def, component_decl): Add reductions to bad_decl.
406
407 2001-03-22 Jakub Jelinek <jakub@redhat.com>
408
409 * method.c (do_build_assign_ref): Don't use build_modify_expr for
410 anonymous aggregates, since they don't have assignment operator
411 method.
412 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
413 assignment operators for anonymous structure fields.
414
415 2001-03-21 Jason Merrill <jason@redhat.com>
416
417 * pt.c (instantiate_decl): Abort if we see a member constant
418 instantiation that doesn't already have its initializer.
419 Downgrade explicit instantiation without definition to pedwarn.
420
421 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
422 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
423 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
424
425 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
426 (pending_vtables): Remove.
427 * decl2.c (pending_vtables): Remove.
428 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
429 CLASSTYPE_VTABLE_NEEDS_WRITING.
430 (import_export_class): Likewise.
431 (init_decl2): Don't mark pending_vtables.
432 * lex.c (handle_pragma_vtable): Just sorry.
433 * pt.c (instantiate_class_template): Don't mess with
434 CLASSTYPE_VTABLE_NEEDS_WRITING.
435 (mark_class_instantiated): Likewise.
436 * ptree.c (print_lang_type): Don't print it.
437 * semantics.c (begin_class_definition): Don't set it.
438
439 * pt.c (template_tail): Replace with last_pending_template.
440 (maybe_templates, maybe_template_tail): Remove.
441 (add_pending_template): Adjust.
442 (instantiate_pending_templates): Adjust.
443
444 * cp-tree.h (struct saved_scope): Remove lang_stack field.
445 (current_lang_stack): Remove.
446 * decl.c (maybe_push_to_top_level): Don't initialize it.
447 (duplicate_decls): Use current_lang_depth.
448 (xref_basetypes): Likewise.
449 * class.c (current_lang_depth): New fn.
450 (push_lang_context): Use more varray functionality.
451 (pop_lang_context): Likewise.
452
453 * error.c (GLOBAL_THING): Always use '__'.
454
455 2001-03-21 Mark Mitchell <mark@codesourcery.com>
456
457 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
458
459 * mangle.c (mangle_decl_string): Mangle the names of overloaded
460 operators, even when they have `extern "C"' linkage.
461
462 2001-03-19 Mark Mitchell <mark@codesourcery.com>
463
464 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
465 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
466 where it's not necessary.
467 (add_method): Remove optimization involving comparison of
468 DECL_ASSEMBLER_NAME.
469 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
470 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
471 where it's not necessary.
472 (check_methods): Likewise.
473 (build_clone): Likewise.
474 (built_vtt): Likewise.
475 * cp-tree.h (DECL_NEEDED_P): Likewise.
476 * decl.c (pushtag): Likewise.
477 (duplicate_decls): Likewise.
478 (pushdecl): Likewise.
479 (builtin_function): Likewise.
480 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
481 (build_cp_library_fn): Likewise.
482 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
483 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
484 where it's not necessary.
485 (make_rtl_for_nonlocal_decl): Likewise.
486 (cp_finish_decl): Likewise.
487 (grokfndecl): Likewise.
488 (grokvardecl): Likewise.
489 (grokdeclarator): Likewise.
490 (start_function): Likewise.
491 (cp_missing_return_ok_p): Likewise.
492 * decl2.c (grokclassfn): Likewise.
493 (check_classfn): Likewise.
494 (finish_static_data_member_decl): Likewise.
495 (grokfield): Likewise.
496 * error.c (GLOBAL_IORD_P): Remove.
497 (dump_global_iord): Improve output.
498 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
499 * except.c (nothrow_libfn_p): Summarily reject any function not in
500 namespace-scope.
501 * init.c (build_java_class_ref): Don't explicitly set
502 DECL_ASSEMBLER_NAME after calling mangle_decl.
503 * mangle.c (mangle_decl_string): Handle extern "C" functions.
504 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
505 * method.c (set_mangled_name_for_decl): Don't explicitly set
506 DECL_ASSEMBLER_NAME after calling mangle_decl.
507 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
508 IDENTIFIER_GLOBAL_VALUE for the thunk.
509 * pt.c (set_mangled_name_for_template_decl): Remove.
510 (check_explicit_specialization): Don't use it.
511 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
512 (tsubst_friend_function): Likewise.
513 (tsubst_decl): Likewise.
514 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
515 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
516 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
517 where it's not necessary.
518 (tinfo_base_init): Likewise.
519 (create_real_tinfo_var): Likewise.
520 * search.c (looup_field_1): Likewise.
521 * semantics.c (finish_named_return_value): Likewise.
522 * tree.c (init_tree): Set lang_set_decl_assembler_name.
523
524 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
525
526 Correct semantics restrictions checking in throw-expression.
527 * except.c (is_admissible_throw_operand): New function.
528 (build_throw): Use it.
529
530 2001-03-14 Mark Mitchell <mark@codesourcery.com>
531
532 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
533 and its ilk.
534
535 2001-03-14 Mark Mitchell <mark@codesourcery.com>
536
537 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
538 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
539 * decl.c (duplicate_decls): Likewise.
540 (builtin_function): Likewise.
541 (build_library_fn): Likewise.
542 (build_cp_library_fn): Likewise.
543 (check_initializer): Likewise.
544 (cp_finish_decl): Likewise.
545 * decl2.c (grokfield): Likewise.
546 (grok_function_init): Remove #if 0'd code.
547 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
548 * friend.c (do_friend): Likewise.
549 * init.c (get_temp_regvar): Likewise.
550 * method.c (make_thunk): Likewise.
551 * pt.c (tsubst_friend_function): Likewise.
552 (tsubst_decl): Likewise.
553 (regenerate_decl_from_template): Likewise.
554 * semantics.c (genrtl_named_return_value): Likewise.
555 (expand_body): Likewise.
556 (genrtl_finish_function): Likewise.
557 * tree.c (cp_tree_equal): Likewise.
558
559 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
560
561 * call.c (convert_like_real): Add extra semantics to INNER
562 parameter. Don't convert to temporary if a user conversion
563 gives us an lvalue that we're about to bind to a reference.
564 Set INNER to indicate pending reference binding on recursive
565 calls.
566
567 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
568
569 * cp/lex.c: Delete duplicate pending_lang_change.
570
571 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
572
573 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
574 Similarly.
575 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
576 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
577
578 2001-03-09 Zack Weinberg <zackw@stanford.edu>
579
580 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
581
582 2001-03-08 Stan Shebs <shebs@apple.com>
583
584 * cp-tree.h (set_identifier_local_value): Remove unused decl.
585
586 2001-03-06 Zack Weinberg <zackw@stanford.edu>
587
588 * spew.c: Remove references to CPP_OSTRING.
589
590 2001-03-06 Andrew Haley <aph@redhat.com>
591
592 * typeck.c (convert_arguments): Check that we have an fndecl.
593
594 2001-03-05 Andrew Haley <aph@redhat.com>
595
596 * typeck.c (convert_arguments): Don't do ellipsis conversion for
597 __built_in_constant_p.
598
599 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
600
601 * typeck.c (build_static_cast): Allow enum to enum conversions
602 as per DR 128.
603
604 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
605
606 * class.c (check_field_decls): Pointers to member do not a
607 non-pod struct make, as per DR 148.
608
609 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
610
611 * call.c (joust): cp_pedwarn when using gnu extension concerning
612 worst conversion sequences.
613
614 2001-03-01 Zack Weinberg <zackw@stanford.edu>
615
616 * decl.c: Replace all uses of 'boolean' with 'bool'.
617
618 2001-03-01 Zack Weinberg <zackw@stanford.edu>
619
620 * lang-specs.h: Add zero initializer for cpp_spec field to
621 all array elements that need one. Don't put an #ifdef inside
622 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
623 use it.
624
625 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
626
627 Implement using decls inside template functions.
628 * decl2.c (validate_nonmember_using_decl): Don't special case
629 fake_std_node in the global namespace. Don't reject early when
630 processing a template.
631 (do_local_using_decl): Add to statement tree. Don't do further
632 processing when building a template.
633 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
634
635 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
636
637 * decl2.c (do_nonmember_using_decl): Don't complain if we find
638 same function. Do complain about ambiguating extern "C"
639 declarations.
640
641 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
642
643 Remove floating point and complex type template constant parms.
644 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
645 COMPLEX_TYPE extensions.
646 (invalid_nontype_parm_type_p): Likewise.
647
648 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
649
650 * except.c (call_eh_info): Revert "match_function"'s type.
651
652 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
653
654 Fix ctor vtable vcall offsets.
655 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
656 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
657 (get_matching_base): Remove.
658 (get_original_base): New function.
659 (build_vtbl_initializer): Initialize vid.rtti_binfo.
660 Use a virtual thunk for a ctor vtable with an index
661 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
662 primary base within a constructor vtable. Only set
663 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
664 when primary base has been lost.
665 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
666
667 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
668
669 * call.c (joust): Ensure more_specialized()'s argument length
670 parameter has correct value for constructors.
671
672 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
673
674 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
675
676 * decl.c (mark_inlined_fns): Prototype.
677
678 2001-02-22 Mark Mitchell <mark@codesourcery.com>
679
680 * spew.c (yylex): Correct handling of friends.
681
682 2001-02-22 Mark Mitchell <mark@codesourcery.com>
683
684 * mangle.c (write_encoding): Pass write_function_type the
685 FUNCTION_DECL for the function being encoded.
686 (write_function_type): Pass it along to write_bare_function_type.
687 (write_bare_function_type): Pass it along to write_method_parms.
688 (write_method_parms): Don't mangle the compiler-generated
689 parameters to a constructor or destructor.
690
691 2001-02-22 Andreas Jaeger <aj@suse.de>
692
693 * optimize.c: Include toplev.h for
694 note_deferral_of_defined_inline_function prototype.
695
696 2001-02-22 Jakub Jelinek <jakub@redhat.com>
697
698 * cp-tree.h (struct lang_decl_inlined_fns): New.
699 (struct lang_decls): Add inlined_fns.
700 (DECL_INLINED_FNS): New macro.
701 * optimize.c (struct inline_data): Add inlined_fns.
702 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
703 (inlinable_function_p): Likewise, fix typo in comment,
704 function is not inlinable if it already inlined function currently
705 being optimized.
706 (expand_call_inline): Add fn to inlined_fns if neccessary.
707 (optimize_function): Initialize inlined_fns.
708 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
709 * decl.c (mark_inlined_fns): New function.
710 (lang_mark_tree): Call it.
711
712 2001-02-21 Jason Merrill <jason@redhat.com>
713
714 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
715 (DECL_UNINLINABLE): Move to middle-end.
716
717 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
718 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
719 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
720 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
721 parms and outer BLOCK. note_deferral_of_defined_inline_function.
722
723 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
724 second parm of op=.
725
726 2001-02-19 Mark Mitchell <mark@codesourcery.com>
727
728 * decl2.c (set_decl_namespace): Allow explicit instantiations in
729 any namespace.
730
731 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
732
733 * optimize.c (expand_call_inline): Don't walk subtrees of type
734 nodes.
735
736 2001-02-18 Mark Mitchell <mark@codesourcery.com>
737
738 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
739 for a destructor.
740
741 2001-02-18 Jason Merrill <jason@redhat.com>
742
743 Do put the VTT parameter in DECL_ARGUMENTS.
744 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
745 (current_vtt_parm): New macro.
746 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
747 (DECL_HAS_VTT_PARM_P): New macro.
748 (DECL_VTT_PARM): Remove.
749 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
750 * decl.c (duplicate_decls): Only copy the operator code if
751 appropriate.
752 (start_function): Set current_vtt_parm.
753 (lang_mark_tree): Don't mark vtt_parm.
754 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
755 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
756 * class.c (build_clone): Maybe remove the VTT parm.
757 * optimize.c (maybe_clone_body): Set up the VTT parm.
758 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
759 * call.c (build_over_call): Just allow the VTT arg.
760 * method.c (make_thunk): Don't set DECL_VTT_PARM.
761 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
762 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
763 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
764 * error.c (dump_function_decl): Likewise.
765 * call.c (build_user_type_conversion_1, convert_like_real): Abort
766 if we try to call a constructor with in-charge or VTT parms.
767 * method.c (skip_artificial_parms_for): New fn.
768 * call.c (add_function_candidate, build_over_call): Call it.
769 * call.c (build_new_method_call): Use current_vtt_parm.
770 * init.c (expand_virtual_init): Likewise.
771 * class.c (same_signature_p): No longer static.
772 * cp-tree.h: Declare it.
773 * search.c (look_for_overrides_r): Use it.
774
775 2001-02-17 Mark Mitchell <mark@codesourcery.com>
776
777 * cp-tree.h (new_abi_rtti_p): Remove.
778 (name_mangling_version): Likewise.
779 (flag_do_squangling): Likewise.
780 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
781 * decl.c (grokfndecl): Likewise.
782 * decl2.c (name_mangling_version): Remove.
783 (flag_do_squangling): Likewise.
784 (lang_f_options): Remove `squangle'.
785 (unsupported_options): Add `squangle'.
786 (cxx_decode_option): Issue a warning about uses of
787 -fname-mangling-version.
788 (finish_file): Remove old ABI support.
789 * pt.c (check_explicit_specialization): Likewise.
790 (tsubst_decl): Likewise.
791 * rtti.c (init_rtti_processing): Likewise.
792 (build_headof): Likewise.
793 (get_tinfo_decl_dynamic): Likewise.
794 (tinfo_from_decl): Likewise.
795 (build_dynamic_cast_1): Likewise.
796 (synthesize_tinfo_var): Likewise.
797 * init.c (build_new): Allow enumeration types for the array-bounds
798 in a direct-new-declarator.
799
800 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
801
802 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
803 TREE_PROTECTED from the template being specialized.
804
805 2001-02-17 Jason Merrill <jason@redhat.com>
806
807 * decl2.c (build_artificial_parm): Set TREE_READONLY.
808
809 * decl.c (bad_specifiers): Allow throw specs on things with
810 pointer-to-function or -member-function type.
811 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
812 a pmf.
813
814 2001-02-17 Mark Mitchell <mark@codesourcery.com>
815
816 * call.c (check_dtor_name): Handle template names correctly.
817
818 2001-02-16 Jason Merrill <jason@redhat.com>
819
820 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
821 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
822 * optimize.c (maybe_clone_body): Don't substitute it.
823 * call.c (build_new_method_call): Check in_chrg instead.
824 * init.c (expand_virtual_init): Likewise.
825
826 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
827
828 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
829 class-type introduces at least a type-name.
830
831 2001-02-16 Jakub Jelinek <jakub@redhat.com>
832
833 * call.c (convert_like_real): Create a temporary for non-lvalue.
834
835 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
836
837 * cp-tree.h: Fix typos in comments.
838
839 2001-02-16 Jason Merrill <jason@redhat.com>
840
841 * optimize.c (remap_block): If we're compiling a clone, pass the
842 new block to insert_block.
843
844 2001-02-16 Mark Mitchell <mark@codesourcery.com>
845
846 * semantics.c (finish_asm_stmt): Robustify.
847
848 2001-02-15 Mark Mitchell <mark@codesourcery.com>
849
850 * pt.c (push_template_decl_real): Don't remangle the name of a
851 class template.
852
853 2001-02-15 Jim Meyering <meyering@lucent.com>
854
855 * Make-lang.in (c++.install-common): Depend on installdirs.
856 (c++.install-info): Likewise.
857 (c++.install-man): Likewise.
858
859 2001-02-15 Mark Mitchell <mark@codesourcery.com>
860
861 * typeck2.c (build_m_component_ref): Robustify.
862
863 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
864
865 * friend.c (do_friend): Don't take the nested [template] class
866 into account when deciding whether to warn about the friend
867 function not referring to a template function.
868
869 2001-02-14 Jakub Jelinek <jakub@redhat.com>
870
871 * typeck.c (build_unary_op): Clarify error message.
872
873 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
874
875 * parse.y (component_constructor_declarator): allow optional
876 parentheses around constructor class name.
877
878 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
879
880 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
881 section.
882 * init.c (emit_base_init): Remove incorrect comment about
883 virtual bases.
884 * method.c (make_thunk): Fix comment alignment.
885
886 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
887
888 Kill remnants of this is variable.
889 * cp-tree.h (flag_this_is_variable): Remove.
890 * decl2.c (flag_this_is_variable): Remove.
891 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
892 (build_vbase_path): The path is non-static, even in a cdtor.
893 (resolves_to_fixed_type_p): Add additional return value.
894 * search.c (init_vbase_pointers): Adjust.
895 * tree.c (lvalue_p_1): Adjust.
896 * typeck.c (mark_addressable): Adjust.
897
898 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
899
900 * pt.c (unify): Don't check cv quals of array types.
901
902 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
903
904 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
905 check whether we already have the type.
906
907 2001-02-13 Mark Mitchell <mark@codesourcery.com>
908
909 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
910 * call.c (build_op_delete_call): Simplify to remove duplicate
911 code.
912 * class.c (clone_function_decl): Don't build the deleting variant
913 of a non-virtual destructor.
914 * decl.c (finish_destructor_body): Don't call delete if this is a
915 non-virtual destructor.
916 * init.c (build_delete): Explicitly call `operator delete' when
917 deleting an object with a non-virtual destructor.
918
919 2001-02-13 Jason Merrill <jason@redhat.com>
920
921 * lang-specs.h: Add more __EXCEPTIONS.
922
923 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
924
925 * typeck2.c (process_init_constructor): Check
926 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
927
928 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
929
930 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
931 Remove spurious information in comment. Allow further
932 adjustments of REFERENCE_TYPE args.
933
934 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
935
936 * errfn.c (cp_deprecated): Tweak diagnostic text.
937 * parse.y (new_initializer): Deprecate initializer lists
938 extension.
939
940 2001-02-12 Mark Mitchell <mark@codesourcery.com>
941
942 Remove old ABI support.
943
944 2001-02-11 Mark Mitchell <mark@codesourcery.com>
945
946 * decl2.c (flag_vtable_thunks): Always set it to 1.
947 (flag_new_abi): Likewise.
948 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
949
950 * Makefile.in (g++spec.o): Fix typo.
951
952 2001-02-09 Jason Merrill <jason@redhat.com>
953
954 * lang-specs.h: Restore definition of __EXCEPTIONS.
955
956 2001-02-08 Jason Merrill <jason@redhat.com>
957
958 * search.c (shared_member_p): New function.
959 (lookup_field_r): Use it.
960 * cp-tree.h (SHARED_MEMBER_P): Remove.
961
962 * method.c (process_overload_item): Handle template-dependent array
963 bounds.
964 * pt.c (type_unification_real): If we end up with undeduced nontype
965 parms, try again.
966
967 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
968 types.
969
970 * typeck2.c (friendly_abort): Don't say anything if we have
971 earlier errors or sorries.
972
973 * decl.c (check_tag_decl): Notice attempts to redefine bool and
974 wchar_t. Ignore if in_system_header.
975
976 * decl.c (maybe_push_cleanup_level): New fn...
977 (start_decl_1): ...split out from here.
978 * cvt.c (build_up_reference): Use it.
979 * cp-tree.h: Declare it.
980
981 2001-02-07 Mark Mitchell <mark@codesourcery.com>
982
983 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
984 spec.
985
986 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
987
988 * pt.c (lookup_template_class): Make sure it's a primary
989 template or template_template_parm when called from the parser.
990 (instantiate_template_class): Add assertion.
991
992 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
993
994 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
995 from error_mark_node.
996
997 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
998
999 Fix specification and implementation bugs in V3 ABI
1000 construction vtables.
1001 * cp-tree.h (flag_dump_class_layout): New flag.
1002 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
1003 (BINFO_LOST_PRIMARY_P): New flag.
1004 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
1005 (BINFO_PRIMARY_MARKED_P): Rename to ...
1006 (BINFO_PRIMARY_P): ... here.
1007 (binfo_via_virtual): New prototype.
1008 * decl2.c (flag_dump_class_layout): New flag.
1009 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
1010 use `=' as a file name separator.
1011 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
1012 bases.
1013 (build_vtbl_address): If this is a virtual primary base, then
1014 get the vtbl of what it is ultimately primary for.
1015 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
1016 for BINFO_PRIMARY_P.
1017 (dfs_skip_nonprimary_vbases_markedp): Likewise.
1018 (get_shared_vbase_if_not_primary): Likewise.
1019 (dfs_get_pure_virtuals): Likewise.
1020 (expand_upcast_fixups): Likewise.
1021 (fixup_virtual_upcast_offsets): Likewise.
1022 (dfs_find_vbase_instance): Likewise.
1023 (find_vbase_instance): Likewise.
1024 (binfo_from_vbase): Adjust comment to reflect reality.
1025 (binfo_via_virtual): New function.
1026 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
1027 for binfo walking during VTT construction.
1028 (dfs_mark_primary_bases): Remove.
1029 (force_canonical_binfo_r): New function.
1030 (force_canonical_binfo): New function.
1031 (mark_primary_virtual_base): New function.
1032 (mark_primary_bases): Walk in inheritance graph order, use
1033 mark_primary_virtual_base.
1034 (determine_primary_base): Use some more intermediate variables.
1035 (dfs_find_final_overrider): Don't check for overriding along a
1036 virtual path.
1037 (dfs_modify_vtables): Walk into primary virtual bases too.
1038 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
1039 (build_base_fields): Likewise.
1040 (dfs_set_offset_for_unshared_vbases): Likewise.
1041 (layout_virtual_bases): Likewise.
1042 (end_of_class): Likewise.
1043 (finish_struct_1): Call dump_class_hierarchy, if requested.
1044 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
1045 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
1046 (dump_class_hierarchy): Add file parameter. Append to file, if
1047 required.
1048 (finish_vtbls): Adjust accumulate_vtbl_inits call.
1049 Use canonical base for virtual bases.
1050 (build_vtt): Add more comments. Adjust build_vtt_inits call.
1051 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
1052 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
1053 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
1054 virtual VTTs.
1055 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
1056 from DATA. We want virtual primary bases and all bases via virtual.
1057 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
1058 virtual base when not a construction vtable.
1059 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
1060 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
1061 Use canonical bases when processing virtual bases.
1062 (accumulate_vtbl_inits): We're interested in any base via a
1063 virtual path.
1064 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
1065 within a construction vtable, determine what is being overridden.
1066 (build_vtbl_initializer): Add more comments
1067 (add_vcall_offset_vtbl_entries_1): Adjust comment.
1068 (build_rtti_vtbl_entries): Check if the base has lost its
1069 primary.
1070
1071 2001-02-05 Mark Mitchell <mark@codesourcery.com>
1072
1073 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
1074
1075 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1076
1077 * decl.c (pushdecl): Call abort instead of fatal.
1078 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
1079 * init.c (build_new_1): Likewise.
1080 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
1081 * decl.c (build_typename_type): hash_table_init now returns void.
1082 decl.c (init_decl_processing): Make an error non-fatal.
1083
1084 2001-02-04 Mark Mitchell <mark@codesourcery.com>
1085
1086 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
1087 Document.
1088 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
1089 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
1090 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1091 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
1092 * decl.c (maybe_commonize_var): Use the new name-mangling where
1093 appropriate.
1094 * decl2.c (comdat_linkage): Enhance comments. Make all
1095 compiler-generated things static, if COMDAT is not available.
1096 (get_tinfo_decl): Do not make typeinfo objects that belong in the
1097 library COMDAT.
1098 (tinfo_base_init): Use the correct mangled name for typeinfo
1099 strings, and push them into the global scope.
1100 (typeinfo_in_lib_p): New function.
1101 (synthesize_tinfo_var): Use it.
1102 (create_real_tinfo_var): Likewise.
1103
1104 2001-02-03 Jakub Jelinek <jakub@redhat.com>
1105
1106 * decl.c (push_class_binding): Use context_for_name_lookup instead
1107 of CP_DECL_CONTEXT.
1108 * search.c (context_for_name_lookup): Remove static. Check for NULL
1109 context in the loop.
1110 * cp-tree.h (context_for_name_lookup): Add prototype.
1111
1112 2001-02-02 Jakub Jelinek <jakub@redhat.com>
1113
1114 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
1115 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
1116 Remove.
1117 * call.c (convert_class_to_reference, build_user_type_conversion_1,
1118 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
1119
1120 2001-02-02 Mark Mitchell <mark@codesourcery.com>
1121
1122 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
1123 of macros used when compiling g++spec.c.
1124 * g++spec.c (lang_specific_driver): Link with the shared
1125 libgcc by default.
1126
1127 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
1128
1129 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
1130 make_reference_declarator, make_call_declarator), method.c
1131 (implicitly_declare_fn), parse.y (namespace_using_decl,
1132 notype_unqualified_id, expr_or_declarator, new_type_id,
1133 after_type_declarator, direct_after_type_declarator,
1134 notype_declarator, complex_notype_declarator,
1135 complex_direct_notype_declarator, qualified_id,
1136 notype_qualified_id, overqualified_id, direct_new_declarator,
1137 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
1138 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
1139 instead of build_parse_node.
1140
1141 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1142
1143 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
1144 (minus_one_node): Moved to top level gcc directory. Renamed
1145 to integer_minus_one_node.
1146
1147 * init.c (init_init_processing): Don't set minus_one_node.
1148 (build_vec_init): Use integer_minus_one_node.
1149
1150 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1151
1152 2001-01-28 Jakub Jelinek <jakub@redhat.com>
1153
1154 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
1155 identical and they would be replaced with constant, remove
1156 MODIFY_EXPR from the tree.
1157
1158 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1159
1160 * Make-lang.in: Remove all dependencies on defaults.h.
1161 * call.c: Don't include defaults.h.
1162 * decl.c: Likewise.
1163 * decl2.c: Likewise.
1164 * except.c: Likewise.
1165 * pt.c: Likewise.
1166 * rtti.c: Likewise.
1167 * tree.c: Likewise.
1168 * typeck.c: Likewise.
1169
1170 2001-01-25 Jakub Jelinek <jakub@redhat.com>
1171
1172 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
1173 operators even in "C" linkage.
1174 * method.c (set_mangled_name_for_decl): Likewise.
1175 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
1176 overloaded operators in "C" linkage.
1177
1178 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
1179
1180 * pt.c (tsubst_decl): Remove IN_DECL parameter.
1181 (tsubst_arg_types): Check parameter is not void.
1182 (tsubst): Adjust tsubst_decl call.
1183
1184 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
1185
1186 * call.c (add_builtin_candidate): Quote std properly, from
1187 previous change.
1188
1189 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1190
1191 * pt.c (check_explicit_specialization): Clone constructors and
1192 destructors.
1193
1194 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
1195
1196 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
1197 indicates anything special about template depth. Make sure we
1198 only count the user visible template classes.
1199
1200 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
1201
1202 * call.c (build_conv): Typo in comment.
1203 (add_builtin_candidate): Add more explanation.
1204 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
1205 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
1206 when we have enumeral types.
1207 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
1208 candidates for relops and eqops.
1209 (joust): Simplify control flow. Allow a non-template user
1210 function to hide a builtin.
1211
1212 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
1213
1214 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
1215 (more_specialized): Add deduction parameter.
1216 * call.c (joust): Adjust more_specialized call.
1217 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
1218 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
1219 (get_bindings_order): Remove.
1220 (get_bindings_real): Add DEDUCE parameter.
1221 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
1222 REFERENCE_TYPE jig for DEDUCE_ORDER.
1223 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
1224 maybe_adjust_types_for_deduction.
1225 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
1226 directly.
1227 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
1228 (check_cv_quals_for_unify): Use new unify qualifier flags.
1229 (unify): Clear new unify qualifier flags.
1230 (get_bindings_real): Add DEDUCE parameter.
1231 (get_bindings): Adjust call to get_bindings_real.
1232 (get_bindings_overload): Likewise.
1233 (most_specialized_instantiation): Adjust call to
1234 more_specialized.
1235
1236 2001-01-19 Jason Merrill <jason@redhat.com>
1237
1238 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
1239
1240 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
1241 -fnew-abi.
1242
1243 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
1244
1245 * decl2.c (arg_assoc_class): Fix double iteration logic.
1246
1247 2001-01-19 Jason Merrill <jason@redhat.com>
1248
1249 * init.c (build_delete): Always call convert_force to strip cv-quals.
1250
1251 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
1252 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
1253 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
1254
1255 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1256
1257 * search.c (get_vbase_1): Count only virtual bases.
1258
1259 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1260
1261 * class.c (duplicate_tag_error): Robustify flag clearing.
1262
1263 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1264
1265 * cp-tree.h (lookup_template_class): Add complain parm.
1266 * decl.c (lookup_namespace_name): Adjust call to
1267 lookup_template_class.
1268 (make_typename_type): Likewise.
1269 * semantics.c (finish_template_type): Likewise.
1270 * pt.c (lookup_template_class): Add complain parm. Adjust.
1271 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
1272 (tsubst): Likewise.
1273
1274 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1275
1276 * pt.c (copy_default_args_to_explicit_spec): Preserve
1277 object's CV quals. Reorganize.
1278
1279 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1280
1281 * typeck.c (build_modify_expr): Say `initialization' for
1282 INIT_EXPRs.
1283 * init.c (build_default_init): Convert to enumeral type, if
1284 needed.
1285
1286 2001-01-18 Jakub Jelinek <jakub@redhat.com>
1287
1288 * parse.y (nomods_initdcl0): Properly set things up for
1289 initdcl0_innards.
1290
1291 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1292
1293 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
1294 (type_unification_real): Set it.
1295 (unify): Use it.
1296
1297 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1298
1299 * decl.c (finish_destructor_body): Convert to vbase pointer here.
1300
1301 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1302
1303 * semantics.c (begin_class_definition): Check we're not inside a
1304 template parm list.
1305
1306 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1307
1308 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
1309 BASELINK_P.
1310
1311 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1312
1313 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
1314 * call.c (build_over_call): Add comment.
1315
1316 2001-01-16 Daniel Berlin <dberlin@redhat.com>
1317
1318 * cvt.c (ocp_convert): Handle vector type conversion
1319 * typeck2.c (digest_init): Handle vector type initializations
1320
1321 2001-01-16 Phil Edwards <pme@sources.redhat.com>
1322
1323 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
1324 was given.
1325
1326 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
1327
1328 * pt.c (check_nontype_parm): Rename to ...
1329 (invalid_nontype_parm_type_p): ... here.
1330 (process_template_parm): Adjust.
1331 (convert_template_argument): Adjust.
1332
1333 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
1334
1335 * pt.c (check_nontype_parm): New function.
1336 (process_template_parm): Use it.
1337 (convert_template_argument): Use it.
1338 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
1339 member.
1340
1341 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
1342
1343 * tree.c: Add defaults.h
1344 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
1345 * Make-lang.in (cp/tree.o): Add defaults.h.
1346
1347 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1348
1349 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
1350
1351 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1352
1353 * g++.1: Change to be ".so man1/gcc.1".
1354
1355 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1356
1357 * Make-lang.in (c++.info, c++.install-info): Build and install g++
1358 internals info.
1359 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
1360 ($(srcdir)/cp/g++int.info): New target.
1361 * gxxint.texi: Add info directory entry. Use @@ in email address.
1362 * .cvsignore: Update.
1363
1364 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
1365
1366 * typeck.c (build_c_cast): Do template processing earlier.
1367 Always pedwarn on array casts.
1368
1369 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
1370
1371 * friend.c (make_friend_class): Make sure a templated class is
1372 actually a template.
1373
1374 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1375
1376 * decl2.c (get_guard): Set linkage from guarded decl.
1377
1378 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1379
1380 * call.c (convert_default_arg): Check for unprocessed
1381 DEFAULT_ARG.
1382 * cp-tree.h (replace_defarg): Move to spew.c.
1383 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
1384 spew.c, which is where they really are.
1385 (done_pending_defargs): Declare.
1386 (unprocessed_defarg_fn): Declare.
1387 * decl.c (replace_defarg): Move to spew.c
1388 * parse.y (structsp): Call done_pending_defargs.
1389 * spew.c (defarg_fns): Rearrange list structure.
1390 (defarg_fnsdone): New static variable.
1391 (defarg_depfns): New static variable.
1392 (init_spew): Adjust.
1393 (add_defarg_fn): Store the type in TREE_TYPE.
1394 (do_pending_defargs): Detect and deal with ordering constraints
1395 and circularity.
1396 (done_pending_defargs): New function.
1397 (unprocessed_defarg_fn): New function.
1398 (replace_defarg): Moved from decl.c. Robustify. Don't save
1399 if circularity detected.
1400
1401 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1402
1403 * pt.c (unify): Check array has a domain, before checking
1404 whether it is variable sized.
1405
1406 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1407
1408 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
1409 parameters with pointers to arrays of unknown bound.
1410
1411 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1412
1413 * parse.y (template_parm_header, template_spec_header): New
1414 reductions. Split out from ...
1415 (template_header): ... here. Use them.
1416 (template_template_parm): Use template_parm_header.
1417 * semantics.c (finish_template_template_parm): Add assert.
1418
1419 2001-01-10 Mark Mitchell <mark@codesourcery.com>
1420
1421 * mangle.c (write_builtin_type): Fix thinko.
1422
1423 * pt.c (copy_default_args_to_explicit_spec_1): New function.
1424 (copy_default_args_to_explicit_spec): Likewise.
1425 (check_explicit_specialization): Use it.
1426
1427 * class.c (finish_struct_1): Remove last argument in call to
1428 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
1429 * decl.c (builtin_function): Likewise.
1430 (build_cp_library_fn): Likewise.
1431 (check_initializer): Likewise.
1432 (make_rtl_for_nonlocal_decl): Likewise.
1433 (cp_finish_decl): Likewise.
1434 (start_function): Likewise.
1435 * decl2.c (finish_anon_union): Likewise.
1436 * friend.c (do_friend): Likewise.
1437 * init.c (build_java_class_ref): Likewise.
1438 * method.c (make_thunk): Likewise.
1439 * pt.c (tsubst_friend_function): Likewise.
1440 * semantics.c (expand_body): Likewise.
1441
1442 2001-01-10 Mark Mitchell <mark@codesourcery.com>
1443
1444 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
1445 looking at DECL_CLONED_FUNCTION for non-functions.
1446
1447 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1448
1449 * error.c (dump_template_parameter): Use parm to determine how
1450 to print default value.
1451
1452 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1453
1454 * class.c (duplicate_tag_error): Clear more flags.
1455
1456 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1457
1458 * call.c (build_new_method_call): Use binfo_for_vbase.
1459
1460 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
1461
1462 * cp-tree.h (flag_cond_mismatch): Don't declare.
1463 * decl2.c (flag_cond_mismatch): Don't define.
1464 (lang_f_options): Remove cond-mismatch.
1465 (unsupported_options): Add cond-mismatch.
1466
1467 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
1468
1469 * class.c (handle_using_decl): Reject using of constructor name
1470 of sourcing class. Allow injecting of a method with same name as
1471 nested class. Fixup error messages.
1472
1473 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
1474
1475 * decl2.c (lang_decode_option): Handle -Wformat=2.
1476
1477 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1478
1479 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
1480 initialized_in_class.
1481 (DECL_DEFINED_IN_CLASS_P): Rename to ...
1482 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
1483 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
1484 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
1485 * pt.c (check_default_tmpl_args): Adjust for
1486 DECL_INITIALIZED_IN_CLASS_P.
1487 (instantiate_class_template): Likewise.
1488 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
1489
1490 * class.c (finish_struct): Constify saved_filename.
1491
1492 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1493
1494 * class.c (duplicate_tag_error): Adjust diagnostic.
1495 (finish_struct): Locally set location to start of struct.
1496 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
1497
1498 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1499
1500 * decl.c (struct binding_level): Adjust class_shadowed comments
1501 to reflect reality.
1502 (push_class_level_binding): Ajust comments to reflect reality.
1503 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
1504 Don't set TREE_VALUE on the class_shadowed list.
1505
1506 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
1507
1508 * decl2.c (acceptable_java_type): Allow references too.
1509 * init.c (build_java_class_ref): When using the new ABI, search
1510 `class$' and have it mangled with `mangle_decl.'
1511 * mangle.c (write_java_integer_type_codes): New function.
1512 (write_builtin_type): Detect and mangle Java integer and real
1513 types.
1514
1515 2001-01-07 Mark Mitchell <mark@codesourcery.com>
1516
1517 * decl2.c (grokfield): Don't accept `asm' specifiers for
1518 non-static data members.
1519
1520 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1521
1522 * expr.c (cplus_expand_expr): Don't reset `target'.
1523
1524 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
1525
1526 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
1527
1528 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
1529
1530 * parse.y (template_datadef): Check for error_mark_node.
1531
1532 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
1533
1534 * cp-tree.def (DEFAULT_ARG): Make `x' class.
1535
1536 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
1537
1538 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
1539 (record_builtin_type): Make non-static.
1540 (flag_short_double): Don't declare.
1541 (init_decl_processing): Remove the creation of many tree nodes now
1542 in c_common_nodes_and_builtins.
1543 (build_void_list_node): New function.
1544 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
1545 * cp-tree.h (flag_short_wchar): Don't declare.
1546
1547 2001-01-04 Mark Mitchell <mark@codesourcery.com>
1548
1549 * call.c (build_conv): Don't use build1 for USER_CONV.
1550 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
1551
1552 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
1553
1554 * lex.c (lang_init): Call c_common_lang_init.
1555
1556 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
1557
1558 * search.c (lookup_fnfields_here): Remove.
1559 (look_for_overrides_r): Use lookup_fnfields_1.
1560 Ignore functions from using declarations.
1561
1562 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
1563
1564 Implement exceptions specifiers for implicit member functions.
1565 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
1566 * method.c (synthesize_exception_spec): New function.
1567 (locate_dtor, locate_ctor, locate_copy): New functions.
1568 (implicitly_declare_fn): Generate the exception spec too.
1569 * search.c (check_final_overrider): Check artificial functions
1570 too.
1571 * typeck2.c (merge_exception_specifiers): New function.
1572
1573 2001-01-03 Jason Merrill <jason@redhat.com>
1574
1575 * init.c (build_default_init): New fn.
1576 (perform_member_init): Split out from here.
1577 (build_new_1): Use it. Simplify initialization logic.
1578 (build_vec_init): Take an array, rather than a pointer and maxindex.
1579 Speed up simple initializations. Don't clean up if we're assigning.
1580 * cp-tree.h: Adjust.
1581 * decl2.c (do_static_initialization): Remove TREE_VEC case.
1582 * parse.y (new_initializer): Return void_zero_node for ().
1583 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
1584 * typeck2.c (digest_init): Only complain about user-written
1585 CONSTRUCTORs.
1586
1587 2000-12-22 Mike Stump <mrs@wrs.com>
1588
1589 * decl2.c: (max_tinst_depth): Increase to 50.
1590
1591 2001-01-02 Mark Mitchell <mark@codesourcery.com>
1592
1593 * class.c (invalidate_class_lookup_cache): Zero the
1594 previous_class_values.
1595 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
1596 TREE_INT_CST_HIGH.
1597 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
1598 * decl.c (free_bindings): New variable.
1599 (push_binding): Don't create a new binding if we have one on the
1600 free list.
1601 (pop_binding): Put old bindings on the free list.
1602 (init_decl_processing): Use size_int, not build_int_2.
1603 Register free_bindings as a GC root.
1604 (cp_make_fname_decl): Use size_int, not build_int_2.
1605 (push_inline_template_parms_recursive): Likewise.
1606 (end_template_parm_list): Likewise.
1607 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
1608 (tsubst_template_parms): Use size_int, not build_int_2.
1609 (tsubst): Likewise.
1610 * rtti.c (get_vmi_pseudo_type_info): Likewise.
1611
1612 2001-01-02 Richard Henderson <rth@redhat.com>
1613
1614 * parse.y (asm): Set ASM_INPUT_P.
1615
1616 2001-01-02 Jason Merrill <jason@redhat.com>
1617
1618 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
1619 for v3 ABI.
1620
1621 * typeck.c (cp_truthvalue_conversion): New fn.
1622 * cvt.c (ocp_convert): Use it.
1623
1624 * cp-tree.h: Lose c-common.c decls.
1625
1626 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
1627 * cvt.c (convert_to_void): Use type_unknown_p.
1628
1629 * typeck.c (strip_all_pointer_quals): Also strip quals from
1630 pointer-to-member types.
1631
1632 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
1633 parse.y as C.
1634
1635 * call.c (build_new_method_call): Do evaluate the object parameter
1636 when accessing a static member.
1637 * typeck.c (build_component_ref): Likewise.
1638
1639 2001-01-02 Andreas Jaeger <aj@suse.de>
1640
1641 * decl.c (cp_missing_noreturn_ok_p): New.
1642 (init_decl_processing): Set lang_missing_noreturn_ok_p.
1643
1644 2000-12-29 Jakub Jelinek <jakub@redhat.com>
1645
1646 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
1647
1648 2000-12-29 Mark Mitchell <mark@codesourcery.com>
1649
1650 * class.c (pushclass): Remove #if 0'd code.
1651 * cp-tree.h (overload_template_name): Remove.
1652 * decl.c (store_bindings): Simplify.
1653 (pop_from_top_level): Likewise.
1654 * pt.c (overload_template_name): Remove.
1655 (instantiate_decl): Don't call push_to_top_level if it's not
1656 needed.
1657
1658 2000-12-28 Mark Mitchell <mark@codesourcery.com>
1659
1660 * pt.c (register_local_specialization): Don't return a value.
1661 (lookup_template_class): Use move-to-front heuristic when looking
1662 up template instantiations.
1663 (instantiate_decl): Only push_to_top_level when we're actually
1664 going to instantiate the template.
1665
1666 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
1667
1668 * search.c (binfo_for_vtable): Return least derived class, not
1669 most. Handle secondary vtables.
1670
1671 2000-12-22 Jason Merrill <jason@redhat.com>
1672
1673 * pt.c (more_specialized): Don't optimize len==0.
1674 (fn_type_unification): If we're adding the return type, increase len.
1675
1676 * typeck.c (build_binary_op): Fix pmf comparison logic.
1677
1678 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
1679 DECL_STATIC_FUNCTION_P.
1680
1681 * semantics.c (genrtl_finish_function): Don't try to jump to
1682 return_label unless it exists.
1683
1684 In partial ordering for a call, ignore parms for which we don't have
1685 a real argument.
1686 * call.c (joust): Pass len to more_specialized.
1687 (add_template_candidate_real): Strip 'this', pass len.
1688 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
1689 (get_bindings_order): New fn. Pass len down.
1690 (get_bindings_real): Strip 'this', pass len.
1691 (fn_type_unification): Likewise.
1692 (type_unification_real): Succeed after checking 'len' args.
1693 (most_specialized_instantiation): Lose explicit_args parm.
1694 * class.c (resolve_address_of_overloaded_function): Strip 'this',
1695 pass len.
1696
1697 2000-12-21 Jason Merrill <jason@redhat.com>
1698
1699 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
1700 DECL_TEMPLATE_RESULT.
1701
1702 * search.c (lookup_field_r): Call lookup_fnfields_1, not
1703 lookup_fnfields_here.
1704
1705 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
1706
1707 * call.c (build_object_call): Also allow conversions that return
1708 reference to pointer to function.
1709 (add_conv_candidate): Handle totype being ref to ptr to fn.
1710 (build_field_call): Also allow members of type reference to function.
1711 Lose support for calling pointer to METHOD_TYPE fields.
1712
1713 * error.c (dump_expr): Handle *_CAST_EXPR.
1714
1715 * typeck2.c (build_scoped_ref): Always convert to the naming class.
1716
1717 * tree.c (break_out_cleanups): Lose.
1718 * cp-tree.h: Remove prototype.
1719 * typeck.c (build_component_ref): Don't break_out_cleanups.
1720 (build_compound_expr): Likewise.
1721 * semantics.c (finish_expr_stmt): Likewise.
1722
1723 2000-12-20 Richard Henderson <rth@redhat.com>
1724
1725 * cp-tree.h: Update declarations.
1726 * decl.c (finish_case_label): Return the new stmt node.
1727 * semantics.c (finish_goto_stmt): Likewise.
1728 (finish_expr_stmt, finish_return_stmt): Likewise.
1729 (finish_break_stmt, finish_continue_stmt): Likewise.
1730 (finish_asm_stmt): Likewise.
1731 * parse.y (already_scoped_stmt): Set STMT_LINENO.
1732 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
1733 (simple_if, simple_stmt): Return the new stmt node.
1734 (save_lineno): New.
1735
1736 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
1737
1738 * cp-tree.h: Don't declare warn_long_long.
1739
1740 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1741
1742 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
1743 IS_AGGR_TYPE.
1744
1745 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1746
1747 * pt.c (unify): Handle when both ARG and PARM are
1748 BOUND_TEMPLATE_TEMPLATE_PARM.
1749
1750 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1751
1752 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
1753 DECL_TEMPLATE_PARM_P.
1754
1755 2000-12-15 Jason Merrill <jason@redhat.com>
1756
1757 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
1758
1759 * init.c (build_new_1): Don't strip quals from type.
1760
1761 * decl.c (pushdecl): Don't check for linkage on a non-decl.
1762
1763 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
1764
1765 * call.c (build_new_function_call): Lose space before paren in
1766 error message.
1767 (build_new_method_call): Likewise.
1768
1769 * typeck2.c (build_m_component_ref): Propagate quals from datum.
1770
1771 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1772
1773 * pt.c (check_explicit_specialization): Propagate default
1774 function arguments to explicit specializations.
1775
1776 2000-12-13 DJ Delorie <dj@redhat.com>
1777
1778 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
1779 and <? operators.
1780
1781 2000-12-08 Jason Merrill <jason@redhat.com>
1782
1783 * error.c (dump_function_name): Don't let the user see __comp_ctor.
1784
1785 Clean up copy-initialization in overloading code.
1786 * call.c (build_user_type_conversion_1): Die if we are asked to
1787 convert to the same or a base type.
1788 (implicit_conversion): Avoid doing so. Lose reference binding code.
1789 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
1790 direct-initialization. Also do direct-init part of copy-init.
1791 (build_user_type_conversion): Don't provide context to convert_like.
1792 * cvt.c (ocp_convert): build_user_type_conversion will now provide
1793 the constructor call for copy-init.
1794
1795 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
1796 instantiation of a member template.
1797 (do_decl_instantiation): Not here.
1798
1799 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
1800
1801 * class.c (check_field_decls): Don't special case anonymous
1802 fields in error messages.
1803 (note_name_declared_in_class): Use %D on diagnostic.
1804
1805 * tree.c (pod_type_p): Use strip_array_types.
1806 (cp_valid_lang_attribute): Likewise.
1807 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
1808 multiple evaluations.
1809 (cp_has_mutable_p): Use strip_array_types.
1810
1811 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
1812
1813 * cp-tree.h (sufficient_parms_p): Declare new function.
1814 * call.c (sufficient_parms_p): New function, broken out of ...
1815 (add_function_candidate): ... here. Use it.
1816 (add_conv_candidate): Use it.
1817 * decl.c (grok_ctor_properties): Use it.
1818
1819 2000-12-07 Jakub Jelinek <jakub@redhat.com>
1820
1821 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
1822
1823 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
1824
1825 * decl2.c (lang_decode_option): Handle -Wformat-security.
1826
1827 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1828
1829 * pt.c (verify_class_unification): New function.
1830 (get_class_bindings): Use it.
1831 (try_class_unification): Tidy.
1832 (unify): Handle when argument of a template-id is not
1833 template parameter dependent.
1834 (template_args_equal): Handle when TREE_CODE's do not match.
1835
1836 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
1837
1838 * lang-specs.h (c++): When invoking the stand-alone preprocessor
1839 for -save-temps, pass all relevant -Defines to it, and then don't
1840 pass them to cc1plus.
1841
1842 2000-12-05 Will Cohen <wcohen@redhat.com>
1843
1844 * decl.c (finish_case_label): Cleared
1845 more_cleanups_ok in surrounding function scopes.
1846 (define_label): Likewise.
1847
1848 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
1849
1850 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
1851 (get_matching_virtual): Remove.
1852 (look_for_overrides): Declare new function.
1853 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
1854 DECL_VINDEX here.
1855 * class.c (check_for_override): Move base class iteration code
1856 to look_for_overrides.
1857 * search.c (next_baselink): Remove.
1858 (get_virtuals_named_this): Remove.
1859 (get_virtual_destructor): Remove.
1860 (tree_has_any_destructors_p): Remove.
1861 (struct gvnt_info): Remove.
1862 (check_final_overrider): Remove `virtual' from error messages.
1863 (get_matching_virtuals): Remove. Move functionality to ...
1864 (look_for_overrides): ... here, and ...
1865 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
1866 to be overriding.
1867
1868 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
1869
1870 * typeck.c (get_delta_difference): If via a virtual base,
1871 return zero.
1872 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
1873 adjustment.
1874
1875 2000-12-04 Richard Henderson <rth@redhat.com>
1876
1877 * error.c (dump_tree): Use output_add_string not OB_PUTS.
1878
1879 2000-12-04 Jason Merrill <jason@redhat.com>
1880
1881 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
1882 (write_builtin_type): Pass intSI_type_node and the like through
1883 type_for_mode.
1884 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
1885 Pass intSI_type_node and the like through type_for_mode.
1886 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
1887 * pt.c (tsubst, unify): Likewise.
1888 * tree.c (walk_tree): Likewise.
1889 * error.c (dump_type): Likewise.
1890 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
1891
1892 * Make-lang.in: Tweak top comment for emacs.
1893 (cp/TAGS): Restore.
1894
1895 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
1896
1897 * class.c (clone_function_decl): Robustify.
1898
1899 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
1900
1901 * decl.c (store_bindings): Only search in the non modified
1902 old_bindings for duplicates.
1903
1904 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
1905
1906 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
1907 TYPE_POLYMORPHIC_P.
1908
1909 * typeck.c (build_static_cast): Remove unused variable.
1910
1911 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1912
1913 * pt.c: Fix typo in comment.
1914
1915 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
1916
1917 * decl2.c (warn_format): Remove definition.
1918 (lang_decode_option): Handle -Wformat-nonliteral,
1919 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
1920
1921 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
1922
1923 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
1924 (init_decl_processing): Don't create string_type_node,
1925 const_string_type_node, wint_type_node, intmax_type_node,
1926 uintmax_type_node, default_function_type, ptrdiff_type_node and
1927 unsigned_ptrdiff_type_node. Adjust position of call to
1928 c_common_nodes_and_builtins.
1929 (identifier_global_value): New function.
1930
1931 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
1932
1933 * call.c (standard_conversion): Reject pointer to member
1934 conversions from ambiguous, inaccessible or virtual bases.
1935 * typeck.c (build_static_cast): Don't check pointers to members
1936 specially.
1937
1938 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
1939
1940 * method.c (do_build_copy_constructor): Preserve cv
1941 qualifications when accessing source object members.
1942 (do_build_assign_ref): Likewise. Remove separate diagnostics for
1943 unnamed fields.
1944
1945 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
1946
1947 * method.c (do_build_assign_ref): Construct appropriately
1948 CV-qualified base reference. Don't allow const casts in base
1949 conversion.
1950
1951 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
1952
1953 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
1954 incomplete return type.
1955
1956 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
1957
1958 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
1959 * semantics.c (finish_base_specifier): Accept a _TYPE not a
1960 _DECL.
1961
1962 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
1963
1964 * spew.c (yyerror): Cope if yylval.ttype is NULL.
1965
1966 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
1967
1968 * decl.c (grokdeclarator): Diagnose undefined template contexts.
1969
1970 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
1971
1972 * decl.c (grokdeclarator): Do type access control on friend
1973 class.
1974
1975 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
1976
1977 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
1978 bison parser ickiness.
1979 * pt.c (tsubst_friend_function): Enter namespace scope when
1980 tsubsting the function name.
1981 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
1982
1983 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
1984
1985 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
1986 * cvt.c (cp_convert_to_pointer): Add force parameter.
1987 Allow conversions via virtual base if forced.
1988 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
1989 (ocp_convert): Likewise.
1990 * search.c (binfo_from_vbase): Return the virtual base's binfo.
1991 * typeck.c (get_delta_difference): Adjust handling of virtual
1992 bases.
1993
1994 2000-11-26 Mark Mitchell <mark@codesourcery.com>
1995
1996 * tree.c (struct list_hash): Remove.
1997 (list_hash_table): Make it be an htab.
1998 (struct list_proxy): New type.
1999 (list_hash_eq): New function.
2000 (list_hash_pieces): Renamed from ...
2001 (list_hash): ... this.
2002 (list_hash_lookup): Remove.
2003 (list_hash_add): Remove.
2004 (hash_tree_cons): Use the generic hashtable.
2005 (mark_list_hash): Remove.
2006 (init_tree): Create the hashtable.
2007
2008 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
2009
2010 * method.c (build_mangled_C9x_name): Rename to
2011 build_mangled_C99_name. Change C9X references in comments to
2012 refer to C99.
2013
2014 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
2015
2016 * parse.y (unary_expr): Move VA_ARG from here ...
2017 (primary): ... to here.
2018
2019 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
2020
2021 * semantics.c (finish_id_expr): If type is error_mark, return
2022 error_mark.
2023
2024 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
2025
2026 * pt.c (lookup_template_class): Simplify loop exit constructs.
2027 Cope when there is no partial instantiation of a template
2028 template member.
2029
2030 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
2031
2032 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
2033
2034 2000-11-22 Mark Mitchell <mark@codesourcery.com>
2035
2036 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
2037 prefix.
2038
2039 * pt.c (do_decl_instantiate): Explicitly clone constructors and
2040 destructors that haven't already been cloned.
2041
2042 2000-11-20 Richard Henderson <rth@redhat.com>
2043
2044 * parse.y (yyparse_1): Rename the parser entry point.
2045
2046 2000-11-20 Alex Samuel <samuel@codesourcery.com>
2047
2048 * mangle.c (write_name): Use <unscoped-name> for names directly in
2049 function scope.
2050 (write_unscoped_name): Accept names directly in function scope.
2051
2052 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
2053
2054 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
2055 * parse.y (extdef): Add EXPORT reduction.
2056 * spew.c (yylex): Don't skip export here.
2057
2058 2000-11-19 Mark Mitchell <mark@codesourcery.com>
2059
2060 * decl.c (init_decl_processing): Correct name of pure virtual
2061 function under the new ABI.
2062 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
2063 (throw_bad_typeid): Likewise for bad typeid function.
2064
2065 2000-11-18 Mark Mitchell <mark@codesourcery.com>
2066
2067 * decl.c (grokparms): Don't even function types of `void' type,
2068 either.
2069 * mangle.c (write_type): Don't crash when confronted with the
2070 error_mark_node.
2071
2072 * decl.c (grokparms): Don't create parameters of `void' type.
2073
2074 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
2075
2076 * lex.c (mark_impl_file_chain): Delete.
2077 (init_parse): Remove call to ggc_add_string_root. No need to
2078 ggc_strdup a string constant. Do not add impl_file_chain to GC
2079 roots.
2080 (handle_pragma_implementation): No need to ggc_strdup main_filename.
2081
2082 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
2083
2084 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
2085
2086 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
2087
2088 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
2089 * decl.c (grokdeclarator): Don't reject void parms here.
2090 (require_complete_types_for_parms): Simplify, use
2091 complete_type_or_else.
2092 (grokparms): Remove bitrot. Remove funcdef parm.
2093 Deal with ellipsis parm lists here.
2094 * semantics.c (finish_parmlist): Don't append void_list_node
2095 here. Set PARMLIST_ELLIPSIS_P.
2096
2097 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
2098
2099 * typeck2.c (incomplete_type_error): Reorganise to avoid
2100 excessive diagnostics.
2101
2102 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
2103
2104 * lex.c (struct impl_files, internal_filename): Constify a char *.
2105
2106 2000-11-16 Mark Mitchell <mark@codesourcery.com>
2107
2108 * mangle.c (write_special_name_constructor): Don't generate
2109 assembler junk when confronted with an old-style constructor.
2110 (write_special_name_destructor): Likewise.
2111 (mangle_decl_string): Do it here instead.
2112
2113 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
2114
2115 * call.c (op_error): Make error messages clearer.
2116
2117 2000-11-15 Mark Mitchell <mark@codesourcery.com>
2118
2119 * decl.c (wrapup_globals_for_namespace): Don't mark things
2120 TREE_ASM_WRITTEN when they're not.
2121
2122 2000-11-15 Jason Merrill <jason@redhat.com>
2123
2124 * typeck2.c (friendly_abort): Uncount the error before handing
2125 off to fancy_abort.
2126
2127 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
2128
2129 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
2130
2131 2000-11-14 Mark Mitchell <mark@codesourcery.com>
2132
2133 * class.c (build_vtbl_initializer): Fix typo in comment.
2134 * typeck.c (expr_sizeof): Don't crash on errors.
2135
2136 2000-11-14 Jim Wilson <wilson@redhat.com>
2137
2138 * lang-specs.h: Add %2 after %(cc1_options).
2139
2140 2000-11-14 Richard Henderson <rth@redhat.com>
2141
2142 * typeck.c (c_sizeof): Be strict about casting result value
2143 back to c_size_type_node.
2144 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
2145
2146 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
2147
2148 * typeck.c (build_unary_op): Use boolean_increment from
2149 c-common.c, moving the relevant code there.
2150
2151 2000-11-11 Jason Merrill <jason@redhat.com>
2152
2153 * typeck.c (mark_addressable): Don't call put_var_into_stack.
2154
2155 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
2156 in inlines.
2157
2158 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2159
2160 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
2161 * lex.c (copy_lang_decl): Likewise.
2162
2163 2000-11-09 Mark Mitchell <mark@codesourcery.com>
2164
2165 * dump.c (cp_dump_tree): Don't dump function bodies here.
2166
2167 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2168 (dump.o): Update dependency list.
2169 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
2170 (flag_dump_translation_unit): Likewise.
2171 (CP_TYPE_QUALS): Adjust definition.
2172 (DECL_C_BIT_FIELD): Remove.
2173 (SET_DECL_C_BIT_FIELD): Likewise.
2174 (CLEAR_DECL_C_BIT_FIELD): Likewise.
2175 (add_maybe_template): Likewise.
2176 (strip_array_types): Likewise.
2177 (dump_node_to_file): Likewise.
2178 (cp_dump_tree): New function.
2179 * decl.c (init_decl_processing): Set lang_dump_tree.
2180 * decl2.c (flag_dump_translation_unit): Remove.
2181 * dump.c: Move most of it to ../c-dump.c.
2182 (cp_dump_tree): New function.
2183 * pt.c (add_maybe_template): Remove.
2184 * typeck.c (strip_array_types): Likewise.
2185
2186 2000-11-07 Eric Christopher <echristo@redhat.com>
2187
2188 * decl.c (init_decl_processing): Change definition of
2189 __wchar_t to wchar_t. Remove artificial declaration of
2190 wchar_t.
2191 * lex.c: Change instances of __wchar_t to wchar_t.
2192
2193 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
2194
2195 * lex.c (do_identifier): Don't lookup_name for operators.
2196 * parse.y (operator): Save looking_for_typename.
2197 (unoperator): Restore it.
2198 * spew.c (frob_opname): Use nth_token for lookahead.
2199
2200 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
2201
2202 * decl.c (grok_op_properties): Always use coerce_new_type and
2203 coerce_delete_type.
2204 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
2205 exception specification. Tidy up.
2206 (coerce_delete_type): Preserve exception specification. Tidy up.
2207
2208 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
2209
2210 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
2211 (push_binding_level), error.c (cp_tree_printer), pt.c
2212 (process_partial_specialization, tsubst_template_arg_vector),
2213 search.c (lookup_member): Use memset () instead of bzero ().
2214
2215 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
2216
2217 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
2218
2219 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
2220
2221 * Make-lang.in (c++.distdir): Remove.
2222
2223 2000-11-04 Mark Mitchell <mark@codesourcery.com>
2224
2225 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
2226 declarations from different namespaces to be combined.
2227
2228 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
2229
2230 * decl.c: Include tm_p.h.
2231
2232 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
2233
2234 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
2235
2236 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
2237
2238 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
2239 (build_overload_value), repo.c (open_repo_file), xref.c
2240 (open_xref_file): Use strchr () and strrchr () instead of index ()
2241 and rindex ().
2242
2243 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
2244
2245 * call.c (build_over_call): Call fold on the CALL_EXPR.
2246
2247 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
2248
2249 * error.c (dump_template_decl): Separate template hearders with
2250 space not comma.
2251
2252 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
2253
2254 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
2255 TS_* flags with corresponding TFF_*. Adjust prototypes of
2256 functions (which used to take a tree_string_flags) to take an int.
2257
2258 * cp-tree.h (enum tree_string_flags): Remove
2259 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
2260 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
2261 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
2262 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
2263 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
2264 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
2265 (type_as_string, decl_as_string, expr_as_string,
2266 context_as_string): Adjust prototype.
2267
2268 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
2269 instead of TS_PLAIN.
2270
2271 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
2272 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
2273 plain `0'.
2274
2275 2000-10-30 Mark Mitchell <mark@codesourcery.com>
2276
2277 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
2278 (linkage_kind): New enumeration.
2279 (decl_linkage): New function.
2280 * decl2.c (comdat_linkage): Extend comment.
2281 * error.c (dump_function_decl): Print the arguments used to
2282 instantiate a template, even when not printing the type of the
2283 function.
2284 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
2285 not TREE_PUBLIC, to test for external linkage.
2286 * tree.c (decl_linkage): New function.
2287
2288 2000-10-28 Mark Mitchell <mark@codesourcery.com>
2289
2290 * pt.c (instantiate_decl): Always instantiate static data members
2291 initialized in-class.
2292
2293 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
2294
2295 * Make-lang.in: Move all build rules here from Makefile.in,
2296 adapt to new context. Wrap all rules that change the current
2297 directory in parentheses. Expunge all references to $(P).
2298 When one command depends on another and they're run all at
2299 once, use && to separate them, not ;. Add OUTPUT_OPTION to
2300 all object-file generation rules. Delete obsolete variables.
2301
2302 * Makefile.in: Delete.
2303 * config-lang.in: Delete outputs= line.
2304
2305 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
2306
2307 * error.c (dump_function_decl): Print no space between
2308 `ptr-operator' the `type-specifier' of the return type.
2309 (dump_type_prefix): Make sure we put space at the appropriate
2310 place.
2311
2312 2000-10-23 Jason Merrill <jason@redhat.com>
2313
2314 * call.c (equal_functions): Also call decls_match for extern "C" fns.
2315
2316 2000-10-22 Jason Merrill <jason@redhat.com>
2317
2318 * call.c (build_conditional_expr): Use ocp_convert to force
2319 rvalue conversion.
2320
2321 2000-10-22 Mark Mitchell <mark@codesourcery.com>
2322
2323 * call.c (standard_conversion): Use RVALUE_CONVs for all
2324 expressions that satisfy lvalue_p, not just those that satisfy
2325 real_lvalue_p.
2326
2327 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
2328
2329 * typeck.c (c_sizeof): Return an expression of `size_t' type,
2330 not one with TYPE_IS_SIZETYPE set.
2331 (dubious_conversion_warnings): Remove special-case code.
2332
2333 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
2334
2335 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
2336 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
2337 (dump_type_prefix): Print vector-of-int as 'int vector'.
2338 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
2339 * tree.c (walk_tree): Handle VECTOR_TYPE.
2340
2341 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
2342
2343 2000-10-21 Jason Merrill <jason@redhat.com>
2344
2345 * parse.y (operator): Set got_object from got_scope.
2346 Set looking_for_typename.
2347 * decl.c (lookup_name_real): Clear val after setting from_obj.
2348 Reorganize diagnostic.
2349
2350 2000-10-20 Jason Merrill <jason@redhat.com>
2351
2352 * tree.c (walk_tree): Don't walk into default args.
2353
2354 * error.c (dump_expr): Use host_integerp.
2355
2356 2000-10-20 David Edelsohn <edelsohn@gnu.org>
2357
2358 * typeck2.c (abstract_virtuals_error): Use "because" instead of
2359 "since" in error message.
2360
2361 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2362
2363 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
2364
2365 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
2366
2367 * decl.c (revert_static_member_fn): Fixed typo.
2368
2369 2000-10-19 Mark Mitchell <mark@codesourcery.com>
2370
2371 * class.c (subobject_offset_fn): New type.
2372 (dfs_record_base_offsets): Remove.
2373 (record_base_offsets): Likewise.
2374 (dfs_search_base_offsets): Likewise.
2375 (record_subobject_offset): New function.
2376 (check_subobject_offset): Likewise.
2377 (walk_subobject_offsets): Likewise.
2378 (record_subobject_offsets): Likewise.
2379 (layout_conflict_p): Reimplement.
2380 (layout_nonempty_base_or_field): Correct handling of type
2381 conflicts during layout.
2382 (layout_empty_base): Likewise.
2383 (build_base_field): Adjust to handle new representation of empty
2384 base offset table.
2385 (build_base_fields): Likewise.
2386 (layout_virtual_bases): Likewise.
2387 (splay_tree_compare_integer_csts): New function.
2388 (layout_class_type): Use a splay_tree, rather than a varray, to
2389 represent the offsets of empty bases.
2390
2391 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
2392 * decl.c (select_decl): Don't return declarations that are
2393 DECL_ANTICIPATED.
2394
2395 2000-10-18 Mark Mitchell <mark@codesourcery.com>
2396
2397 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
2398 (fake_std_node): New macro.
2399 * decl.c (in_std): Rename to ...
2400 (in_fake_std): ... this.
2401 (flag_no_builtin): Remove.
2402 (flag_no_nonansi_builtin): Likewise.
2403 (walk_namespaces_r): Use fake_std_node.
2404 (push_namespace): Use std_identifier.
2405 (pop_namespace): Use in_fake_std.
2406 (lookup_name_real): Use fake_std_node.
2407 (init_decl_processing): When -fhonor-std, create the `std'
2408 namespace. Don't create a dummy fake_std_node in that case.
2409 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
2410 (builtin_function): Put builtins whose names don't begin
2411 with `_' in the std namespace.
2412 * decl2.c (flag_no_builtin): Remove.
2413 (flag_no_nonansi_builtin): Likewise.
2414 (set_decl_namespace): Use fake_std_node.
2415 (validate_nonmember_using_decl): Likewise.
2416 (do_using_directive): Likewise.
2417 (handle_class_head): Likewise.
2418 * dump.c (dequeue_and_dump): Likewise.
2419 * except.c (init_exception_processing): Use std_identifier.
2420 * init.c (build_member_call): Use fake_std_node.
2421 * rtti.c (init_rtti_processing): Use std_identifier.
2422
2423 2000-10-17 Mark Mitchell <mark@codesourcery.com>
2424
2425 * cp-tree.h (back_end_hook): Remove declaration.
2426 * decl2.c (back_end_hook): Remove definition.
2427
2428 * dump.c (dequeue_and_dump): Dump TREE_USED.
2429
2430 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
2431
2432 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
2433
2434 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
2435
2436 * decl.c (WINT_TYPE): Define.
2437 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
2438 c_size_type_node, signed_size_type_node and wint_type_node.
2439
2440 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
2441
2442 * decl2.c (warn_missing_format_attribute): New variable.
2443 (lang_decode_option): Decode -Wmissing-format-attribute.
2444
2445 2000-10-16 Mark Mitchell <mark@codesourcery.com>
2446
2447 * typeck.c (qualify_type): Remove.
2448 (composite_pointer_type): Fix handling of conversions to `cv void*'.
2449
2450 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2451
2452 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
2453
2454 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2455
2456 * Makefile.in (parse.c, parse.h): Create atomically.
2457
2458 2000-10-12 Mark Mitchell <mark@codesourcery.com>
2459
2460 * class.c (current_obstack): Remove.
2461 * decl.c (ggc_p): Remove.
2462 (start_decl): Don't use decl_tree_cons.
2463 (grokdeclarator): Don't use build_decl_list.
2464 (start_function): Don't use decl_tree_cons.
2465 (finish_function): Don't mess with obstacks.
2466 * decl2.c (grok_x_components): Don't use build_decl_list.
2467 * lex.c (make_call_declarator): Don't call decl_tree_cons.
2468 (implicitly_declare_fn): Don't call build_decl_list.
2469 * parse.y (frob_specs): Don't call build_decl_list or
2470 decl_tree_cons.
2471 (expr_or_declarator_intern): Don't call decl_tree_cons.
2472 (primary): Don't call build_decl_list.
2473 (fcast_or_absdcl): Likewise.
2474 (typed_declspecs): Don't call decl_tree_cons.
2475 (reserved_declspecs): Don't call build_decl_list.
2476 (declmods): Likewise.
2477 (reserved_typespecquals): Likewise.
2478 (aggr): Likewise.
2479 (new_type_id): Likewise.
2480 (cv_qualifiers): Likewise.
2481 (after_type_declarator_intern): Likewise.
2482 (notype_declarator_intern): Likewise.
2483 (absdcl_intern): Likewise.
2484 (named_parm): Likewise.
2485 * pt.c (most_specialized_class): Likewise.
2486 * repo.c (temporary_obstack): Make it a structure, not a pointer.
2487 (init_repo): Initialize it.
2488 * search.c (current_obstack): Remove.
2489 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
2490
2491 2000-10-09 Richard Henderson <rth@cygnus.com>
2492
2493 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
2494 (c++ language support bits for libgcc): Remove.
2495 (c++.clean): Remove cplib2.txt cleanup.
2496 * config-lang.in (headers, lib2funcs): Remove.
2497
2498 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
2499 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
2500 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
2501 * inc/new.h, inc/typeinfo: Remove files.
2502
2503 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
2504
2505 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
2506 defined.
2507 (init_decl_processing): Initialize intmax_type_node and
2508 uintmax_type_node.
2509
2510 2000-10-06 Richard Henderson <rth@cygnus.com>
2511
2512 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
2513 (original_result_rtx): Remove.
2514 * decl.c (save_function_data): Don't clear x_result_rtx.
2515 (mark_lang_function): Don't mark it either.
2516 * expr.c (fixup_result_decl): Remove.
2517 * semantics.c (genrtl_named_return_value): Frob the return decl
2518 before calling emit_local_var.
2519 (genrtl_finish_function): Don't call fixup_result_decl.
2520 Always emit the jump to return_label.
2521
2522 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
2523
2524 * pt.c (lookup_template_class): Set current access for enum.
2525 (tsubst_enum): Set file & line for enum decl.
2526
2527 * spew.c (yylex): Remove unused variable.
2528
2529 2000-10-05 Richard Henderson <rth@cygnus.com>
2530
2531 * semantics.c (genrtl_finish_function): Don't init or check
2532 can_reach_end; remove noreturn and return value checks.
2533
2534 2000-10-05 Tom Tromey <tromey@cygnus.com>
2535
2536 * init.c (build_java_class_ref): Use `build_static_name' with a
2537 suffix, not a prefix, to build the class object's name.
2538
2539 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2540
2541 * cp-tree.h (access_kind): Fix comment typo.
2542 * decl2.c (grokfield): Fix diagnostic typo.
2543 * semantics.c (finish_template_type): Fix comment typo.
2544 (finish_qualified_object_call_expr): Likewise.
2545
2546 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2547
2548 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
2549 tsubsting fails.
2550
2551 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2552
2553 * spew.c (frob_id): New static function.
2554 (frob_opname): Use it.
2555 (yylex): Use it.
2556
2557 2000-10-01 Mark Mitchell <mark@codesourcery.com>
2558
2559 * decl.c (lang_mark_false_label_stack): Remove.
2560 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
2561
2562 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
2563
2564 * gxxint.texi: Use @email for formatting email addresses.
2565
2566 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
2567
2568 * error.c: Remove direct obstack manipulation. Replace with
2569 output_buffer-based formatting. Adjust calls to removed macros.
2570 (obstack_chunk_alloc, obstack_chunk_free): Remove.
2571 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
2572 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
2573
2574 2000-09-24 Mark Mitchell <mark@codesourcery.com>
2575
2576 * ir.texi: Move to ../c-tree.texi.
2577
2578 2000-09-20 Jason Merrill <jason@redhat.com>
2579
2580 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
2581
2582 2000-09-21 Andreas Jaeger <aj@suse.de>
2583
2584 * errfn.c: Move declaration of cp_printer and cp_printers to ...
2585 * cp-tree.h: ... here.
2586
2587 * error.c: Remove declaration of cp_printer.
2588
2589 2000-09-20 Mark Mitchell <mark@codesourcery.com>
2590
2591 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
2592
2593 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
2594
2595 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
2596 users.
2597
2598 2000-09-18 Mark Mitchell <mark@codesourcery.com>
2599
2600 * decl.c (start_function): Robustify.
2601
2602 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2603
2604 * cp-tree.h (check_function_format): Accept a `status' parameter.
2605
2606 * call.c, typeck.c: Updates calls to `check_function_format'.
2607
2608 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
2609
2610 * decl2.c (handle_class_head): Always push some scope even
2611 in the error case.
2612
2613 2000-09-16 Mark Mitchell <mark@codesourcery.com>
2614
2615 * cp-tree.h (struct cp_language_function): Remove
2616 x_scope_stmt_stack and name_declared.
2617 (current_scope_stmt_stack): Remove.
2618 (function_name_declared_p): New macro.
2619 (struct lang_decl_flags): Use c_lang_decl as a base class.
2620 (context): Remove.
2621 (struct lang_decl): Replace saved_tree with context.
2622 (DECL_FRIEND_CONTEXT): Adjust accordingly.
2623 (SET_DECL_FRIEND_CONTEXT): Likewise.
2624 (DECL_VIRTUAL_CONTEXT): Likewise.
2625 (DECL_SAVED_TREE): Remove.
2626 (C_DECLARED_LABEL_FLAG): Likewise.
2627 (cplus_expand_expr_stmt): Don't declare.
2628 (add_decl_stmt): Likewise.
2629 (add_scope_stmt): Likewise.
2630 * decl.c (mark_stmt_tree): Remove.
2631 (case_compare): Likewise.
2632 (finish_case_label): Use c_add_case_label.
2633 (init_decl_processing): Set more language-specific hooks.
2634 (build_enumerator): Fix typo in comment.
2635 (cplus_expand_expr_stmt): Remove.
2636 (mark_lang_function): Use mark_c_language_function.
2637 (lang_mark_tree): Use c_mark_lang_decl.
2638 * decl2.c: Change order of inclusion.
2639 * except.c: Likewise.
2640 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
2641 back on c_expand_expr.
2642 * friend.c: Include expr.h.
2643 * init.c: Change order of inclusion.
2644 * Makefile.in: Update dependencies.
2645 * lex.h (free_lang_decl_chain): Remove.
2646 * optimize.c (maybe_clone_body): Use function_name_declared_p.
2647 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
2648 it doesn't exist.
2649 (instantiate_decl): Use function_name_declared_p.
2650 * semantics.c (lang_expand_expr_stmt): Remove.
2651 (set_current_function_name_declared): Likewise.
2652 (current_function_name_declared): Likewise.
2653 (begin_compound_stmt): Use function_name_declared_p.
2654 (add_decl_stmt): Remove.
2655 (setup_vtbl_ptr): Use function_name_declared_p.
2656 (add_scope_stmt): Remove.
2657 (current_scope_stmt_stack): New function.
2658 (cp_expand_stmt): Don't handle SCOPE_STMTs.
2659 (expand_body): Use function_name_declared_p.
2660 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
2661 * typeck.c: Change order of includes.
2662 (convert_sequence): Remove.
2663
2664 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
2665
2666 * lex.c (reswords): Add _Complex.
2667
2668 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2669
2670 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
2671
2672 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
2673
2674 * init.c (begin_init_stmts): Don't use // comments.
2675
2676 2000-09-12 Jason Merrill <jason@redhat.com>
2677
2678 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
2679 all non-extern arrays.
2680
2681 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
2682 typenames, too. Downgrade complaint to pedwarn.
2683 (xref_tag): Warn about surprising behavior of 'friend struct T'.
2684 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
2685 'class This::Inherited'.
2686
2687 2000-09-12 Mark Mitchell <mark@codesourcery.com>
2688
2689 * decl.c (finish_case_label): Given the LABEL_DECL a
2690 DECL_CONTEXT.
2691
2692 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
2693
2694 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
2695 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
2696 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
2697 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
2698 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
2699 New macros.
2700 (sorry_for_unsupported_tree, print_scope_operator,
2701 print_left_paren, print_right_paren, print_left_bracket,
2702 print_right_bracket, print_whitespace): Likewise.
2703 (aggr_variety): Rename to class_key_or_enum.
2704 (print_type): Rename to print_type_id.
2705 (print_type_specifier_seq, print_simple_type_specifier,
2706 print_elaborated_type_specifier,
2707 print_rest_of_abstract_declarator,
2708 print_parameter_declaration_clause, print_exception_specification,
2709 print_nested_name_specifier, print_template_id,
2710 typedef_original_name, print_template_argument_list_start,
2711 print_template_argument_list_end): New functions.
2712
2713 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
2714
2715 * ir.texi: Add more documentation.
2716
2717 2000-09-11 Mark Mitchell <mark@codesourcery.com>
2718
2719 * cp-tree.h (struct saved_scope): Remove x_function_parms.
2720 (current_function_parms): Don't define.
2721 (struct cp_language_function): Remove parms_stored.
2722 (current_function_just_assigned_this): Don't define.
2723 (current_function_parms_stored): Likewise.
2724 (static_ctors): Declare.
2725 (static_dtors): Likewise.
2726 (SF_EXPAND): Don't define.
2727 (expand_start_early_try_stmts): Remove declaration.
2728 (store_parm_decls): Likewise.
2729 * decl.c (static_ctors): Don't declare.
2730 (static_dtors): Likewise.
2731 (struct binding_level): Remove this_block.
2732 (poplevel): Remove dead code.
2733 (set_block): Likewise.
2734 (mark_binding_level): Don't mark this_block.
2735 (mark_saved_scope): Don't mark x_function_parms.
2736 (init_decl_processing): Don't add current_function_parms as a GC
2737 root.
2738 (check_function_type): Change prototype.
2739 (start_function): Remove RTL-generation code.
2740 (expand_start_early_try_stmts): Remove.
2741 (store_parm_decls): Give it internal linkage. Remove
2742 RTL-generation code.
2743 (finish_function): Remove RTL-generation code.
2744 * decl2.c (static_ctors): Fix formatting.
2745 (static_dtors): Likewise.
2746 * method.c (use_thunk): Don't call store_parm_decls.
2747 (synthesize_method): Likewise.
2748 * optimize.c (maybe_clone_body): Likewise.
2749 * parse.y (fn.def2): Likewise.
2750 (.set_base_init): Likewise.
2751 (nodecls): Likewise.
2752 * pt.c (instantiate_decl): Likewise.
2753 * rtti.c (synthesize_tinfo_fn): Likewise.
2754 * semantics.c (genrtl_try_block): Simplify.
2755 (expand_body): Use genrtl_start_function and
2756 genrtl_finish_function.
2757 (genrtl_start_function): New function.
2758 (genrtl_finish_function): Likewise.
2759
2760 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
2761
2762 * error.c (cp_tree_printer, case 'P'): Append break.
2763
2764 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
2765
2766 * cp-tree.h (frob_opname): Declare.
2767 * parse.y (saved_scopes): New static variable.
2768 (cp_parse_init): Adjust.
2769 (do_id): If lastiddecl is NULL, do do_identifier.
2770 (operator): Save scope information.
2771 (unoperator): New reduction. Restore scope information.
2772 (operator_name): Append unoperator. Call frob_opname.
2773 * spew.c (frob_opname): Define.
2774
2775 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
2776
2777 * decl.c, rtti.c: Include defaults.h if not already included.
2778 Don't define the *_TYPE_SIZE macros.
2779
2780 2000-09-09 Mark Mitchell <mark@codesourcery.com>
2781
2782 * cp-tree.h (push_switch): Change prototype.
2783 (check_cp_case_value): Remove declaration.
2784 (decl_constant_value): Likewise.
2785 * decl.c (struct cp_switch): Add switch_stmt and cases.
2786 (case_compare): New function.
2787 (push_switch): Set switch_stmt. Initialize cases.
2788 (pop_switch): Clean up cases.
2789 (define_case_label): Rename to ...
2790 (finish_case_label): ... this. Do semantic analysis for case
2791 labels here.
2792 (start_function): Correct comment.
2793 * decl2.c (check_cp_case_value): Remove.
2794 * expr.c (do_case): Remove.
2795 * pt.c (tsubst_expr): Adjust call to finish_case_label.
2796 * semantics.c (genrtl_do_poplevel): Remove declaration.
2797 (RECHAIN_STMTS): Remove.
2798 (finish_break_stmt): Use build_break_stmt.
2799 (finish_continue_stmt): Use build_continue_stmt.
2800 (finish_switch_cond): Adjust condition here, rater than in
2801 c_expand_start_case.
2802 (finish_case_label): Remove.
2803 * typeck.c (c_expand_return): Remove.
2804 (c_expand_start_case): Likewise.
2805
2806 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
2807
2808 * ir.texi: Document type nodes.
2809
2810 2000-09-06 Mark Mitchell <mark@codesourcery.com>
2811
2812 * cp-tree.h (init_cp_semantics): Declare.
2813 (genrtl_try_block): Don't declare.
2814 (genrtl_handler): Likewise.
2815 (genrtl_catch_block): Likewise.
2816 (genrtl_ctor_stmt): Likewise.
2817 (genrtl_subobject): Likewise.
2818 (genrtl_do_poplevel): Likewise.
2819 (genrtl_named_return_value): Likewise.
2820 * lex.c (init_parse): Call init_cp_semantics.
2821 * semantics.c (genrtl_try_block): Give it internal linkage.
2822 (genrtl_handler): Likewise.
2823 (genrtl_catch_block): Likewise.
2824 (genrtl_ctor_stmt): Likewise.
2825 (genrtl_subobject): Likewise.
2826 (genrtl_do_poplevel): Likewise.
2827 (genrtl_named_return_value): Likewise.
2828 (lang_expand_stmt): Rename to ...
2829 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
2830 (init_cp_semantics): Define.
2831
2832 * decl.c (initialize_local_var): Remove RTL-generating code.
2833 * semantics.c (genrtl_try_block): Fix formatting.
2834
2835 Move statement-tree facilities from C++ to C front-end.
2836 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
2837 (void_zero_node): Remove.
2838 (stmt_tree): Likewise.
2839 (scope_chain): Adjust.
2840 (language_function): Rename to cp_language_function.
2841 (cp_function_chain): Adjust.
2842 (current_stmt_tree): Remove.
2843 (last_tree): Likewise.
2844 (last_expr_type): Likewise.
2845 (struct lang_decl): Adjust.
2846 (STMT_IS_FULL_EXPR_P): Remove.
2847 (add_tree): Remove.
2848 (begin_stmt_tree): Likewise.
2849 (finish_stmt_tree): Likewise.
2850 (walk_tree_fn): Likewise.
2851 (walk_stmt_tree): Likewise.
2852 * class.c (finish_struct): Replace use of add_tree with add_stmt.
2853 * decl.c (mark_stmt_tree): Adjust type.
2854 (init_decl_processing): Don't build void_zero_node.
2855 (initialize_local_var): Adjust usage of current_stmt_tree.
2856 (finish_enum): Use add_stmt, not add_tree.
2857 (save_function_data): Adjust use of language_function.
2858 (finish_constructor_body): Use add_stmt, not add_tree.
2859 (finish_destructor_body): Likewise.
2860 (push_cp_function_context): Adjust use of language_function.
2861 (pop_cp_function_context): Likewise.
2862 (mark_lang_function): Likewise.
2863 (mark_cp_function_context): Likewise.
2864 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
2865 (build_vec_init): Likewise.
2866 * semantics.c (SET_LAST_STMT): Remove.
2867 (RECHAIN_STMTS): Don't use it.
2868 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
2869 (current_stmt_tree): Define.
2870 (add_tree): Remove.
2871 (finish_goto_stmt): Use add_stmt, not add_tree.
2872 (finish_expr_stmt): Likewise.
2873 (begin_if_stmt): Likewise.
2874 (finish_then_clause): Likewise.
2875 (begin_while_stmt): Likewise.
2876 (begin_do_stmt): Likewise.
2877 (finish_return_stmt): Likewise.
2878 (begin_for_stmt): Likewise.
2879 (finish_break_stmt): Likewise.
2880 (finish_continue_stmt): Likewise.
2881 (begin_switch_stmt): Likewise.
2882 (finish_case_label): Likewise.
2883 (begin_try_block): Likewise.
2884 (begin_function_try_block): Likewise.
2885 (begin_handler): Likewise.
2886 (begin_catch_block): Likewise.
2887 (begin_compound_stmt): Likewise.
2888 (begin_asm_stmt): Likewise.
2889 (finish_asm_stmt): Likewise.
2890 (finish_label_stmt): Likewise.
2891 (add_decl_stmt): Likewise.
2892 (finish_subobject): Likewise.
2893 (finish_decl_cleanup): Likewise.
2894 (finish_named_return_value): Likewise.
2895 (setup_vtbl_ptr): Likewise.
2896 (add_scope_stmt): Likewise.
2897 (finish_stmt_expr): Likewise.
2898 (prune_unused_decls): Remove.
2899 (begin_stmt_tree): Likewise.
2900 (finish_stmt_tree): Likewise.
2901 (prep_stmt): Adjust use of current_stmt_tree.
2902 (lang_expand_stmt): Likewise.
2903 * tree.c (statement_code_p): Remove.
2904 (cp_statement_code_p): New function.
2905 (walk_stmt_tree): Remove.
2906 (init_tree): Set lang_statement_code_p.
2907
2908 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
2909
2910 Integrated preprocessor.
2911
2912 * Make-lang.in, Makefile.in: Remove all references to input.c,
2913 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
2914 * gxx.gperf, hash.h, input.c: Delete.
2915 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
2916 initialized properly.
2917
2918 * class.c (fixup_pending_inline): Take a tree, not a
2919 struct pending_inline *. All callers changed.
2920 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
2921 RID_PROTECTED entries in ridpointers[] array here.
2922 * decl.c (duplicate_decls): Do not refer to struct
2923 pending_inline.
2924 (record_builtin_type, init_decl_processing): Use RID_MAX not
2925 CP_RID_MAX.
2926 (grokdeclarator): Use C_IS_RESERVED_WORD.
2927 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
2928 cpplib.
2929 (grok_x_components): Do not inspect pending_inlines chain.
2930
2931 * cp-tree.h (struct lang_identifier): Add rid_code entry.
2932 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
2933 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
2934 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
2935 TIME_IDENTIFIER_FILEINFO): Kill.
2936 Update prototypes.
2937 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
2938 single 32-bit word.
2939 * parse.y: Call do_pending_inlines unconditionally.
2940 reinit_parse_for_method is now snarf_method. fn.defpen is no
2941 longer necessary. Remove unnecessary <itype> annotation on
2942 SCOPE. Do not refer to end_of_file or struct pending_inline.
2943 * semantics.c (begin_inline_definitions): Call
2944 do_pending_inlines unconditionally.
2945
2946 * lex.c: Remove all code now shared with C front end.
2947 Initialize cpplib properly if USE_CPPLIB. Put reserved words
2948 into the get_identifier table. Rewrite pragma handling to
2949 work with the registry. Move code to save tokens for later
2950 processing to spew.c.
2951
2952 * spew.c: Rewrite everything in terms of token streams instead
2953 of text. Move routines here from lex.c / input.c as
2954 appropriate. GC-mark trees hanging off the pending inlines
2955 chain.
2956
2957 2000-09-06 Mark Mitchell <mark@codesourcery.com>
2958
2959 * NEWS: Mention that the named return value extension has been
2960 deprecated.
2961 * cp-tree.h (original_result_rtx): Define.
2962 (TREE_REFERENCE_EXPR): Remove.
2963 (DECL_VPARENT): Likewise.
2964 (pushdecl_nonclass_level): Likewise.
2965 (store_return_init): Likewise.
2966 (reinit_lang_specific): Likewise.
2967 (genrtl_named_return_value): Change prototype.
2968 * decl.c (original_result_rtx): Remove.
2969 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
2970 Do not generate RTL for local variables here.
2971 (store_return_init): Remove.
2972 * semantics.c (genrtl_named_return_value): Simplify. Fold in
2973 store_return_init.
2974 (finish_named_return_value): Adjust accordingly. Warn that this
2975 extension is deprecated.
2976 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
2977
2978 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
2979
2980 * pt.c (type_unification_real): Replace switch with if.
2981 (unify): Tsubst non-type parms before comparing.
2982
2983 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
2984
2985 * error.c (dump_typename): New function, broken out of ...
2986 (dump_type): ... here. Use it.
2987 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
2988
2989 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
2990
2991 * init.c (build_offset_ref): Deal with namespace scoped
2992 TEMPLATE_ID_EXPRs.
2993
2994 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
2995
2996 * class.c (resolve_address_of_overloaded_function): Add
2997 explanation message.
2998 * decl.c (define_case_label): Reformat explanation.
2999 * decl2.c (finish_static_data_member_decl): Likewise.
3000 (grokfield): Likewise.
3001 * friend.c (do_friend): Likewise.
3002
3003 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
3004
3005 * tree.c (walk_tree): Expose tail recursion.
3006 (walk_stmt_tree): New function.
3007 * cp-tree.h: Prototype walk_stmt_tree.
3008 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
3009 the BLOCKs directly. If a BLOCK has no variables after
3010 pruning, discard it.
3011 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
3012 restore the line number.
3013
3014 2000-09-05 Mark Mitchell <mark@codesourcery.com>
3015
3016 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
3017 (pt.o): Remove dependency on HTAB_H.
3018 * cp-tree.h: Include hashtab.h.
3019 (walk_tree): Change prototype.
3020 (walk_tree_without_duplicates): New function.
3021 * decl.c (check_default_argument): Use it.
3022 * optimize.c (remap_decl): Adjust calls to walk_tree.
3023 (copy_body): Likewise.
3024 (expand_calls_inline): Likewise.
3025 (calls_setjmp_p): Use walk_tree_without_duplicates.
3026 * pt.c: Don't include hashtab.h.
3027 (for_each_template_parm): Use walk_tree_without_duplicates.
3028 * semantics.c (finish-stmt_tree): Likewise.
3029 (expand_body): Likewise.
3030 * tree.c (walk_tree): Add additional parameter.
3031 (walk_tree_without_duplicates): New function.
3032 (count_trees): Use it.
3033 (verify_stmt_tree): Adjust call to walk_tree.
3034 (find_tree): Use walk_tree_without_duplicates.
3035 (no_linkage_check): Likewise.
3036 (break_out_target_exprs): Adjust call to walk_tree.
3037 (cp_unsave): Likewise.
3038
3039 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3040
3041 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
3042 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
3043 * cp-tree.h (TYPE_BINFO): Adjust comment.
3044 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
3045 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
3046 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
3047 (TYPE_TEMPLATE_INFO): Likewise.
3048 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
3049 * class.c (push_nested_class): Likewise.
3050 * decl.c (lookup_name_real): Likewise.
3051 (grokdeclarator): Likewise.
3052 (grok_op_properties): Likewise.
3053 (xref_tag): Likewise.
3054 (xref_basetypes): Likewise.
3055 * decl2.c (constructor_name_full): Likewise.
3056 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
3057 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
3058 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
3059 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3060 (dump_type_suffix): Likewise.
3061 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
3062 instead.
3063 (get_aggr_from_typedef): Likewise.
3064 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
3065 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3066 (write_template_parm): Likewise.
3067 (write_template_template_parm): Check tree code instead of
3068 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3069 * method.c (build_overload_nested_name): Add
3070 BOUND_TEMPLATE_TEMPLATE_PARM.
3071 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
3072 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3073 * pt.c (convert_template_argument): Check tree code instead of
3074 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3075 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
3076 (for_each_template_parm): Adjust comment.
3077 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
3078 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3079 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
3080 template_args_equal to compare template template parameter cases.
3081 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3082 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
3083 instead.
3084 * tree.c (copy_template_template_parm): Decide whether to create
3085 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
3086 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3087 (copy_tree_r): Likewise.
3088 * typeck.c (comptypes): Likewise. Check tree code instead of
3089 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3090
3091 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
3092
3093 * decl.c (finish_function): Move the code for handling functions
3094 marked with the constructor and destructor attributes inside the
3095 expand_p block.
3096
3097 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
3098
3099 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
3100
3101 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
3102
3103 * pt.c (lookup_template_class): Remove abort.
3104 * tree.c (get_type_decl): Allow error_mark_node.
3105
3106 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
3107
3108 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
3109 TEMPLATE_ID_EXPRs.
3110
3111 2000-09-03 Mark Mitchell <mark@codesourcery.com>
3112
3113 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
3114 new ABI mangling.
3115
3116 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
3117
3118 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
3119 union tag mismatch error reporting.
3120
3121 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
3122
3123 * call.c (build_scoped_method_call): Check it is not a namespace.
3124
3125 2000-08-30 Jason Merrill <jason@redhat.com>
3126
3127 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
3128
3129 * tree.c (bot_manip): Check TREE_CONSTANT rather than
3130 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
3131 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
3132
3133 * decl.c (start_function): Always call make_function_rtl.
3134
3135 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
3136
3137 * semantics.c (prune_unused_decls): New function.
3138 (finish_stmt_tree): Call it via walk_tree.
3139
3140 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
3141
3142 * class.c (build_secondary_vtable): Constify a char *.
3143 * decl.c (init_decl_processing): Initialize function_id_node,
3144 pretty_function_id_node, and func_id_node.
3145 * input.c (struct input_source): Constify 'str'.
3146 (feed_input): Constify first argument.
3147 * mangle.c (write_identifier): Constify argument.
3148 * pt.c (mangle_class_name_for_template): Constify argument.
3149
3150 2000-08-29 Mark Mitchell <mark@codesourcery.com>
3151
3152 * typeck.c (mark_addressable): Remove code that pokes around in
3153 RTL.
3154
3155 2000-08-28 Jason Merrill <jason@redhat.com>
3156
3157 * lex.c (file_name_nondirectory): Move to toplev.c.
3158
3159 * cp-tree.h (LOCAL_CLASS_P): New macro.
3160 * class.c (finish_struct_1): Use it.
3161
3162 2000-08-27 Alex Samuel <samuel@codesourcery.com>
3163
3164 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
3165 (write_encoding): Pass another argument to write_name.
3166 (write_name): Add ignore_local_scope parameter. Fix handling of
3167 local names.
3168 (write_nested_name): Use write_unqualified_name.
3169 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
3170 (write_template_prefix): Use write_unqualified_name.
3171 (write_component): Remove.
3172 (write_local_name): Add parameter. Use direct local entity to
3173 discriminator calculation.
3174 (write_class_enum_type): Pass another argument to write_name.
3175 (write_template_template_arg): Likewise.
3176 (make_guard_variable): Likewise.
3177
3178 2000-08-27 Jason Merrill <jason@redhat.com>
3179
3180 * decl.c (pushdecl): Matching decls for local externs are found in
3181 the current level. Propagate linkage information from previous
3182 declarations.
3183
3184 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
3185
3186 * ir.texi (Expressions): Fix typo.
3187
3188 2000-08-25 Greg McGary <greg@mcgary.org>
3189
3190 * tree.c (init_tree): Use ARRAY_SIZE.
3191
3192 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
3193
3194 * error.c (cp_tree_printer): Rework.
3195
3196 2000-08-25 Mark Mitchell <mark@codesourcery.com>
3197
3198 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
3199 dyn-string.o.
3200 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
3201 (cp-demangle.o): Remove target.
3202 (dyn-string.o): Likewise.
3203
3204 * decl.c (grokfndecl): Require that `main' return an `int'.
3205 * mangle.c (write_encoding): Don't mangle return types for
3206 conversion functions.
3207
3208 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
3209
3210 * error.c (tree_formatting_info): New data type.
3211 (tree_being_formatted): New macro.
3212 (tree_formatting_flags): Likewise.
3213 (put_whitespace): Likewise.
3214 (print_tree_identifier): Likewise.
3215 (print_identifier): Likewise.
3216 (cp_tree_printer, print_function_argument_list, print_declaration,
3217 print_expression, print_function_declaration,
3218 print_function_parameter, print_type, print_cv_qualifier): New
3219 functions.
3220 (init_error): Initialize lang_printer.
3221
3222 2000-08-24 Jason Merrill <jason@redhat.com>
3223
3224 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
3225 adjustment necessary.
3226
3227 2000-08-24 Greg McGary <greg@mcgary.org>
3228
3229 * cp-tree.h (MAIN_NAME_P): Remove macro.
3230
3231 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
3232
3233 * error.c (print_instantiation_context): Don't forget to flush the
3234 buffer.
3235
3236 2000-08-23 Jason Merrill <jason@redhat.com>
3237
3238 * typeck.c (build_ptrmemfunc): Save the input pmf.
3239
3240 * method.c (process_modifiers): Use same_type_p.
3241
3242 2000-08-23 Mark Mitchell <mark@codesourcery.com>
3243
3244 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
3245 * mangle.c (write_function_type): Change prototype.
3246 (write_encoding): Don't mangle return types for
3247 constructors or destructors.
3248 (write_type): Adjust call to write_function_type.
3249 * pt.c (instantiate_template): Instantiate alternate entry points
3250 when instantiating the main function.
3251
3252 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
3253
3254 * error.c (cp_print_error_function): Don't use embedded '\n' in
3255 output_printf.
3256
3257 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
3258
3259 * decl.c (init_decl_processing): Remove bogus initialization.
3260 * error.c (lang_print_error_function): Restore here.
3261 (init_error): Initialize print_error_function.
3262
3263 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3264
3265 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
3266
3267 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
3268
3269 * Makefile.in (error.o): Depends on diagnostic.h
3270
3271 * cp-tree.h (problematic_instantiation_changed,
3272 record_last_problematic_instantiation, current_instantiation,
3273 print_instantiation_context): Declare.
3274 (maybe_print_template_context): Remove.
3275
3276 * decl.c (init_decl_processing): Set print_error_function to NULL.
3277 (lang_print_error_function): Remove, since we're using a new
3278 machinery.
3279
3280 * error.c: #include diagnostic.h
3281 (function_category): New function.
3282 (cp_diagnostic_starter): Likewise.
3283 (cp_diagnostic_finalizer): Likewise.
3284 (cp_print_error_function): Likewise.
3285 (maybe_print_instantiation_context): Likewise.
3286 (print_instantiation_full_context): Likewise.
3287 (print_instantiation_partial_context): Likewise.
3288 (print_instantiation_context): Define.
3289 (init_error): Initialize diagnostic pager and finalizer.
3290
3291 * pt.c (problematic_instantiation_changed): Define.
3292 (record_last_problematic_instantiation): Likewise.
3293 (current_instantiation): Likewise.
3294 (maybe_print_template_context): Remove.
3295 (print_template_context): Likewise.
3296 (current_tinst_level): Make static to reflect Brendan Kehoe's
3297 change of 1995-04-13.
3298 (push_tinst_level): Call print_instantiation_context.
3299
3300 2000-08-21 Nix <nix@esperi.demon.co.uk>
3301
3302 * lang-specs.h: Do not process -o or run the assembler if
3303 -fsyntax-only.
3304
3305 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
3306
3307 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
3308 variables.
3309 * decl2.c (lang_decode_option): Disable gettext attributes for
3310 -ansi.
3311
3312 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
3313
3314 * lex.c (lang_init_options): Default diagnostic message maximum
3315 length to 80, when line-wrapping.
3316
3317 2000-08-20 Mark Mitchell <mark@codesourcery.com>
3318
3319 * class.c (build_vtbl_initializer): Clear the entire
3320 vtbl_init_data. Start keeping track of the functions for which we
3321 have created vcall offsets here.
3322 (dfs_build_vcall_offset_vtbl_entries): Remove.
3323 (build_vcall_offset_vtbl_entries): Reimplement.
3324 (add_vcall_offset_vtbl_entries_r): New function.
3325 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
3326 computing when vcall offsets are necessary.
3327
3328 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3329
3330 * decl.c (member_function_or_else): Use cp_error ... %T.
3331 (grokdeclarator): Likewise.
3332 (start_method): Likewise.
3333 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
3334
3335 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3336
3337 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
3338 TYPE_DECLs.
3339
3340 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3341
3342 * cp-tree.h (PTRMEM_OK_P): New macro.
3343 (itf_ptrmem_ok): New enumeration value.
3344 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
3345 argument. Diagnose implicit pointer to member.
3346 (instantiate_type): Don't diagnose implicit pointer to member
3347 here. Pass itf_ptrmem_ok if ok. Adjust calls to
3348 resolve_address_of_overloaded_function.
3349 * init.c (build_offset_ref): Set PTRMEM_OK_P.
3350 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
3351 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
3352 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
3353 (build_unary_op): Deal with single non-static member in
3354 microsoft-land.
3355
3356 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3357
3358 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
3359
3360 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3361
3362 * cp-tree.h (enum_name_string): Remove prototype.
3363 (report_case_error): Remove prototype.
3364 * cp/typeck2.c (enum_name_string): Remove.
3365 (report_case_error): Remove.
3366 * error.c (dump_expr): Deal with enum values directly.
3367 Correctly negate integer constant.
3368
3369 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3370
3371 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
3372 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
3373 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
3374 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
3375 (__cxa_vec_new): Use __cxa_vec_new2.
3376 (__cxa_vec_delete): Use __cxa_vec_delete2.
3377
3378 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3379
3380 * vec.cc (__cxa_vec_new): Set "C" linkage.
3381 (__cxa_vec_ctor): Likewise.
3382 (__cxa_vec_cctor): Likewise.
3383 (__cxa_vec_dtor): Likewise.
3384 (__cxa_vec_delete): Likewise.
3385 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
3386 (__cxa_vec_ctor): Likewise.
3387 (__cxa_vec_cctor): Likewise.
3388 (__cxa_vec_dtor): Likewise.
3389 (__cxa_vec_delete): Likewise.
3390
3391 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3392
3393 * class.c (instantiate_type): Reinstate local variable
3394 deleted in previous change.
3395
3396 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
3397 itf_no_attributes.
3398
3399 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3400
3401 * cp-tree.h (instantiate_type_flags): New enumeration.
3402 (instantiate_type): Change parameter.
3403 * class.c (instantiate_type): Adjust prototype. Adjust.
3404 * call.c (standard_conversion): Adjust instantiate_type call.
3405 (reference_binding): Likewise.
3406 (build_op_delete_call): Likewise.
3407 (convert_like_real): Likewise.
3408 * cvt.c (cp_convert_to_pointer): Likewise.
3409 (convert_to_reference): Likewise.
3410 * pt.c (convert_nontype_argument): Likewise.
3411 * typeck.c (build_binary_op): Likewise.
3412 (build_ptrmemfunc): Likewise.
3413 (convert_for_assignment): Likewise.
3414
3415 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3416
3417 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
3418 (current_aggr): Define.
3419 * decl.c (grokdeclarator): Make sure a friend class is an
3420 elaborated type specifier.
3421 * parse.y (current_aggr): Remove static definition.
3422 (cp_parse_init): Adjust.
3423 (structsp): Clear and restore current_aggr.
3424 (component_decl_list): Clear current_aggr.
3425
3426 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
3427 aggregate tag on the typename's context.
3428
3429 * pt.c (tsubst_friend_class): Return error_mark_node, if
3430 parms becomes NULL.
3431 (instantiate_class_template): Ignore error_mark_node friend types.
3432
3433 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
3434
3435 * cvt.c (warn_ref_binding): New static function, broken out of ...
3436 (convert_to_reference): ... here. Use it.
3437
3438 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3439
3440 * parse.y (template_arg): Add rule for template qualified with
3441 global scope.
3442
3443 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3444
3445 * decl2.c (add_function): Reorganize.
3446 (arg_assoc): Do not consider function template decls.
3447
3448 2000-08-11 Jason Merrill <jason@redhat.com>
3449
3450 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
3451 looking inside.
3452
3453 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3454
3455 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
3456 (lookup_nested_tag): Likewise.
3457
3458 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
3459 can be produced.
3460
3461 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3462
3463 * parse.y (named_complex_class_head_sans_basetype): Remove
3464 always true if.
3465
3466 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3467
3468 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
3469 explicit TEMPLATE_ID_EXPR args.
3470 (build_expr_from_tree, case CALL_EXPR): Likewise.
3471
3472 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3473
3474 * decl.c (check_tag_decl): Diagnose typename's which don't
3475 declare anything.
3476
3477 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
3478
3479 * init.c (build_aggr_init): Reject bogus array initializers
3480 early.
3481
3482 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
3483
3484 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
3485 runtime.
3486 * cp/tinfo.cc (__dynamic_cast): Likewise.
3487 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
3488
3489 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
3490
3491 * cvt.c (convert_to_pointer_force): Fix error message when
3492 attempting to cast from ambiguous base.
3493
3494 2000-08-08 Jason Merrill <jason@redhat.com>
3495
3496 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
3497 (tsubst_template_arg_vector): Likewise.
3498
3499 * decl2.c (build_anon_union_vars): Choose the largest field; don't
3500 assume that one will be as large as the union.
3501
3502 2000-08-07 Kazu Hirata <kazu@hxi.com>
3503
3504 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
3505 * decl.c (pop_labels): Likewise.
3506
3507 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
3508
3509 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
3510 specifications.
3511 (__pointer_to_member_type_info): Likewise.
3512 (__base_class_info): Likewise.
3513 (__class_type_info): Likewise.
3514 (__si_class_type_info): Likewise.
3515 (__vmi_class_type_info): Likewise.
3516 * tinfo.cc (__si_class_type_info::__do_find_public_src):
3517 Changed member names to match specifications.
3518 (__vmi_class_type_info::__do_find_public_src): Likewise.
3519 (__si_class_type_info::__do_dyncast): Likewise.
3520 (__vmi_class_type_info::__do_dyncast): Likewise.
3521 (__si_class_type_info::__do_upcast): Likewise.
3522 (__vmi_class_type_info::__do_upcast): Likewise.
3523 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
3524 (__pbase_type_info::__pointer_catch): Likewise.
3525 (__pointer_type_info::__pointer_catch): Likewise.
3526 (__pointer_to_member_type_info::__pointer_catch): Likewise.
3527
3528 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
3529
3530 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
3531 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
3532 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
3533
3534 2000-08-04 Mark Mitchell <mark@codesourcery.com>
3535
3536 * cp-tree.h (add_method): Change prototype.
3537 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
3538 Don't double the size of the method vector in the error case.
3539 (handle_using_decl): Adjust call to add_method.
3540 (add_implicitly_declared_members): Likewise.
3541 (clone_function_decl): Likewise.
3542 * decl2.c (check_classfn): Likewise.
3543 * semantics.c (finish_member_declaration): Likewise.
3544
3545 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
3546
3547 * decl.c (flag_isoc94): New variable.
3548
3549 2000-08-02 Jason Merrill <jason@redhat.com>
3550
3551 * pt.c (do_type_instantiation): Add complain parm; don't complain
3552 if called recursively.
3553 * cp-tree.h, parse.y: Adjust.
3554
3555 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
3556
3557 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
3558 -Wno-strict-prototypes.
3559
3560 * g++spec.c: Adjust type of second argument to
3561 lang_specific_driver, and update code as necessary.
3562
3563 * cp-tree.h: Don't prototype min_precision here.
3564 (my_friendly_assert): Cast expression to void.
3565 * semantics.c (do_poplevel): Initialize scope_stmts.
3566
3567 2000-08-02 Mark Mitchell <mark@codesourcery.com>
3568
3569 * cp-tree.h (DECL_NEEDED_P): Tweak.
3570
3571 2000-07-28 Jason Merrill <jason@redhat.com>
3572
3573 * lang-specs.h: Use %i in rule for .ii files.
3574
3575 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
3576
3577 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
3578
3579 2000-07-30 Mark Mitchell <mark@codesourcery.com>
3580
3581 Allow indirect primary bases.
3582 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
3583 primary_base.
3584 (CLASSTYPE_VFIELD_PARENT): Remove.
3585 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
3586 (BINFO_PRIMARY_BINFO): Remove.
3587 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
3588 (BINFO_VBASE_PRIMARY_P): Likewise.
3589 (BINFO_PRIMARY_BASE_OF): New macro.
3590 (BINFO_INDIRECT_PRIMARY_P): Likewise.
3591 (get_primary_binfo): New function.
3592 * decl.c (lang_mark_tree): Make lang_type::primary_base.
3593 * class.c (vcall_offset_data_s): Rename to ...
3594 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
3595 and add ctor_vtbl_p.
3596 (get_derived_offset): Use get_primary_binfo.
3597 (dfs_mark_primary_bases): Adjust handling of virtual primary
3598 bases.
3599 (mark_primary_bases): Likewise.
3600 (set_primary_base): Take a binfo, not an integer, as a
3601 representation of the primary base.
3602 (indirect_primary_base_p): Remove.
3603 (determine_primary_base): Adjust for indirect primary bases.
3604 (dfs_find_final_overrider): Fix typo in coment.
3605 (update_vtable_entry_for_fn): Use get_primary_binfo.
3606 (layout_nonempty_base_or_field): Tweak.
3607 (build_base_fields): Adjust for new primary base semantics.
3608 (dfs_propagate_binfo_offsets): Remove.
3609 (propagate_binfo_offsets): Rewrite.
3610 (dfs_set_offset_for_shared_vbases): Remove.
3611 (layout_virtual_bases): Don't use it.
3612 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
3613 ABI.
3614 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
3615 CLASSTYPE_VFIELD_PARENT.
3616 (dfs_get_primary_binfo): New function.
3617 (get_primary_binfo): Likewise.
3618 (dump_class_hierarchy_r): Tweak printing of primary bases.
3619 (build_vtbl_initializer): Fix typo in comments. Use
3620 vtbl_init_data.
3621 (build_vcall_and_vbase_vtbl_entries): Likewise.
3622 (build_vbaes_offset_vtbl_entries): Likewise.
3623 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
3624 BV_VCALL_INDEX to handle indirect primary bases.
3625 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
3626 (build_rtti_vtbl_entries): Likewise.
3627 * search.c (get_shared_vbase_if_not_primary): Tweak.
3628 (find_vbase_instance): Likewise.
3629 (binfo_for_vtable): Simplify.
3630 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
3631 (make_binfo): Make it have 11 entries.
3632
3633 2000-07-30 Alex Samuel <samuel@codesourcery.com>
3634
3635 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
3636 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
3637 ascertaining primaryness.
3638 (G): Remove template_args.
3639 (decl_is_template_id): New function.
3640 (write_encoding): Use decl_is_template_id.
3641 (write_name): Likewise. Handle type_decls. Get main variant of
3642 type decls.
3643 (write_nested_name): Likewise.
3644 (write_prefix): Likewise.
3645 (write_template_prefix): Likewise.
3646 (write_special_name_constructor): Remove defunct production from
3647 comment.
3648 (write_bare_function_type): Remove comment about absent parameter.
3649 (write_template_template_arg): Add missing grammar production to
3650 comment.
3651
3652 2000-07-27 Jason Merrill <jason@redhat.com>
3653
3654 * decl.c (duplicate_decls): If common_type produces a non-typedef
3655 type for a typedef, just use the old type.
3656
3657 2000-07-27 Mark Mitchell <mark@codesourcery.com>
3658
3659 * cp-tree.h (function_depth): Declare.
3660 (verify_stmt_tree): Likewise.
3661 (find_tree): Likewise.
3662 * decl.c (function_depth): Give it external linkage.
3663 * optimize.c (optimize_function): Increment and decrement it.
3664 * tree.c (verify_stmt_tree_r): New function.
3665 (verify_stmt_tree): Likewise.
3666 (find_tree_r): Likewise.
3667 (find_tree): Likewise.
3668
3669 2000-07-27 Jason Merrill <jason@redhat.com>
3670
3671 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
3672 TYPE_PTRMEMFUNC_P.
3673 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
3674
3675 2000-07-26 Mark Mitchell <mark@codesourcery.com>
3676
3677 * decl.c (start_cleanup_fn): Mark the function as `inline'.
3678 * decl2.c (get_guard): Call cp_finish_decl, not
3679 rest_of_decl_compilation, for local guards.
3680 * lex.c (do_identifier): Remove unused variable.
3681
3682 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
3683
3684 * parse.y: Add missing ';'.
3685
3686 2000-07-26 Mark Mitchell <mark@codesourcery.com>
3687
3688 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
3689 of `extern "C++"'.
3690
3691 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
3692
3693 Kill strict_prototype. Backwards compatibility only for
3694 non NO_IMPLICIT_EXTERN_C systems.
3695 * cp-tree.h (flag_strict_prototype): Remove.
3696 (strict_prototype): Remove.
3697 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
3698 * decl.c (maybe_push_to_top_level): Adjust.
3699 (pop_from_top_level): Adjust.
3700 (decls_match): Only allow sloppy parm matching for ancient
3701 system headers.
3702 (init_decl_processing): Adjust.
3703 (grokdeclarator): Adjust.
3704 * decl2.c (flag_strict_prototype): Remove.
3705 (strict_prototype): Remove.
3706 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
3707 (lang_f_options): Remove "strict-prototype".
3708 (unsupported-options): Add "strict-prototype".
3709 * lex.c (do_identifier): Adjust.
3710 (do_scoped_id): Adjust.
3711 * parse.y (empty_parms): Adjust.
3712 * class.c (push_lang_context): Adjust.
3713 (pop_lang_context): Adjust.
3714 * typeck.c (comp_target_parms): Adjust.
3715
3716 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
3717
3718 * decl.c (poplevel): Deal with anonymous variables at for scope.
3719 (maybe_inject_for_scope_var): Likewise.
3720
3721 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
3722
3723 * decl.c: Remove all signal handling code, now done in toplev.c.
3724
3725 2000-07-23 Mark Mitchell <mark@codesourcery.com>
3726
3727 * decl.c (make_rtl_for_nonlocal_decl): Rework.
3728
3729 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
3730 correctly.
3731
3732 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
3733
3734 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
3735 Define my_friendly_assert and my_friendly_abort as macros
3736 which may call friendly_abort. Prototype friendly abort, not
3737 my_friendly_abort or my_friendly_assert.
3738 * decl.c (signal_catch): Report the signal caught in the error
3739 message. Call fatal directly.
3740 * typeck2.c (ack, my_friendly_assert): Delete.
3741 (my_friendly_abort): Rename to friendly_abort. Expect file,
3742 line, and function parameters. Report the abort code, then
3743 call fancy_abort. Do not mask an abort if errors have
3744 already occurred.
3745
3746 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
3747
3748 * typeck.c (comp_target_parms): Remove obsolete parameter.
3749 (comp_target_types): Adjust.
3750
3751 2000-07-17 Jason Merrill <jason@redhat.com>
3752
3753 * typeck.c (mark_addressable): Never set TREE_USED.
3754 * call.c (build_call): Don't abort on calls to library functions
3755 that have been declared normally.
3756
3757 * typeck.c (build_binary_op): Fix grammar in warning.
3758
3759 * exception.cc (__eh_free): Fix prototype.
3760
3761 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
3762
3763 * decl.c (pushdecl): Handle seeing an OVERLOAD in
3764 IDENTIFIER_NAMESPACE_VALUE.
3765
3766 2000-07-16 Mark Mitchell <mark@codesourcery.com>
3767
3768 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
3769 * method.c (use_thunk): Correct handling of vcall offsets.
3770
3771 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
3772
3773 * .cvsignore: parse.h and parse.c have no cp- prefix.
3774
3775 2000-07-13 Mark Mitchell <mark@codesourcery.com>
3776
3777 * .cvsignore: New file.
3778
3779 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
3780
3781 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
3782
3783 2000-07-12 Mark Mitchell <mark@codesourcery.com>
3784
3785 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
3786 * parse.c: Remove.
3787 * parse.h: Likewise.
3788
3789 2000-07-11 Mark Mitchell <mark@codesourcery.com>
3790
3791 * class.c (layout_class_type): Add pointers to virtual bases after
3792 base classes under the old ABI.
3793
3794 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
3795
3796 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
3797 (finish_continue_stmt): Likewise.
3798 (begin_for_stmt): Remove call to note_level_for_for.
3799 (finish_goto_stmt): Change call from build_min_nt
3800 to build_stmt.
3801 (finish_expr_stmt): Likewise.
3802 (begin_if_stmt): Likewise.
3803 (begin_while_stmt): Likewise.
3804 (finish_while_stmt): Likewise.
3805 (finish_return_stmt): Likewise.
3806 (begin_for_stmt): Likewise.
3807 (finish_for_stmt): Likewise.
3808 (finish_break_stmt): Likewise.
3809 (begin_switch_stmt): Likewise.
3810 (finish_case_label): Likewise.
3811 (genrtl_try_block): Likewise.
3812 (begin_try_block): Likewise.
3813 (begin_handler): Likewise.
3814 (begin_compound_stmt): Likewise.
3815 (finish_asm_stmt): Likewise.
3816 (finish_label_stmt): Likewise.
3817 (add_decl_stmt): Likewise.
3818 (finish_subobject): Likewise.
3819 (finish_decl_cleanup): Likewise.
3820 (finish_named_return_value): Likewise.
3821 (setup_vtbl_ptr): Likewise.
3822 (add_scope_stmt): Likewise.
3823 * decl.c (finish_constructor_body): Likewise.
3824 (finish_destructor_body): Likewise.
3825 * optimize.c (copy_body_r): Likewise.
3826 (initialize_inlined_parameters): Likewise.
3827 (declare_return_variable): Likewise.
3828 (expand_call_inline): Likewise.
3829
3830 2000-07-10 Jakub Jelinek <jakub@redhat.com>
3831
3832 * semantics.c (expand_body): Sync interface information
3833 at the end of function body expansion.
3834
3835 2000-07-09 Jason Merrill <jason@redhat.com>
3836
3837 * init.c (build_new_1): Bail early if the call to new fails.
3838
3839 * decl.c (compute_array_index_type): Check specifically for
3840 an INTEGER_CST, not just TREE_CONSTANT.
3841
3842 * decl.c (duplicate_decls): Don't call duplicate_decls on
3843 the DECL_TEMPLATE_RESULT.
3844 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
3845 codes.
3846
3847 * error.c (dump_template_bindings): Don't crash if we had an
3848 invalid argument list.
3849
3850 * typeck.c (c_expand_start_case): Do narrowing here.
3851 * semantics.c (finish_switch_cond): Not here.
3852
3853 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
3854
3855 * parse.y (asm_clobbers): Do string concatenation.
3856
3857 2000-07-09 Mark Mitchell <mark@codesourcery.com>
3858
3859 * decl.c (pushtag): Don't put local classes in template functions
3860 on the local_classes list.
3861
3862 2000-07-04 Scott Snyder <snyder@fnal.gov>
3863
3864 * decl2.c (get_guard): Add missing return for old ABI local
3865 variable case.
3866
3867 2000-07-09 Mark Mitchell <mark@codesourcery.com>
3868
3869 * cp-tree.h (char_type_p): New function.
3870 * decl.c (init_decl_processing): Don't initialize
3871 signed_wchar_type_node or unsigned_wchar_type_node.
3872 (complete_array_type): Handle brace-enclosed string-constants.
3873 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
3874 * tree.c (char_type_p): New function.
3875 * typeck2.c (digest_init): Use char_type_p.
3876
3877 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
3878
3879 * pt.c (tsubst): Don't layout type, if it's error_mark.
3880
3881 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
3882
3883 * pt.c (instantiate_pending_templates): Reset template level.
3884
3885 2000-07-05 Jason Merrill <jason@redhat.com>
3886
3887 * call.c (joust): Don't complain about `operator char *()' beating
3888 `operator const char *() const'.
3889
3890 2000-07-04 scott snyder <snyder@fnal.gov>
3891 Jason Merrill <jason@redhat.com>
3892
3893 * repo.c (repo_get_id): Handle the case where a class with virtual
3894 bases has a null TYPE_BINFO_VTABLE.
3895
3896 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
3897 Jason Merrill <jason@redhat.com>
3898
3899 * parse.y (member_init): Just pass in the type.
3900 * init.c (expand_member_init): Handle getting a type.
3901
3902 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3903 Jason Merrill <jason@redhat.com>
3904
3905 * decl.c (finish_function): Warn if a function has no return
3906 statement.
3907 Suggested by Andrew Koenig.
3908 * typeck.c (check_return_expr): Do set current_function_returns_value
3909 if we got an error_mark_node.
3910
3911 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
3912
3913 * decl2.c (push_decl_namespace): Push the original namespace.
3914
3915 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
3916
3917 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
3918 * semantics.c (begin_class_definition): Clear it.
3919
3920 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
3921
3922 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
3923 (genrtl_expr_stmt): Likewise.
3924 (genrtl_decl_stmt): Likewise.
3925 (genrtl_if_stmt): Likewise.
3926 (genrtl_while_stmt): Likewise.
3927 (genrtl_do_stmt): Likewise.
3928 (genrtl_return_stmt): Likewise.
3929 (genrtl_for_stmt): Likewise.
3930 (genrtl_break_stmt): Likewise.
3931 (genrtl_continue_stmt): Likewise.
3932 (genrtl_scope_stmt): Likewise.
3933 (genrtl_switch_stmt): Likewise.
3934 (genrtl_case_label): Likewise.
3935 (genrtl_begin_compound_stmt): Likewise.
3936 (genrtl_finish_compound_stmt): Likewise.
3937 (genrtl_compound_stmt): Likewise.
3938 (genrtl_asm_stmt): Likewise.
3939
3940 * init.c (begin_init_stmts): Remove call to
3941 genrtl_begin_compound_stmt.
3942 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
3943
3944 * semantics.c (lang_expand_stmt): Changed call to
3945 genrtl_compound_stmt to ignore return value.
3946
3947 2000-07-02 Mark Mitchell <mark@codesourcery.com>
3948
3949 * mangle.c (canonicalize_for_substitution): Return the canonical
3950 variant of a type.
3951
3952 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
3953 TYPE_DECL.
3954 * typeck.c (commonparms): Remove obstack manipulations.
3955
3956 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
3957
3958 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
3959
3960 * Makefile.in (OBJS): Added ../c-semantics.o.
3961 (OBJDEPS): Likewise.
3962
3963 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
3964 ../c-common.h.
3965 (struct stmt_tree): Added comment.
3966 (current_function_name_declared): Removed.
3967 (stmts_are_full_exprs_p): Likewise.
3968 (genrtl_do_pushlevel): Likewise.
3969 (genrtl_clear_out_block): Likewise.
3970 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
3971 (DECL_ANON_UNION_ELEMS): Likewise.
3972 (emit_local_var): Likewise.
3973 (make_rtl_for_local_static): Likewise.
3974 (do_case): Likewise.
3975 (expand_stmt): Likewise.
3976 (genrtl_decl_cleanup): Likewise.
3977 (c_expand_asm_operands): Likewise.
3978 (c_expand_return): Likewise.
3979 (c_expand_start_case): Likewise.
3980
3981 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
3982 (emit_local_var): Likewise.
3983 (initialize_local_var): Change reference to
3984 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
3985 Change reference to stmts_are_full_exprs_p to
3986 current_stmt_tree->stmts_are_full_exprs_p.
3987 (push_cp_function_context): Likewise.
3988
3989 * expect.c (expand_throw): Change reference to
3990 stmts_are_full_exprs_p.
3991
3992 * init.c (build_aggr_init): Change reference to
3993 stmts_are_full_exprs_p.
3994 (build_vec_init): Likewise.
3995
3996 * optimize.c (maybe_clone_body): Change reference to
3997 current_function_name_declared to
3998 cp_function_chain->name_declared.
3999
4000 * pt.c (instantiate_decl): Change reference to
4001 current_function_name_declared to
4002 cp_function_chain->name_declared.
4003
4004 * semantics.c (expand_cond): Moved declaration to c-common.h.
4005 (genrtl_do_pushlevel): Moved to c-semantics.c.
4006 (genrtl_clear_out_block): Likewise.
4007 (genrtl_goto_stmt): Likewise.
4008 (genrtl_expr_stmt): Likewise.
4009 (genrtl_decl_stmt): Likewise.
4010 (gerntl_if_stmt): Likewise.
4011 (genrtl_while_stmt): Likewise.
4012 (genrtl_do_stmt): Likewise.
4013 (genrtl_return_stmt): Likewise.
4014 (genrtl_for_stmt): Likewise.
4015 (genrtl_break_stmt): Likewise.
4016 (genrtl_continue_stmt): Likewise.
4017 (genrtl_scope_stmt): Likewise.
4018 (genrtl_switch_stmt): Likewise.
4019 (genrtl_case_label): Likewise.
4020 (genrtl_begin_compound_stmt): Likewise.
4021 (genrtl_finish_compound_stmt): Likewise.
4022 (genrtl_compound_stmt): Likewise.
4023 (genrtl_asm_stmt): Likewise.
4024 (genrtl_decl_cleanup): Likewise.
4025 (expand_cond): Likewise.
4026 (expand_stmt): Renamed to ...
4027 (lang_expand_stmt): ... this.
4028 (lang_expand_expr_stmt): Initialize.
4029 (set_current_function_name_declared): Likewise.
4030 (stmts_are_full_exprs_p): Likewise.
4031 (current_function_name_declared): Likewise.
4032 (anon_aggr_type_p): Likewise.
4033 (do_poplevel): Change reference to
4034 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
4035 Change reference to stmts_are_full_exprs_p to
4036 current_stmt_tree->stmts_are_full_exprs_p.
4037 (add_tree): Likewise.
4038 (finish_expr_stmt): Likewise.
4039 (prep_stmt): Likewise.
4040 (lang_expand_stmt): Likewise.
4041 (begin_compound_stmt): Change reference to
4042 current_function_name_declared to
4043 cp_function_chain->name_declared and call to
4044 current_function_name_declared().
4045 (setup_vtbl_ptr): Likewise.
4046 (genrtl_do_poplevel): Removed.
4047
4048 2000-06-30 Jason Merrill <jason@redhat.com>
4049
4050 * init.c (init_init_processing): Go back to aligning like
4051 double_type_node for old ABI.
4052 (get_cookie_size): Make cookie larger if we get a type that needs
4053 more alignment.
4054 (build_vec_delete): Call it.
4055
4056 * typeck.c (qualify_type_recursive): New fn.
4057 (composite_pointer_type): Use it.
4058 (build_binary_op): Use composite_pointer_type.
4059
4060 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
4061 Jason Merrill <jason@redhat.com>
4062
4063 * typeck.c (check_return_expr): Don't complain about returning
4064 NULL from operator new if -fcheck-new.
4065 * cp-tree.h: Declare flag_check_new here.
4066 * init.c: Not here.
4067
4068 2000-06-28 Alex Samuel <samuel@codesourcery.com>
4069
4070 * mangle.c (find_substitution): Use same_type_p.
4071 (write_encoding): Don't check for substitutions.
4072
4073 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
4074
4075 * parse.y (expr_no_comma_rangle): New non-terminal.
4076 (template_parm): Use it for default parameter case.
4077 (template_arg): Use it.
4078 (expr_no_commas): Remove commented out undefined extensions.
4079 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
4080 * parse.h, parse.c: Rebuilt.
4081
4082 2000-06-30 Mark Mitchell <mark@codesourcery.com>
4083
4084 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
4085 (finish_asm_stmt): Do it here, instead.
4086
4087 * cp-tree.h (ridpointers): Don't declare.
4088 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
4089 (record_builtin_java_type): Likewise.
4090 (init_decl_processing): Likewise.
4091 * lex.c: Move inclusion of lex.h.
4092 (ridpointers): Don't define.
4093 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
4094 RID_MAX.
4095 * lex.h (enum rid): Rename to ...
4096 (enum cp_rid): ... this.
4097 (ridpointers): Don't declare.
4098 * parse.y: Move inclusion of lex.h.
4099 * parse.c: Regenerated.
4100 * spew.c: Move inclusion of lex.h.
4101
4102 * cp-tree.h (struct language_function): Remove temp_name_counter.
4103 (temp_name_counter): Remove.
4104 (get_temp_name): Change prototype.
4105 (get_guard): New function.
4106 (get_guard_cond): Likewise.
4107 (set_guard): Likewise.
4108 * cvt.c (build_up_reference): Adjust call to get_temp_name.
4109 * decl.c (expand_static_init): Use get_guard and friends to
4110 implement guard variables.
4111 * decl2.c (get_temp_name): Assume that the variables created are
4112 always static.
4113 (get_sentry): Rename to ...
4114 (get_guard): ... this. Implement new ABI guard variables.
4115 (get_guard_bits): New function.
4116 (get_guard_cond): Likewise.
4117 (set_guard): Likewise.
4118 (start_static_initialization_or_destruction): Use them.
4119 (do_static_initialization): Replace sentry with guard throughout.
4120 (do_static_destruction): Likewise.
4121 * init.c (create_temporary_var): Add comment.
4122
4123 2000-06-28 Alex Samuel <samuel@codesourcery.com>
4124
4125 * mangle.c (find_substitution): Use same_type_p.
4126 (write_encoding): Don't check for substitutions.
4127
4128 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
4129
4130 * parse.y (expr_no_comma_rangle): New non-terminal.
4131 (template_parm): Use it for default parameter case.
4132 (template_arg): Use it.
4133 (expr_no_commas): Remove commented out undefined extensions.
4134 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
4135 * parse.h, parse.c: Rebuilt.
4136
4137 2000-06-29 Mark Mitchell <mark@codesourcery.com>
4138
4139 * cp-tree.h (flag_const_strings): Remove.
4140 (warn_parentheses): Likewise.
4141 (warn_format): Likewise.
4142 (common_type): Likewise.
4143 (default_conversion): Likewise.
4144 (build_binary_op): Likewise.
4145 (cp_build_binary_op): New macro.
4146 * call.c (build_new_op): Use cp_build_binary_op instead of
4147 build_binary_op.
4148 * class.c (build_vtable_entry_ref): Likewise.
4149 * decl.c (expand_static_init): Likewise.
4150 (compute_array_index_type): Likewise.
4151 (build_enumerator): Likewise.
4152 * decl2.c (delete_sanity): Likewise.
4153 (start_static_initialization_or_destruction): Likewise.
4154 * error.c (dump_type_suffix): Likewise.
4155 * init.c (resolve_offset_ref): Likewise.
4156 (build_new): Likewise.
4157 (build_new_1): Likewise.
4158 (build_vec_delete_1): Likewise.
4159 (build_vec_init): Likewise.
4160 (build_delete): Likewise.
4161 * rtti.c (synthesize_tinfo_fn): Likewise.
4162 (synthesize_tinfo_var): Likewise.
4163 * search.c (expand_upcast_fixups): Likewise.
4164 (fixup_all_virtual_upcast_offsets): Likewise.
4165 * typeck.c (build_array_ref): Likewise.
4166 (get_member_function_from_ptrfunc): Likewise.
4167 (build_binary_op): Add parameter.
4168 (pointer_int_sum): Use cp_build_binary_op.
4169 (pointer_diff): Likewise.
4170 (build_modify_expr): Likewise.
4171 (get_delta_difference): Likewise.
4172 (build_ptrmemfunc): Likewise.
4173
4174 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
4175
4176 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
4177 * decl.c (create_implicit_typedef): Adjust.
4178 * decl2.c (build_artificial_parm): Adjust.
4179 * method.c (implicitly_declare_fn): Adjust.
4180 * pt.c (push_inline_template_parms_recursive): Adjust.
4181 (process_template_parm): Adjust.
4182 (overloaded_template_name): Adjust.
4183 * semantics.c (finish_template_template_parm): Adjust.
4184
4185 2000-06-28 Mark Mitchell <mark@codesourcery.com>
4186
4187 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
4188 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
4189 where to emit thunks.
4190 (build_vtt): Adjust call to build_vtt_inits.
4191 (build_vtt_inits): Add parameter to indicate whether or not
4192 sub-VTTs for virtual bases should be included. Adjust handling of
4193 construction vtables.
4194 (get_matching_base): New function.
4195 (dfs_build_vtt_inits): Rename to ...
4196 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
4197 construction vtables.
4198 (dfs_fixup_binfo_vtbls): Likewise.
4199 (build_ctor_vtbl_groups): Build construction vtables for virtual
4200 bases, too.
4201 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
4202 to build construction vtbls.
4203 (dfs_accumulate_vtbl_inits): Adjust handling of
4204 construction vtables.
4205
4206 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
4207 types correctly.
4208
4209 2000-06-27 Mark Mitchell <mark@codesourcery.com>
4210
4211 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
4212
4213 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
4214
4215 * search.c (hides): Remove.
4216 (is_subobject_of_p): Add most_derived parameter. Use
4217 CANONICAL_BINFO.
4218 (lookup_field_queue_p): Adjust.
4219 (lookup_field_r): Adjust.
4220
4221 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
4222
4223 * decl2.c (handle_class_head): Bash typedefs to the type's main
4224 decl.
4225
4226 2000-06-25 Mark Mitchell <mark@codesourcery.com>
4227
4228 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
4229 (begin_global_stmt_expr): ... this.
4230 (genrtl_finish_stmt_expr): Rename to ...
4231 (finish_global_stmt_expr): ... this.
4232 * init.c (begin_init_stmts): Adjust calls.
4233 (finish_init_stmts): Likewise.
4234 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
4235 (begin_global_stmt_expr): ... this.
4236 (genrtl_finish_stmt_expr): Rename to ...
4237 (finish_global_stmt_expr): ... this.
4238
4239 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4240
4241 * search.c (lookup_member): Fix typo in comment.
4242
4243 2000-06-24 Jason Merrill <jason@redhat.com>
4244
4245 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
4246 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
4247
4248 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4249
4250 * parse.y (complex_direct_notype_declarator): Support global_scope.
4251 * Makefile.in: Adjust conflict count.
4252
4253 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
4254
4255 * parse.y (template_arg): Convert TEMPLATE_DECL
4256 that is a template template paramter to
4257 TEMPLATE_TEMPLATE_PARM here.
4258
4259 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4260 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
4261 (copy_template_template_parm): Adjust prototype.
4262 * decl.c (grokdeclarator): Remove dead code.
4263 * pt.c (process_template_parm): Tidy.
4264 (lookup_template_class): Construct nodes in
4265 copy_template_template_parm.
4266 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
4267 lookup_template_class. Use TYPE_TI_TEMPLATE.
4268 * tree.c (copy_template_template_parm): Add NEWARGS
4269 parameter.
4270 (mapcar): Adjust call to copy_template_template_parm.
4271 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
4272 * method.c (build_template_template_parm_names): Change error
4273 code to avoid compilation warning.
4274
4275 * gxxint.texi: Document template template parameter
4276 name mangling.
4277
4278 2000-06-21 Alex Samuel <samuel@codesourcery.com>
4279
4280 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
4281 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
4282 (cp-demangle.o): New rule.
4283 (dyn-string.o): Likewise.
4284 * inc/cxxabi.h (__cxa_demangle): New declaration.
4285
4286 2000-06-22 Mark Mitchell <mark@codesourcery.com>
4287
4288 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
4289 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
4290 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
4291 a tree, not an int.
4292 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
4293 (make_thunk): Change prototype.
4294 (emit_thunk): Rename to use_thunk.
4295 (mangle_thunk): Change prototype.
4296 * class.c (get_derived_offset): Simplify.
4297 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
4298 BV_GENERATE_THUNK_WITH_VTABLE_P.
4299 (build_primary_vtable): Simplify.
4300 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
4301 (dfs_find_base): Remove.
4302 (update_vtable_entry_for_fn): Correct bug in finding the base
4303 where a virtual function was first declared. Figure out whether
4304 or not to emit a vcall-thunk with the vtables in which it appears.
4305 Correct logic for deciding whether to use an ordinary thunk, or a
4306 vcall thunk.
4307 (finish_struct_1): Remove unnecssary code.
4308 (build_vtbl_initializer): Use ssize_int for the running counter of
4309 negative indices.
4310 (build_vtbl_initializer): Only use vcall thunks where necessary.
4311 Mark thunks as needing to be emitted with their vtables, or not.
4312 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
4313 indices. Use size_binop.
4314 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
4315 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
4316 size_binop.
4317 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
4318 (build_vtable_entry): Mark thunks as needing to be emitted with
4319 their vtables, or not.
4320 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
4321 * decl2.c (mark_vtable_entries): Use use_thunk instead of
4322 emit_thunk.
4323 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
4324 information.
4325 * error.c (dump_expr): Use BV_FN.
4326 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
4327 not an int.
4328 * method.c (make_thunk): Likewise.
4329 (emit_thunk): Rename to use_thunk. Allow callers to decide
4330 whether or not to actually emit the thunk. Adjust for changes in
4331 representation of vcall offsets.
4332 * search.c (dfs_get_pure_virtuals): Use BV_FN.
4333 * semantics.c (emit_associated_thunks): New function.
4334 (expand_body): Use it.
4335 * ir.texi: Adjust decriptions of thunks.
4336
4337 2000-06-22 Jason Merrill <jason@redhat.com>
4338
4339 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
4340 (tsubst_friend_function): Copy it here.
4341
4342 * decl.c (grok_op_properties): Fix typo.
4343
4344 * decl2.c (delete_sanity): Clarify warning, avoid failure on
4345 deleting void*.
4346
4347 * pt.c (check_explicit_specialization): Clarify error.
4348
4349 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
4350 an old OVERLOAD when we're declaring a non-function.
4351 (pushdecl, destroy_local_var): Check for error_mark_node.
4352 (warn_extern_redeclared_static): Also bail early if
4353 we're a CONST_DECL.
4354 (push_overloaded_decl): Ignore an old error_mark_node.
4355
4356 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
4357
4358 * call.c (build_x_va_arg): Check if in a template decl.
4359 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
4360
4361 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4362
4363 * class.c (push_lang_context): TYPE_NAME gets you to the Java
4364 types DECLs.
4365 * decl.c (check_goto): Computed gotos assumed OK.
4366
4367 2000-06-20 Jason Merrill <jason@redhat.com>
4368
4369 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
4370 for which we don't need to look for instantiations.
4371
4372 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
4373
4374 * parse.y (program): Always call finish_translation_unit.
4375 * parse.c, parse.h: Rebuilt.
4376
4377 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
4378
4379 * method.c: Don't include hard-reg-set.h.
4380
4381 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
4382
4383 * rtti.c (get_base_offset): Cope when vbase field is in a base.
4384
4385 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
4386
4387 * call.c (build_conditional_expr): Use VOID_TYPE_P.
4388 * cvt.c (cp_convert_to_pointer): Likewise.
4389 (convert_to_void): Likewise.
4390 * error.c (dump_expr): Likewise.
4391 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
4392 * init.c (build_delete): Likewise.
4393 * method.c (emit_thunk): Likewise.
4394 * optmize.c (declare_return_variable): Likewise.
4395 * rtti.c (get_tinfo_decl_dynamic): Likewise.
4396 (get_typeid): Likewise.
4397 (build_dynamic_cast_1): Likewise.
4398 * typeck.c (composite_pointer_type): Likewise.
4399 (common_type): Likewise.
4400 (build_indirect_ref): Likewise.
4401 (build_binary_op): Likewise.
4402 (build_x_compound_expr): Likewise.
4403 (check_return_expr): Likewise.
4404 * typeck2.c (add_exception_specifier): Likewise.
4405
4406 * mangle.c (write_method_parms): Use direct comparison for end
4407 of parmlist.
4408
4409 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
4410
4411 * cp-tree.h (genrtl_try_block): Declare function.
4412 (genrtl_handler): Likewise.
4413 (genrtl_catch_block): Likewise.
4414 (genrtl_ctor_stmt): Likewise.
4415 (genrtl_subobject): Likewise.
4416 (genrtl_decl_cleanup): Likewise.
4417 (genrtl_do_poplevel): Likewise.
4418 (genrtl_do_pushlevel): Likewise.
4419 (genrtl_clear_out_block): Likewise.
4420 (genrtl_goto_stmt): Likewise.
4421 (genrtl_expr_stmt): Likewise.
4422 (genrtl_decl_stmt): Likewise.
4423 (genrtl_if_stmt): Likewise.
4424 (genrtl_while_stmt): Likewise.
4425 (genrtl_do_stmt): Likewise.
4426 (genrtl_return_stmt): Likewise.
4427 (genrtl_for_stmt): Likewise.
4428 (genrtl_break_stmt): Likewise.
4429 (genrtl_continue_stmt): Likewise.
4430 (genrtl_scope_stmt): Likewise.
4431 (genrtl_switch_stmt): Likewise.
4432 (genrtl_case_label): Likewise.
4433 (genrtl_begin_compound_stmt): Likewise.
4434 (genrtl_finish_compound_stmt): Likewise.
4435 (genrtl_compound_stmt): Likewise.
4436 (genrtl_asm_stmt): Likewise.
4437 (genrtl_named_return_value): Likewise.
4438 (genrtl_begin_stmt_expr): Likewise.
4439 (genrtl_finish_stmt_expr): Likewise.
4440 (finish_for_stmt): Removed first argument.
4441 (finish_switch_stmt): Likewise.
4442
4443 * semantics.c (genrtl_try_block): Define function.
4444 (genrtl_handler): Likewise.
4445 (genrtl_catch_block): Likewise.
4446 (genrtl_ctor_stmt): Likewise.
4447 (genrtl_subobject): Likewise.
4448 (genrtl_decl_cleanup): Likewise.
4449 (genrtl_do_poplevel): Likewise.
4450 (genrtl_do_pushlevel): Likewise.
4451 (genrtl_clear_out_block): Likewise.
4452 (genrtl_goto_stmt): Likewise.
4453 (genrtl_expr_stmt): Likewise.
4454 (genrtl_decl_stmt): Likewise.
4455 (genrtl_if_stmt): Likewise.
4456 (genrtl_while_stmt): Likewise.
4457 (genrtl_do_stmt): Likewise.
4458 (genrtl_return_stmt): Likewise.
4459 (genrtl_for_stmt): Likewise.
4460 (genrtl_break_stmt): Likewise.
4461 (genrtl_continue_stmt): Likewise.
4462 (genrtl_scope_stmt): Likewise.
4463 (genrtl_switch_stmt): Likewise.
4464 (genrtl_case_label): Likewise.
4465 (genrtl_begin_compound_stmt): Likewise.
4466 (genrtl_finish_compound_stmt): Likewise.
4467 (genrtl_compound_stmt): Likewise.
4468 (genrtl_asm_stmt): Likewise.
4469 (genrtl_named_return_value): Likewise.
4470 (genrtl_begin_stmt_expr): Likewise.
4471 (genrtl_finish_stmt_expr): Likewise.
4472 (finish_for_stmt): Removed first argument and generate rtl
4473 specific code.
4474 (finish_switch_stmt): Likewise.
4475 (do_poplevel): Removed generate rtl specific code.
4476 (do_pushlevel): Likewise.
4477 (add_tree): Likewise.
4478 (finish_goto_stmt): Likewise.
4479 (finish_expr_stmt): Likewise.
4480 (begin_if_stmt): Likewise.
4481 (finish_if_stmt_cond): Likewise.
4482 (finish_then_clause): Likewise.
4483 (begin_else_clause): Likewise.
4484 (finish_else_clause): Likewise.
4485 (finish_if_stmt): Likewise.
4486 (clear_out_block): Likewise.
4487 (begin_while_stmt): Likewise.
4488 (finish_while_stmt_cond): Likewise.
4489 (finish_while_stmt): Likewise.
4490 (begin_do_stmt): Likewise.
4491 (finish_do_body): Likewise.
4492 (finish_do_stmt): Likewise.
4493 (finish_return_stmt): Likewise.
4494 (begin_for_stmt): Likewise.
4495 (finish_for_init_stmt): Likewise.
4496 (finish_for_cond): Likewise.
4497 (finish_for_expr): Likewise.
4498 (finish_break_stmt): Likewise.
4499 (finish_continue_stmt): Likewise.
4500 (begin_switch_stmt): Likewise.
4501 (finish_switch_cond): Likewise.
4502 (finish_case_label): Likewise.
4503 (begin_try_block): Likewise.
4504 (begin_function_try_block): Likewise.
4505 (finish_try_block): Likewise.
4506 (finish_cleanup_try_block): Likewise.
4507 (finish_cleanup): Likewise.
4508 (finish_function_try_block): Likewise.
4509 (finish_handler_sequence): Likewise.
4510 (finish_function_handler_sequence): Likewise.
4511 (begin_handler): Likewise.
4512 (finish_handler_parms): Likewise.
4513 (begin_catch_block): Likewise.
4514 (finish_handler): Likewise.
4515 (begin_compound_stmt): Likewise.
4516 (finish_compound_stmt): Likewise.
4517 (finish_asm_stmt): Likewise.
4518 (finish_label_stmt): Likewise.
4519 (finish_label_decl): Likewise.
4520 (finish_subobject): Likewise.
4521 (finish_decl_cleanup): Likewise.
4522 (finish_named_return_value): Likewise.
4523 (begin_stmt_expr): Likewise.
4524 (finish_stmt_expr): Likewise.
4525
4526 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
4527 to call genrtl_expr_stmt when appropriate.
4528
4529 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
4530 begin_compound_expr to call genrtl_begin_stmt_expr and
4531 genrtl_begin_compound_expr when appropriate.
4532 (finish_init_stmts): Changed calls to finish_compound_expr and
4533 finish_stmt_expr to call genrtl_finish_compound_expr and
4534 genrtl_finish_stmt_expr when appropriate.
4535 (expand_default_init): Changed call to finish_expr_stmt to call
4536 genrtl_expr_stmt when appropriate.
4537 (build_vec_init): Likewise.
4538
4539 * parse.y (simple_stmt): Removed first argument from call to
4540 finish_for_stmt. Removed first argument from call to
4541 finish_switch_stmt.
4542
4543 * parse.c: Regenerated.
4544
4545 * pt.c (tsubst_expr): Removed first argument from call to
4546 finish_for_stmt. Removed first argument from call to
4547 finish_switch_stmt.
4548
4549 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
4550
4551 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
4552 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
4553
4554 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
4555 (cplus_tree_code_length[]): Likewise.
4556 (cplus_tree_code_name[]): Likewise.
4557 (init_parse): Added call to add_c_tree_codes. Changed
4558 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
4559
4560 2000-06-16 Mark Mitchell <mark@codesourcery.com>
4561
4562 * cp-tree.h (finish_mem_initializers): Declare.
4563 (count_trees): Likewise.
4564 * parse.y (base_init): Use finish_mem_initializers.
4565 * semantics.c (finish_mem_initializers): New function.
4566
4567 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
4568 the number of trees.
4569 (n_trees): Remove.
4570 (count_trees): Don't use it.
4571
4572 2000-06-15 Jason Merrill <jason@redhat.com>
4573
4574 * tree.c (count_trees): New debugging function.
4575
4576 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
4577 * init.c (build_member_call): Pull out the name of a DECL.
4578
4579 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
4580 * semantics.c (expand_body): Push to TV_INTEGRATION here.
4581 * optimize.c (optimize_function): Not here.
4582 * pt.c (instantiate_decl): Push to TV_PARSE.
4583
4584 2000-06-15 Mark Mitchell <mark@codesourcery.com>
4585
4586 * cp-tree.h (struct language_function): Remove x_base_init_list
4587 and x_member_init_list.
4588 (current_base_init_list): Remove.
4589 (current_member_init_list): Likewise.
4590 (setup_vtbl_ptr): Change prototype.
4591 (emit_base_init): Likewise.
4592 (expand_member_init): Likewise.
4593 (reinit_parse_for_function): Remove.
4594 * decl.c (save_function_data): Don't clear x_base_init_list and
4595 x_member_init_list.
4596 (mark_language_function): Don't mark them.
4597 * init.c (perform_member_init): Tweak comment.
4598 (sort_member_init): Take the list of initializers as an argument.
4599 (sort_base_init): Likewise.
4600 (emit_base_init): Likewise.
4601 (expand_member_init): Return the initializer. Don't use global
4602 variables.
4603 * lex.c (reinit_parse_for_function): Remove.
4604 * method.c (build_template_parm_names): Correct substitution.
4605 (do_build_copy_constructor): Don't use current_member_init_list
4606 and current_base_init_list.
4607 (synthesize_method): Likewise.
4608 * parse.y (base_init): Split mem-initializers into
4609 base-initializers and field-initializers.
4610 (member_init_list): Build up the list here.
4611 (member_init): Return the initializer.
4612 (fn.depfn): Don't use reinit_parse_for_function.
4613 * parse.c: Regenerated.
4614 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
4615 ERROR_MARK.
4616 (tsubst_expr): Don't use current_member_init_list
4617 and current_base_init_list.
4618 (tsubst_expr_values): Rename to ...
4619 (tsubst_initializer_list): ... this. Use convert_from_reference.
4620 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
4621 and current_base_init_list.
4622 (begin_function_definition): Don't call reinit_parse_for_function.
4623
4624 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
4625
4626 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
4627 correctly.
4628
4629 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
4630
4631 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
4632
4633 * cp-tree.h (IF_COND): Move to c-common.h.
4634 (THEN_CLAUSE): Likewise.
4635 (ELSE_CLAUSE): Likewise.
4636 (WHILE_COND): Likewise.
4637 (WHILE_BODY): Likewise.
4638 (DO_COND): Likewise.
4639 (DO_BODY): Likewise.
4640 (RETURN_EXPR): Likewise.
4641 (EXPR_STMT_EXPR): Likewise.
4642 (FOR_INIT_STMT): Likewise.
4643 (FOR_COND): Likewise.
4644 (FOR_EXPR): Likewise.
4645 (FOR_BODY): Likewise.
4646 (SWITCH_COND): Likewise.
4647 (SWITCH_BODY): Likewise.
4648 (CASE_LOW): Likewise.
4649 (CASE_HIGH): Likewise.
4650 (GOTO_DESTINATION): Likewise.
4651 (COMPOUND_BODY): Likewise.
4652 (ASM_CV_QUAL): Likewise.
4653 (ASM_STRING): Likewise.
4654 (ASM_OUTPUTS): Likewise.
4655 (ASM_INPUTS): Likewise.
4656 (ASM_CLOBBERS): Likewise.
4657 (DECL_STMT_DECL): Likewise.
4658 (STMT_EXPR_STMT): Likewise.
4659 (LABEL_STMT_LABEL): Likewise.
4660 (SCOPE_BEGIN_P): Likewise.
4661 (SCOPE_END_P): Likewise.
4662 (SCOPE_STMT_BLOCK): Likewise.
4663 (SCOPE_NULLIFIED_P): Likewise.
4664 (SCOPE_NO_CLEANUPS_P): Likewise.
4665 (SCOPE_PARTIAL_P): Likewise.
4666 (ASM_VOLATILE_P): Likewise.
4667 (STMT_LINENO): Likewise.
4668 (STMT_LINENO_FOR_FN_P): Likewise.
4669
4670 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
4671 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
4672 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
4673 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
4674 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
4675
4676 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
4677
4678 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
4679 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
4680
4681 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
4682 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
4683 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
4684
4685 2000-06-14 Mark Mitchell <mark@codesourcery.com>
4686
4687 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
4688 * class.c (dfs_find_final_overrider): Set it appropriately.
4689 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
4690 avoid unneeded secondary vptrs.
4691
4692 2000-06-13 Jakub Jelinek <jakub@redhat.com>
4693
4694 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
4695 (check_bitfield_decl, check_field_decl): Likewise.
4696 (build_vtbl_or_vbase_field, build_base_field): Likewise.
4697 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
4698 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
4699 (xfer_tag, finish_enum): Likewise.
4700 * decl2.c (finish_builtin_type): Likewise.
4701 * init.c (init_init_processing): Likewise.
4702 * pt.c (instantiate_class_template): Likewise.
4703 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
4704 * cp-tree.h (struct lang_type): Add user_align member.
4705 (CLASSTYPE_USER_ALIGN): Define.
4706
4707 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4708
4709 * Make-lang.in (c++.install-common): Install g++-cross in
4710 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
4711 $(target_alias)-g++ and $(target_alias)-c++.
4712
4713 2000-06-12 Mark Mitchell <mark@codesourcery.com>
4714
4715 * class.c (vcall_offset_data_s): Add last_init and fns.
4716 (overrides): Rename to same_signature_p.
4717 (dfs_find_final_overrider): Adjust accordingly.
4718 (mark_overriders): Likewise.
4719 (warn_hidden): Likewise.
4720 (build_vtbl_initializer): Reorganize machinery for building things
4721 at negative offsets.
4722 (build_vcall_and_vbase_vtbl_entries): Likewise.
4723 (build_vbase_offset_vtbl_entries): Likewise.
4724 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
4725 offset entries. Do not create two entries for functions with the
4726 same signature.
4727 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
4728 (build_rtti_vtbl_entries): Reorganize machinery for building things
4729 at negative offsets.
4730
4731 * optimize.c (expand_call_inline): Don't recurse into the code
4732 used to initialize the parameters more than once.
4733
4734 2000-06-11 Mark Mitchell <mark@codesourcery.com>
4735
4736 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
4737 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
4738 (find_substitution): Only use the `Sa' substitution for
4739 std::allocator, not instantiations of it.
4740 (write_template_prefix): Move comment. Only use a TREE_LIST to
4741 represent substitutions for a member template.
4742 (write_array_type): Mangle array dimensions correctly.
4743 * optimize.c (maybe_clone_body): Copy more information from the
4744 cloned function.
4745 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
4746 on the regenerated declaration.
4747
4748 2000-06-11 Chip Salzenberg <chip@valinux.com>
4749 Mark Mitchell <mark@codesourcery.com>
4750
4751 * class.c (build_vtable): Clarify comment.
4752 (build_ctor_vtbl_group): Pass the most derived type to
4753 build_vtable.
4754
4755 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4756
4757 * decl2.c (compare_options): Don't needlessly cast away const-ness.
4758
4759 2000-06-10 Mark Mitchell <mark@codesourcery.com>
4760
4761 * decl.c (add_binding): Handle duplicate declarations of external
4762 variables.
4763
4764 2000-06-09 Chip Salzenberg <chip@valinux.com>
4765 Mark Mitchell <mark@codesourcery.com>
4766
4767 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
4768 argument.
4769 (write_signed_number): New macro.
4770 (write_unsigned_number): Likewise.
4771 (write_source_name): Use them.
4772 (write_number): Handle signed and unsigned values.
4773 (write_integer_cst): Use tree_int_cst_sgn, and use
4774 write_unsigned_number or write_signed_number as appropriate.
4775 (write_discriminator): Use write_unsigned_number or
4776 write_signed_number as appropriate.
4777 (write_template_arg_literal): Likewise.
4778 (write_array_type): Use tree_low_cst.
4779 (write_template_parm): Use write_unsigned_number or
4780 write_signed_number as appropriate.
4781 (write_substitution): Adjust call to write_number.
4782 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
4783 (write_expression): Handle non-type template arguments of
4784 reference type correctly.
4785 (mangle_thunk): Use write_signed_number.
4786
4787 2000-06-09 Chip Salzenberg <chip@valinux.com>
4788
4789 * mangle.c (find_substition): Don't mangle objects with typename
4790 substitutions (e.g. "cin" as "Si").
4791
4792 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
4793
4794 * call.c (add_candidate): Use ggc_alloc_cleared.
4795 * decl.c (lookup_label): Likewise.
4796 * lex.c (retrofit_lang_decl): Likewise.
4797
4798 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
4799
4800 * semantics.c (expand_body): Push to TV_EXPAND.
4801 * optimize.c (optimize_function): Push to TV_INTEGRATION.
4802 * decl.c (start_function): Always call announce_function.
4803
4804 * tinfo2.cc: Just declare abort.
4805
4806 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
4807
4808 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
4809 whenever @ is a symbolic name.
4810
4811 2000-06-08 Jakub Jelinek <jakub@redhat.com>
4812
4813 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
4814
4815 2000-06-07 Mark Mitchell <mark@codesourcery.com>
4816
4817 * decl.c (pushdecl): Look up functions by DECL_NAME, not
4818 DECL_ASSEMBLER_NAME.
4819
4820 2000-06-06 Mark Mitchell <mark@codesourcery.com>
4821
4822 * decl2.c (c_language): Define.
4823
4824 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
4825
4826 * lex.c (lang_init_options): Tweak.
4827
4828 * decl2.c: Remove #inclusion of diagnostic.h
4829 (lang_decode_option): Move diagnostic formatting options to
4830 toplevel.
4831
4832 * lang-options.h: Remove documentation for diagnostic options.
4833
4834 * Makefile.in (lex.o): Depends upon diagnostic.h
4835
4836 2000-06-06 Mark Mitchell <mark@codesourcery.com>
4837
4838 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
4839 the same DECL_RESULT, it's not a redefinition.
4840 * pt.c (tsubst_decl): Remove code to handle illegal
4841 specializations.
4842
4843 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
4844
4845 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
4846
4847 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
4848
4849 * search.c (maybe_suppress_debug_info): Don't check
4850 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
4851
4852 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
4853 here if extern_p.
4854
4855 Remember instantiation context in deferred instantiations.
4856 * cp-tree.h (struct tinst_level): Remove.
4857 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
4858 * pt.c (current_tinst_level): Now a tree.
4859 (print_template_context, push_tinst_level, pop_tinst_level,
4860 tinst_for_decl): Adjust.
4861 (reopen_tinst_level): New fn.
4862 (init_pt): Register current_tinst_level as a root.
4863 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
4864 of the pending templates list.
4865 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
4866 * lex.c (extract_interface_info): Adjust.
4867 * decl2.c (warn_if_unknown_interface): Adjust.
4868
4869 2000-06-05 Mark Mitchell <mark@codesourcery.com>
4870
4871 * class.c (indirect_primary_base_p): New function.
4872 (determine_primary_base): Use it.
4873
4874 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
4875
4876 Update new-abi dynamic cast algorithm.
4877 * tinfo.cc (__class_type_info::__dyncast_result): Add
4878 whole_details. Adjust constructor.
4879 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
4880 Avoid unnecessary searching.
4881 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
4882
4883 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4884
4885 * decl.c (init_decl_processing): Don't call record_component_aliases.
4886 * tree.c (build_cplus_array_type_1): Likewise.
4887
4888 2000-06-04 Mark Mitchell <mark@codesourcery.com>
4889
4890 * ir.texi: Correct typo.
4891 * mangle.c (write_expression): Handle non-type template arguments
4892 with reference type.
4893 * method.c (build_overload_value): Likewise.
4894 * pt.c (convert_nontype_argument): Explicitly represent conversion
4895 to a reference with an ADDR_EXPR.
4896 (unify): Always unify arguments in left-to-right order.
4897
4898 2000-06-03 Alex Samuel <samuel@codesourcery.com>
4899 Mark Mitchell <mark@codesourcery.com>
4900
4901 * Make-lang.in (CXX_SRCS): Add mangle.c.
4902 * Makefile.in (CXX_OBJS): Add mangle.o.
4903 (mangle.o): New rule.
4904
4905 * class.c (local_classes): New variable.
4906 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
4907 (get_vtt_name): Use mangle_vtt_name for new ABI.
4908 (init_class_processing): Initialize local_classes.
4909 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
4910 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
4911 (std_identifier): New macro.
4912 (DECL_VOLATILE_MEMFUNC_P): New macro.
4913 (DECL_NAMESPACE_STD_P): Likewise.
4914 (local_classes): Declare.
4915 (get_mostly_instantiated_function_type): Declare.
4916 (init_mangle): Declare.
4917 (mangle_decl): Likewise.
4918 (mangle_type_string): Likewise.
4919 (mangle_type): Likewise.
4920 (mangle_typeinfo_for_type): Likewise.
4921 (mangle_typeinfo_string_for_type): Likewise.
4922 (mangle_vtbl_for_type): Likewise.
4923 (mangle_vtt_for_type): Likewise.
4924 (mangle_ctor_vtbl_for_type): Likewise.
4925 (mangle_thunk): Likewise.
4926 (mangle_conv_op_name_for_type): Likewise.
4927 (mangle_guard_variable): Likewise.
4928 * decl.c (pushtag): Keep track of local classes.
4929 (initialize_predefined_identifiers): Initialize std_identifier.
4930 (init_decl_processing): Use std_identifier.
4931 (start_decl): Don't treat instantiations as specializations.
4932 (grokdeclarator): Likewise.
4933 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
4934 name for fully-instantiated templates.
4935 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
4936 destructors with the new ABI.
4937 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
4938 (grokfield): Use mangle_type for new ABI.
4939 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
4940 (get_sentry): Use mangle_guard_variable for new ABI.
4941 (start_static_initialization_or_destruction): Likewise.
4942 * expr.c (extract_aggr_init): Remove.
4943 (extract_scalar_init): Likewise.
4944 (extract_init): Remove #if 0'd code.
4945 * mangle.c: New function.
4946 * method.c (build_mangled_name): Assert not flag_new_abi.
4947 (build_static_name): Likewise.
4948 (build_decl_overload_real): Likewise.
4949 (build_typename_overload): Likewise.
4950 (build_overload_with_type): Likewise.
4951 (build_overload_name): Likewise.
4952 (get_ctor_vtbl_name): Likewise.
4953 (start_squangling): Likewise.
4954 (get_id_2): Likewise.
4955 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
4956 (init_method): Call init_mangle for new ABI.
4957 (make_thunk): Call mangle_thunk for new ABI.
4958 * operators.def: Correct new ABI manglings for the `%' operator.
4959 Add `::' operator.
4960 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
4961 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
4962 (lookup_template_class): Call mangle_decl for new ABI.
4963 (get_mostly_instantiated_function_type): New function.
4964 (set_mangled_name_for_template_decl): Use it.
4965 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
4966 the new ABI. Use mangle_conv_op_name_for_type for instantiated
4967 conversion op names.
4968 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
4969 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
4970 (tinfo_base_init): Likewise. Mangle typeinfo string name with
4971 mangle_typeinfo_string_for_type.
4972
4973 2000-06-03 Mark Mitchell <mark@codesourcery.com>
4974
4975 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
4976 (INNERMOST_TEMPLATE_ARGS): New macro.
4977 (innermost_args): Remove.
4978 (get_innermost_template_args): New function.
4979 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
4980 * error.c (dump_function_decl): Be caution when using
4981 most_general_template.
4982 * method.c (build_template_parm_names): Use
4983 INNERMOST_TEMPLATE_ARGS.
4984 * pt.c (add_to_template_args): Tidy comment
4985 (get_innermost_template_args): New function.
4986 (check_explicit_specialization): Clear DECL_INITIAL for a new
4987 specialization.
4988 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
4989 Tidy.
4990 (push_template_decl): Always register specializations of the most
4991 general template.
4992 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
4993 (coerce_template_parms): Likewise.
4994 (lookup_template_class): Likewise.
4995 (innermost_args): Remove.
4996 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
4997 (tsubst_decl): Handle tricky specializations. Use
4998 get_innermost_template_args.
4999 (instantiate_template): Simplify handling of partial
5000 instantiations.
5001 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
5002 (most_general_template): Reimplement, in a more straightforward
5003 manner.
5004 (regenerate_decl_from_template): Tweak formatting. Use
5005 TMPL_ARGS_DEPTH for clarity.
5006 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
5007
5008 * dump.c (dequeue_and_dump): Dump information about thunks.
5009
5010 2000-06-01 Richard Henderson <rth@cygnus.com>
5011
5012 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
5013
5014 2000-06-01 Richard Henderson <rth@cygnus.com>
5015
5016 * decl2.c (unsupported_options): Fix typo, make const.
5017 (lang_decode_option): Fix bsearch argument order.
5018
5019 2000-06-01 Mark Mitchell <mark@codesourcery.com>
5020
5021 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
5022 on FIELD_DECLs.
5023
5024 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5025
5026 * cp-tree.h (c_get_alias_set): Deleted.
5027 * Makefile.in (decl.o): Include ../expr.h.
5028 * decl.c (expr.h): Include.
5029 (init_decl_processing): Call record_component_aliases for arrays.
5030 (grokdeclarator): Likewise.
5031 Set TREE_ADDRESSABLE for fields that aren't bitfields.
5032 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
5033
5034 2000-05-31 Mark Mitchell <mark@codesourcery.com>
5035
5036 Remove guiding declaration support.
5037 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
5038 (flag_guiding_decls): Remove.
5039 * call.c (build_user_type_conversion_1): Remove support for
5040 guiding decls.
5041 (build_new_function_call): Likewise.
5042 (build_new_op): Likewise.
5043 (build_new_method_call): Likewise.
5044 * decl.c (start_function): Likewise.
5045 * friend.c (is_friend): Likewise.
5046 (do_friend): Likewise.
5047 * decl2.c ((flag_dump_translation_unit): Make it const.
5048 (flag_guiding_decls): Remove.
5049 (unsupported_options): New variable
5050 (compare_options): New function.
5051 (lang_decode_option): Use them.
5052
5053 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
5054
5055 * method.c (mangle_expression): Adjust test for legal expression
5056 operators.
5057
5058 * pt.c (instantiate_decl): Save and restore the local
5059 specializations list.
5060
5061 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
5062
5063 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
5064
5065 2000-05-30 Mark Mitchell <mark@codesourcery.com>
5066
5067 * call.c (add_template_candidate_real): Handle member template
5068 constructors for classes with virtual bases.
5069 (build_user_type_conversion_1): Use in_charge_arg_for_name.
5070 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
5071
5072 * ir.texi: Update thunk documentation.
5073
5074 * call.c (joust): Fix handling of overloaded builtin operators.
5075
5076 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
5077
5078 * cp-tree.h (DECL_ANTICIPATED): New macro.
5079 Document new use of DECL_LANG_FLAG_7.
5080 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
5081 in the user namespace.
5082 * lex.c (do_identifier): If the identifier's declaration has
5083 DECL_ANTICIPATED on, it has not yet been declared. But do not
5084 replace it with an ordinary implicit declaration.
5085
5086 * tinfo2.cc: Include stdlib.h.
5087
5088 2000-05-29 Mark Mitchell <mark@codesourcery.com>
5089
5090 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
5091 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
5092 CLASSTYPE_ALIGN.
5093
5094 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
5095
5096 * decl2.c (lang_decode_option): Use skip_leading_substring instead
5097 of plain strncmp.
5098
5099 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
5100
5101 * operators.def (<?): Duplicated, should have been...
5102 (>?): this. Fixed.
5103
5104 2000-05-27 Alex Samuel <samuel@codesourcery.com>
5105 Mark Mitchell <mark@codesourcery.com>
5106
5107 * cp-tree.h (ansi_opname): Make it a macro.
5108 (ansi_assopname): Likewise.
5109 (struct lang_decl_flags): Add assignment_operator_p.
5110 (struct lang_decl): Add operator_code.
5111 (DECL_VTT_PARM): Adjust.
5112 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
5113 overloaded operator.
5114 (SET_OVERLOADED_OPERATOR_CODE): New macro.
5115 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
5116 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
5117 (opname_tab): Remove.
5118 (assignop_tab): Likewise.
5119 (operator_name_info_t): New type.
5120 (operator_name_info): New variable.
5121 (assignment_operator_name_info): Likewise.
5122 (build_cp_library_fn): Remove declaration.
5123 (push_cp_library_fn): Likewise.
5124 (operator_name_string): Likewise.
5125 (build_decl_overload): Likewise.
5126 * call.c (print_z_candidates): Simplify.
5127 (build_object_call): Adjust usage of ansi_opname. Use
5128 DECL_OVERLOADED_OPERATOR_P.
5129 (op_error): Adjust operator name lookup.
5130 (build_conditional_expr): Adjust usage of ansi_opname.
5131 (build_new_op): Likewise.
5132 (build_op_delete_call): Likewise.
5133 (build_over_call): Likewise.
5134 (joust): Use DECL_OVERLOADED_OPERATOR_P.
5135 * decl.c (duplicate_decls): Copy operator_code.
5136 (init_decl_processing): Adjust parameters to push_cp_library_fn.
5137 (builtin_function): Adjust parameters to build_library_fn_1.
5138 (build_library_fn_1): Accept an overloaded operator code.
5139 (build_library_fn): Pass ERROR_MARK.
5140 (build_cp_library_fn): Accept an overloaded operator code.
5141 (push_cp_library_fn): Likewise.
5142 (grokfndecl): Tweak.
5143 (grokdeclarator): Simplify code to compute names of overloaded
5144 operators. Adjust use of ansi_opname.
5145 (ambi_op_p): Work on tree_codes, not identifiers.
5146 (unary_op_p): Likewise.
5147 (grok_op_properties): Likewise.
5148 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
5149 (lang_mark_tree): Don't try to mark the operator_code.
5150 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
5151 * error.c (dump_decl): Remove special handling for operator
5152 names.
5153 (dump_function_name): Likewise.
5154 (dump_expr): Adjust name lookup of operators.
5155 (op_to_string): Simplify.
5156 (assop_to_string): Likewise.
5157 * init.c (build_new_1): Adjust use of ansi_opname.
5158 * lex.c (opname_tab): Remove.
5159 (assignop_tab): Likewise.
5160 (ansi_opname): Likewise.
5161 (ansi_assopname): Likewise.
5162 (operator_name_string): Likewise.
5163 (reinit_lang_specific): Likewise.
5164 (operator_name_info): New variable.
5165 (assignment_operator_name_info): Likewise.
5166 (init_operators): New function.
5167 (init_parse): Use it.
5168 (do_identifier): Adjust use of ansi_opname.
5169 * method.c (mangle_expression): Don't use ansi_opname for
5170 mangling.
5171 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
5172 (build_decl_overload): Remove.
5173 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
5174 (do_build_assign_ref): Adjust use of ansi_opname.
5175 (synthesize_method): Likewise.
5176 (implicitly_declare_fn): Likewise.
5177 * operators.def: New file.
5178 * parse.y (operator): Adjust use of ansi_opname.
5179 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
5180 (set_mangled_name_for_template_decl): Don't play games with
5181 current_namespace.
5182 (special_function_p): Adjust use of ansi_opname.
5183 * typeck.c (check_return_expr): Likewise.
5184 * Make-lang.in (cc1plus): Depend on operators.def.
5185 * Makefile.in (lex.o): Likewise.
5186 (decl.o): Likewise.
5187
5188 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
5189
5190 * Make-lang.in (cplib2.ready): Eradicate.
5191
5192 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5193
5194 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
5195 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
5196 (built_min, cp_tree_equal): Likewise.
5197
5198 2000-05-26 Mark Mitchell <mark@codesourcery.com>
5199
5200 * class.c (layout_nonempty_base_or_field): Replace
5201 `record_layout_info' with `record_layout_info_s'.
5202
5203 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
5204
5205 Fix goto checking.
5206 * cp-tree.h (struct language_function): x_named_labels is now
5207 a struct named_label_list*.
5208 * decl.c (struct named_label_use_list): Renamed from...
5209 (struct named_label_list): ...this. New struct.
5210 (push_binding_level): Don't set eh_region.
5211 (note_level_for_eh): New fn.
5212 (pop_label): Take label and old value directly.
5213 (pop_labels): Adjust for new named_labels format.
5214 (lookup_label): Likewise.
5215 (poplevel): Note characteristics of a binding level containing a
5216 named label. Mess with named label lists earlier.
5217 (mark_named_label_lists): New fn.
5218 (mark_lang_function): Call it.
5219 (use_label): New fn, split out from...
5220 (make_label_decl): ...here. Don't call it.
5221 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
5222 check_previous_gotos): New fns, split out from...
5223 (define_label): ...here.
5224 (check_switch_goto): New fn.
5225 (define_case_label): Call it.
5226 (check_goto): New fn.
5227 * semantics.c (finish_goto_stmt): Call it and use_label.
5228 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
5229 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
5230
5231 2000-05-26 Mark Mitchell <mark@codesourcery.com>
5232
5233 * class.c (build_vtable_entry_ref): Correct usage of
5234 get_vtbl_decl_for_binfo.
5235
5236 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
5237 * method.c (implicitly_declare_fn): Not here.
5238
5239 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
5240
5241 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
5242 (CPTI_PTMD_DESC_TYPE): ... here.
5243 (ptmd_desc_type_node): Rename to ...
5244 (ptm_desc_type_node): ... here.
5245 * decl.c: Likewise.
5246 * rtti.c (ptmd_initializer): Rename to ...
5247 (ptm_initializer): ... here.
5248 (sythesize_tinfo_var): Adjust. Deal with pointer to member
5249 function.
5250 (create_tinfo_types): Adjust.
5251
5252 2000-05-25 Mark Mitchell <mark@codesourcery.com>
5253
5254 Finish implementation of VTTs.
5255 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
5256 CPTI_VTT_PARM_IDENTIFIER.
5257 (vtt_parm_identifier): New macro.
5258 (vtt_parm_type): Likewise.
5259 (BINFO_SUBVTT_INDEX): Likewise.
5260 (BINFO_VPTR_INDEX): Likewise.
5261 (struct lang_decl): Add vtt_parm.
5262 (DECL_VTT_PARM): New macro.
5263 (DECL_USE_VTT_PARM): Likewise.
5264 (DECL_NEEDS_VTT_PARM_P): Likewise.
5265 (get_vtt_name): Declare.
5266 (build_artifical_parm): Likewise.
5267 (fixup_all_virtual_upcast_offsets): Likewise.
5268 (expand_indirect_vtbls_init): Remove.
5269 * call.c (build_new_method_call): Pass the vtt to subobject
5270 constructors and destructors.
5271 * class.c (get_vtt_name): Give it external linkage.
5272 (build_clone): Handle the magic VTT parameters for clones.
5273 (clone_function_decl): Fix typo in comment.
5274 (build_vtt): Keep track of the indices in the VTTs where various
5275 entities are stored.
5276 (build_vtt_inits): Likewise.
5277 (dfs_build_vtt_inits): Likewise.
5278 (build_ctor_vtbl_group): Tweak type of construction vtables.
5279 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
5280 primary bases, when building construction vtables.
5281 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
5282 (initialize_predefined_identifiers): Add vtt_parm_identifier.
5283 (init_decl_processing): Initialize vtt_parm_type.
5284 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
5285 (lang_mark_tree): Make vtt_parm.
5286 * decl2.c (build_artificial_parm): New function.
5287 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
5288 (grokclassfn): Use build_artificial_parm.
5289 * init.c (initialize_vtbl_ptrs): Call
5290 fixup_all_virtual_upcast_offsets directly.
5291 (perform_member_init): Use the complete subobject destructor for
5292 member cleanups.
5293 (build_vtbl_address): New function.
5294 (expand_virtual_init): Handle VTTs.
5295 * optimize (maybe_clone_body): Likewise.
5296 * search.c (fixup_all_virtual_upcast_offsets): Give it external
5297 linkage.
5298 (expand_indirect_vtbls_init): Remove.
5299 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
5300 * tree.c (make_binfo): Make them bigger.
5301
5302 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
5303
5304 * inc/cxxabi.h (__pbase_type_info): Define, based on
5305 __pointer_type_info.
5306 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
5307 (__pointer_to_member_type_info): Likewise.
5308 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
5309 (__pointer_to_member_type_info::__is_pointer_p): Remove.
5310 (__pointer_type_info::__do_catch): Rename to ...
5311 (__pbase_type_info::__do_catch): ... here. Adjust.
5312 (__pbase_type_info::__pointer_catch): Implement.
5313 (__pointer_type_info::__pointer_catch): Adjust.
5314 (__pointer_to_member_type_info::__pointer_catch): Adjust.
5315
5316 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
5317
5318 * tinfo.h (__user_type_info::contained_virtual_p): New
5319 predicate.
5320 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
5321 shaped heirarchy.
5322 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
5323 diamond shaped heirarchy. Add early out for mixed diamond and
5324 duplicate shaped heirarchy.
5325
5326 2000-05-24 Mark Mitchell <mark@codesourcery.com>
5327
5328 * cp-tree.h (build_delete): Change prototype.
5329 (build_vec_delete): Likewise.
5330 * call.c (build_scoped_method_call): Use special_function_kind
5331 values to indicate the kind of destruction to be done.
5332 (build_method_call): Likewise.
5333 * decl.c (finish_destructor_body): Likewise.
5334 (maybe_build_cleanup_1): Likewise. Rename to ...
5335 (maybe_build_cleanup): ... this.
5336 * decl2.c (delete_sanity): Use special_function_kind
5337 values to indicate the kind of destruction to be done.
5338 (build_cleanup): Likewise.
5339 * init.c (perform_member_init): Likewise.
5340 (build_vec_delete_1): Likewise.
5341 (build_dtor_call): Simplify.
5342 (build_delete): Use special_function_kind
5343 values to indicate the kind of destruction to be done.
5344 (build_vbase_delete): Likewise.
5345 (build_vec_delete): Likewise.
5346
5347 * init.c (sort_member_init): Fix typo in error message generation
5348 code.
5349
5350 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
5351
5352 * semantics.c (begin_class_definition): make the packed
5353 attribute be sensitive to the "-fpack-struct" command line flag
5354
5355 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
5356
5357 Update new-abi upcast algorithm.
5358 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
5359 prototype and meaning of return value.
5360 (__si_class_type_info::__do_upcast): Likewise.
5361 (__vmi_class_type_info::__do_upcast): Likewise.
5362 * tinfo.cc (__class_type_info::__upcast_result): Replace
5363 whole2dst with part2dst. Adjust ctor.
5364 (__class_type_info::__do_upcast): Adjust call of worker function.
5365 (__class_type_info::__do_upcast): Adjust.
5366 (__si_class_type_info::__do_upcast): Adjust. Use parent's
5367 __do_upcast.
5368 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
5369 virtual base in diamond heirarchy bug.
5370
5371 2000-05-23 Mark Mitchell <mark@codesourcery.com>
5372
5373 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
5374 and bitfield to tinfo_fn_p.
5375 (DECL_TINFO_FN_P): Adjust.
5376 (SET_DECL_TINFO_FN_P): Likewise.
5377 (DECL_MUTABLE_P): Likewise.
5378 (DECL_C_BIT_FIELD): Likewise.
5379 (SET_DECL_C_BIT_FIELD): Likewise.
5380 (CLEAR_DECL_C_BIT_FIELD): Likewise.
5381 (DECL_UNINLINABLE): Likewise.
5382 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
5383 (handle_using_decl): Remove assertion.
5384 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
5385 to build FIELD_DECLs.
5386 (build_base_field): Likewise.
5387 (layout_class_type): Likewise.
5388 * decl.c (init_decl_processing): Likewise.
5389 (build_ptrmemfunc_type): Likewise.
5390 (grokdeclarator): Likewise.
5391 * decl2.c (grok_x_components): Likewise.
5392 * except.c (call_eh_info): Likewise.
5393 * init.c (init_init_processing): Likewise.
5394 * rtti.c (expand_class_desc): Likewise.
5395 (create_pseudo_type_info): Likewise.
5396 (get_vmi_pseudo_type_info): Likewise.
5397 (create_tinfo_types): Likewise.
5398 * ptree.c (print_lang_decl): Adjust.
5399 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
5400 before checking DECL_MUTABLE_P.
5401
5402 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
5403 parameters for template functions.
5404 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
5405 destructors as well as constructors.
5406
5407 2000-05-22 Mark Mitchell <mark@codesourcery.com>
5408
5409 * class.c (build_ctor_vtbl_group): Set inits.
5410 * optimize.c (maybe_clone_body): Set DECL_INLINE and
5411 DECL_THIS_INLINE appropriately for clones.
5412
5413 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
5414 (DECL_CONV_FN_P): Simplify.
5415 (DECL_OPERATOR): Remove.
5416 (language_to_string): Declare.
5417 * decl.c (duplicate_decls): Fix typo in comment.
5418 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
5419 (grok_op_properties): Use DECL_CONV_FN_P instead of
5420 IDENTIFIER_TYPENAME_P.
5421 * dump.c (dequeue_and_dump): Dump the language linkage of
5422 declarations.
5423 * error.c (language_to_string): Give it external linkage.
5424 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
5425 (implicitly_declare_fn): Set DECL_LANGUAGE.
5426 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
5427 IDENTIFIER_TYPENAME_P.
5428 (tsubst_decl): Likewise.
5429 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
5430 * semantics.c (finish_member_declaration): Don't mark members of
5431 classes declared in an extern "C" region as extern "C".
5432
5433 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5434
5435 * decl2.c (qualified_lookup_using_namespace): Look through
5436 namespace aliases.
5437
5438 * decl.c (push_using_decl): Return the old decl on namespace level.
5439
5440 2000-05-21 Mark Mitchell <mark@codesourcery.com>
5441
5442 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
5443 (VTT_NAME_PREFIX): New macro.
5444 (CTOR_VTBL_NAME_PREFIX): Likewise.
5445 (get_ctor_vtbl_name): New function.
5446 * class.c (get_vtable_name): Simplify.
5447 (get_vtt_name): New function.
5448 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
5449 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
5450 when a virtual base becomes primary.
5451 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
5452 VTTs.
5453 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
5454 additional parameters.
5455 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
5456 (initialize_array): New function.
5457 (build_vtt): Likewise.
5458 (build_vtt_inits): Likewise.
5459 (dfs_build_vtt_inits): Likewise.
5460 (dfs_fixup_binfo_vtbls): Likewise.
5461 (build_ctor_vtbl_group): Likewise.
5462 (initialize_vtable): Use initialize_array.
5463 (accumulate_vtbl_inits): Reimplement to handle construction
5464 vtables.
5465 (dfs_accumulate_vtbl_inits): Likewise.
5466 (bulid_vtbl_initializer): Adjust parameter name.
5467 * method.c (build_typename_overload): Remove #if 0'd code.
5468 (get_ctor_vtbl_name): New function.
5469 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
5470 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
5471
5472 * cp-tree.h (struct lang_type): Remove search_slot.
5473 (CLASSTYPE_SEARCH_SLOT): Remove.
5474 (emit_base_init): Change prototype.
5475 (initialize_vtbl_ptrs): Likewise.
5476 (expand_indirect_vtbls_init): Likewise.
5477 (clear_search_slots): Remove.
5478 * decl.c (lang_mark_tree): Don't mark search_slot.
5479 * init.c (initialize_vtbl_ptrs): Simplify.
5480 (emit_base_init): Likewise.
5481 * search.c (struct vbase_info): Document decl_ptr.
5482 (convert_pointer_to_single_level): Remove.
5483 (dfs_find_vbases): Remove.
5484 (dfs_init_base_pointers): Simplify.
5485 (dfs_clear_vbase_slots): Remove.
5486 (dfs_vtable_path_unmark): New function.
5487 (init_vbase_pointers): Simplify.
5488 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
5489 (expand_indirect_vtbls_init): Simplify. Don't call
5490 mark_all_temps_used.
5491 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
5492 initialize_vtbl_ptrs.
5493
5494 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
5495
5496 * except.c: Add static prototypes.
5497
5498 2000-05-20 H.J. Lu <hjl@gnu.org>
5499
5500 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
5501
5502 2000-05-19 Mark Mitchell <mark@codesourcery.com>
5503
5504 Don't create a separate copy of virtual bases for the
5505 CLASSTYPE_VBASECLASSES list.
5506 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
5507 (BINFO_FOR_VBASE): Remove.
5508 (CANONICAL_BINFO): Adjust.
5509 (binfo_for_vbase): New function.
5510 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
5511 instead of BINFO_FOR_VBASE.
5512 (build_vbase_pointer): Likewise.
5513 (build_secondary_vtable): Likewise.
5514 (dfs_mark_primary_bases): Likewise.
5515 (mark_primary_bases): Likewise.
5516 (layout_nonempty_base_or_field): Likewise.
5517 (dfs_set_offset_for_shared_vbases): Likewise.
5518 (dfs_set_offset_for_unshared_vbases): Likewise.
5519 (layout_virtual_bases): Likewise. Adjust for changes to the
5520 CLASSTYPE_VBASECLASSES list.
5521 (dump_class_hierarchy_r): Use binfo_for_vbase
5522 instead of BINFO_FOR_VBASE.
5523 (dump_class_hierarchy): Likewise.
5524 (finish_vtbls): Likewise.
5525 (build_vtbl_initializer): Adjust for changes to the
5526 CLASSTYPE_VBASECLASSES list.
5527 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
5528 * decl.c (finish_destructor_body): Adjust for changes to the
5529 CLASSTYPE_VBASECLASSES list.
5530 * init.c (sort_base_init): Use binfo_for_vbase.
5531 (construct_virtual_bases): Adjust for changes to the
5532 CLASSTYPE_VBASECLASSES list.
5533 (expand_member_init): Use binfo_for_vbase.
5534 (build_vbase_delete): Adjust for changes to the
5535 CLASSTYPE_VBASECLASSES list.
5536 * method.c (do_build_copy_constructor): Likewise.
5537 * rtti.c (get_base_offset): Use binfo_for_vbase.
5538 (expand_class_desc): Remove #if 0'd code.
5539 * search.c (struct vbase_info): Remove vbase_types.
5540 (get_base_distance): Use binfo_for_vbase.
5541 (lookup_field_queue_p): Use CANONICAL_BINFO.
5542 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
5543 (get_pure_virtuals): Adjust for changes to the
5544 CLASSTYPE_VBASECLASSES list.
5545 (dfs_find_vbases): Use binfo_for_vbase.
5546 (dfs_init_vbase_pointers): Likewise.
5547 (init_vbase_pointers): Don't initialize vi.vbase_types.
5548 (virtual_context): Use binfo_for_vbase.
5549 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
5550 CLASSTYPE_VBASECLASSES list.
5551 (expand_indirect_vtbls_init): Simplify.
5552 (dfs_get_vbase_types): Don't replicate virtual bases.
5553 (find_vbase_instance): Use binfo_for_vbase.
5554 (binfo_for_vbase): New function.
5555 * typeck.c (get_delta_difference): Use binfo_for_vbase.
5556
5557 2000-05-17 Mark Mitchell <mark@codesourcery.com>
5558
5559 * decl2.c (finish_anon_union): Generalize error messages to handle
5560 anonymous structures.
5561 * init.c (perform_member_init): Remove `name' parameter.
5562 (build_field_list): New function.
5563 (sort_member_init): Handle anonymous union initialization order
5564 correctly. Check for multiple initializations of the same union.
5565 (emit_base_init): Don't look up fields by name here.
5566 (expand_member_init): Record the result of name lookup for future
5567 reference.
5568 * typeck.c (build_component_ref): Fix formatting.
5569
5570 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
5571
5572 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
5573 * typeck.c (build_x_compound_expr): Replace warn_unused with
5574 warn_unused_value.
5575
5576 * decl2.c (lang_decode_option): Update -Wall unused flags by
5577 calling set_Wunused.
5578
5579 2000-05-16 Mark Mitchell <mark@codesourcery.com>
5580
5581 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
5582 * init.c (dfs_vtable_path_unmark): Remove.
5583 * search.c (marked_new_vtable_p): Likewise.
5584 (unmarked_new_vtable_p): Likewise.
5585 (dfs_search_slot_nonempty_p): Likewise.
5586 (dfs_mark): Likewise.
5587 (dfs_vtable_path_unmark): Likewise.
5588 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
5589 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
5590 (dfs_init_vbase_pointers): Remove special-case new ABI code.
5591 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
5592 (init_vbase_pointers): Simplify.
5593 (expand_indirect_vtbls_init): Likewise.
5594
5595 * class.c (copy_virtuals): New function.
5596 (build_primary_table): Use it.
5597 (build_secondary_vtable): Likewise.
5598 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
5599 indicate that no vcall offset is required.
5600 (add_virtual_function): Likewise.
5601 (modify_all_vtables): Likewise.
5602 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5603 (dfs_accumulate_vtbl_inits): Likewise.
5604 (build_vtbl_initializer): Make changes to handle construction
5605 vtables.
5606 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5607 (build_rtti_vtbl_entries): Likewise.
5608 (build_vtable_entries): Handle a NULL vcall_index.
5609
5610 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
5611
5612 * decl2.c (lang_decode_option): Fix thinko.
5613
5614 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
5615
5616 * except.c (check_handlers): New fn.
5617 * cp-tree.h: Declare it.
5618 * semantics.c (finish_handler_sequence): Call it.
5619 (finish_function_handler_sequence): Likewise.
5620 (finish_handler_parms): Set TREE_TYPE on the handler.
5621 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
5622 * search.c (get_base_distance_recursive): If protect>1, ignore
5623 special access.
5624 (get_base_distance): Don't reduce watch_access.
5625
5626 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
5627
5628 * lex.c: #include diagnostic.h.
5629 (lang_init_options): Set default prefixing rules.
5630
5631 * lang-options.h: Add -fdiagnostics-show-location=.
5632
5633 * decl2.c: #include diagnostic.h.
5634 (lang_decode_option): Handle -fdiagnostics-show-location=.
5635
5636 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
5637
5638 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
5639 * vec.cc: Revert my 2000-05-07 change.
5640
5641 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
5642
5643 * class.c (check_field_decls): Complain about non-static data
5644 members with same name as class in class with constructor.
5645
5646 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
5647
5648 * decl.c (grokdeclarator): Allow non-static data members with
5649 same name as class.
5650
5651 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
5652
5653 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
5654 and pending_inline.filename. Update prototypes.
5655 * decl.c (define_label): Constify filename parameter.
5656 * decl2.c (warn_if_unknown_interface): Constify local char *.
5657 * input.c Constify input_source.filename. Don't declare
5658 input_filename or lineno. Constify filename parameter to feed_input.
5659 * lex.c (init_parse): Constify parameter and return value.
5660 (cp_pragma_interface, cp_pragma_implementation): Constify
5661 filename argument.
5662 (reinit_parse_for_method, reinit_parse_for_block,
5663 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
5664 Constify local char *.
5665 * pt.c: Don't declare lineno or input_filename.
5666 (print_template_context, tsubst_friend_function, tsubst_decl,
5667 tsubst, instantiate_decl): Constify local char *.
5668 * semantics.c (expand_body): Constify local char *.
5669 * tree.c (build_srcloc): Constify filename parameter.
5670 * typeck.c (c_expand_asm_operands): Constify filename
5671 parameter.
5672
5673 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
5674
5675 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
5676 offsetof expansion.
5677
5678 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
5679
5680 * inc/cxxabi.h: Fix typos in comment.
5681 (__base_class_info::__offset): Use a static_cast.
5682
5683 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
5684
5685 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
5686 of std::size_t and std::ptrdiff_t respectively.
5687 * tinfo.cc: Likewise.
5688 * vec.cc: Likewise.
5689
5690 2000-05-06 Richard Henderson <rth@cygnus.com>
5691
5692 * typeck.c (build_c_cast): Don't warn integer->pointer size
5693 mismatch for constants.
5694
5695 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
5696
5697 * rtti.c (ptmd_initializer): Set non-public, if class is
5698 incomplete.
5699
5700 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
5701 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5702 __cxa_vec_delete): Likewise.
5703 * tinfo.cc (__dynamic_cast): Likewise.
5704 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5705 __cxa_vec_delete): Likewise.
5706
5707 2000-05-04 Mark Mitchell <mark@codesourcery.com>
5708
5709 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
5710 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
5711 (lang_decl_flags): Add vcall_offset.
5712 (THUNK_VCALL_OFFSET): Use it.
5713 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
5714 * method.c (make_thunk): Create the lang_decl here, not in
5715 emit_thunk.
5716 (emit_thunk): Make generic thunks into ordinary functions once
5717 they have been fed to expand_body.
5718 * semantics.c (expand_body): Set current_function_is_thunk here.
5719
5720 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5721
5722 * class.c (update_vtable_entry_for_fn): Prototype.
5723
5724 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
5725 and `tmpl'.
5726
5727 * search.c (dfs_build_inheritance_graph_order): Prototype.
5728
5729 2000-05-04 Mark Mitchell <mark@codesourcery.com>
5730
5731 * cp-tree.h (special_function_kind): Add various kinds of
5732 destructors.
5733 (special_function_p): New function.
5734 * class.c (overrides): Don't let one kind of destructor override
5735 another.
5736 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
5737 whether or not to instantiate a template.
5738 * tree.c (special_function_p): Define.
5739
5740 2000-05-03 Mark Mitchell <mark@codesourcery.com>
5741
5742 * cp-tree.def (THUNK_DECL): Remove.
5743 * cp-tree.h (DECL_THUNK_P): New macro.
5744 (DECL_NON_THUNK_FUNCTION_P): Likewise.
5745 (DECL_EXTERN_C_FUNCTION_P): Likewise.
5746 (SET_DECL_THUNK_P): Likewise.
5747 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
5748 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
5749 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
5750 * decl.c (decls_match): Use DECL_EXTERN_C_P.
5751 (duplicate_decls): Likewise.
5752 (pushdecl): Likewise. Adjust thunk handling.
5753 (grokfndecl): Use DECL_EXTERN_C_P.
5754 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
5755 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
5756 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
5757 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
5758 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
5759 DECL_NO_STATIC_CHAIN.
5760 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
5761 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
5762 * search.c (covariant_return_p): Remove THUNK_DECL handling.
5763 * ir.texi: Update.
5764
5765 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
5766
5767 * tree.c (walk_tree): Set lineno.
5768
5769 2000-05-01 Mark Mitchell <mark@codesourcery.com>
5770
5771 * exception.cc: Update license notice.
5772 * new.cc: Likewise.
5773 * new1.cc: Likewise.
5774 * new2.cc: Likewise.
5775 * tinfo.cc: Likewise.
5776 * tinfo2.cc: Likewise.
5777 * vec.cc: Likewise.
5778 * inc/cxxabi.h: Likewise.
5779 * inc/exception: Likewise.
5780 * inc/new: Likewise.
5781 * inc/new.h: Likewise.
5782 * inc/typeinfo: Likewise.
5783
5784 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
5785
5786 * tree.c (build_target_expr_with_type): If we already have a
5787 TARGET_EXPR, just return it.
5788
5789 * optimize.c (initialize_inlined_parameters): Don't generate an
5790 EXPR_STMT if we can just use DECL_INITIAL.
5791 * decl.c (emit_local_var): Only make the initialization a
5792 full-expression if stmts_are_full_exprs_p.
5793
5794 2000-05-01 Mark Mitchell <mark@codesourcery.com>
5795
5796 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
5797 macro.
5798 * call.c (standard_conversion): Use it.
5799 (direct_reference_binding): Likewise.
5800 (build_over_call): Likewise.
5801 (is_properly_derived_from): Likewise.
5802 (compare_ics): Likewise.
5803 * class.c (resolves_to_fixed_type_p): Likewise.
5804 * optimize.c (declare_return_variable): Likewise.
5805 * pt.c (is_specialization_of): Likewise.
5806 (unify): Likewise.
5807 * typeck.c (comp_target_parms): Likeiwse.
5808 (build_static_cast): Likewise.
5809 (build_reinterpret_cast): Likewise.
5810 (build_const_cast): Likewise.
5811 (comp_ptr_ttypes_real): Likewise.
5812 (comp_ptr_ttypes_const): Likewise.
5813 * typeck2.c (process_init_constructor): Likewise.
5814
5815 2000-04-30 Scott Snyder <snyder@fnal.gov>
5816
5817 * decl.c (finish_destructor_body): Use the base destructor when
5818 destroying virtual bases.
5819
5820 2000-04-30 Mark Mitchell <mark@codesourcery.com>
5821
5822 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
5823 STMT_EXPRs.
5824 * optimize.c (struct inline_data): Add target_exprs field.
5825 (declare_return_variable): When a function returns an aggregate,
5826 use the variable declared in the TARGET_EXPR as the remapped
5827 DECL_RESULT.
5828 (expand_call_inline): Update the pending target_exprs stack.
5829 (optimize_function): Initialize the stack.
5830
5831 * decl2.c (finish_file): Fix typo in comment.
5832
5833 * method.c (emit_thunk): Don't try to return a `void' value.
5834
5835 * optimize.c (initialize_inlined_parameters): If the parameter is
5836 addressable, we need to make a new VAR_DECL, even if the
5837 initializer is constant.
5838
5839 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
5840
5841 * decl.c (grok_op_properties): Add an extra check of argtypes.
5842
5843 2000-04-27 Mark Mitchell <mark@codesourcery.com>
5844
5845 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
5846 variables.
5847 (initialize_inlined_parameters): Try to avoid creating new
5848 VAR_DECLs.
5849
5850 2000-04-27 Alex Samuel <samuel@codesourcery.com>
5851
5852 * lex.c (my_get_run_time): Remove.
5853 (init_filename_times): Use get_run_time instead of my_get_run_time.
5854 (check_newline): Likewise.
5855 (dump_time_statistics): Likewise.
5856 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
5857 of computing elapsed time explicitly.
5858
5859 2000-04-26 Mark Mitchell <mark@codesourcery.com>
5860
5861 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
5862 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
5863 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
5864 before calling decl_constant_value.
5865 * class.c (check_bitfield_decl): Likewise.
5866 * cvt.c (ocp_convert): Likewise.
5867 (convert): Likewise.
5868 * decl.c (compute_array_index_type): Likewise.
5869 (build_enumerator): Likewise.
5870 * decl2.c (check_cp_case_value): Likewise.
5871 * pt.c (convert_nontype_argument): Likewise.
5872 (tsubst): Likewise.
5873 * typeck.c (decay_conversion): Likewise.
5874 (build_compound_expr): Likewise.
5875 (build_reinterpret_cast): Likewise.
5876 (build_c_cast): Likewise.
5877 (convert_for_assignment): Likewise.
5878
5879 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
5880
5881 * decl.c (finish_function): Don't play games with DECL_INLINE.
5882
5883 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
5884
5885 * ir.texi: Correct typo.
5886
5887 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5888
5889 * decl.c (grokdeclarator): Reject VLAs as members.
5890
5891 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
5892
5893 * call.c (standard_conversion): Accept conversion between
5894 COMPLEX_TYPEs.
5895
5896 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
5897
5898 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
5899
5900 * decl2.c (finish_file): Remove double setup for accounting
5901 compile time.
5902
5903 2000-04-24 Robert Lipe <robertlipe@usa.net>
5904
5905 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
5906
5907 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
5908
5909 * new.cc (set_new_handler): Needs to be in std::.
5910
5911 2000-04-23 Mark Mitchell <mark@codesourcery.com>
5912
5913 * cp-tree.h (lang_decl): Remove pretty_function_p.
5914 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
5915 language-specific node.
5916 * decl.c (cp_make_fname_decl): Use build_decl, not
5917 build_lang_decl, to build the variables.
5918 (grokvardecl): Don't call build_lang_decl for local variables in
5919 templates.
5920 (grokdeclarator): Don't call build_lang_decl for local type
5921 declarations in templates.
5922 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
5923 zero'd memory, rather than calling memset.
5924 * pt.c: Include hashtab.h.
5925 (local_specializations): New variable.
5926 (retrieve_local_specialization): Use it.
5927 (register_local_specialization): Likewise.
5928 (tsubst_decl): Don't assume local variables have
5929 DECL_LANG_SPECIFIC.
5930 (instantiate_decl): Set up local_specializations.
5931 * Makefile.in (HTAB_H): New variable.
5932
5933 2000-04-23 Richard Henderson <rth@cygnus.com>
5934
5935 * typeck.c (c_expand_asm_operands): Restore the original
5936 contents of the output list.
5937
5938 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
5939
5940 * ir.texi: Document complex number representation.
5941
5942 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
5943
5944 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
5945 (target_incomplete_p): New function.
5946 (tinfo_base_init): Create comdat NTBS name variable.
5947 (ptr_initializer): Add non_public parameter. Calculate it.
5948 (ptmd_initializer): Likewise.
5949 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
5950 (create_real_tinfo_var): Add non_public parameter. Use it.
5951 Push proxy into global namespace.
5952 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
5953 New enumeration.
5954 * inc/typeinfo (type_info::before, type_info::operator==):
5955 Compare __name addresses.
5956
5957 * tinfo2.cc: Remove new-abi builtins comment.
5958
5959 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
5960
5961 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
5962
5963 * call.c (joust): Exit early if we get the same function, too.
5964
5965 * decl2.c (key_method): Return NULL_TREE for template classes.
5966 (import_export_class): Don't need to check for template classes.
5967
5968 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
5969
5970 * lex.c: Remove references to cccp.c.
5971
5972 2000-04-18 Mark Mitchell <mark@codesourcery.com>
5973
5974 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
5975 volatile_memfunc. Add destructor_attr. Adjust dummy.
5976 (DECL_DESTRUCTOR_P): Use destructor_attr.
5977 (DECL_CONST_MEMFUNC_P): Reimplement.
5978 (DECL_VOLATILE_MEMFUNC_P): Remove.
5979 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
5980 (overrides): Use DECL_DESTRUCTOR_P.
5981 (check_for_override): Likewise.
5982 * decl.c (start_function): Likewise.
5983 * decl2.c (grokfclassfn): Likewise.
5984 (check_classfn): Likewise.
5985 (grok_function_init): Likewise.
5986
5987 2000-04-17 Mark Mitchell <mark@codesourcery.com>
5988
5989 * decl2.c (grokfield): Issue error on illegal data member
5990 declaration.
5991
5992 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
5993
5994 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
5995
5996 2000-04-16 Mark Mitchell <mark@codesourcery.com>
5997
5998 * class.c (build_vtable_entry): Don't build thunks for type-info
5999 functions.
6000
6001 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
6002
6003 * decl.c (decls_match): Allow a redeclaration of a builtin to
6004 specify args while the builtin did not.
6005
6006 2000-04-15 Mark Mitchell <mark@codesourcery.com>
6007
6008 * cp-tree.def (THUNK_DECL): Add to documentation.
6009 * cp-tree.h (flag_huge_objects): Declare.
6010 * class.c (modify_vtable_entry): Tidy.
6011 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
6012 Calculate delta appropriately for the new ABI.
6013 (dfs_modify_vtables): Use it.
6014 (modify_all_vtables): Fix thinko in code to add overriding copies
6015 of functions to primary vtables.
6016 (build_clone): Fix typo in comment.
6017 (clone_function_decl): Correct order of destructors in vtable.
6018 (build_vbase_offset_vtbl_entries): Adjust comment.
6019 (dfs_vcall_offset_queue_p): Remove.
6020 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
6021 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
6022 (build_vtable_entry): Correct check for pure virtual functions.
6023 Don't declare flag_huge_objects.
6024 * decl.c (flag_huge_objects): Remove declaration.
6025 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
6026 Use int_size_in_bytes.
6027 (emit_thunk): Handle vcall offset thunks.
6028
6029 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6030
6031 * decl2.c (parse_time, varconst_time): Delete declarations.
6032 (finish_file): Delete LINENO declaration.
6033 START_TIME and THIS_TIME now long.
6034
6035 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
6036
6037 * class.c (build_base_field): Reformat comment.
6038
6039 * inc/cxxabi.h (stddef.h): Comment inclusion.
6040 (__base_class_info::__offset): Comment shift.
6041
6042 2000-04-12 Mark Mitchell <mark@codesourcery.com>
6043
6044 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
6045 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
6046 (cp_push_exception_identifier): New macro.
6047 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
6048 (DECL_BASE_DESTRUCTOR_P): Likewise.
6049 (DECL_DELETING_DESTRUCTOR_P): Likewise.
6050 (get_vtbl_decl_for_binfo): Fix formatting.
6051 (in_charge_arg_for_name): New macro.
6052 (maybe_build_cleanup_and_delete): Remove declaration.
6053 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
6054 (in_charge_arg_for_name): New function.
6055 (build_new_method_call): Use it. Handle cloned destructors.
6056 (build_clone): Don't make the base constructor virtual.
6057 Automatically defer generated functions.
6058 (clone_function_decl): Handle destructors, too.
6059 (clone_constructors_and_destructors): Likewise.
6060 (create_vtable_ptr): Don't create a vtable entry for a cloned
6061 function.
6062 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
6063 (initialize_predefined_identifiers): Update appropriately.
6064 (finish_destructor_body): Simplify.
6065 (maybe_build_cleanup_and_delete): Remove.
6066 * except.c (expand_throw): Handle new-ABI destructors.
6067 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
6068 (build_dtor_call): New function.
6069 (build_delete): Use it. Simplify.
6070 * optimize.c (maybe_clone_body): Handle destructors.
6071 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
6072
6073 * exception.cc (cleanup_fn): New typedef.
6074 (CALL_CLEANUP): New macro.
6075 (cp_eh_info): Use them.
6076 (__cp_push_exception): Likewise.
6077 (__cp_pop_exception): Likewise.
6078
6079 2000-04-11 Mark Mitchell <mark@codesourcery.com>
6080
6081 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
6082 (complete_dtor_identifier): New macro.
6083 (CLASSTYPE_FIRST_CONVERSION): Remove.
6084 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
6085 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
6086 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
6087 (CLASSTYPE_CONSTRUCTORS): Likewise.
6088 (CLASSTYPE_DESTRUCTORS): Likewise.
6089 (lang_decl): Add cloned_function.
6090 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
6091 (DECL_BASE_CONSTRUCTOR_P): Likewise.
6092 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
6093 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
6094 (DECL_CLONED_FUNCTION_P): Likewise.
6095 (DECL_CLONED_FUNCTION): Likewise.
6096 (clone_function_decl): Declare.
6097 (maybe_clone_body): Likewise.
6098 * call.c (build_user_type_conversion_1): Call complete object
6099 constructors in the new ABI.
6100 (build_new_method_call): Don't add in-charge parameters under the
6101 new ABI.
6102 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
6103 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
6104 CLASSTYPE_DESTRUCTOR_SLOT.
6105 (build_clone): New function.
6106 (clone_function_decl): Likewise.
6107 (clone_constructors_and_destructors): Likewise.
6108 (check_bases_and_members): Use it.
6109 * decl.c (iniitialize_predefined_identifiers): Initialize
6110 complete_dtor_identifier.
6111 (finish_function): Don't add extra code to a clone.
6112 (lang_mark_tree): Mark cloned_function.
6113 * decl2.c (mark_used): Don't bother trying to instantiate things
6114 we synthesized.
6115 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
6116 * method.c (set_mangled_name_for_decl): Don't treat clones as
6117 constructors.
6118 (synthesize_method): Sythesize cloned functions, not the clones.
6119 * optimize.c (inline_data): Update comment on ret_label.
6120 (remap_block): Don't assume DECL_INITIAL exists.
6121 (copy_body_r): Allow ret_label to be NULL.
6122 (maybe_clone_body): Define.
6123 * pt.c (tsubst_decl): Handle clones.
6124 (instantiate_clone): New function.
6125 (instantiate_template): Use it.
6126 (set_mangled_name_for_template_decl): Don't treat clones as
6127 constructors.
6128 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
6129 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
6130 * semantics.c (expand_body): Clone function bodies as necessary.
6131
6132 * optimize.c (remap_decl): Avoid sharing structure for arrays
6133 whose size is only known at run-time.
6134 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
6135
6136 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
6137 to has_in_charge_parm_p.
6138 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
6139 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
6140 (DECL_COPY_CONSTRUCTOR_P): New macro.
6141 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
6142 (build_user_type_conversion_1): Likewise.
6143 (convert_like_real): Likewise.
6144 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
6145 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
6146 (copy_args_p): Likewise.
6147 (grok_ctor_properties): Likewise.
6148 (start_function): Likewise.
6149 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
6150 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
6151 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
6152 * method.c (do_build_copy_constructor): Use
6153 DECL_HAS_IN_CHARGE_PARM_P.
6154 (synthesize_method): Likewise.
6155 * pt.c (instantiate_template): Remove goto.
6156 * tree.c (build_cplus_method_type): Remove mention of obstacks in
6157 comment.
6158
6159 * cp-tre.h (finish_function): Change prototype.
6160 * decl.c (end_cleanup_fn): Adjust caller.
6161 (finish_function): Take only one parameter.
6162 * decl2.c (finish_objects): Adjust caller.
6163 (finish_static_storage_duration_function): Likewise.
6164 * method.c (emit_thunk): Likewise.
6165 * parse.y: Likewise.
6166 * parse.c: Regenerated.
6167 * pt.c (instantiate_decl): Likewise.
6168 * rtti.c (synthesize_tinfo_fn): Likewise.
6169 * semantics.c (expand_body): Likewise.
6170
6171 * cp-tree.h (copy_decl): New function.
6172 * class.c (finish_struct_1): Use it.
6173 * lex.c (copy_decl): Define it.
6174 * pt.c (tsubst_decl): Likewise.
6175 * tree.c (copy_template_template_parm): Likewise.
6176
6177 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
6178 has_nonpublic_assign_ref.
6179 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
6180 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
6181 * class.c (finish_struct_methods): Don't set
6182 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
6183 (interface_only): Don't declare.
6184 (interface_unknown): Likewise.
6185
6186 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6187
6188 * tree.h (HAVE_TEMPLATES): Remove definition.
6189 * lang-options.h (-fthis-is-variable): Remove documentation.
6190
6191 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
6192
6193 * class.c (instantiate_type): Handle object-relative template-id.
6194
6195 * semantics.c (finish_expr_stmt): Call convert_to_void here.
6196 * decl.c (cplus_expand_expr_stmt): Not here.
6197
6198 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
6199 Initialize exprtype earlier.
6200
6201 * parse.y (fn.def1): Check for defining types in return types.
6202
6203 * decl.c (check_tag_decl): Notice extra fundamental types.
6204 Diagnose empty decls in classes, too.
6205
6206 * decl.c (grokdeclarator): Don't override an anonymous name if no
6207 declarator was given.
6208
6209 * cvt.c (convert_to_void): Call resolve_offset_ref.
6210
6211 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
6212
6213 * decl2.c (decl_namespace): Handle getting a type.
6214
6215 * typeck.c (build_c_cast): Re-enable warning for cast between
6216 pointer and integer of different size.
6217
6218 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
6219
6220 * inc/cxxabi.h (__pointer_type_info): Add restrict and
6221 incomplete flags.
6222 (__pointer_type_info::__pointer_catch): New virtual function.
6223 (__pointer_to_member_type_info): Derive from
6224 __pointer_type_info. Adjust.
6225 (__pointer_to_member_type_info::__do_catch): Remove.
6226 (__pointer_to_member_type_info::__is_pointer_p): Declare.
6227 (__pointer_to_member_type_info::__pointer_catch): Declare.
6228 * rtti.c (qualifier_flags): Add restrict flag.
6229 (ptmd_initializer): Reorder members.
6230 (create_tinfo_types): Expand comments. Reorder
6231 ptmd_desc_type_node members.
6232 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
6233 Implement.
6234 (__pointer_type_info::__do_catch): Move specific code into
6235 __pointer_catch. Call it.
6236 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
6237 specific catch checking. Fix void conversion check.
6238 (__pointer_to_member_type_info::__do_catch): Remove.
6239 (__pointer_to_member_type_info::__pointer_catch): Implement.
6240
6241 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6242
6243 * lex.c (init_parse): Remove traces of classof and headof.
6244 * decl2.c (flag_operator_names): Default to 1.
6245 (lang_decode_option): Do not set it for -ansi.
6246
6247 2000-04-09 Mark Mitchell <mark@codesourcery.com>
6248
6249 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
6250 (DECL_MAIN_VARIANT): Remove.
6251 * decl.c (duplicate_decls): Don't set it.
6252 (start_function): Likewise.
6253 (lang_mark_tree): Don't mark it.
6254 * decl2.c (defer_fn): Don't use it.
6255 * lex.c (retrofit_lang_decl): Don't set it.
6256 * pt.c (tsubst_decl): Likewise.
6257 * ptree.c (print_lang_decl): Don't print it.
6258 * typeck.c (mark_addressable): Don't use it.
6259
6260 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
6261
6262 * vec.cc: Include <new> and <exception>.
6263 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
6264 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
6265 terminate.
6266 (__cxa_vec_delete): Catch dtor exceptions.
6267
6268 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
6269
6270 Prepend __ to implementation defined names.
6271 * inc/typeinfo (type_info): Rename _name to __name.
6272 (type_info::type_info): Rename parameter.
6273 (type_info::operator==, type_info::operator!=,
6274 type_info::before): Likewise.
6275 (type_info::is_pointer_p, type_info::is_function_p,
6276 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
6277 parameters.
6278 * inc/cxxabi.h
6279 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
6280 (__pointer_type_info::__pointer_type_info): Likewise.
6281 (__pointer_type_info::is_pointer_p,
6282 __pointer_type_info::do_catch): Prepend __. Rename parameters.
6283 (__array_type_info::__array_type_info): Rename parameters.
6284 (__function_type_info::__function_type_info): Likewise.
6285 (__function_type_info::is_function_p): Prepend __.
6286 (__enum_type_info::__enum_type_info): Rename parameters.
6287 (__pointer_to_member_type_info::__pointer_to_member_type_info):
6288 Likewise.
6289 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
6290 parameters.
6291 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
6292 (__class_type_info::__class_type_info): Rename parameters.
6293 (__class_type_info::sub_kind): Prepend __. Adjust member names.
6294 (__class_type_info::upcast_result,
6295 __class_type_info::dyncast_result): Prepend __. Move definition
6296 into tinfo.cc.
6297 (__class_type_info::do_upcast, __class_type_info::do_catch,
6298 __class_type_info::find_public_src,
6299 __class_type_info::do_dyncast,
6300 __class_type_info::do_find_public_src): Prepend __. Rename
6301 parameters.
6302 (__si_class_type_info::__si_class_type_info): Rename parameters.
6303 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
6304 __si_class_type_info::do_find_public_src): Prepent __. Rename
6305 parameters.
6306 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
6307 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
6308 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
6309 parameters.
6310 (__dynamic_cast): Rename parameters.
6311 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
6312 type_info::do_catch, type_info::do_upcast): Prepend __.
6313 (contained_p, public_p, virtual_p, contained_public_p,
6314 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
6315 (__class_type_info::do_catch,
6316 __class_type_info::do_upcast): Prepend __. Adjust.
6317 (__class_type_info::__upcast_result,
6318 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
6319 Adjust.
6320 (__class_type_info::find_public_src): Prepend __. Adjust.
6321 (__class_type_info::do_find_public_src,
6322 __si_class_type_info::do_find_public_src,
6323 __vmi_class_type_info::do_find_public_src): Likewise.
6324 (__class_type_info::do_dyncast,
6325 __si_class_type_info::do_dyncast,
6326 __vmi_class_type_info::do_dyncast): Likewise.
6327 (__class_type_info::do_upcast,
6328 __si_class_type_info::do_upcast,
6329 __vmi_class_type_info::do_upcast): Likewise.
6330 (__dynamic_cast): Adjust.
6331 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
6332 (__function_type_info::is_function_p): Likewise.
6333 (__pointer_type_info::do_catch): Likewise. Adjust.
6334 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
6335 (__throw_type_match_rtti_2): Adjust.
6336 (__is_pointer): Adjust.
6337
6338 2000-04-08 Mark Mitchell <mark@codesourcery.com>
6339
6340 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
6341 (complete_ctor_identifier): New macro.
6342 (special_function_kind): Add sfk_copy_constructor and
6343 sfk_assignment_operator.
6344 (LOOKUP_HAS_IN_CHARGE): Remove.
6345 (cons_up_default_function): Rename to ...
6346 (implicitly_declare_fn): ... this.
6347 * call.c (build_new_method_call): Add in-charge parameters for
6348 constructors here.
6349 * class.c (add_implicitly_declared_members): Change parameter name
6350 from cant_have_assignment to cant_have_const_assignment.
6351 Replace calls to cons_up_default_function to implicitly_declare_fn.
6352 * cvt.c (ocp_convert): Use complete_ctor_identifier.
6353 * decl.c (initialize_predefined_identifiers): Initialize it.
6354 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
6355 complex expression.
6356 * init.c (expand_default_init): Don't calculate the in-charge
6357 parameter here.
6358 (build_new_1): Likewise.
6359 * lex.c (cons_up_default_function): Move to method.c.
6360 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
6361 (implicitly_declare_fn): New function.
6362 * typeck.c (build_static_cast): Use complete_ctor_identifier.
6363 (build_modify_expr): Likewise.
6364 * typeck2.c (build_functional_cast): Likewise.
6365
6366 Under the new ABI, constructors don't return `this'.
6367 * cp-tree.h (warn_reorder): Declare.
6368 (special_function_kind): New enum.
6369 (global_base_init_list): Remove declaration.
6370 (emit_base_init): Don't return a value.
6371 (check_base_init): Don't declare.
6372 (is_aggr_typedef): Likewise.
6373 * decl.c (check_special_function_return_type): New function.
6374 (return_types): Remove.
6375 (grokdeclarator): Use check_special_function_return_type.
6376 (start_function): Don't initialize ctor_label under the new ABI.
6377 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
6378 * init.c (begin_init_stmts): Move to top of file.
6379 (finish_init_stmts): Likewise.
6380 (warn_reorder): Don't declare.
6381 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
6382 value.
6383 (check_base_init): Remove.
6384 (is_aggr_typedef): Likewise.
6385 (build_new_1): Don't use the return value of a constructor.
6386 * semantics.c (setup_vtbl_ptr): Don't use the return value
6387 of emit_base_init.
6388 * typeck.c (check_return_expr): Don't magically convert return
6389 statements into `return this' in constructors under the new ABI.
6390
6391 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
6392 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
6393 (base_ctor_identifier): New macro.
6394 (base_dtor_identifier): Likewise.
6395 (deleting_dtor_identifier): Likewise.
6396 * decl.c: Don't include obstack.h.
6397 (obstack_chunk_alloc): Don't define.
6398 (obstack_chunk_free): Likewise.
6399 (struct predefined_identifier): New type.
6400 (initialize_predefined_identifiers): New function.
6401 (init_decl_processing): Use it.
6402 (debug_temp_inits): Remove.
6403 (start_method): Don't call preserve_data.
6404 (hack_incomplete_structures): Update comment.
6405 * init.c (init_init_processing): Don't initialize
6406 nelts_identifier.
6407 (build_offset_rf): Remove dead code.
6408 (build_delete): Use CLASSTYPE_N_BASECLASSES.
6409 * search.c (init_search_processing): Don't initialize
6410 vptr_identifier.
6411
6412 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6413
6414 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
6415 some sign_compare warnings.
6416
6417 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
6418
6419 Rename abi::__vmi_class_type_info members.
6420 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
6421 base_list, detail_masks members to vmi_flags, vmi_base_count,
6422 vmi_bases and vmi_flags_masks respectively.
6423 (__vmi_class_type_info::vmi_flags_masks): Rename
6424 details_unknown_mask to flags_unknown_mask.
6425 * tinfo.cc (__class_type_info::do_upcast): Adjust.
6426 (__vmi_class_type_info::do_find_public_src): Adjust.
6427 (__vmi_class_type_info::do_dyncast): Adjust.
6428 (__vmi_class_type_info::do_upcast): Adjust.
6429
6430 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
6431
6432 * tinfo.cc (convert_to_base): New function.
6433 (get_vbase_offset): Remove. Move into convert_to_base.
6434 (__vmi_class_type_info::do_find_public_src): Adjust.
6435 (__vmi_class_type_info::do_dyncast): Adjust.
6436 (__vmi_class_type_info::do_upcast): Adjust.
6437
6438 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
6439
6440 * tinfo.cc (operator=): Use __builtin_strcmp.
6441 * tinfo2.cc (before): Likewise.
6442
6443 2000-04-06 Mark Mitchell <mark@codesourcery.com>
6444
6445 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
6446 (DECL_SAVED_INLINE): Rename to ...
6447 (DECL_DEFERRED_FN): ... this.
6448 (in_function_p): Remove declaration.
6449 (mark_inline_for_output): Rename to ...
6450 (defer_fn): ... this.
6451 * decl.c (finish_function): Adjust call to mark_inline_for_output.
6452 (in_function_p): Remove definition.
6453 * decl2.c (saved_inlines): Rename to ...
6454 (deferred_fns): ... this.
6455 (saved_inlines_used): Rename to ...
6456 (deferred_fns_used): ... this.
6457 (mark_inline_for_output): Rename to ...
6458 (defer_fn): ... this.
6459 (finish_file): Adjust accordingly.
6460 (init_decl2): Likewise.
6461 * lex.c (cons_up_default_function): Likewise.
6462 * pt.c (mark_decl_instantiated): Likewise.
6463 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
6464 circumstances.
6465 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
6466 * semantics.c (expand_body): Defer more functions.
6467
6468 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
6469
6470 * vec.cc: New file.
6471 * Make-lang.in (CXX_LIB2FUNCS): Add it.
6472 (vec.o): Build it.
6473 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6474 __cxa_vec_delete): Declare.
6475
6476 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
6477
6478 * rtti.c (dfs_class_hint_mark): New static function.
6479 (dfs_class_hint_unmark): New static function.
6480 (class_hint_flags): Use them.
6481
6482 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
6483
6484 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
6485
6486 2000-04-05 Mark Mitchell <mark@codesourcery.com>
6487
6488 * cp-tree.h (instantiate_decl): Change prototype.
6489 * decl2.c (mark_used): Adjust call.
6490 * optimize.c (inlinable_function_p): Adjust handling of templates.
6491 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
6492 (do_type_instantiation): Likewise.
6493 (instantiate_decl): Defer more templates.
6494 (instantiate_pending_templates): Adjust logic to handle inline
6495 friend functions.
6496
6497 * Makefile.in (GGC_H): New variable. Use it throughout in place
6498 of ggc.h.
6499
6500 * call.c: Don't include obstack.h. Include ggc.h.
6501 (obstack_chunk_alloc): Don't define.
6502 (obstack_chunk_free): Likewise.
6503 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
6504 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
6505 (pop_switch): Free it.
6506
6507 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
6508
6509 * dump.c (dequeue_and_dump): Don't try to print the bit_position
6510 if we don't have a DECL_FIELD_OFFSET.
6511
6512 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
6513
6514 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
6515 special_function_p.
6516
6517 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6518
6519 * cfns.gperf (hash, libc_name_p): Prototype.
6520
6521 * rtti.c (build_dynamic_cast_1): Constification.
6522
6523 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
6524
6525 * semantics.c (deferred_type_access_control): Prototype.
6526
6527 2000-04-04 Mark Mitchell <mark@codesourcery.com>
6528
6529 Correct many new ABI issues regarding vbase and vcall offset
6530 layout.
6531 * cp-tree.h (BINFO_VTABLE): Document.
6532 (struct lang_type): Tweak formatting.
6533 (BINFO_PRIMARY_BINFO): Add to documentation.
6534 (CLASSTYPE_VSIZE): Fix typo in comment.
6535 (CLASSTYPE_VBASECLASSES): Update documentation.
6536 (BINFO_VBASE_MARKED): Remove.
6537 (SET_BINFO_VBASE_MARKED): Likewise.
6538 (CLEAR_BINFO_VBASE_MARKED): Likewise.
6539 (BINFO_FIELDS_MARKED): Remove.
6540 (SET_BINFO_FIELDS_MARKED): Likewise.
6541 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
6542 (enum access_kind): New enumeration.
6543 (num_extra_vtbl_entries): Remove declaration.
6544 (size_extra_vtbl_entries): Likewise.
6545 (get_vtbl_decl_for_binfo): New function.
6546 (dfs_vbase_unmark): Remove declaration.
6547 (mark_primary_bases): Likewise.
6548 * class.c (SAME_FN): Remove.
6549 (struct vcall_offset_data_s): Move definition.
6550 (build_vbase_pointer): Use `build', not `build_binary_op', to
6551 access the vbase pointer under the new ABI.
6552 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
6553 (build_primary_vtable): Likewise.
6554 (dfs_mark_primary_bases): Move here from search.c.
6555 (mark_primary_bases): Likewise.
6556 (determine_primary_bases): Under the new ABI, don't make a base
6557 class a primary base just because we don't yet have any virtual
6558 functions.
6559 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
6560 (num_vfun_entries): Remove.
6561 (dfs_count_virtuals): Likewise.
6562 (num_extra_vtbl_entries): Likewise.
6563 (size_extra_vtbl_entries): Likewise.
6564 (layout_virtual_bases): Iterate in inheritance graph order under
6565 the new ABI.
6566 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
6567 indicate that a vfield is present.
6568 (init_class_processing): Initialize access_public_node, etc., from
6569 ak_public, etc.
6570 (get_vtbl_decl_for_binfo): New function.
6571 (dump_class_hierarchy_r): Likewise.
6572 (dump_class_hierarchy): Use it.
6573 (finish_vtbls): Build the vtbls in inheritance graph order.
6574 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6575 (initialize_vtable): Use get_vtbl_decl_for_binfo.
6576 (accumulate_vtbl_inits): Add comments explaining why a pre-order
6577 walk is required.
6578 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
6579 where the vptr points, even for primary vtables.
6580 (build_vtbl_initializer): Adjust handling of vbase and vcall
6581 offsets.
6582 (build_vcall_and_vbase_vtable_entries): New function.
6583 (dfs_build_vbase_offset_vtbl_entries): Remove.
6584 (build_vbase_offset_vtbl_entries): Reimplement.
6585 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
6586 were already handled in a primary base class vtable.
6587 (build_vcall_offset_vtbl_entries): Adjust.
6588 (build_rtti_vtbl_entries): Adjust.
6589 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
6590 * init.c (expand_virtual_init): Simplify.
6591 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
6592 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
6593 * search.c (BINFO_ACCESS): New macro.
6594 (SET_BINFO_ACCESS): Likewise.
6595 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
6596 (access_in_type): Likewise.
6597 (dfs_accessible_p): Likewise.
6598 (protected_accessible_p): Likewise.
6599 (lookup_fnfields_1): Adjust documentation.
6600 (dfs_mark_primary_bases): Move to class.c
6601 (mark_primary_bases): Likewise.
6602 (dfs_vbase_unmark): Remove.
6603 (virtual_context): Use BINFO_FOR_VBASE.
6604 (dfs_get_vbase_types): Simplify.
6605 (dfs_build_inheritance_graph_order): New function.
6606 (get_vbase_types): Use it.
6607 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
6608
6609 * tinfo.cc (get_vbase_offset): New function.
6610 (__vmi_class_type_info::do_find_public_src): Use it.
6611 (__vmi_class_type_info::do_dyncast): Likewise.
6612 (__vmi_class_type_info::do_upcast): Likewise.
6613
6614 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
6615
6616 * lang-specs.h: Pass -fno-show-column to the preprocessor.
6617
6618 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
6619
6620 * rtti.c (class_hint_flags): Rename flags.
6621 (class_initializer): Remove flags.
6622 (synthesize_tinfo_var): Combine offset and flags. Add flags
6623 for __vmi_class_type_info.
6624 (create_tinfo_types): Remove flags from __class_type_info and
6625 __si_class_type_info. Merge flags and offset from
6626 base_class_type_info.
6627 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
6628 (__base_class_info::is_virtual_p): Adjust.
6629 (__base_class_info::is_public_p): Adjust.
6630 (__base_class_info::offset): New accessor.
6631 (__class_type_info::details): Remove member.
6632 (__class_type_info::__class_type_info): Lose details.
6633 (__class_type_info::detail_masks): Remove.
6634 (__si_class_type_info::__si_class_type_info): Lose details.
6635 (__vmi_class_type_info::details): New member.
6636 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
6637 (__vmi_class_type_info::detail_masks): New member.
6638 * tinfo.cc (__class_type_info::do_upcast): Initialize result
6639 with unknown_details_mask.
6640 (__vmi_class_type_info::do_find_public_src): Adjust
6641 (__vmi_class_type_info::do_dyncast): Adjust.
6642 (__vmi_class_type_info::do_upcast): Set result details, if
6643 needed. Adjust.
6644 (__dynamic_cast): Temporarily #if out optimization.
6645
6646 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
6647
6648 * rtti.c (get_tinfo_decl): Mark used.
6649 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
6650 mark as dealt with, if we output it.
6651
6652 2000-03-28 Mark Mitchell <mark@codesourcery.com>
6653
6654 * class.c: Reorganize to put virtual function table initialization
6655 machinery at the end of the file.
6656
6657 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
6658
6659 * class.c (finish_struct): Use bitsize_zero_node.
6660 * pt.c (instantiate_class_template): Likewise.
6661
6662 2000-03-28 Mark Mitchell <mark@codesourcery.com>
6663
6664 Put RTTI entries at negative offsets in new ABI.
6665 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
6666 vbase offset at index -3, not -1.
6667 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
6668 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
6669 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
6670 (build_rtti_vtbl_entries): New function.
6671 (set_rtti_entry): Remove.
6672 (build_primary_vtable): Don't use it.
6673 (build_secondary_vtable): Likewise.
6674 (start_vtable): Remove.
6675 (first_vfun_index): New function.
6676 (set_vindex): Likewise.
6677 (add_virtual_function): Don't call start_vtable. Do call
6678 set_vindex.
6679 (set_primary_base): Rename parameter.
6680 (determine_primary_base): Likewise.
6681 (num_vfun_entries): Don't use skip_rtti_stuff.
6682 (num_extra_vtbl_entries): Include RTTI information.
6683 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
6684 (skip_rtti_stuff): Remove.
6685 (dfs_modify_vtables): Don't use it.
6686 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
6687 (layout_nonempty_base_or_field): Update size handling.
6688 (create_vtable_ptr): Tweak.
6689 (layout_class_type): Adjust parameter names.
6690 (finish_struct_1): Simplify.
6691 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
6692 (skip_rtti_stuff): Remove.
6693 (first_vfun_index): New function.
6694 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
6695 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
6696 (marked_vtable_pathp): Declare.
6697 (unmarked_vtable_pathp): Likewise.
6698 * error.c (dump_expr): Use first_vfun_index to calculate vtable
6699 offsets.
6700 * rtti.c (build_headof): Look for RTTI at negative offsets.
6701 (get_tinfo_decl_dynamic): Likewise.
6702 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
6703 here.
6704 (create_pseudo_type_info): Do it here instead. Adjust so that
6705 vptr points at first virtual function.
6706 * search.c (marked_vtable_pathp): Make it global.
6707 (unmarked_vtable_pathp): Likewise.
6708 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
6709 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
6710 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
6711 (get_pure_virtuals): Likewise.
6712 (expand_upcast_fixups): Likewise.
6713 * tree.c (debug_binfo): Likewise.
6714 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
6715 negative offset.
6716
6717 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6718
6719 * class.c (check_field_decl): Fix typo.
6720 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
6721 (check_methods): Likewise.
6722 (check_field_decls): Likewise.
6723 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
6724 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
6725 Use DECL_RESULT_FLD, not DECL_RESULT.
6726 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
6727 * lex.c (identifier_type): Likewise.
6728 * pt.c (determine_specialization, lookup_template_class): Likewise.
6729 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
6730 (resolve_overloaded_unification, more_specialized): Likewise.
6731 * semantics.c (finish_member_declaration): Likewise.
6732 * typeck.c (build_x_function_call): Likewise.
6733
6734 2000-03-26 Mark Mitchell <mark@codesourcery.com>
6735
6736 * class.c (layout_empty_base): Handle empty bases with non-byte
6737 alignment.
6738 (build_base_field): Likewise.
6739 (layout_virtual_bases): Likewise.
6740
6741 * class.c (finish_struct_1): Fix typo in this change:
6742
6743 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6744
6745 2000-03-25 Mark Mitchell <mark@codesourcery.com>
6746
6747 * decl.c (grokdeclarator): Count partial specializations when
6748 keeping track of how many template classes have been seen.
6749
6750 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
6751
6752 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6753
6754 * class.c (build_vbase_pointer_fields): layout_field now place_field.
6755 (get_vfield_offset): Use byte_position.
6756 (set_rtti_entry): Set OFFSET to ssizetype zero.
6757 (get_binfo_offset_as_int): Deleted.
6758 (dfs_record_base_offsets): Use tree_low_cst.
6759 (dfs_search_base_offsets): Likewise.
6760 (layout_nonempty_base_or_field): Reflect changes in RLI format
6761 and call byte_position.
6762 (layout_empty_base): Convert offset to ssizetype.
6763 (build_base_field): use rli_size_unit_so_far.
6764 (dfs_propagate_binfo_offsets): Do computation in proper type.
6765 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
6766 (layout_class_type): Reflect changes in RLI names and fields.
6767 (finish_struct_1): Set DECL_FIELD_OFFSET.
6768 * dump.c (dequeue_and_dump): Call bit_position.
6769 * expr.c (cplus_expand_constant): Use byte_position.
6770 * rtti.c (expand_class_desc): Use bitsize_one_node.
6771 * typeck.c (build_component_addr): Use byte_position and don't
6772 special case for zero offset.
6773
6774 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
6775
6776 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
6777
6778 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
6779 tinfo object.
6780 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
6781 vtable.
6782
6783 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6784
6785 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
6786 DECL_P macros.
6787 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
6788 make_typename_type, check_initializer, cp_finish_decl,
6789 xref_tag): Likewise.
6790 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
6791 decl_namespace, arg_assoc_template_arg, arg_assoc,
6792 validate_nonmember_using_decl, do_class_using_decl): Likewise.
6793 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
6794 args_to_string): Likewise.
6795 * friend.c (is_friend): Likewise.
6796 * lex.c (note_got_semicolon, note_list_got_semicolon,
6797 is_global): Likewise.
6798 * method.c (build_overload_nested_name, build_overload_value,
6799 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
6800 * parse.y (typename_sub, typename_sub1): Likewise.
6801 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
6802 process_partial_specialization, convert_template_argument,
6803 template_args_equal, add_pending_template, lookup_template_class,
6804 for_each_template_parm_r, maybe_fold_nontype_arg,
6805 tsubst, instantiate_template, type_unification_real, unify,
6806 instantiate_pending_templates, set_mangled_name_for_template_decl):
6807 Likewise.
6808 * repo.c (repo_get_id, repo_template_used): Likewise.
6809 * search.c (lookup_field_1): Likewise.
6810 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
6811 * xref.c (classname): Likewise.
6812
6813 2000-03-22 Mark Mitchell <mark@codesourcery.com>
6814
6815 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
6816 (CANONICAL_BINFO): New macro.
6817 (BINFO_NEW_VTABLE_MARKED): Use it.
6818 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
6819 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
6820 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
6821 not TREE_TYPE.
6822 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6823 (build_secondary_vtable): Likewise.
6824 (dfs_finish_vtbls): Likewise.
6825 (dfs_accumulate_vtbl_inits): Likewise.
6826 (accumulate_vtbl_inits): New function.
6827 (finish_vtbls): Make sure that virtual bases come after
6828 non-virtual bases in the vtable group.
6829 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
6830 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6831 * search.c (struct vbase_info): Move definition.
6832 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6833 (unmarked_new_vtable_p): Likewise.
6834 (dfs_mark_vtable_path): Remove.
6835 (dfs_mark_new_vtable): Remove.
6836 (dfs_unmark_new_vtable): Likewise.
6837 (dfs_clear_search_slot): Likewise.
6838 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6839 (dfs_clear_vbase_slots): Likewise.
6840 (init_vbase_pointers): LIkewise.
6841
6842 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
6843
6844 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
6845 SIZETYPE to a non-SIZETYPE.
6846
6847 2000-03-21 Mark Mitchell <mark@codesourcery.com>
6848
6849 * class.c (layout_virtual_bases): Adjust names in conditionally
6850 compiled code.
6851
6852 * class.c (record_base_offsets): New function.
6853 (layout_conflict_p): Likewise.
6854 (layout_nonempty_base_or_field): Use it.
6855 (layout_empty_base): New function.
6856 (build_base_field): Use it.
6857 (build_base_fields): Update comment.
6858 (layout_virtual_bases): Fold in a little code form
6859 layout_basetypes. Use layout_empty_base.
6860 (layout_basetypes): Remove.
6861 (end_of_class): New function.
6862 (layout_class_type): Use it. Adjust.
6863
6864 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
6865 (fntype_p): Remove.
6866 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
6867 comment.
6868 (dfs_skip_nonprimary_vbases_markedp): Likewise.
6869 * typeck.c (fntype_p): Remove.
6870
6871 * cp-tree.h (TI_SPEC_INFO): Remove.
6872 (CLASSTYPE_TI_SPEC_INFO): Likewise.
6873 * pt.c (process_partial_specialization): Likewise.
6874
6875 * class.c (build_base_field): Fix thinko in computation of binfo
6876 offsets.
6877
6878 * tree.c (mark_local_for_remap_p): Mark variables declared in
6879 TARGET_EXPRs as well.
6880
6881 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
6882
6883 * typeck.c (require_complete_type, complete_type,
6884 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
6885 build_array_ref, convert_arguments, pointer_diff,
6886 build_x_unary_op, build_unary_op, build_c_cast,
6887 build_modify_expr): Use COMPLETE_TYPE_P etc.
6888 * call.c (is_complete, convert_like_real,
6889 build_new_method_call): Likewise.
6890 * class.c (build_vbase_pointer_fields, check_bases,
6891 build_base_field, finish_struct_1, pushclass): Likewise.
6892 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
6893 * decl.c (maybe_process_template_type_declaration, pushtag,
6894 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
6895 layout_var_decl, check_initializer, cp_finish_decl,
6896 grokdeclarator, require_complete_types_for_parms,
6897 grok_op_properties, xref_tag, xref_basetypes,
6898 check_function_type): Likewise.
6899 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
6900 * friend.c (do_friend): Likewise.
6901 * init.c (build_offset_ref): Likewise.
6902 * parse.y (structsp): Likewise.
6903 * pt.c (maybe_process_partial_specialization,
6904 tsubst_friend_function, instantiate_class_template, tsubst,
6905 do_type_instantiation, instantiate_pending_templates): Likewise.
6906 * repo.c (repo_get_id): Likewise.
6907 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
6908 synthesize_tinfo_var, emit_support_tinfos): Likewise.
6909 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
6910 * semantics.c (begin_class_definition): Likewise.
6911 * tree.c (build_cplus_method_type): Likewise.
6912 * typeck2.c (digest_init, build_functional_cast,
6913 add_exception_specifier): Likewise.
6914 * parse.h, parse.c: Regenerated.
6915
6916 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
6917
6918 * inc/cxxabi.h: New header file. Define new-abi entry points.
6919 (__pointer_type_info::target): Rename member to ...
6920 (__pointer_type_info::type): ... here.
6921 (__base_class_info::type): Rename member to ...
6922 (__base_class_info::base): ... here.
6923 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
6924 * cp-tree.h (CPTI_ABI): New global tree enumeration.
6925 (abi_node): New global tree node.
6926 * decl.c (abi_node): Document.
6927 (init_decl_processing): Initialize abi_node.
6928 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
6929 (get_vmi_pseudo_type_info): Likewise.
6930 (create_tinfo_types): Likewise.
6931 (emit_support_tinfos): Likewise.
6932 * tinfo.h (cxxabi.h): Include for new-abi.
6933 Move rtti class definitions to new header file.
6934 * tinfo.cc (abi): Use the namespace.
6935 (std): Move new abi rtti classes from here ...
6936 (__cxxabiv1): ... to here.
6937 * tinfo2.cc (cxxabi.h): Include for new-abi.
6938 Move rtti class definitions to new header file.
6939 (std): Move new abi rtti classes from here ...
6940 (__cxxabiv1): ... to here.
6941 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
6942 namespace.
6943
6944 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
6945 Jason Merrill <jason@casey.cygnus.com>
6946
6947 * method.c (build_overload_int): Use host_integerp.
6948
6949 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6950
6951 * init.c (build_offset_ref): Handle the case of a templated member
6952 function.
6953
6954 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6955
6956 * except.c (expand_exception_blocks): Clear catch_clauses_last.
6957
6958 2000-03-18 Mark Mitchell <mark@codesourcery.com>
6959
6960 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
6961 * class.c (check_bitfield_decl): Turn illegal bitfields into
6962 non-bitfields.
6963 (dfs_propagate_binfo_offsets): Adjust for new size_binop
6964 semantics.
6965 (dfs_offset_for_unshared_vbases): Likewise.
6966 * cvt.c (cp_convert_to_pointer): Convert NULL to a
6967 pointer-to-member correctly under the new ABI.
6968 * expr.c (cplus_expand_constant): Don't use cp_convert when
6969 turning an offset into a pointer-to-member.
6970 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
6971 when dereferencing them under the new ABI.
6972 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
6973 of pointers-to-members under the new ABI.
6974
6975 * class.c (check_bitfield_decl): Remove restriction on really long
6976 bitfields.
6977 (layout_class_type): Implement new ABI handling of bitfields
6978 longer than their types.
6979
6980 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6981
6982 * parse.y (extdefs): Call ggc_collect.
6983 * parse.c: Regenerated.
6984
6985 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
6986
6987 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
6988 (note_name_declared_in_class): Use OVL_CURRENT to get at a
6989 potential overload.
6990
6991 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6992
6993 * class.c (build_vbase_path): Use integer_zerop.
6994 (build_vtable_entry): Use tree_low_cst.
6995 (get_vfield_offset): Use bit_position.
6996 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
6997 Use tree_low_cst.
6998 (check_bitfield_decl): Set DECL_SIZE using convert.
6999 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
7000 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
7001 Use tree_low_cst.
7002 (finish_struct_1): Use bit_position.
7003 (dump_class_hierarchy): Use tree_low_cst.
7004 * cp-tree.h (min_precision): Add declaration.
7005 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
7006 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
7007 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
7008 * expr.c (cplus_expand_constant): Use bit_position.
7009 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
7010 * rtti.c (get_base_offset): Use bit_position.
7011 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
7012 host_integerp, and tree_low_cst.
7013 (pointer_int_sum): Use integer_zerop.
7014 (build_component_addr): Use bit_position.
7015
7016 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
7017
7018 * typeck.c (require_complete_type): Don't assume size_zero_node.
7019 (complete_type_or_else): Likewise.
7020
7021 2000-03-16 Steven Grady <grady@digitaldeck.com>
7022 Jason Merrill <jason@casey.cygnus.com>
7023
7024 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
7025
7026 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
7027
7028 * decl2.c (grokfield): Bail out if type is error_mark_node.
7029
7030 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7031
7032 * tinfo2.cc (__ptr_to_member_data): Rename to ...
7033 (__pointer_to_member_data): ... here. Adjust.
7034 * rtti.c (create_tinfo_types): Adjust.
7035
7036 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7037
7038 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
7039 * decl.c (ref_desc_type_node): Undocument.
7040 * rtti.c (ptr_ref_initializer): Rename to ...
7041 (ptr_initializer): ... here. Adjust comments.
7042 (ptmd_initializer): Fix comment thinko.
7043 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
7044 (create_tinfo_types): Remove ref_desc_type_node init.
7045 * tinfo2.cc (__reference_type_info): Remove.
7046
7047 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7048
7049 * decl.c (cp_finish_decl): Remove obsolete comment.
7050
7051 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
7052
7053 2000-03-14 Mark Mitchell <mark@codesourcery.com>
7054
7055 * cp-tree.h: Tweak documentation.
7056 * class.c (build_vbase_pointer_fields): Layout the fields, too.
7057 (avoid_overlap): Remove.
7058 (get_binfo_offset_as_int): New function.
7059 (dfs_serach_base_offsets): Likewise.
7060 (layout_nonempty_base_or_field): Likewise.
7061 (build_base_field): Layout fields here. Avoid placing two objects
7062 of the same type at the same address, under the new ABI.
7063 (build_base_fields): Adjust accordingly.
7064 (create_vtable_ptr): Return the new field, but don't attach it to
7065 TYPE_FIELDS.
7066 (remove_base_field): Remove.
7067 (remove_base_fields): Remove.
7068 (layout_basetypes): Adjust accordingly.
7069 (layout_class_type): Call layout_field for each field, rather than
7070 just making a wholesale call to layout_type.
7071
7072 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
7073
7074 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
7075
7076 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
7077
7078 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
7079
7080 * except.c (dtor_nothrow): New fn.
7081 (do_pop_exception): Use it. Take type parm.
7082 (push_eh_cleanup): Take type parm.
7083 (expand_start_catch_block): Pass it.
7084 (build_eh_type_type_ref): Accept null type.
7085
7086 2000-03-12 Mark Mitchell <mark@codesourcery.com>
7087
7088 * cp-tree.h (revert_static_member_fn): Change prototype.
7089 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
7090 (grok_op_properties): Likewise.
7091 (start_function): Likewise.
7092 (revert_static_member_fn): Simplify.
7093 * pt.c (check_explicit_specialization): Adjust call to
7094 revert_static_member_fn.
7095
7096 2000-03-11 Mark Mitchell <mark@codesourcery.com>
7097
7098 * cp-tree.h (scope_kind): New type.
7099 (tmpl_spec_kind): Likewise.
7100 (declare_pseudo_global_level): Remove.
7101 (pseudo_global_level_p): Rename to template_parm_scope_p.
7102 (pushlevel): Remove declaration.
7103 (begin_scope): New function.
7104 (finish_scope): Likewise.
7105 (current_tmpl_spec_kind): Likewise.
7106 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
7107 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
7108 Add template_spec_p.
7109 (toplevel_bindings_p): Adjust.
7110 (declare_pseudo_global_level): Remove.
7111 (pseudo_global_level_p): Rename to template_parm_scope_p.
7112 (current_tmpl_spec_kind): New function.
7113 (begin_scope): Likewise.
7114 (finish_scope): Likewise.
7115 (maybe_push_to_top_level): Adjust.
7116 (maybe_process_template_type_declaration): Likewise.
7117 (pushtag): Likewise.
7118 (pushdecl_nonclass_level): Likewise.
7119 (lookup_tag): Likewise.
7120 (grokfndecl): Handle member template specializations. Share
7121 constructor and non-constructor code.
7122 * decl2.c (check_classfn): Handle member template specializations.
7123 * pt.c (begin_template_parm_list): Use begin_scope.
7124 (begin_specialization): Likewise.
7125 (end_specialization): Likewise.
7126 (check_explicit_specialization): Use current_tmpl_spec_kind.
7127 Handle member template specializations.
7128 (end_template_decl): Use finish_scope. Remove call to
7129 get_pending_sizes.
7130 (push_template_decl_real): Remove bogus error message.
7131 (tsubst_decl): Fix typo in code contained in comment.
7132 (instantiate_template): Handle member template specializations.
7133 (most_general_template): Likewise.
7134
7135 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
7136
7137 * lex.c (whitespace_cr): Compress consecutive calls to warning().
7138 (do_identifier): Ditto for error().
7139
7140 * pt.c (convert_nontype_argument): Ditto for cp_error().
7141 (convert_template_argument): Ditto for cp_pedwarn().
7142
7143 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
7144
7145 * exception.cc (__check_null_eh_spec): New fn.
7146 * except.c (expand_end_eh_spec): Call it if the spec is throw().
7147
7148 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
7149
7150 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
7151 * except.c (expand_end_eh_spec): Add the return type.
7152 * rtti.c (throw_bad_cast): Add the parmtypes.
7153 (throw_bad_typeid): Likewise.
7154
7155 * semantics.c (expand_stmt): Only leave out rtl for unused
7156 artificials, and set DECL_IGNORED_P on them as well.
7157 * decl.c (wrapup_globals_for_namespace): Likewise.
7158
7159 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
7160
7161 * decl.c (maybe_commonize_var): Skip all artificial decls.
7162 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
7163
7164 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
7165
7166 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
7167 * cp-tree.h: Declare flag_enforce_eh_specs.
7168 * decl.c (store_parm_decls, finish_function): Check it.
7169
7170 C library functions don't throw.
7171 * Makefile.in (cfns.h): New target.
7172 (except.o): Depend on it.
7173 * Make-lang.in (cc1plus): Depend on cfns.gperf.
7174 * cfns.gperf: New file.
7175 * cfns.h: Generated.
7176 * except.c: Include it.
7177 (nothrow_libfn_p): New fn.
7178 * decl.c (grokfndecl): Use it.
7179 * cp-tree.h: Declare it.
7180
7181 * decl.c (push_overloaded_decl_1, auto_function,
7182 define_function): Lose.
7183 (build_library_fn_1): New static fn.
7184 (builtin_function): Use it.
7185 (get_atexit_node): Use build_library_fn_ptr.
7186 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
7187 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
7188 push_void_library_fn, push_throw_library_fn): New fns.
7189 * cp-tree.h: Declare them.
7190 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
7191 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
7192 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
7193 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
7194 * rtti.c (build_runtime_decl): Lose.
7195 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
7196 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
7197 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
7198
7199 * call.c (build_call): Remove result_type parm.
7200 Call mark_used on unused artificial fns.
7201 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
7202
7203 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
7204
7205 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
7206 appropriate.
7207 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
7208 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
7209 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
7210 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
7211 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
7212 expand_generic_desc): Likewise.
7213
7214 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7215
7216 * exception.cc (__cp_pop_exception): Cleanup the original object.
7217
7218 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7219
7220 * decl.c (grok_op_properties): Merge conversion to void warning
7221 with other silly op warnings.
7222
7223 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
7224
7225 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
7226 array CONSTRUCTOR elements. Don't use expr_tree_cons.
7227
7228 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7229
7230 * decl.c (cp_make_fname_decl): New function.
7231 (wrapup_globals_for_namespace): Don't emit unused static vars.
7232 (init_decl_processing): Remove comment about use of
7233 array_domain_type. Set make_fname_decl.
7234 (cp_finish_decl): Remove __FUNCTION__ nadgering.
7235 * semantics.c (begin_compound_stmt): Remove
7236 current_function_name_declared flagging.
7237 (expand_stmt): Don't emit unused local statics.
7238 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
7239 specially.
7240
7241 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7242
7243 * typeck.c (convert_for_assignment): Don't look at array
7244 initializer.
7245 * call.c (convert_like_real): Likewise.
7246
7247 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
7248
7249 Add initial support for '\uNNNN' specifier.
7250 * lex.c (read_ucs): New fn.
7251 (readescape, skip_white_space): Call it.
7252 (is_extended_char, is_extended_char_1): New fns.
7253 (utf8_extend_token): New fn, #if 0'd out.
7254 (real_yylex): Treat extended chars like letters.
7255
7256 * search.c (note_debug_info_needed): Walk the bases even if we
7257 weren't deferring the type itself.
7258
7259 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7260
7261 * decl2.c (finish_objects): Constify a char*.
7262
7263 * method.c (emit_thunk): Likewise.
7264
7265 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
7266
7267 * typeck.c (dubious_conversion_warnings): Look through
7268 REFERENCE_TYPE.
7269
7270 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7271
7272 * class.c (dfs_modify_vtables): I is now unsigned.
7273 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
7274 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
7275 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
7276 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
7277 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
7278 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
7279 Call integer_all_onesp.
7280 * typeck2.c (process_init_constructor): Use compare_tree_int.
7281
7282 * lang-specs.h (as): Don't call if -syntax-only.
7283
7284 2000-03-06 Mark Mitchell <mark@codesourcery.com>
7285
7286 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
7287 RTL_EXPR_HAS_NO_SCOPE after all.
7288
7289 2000-03-05 Mark Mitchell <mark@codesourcery.com>
7290
7291 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
7292 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
7293 RTL_EXPR_HAS_NO_SCOPE.
7294
7295 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
7296 later.
7297
7298 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
7299
7300 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
7301
7302 * call.c (convert_like): Macrofy.
7303 (convert_like_with_context): New macro.
7304 (convert_like_real): Renamed from convert_like. Add calling
7305 context parameters, for diagnostics. Add recursive flag. Call
7306 dubious_conversion_warnings for outer conversion.
7307 (build_user_type_conversion): Use convert_like_with_context.
7308 (build_over_call): Likewise. Don't warn about dubious
7309 conversions here. Adjust convert_default_arg calls.
7310 (convert_default_arg): Add context parameters for diagnostics.
7311 Pass throught to convert_like_with_context.
7312 * cp-tree.h (convert_default_arg): Add context parameters.
7313 (dubious_conversion_warnings): Prototype new function.
7314 * typeck.c (convert_arguments): Adjust convert_default_arg call.
7315 (dubious_conversion_warnings): New function, broken
7316 out of convert_for_assignment.
7317 (convert_for_assignment): Adjust.
7318
7319 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
7320
7321 * decl2.c (key_method): Break out from...
7322 (import_export_vtable, import_export_class): ...here.
7323
7324 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
7325 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
7326
7327 * search.c (note_debug_info_needed, dfs_debug_mark,
7328 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
7329 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
7330
7331 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
7332
7333 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
7334 typos.
7335
7336 2000-03-02 Mark Mitchell <mark@codesourcery.com>
7337
7338 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
7339 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
7340 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
7341 (lang_type): Split gets_new into has_new and has_array_new.
7342 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7343 (TYPE_GETS_NEW): Split into ...
7344 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
7345 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
7346 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
7347 (build_op_new_call): Don't declare.
7348 (build_new_1): Likewise.
7349 * call.c (build_op_new_call): Remove.
7350 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
7351 instead of TYPE_NEEDS_DESTRUCTOR.
7352 (finish_struct_bits): Likewise.
7353 (add_implicitly_declared_members): Likewise.
7354 (check_field_decl): Likewise.
7355 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
7356 correctly under the new ABI.
7357 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
7358 instead of TYPE_NEEDS_DESTRUCTOR.
7359 (initialize_local_var): Likewise.
7360 (destroy_local_var): Likewise.
7361 (cp_finish_decl): Likewise.
7362 (register_dtor_fn): Likewise.
7363 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
7364 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
7365 TYPE_VEC_DELETE_TAKES_SIZE here.
7366 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
7367 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
7368 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7369 (finish_destructor_body): Likewise.
7370 (maybe_build_cleanup_1): Likewise.
7371 * decl2.c (do_static_destruction): Likewise.
7372 * init.c (build_new_1): Make it static.
7373 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7374 (expand_cleanup_for_base): Likewise.
7375 (get_cookie_size): New function.
7376 (build_new_1): Handle array-new cookies correctly under the new
7377 ABI.
7378 (build_vec_delete_1): Likewise.
7379 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7380 (build_delete): Likewise.
7381 (build_vec_delete): Handle array-new cookies correctly under the new
7382 ABI.
7383 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7384 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
7385 TYPE_HAS_ARRAY_NEW_OPERATOR.
7386 * ptree.c (print_lang_type): Check them.
7387 * search.c (context_for_name_lookup): Fix typo in comment.
7388 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7389 * tree.c (break_out_cleanups): Likewise.
7390 (build_cplus_array_test_1): Likewise.
7391 (cp_build_qualified_type_real): Likewise.
7392 * typeck.c (complete_type): Likewise.
7393
7394 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
7395 the command-line, not the end.
7396
7397 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
7398
7399 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
7400
7401 2000-03-02 Tom Tromey <tromey@cygnus.com>
7402
7403 * cp-tree.h (build_java_class_ref): Declare.
7404 * init.c (build_java_class_ref): No longer static.
7405 * except.c (expand_throw): Generate a Java-style `throw' if the
7406 thrown object is a "Java" object.
7407 (initialize_handler_parm): Generate a Java-style lookup of
7408 exception info if the caught object is a "Java" object.
7409 (catch_language, catch_language_init): New globals.
7410 (decl_is_java_type): New function.
7411 (expand_start_catch_block): Don't call push_eh_info() or
7412 push_eh_cleanup() when handling a Java-style "catch". Pass Java
7413 class reference to build_catch_block.
7414
7415 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7416
7417 * typeck.c (comptypes): Treat sizetype like its language equivalent.
7418
7419 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
7420
7421 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
7422 to merge reference/pointer code and fix incorrect warnings.
7423
7424 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
7425
7426 * search.c (protected_accessible_p): Use context_for_name_lookup.
7427
7428 * init.c (construct_virtual_bases): Fix thinko.
7429 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
7430
7431 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
7432
7433 * decl.c (current_function_decl): Move to toplev.c.
7434
7435 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
7436
7437 * pt.c (fn_type_unification): Unify return type, whenever
7438 provided.
7439 (get_bindings_real): Only pass return type when necessary.
7440 Remove explicit return type check.
7441 * class.c (resolve_address_of_overloaded_function): Pass desired
7442 return type to fn_type_unification.
7443
7444 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7445
7446 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
7447 DECL_FIELD_SIZE.
7448 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
7449 DECL_FIELD_SIZE.
7450 * rtti.c (expand_class_desc): Likewise.
7451 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
7452 (THUNK_VCALL_OFFSET): Likewise.
7453 (THUNK_DELTA): Reflect changes in ../tree.h.
7454
7455 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
7456
7457 * search.c (protected_accessible_p): Also allow the access if
7458 the member is public in DERIVED. Lose TYPE parm.
7459 (friend_accessible_p): Lose TYPE parm.
7460 (accessible_p): Adjust.
7461
7462 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7463
7464 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
7465 on things that are not sizes; ssize_binop deleted.
7466 Call size_diffop when appropriate.
7467 (dfs_build_vcall_offset_vtbl_entries): Likewise.
7468 (build_primary_vtable, build_secondary_vtable): Likewise.
7469 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
7470 Variable I is HOST_WIDE_INT.
7471 (get_vfield_offset): Pass proper types to size_binop.
7472 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
7473 (finish_struct_1): Likewise.
7474 (skip_rtti_stuff): Arg N is now pointer to signed.
7475 (layout_class_type): Use size_zero_node.
7476 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
7477 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
7478 * decl.c (complete_arry_type): Pass proper types to size_binop.
7479 (xref_basetypes): BINFO_OFFSET is sizetype.
7480 * error.c (dump_expr): Don't use size_binop non-sizes.
7481 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
7482 * init.c (construct_virtual_bases): Fix type error.
7483 (build_vec_delete_1): Pass proper type to size_binop and don't
7484 fold result.
7485 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
7486 * rtti.c (get_base_offset): Pass proper type to size_binop.
7487 * search.c (dfs_find_vbases): Fix type error.
7488 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
7489 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
7490 * tree.c (debug_binfo): Variable N is signed.
7491 Use HOST_WIDE_INT_PRINT_DEC.
7492 * typeck.c (comptypes): sizetype is same as equivalent integer type.
7493 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
7494 size_one_node and size_zero_node.
7495 (c_alignof): Use size_one_node.
7496 (build_component_addr): Pass proper types to size_binop.
7497 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
7498
7499 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
7500
7501 Implement class scope using-declarations for functions.
7502 * class.c (handle_using_decl): Call add_method for used functions.
7503 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
7504 (add_method): Used functions are hidden by local functions.
7505 (check_bases_and_members): Handle using-decls before finalizing
7506 CLASSTYPE_METHOD_VEC.
7507 * call.c (add_function_candidate): Add ctype parm; if non-zero,
7508 override the type of 'this' accordingly.
7509 (add_template_candidate, add_template_candidate_real): Add ctype parm.
7510 (convert_class_to_reference, build_user_type_conversion_1,
7511 build_new_function_call, build_object_call, build_new_op,
7512 build_new_method_call): Pass ctype parm.
7513
7514 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
7515 the baselink.
7516 * call.c (convert_class_to_reference, build_user_type_conversion_1,
7517 build_new_function_call, build_object_call, build_new_op,
7518 build_new_method_call, build_op_delete_call): Don't get basetype_path
7519 from a baselink.
7520 * typeck.c (build_component_ref): Likewise.
7521 * init.c (build_offset_ref): Likewise.
7522 (resolve_offset_ref): Don't call enforce_access.
7523 Call build_scoped_ref.
7524 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
7525 would cause an error or if -pedantic.
7526 * class.c (alter_access): Lose binfo parm.
7527
7528 2000-02-26 Mark Mitchell <mark@codesourcery.com>
7529
7530 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
7531 types.
7532
7533 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
7534
7535 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
7536 pseudo_type_info creation into the std namespace
7537
7538 2000-02-26 Mark Mitchell <mark@codesourcery.com>
7539
7540 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
7541 (import_export_class): Remove declaration.
7542 * decl2.c (import_export_class): Make it static.
7543 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
7544 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
7545 EXPR_WITH_FILE_LOCATION.
7546 * lex.c (check_newline): Tweak filename/lineno setting.
7547 * semantics.c (begin_while_stmt): Fix typo in comment.
7548
7549 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7550
7551 * lang-options.h (-fmessage-length=): Add missing option.
7552
7553 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
7554
7555 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
7556
7557 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
7558
7559 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
7560
7561 * optimize.c (expand_call_inline): Emit the return label before
7562 evaluating the return value.
7563
7564 2000-02-24 Mark Mitchell <mark@codesourcery.com>
7565
7566 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
7567 than duplicating functionality here.
7568 * optimize.c: Include input.h.
7569 (expand_call_inline): Use push_srcloc and pop_srcloc.
7570 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
7571 * parse.c: Regenerated.
7572 * Makefile.in (lex.o): Depend on input.h.
7573 (optimize.o): Likewise.
7574
7575 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
7576
7577 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
7578 function type, rather than ICE.
7579
7580 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
7581
7582 * decl.c (grokdeclarator): Call decl_type_access_control.
7583 * parse.y (parse_end_decl): Don't call decl_type_access_control if
7584 decl is null.
7585
7586 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
7587
7588 * decl.c (decls_match): Remove obsolete static member nadgering.
7589
7590 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7591
7592 * decl.c (grokdeclarator): Change ANSI to ISO.
7593 * lex.c (consume_string, readescape, do_identifier): Likewise.
7594 (parse_float, real_yylex): Likewise.
7595 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
7596 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
7597 new_type_id, maybe_label_decls, simple_stmt,
7598 for.init.statement): Likewise.
7599 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
7600 * semantics.c (finish_named_return_value): Likewise.
7601 * parse.c: Regenerate.
7602
7603 2000-02-21 Mark Mitchell <mark@codesourcery.com>
7604
7605 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
7606 (CPTI_CLASS_STAR_TYPE): Remove.
7607 (vtable_index_type): Likewise.
7608 (class_star_type_node): Remove.
7609 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
7610 (build_binary_op_nodefault): Remove.
7611 * call.c (build_new_op): Use build_binary_op instead of
7612 build_binary_op_nodefault.
7613 * decl.c (init_decl_processing): Remove class_star_type_node
7614 initialization. Make delta_type_node ptrdiff_type_node under the
7615 new ABI. Initialize vtable_index_type.
7616 (build_ptrmemfunc_type): Build different structures for the new
7617 ABI.
7618 (build_enumerator): Use build_binary_op instead of
7619 build_binary_op_nodefault.
7620 * method.c (build_overload_value): Mangle pointers-to-members
7621 appropriately under the new ABI.
7622 * typeck.c (build_array_ref): Use build_binary_op instead of
7623 build_binary_op_nodefault.
7624 (get_member_function_from_ptrfunc): Adjust for the new ABI.
7625 (build_binary_op_nodefault): Rename to ...
7626 (build_binary_op): ... this. Remove old version. Adjust for
7627 pointer-to-member comparisons under the new ABI.
7628 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
7629 (build_ptrmemfunc): Adjust for the new ABI.
7630 (expand_ptrmemfunc_cst): Likewise.
7631 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
7632 (pfn_from_ptrmemfunc): Adjust for the new ABI.
7633
7634 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
7635
7636 * call.c (build_object_call): Compress consecutive calls to
7637 cp_error.
7638 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
7639 (build_op_delete_call): Adjust message formatting.
7640
7641 * class.c (check_bases): Compress consecutive calls to
7642 cp_pedwarn.
7643 (finish_struct_anon): Say 'ISO C++'.
7644
7645 * decl.c (start_decl): Same here.
7646 (grok_reference_init): Likewise.
7647 (grokfndecl): Correct message formatting.
7648 (grokfndecl): Improve diagnostic.
7649 (check_static_variable_definition): Likewise. Say 'ISO C++'
7650 (compute_array_index_type): Say 'ISO C++'
7651 (create_array_type_for_decl): Compress consecutive calls to
7652 cp_error.
7653 (grokdeclarator): Say 'ISO C++'
7654 (grok_op_properties): Likewise.
7655
7656 * decl2.c (delete_sanity): Clairify diagnostic.
7657 (check_member_template): Same here.
7658 (grok_function_init): Use consistent terminology.
7659
7660 * expr.c (do_case): Say 'ISO C++'
7661
7662 * friend.c (do_friend): Compress consecutive calls to warning.
7663
7664 2000-02-20 Mark Mitchell <mark@codesourcery.com>
7665
7666 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
7667 * class.c (build_secondary_vtable): Reorganize. Don't create a
7668 new vtable under the new ABI.
7669 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
7670 computing the size.
7671 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
7672 the initializing elements.
7673 (initialize_vtable): New function.
7674 (dfs_finish_vtbls): Use it.
7675 (dfs_accumulate_vtbl_inits): New function.
7676 (finish_vtbls): Merge primary and secondary vtables under the new
7677 ABI.
7678 (finish_struct_1): Remove redundant call to layout_vtable_decl.
7679 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
7680 aren't VAR_DECLs.
7681
7682 * class.c (build_vtable): New function, split out from ...
7683 (get_vtable_decl): ... here, and ...
7684 (build_secondary_vtable): ... here.
7685
7686 * pt.c (tsubst_decl): Fix formatting.
7687
7688 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7689
7690 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
7691 (avoid_overlap, build_base_field): Likewise.
7692 (build_base_field, build_base_fields, is_empty_class):
7693 Test DECL_SIZE with integer_zero.
7694 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
7695 * cp-tree.h (struct lang_type): New field size_unit.
7696 (CLASSTYPE_SIZE_UNIT): New macro.
7697 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
7698 (cp_finish_decl): Delete -Wlarger-than processing.
7699 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
7700 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
7701 * tree.c (make_binfo): binfo vector is one entry longer.
7702 (walk_tree): Walk DECL_SIZE_UNIT.
7703
7704 2000-02-19 Mark Mitchell <mark@codesourcery.com>
7705
7706 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
7707 comment.
7708 (build_vtable_entry): Don't assume all vtable entries are
7709 functions.
7710 (build_vtbl_initializer): Adjust accordingly.
7711 (get_vtable_decl): Fix formatting.
7712
7713 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
7714
7715 * semantics.c (deferred_type_access_control): Walk the entire
7716 type_lookups list.
7717 (save_type_access_control): Rename from
7718 initial_deferred_type_access_control. Just remember the value.
7719 (decl_type_access_control): New fn.
7720 (begin_function_definition): Use deferred_type_access_control, after
7721 we've started the function. Set type_lookups to error_mark_node.
7722 * parse.y (frob_specs, fn.def1): Adjust.
7723 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
7724 (parse_end_decl, parse_bitfield0, parse_method): New fns.
7725 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
7726 (after_type_component_declarator0): Likewise.
7727 (after_type_component_declarator): Likewise.
7728 (notype_component_declarator): Likewise.
7729 * cp-tree.h: Adjust.
7730
7731 * decl.c (redeclaration_error_message): Allow redeclaration of
7732 namespace-scope decls.
7733
7734 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
7735
7736 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
7737
7738 2000-02-17 Mark Mitchell <mark@codesourcery.com>
7739
7740 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
7741 * decl2.c (grokclassfn): Likewise.
7742
7743 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
7744
7745 * decl2.c (lang_decode_option): Don't set default message length
7746 here.
7747 * lex.c (lang_init_options): Set it here.
7748
7749 2000-02-16 Mark Mitchell <mark@codesourcery.com>
7750
7751 Make DECL_CONTEXT mean the class in which a member function was
7752 declared, even for a virtual function.
7753 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
7754 (DECL_FRIEND_CONTEXT): New macro.
7755 (DECL_REAL_CONTEXT): Remove.
7756 (SET_DECL_FRIEND_CONTEXT): Likewise.
7757 (DECL_VIRTUAL_CONTEXT): Adjust.
7758 (DECL_CLASS_SCOPE_P): Use TYPE_P.
7759 (add_friends): Remove.
7760 (hack_decl_function_context): Likewise.
7761 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
7762 CP_DECL_CONTEXT.
7763 (build_over_call): Fix indentation. Use DECL_CONTEXT
7764 instead of DECL_CLASS_CONTEXT.
7765 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
7766 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
7767 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7768 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
7769 (build_base_field): Likewise.
7770 (finish_struct_1): Likewise.
7771 (build_self_reference): Likewise.
7772 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
7773 DECL_REAL_CONTEXT.
7774 (pushtag): Use decl_function_context, not
7775 hack_decl_function_context.
7776 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7777 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
7778 (pushdecl): Remove bogus code.
7779 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
7780 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7781 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7782 Use decl_function_context, nothack_decl_function_context.
7783 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
7784 (grokdeclarator): Likewise. Use decl_function_context, not
7785 hack_decl_function_context.
7786 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
7787 (start_function): Use DECL_FRIEND_CONTEXT, not
7788 DECL_CLASS_CONTEXT. Use decl_function_context, not
7789 hack_decl_function_context.
7790 (finish_function): Use decl_function_context, not
7791 hack_decl_function_context.
7792 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
7793 DECL_CLASS_CONTEXT.
7794 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
7795 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
7796 (grokfield): Likewise.
7797 (finish_builtin_type): Likewise.
7798 (finish_vtable_vardec): Use decl_function_context, not
7799 hack_decl_function_context.
7800 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7801 (start_static_initialization_or_destruction): Likewise.
7802 (finish_static_initialization_or_destruction): Likewise.
7803 (mark_used): Adjust logic for deciding when to synthesize methods.
7804 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
7805 DECL_REAL_CONTEXT.
7806 * error.c (dump_function_decl): Use DECL_CONTEXT, not
7807 DECL_CLASS_CONTEXT.
7808 * friend.c (is_friend): Likewise.
7809 (add_friends): Remove.
7810 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
7811 * lex.c (begin_definition_of_inclass_inline): Use
7812 decl_function_context, not hack_decl_function_context.
7813 (process_next_inline): Likewise.
7814 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7815 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
7816 DECL_CLASSS_CONTEXT.
7817 (hack_identifier): Likewise.
7818 (synthesize_method): Use decl_function_context, not
7819 hack_decl_function_context.
7820 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
7821 DECL_REAL_CONTEXT.
7822 (is_member_template): Use decl_function_context, not
7823 hack_decl_function_context. Use DECL_CONTEXT, not
7824 DECL_CLASS_CONTEXT.
7825 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
7826 DECL_CLASS_CONTEXT.
7827 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
7828 DECL_REAL_CONTEXT.
7829 (push_template_decl_real): Likewise.
7830 (instantiate_class_template): Don't call add_friends.
7831 (tsubst_default_argument): Use DECL_CONTEXT, not
7832 DECL_REAL_CONTEXT.
7833 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
7834 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7835 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
7836 DECL_CLASS_CONTEXT.
7837 * repo.c (repo_inline_used): Likewise.
7838 * search.c (current_scope): Adjust for new _CONTEXT macros.
7839 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
7840 DECL_REAL_CONTEXT.
7841 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7842 (lookup_fnfields_here):Likewise.
7843 (check_final_overrider): Likewise.
7844 (init_vbase_pointers): Likewise.
7845 (virtual_context): Likewise.
7846 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
7847 (expand_body): Use decl_function_context, not
7848 hack_decl_function_context.
7849 * tree.c (hack_decl_function_context): Remove.
7850 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
7851 DECL_CLASS_CONTEXT.
7852 * typeck2.c (error_not_base_type): Likewise.
7853
7854 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
7855
7856 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
7857
7858 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7859
7860 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
7861
7862 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
7863
7864 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
7865
7866 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
7867
7868 * decl2.c (lang_decode_option): Enable automatic line wrapping.
7869
7870 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
7871
7872 * parse.y (frob_specs): Split out...
7873 (parse_decl): From here.
7874 (fn.def2): Call initial_deferred_type_access_control.
7875 (after_type_component_declarator0): Call frob_specs.
7876 (notype_component_declarator0): Likewise.
7877 * search.c (friend_accessible_p): Nested classes are friends of their
7878 enclosing classes.
7879
7880 2000-02-10 Mark Mitchell <mark@codesourcery.com>
7881
7882 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
7883 used to create an implicit temporary.
7884
7885 * class.c (dfs_modify_vtables): Tweak calculation of functions to
7886 override.
7887
7888 2000-02-08 Nathan Sidwell <nathan@acm.org>
7889
7890 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
7891 strip array element qualifiers too.
7892
7893 2000-02-07 Mark Mitchell <mark@codesourcery.com>
7894
7895 * decl.c (store_parm_decls): Don't build cleanups for parameters
7896 while processing_template_decl.
7897
7898 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
7899
7900 * cp-tree.h (struct saved_scope): Add incomplete field.
7901 (namespace_scope_incomplete): New macro.
7902 * decl.c (pushdecl): Use it.
7903 (hack_incomplete_structures): Use it. See through artificial
7904 binding levels.
7905 (mark_saved_scope): Mark it.
7906
7907 Implement access control for nested types.
7908 * search.c (type_access_control): New fn.
7909 (accessible_p): Now we do perform access control for types.
7910 * semantics.c (deferred_type_access_control): New fn.
7911 (initial_deferred_type_access_control): New fn.
7912 (begin_function_definition): Call it. Add lookups parm.
7913 * decl.c (struct binding_level): Add this_class field.
7914 (pushlevel_class): Set it.
7915 (mark_binding_level): Mark it.
7916 (lookup_name_real): Use it. Call type_access_control.
7917 (mark_saved_scope): Mark lookups field.
7918 * cp-tree.h (flagged_type_tree): Add lookups field.
7919 (struct saved_scope): Add lookups field.
7920 (type_lookups): New macro.
7921 * parse.y (declmods): Now <ftype>.
7922 (parse_decl): Add lookups parm. Call
7923 initial_deferred_type_access_control.
7924 (lang_extdef): Clear type_lookups.
7925 (typed_declspecs, declmods, typespec): Set lookups field.
7926 (initdcl): Call deferred_type_access_control.
7927 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
7928 component_decl_1, named_parm): Adjust.
7929 * friend.c (is_friend): Nested classes are friends of their
7930 enclosing classes.
7931
7932 * class.c (currently_open_derived_class): New fn.
7933 * method.c (hack_identifier): Use it.
7934
7935 * lex.c (do_identifier): Remove obsolete code.
7936
7937 * parse.y (typed_typespecs): Propagate new_type_flag properly.
7938
7939 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
7940
7941 * tinfo.h: Remove apostrophes from C++ comment (xgettext
7942 thinks this file is plain C).
7943
7944 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7945
7946 * Makefile.in (call.o): Depend on $(EXPR_H).
7947
7948 * call.c: Include "expr.h".
7949
7950 * class.c (dump_class_hierarchy): Add prototype.
7951
7952 * search.c (dfs_get_pure_virtuals): Likewise.
7953
7954 2000-02-1 Ulrich Drepper <drepper@redhat.com>
7955
7956 * parse.y (simple_stmt): Allow :: token in asm parameter list.
7957 * parse.c: Rebuilt.
7958
7959 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
7960
7961 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
7962 Store it in DECL_FCONTEXT.
7963 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
7964
7965 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
7966
7967 * tinfo.h (old abi): #include "tconfig.h".
7968 * tinfo.cc (convert_to_base): Move into old abi section.
7969
7970 2000-01-31 Mark Mitchell <mark@codesourcery.com>
7971
7972 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
7973 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
7974 (BINFO_PRIMARY_BINFO): New macro.
7975 (BF_DELTA): Rename to ...
7976 (BV_DELTA): ... this.
7977 (BF_VCALL_INDEX): Rename to ...
7978 (BV_VCALL_INDEX): ... this.
7979 (BF_FN): Rename to ...
7980 (BV_FN): ... this.
7981 * class.c (build_vbase_path): Adjust for changes to reverse_path.
7982 (set_rtti_entry): Rename BF_ macros to BV_ variants.
7983 (modify_vtable_entry): Simplify.
7984 (add_virtual_function): Rename BF_ macros to BV_ variants.
7985 (build_vtable_initializer): Likewise.
7986 (get_class_offset_1): Remove.
7987 (dfs_get_class_offset): Likewise.
7988 (get_class_offset): Likewise.
7989 (dfs_find_final_overrider): New function.
7990 (find_final_overrider): Likewise.
7991 (modify_one_vtable): Remove.
7992 (dfs_find_base): New function.
7993 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
7994 find_final_overrider.
7995 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
7996 virtuals.
7997 (dfs_fixup_vtable_deltas): Remove.
7998 (override_one_vtable): Remove.
7999 (merge_overrides): Likewise.
8000 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
8001 unreal chilren of virtual bases.
8002 (finish_struct_1): Don't use merge_overrides. Don't use
8003 dfs_fixup_vtable_deltas.
8004 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
8005 BINFOs.
8006
8007 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
8008 Jason Merrill <jason@yorick.cygnus.com>
8009
8010 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
8011
8012 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
8013
8014 * exception.cc (__throw_bad_typeid): Add missing std::.
8015
8016 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8017
8018 * cp-tree.h (make_thunk): PROTO -> PARAMS.
8019
8020 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
8021
8022 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
8023
8024 Runtime support for new-abi rtti.
8025 * inc/typeinfo (type_info::operator!=): Define in class.
8026 (type_info::before, type_info::name, type_info::operator==,
8027 type_info::operator!=): Define new ABI implementations.
8028 (type_info::is_pointer_p, type_info::is_function_p): Declare
8029 new virtual functions.
8030 (type_info::do_catch, type_info::do_upcast): Likewise.
8031
8032 * tinfo.h (__base_class_info): Define new class.
8033 (__class_type_info): Likewise.
8034 (__si_class_type_info): Likewise.
8035 (__vmi_class_type_info): Likewise.
8036 (__dynamic_cast): Prototype.
8037
8038 * tinfo.cc: Conditionalize old and new rtti mechanisms.
8039 (type_info::is_pointer_p): Define new function.
8040 (type_info::is_function_p): Likewise.
8041 (type_info::do_catch): Likewise.
8042 (type_info::do_upcast): Likewise.
8043 (vtable_prefix): New structure for vtable access.
8044 (adjust_pointer): Define new template function.
8045 (contained_p, public_p, virtual_p, contained_public_p,
8046 contained_nonpublic_p, contained_nonvirtual_p): Define new
8047 functions.
8048 (nonvirtual_base_type): New local variable.
8049 (__class_type_info::~__class_type_info): Define.
8050 (__si_class_type_info::~__si_class_type_info): Likewise.
8051 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
8052 (__class_type_info::do_catch): Define new function.
8053 (__class_type_info::do_upcast): Likewise.
8054 (__class_type_info::find_public_src): Likewise.
8055 (__class_type_info::do_find_public_src): Likewise.
8056 (__si_class_type_info::do_find_public_src): Likewise.
8057 (__vmi_class_type_info::do_find_public_src): Likewise.
8058 (__class_type_info::do_dyncast): Likewise.
8059 (__si_class_type_info::do_dyncast): Likewise.
8060 (__vmi_class_type_info::do_dyncast): Likewise.
8061 (__class_type_info::do_upcast): Likewise.
8062 (__si_class_type_info::do_upcast): Likewise.
8063 (__vmi_class_type_info::do_upcast): Likewise.
8064 (__dynamic_cast): Likewise.
8065
8066 * tinfo2.cc (__fundamental_type_info): Define new class.
8067 (__pointer_type_info): Likewise.
8068 (__reference_type_info): Likewise.
8069 (__array_type_info): Likewise.
8070 (__function_type_info): Likewise.
8071 (__enum_type_info): Likewise.
8072 (__ptr_to_member_type_info): Likewise.
8073 (__fundamental_type_info::~__fundamental_type_info): Define.
8074 (__pointer_type_info::~__pointer_type_info): Likewise.
8075 (__reference_type_info::~__reference_type_info): Likewise.
8076 (__array_type_info::~__array_type_info): Likewise.
8077 (__function_type_info::~__function_type_info): Likewise.
8078 (__enum_type_info::~__enum_type_info): Likewise.
8079 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
8080 (__pointer_type_info::do_catch): Define new function.
8081 (__ptr_to_member_type_info::do_catch): Define new function.
8082
8083 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
8084 (__is_pointer): Likewise.
8085
8086 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
8087
8088 2000-01-30 Mark Mitchell <mark@codesourcery.com>
8089
8090 * cp/class.c (build_vtable): Rename to build_primary_vtable.
8091 (prepare_fresh_vtable): Rename to build_secondary_vtable.
8092 (make_new_vtable): New function.
8093 (modify_vtable_entry): Handle generation of new vtables correctly.
8094 (modify_one_vtable): Remove unused parameter.
8095 (dfs_fixup_vtable_deltas): Likewise.
8096 (override_one_vtable): Use build_secondary_vtable.
8097 (finish_struct_1): Use build_primary_vtable and
8098 build_secondary_vtable.
8099
8100 2000-01-28 Ulrich Drepper <drepper@redhat.com>
8101
8102 * cp/decl.c: Adjust variable names, comments, help strings.
8103
8104 2000-01-29 Nathan Sidwell <nathan@acm.org>
8105
8106 * new2.cc (operator delete[]): Use operator delete, don't assume
8107 implementation.
8108
8109 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
8110
8111 * class.c (build_vtbl_initializer): Add argument to
8112 build_vtable_entry call.
8113
8114 2000-01-27 Mark Mitchell <mark@codesourcery.com>
8115
8116 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
8117 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
8118 (BF_DELTA): New macro.
8119 (BF_VCALL_INDEX): Likewise.
8120 (BF_FN): Likewise.
8121 (THUNK_VCALL_OFFSET): Likewise.
8122 (make_thunk): Change prototype.
8123 * class.c (build_vtable_entry): Integrate
8124 build_vtable_entry_for_fn. Handle vcall indices.
8125 (build_vtable_entry_for_fn): Remove.
8126 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
8127 BF_VCALL_INDEX, BF_FN.
8128 (modify_vtable_entry): Integrate common code from
8129 modify_one_vtable and dfs_fixup_vtable_deltas.
8130 (add_virtual_function): Set BF_VCALL_INDEX.
8131 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
8132 and BF_FN.
8133 (modify_one_vtable): Simplify.
8134 (dfs_fixup_vtable_deltas): Likewise.
8135 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
8136 * method.c (make_thunk): Handle vcall indices.
8137
8138 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
8139
8140 Compiler side new abi rtti (not enabled).
8141 * cp-tree.h (new_abi_rtti_p): New macro.
8142 (emit_support_tinfos): Prototype new function.
8143 (tinfo_decl_p): Likewise.
8144 (emit_tinfo_decl): Likwise.
8145 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
8146 macros.
8147 (doing_runtime): New local static.
8148 (init_rtti_processing): Add new-abi initializer.
8149 (get_tinfo_decl): Add new-abi logic.
8150 (tinfo_from_decl): Likewise.
8151 (build_dynamic_cast_1): Likewise.
8152 (qualifier_flags): New static function.
8153 (tinfo_base_init): Likewise.
8154 (generic_initializer): Likewise.
8155 (ptr_ref_initializer): Likewise.
8156 (ptmd_initializer): Likewise.
8157 (class_hint_flags): Likewise.
8158 (class_initializer): Likewise.
8159 (synthesize_tinfo_var): Likewise.
8160 (create_real_tinfo_var): Likewise.
8161 (create_pseudo_type_info): Likewise.
8162 (get_vmi_pseudo_type_info): Likewise.
8163 (create_tinfo_types): Likewise.
8164 (emit_support_tinfos): New global function.
8165 (tinfo_decl_p): New global predicate.
8166 (emit_tinfo_decl): New global function.
8167 * class.c (set_rtti_entry): Generalize for old and new rtti.
8168 (build_vtbl_initializer): Likewise.
8169 * decl2.c (finish_file): Likewise.
8170
8171 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
8172
8173 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
8174 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
8175
8176 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
8177
8178 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
8179 for scopes.
8180
8181 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
8182
8183 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
8184
8185 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8186
8187 * optimize.c (calls_setjmp_r): Supply new argument
8188 to special_function_p.
8189
8190 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8191
8192 * call.c: PROTO -> PARAMS.
8193 * class.c: Likewise.
8194 * cp-tree.h: Likewise.
8195 * cvt.c: Likewise.
8196 * decl.c: Likewise.
8197 * decl.h: Likewise.
8198 * decl2.c: Likewise.
8199 * dump.c: Likewise.
8200 * errfn.c: Likewise.
8201 * error.c: Likewise.
8202 * except.c: Likewise.
8203 * expr.c: Likewise.
8204 * init.c: Likewise.
8205 * input.c: Likewise.
8206 * lex.c: Likewise.
8207 * lex.h: Likewise.
8208 * method.c: Likewise.
8209 * optimize.c: Likewise.
8210 * parse.y: Likewise.
8211 * pt.c: Likewise.
8212 * repo.c: Likewise.
8213 * rtti.c: Likewise.
8214 * search.c: Likewise.
8215 * semantics.c: Likewise.
8216 * spew.c: Likewise.
8217 * tree.c: Likewise.
8218 * typeck.c: Likewise.
8219 * typeck2.c: Likewise.
8220 * xref.c: Likewise.
8221
8222 2000-01-25 Richard Henderson <rth@cygnus.com>
8223
8224 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
8225
8226 2000-01-25 Mark Mitchell <mark@codesourcery.com>
8227
8228 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
8229 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
8230 (struct vcall_offset_data_s): New type.
8231 (dfs_vcall_offset_queue_p): New function.
8232 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8233 (build_vcall_offset_vtbl_entries): Likewise.
8234 (layout_vtable_decl): Likewise.
8235 (num_vfun_entries): Likewise.
8236 (num_extra_vtbl_entries): Add the entries for vcall offsets.
8237 (build_vtbl_initializer): Likewise.
8238 (dfs_finish_vtabls): Use layout_vtable_decl.
8239 (modify_one_vtables): Always duplicate vtables under the new ABI.
8240 (finish_struct_1): Use layout_vtable_decl.
8241
8242 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8243
8244 * decl.c (member_function_or_else): Change third arg from a format
8245 specifier to an `enum overload_flags'. Callers changed.
8246
8247 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
8248
8249 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
8250 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
8251 build_const_cast, get_delta_difference, check_return_expr): Avoid
8252 ANSI string concatenation usage.
8253
8254 2000-01-24 Mark Mitchell <mark@codesourcery.com>
8255
8256 * class.c (layout_class_type): Put the fields required to make a
8257 class non-empty at the end, not the beginning, of the TYPE_FIELDs
8258 list.
8259
8260 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
8261
8262 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
8263 template.
8264
8265 * decl2.c (mark_used): Do instantiate inlines that have been
8266 explicitly instantiated.
8267
8268 2000-01-24 Richard Henderson <rth@cygnus.com>
8269
8270 * call.c (build_over_call): Use expand_tree_builtin.
8271 * typeck.c (build_function_call_real): Likewise.
8272 (build_binary_op_nodefault): Handle unordered compares.
8273
8274 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8275
8276 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
8277 cp_tree_index values.
8278 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
8279 New global node #defines for them.
8280 * rtti.c (call_void_fn): Replace with ...
8281 (build_runtime_decl): ... new static function.
8282 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
8283 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
8284 (build_dynamic_cast_1): Always produce correctly typed result.
8285 Explicitly produce type_info addresses. Use dynamic_cast_node.
8286 * exception.cc (__throw_bad_cast): Return `void *'.
8287 (__throw_bad_typeid): Return `const type_info &'.
8288
8289 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8290
8291 * cp-tree.h (get_vtable_decl): Prototype new function.
8292 * class.c (get_vtable_decl): New function. Broken out from ...
8293 (build_vtable): ... here. Use it.
8294 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
8295 by get_vtable_decl.
8296
8297 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8298
8299 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
8300 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
8301 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
8302 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
8303 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
8304 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
8305 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
8306 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
8307 (CPTI_TINFO_VAR_ID): New enumeration.
8308 (__tp_desc_type_node, __access_mode_type_node,
8309 __bltn_desc_type_node, __user_desc_type_node,
8310 __class_desc_type_node, __ptr_desc_type_node,
8311 __attr_desc_type_node, __func_desc_type_node,
8312 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
8313 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
8314 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
8315 enum_desc_type_node, class_desc_type_node,
8316 si_class_desc_type_node, vmi_class_desc_type_node,
8317 ptmd_desc_type_node, base_desc_type_node): New #defines.
8318 (tinfo_fn_id, tinfo_fn_type): Rename to ...
8319 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
8320 (tinfo_var_id): New enumeration.
8321 (DECL_TINFO_FN_P): Augment comment.
8322 * decl.c (cp_global_trees): Adjust documentation.
8323 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
8324 tinfo_decl_type and tinfo_var_id.
8325 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
8326 (build_typeid): Remove unused variable.
8327 (get_tinfo_var): Use tinfo_var_id.
8328 (tinfo_name): New static function.
8329 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
8330 (tinfo_from_decl): Likewise.
8331 (get_base_offset): New static function, broken out of
8332 expand_class_desc.
8333 (expand_si_desc): Use tinfo_name.
8334 (expand_class_desc): Likewise. Lose local static variable.
8335 Use base_desc_type_node. Use get_base_offset.
8336 (expand_ptr_desc): Use tinfo_name.
8337 (expand_attr_desc): Likewise.
8338 (expand_generic_desc): Likewise.
8339
8340 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
8341 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
8342
8343 2000-01-23 Mark Mitchell <mark@codesourcery.com>
8344
8345 * cp-tree.h (__eprintf): Remove declaration.
8346 * tree.c (__eprintf): Remove definition.
8347
8348 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
8349 Mark Mitchell <mark@codesourcery.com>
8350
8351 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
8352 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
8353
8354 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
8355
8356 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
8357
8358 2000-01-23 Mark Mitchell <mark@codesourcery.com>
8359
8360 * cp-tree.h (register_dtor_fn): New function.
8361 * decl.c (destroy_local_static): Rename to ...
8362 (register_dtor_fn): ... this. Give it external linkage.
8363 (expand_static_init): Use it.
8364 * decl2.c (do_static_initialization): Likewise, if using
8365 __cxa_atexit.
8366 (do_static_destruction): Check that __cxa_atexit is not in use.
8367 (finish_file): Don't call do_static_destruction if using
8368 __cxa_atexit.
8369
8370 * typeck.c (convert_arguments): Restore two-message error
8371 reporting.
8372
8373 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
8374
8375 Remap dynamic cast hint values to be consistent across ABIs.
8376 * search.c (dynamic_cast_base_recurse): Remap generated value.
8377 (get_dynamic_cast_base_type): Adjust documentation.
8378 * tinfo.h (__user_type_info::dyncast): Likewise.
8379 (__user_type_info::find_public_subobj): Remap BOFF meaning.
8380 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
8381 (__class_type_info::do_dyncast): Likewise.
8382 (__class_type_info::do_find_public_subobj): Likewise.
8383 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
8384
8385 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
8386
8387 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
8388
8389 * typeck2.c (incomplete_type_error): Restore previous
8390 cp_error and cp_error_at call sequence.
8391
8392 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
8393
8394 * class.c (dump_class_hierarchy): Make format agree with argument;
8395 cast pointer to unsigned long and print with %lx.
8396
8397 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
8398
8399 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
8400
8401 * typeck.c (composite_pointer_type, common_type,
8402 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
8403 build_function_call_real, convert_arguments,
8404 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
8405 build_unary_op, mark_addressable, build_compound_expr,
8406 build_static_cast, build_reinterpret_cast, build_const_cast,
8407 build_c_cast, build_modify_expr, get_delta_difference,
8408 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
8409 'ISO C++'. Fusion consecutive calls to diagnotic message routines
8410 into a single one.
8411 * typeck2.c (readonly_error, abstract_virtuals_error,
8412 process_init_constructor, check_for_new_type): Likewise.
8413
8414 2000-01-19 Mark Mitchell <mark@codesourcery.com>
8415
8416 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
8417 VAR_DECLs.
8418
8419 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
8420
8421 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
8422 (build_x_typeid): Likewise.
8423 (get_tinfo_fn): Likewise.
8424 (get_tinfo_fn_unused): Rename to ...
8425 (get_tinfo_decl): ... here.
8426 * rtti.c (build_headof): Replace logic error with assertion.
8427 (get_tinfo_fn_dynamic): Rename to ...
8428 (get_tinfo_decl_dynamic): ... here. Make static. Use
8429 complete_type_or_else.
8430 (build_x_typeid): Move into ...
8431 (build_typeid): ... here. Adjust call to
8432 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
8433 throw_bad_typeid expression.
8434 (get_tinfo_fn_unused): Rename to ...
8435 (get_tinfo_decl): ... here. Adjust comment.
8436 (get_tinfo_fn): Delete.
8437 (tinfo_from_decl): New static function.
8438 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
8439 (get_typeid): Use complete_type_or_else.
8440 (build_dynamic_cast_1): Adjust calls to
8441 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
8442 * parse.y (primary): Adjust call to build_typeid.
8443 * except.c (build_eh_type_type_ref): Adjust call to
8444 get_tinfo_decl. Mark as used.
8445 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
8446 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
8447 * parse.c: Regenerated.
8448
8449 2000-01-17 Mark Mitchell <mark@codesourcery.com>
8450
8451 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
8452 calling convention.
8453 (resolves_to_fixed_type_p): Document calling convention.
8454 * rtti.c (build_x_typeid): Initialize NONNULL.
8455
8456 * cp-tree.h (build_shared_int_cst): New function.
8457 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
8458 * class.c (modify_vtable_entry): Likewise.
8459 (add_virtual_function): Split out code to generated shared
8460 INTEGER_CSTs to build_share_int_cst.
8461 (modify_all_vtables): Handle all the overridden functions here.
8462 Add overridden functions from non-primary virtual bases to the
8463 primary vtable.
8464 (finish_struct_1): Adjust call to modify_all_vtables. Add
8465 overridden functions from non-primary bases to the vtable.
8466 * tree.c (build_shared_int_cst): New function.
8467
8468 * cp-tree.h (scratchalloc): Remove.
8469 (build_scratch_list): Likewise.
8470 * call.c (convert_class_to_reference): Replace build_scratch_list
8471 and build_expr_list with build_tree_list.
8472 (add_candidate): Replace scratchalloc with expralloc. Note memory
8473 leak.
8474 (build_user_type_conversion_1): Replace build_scratch_list
8475 and build_expr_list with build_tree_list.
8476 (build_new_op): Likewise.
8477 (build_op_delete_call): Likewise.
8478 (convert_like): Likewise.
8479 * cvt.c (ocp_convert): Likewise.
8480 * decl.c (start_decl): Likewise.
8481 (start_function): Likewise.
8482 (finish_destructor_body): Likewise.
8483 (maybe_build_cleanup_1): Likewise.
8484 * decl2.c (reparse_decl_as_expr): Likewise.
8485 * init.c (perform_member_init): Likewise.
8486 (expand_cleanup_for_base): Likewise.
8487 (build_builtin_delete_call): Likewise.
8488 (build_new_1): Likewise.
8489 (build_delete): Likewise.
8490 * method.c (do_build_assign_ref): Likewise.
8491 * parse.y (already_scoped_stmt): Likewise.
8492 (nontrivial_exprlist): Likewise.
8493 (net_initializer): Likewise.
8494 (initlist): Likewise.
8495 * parse.c: Regenerated.
8496 * rtti.c (build_x_typeid): Likewise.
8497 (build_dynamic_cast_1): Likewise.
8498 * typeck.c (build_x_compound_expr): Likewise.
8499 (build_static_cast): Likewise.
8500 (build_modify_expr): Likewise.
8501
8502 * cp-tree.h (DECL_VINDEX): Add documentation.
8503 * class.c (build_vtable_entry): Likewise.
8504 (start_vtable): Add comment.
8505 (add_virtual_function): Replace pending_hard_virtuals with
8506 overridden_virtuals and pending_virtuals with new_virtuals.
8507 Replace redundant assignments with assertions.
8508 (check_for_override): Add comment.
8509 (check_bases_and_members): Replace pending_hard_virtuals with
8510 overridden_virtuals and pending_virtuals with new_virtuals.
8511 (create_vtbl_ptr): Likewise.
8512 (layout_class_type): Likewise.
8513 (finish_struct_1): Likewise. Add comments.
8514
8515 2000-01-16 Mark Mitchell <mark@codesourcery.com>
8516
8517 * class.c (finish_struct_1): Replace redundant code with
8518 assertions.
8519
8520 * cp-tree.h (flag_new_abi): Move.
8521 (flag_use_cxa_atexit): Likewise.
8522 (flag_honor_std): Likewise.
8523 (flag_rtti): Likewise.
8524 (vbase_offsets_in_vtable_p): Define.
8525 (vptrs_present_everywhere_p): Likewise.
8526 (TYPE_CONTAINS_VPTR_P): Likewise.
8527 (dfs_walk_real): Declare.
8528 * class.c (build_vbase_pointer_fields): Check
8529 vbase_offsets_in_vtable_p.
8530 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
8531 BINFO_VPTR_FIELD.
8532 (build_vbase_offset_vtbl_entries): Simplify.
8533 (build_vbase_offset_vtbl_entries): Adjust.
8534 (build_vbase_pointer): Add ability to look up vbase offsets in
8535 vtable.
8536 (start_vtable): New function.
8537 (add_virtual_function): Use it.
8538 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
8539 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
8540 (build_vtbl_initializer): Take the type of the complete object as
8541 input. Use it to correctly calculate vbase offsets.
8542 (dfs_finish_vtbls): Pass the complete type to
8543 build_vtbl_initializer.
8544 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
8545 (create_vtable_ptr): Create a vtable even if there are no
8546 new virtual functions, under the new ABI.
8547 (finish_struct_1): Likewise.
8548 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
8549 * decl.c (exapnd_static_init): Remove call to
8550 preserve_initializer.
8551 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
8552 vtables.
8553 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
8554 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
8555 (construct_virtual_bases): Don't initialize virtual base pointers
8556 under the new ABI.
8557 (build_aggr_init): Clean up comment.
8558 (expand_aggr_init_1): Likewise.
8559 * rtti.c (expand_class_desc): Store the virtual function table
8560 index where the vbase offset lives in the offset field.
8561 * search.c (dfs_walk_real): Make it global.
8562 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
8563 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
8564
8565 * tinfo.h (USItype): Make it signed under the new ABI.
8566 * tinfo.cc (convert_to_base): New function. Encapsulate base
8567 conversion logic here.
8568 (__class_type_info::do_upcast): Use it.
8569 (__class_type_info::do_dyncast): Likewise.
8570 (__class_type_info::do_find_public_subobj): Likewise.
8571
8572 * init.c (construct_virtual_bases): Don't look up the addresses of
8573 virtual bases at run-time.
8574
8575 * class.c (build_vbase_pointer): Relocate.
8576 (build_vbase_pointer_fields): Likewise.
8577 (dfs_build_vbase_offset_vtbl_entries): Likewise.
8578 (build_vbase_offset_vtbl_entries): Likewise.
8579
8580 * decl.c (init_decl_processing): Complain if -fnew-abi
8581 -fno-vtable-thunks is used.
8582
8583 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
8584 flag_new_abi.
8585
8586 2000-01-15 Mark Mitchell <mark@codesourcery.com>
8587
8588 * cp-tree.h (num_extra_vtbl_entries): New function.
8589 (size_extra_vtbl_entries): Likewise.
8590 (dfs_vtable_path_unmark): Likewise.
8591 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
8592 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
8593 * class.c (num_extra_vtbl_entries): New function.
8594 (size_extra_vtbl_entries): Likewise.
8595 (dfs_build_vbase_offset_vtbl_entries): New function.
8596 (build_vbase_offset_vtbl_entries): Likewise.
8597 (build_vtbl_initializer): Use it.
8598 (finish_struct_1): Adjust vtable sizes (using
8599 num_extra_vtbl_entries).
8600 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
8601 THUNK_DECL is non-NULL before expanding it.
8602 * init.c (expand_virtual_init): Adjust the vtable pointer by
8603 size_extra_vtbl_entries before storing it.
8604 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
8605 Handle TREE_LIST parameters here, not in the dfs_* functions.
8606 (dfs_unmarked_real_bases_queue_p): Adjust.
8607 (dfs_marked_real_bases_queue_p): Likewise.
8608 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
8609 (dfs_vtable_path_marked_real_bases_queue_p): New function.
8610 (dfs_vtable_path_unmark): Likewise.
8611
8612 2000-01-14 Mark Mitchell <mark@codesourcery.com>
8613
8614 * optimize.c (copy_body_r): Clear the operand three of a
8615 TARGET_EXPR when copying it.
8616
8617 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8618
8619 * method.c (build_decl_overload_real): Check whether we are in ::
8620 before returning __builtin_new/delete.
8621
8622 2000-01-13 Mark Mitchell <mark@codesourcery.com>
8623
8624 * pt.c (tsubst_friend_function): Improve comment.
8625 (instantiate_decl): Avoid crashing when a "nested" function is
8626 instantiated from the top level.
8627
8628 * dump.c (dqeueue_and_dump): Dump
8629 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
8630
8631 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8632
8633 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
8634
8635 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
8636
8637 * g++spec.c (lang_specific_driver): Add -fnew-abi if
8638 ENABLE_NEW_GXX_ABI defined.
8639 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
8640 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
8641 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
8642
8643 2000-01-12 Mark Mitchell <mark@codesourcery.com>
8644
8645 * decl.c (start_cleanup_fn): Call pushdecl.
8646
8647 * call.c (convert_class_to_reference): Fix typos.
8648 (build_conditional_expr): Handle errors gracefully.
8649 * class.c (push_nested_class): Likewise.
8650 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
8651 (DECL_THIS_EXTERN): Use it.
8652 (DECL_THIS_STATIC): Likewise.
8653 * cvt.c (convert_to_void): Handle errors gracefully.
8654 (build_expr_type_conversion): Likewise.
8655 * decl.c (maybe_push_decl): Likewise.
8656 (start_decl_1): Likewise.
8657 (require_complete_types_for_parms): Likewise.
8658 * parse.y (structsp): Likewise.
8659 (base_class): Likewise.
8660 * parse.c: Regenerated.
8661 * pt.c (finish_member_template_decl): Likewise.
8662 * typeck.c (decay_conversion): Likewise.
8663
8664 * cp-tree.h (dfs_skip_vbases): New function.
8665 (find_vbase_instance): Likewise.
8666 * class.c (determine_primary_base): Allow a nearly empty base to
8667 serve as a primary base class under the new ABI.
8668 (get_class_offset_1): Rename to ...
8669 (dfs_get_class_offset): ... this. Simplify. Don't issue error
8670 messages here.
8671 (get_class_offset): Use it. Issue error messages here.
8672 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
8673 find the right copies of virtual bases.
8674 (fixup_vtable_deltas1): Rename to ...
8675 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
8676 bases as primary bases.
8677 (fixup_vtable_deltas): Remove.
8678 (override_one_vtable): Handle virtual bases as primary bases.
8679 (merge_overrides): Likewise.
8680 (finish_struct_1): Likewise.
8681 (dump_class_hierarchy): Dump primary-ness of bases as well.
8682 * search.c (mark_primary_bases): Use a pre-order traversal to
8683 handle primary virtual bases.
8684 (dfs_skip_vbases): New fiunction.
8685 (expand_upcast_fixups): Adjust to handle primary virtual bases.
8686 (fixup_virtual_upcast_offsets): Likewise.
8687 (fixup_all_virtual_upcast_offsets): Likewise.
8688 (dfs_find_vbase_instances): New function.
8689 (find_vbase_instance): Likewise.
8690
8691 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
8692
8693 * lex.c (DIR_SEPARATOR): Delete macro.
8694
8695 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
8696
8697 * decl2.c (lang_decode_option): Handle automatic line wrapping
8698 option.
8699
8700 2000-01-11 Mark Mitchell <mark@codesourcery.com>
8701
8702 * friend.c (do_friend): Don't resolve scopes when processing
8703 template declarations, even if the qualifying scope doesn't
8704 involve template parameters.
8705
8706 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
8707
8708 * class.c (dfs_modify_vtables_queue_p): Remove.
8709 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
8710 and dfs_marked_real_bases_queue_p instead of
8711 dfs_modify_vtables_queue_p.
8712
8713 * class.c (build_vbase_path): Simplify.
8714 (dfs_propagate_binfo_offsets): New function.
8715 (propagate_binfo_offsets): Use it.
8716 (remove_base_field): Simplify.
8717 (dfs_set_offset_for_vbases): Remove.
8718 (dfs_set_offset_for_shared_vbases): New function.
8719 (dfs_set_offset_for_unshared_vbases): Likewise.
8720 (layout_virtual_bases): Use them.
8721 (layout_basetypes): Don't call propagate_binfo_offsets.
8722 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
8723 for the vbases.
8724
8725 * class.c (build_base_field): New function, split out from ...
8726 (build_base_fields): ... here. Use it. Allocate primary bases
8727 first, under the new ABI.
8728 (get_vtable_entry): Remove.
8729 (remove_base_field): New function, split out from ...
8730 (remove_base_fields): ... here. Adjust since primary bases come
8731 first under the new ABI.
8732
8733 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
8734 (initialize_vtbl_ptrs): New function.
8735 (expand_indirect_vtbls_init): Change prototype.
8736 (convert_pointer_to_vbase): Declare.
8737 * init.c (expand_direct_vtbls_init): Remove.
8738 (dfs_initialize_vtbl_ptrs): New function.
8739 (initialize_vtbl_ptrs): Likewise.
8740 (emit_base_init): Use initialize_vtbl_ptrs.
8741 * search.c (convert_pointer_to_vbase): Make it global.
8742 (expand_indirect_vtbls_init): Remove vtable initialization code.
8743 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
8744
8745 * class.c (dfs_finish_vtbls): New function.
8746 (finish_vtbls): Use it.
8747 (dump_class_hierarchy): New function.
8748
8749 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
8750 (BINFO_VBASE_PRIMARY_P): New macro.
8751 (BINFO_VIRTUALS): Add to documentation.
8752 (SET_BINFO_PRIMARY_MARKED_P): Remove.
8753 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8754 (dfs_mark_primary_bases_queue_p): Likewise.
8755 (dfs_unmarked_real_bases_queue_p): New function.
8756 (dfs_marked_real_bases_queue_p): Likewise.
8757 * search.c (dfs_mark_primary_bases): Adjust.
8758 (mark_primary_bases): Likewise.
8759 (get_shared_vbase_if_not_primary): New function.
8760 (dfs_unmarked_real_bases_queue_p): Likewise.
8761 (dfs_marked_real_bases_queue_p): Likewise.
8762 (dfs_get_pure_virtuals): Simplify.
8763 (get_pure_virtuals): Likewise.
8764
8765 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8766
8767 * lex.c: Include tm_p.h.
8768
8769 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
8770
8771 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
8772
8773 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
8774
8775 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
8776 * pt.c (instantiate_decl): Defer comdat templates that might not be
8777 needed.
8778
8779 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
8780 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
8781 (finish_file): Likewise.
8782
8783 * decl2.c (import_export_class): Undo 12/14 change.
8784
8785 * error.c (dump_decl): operator new, not operatornew.
8786
8787 * class.c (field_decl_cmp): A nontype is "greater" than a type.
8788 * search.c (lookup_field_1): Look for the last field with the
8789 desired name.
8790
8791 2000-01-05 Nathan Sidwell <nathan@acm.org>
8792
8793 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
8794 FUNCTION_DECL.
8795
8796 2000-01-05 Nathan Sidwell <nathan@acm.org>
8797
8798 * typeck.c (build_static_cast): Don't strip target qualifiers
8799 when casting from a class.
8800
8801 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8802
8803 * class.c (warn_hidden): Initialize variable `fndecl'.
8804
8805 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
8806
8807 * decl.c (flag_isoc9x): New variable to be able to use code in
8808 c-common.c. For now always zero.
8809
8810 2000-01-03 Mark Mitchell <mark@codesourcery.com>
8811
8812 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
8813 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
8814 or unshare_base_binfos for virtual bases here.
8815 * search.c (dfs_get_vbase_types): Do it here.
8816 (get_vbase_types): Adjust.
8817
8818 2000-01-02 Mark Mitchell <mark@codesourcery.com>
8819
8820 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
8821 (BINFO_PRIMARY_MARKED_P): Use flag 5.
8822 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
8823 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8824 (unmark_primary_bases): Remove declaration.
8825 (unmarkedp): Declare.
8826 (dfs_vbase_unmark): Likewise.
8827 * class.c (determine_primary_base): Return immediately if there
8828 are no base classes. Call mark_primary_bases here.
8829 (modify_all_direct_vtables): Remove.
8830 (modify_all_indirect_vtables): Remove.
8831 (dfs_modify_vtables_queue_p): New function.
8832 (dfs_modify_vtables): New function.
8833 (modify_all_vtables): Use them.
8834 (build_base_fields): Build FIELD_DECLs for primary virtual base
8835 classes.
8836 (create_vtable_ptr): Don't call determine_primary_base here.
8837 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
8838 (dfs_set_offset_for_vbases): ... this.
8839 (layout_virtual_bases): Use it.
8840 (layout_class_type): Call determine_primary_base here.
8841 * search.c (unmarkedp): Make it global.
8842 (shared_marked_p): Simplify.
8843 (shared_unmarked_p): Likewise.
8844 (dfs_primary_bases_queue_p): Remove.
8845 (dfs_unmark_primary_bases): Likewise.
8846 (unmark_primary_bases): Likewise.
8847 (mark_primary_bases): Simplify.
8848 (get_pure_virtuals): Don't call mark_primary_bases here.
8849 (dfs_vbase_unmark): New function.
8850 (get_vbase_types): Simplify.
8851
8852 * class.c (struct base_info): Remove.
8853 (determine_primary_base): Take has_virtual_p rather than a
8854 base_info as input. Don't calculate max_has_virtual.
8855 (finish_struct_bits): Remove max_has_virtual argument.
8856 (create_vtable_ptr): Remove max_has_virtual_p argument.
8857 (layout_virtual_bases): Remove max argument.
8858 (layout_basetypes): Likewise.
8859 (layout_class_type): Remove max_has_virtual_p argument.
8860 (finish_struct_1): Remove max_has_virtual.
8861
8862 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
8863 (layout_basetypes): Remove.
8864 * class.c (propagate_binfo_offsets): Moved here from tree.c.
8865 Update to handle primary virtual bases.
8866 (remove_base_fields): New function, split out from
8867 layout_basetypes.
8868 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
8869 (layout_virtual_bases): New function, split out from
8870 layout_basetypes. Update to handle primary virtual bases.
8871 (layout_basetypes): Moved here from tree.c. Use
8872 remove_base_fields and layout_virtual_bases.
8873 * search.c (dfs_mark_primary_bases_queue_p): New function.
8874 (mark_primary_bases): Use it.
8875 * tree.c (CEIL): Remove.
8876 (propagate_binfo_offsets): Remove.
8877 (layout_basetypes): Remove.
8878
8879 2000-01-01 Mark Mitchell <mark@codesourcery.com>
8880
8881 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
8882 (BINFO_PRIMARY_MARKED_P): New macro.
8883 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
8884 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8885 (mark_primary_bases): New function.
8886 (unmark_primary_bases): Likewise.
8887 * search.c (get_abstract_virtuals_1): Remove.
8888 (dfs_mark_primary_bases): New function.
8889 (mark_primary_bases): Likewise.
8890 (dfs_unmark_primary_bases): Likewise.
8891 (unmark_primary_bases): Likewise.
8892 (dfs_get_pure_virtuals): Likewise.
8893
8894 2000-01-01 Mark Mitchell <mark@codesourcery.com>
8895
8896 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
8897 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
8898 (modify_one_vtable): Adjust.
8899 (fixup_vtable_deltas1): Likewise.
8900 (override_one_vtable): Likewise.
8901 * search.c (get_abstract_virtuals_1): Likewise.
8902 (get_pure_virtuals): Likewise.
8903 (expand_upcast_fixups): Likewise.
8904 * tree.c (debug_binfo): Likewise.
8905
8906 * class.c (build_vtable): Don't return a value. Don't rebuild
8907 vtables for bases that have already been handled.
8908 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
8909 already been handled.
8910 (modify_one_vtable): Adjust accordingly.
8911 (fixup_vtable_deltas1): Likewise.
8912 (finish_struct_1): Likewise.
8913
8914 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8915
8916 * call.c (build_new_method_call): Also check destructors.