]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
c-common.h (add_stmt): Change prototype.
[gcc.git] / gcc / cp / ChangeLog
1 2000-09-09 Mark Mitchell <mark@codesourcery.com>
2
3 * cp-tree.h (push_switch): Change prototype.
4 (check_cp_case_value): Remove declaration.
5 (decl_constant_value): Likewise.
6 * decl.c (struct cp_switch): Add switch_stmt and cases.
7 (case_compare): New function.
8 (push_switch): Set switch_stmt. Initialize cases.
9 (pop_switch): Clean up cases.
10 (define_case_label): Rename to ...
11 (finish_case_label): ... this. Do semantic analysis for case
12 labels here.
13 (start_function): Correct comment.
14 * decl2.c (check_cp_case_value): Remove.
15 * expr.c (do_case): Remove.
16 * pt.c (tsubst_expr): Adjust call to finish_case_label.
17 * semantics.c (genrtl_do_poplevel): Remove declaration.
18 (RECHAIN_STMTS): Remove.
19 (finish_break_stmt): Use build_break_stmt.
20 (finish_continue_stmt): Use build_continue_stmt.
21 (finish_switch_cond): Adjust condition here, rater than in
22 c_expand_start_case.
23 (finish_case_label): Remove.
24 * typeck.c (c_expand_return): Remove.
25 (c_expand_start_case): Likewise.
26
27 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
28
29 * ir.texi: Document type nodes.
30
31 2000-09-06 Mark Mitchell <mark@codesourcery.com>
32
33 * cp-tree.h (init_cp_semantics): Declare.
34 (genrtl_try_block): Don't declare.
35 (genrtl_handler): Likewise.
36 (genrtl_catch_block): Likewise.
37 (genrtl_ctor_stmt): Likewise.
38 (genrtl_subobject): Likewise.
39 (genrtl_do_poplevel): Likewise.
40 (genrtl_named_return_value): Likewise.
41 * lex.c (init_parse): Call init_cp_semantics.
42 * semantics.c (genrtl_try_block): Give it internal linkage.
43 (genrtl_handler): Likewise.
44 (genrtl_catch_block): Likewise.
45 (genrtl_ctor_stmt): Likewise.
46 (genrtl_subobject): Likewise.
47 (genrtl_do_poplevel): Likewise.
48 (genrtl_named_return_value): Likewise.
49 (lang_expand_stmt): Rename to ...
50 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
51 (init_cp_semantics): Define.
52
53 * decl.c (initialize_local_var): Remove RTL-generating code.
54 * semantics.c (genrtl_try_block): Fix formatting.
55
56 Move statement-tree facilities from C++ to C front-end.
57 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
58 (void_zero_node): Remove.
59 (stmt_tree): Likewise.
60 (scope_chain): Adjust.
61 (language_function): Rename to cp_language_function.
62 (cp_function_chain): Adjust.
63 (current_stmt_tree): Remove.
64 (last_tree): Likewise.
65 (last_expr_type): Likewise.
66 (struct lang_decl): Adjust.
67 (STMT_IS_FULL_EXPR_P): Remove.
68 (add_tree): Remove.
69 (begin_stmt_tree): Likewise.
70 (finish_stmt_tree): Likewise.
71 (walk_tree_fn): Likewise.
72 (walk_stmt_tree): Likewise.
73 * class.c (finish_struct): Replace use of add_tree with add_stmt.
74 * decl.c (mark_stmt_tree): Adjust type.
75 (init_decl_processing): Don't build void_zero_node.
76 (initialize_local_var): Adjust usage of current_stmt_tree.
77 (finish_enum): Use add_stmt, not add_tree.
78 (save_function_data): Adjust use of language_function.
79 (finish_constructor_body): Use add_stmt, not add_tree.
80 (finish_destructor_body): Likewise.
81 (push_cp_function_context): Adjust use of language_function.
82 (pop_cp_function_context): Likewise.
83 (mark_lang_function): Likewise.
84 (mark_cp_function_context): Likewise.
85 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
86 (build_vec_init): Likewise.
87 * semantics.c (SET_LAST_STMT): Remove.
88 (RECHAIN_STMTS): Don't use it.
89 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
90 (current_stmt_tree): Define.
91 (add_tree): Remove.
92 (finish_goto_stmt): Use add_stmt, not add_tree.
93 (finish_expr_stmt): Likewise.
94 (begin_if_stmt): Likewise.
95 (finish_then_clause): Likewise.
96 (begin_while_stmt): Likewise.
97 (begin_do_stmt): Likewise.
98 (finish_return_stmt): Likewise.
99 (begin_for_stmt): Likewise.
100 (finish_break_stmt): Likewise.
101 (finish_continue_stmt): Likewise.
102 (begin_switch_stmt): Likewise.
103 (finish_case_label): Likewise.
104 (begin_try_block): Likewise.
105 (begin_function_try_block): Likewise.
106 (begin_handler): Likewise.
107 (begin_catch_block): Likewise.
108 (begin_compound_stmt): Likewise.
109 (begin_asm_stmt): Likewise.
110 (finish_asm_stmt): Likewise.
111 (finish_label_stmt): Likewise.
112 (add_decl_stmt): Likewise.
113 (finish_subobject): Likewise.
114 (finish_decl_cleanup): Likewise.
115 (finish_named_return_value): Likewise.
116 (setup_vtbl_ptr): Likewise.
117 (add_scope_stmt): Likewise.
118 (finish_stmt_expr): Likewise.
119 (prune_unused_decls): Remove.
120 (begin_stmt_tree): Likewise.
121 (finish_stmt_tree): Likewise.
122 (prep_stmt): Adjust use of current_stmt_tree.
123 (lang_expand_stmt): Likewise.
124 * tree.c (statement_code_p): Remove.
125 (cp_statement_code_p): New function.
126 (walk_stmt_tree): Remove.
127 (init_tree): Set lang_statement_code_p.
128
129 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
130
131 Integrated preprocessor.
132
133 * Make-lang.in, Makefile.in: Remove all references to input.c,
134 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
135 * gxx.gperf, hash.h, input.c: Delete.
136 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
137 initialized properly.
138
139 * class.c (fixup_pending_inline): Take a tree, not a
140 struct pending_inline *. All callers changed.
141 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
142 RID_PROTECTED entries in ridpointers[] array here.
143 * decl.c (duplicate_decls): Do not refer to struct
144 pending_inline.
145 (record_builtin_type, init_decl_processing): Use RID_MAX not
146 CP_RID_MAX.
147 (grokdeclarator): Use C_IS_RESERVED_WORD.
148 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
149 cpplib.
150 (grok_x_components): Do not inspect pending_inlines chain.
151
152 * cp-tree.h (struct lang_identifier): Add rid_code entry.
153 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
154 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
155 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
156 TIME_IDENTIFIER_FILEINFO): Kill.
157 Update prototypes.
158 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
159 single 32-bit word.
160 * parse.y: Call do_pending_inlines unconditionally.
161 reinit_parse_for_method is now snarf_method. fn.defpen is no
162 longer necessary. Remove unnecessary <itype> annotation on
163 SCOPE. Do not refer to end_of_file or struct pending_inline.
164 * semantics.c (begin_inline_definitions): Call
165 do_pending_inlines unconditionally.
166
167 * lex.c: Remove all code now shared with C front end.
168 Initialize cpplib properly if USE_CPPLIB. Put reserved words
169 into the get_identifier table. Rewrite pragma handling to
170 work with the registry. Move code to save tokens for later
171 processing to spew.c.
172
173 * spew.c: Rewrite everything in terms of token streams instead
174 of text. Move routines here from lex.c / input.c as
175 appropriate. GC-mark trees hanging off the pending inlines
176 chain.
177
178 2000-09-06 Mark Mitchell <mark@codesourcery.com>
179
180 * NEWS: Mention that the named return value extension has been
181 deprecated.
182 * cp-tree.h (original_result_rtx): Define.
183 (TREE_REFERENCE_EXPR): Remove.
184 (DECL_VPARENT): Likewise.
185 (pushdecl_nonclass_level): Likewise.
186 (store_return_init): Likewise.
187 (reinit_lang_specific): Likewise.
188 (genrtl_named_return_value): Change prototype.
189 * decl.c (original_result_rtx): Remove.
190 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
191 Do not generate RTL for local variables here.
192 (store_return_init): Remove.
193 * semantics.c (genrtl_named_return_value): Simplify. Fold in
194 store_return_init.
195 (finish_named_return_value): Adjust accordingly. Warn that this
196 extension is deprecated.
197 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
198
199 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
200
201 * pt.c (type_unification_real): Replace switch with if.
202 (unify): Tsubst non-type parms before comparing.
203
204 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
205
206 * error.c (dump_typename): New function, broken out of ...
207 (dump_type): ... here. Use it.
208 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
209
210 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
211
212 * init.c (build_offset_ref): Deal with namespace scoped
213 TEMPLATE_ID_EXPRs.
214
215 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
216
217 * class.c (resolve_address_of_overloaded_function): Add
218 explanation message.
219 * decl.c (define_case_label): Reformat explanation.
220 * decl2.c (finish_static_data_member_decl): Likewise.
221 (grokfield): Likewise.
222 * friend.c (do_friend): Likewise.
223
224 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
225
226 * tree.c (walk_tree): Expose tail recursion.
227 (walk_stmt_tree): New function.
228 * cp-tree.h: Prototype walk_stmt_tree.
229 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
230 the BLOCKs directly. If a BLOCK has no variables after
231 pruning, discard it.
232 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
233 restore the line number.
234
235 2000-09-05 Mark Mitchell <mark@codesourcery.com>
236
237 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
238 (pt.o): Remove dependency on HTAB_H.
239 * cp-tree.h: Include hashtab.h.
240 (walk_tree): Change prototype.
241 (walk_tree_without_duplicates): New function.
242 * decl.c (check_default_argument): Use it.
243 * optimize.c (remap_decl): Adjust calls to walk_tree.
244 (copy_body): Likewise.
245 (expand_calls_inline): Likewise.
246 (calls_setjmp_p): Use walk_tree_without_duplicates.
247 * pt.c: Don't include hashtab.h.
248 (for_each_template_parm): Use walk_tree_without_duplicates.
249 * semantics.c (finish-stmt_tree): Likewise.
250 (expand_body): Likewise.
251 * tree.c (walk_tree): Add additional parameter.
252 (walk_tree_without_duplicates): New function.
253 (count_trees): Use it.
254 (verify_stmt_tree): Adjust call to walk_tree.
255 (find_tree): Use walk_tree_without_duplicates.
256 (no_linkage_check): Likewise.
257 (break_out_target_exprs): Adjust call to walk_tree.
258 (cp_unsave): Likewise.
259
260 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
261
262 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
263 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
264 * cp-tree.h (TYPE_BINFO): Adjust comment.
265 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
266 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
267 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
268 (TYPE_TEMPLATE_INFO): Likewise.
269 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
270 * class.c (push_nested_class): Likewise.
271 * decl.c (lookup_name_real): Likewise.
272 (grokdeclarator): Likewise.
273 (grok_op_properties): Likewise.
274 (xref_tag): Likewise.
275 (xref_basetypes): Likewise.
276 * decl2.c (constructor_name_full): Likewise.
277 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
278 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
279 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
280 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
281 (dump_type_suffix): Likewise.
282 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
283 instead.
284 (get_aggr_from_typedef): Likewise.
285 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
286 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
287 (write_template_parm): Likewise.
288 (write_template_template_parm): Check tree code instead of
289 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
290 * method.c (build_overload_nested_name): Add
291 BOUND_TEMPLATE_TEMPLATE_PARM.
292 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
293 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
294 * pt.c (convert_template_argument): Check tree code instead of
295 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
296 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
297 (for_each_template_parm): Adjust comment.
298 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
299 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
300 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
301 template_args_equal to compare template template parameter cases.
302 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
303 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
304 instead.
305 * tree.c (copy_template_template_parm): Decide whether to create
306 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
307 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
308 (copy_tree_r): Likewise.
309 * typeck.c (comptypes): Likewise. Check tree code instead of
310 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
311
312 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
313
314 * decl.c (finish_function): Move the code for handling functions
315 marked with the constructor and destructor attributes inside the
316 expand_p block.
317
318 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
319
320 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
321
322 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
323
324 * pt.c (lookup_template_class): Remove abort.
325 * tree.c (get_type_decl): Allow error_mark_node.
326
327 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
328
329 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
330 TEMPLATE_ID_EXPRs.
331
332 2000-09-03 Mark Mitchell <mark@codesourcery.com>
333
334 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
335 new ABI mangling.
336
337 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
338
339 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
340 union tag mismatch error reporting.
341
342 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
343
344 * call.c (build_scoped_method_call): Check it is not a namespace.
345
346 2000-08-30 Jason Merrill <jason@redhat.com>
347
348 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
349
350 * tree.c (bot_manip): Check TREE_CONSTANT rather than
351 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
352 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
353
354 * decl.c (start_function): Always call make_function_rtl.
355
356 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
357
358 * semantics.c (prune_unused_decls): New function.
359 (finish_stmt_tree): Call it via walk_tree.
360
361 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
362
363 * class.c (build_secondary_vtable): Constify a char *.
364 * decl.c (init_decl_processing): Initialize function_id_node,
365 pretty_function_id_node, and func_id_node.
366 * input.c (struct input_source): Constify 'str'.
367 (feed_input): Constify first argument.
368 * mangle.c (write_identifier): Constify argument.
369 * pt.c (mangle_class_name_for_template): Constify argument.
370
371 2000-08-29 Mark Mitchell <mark@codesourcery.com>
372
373 * typeck.c (mark_addressable): Remove code that pokes around in
374 RTL.
375
376 2000-08-28 Jason Merrill <jason@redhat.com>
377
378 * lex.c (file_name_nondirectory): Move to toplev.c.
379
380 * cp-tree.h (LOCAL_CLASS_P): New macro.
381 * class.c (finish_struct_1): Use it.
382
383 2000-08-27 Alex Samuel <samuel@codesourcery.com>
384
385 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
386 (write_encoding): Pass another argument to write_name.
387 (write_name): Add ignore_local_scope parameter. Fix handling of
388 local names.
389 (write_nested_name): Use write_unqualified_name.
390 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
391 (write_template_prefix): Use write_unqualified_name.
392 (write_component): Remove.
393 (write_local_name): Add parameter. Use direct local entity to
394 discriminator calculation.
395 (write_class_enum_type): Pass another argument to write_name.
396 (write_template_template_arg): Likewise.
397 (make_guard_variable): Likewise.
398
399 2000-08-27 Jason Merrill <jason@redhat.com>
400
401 * decl.c (pushdecl): Matching decls for local externs are found in
402 the current level. Propagate linkage information from previous
403 declarations.
404
405 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
406
407 * ir.texi (Expressions): Fix typo.
408
409 2000-08-25 Greg McGary <greg@mcgary.org>
410
411 * tree.c (init_tree): Use ARRAY_SIZE.
412
413 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
414
415 * error.c (cp_tree_printer): Rework.
416
417 2000-08-25 Mark Mitchell <mark@codesourcery.com>
418
419 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
420 dyn-string.o.
421 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
422 (cp-demangle.o): Remove target.
423 (dyn-string.o): Likewise.
424
425 * decl.c (grokfndecl): Require that `main' return an `int'.
426 * mangle.c (write_encoding): Don't mangle return types for
427 conversion functions.
428
429 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
430
431 * error.c (tree_formatting_info): New data type.
432 (tree_being_formatted): New macro.
433 (tree_formatting_flags): Likewise.
434 (put_whitespace): Likewise.
435 (print_tree_identifier): Likewise.
436 (print_identifier): Likewise.
437 (cp_tree_printer, print_function_argument_list, print_declaration,
438 print_expression, print_function_declaration,
439 print_function_parameter, print_type, print_cv_qualifier): New
440 functions.
441 (init_error): Initialize lang_printer.
442
443 2000-08-24 Jason Merrill <jason@redhat.com>
444
445 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
446 adjustment necessary.
447
448 2000-08-24 Greg McGary <greg@mcgary.org>
449
450 * cp-tree.h (MAIN_NAME_P): Remove macro.
451
452 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
453
454 * error.c (print_instantiation_context): Don't forget to flush the
455 buffer.
456
457 2000-08-23 Jason Merrill <jason@redhat.com>
458
459 * typeck.c (build_ptrmemfunc): Save the input pmf.
460
461 * method.c (process_modifiers): Use same_type_p.
462
463 2000-08-23 Mark Mitchell <mark@codesourcery.com>
464
465 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
466 * mangle.c (write_function_type): Change prototype.
467 (write_encoding): Don't mangle return types for
468 constructors or destructors.
469 (write_type): Adjust call to write_function_type.
470 * pt.c (instantiate_template): Instantiate alternate entry points
471 when instantiating the main function.
472
473 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
474
475 * error.c (cp_print_error_function): Don't use embedded '\n' in
476 output_printf.
477
478 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
479
480 * decl.c (init_decl_processing): Remove bogus initialization.
481 * error.c (lang_print_error_function): Restore here.
482 (init_error): Initialize print_error_function.
483
484 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
485
486 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
487
488 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
489
490 * Makefile.in (error.o): Depends on diagnostic.h
491
492 * cp-tree.h (problematic_instantiation_changed,
493 record_last_problematic_instantiation, current_instantiation,
494 print_instantiation_context): Declare.
495 (maybe_print_template_context): Remove.
496
497 * decl.c (init_decl_processing): Set print_error_function to NULL.
498 (lang_print_error_function): Remove, since we're using a new
499 machinery.
500
501 * error.c: #include diagnostic.h
502 (function_category): New function.
503 (cp_diagnostic_starter): Likewise.
504 (cp_diagnostic_finalizer): Likewise.
505 (cp_print_error_function): Likewise.
506 (maybe_print_instantiation_context): Likewise.
507 (print_instantiation_full_context): Likewise.
508 (print_instantiation_partial_context): Likewise.
509 (print_instantiation_context): Define.
510 (init_error): Initialize diagnostic pager and finalizer.
511
512 * pt.c (problematic_instantiation_changed): Define.
513 (record_last_problematic_instantiation): Likewise.
514 (current_instantiation): Likewise.
515 (maybe_print_template_context): Remove.
516 (print_template_context): Likewise.
517 (current_tinst_level): Make static to reflect Brendan Kehoe's
518 change of 1995-04-13.
519 (push_tinst_level): Call print_instantiation_context.
520
521 2000-08-21 Nix <nix@esperi.demon.co.uk>
522
523 * lang-specs.h: Do not process -o or run the assembler if
524 -fsyntax-only.
525
526 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
527
528 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
529 variables.
530 * decl2.c (lang_decode_option): Disable gettext attributes for
531 -ansi.
532
533 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
534
535 * lex.c (lang_init_options): Default diagnostic message maximum
536 length to 80, when line-wrapping.
537
538 2000-08-20 Mark Mitchell <mark@codesourcery.com>
539
540 * class.c (build_vtbl_initializer): Clear the entire
541 vtbl_init_data. Start keeping track of the functions for which we
542 have created vcall offsets here.
543 (dfs_build_vcall_offset_vtbl_entries): Remove.
544 (build_vcall_offset_vtbl_entries): Reimplement.
545 (add_vcall_offset_vtbl_entries_r): New function.
546 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
547 computing when vcall offsets are necessary.
548
549 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
550
551 * decl.c (member_function_or_else): Use cp_error ... %T.
552 (grokdeclarator): Likewise.
553 (start_method): Likewise.
554 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
555
556 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
557
558 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
559 TYPE_DECLs.
560
561 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
562
563 * cp-tree.h (PTRMEM_OK_P): New macro.
564 (itf_ptrmem_ok): New enumeration value.
565 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
566 argument. Diagnose implicit pointer to member.
567 (instantiate_type): Don't diagnose implicit pointer to member
568 here. Pass itf_ptrmem_ok if ok. Adjust calls to
569 resolve_address_of_overloaded_function.
570 * init.c (build_offset_ref): Set PTRMEM_OK_P.
571 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
572 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
573 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
574 (build_unary_op): Deal with single non-static member in
575 microsoft-land.
576
577 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
578
579 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
580
581 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
582
583 * cp-tree.h (enum_name_string): Remove prototype.
584 (report_case_error): Remove prototype.
585 * cp/typeck2.c (enum_name_string): Remove.
586 (report_case_error): Remove.
587 * error.c (dump_expr): Deal with enum values directly.
588 Correctly negate integer constant.
589
590 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
591
592 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
593 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
594 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
595 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
596 (__cxa_vec_new): Use __cxa_vec_new2.
597 (__cxa_vec_delete): Use __cxa_vec_delete2.
598
599 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
600
601 * vec.cc (__cxa_vec_new): Set "C" linkage.
602 (__cxa_vec_ctor): Likewise.
603 (__cxa_vec_cctor): Likewise.
604 (__cxa_vec_dtor): Likewise.
605 (__cxa_vec_delete): Likewise.
606 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
607 (__cxa_vec_ctor): Likewise.
608 (__cxa_vec_cctor): Likewise.
609 (__cxa_vec_dtor): Likewise.
610 (__cxa_vec_delete): Likewise.
611
612 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
613
614 * class.c (instantiate_type): Reinstate local variable
615 deleted in previous change.
616
617 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
618 itf_no_attributes.
619
620 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
621
622 * cp-tree.h (instantiate_type_flags): New enumeration.
623 (instantiate_type): Change parameter.
624 * class.c (instantiate_type): Adjust prototype. Adjust.
625 * call.c (standard_conversion): Adjust instantiate_type call.
626 (reference_binding): Likewise.
627 (build_op_delete_call): Likewise.
628 (convert_like_real): Likewise.
629 * cvt.c (cp_convert_to_pointer): Likewise.
630 (convert_to_reference): Likewise.
631 * pt.c (convert_nontype_argument): Likewise.
632 * typeck.c (build_binary_op): Likewise.
633 (build_ptrmemfunc): Likewise.
634 (convert_for_assignment): Likewise.
635
636 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
637
638 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
639 (current_aggr): Define.
640 * decl.c (grokdeclarator): Make sure a friend class is an
641 elaborated type specifier.
642 * parse.y (current_aggr): Remove static definition.
643 (cp_parse_init): Adjust.
644 (structsp): Clear and restore current_aggr.
645 (component_decl_list): Clear current_aggr.
646
647 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
648 aggregate tag on the typename's context.
649
650 * pt.c (tsubst_friend_class): Return error_mark_node, if
651 parms becomes NULL.
652 (instantiate_class_template): Ignore error_mark_node friend types.
653
654 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
655
656 * cvt.c (warn_ref_binding): New static function, broken out of ...
657 (convert_to_reference): ... here. Use it.
658
659 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
660
661 * parse.y (template_arg): Add rule for template qualified with
662 global scope.
663
664 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
665
666 * decl2.c (add_function): Reorganize.
667 (arg_assoc): Do not consider function template decls.
668
669 2000-08-11 Jason Merrill <jason@redhat.com>
670
671 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
672 looking inside.
673
674 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
675
676 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
677 (lookup_nested_tag): Likewise.
678
679 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
680 can be produced.
681
682 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
683
684 * parse.y (named_complex_class_head_sans_basetype): Remove
685 always true if.
686
687 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
688
689 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
690 explicit TEMPLATE_ID_EXPR args.
691 (build_expr_from_tree, case CALL_EXPR): Likewise.
692
693 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
694
695 * decl.c (check_tag_decl): Diagnose typename's which don't
696 declare anything.
697
698 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
699
700 * init.c (build_aggr_init): Reject bogus array initializers
701 early.
702
703 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
704
705 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
706 runtime.
707 * cp/tinfo.cc (__dynamic_cast): Likewise.
708 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
709
710 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
711
712 * cvt.c (convert_to_pointer_force): Fix error message when
713 attempting to cast from ambiguous base.
714
715 2000-08-08 Jason Merrill <jason@redhat.com>
716
717 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
718 (tsubst_template_arg_vector): Likewise.
719
720 * decl2.c (build_anon_union_vars): Choose the largest field; don't
721 assume that one will be as large as the union.
722
723 2000-08-07 Kazu Hirata <kazu@hxi.com>
724
725 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
726 * decl.c (pop_labels): Likewise.
727
728 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
729
730 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
731 specifications.
732 (__pointer_to_member_type_info): Likewise.
733 (__base_class_info): Likewise.
734 (__class_type_info): Likewise.
735 (__si_class_type_info): Likewise.
736 (__vmi_class_type_info): Likewise.
737 * tinfo.cc (__si_class_type_info::__do_find_public_src):
738 Changed member names to match specifications.
739 (__vmi_class_type_info::__do_find_public_src): Likewise.
740 (__si_class_type_info::__do_dyncast): Likewise.
741 (__vmi_class_type_info::__do_dyncast): Likewise.
742 (__si_class_type_info::__do_upcast): Likewise.
743 (__vmi_class_type_info::__do_upcast): Likewise.
744 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
745 (__pbase_type_info::__pointer_catch): Likewise.
746 (__pointer_type_info::__pointer_catch): Likewise.
747 (__pointer_to_member_type_info::__pointer_catch): Likewise.
748
749
750 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
751
752 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
753 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
754 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
755
756 2000-08-04 Mark Mitchell <mark@codesourcery.com>
757
758 * cp-tree.h (add_method): Change prototype.
759 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
760 Don't double the size of the method vector in the error case.
761 (handle_using_decl): Adjust call to add_method.
762 (add_implicitly_declared_members): Likewise.
763 (clone_function_decl): Likewise.
764 * decl2.c (check_classfn): Likewise.
765 * semantics.c (finish_member_declaration): Likewise.
766
767 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
768
769 * decl.c (flag_isoc94): New variable.
770
771 2000-08-02 Jason Merrill <jason@redhat.com>
772
773 * pt.c (do_type_instantiation): Add complain parm; don't complain
774 if called recursively.
775 * cp-tree.h, parse.y: Adjust.
776
777 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
778
779 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
780 -Wno-strict-prototypes.
781
782 * g++spec.c: Adjust type of second argument to
783 lang_specific_driver, and update code as necessary.
784
785 * cp-tree.h: Don't prototype min_precision here.
786 (my_friendly_assert): Cast expression to void.
787 * semantics.c (do_poplevel): Initialize scope_stmts.
788
789 2000-08-02 Mark Mitchell <mark@codesourcery.com>
790
791 * cp-tree.h (DECL_NEEDED_P): Tweak.
792
793 2000-07-28 Jason Merrill <jason@redhat.com>
794
795 * lang-specs.h: Use %i in rule for .ii files.
796
797 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
798
799 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
800
801 2000-07-30 Mark Mitchell <mark@codesourcery.com>
802
803 Allow indirect primary bases.
804 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
805 primary_base.
806 (CLASSTYPE_VFIELD_PARENT): Remove.
807 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
808 (BINFO_PRIMARY_BINFO): Remove.
809 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
810 (BINFO_VBASE_PRIMARY_P): Likewise.
811 (BINFO_PRIMARY_BASE_OF): New macro.
812 (BINFO_INDIRECT_PRIMARY_P): Likewise.
813 (get_primary_binfo): New function.
814 * decl.c (lang_mark_tree): Make lang_type::primary_base.
815 * class.c (vcall_offset_data_s): Rename to ...
816 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
817 and add ctor_vtbl_p.
818 (get_derived_offset): Use get_primary_binfo.
819 (dfs_mark_primary_bases): Adjust handling of virtual primary
820 bases.
821 (mark_primary_bases): Likewise.
822 (set_primary_base): Take a binfo, not an integer, as a
823 representation of the primary base.
824 (indirect_primary_base_p): Remove.
825 (determine_primary_base): Adjust for indirect primary bases.
826 (dfs_find_final_overrider): Fix typo in coment.
827 (update_vtable_entry_for_fn): Use get_primary_binfo.
828 (layout_nonempty_base_or_field): Tweak.
829 (build_base_fields): Adjust for new primary base semantics.
830 (dfs_propagate_binfo_offsets): Remove.
831 (propagate_binfo_offsets): Rewrite.
832 (dfs_set_offset_for_shared_vbases): Remove.
833 (layout_virtual_bases): Don't use it.
834 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
835 ABI.
836 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
837 CLASSTYPE_VFIELD_PARENT.
838 (dfs_get_primary_binfo): New function.
839 (get_primary_binfo): Likewise.
840 (dump_class_hierarchy_r): Tweak printing of primary bases.
841 (build_vtbl_initializer): Fix typo in comments. Use
842 vtbl_init_data.
843 (build_vcall_and_vbase_vtbl_entries): Likewise.
844 (build_vbaes_offset_vtbl_entries): Likewise.
845 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
846 BV_VCALL_INDEX to handle indirect primary bases.
847 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
848 (build_rtti_vtbl_entries): Likewise.
849 * search.c (get_shared_vbase_if_not_primary): Tweak.
850 (find_vbase_instance): Likewise.
851 (binfo_for_vtable): Simplify.
852 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
853 (make_binfo): Make it have 11 entries.
854
855 2000-07-30 Alex Samuel <samuel@codesourcery.com>
856
857 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
858 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
859 ascertaining primaryness.
860 (G): Remove template_args.
861 (decl_is_template_id): New function.
862 (write_encoding): Use decl_is_template_id.
863 (write_name): Likewise. Handle type_decls. Get main variant of
864 type decls.
865 (write_nested_name): Likewise.
866 (write_prefix): Likewise.
867 (write_template_prefix): Likewise.
868 (write_special_name_constructor): Remove defunct production from
869 comment.
870 (write_bare_function_type): Remove comment about absent parameter.
871 (write_template_template_arg): Add missing grammar production to
872 comment.
873
874 2000-07-27 Jason Merrill <jason@redhat.com>
875
876 * decl.c (duplicate_decls): If common_type produces a non-typedef
877 type for a typedef, just use the old type.
878
879 2000-07-27 Mark Mitchell <mark@codesourcery.com>
880
881 * cp-tree.h (function_depth): Declare.
882 (verify_stmt_tree): Likewise.
883 (find_tree): Likewise.
884 * decl.c (function_depth): Give it external linkage.
885 * optimize.c (optimize_function): Increment and decrement it.
886 * tree.c (verify_stmt_tree_r): New function.
887 (verify_stmt_tree): Likewise.
888 (find_tree_r): Likewise.
889 (find_tree): Likewise.
890
891 2000-07-27 Jason Merrill <jason@redhat.com>
892
893 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
894 TYPE_PTRMEMFUNC_P.
895 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
896
897 2000-07-26 Mark Mitchell <mark@codesourcery.com>
898
899 * decl.c (start_cleanup_fn): Mark the function as `inline'.
900 * decl2.c (get_guard): Call cp_finish_decl, not
901 rest_of_decl_compilation, for local guards.
902 * lex.c (do_identifier): Remove unused variable.
903
904 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
905
906 * parse.y: Add missing ';'.
907
908 2000-07-26 Mark Mitchell <mark@codesourcery.com>
909
910 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
911 of `extern "C++"'.
912
913 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
914
915 Kill strict_prototype. Backwards compatibility only for
916 non NO_IMPLICIT_EXTERN_C systems.
917 * cp-tree.h (flag_strict_prototype): Remove.
918 (strict_prototype): Remove.
919 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
920 * decl.c (maybe_push_to_top_level): Adjust.
921 (pop_from_top_level): Adjust.
922 (decls_match): Only allow sloppy parm matching for ancient
923 system headers.
924 (init_decl_processing): Adjust.
925 (grokdeclarator): Adjust.
926 * decl2.c (flag_strict_prototype): Remove.
927 (strict_prototype): Remove.
928 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
929 (lang_f_options): Remove "strict-prototype".
930 (unsupported-options): Add "strict-prototype".
931 * lex.c (do_identifier): Adjust.
932 (do_scoped_id): Adjust.
933 * parse.y (empty_parms): Adjust.
934 * class.c (push_lang_context): Adjust.
935 (pop_lang_context): Adjust.
936 * typeck.c (comp_target_parms): Adjust.
937
938 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
939
940 * decl.c (poplevel): Deal with anonymous variables at for scope.
941 (maybe_inject_for_scope_var): Likewise.
942
943 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
944
945 * decl.c: Remove all signal handling code, now done in toplev.c.
946
947 2000-07-23 Mark Mitchell <mark@codesourcery.com>
948
949 * decl.c (make_rtl_for_nonlocal_decl): Rework.
950
951 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
952 correctly.
953
954 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
955
956 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
957 Define my_friendly_assert and my_friendly_abort as macros
958 which may call friendly_abort. Prototype friendly abort, not
959 my_friendly_abort or my_friendly_assert.
960 * decl.c (signal_catch): Report the signal caught in the error
961 message. Call fatal directly.
962 * typeck2.c (ack, my_friendly_assert): Delete.
963 (my_friendly_abort): Rename to friendly_abort. Expect file,
964 line, and function parameters. Report the abort code, then
965 call fancy_abort. Do not mask an abort if errors have
966 already occurred.
967
968 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
969
970 * typeck.c (comp_target_parms): Remove obsolete parameter.
971 (comp_target_types): Adjust.
972
973 2000-07-17 Jason Merrill <jason@redhat.com>
974
975 * typeck.c (mark_addressable): Never set TREE_USED.
976 * call.c (build_call): Don't abort on calls to library functions
977 that have been declared normally.
978
979 * typeck.c (build_binary_op): Fix grammar in warning.
980
981 * exception.cc (__eh_free): Fix prototype.
982
983 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
984
985 * decl.c (pushdecl): Handle seeing an OVERLOAD in
986 IDENTIFIER_NAMESPACE_VALUE.
987
988 2000-07-16 Mark Mitchell <mark@codesourcery.com>
989
990 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
991 * method.c (use_thunk): Correct handling of vcall offsets.
992
993 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
994
995 * .cvsignore: parse.h and parse.c have no cp- prefix.
996
997 2000-07-13 Mark Mitchell <mark@codesourcery.com>
998
999 * .cvsignore: New file.
1000
1001 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
1002
1003 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
1004
1005 2000-07-12 Mark Mitchell <mark@codesourcery.com>
1006
1007 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
1008 * parse.c: Remove.
1009 * parse.h: Likewise.
1010
1011 2000-07-11 Mark Mitchell <mark@codesourcery.com>
1012
1013 * class.c (layout_class_type): Add pointers to virtual bases after
1014 base classes under the old ABI.
1015
1016 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
1017
1018 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
1019 (finish_continue_stmt): Likewise.
1020 (begin_for_stmt): Remove call to note_level_for_for.
1021 (finish_goto_stmt): Change call from build_min_nt
1022 to build_stmt.
1023 (finish_expr_stmt): Likewise.
1024 (begin_if_stmt): Likewise.
1025 (begin_while_stmt): Likewise.
1026 (finish_while_stmt): Likewise.
1027 (finish_return_stmt): Likewise.
1028 (begin_for_stmt): Likewise.
1029 (finish_for_stmt): Likewise.
1030 (finish_break_stmt): Likewise.
1031 (begin_switch_stmt): Likewise.
1032 (finish_case_label): Likewise.
1033 (genrtl_try_block): Likewise.
1034 (begin_try_block): Likewise.
1035 (begin_handler): Likewise.
1036 (begin_compound_stmt): Likewise.
1037 (finish_asm_stmt): Likewise.
1038 (finish_label_stmt): Likewise.
1039 (add_decl_stmt): Likewise.
1040 (finish_subobject): Likewise.
1041 (finish_decl_cleanup): Likewise.
1042 (finish_named_return_value): Likewise.
1043 (setup_vtbl_ptr): Likewise.
1044 (add_scope_stmt): Likewise.
1045 * decl.c (finish_constructor_body): Likewise.
1046 (finish_destructor_body): Likewise.
1047 * optimize.c (copy_body_r): Likewise.
1048 (initialize_inlined_parameters): Likewise.
1049 (declare_return_variable): Likewise.
1050 (expand_call_inline): Likewise.
1051
1052 2000-07-10 Jakub Jelinek <jakub@redhat.com>
1053
1054 * semantics.c (expand_body): Sync interface information
1055 at the end of function body expansion.
1056
1057 2000-07-09 Jason Merrill <jason@redhat.com>
1058
1059 * init.c (build_new_1): Bail early if the call to new fails.
1060
1061 * decl.c (compute_array_index_type): Check specifically for
1062 an INTEGER_CST, not just TREE_CONSTANT.
1063
1064 * decl.c (duplicate_decls): Don't call duplicate_decls on
1065 the DECL_TEMPLATE_RESULT.
1066 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
1067 codes.
1068
1069 * error.c (dump_template_bindings): Don't crash if we had an
1070 invalid argument list.
1071
1072 * typeck.c (c_expand_start_case): Do narrowing here.
1073 * semantics.c (finish_switch_cond): Not here.
1074
1075 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
1076
1077 * parse.y (asm_clobbers): Do string concatenation.
1078
1079 2000-07-09 Mark Mitchell <mark@codesourcery.com>
1080
1081 * decl.c (pushtag): Don't put local classes in template functions
1082 on the local_classes list.
1083
1084 2000-07-04 Scott Snyder <snyder@fnal.gov>
1085
1086 * decl2.c (get_guard): Add missing return for old ABI local
1087 variable case.
1088
1089 2000-07-09 Mark Mitchell <mark@codesourcery.com>
1090
1091 * cp-tree.h (char_type_p): New function.
1092 * decl.c (init_decl_processing): Don't initialize
1093 signed_wchar_type_node or unsigned_wchar_type_node.
1094 (complete_array_type): Handle brace-enclosed string-constants.
1095 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
1096 * tree.c (char_type_p): New function.
1097 * typeck2.c (digest_init): Use char_type_p.
1098
1099 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
1100
1101 * pt.c (tsubst): Don't layout type, if it's error_mark.
1102
1103 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
1104
1105 * pt.c (instantiate_pending_templates): Reset template level.
1106
1107 2000-07-05 Jason Merrill <jason@redhat.com>
1108
1109 * call.c (joust): Don't complain about `operator char *()' beating
1110 `operator const char *() const'.
1111
1112 2000-07-04 scott snyder <snyder@fnal.gov>
1113 Jason Merrill <jason@redhat.com>
1114
1115 * repo.c (repo_get_id): Handle the case where a class with virtual
1116 bases has a null TYPE_BINFO_VTABLE.
1117
1118 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
1119 Jason Merrill <jason@redhat.com>
1120
1121 * parse.y (member_init): Just pass in the type.
1122 * init.c (expand_member_init): Handle getting a type.
1123
1124 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1125 Jason Merrill <jason@redhat.com>
1126
1127 * decl.c (finish_function): Warn if a function has no return
1128 statement.
1129 Suggested by Andrew Koenig.
1130 * typeck.c (check_return_expr): Do set current_function_returns_value
1131 if we got an error_mark_node.
1132
1133 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
1134
1135 * decl2.c (push_decl_namespace): Push the original namespace.
1136
1137 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
1138
1139 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
1140 * semantics.c (begin_class_definition): Clear it.
1141
1142 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
1143
1144 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
1145 (genrtl_expr_stmt): Likewise.
1146 (genrtl_decl_stmt): Likewise.
1147 (genrtl_if_stmt): Likewise.
1148 (genrtl_while_stmt): Likewise.
1149 (genrtl_do_stmt): Likewise.
1150 (genrtl_return_stmt): Likewise.
1151 (genrtl_for_stmt): Likewise.
1152 (genrtl_break_stmt): Likewise.
1153 (genrtl_continue_stmt): Likewise.
1154 (genrtl_scope_stmt): Likewise.
1155 (genrtl_switch_stmt): Likewise.
1156 (genrtl_case_label): Likewise.
1157 (genrtl_begin_compound_stmt): Likewise.
1158 (genrtl_finish_compound_stmt): Likewise.
1159 (genrtl_compound_stmt): Likewise.
1160 (genrtl_asm_stmt): Likewise.
1161
1162 * init.c (begin_init_stmts): Remove call to
1163 genrtl_begin_compound_stmt.
1164 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
1165
1166 * semantics.c (lang_expand_stmt): Changed call to
1167 genrtl_compound_stmt to ignore return value.
1168
1169 2000-07-02 Mark Mitchell <mark@codesourcery.com>
1170
1171 * mangle.c (canonicalize_for_substitution): Return the canonical
1172 variant of a type.
1173
1174 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
1175 TYPE_DECL.
1176 * typeck.c (commonparms): Remove obstack manipulations.
1177
1178 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
1179
1180 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
1181
1182 * Makefile.in (OBJS): Added ../c-semantics.o.
1183 (OBJDEPS): Likewise.
1184
1185 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
1186 ../c-common.h.
1187 (struct stmt_tree): Added comment.
1188 (current_function_name_declared): Removed.
1189 (stmts_are_full_exprs_p): Likewise.
1190 (genrtl_do_pushlevel): Likewise.
1191 (genrtl_clear_out_block): Likewise.
1192 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
1193 (DECL_ANON_UNION_ELEMS): Likewise.
1194 (emit_local_var): Likewise.
1195 (make_rtl_for_local_static): Likewise.
1196 (do_case): Likewise.
1197 (expand_stmt): Likewise.
1198 (genrtl_decl_cleanup): Likewise.
1199 (c_expand_asm_operands): Likewise.
1200 (c_expand_return): Likewise.
1201 (c_expand_start_case): Likewise.
1202
1203 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
1204 (emit_local_var): Likewise.
1205 (initialize_local_var): Change reference to
1206 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
1207 Change reference to stmts_are_full_exprs_p to
1208 current_stmt_tree->stmts_are_full_exprs_p.
1209 (push_cp_function_context): Likewise.
1210
1211 * expect.c (expand_throw): Change reference to
1212 stmts_are_full_exprs_p.
1213
1214 * init.c (build_aggr_init): Change reference to
1215 stmts_are_full_exprs_p.
1216 (build_vec_init): Likewise.
1217
1218 * optimize.c (maybe_clone_body): Change reference to
1219 current_function_name_declared to
1220 cp_function_chain->name_declared.
1221
1222 * pt.c (instantiate_decl): Change reference to
1223 current_function_name_declared to
1224 cp_function_chain->name_declared.
1225
1226 * semantics.c (expand_cond): Moved declaration to c-common.h.
1227 (genrtl_do_pushlevel): Moved to c-semantics.c.
1228 (genrtl_clear_out_block): Likewise.
1229 (genrtl_goto_stmt): Likewise.
1230 (genrtl_expr_stmt): Likewise.
1231 (genrtl_decl_stmt): Likewise.
1232 (gerntl_if_stmt): Likewise.
1233 (genrtl_while_stmt): Likewise.
1234 (genrtl_do_stmt): Likewise.
1235 (genrtl_return_stmt): Likewise.
1236 (genrtl_for_stmt): Likewise.
1237 (genrtl_break_stmt): Likewise.
1238 (genrtl_continue_stmt): Likewise.
1239 (genrtl_scope_stmt): Likewise.
1240 (genrtl_switch_stmt): Likewise.
1241 (genrtl_case_label): Likewise.
1242 (genrtl_begin_compound_stmt): Likewise.
1243 (genrtl_finish_compound_stmt): Likewise.
1244 (genrtl_compound_stmt): Likewise.
1245 (genrtl_asm_stmt): Likewise.
1246 (genrtl_decl_cleanup): Likewise.
1247 (expand_cond): Likewise.
1248 (expand_stmt): Renamed to ...
1249 (lang_expand_stmt): ... this.
1250 (lang_expand_expr_stmt): Initialize.
1251 (set_current_function_name_declared): Likewise.
1252 (stmts_are_full_exprs_p): Likewise.
1253 (current_function_name_declared): Likewise.
1254 (anon_aggr_type_p): Likewise.
1255 (do_poplevel): Change reference to
1256 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
1257 Change reference to stmts_are_full_exprs_p to
1258 current_stmt_tree->stmts_are_full_exprs_p.
1259 (add_tree): Likewise.
1260 (finish_expr_stmt): Likewise.
1261 (prep_stmt): Likewise.
1262 (lang_expand_stmt): Likewise.
1263 (begin_compound_stmt): Change reference to
1264 current_function_name_declared to
1265 cp_function_chain->name_declared and call to
1266 current_function_name_declared().
1267 (setup_vtbl_ptr): Likewise.
1268 (genrtl_do_poplevel): Removed.
1269
1270 2000-06-30 Jason Merrill <jason@redhat.com>
1271
1272 * init.c (init_init_processing): Go back to aligning like
1273 double_type_node for old ABI.
1274 (get_cookie_size): Make cookie larger if we get a type that needs
1275 more alignment.
1276 (build_vec_delete): Call it.
1277
1278 * typeck.c (qualify_type_recursive): New fn.
1279 (composite_pointer_type): Use it.
1280 (build_binary_op): Use composite_pointer_type.
1281
1282 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
1283 Jason Merrill <jason@redhat.com>
1284
1285 * typeck.c (check_return_expr): Don't complain about returning
1286 NULL from operator new if -fcheck-new.
1287 * cp-tree.h: Declare flag_check_new here.
1288 * init.c: Not here.
1289
1290 2000-06-28 Alex Samuel <samuel@codesourcery.com>
1291
1292 * mangle.c (find_substitution): Use same_type_p.
1293 (write_encoding): Don't check for substitutions.
1294
1295 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
1296
1297 * parse.y (expr_no_comma_rangle): New non-terminal.
1298 (template_parm): Use it for default parameter case.
1299 (template_arg): Use it.
1300 (expr_no_commas): Remove commented out undefined extensions.
1301 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
1302 * parse.h, parse.c: Rebuilt.
1303
1304 2000-06-30 Mark Mitchell <mark@codesourcery.com>
1305
1306 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
1307 (finish_asm_stmt): Do it here, instead.
1308
1309 * cp-tree.h (ridpointers): Don't declare.
1310 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
1311 (record_builtin_java_type): Likewise.
1312 (init_decl_processing): Likewise.
1313 * lex.c: Move inclusion of lex.h.
1314 (ridpointers): Don't define.
1315 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
1316 RID_MAX.
1317 * lex.h (enum rid): Rename to ...
1318 (enum cp_rid): ... this.
1319 (ridpointers): Don't declare.
1320 * parse.y: Move inclusion of lex.h.
1321 * parse.c: Regenerated.
1322 * spew.c: Move inclusion of lex.h.
1323
1324 * cp-tree.h (struct language_function): Remove temp_name_counter.
1325 (temp_name_counter): Remove.
1326 (get_temp_name): Change prototype.
1327 (get_guard): New function.
1328 (get_guard_cond): Likewise.
1329 (set_guard): Likewise.
1330 * cvt.c (build_up_reference): Adjust call to get_temp_name.
1331 * decl.c (expand_static_init): Use get_guard and friends to
1332 implement guard variables.
1333 * decl2.c (get_temp_name): Assume that the variables created are
1334 always static.
1335 (get_sentry): Rename to ...
1336 (get_guard): ... this. Implement new ABI guard variables.
1337 (get_guard_bits): New function.
1338 (get_guard_cond): Likewise.
1339 (set_guard): Likewise.
1340 (start_static_initialization_or_destruction): Use them.
1341 (do_static_initialization): Replace sentry with guard throughout.
1342 (do_static_destruction): Likewise.
1343 * init.c (create_temporary_var): Add comment.
1344
1345 2000-06-28 Alex Samuel <samuel@codesourcery.com>
1346
1347 * mangle.c (find_substitution): Use same_type_p.
1348 (write_encoding): Don't check for substitutions.
1349
1350 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
1351
1352 * parse.y (expr_no_comma_rangle): New non-terminal.
1353 (template_parm): Use it for default parameter case.
1354 (template_arg): Use it.
1355 (expr_no_commas): Remove commented out undefined extensions.
1356 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
1357 * parse.h, parse.c: Rebuilt.
1358
1359 2000-06-29 Mark Mitchell <mark@codesourcery.com>
1360
1361 * cp-tree.h (flag_const_strings): Remove.
1362 (warn_parentheses): Likewise.
1363 (warn_format): Likewise.
1364 (common_type): Likewise.
1365 (default_conversion): Likewise.
1366 (build_binary_op): Likewise.
1367 (cp_build_binary_op): New macro.
1368 * call.c (build_new_op): Use cp_build_binary_op instead of
1369 build_binary_op.
1370 * class.c (build_vtable_entry_ref): Likewise.
1371 * decl.c (expand_static_init): Likewise.
1372 (compute_array_index_type): Likewise.
1373 (build_enumerator): Likewise.
1374 * decl2.c (delete_sanity): Likewise.
1375 (start_static_initialization_or_destruction): Likewise.
1376 * error.c (dump_type_suffix): Likewise.
1377 * init.c (resolve_offset_ref): Likewise.
1378 (build_new): Likewise.
1379 (build_new_1): Likewise.
1380 (build_vec_delete_1): Likewise.
1381 (build_vec_init): Likewise.
1382 (build_delete): Likewise.
1383 * rtti.c (synthesize_tinfo_fn): Likewise.
1384 (synthesize_tinfo_var): Likewise.
1385 * search.c (expand_upcast_fixups): Likewise.
1386 (fixup_all_virtual_upcast_offsets): Likewise.
1387 * typeck.c (build_array_ref): Likewise.
1388 (get_member_function_from_ptrfunc): Likewise.
1389 (build_binary_op): Add parameter.
1390 (pointer_int_sum): Use cp_build_binary_op.
1391 (pointer_diff): Likewise.
1392 (build_modify_expr): Likewise.
1393 (get_delta_difference): Likewise.
1394 (build_ptrmemfunc): Likewise.
1395
1396 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
1397
1398 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
1399 * decl.c (create_implicit_typedef): Adjust.
1400 * decl2.c (build_artificial_parm): Adjust.
1401 * method.c (implicitly_declare_fn): Adjust.
1402 * pt.c (push_inline_template_parms_recursive): Adjust.
1403 (process_template_parm): Adjust.
1404 (overloaded_template_name): Adjust.
1405 * semantics.c (finish_template_template_parm): Adjust.
1406
1407 2000-06-28 Mark Mitchell <mark@codesourcery.com>
1408
1409 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
1410 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
1411 where to emit thunks.
1412 (build_vtt): Adjust call to build_vtt_inits.
1413 (build_vtt_inits): Add parameter to indicate whether or not
1414 sub-VTTs for virtual bases should be included. Adjust handling of
1415 construction vtables.
1416 (get_matching_base): New function.
1417 (dfs_build_vtt_inits): Rename to ...
1418 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
1419 construction vtables.
1420 (dfs_fixup_binfo_vtbls): Likewise.
1421 (build_ctor_vtbl_groups): Build construction vtables for virtual
1422 bases, too.
1423 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
1424 to build construction vtbls.
1425 (dfs_accumulate_vtbl_inits): Adjust handling of
1426 construction vtables.
1427
1428 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
1429 types correctly.
1430
1431 2000-06-27 Mark Mitchell <mark@codesourcery.com>
1432
1433 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
1434
1435 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
1436
1437 * search.c (hides): Remove.
1438 (is_subobject_of_p): Add most_derived parameter. Use
1439 CANONICAL_BINFO.
1440 (lookup_field_queue_p): Adjust.
1441 (lookup_field_r): Adjust.
1442
1443 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
1444
1445 * decl2.c (handle_class_head): Bash typedefs to the type's main
1446 decl.
1447
1448 2000-06-25 Mark Mitchell <mark@codesourcery.com>
1449
1450 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
1451 (begin_global_stmt_expr): ... this.
1452 (genrtl_finish_stmt_expr): Rename to ...
1453 (finish_global_stmt_expr): ... this.
1454 * init.c (begin_init_stmts): Adjust calls.
1455 (finish_init_stmts): Likewise.
1456 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
1457 (begin_global_stmt_expr): ... this.
1458 (genrtl_finish_stmt_expr): Rename to ...
1459 (finish_global_stmt_expr): ... this.
1460
1461 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1462
1463 * search.c (lookup_member): Fix typo in comment.
1464
1465 2000-06-24 Jason Merrill <jason@redhat.com>
1466
1467 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
1468 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
1469
1470 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1471
1472 * parse.y (complex_direct_notype_declarator): Support global_scope.
1473 * Makefile.in: Adjust conflict count.
1474
1475 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1476
1477 * parse.y (template_arg): Convert TEMPLATE_DECL
1478 that is a template template paramter to
1479 TEMPLATE_TEMPLATE_PARM here.
1480
1481 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1482 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
1483 (copy_template_template_parm): Adjust prototype.
1484 * decl.c (grokdeclarator): Remove dead code.
1485 * pt.c (process_template_parm): Tidy.
1486 (lookup_template_class): Construct nodes in
1487 copy_template_template_parm.
1488 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
1489 lookup_template_class. Use TYPE_TI_TEMPLATE.
1490 * tree.c (copy_template_template_parm): Add NEWARGS
1491 parameter.
1492 (mapcar): Adjust call to copy_template_template_parm.
1493 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
1494 * method.c (build_template_template_parm_names): Change error
1495 code to avoid compilation warning.
1496
1497 * gxxint.texi: Document template template parameter
1498 name mangling.
1499
1500 2000-06-21 Alex Samuel <samuel@codesourcery.com>
1501
1502 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
1503 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
1504 (cp-demangle.o): New rule.
1505 (dyn-string.o): Likewise.
1506 * inc/cxxabi.h (__cxa_demangle): New declaration.
1507
1508 2000-06-22 Mark Mitchell <mark@codesourcery.com>
1509
1510 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
1511 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
1512 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
1513 a tree, not an int.
1514 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
1515 (make_thunk): Change prototype.
1516 (emit_thunk): Rename to use_thunk.
1517 (mangle_thunk): Change prototype.
1518 * class.c (get_derived_offset): Simplify.
1519 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
1520 BV_GENERATE_THUNK_WITH_VTABLE_P.
1521 (build_primary_vtable): Simplify.
1522 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
1523 (dfs_find_base): Remove.
1524 (update_vtable_entry_for_fn): Correct bug in finding the base
1525 where a virtual function was first declared. Figure out whether
1526 or not to emit a vcall-thunk with the vtables in which it appears.
1527 Correct logic for deciding whether to use an ordinary thunk, or a
1528 vcall thunk.
1529 (finish_struct_1): Remove unnecssary code.
1530 (build_vtbl_initializer): Use ssize_int for the running counter of
1531 negative indices.
1532 (build_vtbl_initializer): Only use vcall thunks where necessary.
1533 Mark thunks as needing to be emitted with their vtables, or not.
1534 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
1535 indices. Use size_binop.
1536 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
1537 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
1538 size_binop.
1539 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
1540 (build_vtable_entry): Mark thunks as needing to be emitted with
1541 their vtables, or not.
1542 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
1543 * decl2.c (mark_vtable_entries): Use use_thunk instead of
1544 emit_thunk.
1545 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
1546 information.
1547 * error.c (dump_expr): Use BV_FN.
1548 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
1549 not an int.
1550 * method.c (make_thunk): Likewise.
1551 (emit_thunk): Rename to use_thunk. Allow callers to decide
1552 whether or not to actually emit the thunk. Adjust for changes in
1553 representation of vcall offsets.
1554 * search.c (dfs_get_pure_virtuals): Use BV_FN.
1555 * semantics.c (emit_associated_thunks): New function.
1556 (expand_body): Use it.
1557 * ir.texi: Adjust decriptions of thunks.
1558
1559 2000-06-22 Jason Merrill <jason@redhat.com>
1560
1561 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
1562 (tsubst_friend_function): Copy it here.
1563
1564 * decl.c (grok_op_properties): Fix typo.
1565
1566 * decl2.c (delete_sanity): Clarify warning, avoid failure on
1567 deleting void*.
1568
1569 * pt.c (check_explicit_specialization): Clarify error.
1570
1571 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
1572 an old OVERLOAD when we're declaring a non-function.
1573 (pushdecl, destroy_local_var): Check for error_mark_node.
1574 (warn_extern_redeclared_static): Also bail early if
1575 we're a CONST_DECL.
1576 (push_overloaded_decl): Ignore an old error_mark_node.
1577
1578 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
1579
1580 * call.c (build_x_va_arg): Check if in a template decl.
1581 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
1582
1583 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
1584
1585 * class.c (push_lang_context): TYPE_NAME gets you to the Java
1586 types DECLs.
1587 * decl.c (check_goto): Computed gotos assumed OK.
1588
1589 2000-06-20 Jason Merrill <jason@redhat.com>
1590
1591 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
1592 for which we don't need to look for instantiations.
1593
1594 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
1595
1596 * parse.y (program): Always call finish_translation_unit.
1597 * parse.c, parse.h: Rebuilt.
1598
1599 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
1600
1601 * method.c: Don't include hard-reg-set.h.
1602
1603 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1604
1605 * rtti.c (get_base_offset): Cope when vbase field is in a base.
1606
1607 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1608
1609 * call.c (build_conditional_expr): Use VOID_TYPE_P.
1610 * cvt.c (cp_convert_to_pointer): Likewise.
1611 (convert_to_void): Likewise.
1612 * error.c (dump_expr): Likewise.
1613 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
1614 * init.c (build_delete): Likewise.
1615 * method.c (emit_thunk): Likewise.
1616 * optmize.c (declare_return_variable): Likewise.
1617 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1618 (get_typeid): Likewise.
1619 (build_dynamic_cast_1): Likewise.
1620 * typeck.c (composite_pointer_type): Likewise.
1621 (common_type): Likewise.
1622 (build_indirect_ref): Likewise.
1623 (build_binary_op): Likewise.
1624 (build_x_compound_expr): Likewise.
1625 (check_return_expr): Likewise.
1626 * typeck2.c (add_exception_specifier): Likewise.
1627
1628 * mangle.c (write_method_parms): Use direct comparison for end
1629 of parmlist.
1630
1631 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
1632
1633 * cp-tree.h (genrtl_try_block): Declare function.
1634 (genrtl_handler): Likewise.
1635 (genrtl_catch_block): Likewise.
1636 (genrtl_ctor_stmt): Likewise.
1637 (genrtl_subobject): Likewise.
1638 (genrtl_decl_cleanup): Likewise.
1639 (genrtl_do_poplevel): Likewise.
1640 (genrtl_do_pushlevel): Likewise.
1641 (genrtl_clear_out_block): Likewise.
1642 (genrtl_goto_stmt): Likewise.
1643 (genrtl_expr_stmt): Likewise.
1644 (genrtl_decl_stmt): Likewise.
1645 (genrtl_if_stmt): Likewise.
1646 (genrtl_while_stmt): Likewise.
1647 (genrtl_do_stmt): Likewise.
1648 (genrtl_return_stmt): Likewise.
1649 (genrtl_for_stmt): Likewise.
1650 (genrtl_break_stmt): Likewise.
1651 (genrtl_continue_stmt): Likewise.
1652 (genrtl_scope_stmt): Likewise.
1653 (genrtl_switch_stmt): Likewise.
1654 (genrtl_case_label): Likewise.
1655 (genrtl_begin_compound_stmt): Likewise.
1656 (genrtl_finish_compound_stmt): Likewise.
1657 (genrtl_compound_stmt): Likewise.
1658 (genrtl_asm_stmt): Likewise.
1659 (genrtl_named_return_value): Likewise.
1660 (genrtl_begin_stmt_expr): Likewise.
1661 (genrtl_finish_stmt_expr): Likewise.
1662 (finish_for_stmt): Removed first argument.
1663 (finish_switch_stmt): Likewise.
1664
1665 * semantics.c (genrtl_try_block): Define function.
1666 (genrtl_handler): Likewise.
1667 (genrtl_catch_block): Likewise.
1668 (genrtl_ctor_stmt): Likewise.
1669 (genrtl_subobject): Likewise.
1670 (genrtl_decl_cleanup): Likewise.
1671 (genrtl_do_poplevel): Likewise.
1672 (genrtl_do_pushlevel): Likewise.
1673 (genrtl_clear_out_block): Likewise.
1674 (genrtl_goto_stmt): Likewise.
1675 (genrtl_expr_stmt): Likewise.
1676 (genrtl_decl_stmt): Likewise.
1677 (genrtl_if_stmt): Likewise.
1678 (genrtl_while_stmt): Likewise.
1679 (genrtl_do_stmt): Likewise.
1680 (genrtl_return_stmt): Likewise.
1681 (genrtl_for_stmt): Likewise.
1682 (genrtl_break_stmt): Likewise.
1683 (genrtl_continue_stmt): Likewise.
1684 (genrtl_scope_stmt): Likewise.
1685 (genrtl_switch_stmt): Likewise.
1686 (genrtl_case_label): Likewise.
1687 (genrtl_begin_compound_stmt): Likewise.
1688 (genrtl_finish_compound_stmt): Likewise.
1689 (genrtl_compound_stmt): Likewise.
1690 (genrtl_asm_stmt): Likewise.
1691 (genrtl_named_return_value): Likewise.
1692 (genrtl_begin_stmt_expr): Likewise.
1693 (genrtl_finish_stmt_expr): Likewise.
1694 (finish_for_stmt): Removed first argument and generate rtl
1695 specific code.
1696 (finish_switch_stmt): Likewise.
1697 (do_poplevel): Removed generate rtl specific code.
1698 (do_pushlevel): Likewise.
1699 (add_tree): Likewise.
1700 (finish_goto_stmt): Likewise.
1701 (finish_expr_stmt): Likewise.
1702 (begin_if_stmt): Likewise.
1703 (finish_if_stmt_cond): Likewise.
1704 (finish_then_clause): Likewise.
1705 (begin_else_clause): Likewise.
1706 (finish_else_clause): Likewise.
1707 (finish_if_stmt): Likewise.
1708 (clear_out_block): Likewise.
1709 (begin_while_stmt): Likewise.
1710 (finish_while_stmt_cond): Likewise.
1711 (finish_while_stmt): Likewise.
1712 (begin_do_stmt): Likewise.
1713 (finish_do_body): Likewise.
1714 (finish_do_stmt): Likewise.
1715 (finish_return_stmt): Likewise.
1716 (begin_for_stmt): Likewise.
1717 (finish_for_init_stmt): Likewise.
1718 (finish_for_cond): Likewise.
1719 (finish_for_expr): Likewise.
1720 (finish_break_stmt): Likewise.
1721 (finish_continue_stmt): Likewise.
1722 (begin_switch_stmt): Likewise.
1723 (finish_switch_cond): Likewise.
1724 (finish_case_label): Likewise.
1725 (begin_try_block): Likewise.
1726 (begin_function_try_block): Likewise.
1727 (finish_try_block): Likewise.
1728 (finish_cleanup_try_block): Likewise.
1729 (finish_cleanup): Likewise.
1730 (finish_function_try_block): Likewise.
1731 (finish_handler_sequence): Likewise.
1732 (finish_function_handler_sequence): Likewise.
1733 (begin_handler): Likewise.
1734 (finish_handler_parms): Likewise.
1735 (begin_catch_block): Likewise.
1736 (finish_handler): Likewise.
1737 (begin_compound_stmt): Likewise.
1738 (finish_compound_stmt): Likewise.
1739 (finish_asm_stmt): Likewise.
1740 (finish_label_stmt): Likewise.
1741 (finish_label_decl): Likewise.
1742 (finish_subobject): Likewise.
1743 (finish_decl_cleanup): Likewise.
1744 (finish_named_return_value): Likewise.
1745 (begin_stmt_expr): Likewise.
1746 (finish_stmt_expr): Likewise.
1747
1748 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
1749 to call genrtl_expr_stmt when appropriate.
1750
1751 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
1752 begin_compound_expr to call genrtl_begin_stmt_expr and
1753 genrtl_begin_compound_expr when appropriate.
1754 (finish_init_stmts): Changed calls to finish_compound_expr and
1755 finish_stmt_expr to call genrtl_finish_compound_expr and
1756 genrtl_finish_stmt_expr when appropriate.
1757 (expand_default_init): Changed call to finish_expr_stmt to call
1758 genrtl_expr_stmt when appropriate.
1759 (build_vec_init): Likewise.
1760
1761 * parse.y (simple_stmt): Removed first argument from call to
1762 finish_for_stmt. Removed first argument from call to
1763 finish_switch_stmt.
1764
1765 * parse.c: Regenerated.
1766
1767 * pt.c (tsubst_expr): Removed first argument from call to
1768 finish_for_stmt. Removed first argument from call to
1769 finish_switch_stmt.
1770
1771 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
1772
1773 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
1774 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
1775
1776 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
1777 (cplus_tree_code_length[]): Likewise.
1778 (cplus_tree_code_name[]): Likewise.
1779 (init_parse): Added call to add_c_tree_codes. Changed
1780 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
1781
1782 2000-06-16 Mark Mitchell <mark@codesourcery.com>
1783
1784 * cp-tree.h (finish_mem_initializers): Declare.
1785 (count_trees): Likewise.
1786 * parse.y (base_init): Use finish_mem_initializers.
1787 * semantics.c (finish_mem_initializers): New function.
1788
1789 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
1790 the number of trees.
1791 (n_trees): Remove.
1792 (count_trees): Don't use it.
1793
1794 2000-06-15 Jason Merrill <jason@redhat.com>
1795
1796 * tree.c (count_trees): New debugging function.
1797
1798 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
1799 * init.c (build_member_call): Pull out the name of a DECL.
1800
1801 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
1802 * semantics.c (expand_body): Push to TV_INTEGRATION here.
1803 * optimize.c (optimize_function): Not here.
1804 * pt.c (instantiate_decl): Push to TV_PARSE.
1805
1806 2000-06-15 Mark Mitchell <mark@codesourcery.com>
1807
1808 * cp-tree.h (struct language_function): Remove x_base_init_list
1809 and x_member_init_list.
1810 (current_base_init_list): Remove.
1811 (current_member_init_list): Likewise.
1812 (setup_vtbl_ptr): Change prototype.
1813 (emit_base_init): Likewise.
1814 (expand_member_init): Likewise.
1815 (reinit_parse_for_function): Remove.
1816 * decl.c (save_function_data): Don't clear x_base_init_list and
1817 x_member_init_list.
1818 (mark_language_function): Don't mark them.
1819 * init.c (perform_member_init): Tweak comment.
1820 (sort_member_init): Take the list of initializers as an argument.
1821 (sort_base_init): Likewise.
1822 (emit_base_init): Likewise.
1823 (expand_member_init): Return the initializer. Don't use global
1824 variables.
1825 * lex.c (reinit_parse_for_function): Remove.
1826 * method.c (build_template_parm_names): Correct substitution.
1827 (do_build_copy_constructor): Don't use current_member_init_list
1828 and current_base_init_list.
1829 (synthesize_method): Likewise.
1830 * parse.y (base_init): Split mem-initializers into
1831 base-initializers and field-initializers.
1832 (member_init_list): Build up the list here.
1833 (member_init): Return the initializer.
1834 (fn.depfn): Don't use reinit_parse_for_function.
1835 * parse.c: Regenerated.
1836 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
1837 ERROR_MARK.
1838 (tsubst_expr): Don't use current_member_init_list
1839 and current_base_init_list.
1840 (tsubst_expr_values): Rename to ...
1841 (tsubst_initializer_list): ... this. Use convert_from_reference.
1842 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
1843 and current_base_init_list.
1844 (begin_function_definition): Don't call reinit_parse_for_function.
1845
1846 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
1847
1848 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
1849 correctly.
1850
1851 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
1852
1853 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
1854
1855 * cp-tree.h (IF_COND): Move to c-common.h.
1856 (THEN_CLAUSE): Likewise.
1857 (ELSE_CLAUSE): Likewise.
1858 (WHILE_COND): Likewise.
1859 (WHILE_BODY): Likewise.
1860 (DO_COND): Likewise.
1861 (DO_BODY): Likewise.
1862 (RETURN_EXPR): Likewise.
1863 (EXPR_STMT_EXPR): Likewise.
1864 (FOR_INIT_STMT): Likewise.
1865 (FOR_COND): Likewise.
1866 (FOR_EXPR): Likewise.
1867 (FOR_BODY): Likewise.
1868 (SWITCH_COND): Likewise.
1869 (SWITCH_BODY): Likewise.
1870 (CASE_LOW): Likewise.
1871 (CASE_HIGH): Likewise.
1872 (GOTO_DESTINATION): Likewise.
1873 (COMPOUND_BODY): Likewise.
1874 (ASM_CV_QUAL): Likewise.
1875 (ASM_STRING): Likewise.
1876 (ASM_OUTPUTS): Likewise.
1877 (ASM_INPUTS): Likewise.
1878 (ASM_CLOBBERS): Likewise.
1879 (DECL_STMT_DECL): Likewise.
1880 (STMT_EXPR_STMT): Likewise.
1881 (LABEL_STMT_LABEL): Likewise.
1882 (SCOPE_BEGIN_P): Likewise.
1883 (SCOPE_END_P): Likewise.
1884 (SCOPE_STMT_BLOCK): Likewise.
1885 (SCOPE_NULLIFIED_P): Likewise.
1886 (SCOPE_NO_CLEANUPS_P): Likewise.
1887 (SCOPE_PARTIAL_P): Likewise.
1888 (ASM_VOLATILE_P): Likewise.
1889 (STMT_LINENO): Likewise.
1890 (STMT_LINENO_FOR_FN_P): Likewise.
1891
1892 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
1893 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
1894 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
1895 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
1896 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
1897
1898 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
1899
1900 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
1901 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
1902
1903 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
1904 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
1905 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
1906
1907 2000-06-14 Mark Mitchell <mark@codesourcery.com>
1908
1909 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
1910 * class.c (dfs_find_final_overrider): Set it appropriately.
1911 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
1912 avoid unneeded secondary vptrs.
1913
1914 2000-06-13 Jakub Jelinek <jakub@redhat.com>
1915
1916 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
1917 (check_bitfield_decl, check_field_decl): Likewise.
1918 (build_vtbl_or_vbase_field, build_base_field): Likewise.
1919 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
1920 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
1921 (xfer_tag, finish_enum): Likewise.
1922 * decl2.c (finish_builtin_type): Likewise.
1923 * init.c (init_init_processing): Likewise.
1924 * pt.c (instantiate_class_template): Likewise.
1925 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
1926 * cp-tree.h (struct lang_type): Add user_align member.
1927 (CLASSTYPE_USER_ALIGN): Define.
1928
1929 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1930
1931 * Make-lang.in (c++.install-common): Install g++-cross in
1932 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
1933 $(target_alias)-g++ and $(target_alias)-c++.
1934
1935 2000-06-12 Mark Mitchell <mark@codesourcery.com>
1936
1937 * class.c (vcall_offset_data_s): Add last_init and fns.
1938 (overrides): Rename to same_signature_p.
1939 (dfs_find_final_overrider): Adjust accordingly.
1940 (mark_overriders): Likewise.
1941 (warn_hidden): Likewise.
1942 (build_vtbl_initializer): Reorganize machinery for building things
1943 at negative offsets.
1944 (build_vcall_and_vbase_vtbl_entries): Likewise.
1945 (build_vbase_offset_vtbl_entries): Likewise.
1946 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
1947 offset entries. Do not create two entries for functions with the
1948 same signature.
1949 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
1950 (build_rtti_vtbl_entries): Reorganize machinery for building things
1951 at negative offsets.
1952
1953 * optimize.c (expand_call_inline): Don't recurse into the code
1954 used to initialize the parameters more than once.
1955
1956 2000-06-11 Mark Mitchell <mark@codesourcery.com>
1957
1958 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
1959 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
1960 (find_substitution): Only use the `Sa' substitution for
1961 std::allocator, not instantiations of it.
1962 (write_template_prefix): Move comment. Only use a TREE_LIST to
1963 represent substitutions for a member template.
1964 (write_array_type): Mangle array dimensions correctly.
1965 * optimize.c (maybe_clone_body): Copy more information from the
1966 cloned function.
1967 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
1968 on the regenerated declaration.
1969
1970 2000-06-11 Chip Salzenberg <chip@valinux.com>
1971 Mark Mitchell <mark@codesourcery.com>
1972
1973 * class.c (build_vtable): Clarify comment.
1974 (build_ctor_vtbl_group): Pass the most derived type to
1975 build_vtable.
1976
1977 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1978
1979 * decl2.c (compare_options): Don't needlessly cast away const-ness.
1980
1981 2000-06-10 Mark Mitchell <mark@codesourcery.com>
1982
1983 * decl.c (add_binding): Handle duplicate declarations of external
1984 variables.
1985
1986 2000-06-09 Chip Salzenberg <chip@valinux.com>
1987 Mark Mitchell <mark@codesourcery.com>
1988
1989 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
1990 argument.
1991 (write_signed_number): New macro.
1992 (write_unsigned_number): Likewise.
1993 (write_source_name): Use them.
1994 (write_number): Handle signed and unsigned values.
1995 (write_integer_cst): Use tree_int_cst_sgn, and use
1996 write_unsigned_number or write_signed_number as appropriate.
1997 (write_discriminator): Use write_unsigned_number or
1998 write_signed_number as appropriate.
1999 (write_template_arg_literal): Likewise.
2000 (write_array_type): Use tree_low_cst.
2001 (write_template_parm): Use write_unsigned_number or
2002 write_signed_number as appropriate.
2003 (write_substitution): Adjust call to write_number.
2004 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
2005 (write_expression): Handle non-type template arguments of
2006 reference type correctly.
2007 (mangle_thunk): Use write_signed_number.
2008
2009 2000-06-09 Chip Salzenberg <chip@valinux.com>
2010
2011 * mangle.c (find_substition): Don't mangle objects with typename
2012 substitutions (e.g. "cin" as "Si").
2013
2014 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
2015
2016 * call.c (add_candidate): Use ggc_alloc_cleared.
2017 * decl.c (lookup_label): Likewise.
2018 * lex.c (retrofit_lang_decl): Likewise.
2019
2020 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
2021
2022 * semantics.c (expand_body): Push to TV_EXPAND.
2023 * optimize.c (optimize_function): Push to TV_INTEGRATION.
2024 * decl.c (start_function): Always call announce_function.
2025
2026 * tinfo2.cc: Just declare abort.
2027
2028 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
2029
2030 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
2031 whenever @ is a symbolic name.
2032
2033 2000-06-08 Jakub Jelinek <jakub@redhat.com>
2034
2035 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
2036
2037 2000-06-07 Mark Mitchell <mark@codesourcery.com>
2038
2039 * decl.c (pushdecl): Look up functions by DECL_NAME, not
2040 DECL_ASSEMBLER_NAME.
2041
2042 2000-06-06 Mark Mitchell <mark@codesourcery.com>
2043
2044 * decl2.c (c_language): Define.
2045
2046 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
2047
2048 * lex.c (lang_init_options): Tweak.
2049
2050 * decl2.c: Remove #inclusion of diagnostic.h
2051 (lang_decode_option): Move diagnostic formatting options to
2052 toplevel.
2053
2054 * lang-options.h: Remove documentation for diagnostic options.
2055
2056 * Makefile.in (lex.o): Depends upon diagnostic.h
2057
2058 2000-06-06 Mark Mitchell <mark@codesourcery.com>
2059
2060 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
2061 the same DECL_RESULT, it's not a redefinition.
2062 * pt.c (tsubst_decl): Remove code to handle illegal
2063 specializations.
2064
2065 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
2066
2067 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
2068
2069 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
2070
2071 * search.c (maybe_suppress_debug_info): Don't check
2072 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
2073
2074 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
2075 here if extern_p.
2076
2077 Remember instantiation context in deferred instantiations.
2078 * cp-tree.h (struct tinst_level): Remove.
2079 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
2080 * pt.c (current_tinst_level): Now a tree.
2081 (print_template_context, push_tinst_level, pop_tinst_level,
2082 tinst_for_decl): Adjust.
2083 (reopen_tinst_level): New fn.
2084 (init_pt): Register current_tinst_level as a root.
2085 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
2086 of the pending templates list.
2087 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
2088 * lex.c (extract_interface_info): Adjust.
2089 * decl2.c (warn_if_unknown_interface): Adjust.
2090
2091 2000-06-05 Mark Mitchell <mark@codesourcery.com>
2092
2093 * class.c (indirect_primary_base_p): New function.
2094 (determine_primary_base): Use it.
2095
2096 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
2097
2098 Update new-abi dynamic cast algorithm.
2099 * tinfo.cc (__class_type_info::__dyncast_result): Add
2100 whole_details. Adjust constructor.
2101 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
2102 Avoid unnecessary searching.
2103 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
2104
2105 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2106
2107 * decl.c (init_decl_processing): Don't call record_component_aliases.
2108 * tree.c (build_cplus_array_type_1): Likewise.
2109
2110 2000-06-04 Mark Mitchell <mark@codesourcery.com>
2111
2112 * ir.texi: Correct typo.
2113 * mangle.c (write_expression): Handle non-type template arguments
2114 with reference type.
2115 * method.c (build_overload_value): Likewise.
2116 * pt.c (convert_nontype_argument): Explicitly represent conversion
2117 to a reference with an ADDR_EXPR.
2118 (unify): Always unify arguments in left-to-right order.
2119
2120 2000-06-03 Alex Samuel <samuel@codesourcery.com>
2121 Mark Mitchell <mark@codesourcery.com>
2122
2123 * Make-lang.in (CXX_SRCS): Add mangle.c.
2124 * Makefile.in (CXX_OBJS): Add mangle.o.
2125 (mangle.o): New rule.
2126
2127 * class.c (local_classes): New variable.
2128 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
2129 (get_vtt_name): Use mangle_vtt_name for new ABI.
2130 (init_class_processing): Initialize local_classes.
2131 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
2132 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
2133 (std_identifier): New macro.
2134 (DECL_VOLATILE_MEMFUNC_P): New macro.
2135 (DECL_NAMESPACE_STD_P): Likewise.
2136 (local_classes): Declare.
2137 (get_mostly_instantiated_function_type): Declare.
2138 (init_mangle): Declare.
2139 (mangle_decl): Likewise.
2140 (mangle_type_string): Likewise.
2141 (mangle_type): Likewise.
2142 (mangle_typeinfo_for_type): Likewise.
2143 (mangle_typeinfo_string_for_type): Likewise.
2144 (mangle_vtbl_for_type): Likewise.
2145 (mangle_vtt_for_type): Likewise.
2146 (mangle_ctor_vtbl_for_type): Likewise.
2147 (mangle_thunk): Likewise.
2148 (mangle_conv_op_name_for_type): Likewise.
2149 (mangle_guard_variable): Likewise.
2150 * decl.c (pushtag): Keep track of local classes.
2151 (initialize_predefined_identifiers): Initialize std_identifier.
2152 (init_decl_processing): Use std_identifier.
2153 (start_decl): Don't treat instantiations as specializations.
2154 (grokdeclarator): Likewise.
2155 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
2156 name for fully-instantiated templates.
2157 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
2158 destructors with the new ABI.
2159 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
2160 (grokfield): Use mangle_type for new ABI.
2161 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
2162 (get_sentry): Use mangle_guard_variable for new ABI.
2163 (start_static_initialization_or_destruction): Likewise.
2164 * expr.c (extract_aggr_init): Remove.
2165 (extract_scalar_init): Likewise.
2166 (extract_init): Remove #if 0'd code.
2167 * mangle.c: New function.
2168 * method.c (build_mangled_name): Assert not flag_new_abi.
2169 (build_static_name): Likewise.
2170 (build_decl_overload_real): Likewise.
2171 (build_typename_overload): Likewise.
2172 (build_overload_with_type): Likewise.
2173 (build_overload_name): Likewise.
2174 (get_ctor_vtbl_name): Likewise.
2175 (start_squangling): Likewise.
2176 (get_id_2): Likewise.
2177 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
2178 (init_method): Call init_mangle for new ABI.
2179 (make_thunk): Call mangle_thunk for new ABI.
2180 * operators.def: Correct new ABI manglings for the `%' operator.
2181 Add `::' operator.
2182 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
2183 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
2184 (lookup_template_class): Call mangle_decl for new ABI.
2185 (get_mostly_instantiated_function_type): New function.
2186 (set_mangled_name_for_template_decl): Use it.
2187 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
2188 the new ABI. Use mangle_conv_op_name_for_type for instantiated
2189 conversion op names.
2190 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
2191 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
2192 (tinfo_base_init): Likewise. Mangle typeinfo string name with
2193 mangle_typeinfo_string_for_type.
2194
2195 2000-06-03 Mark Mitchell <mark@codesourcery.com>
2196
2197 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
2198 (INNERMOST_TEMPLATE_ARGS): New macro.
2199 (innermost_args): Remove.
2200 (get_innermost_template_args): New function.
2201 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
2202 * error.c (dump_function_decl): Be caution when using
2203 most_general_template.
2204 * method.c (build_template_parm_names): Use
2205 INNERMOST_TEMPLATE_ARGS.
2206 * pt.c (add_to_template_args): Tidy comment
2207 (get_innermost_template_args): New function.
2208 (check_explicit_specialization): Clear DECL_INITIAL for a new
2209 specialization.
2210 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
2211 Tidy.
2212 (push_template_decl): Always register specializations of the most
2213 general template.
2214 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
2215 (coerce_template_parms): Likewise.
2216 (lookup_template_class): Likewise.
2217 (innermost_args): Remove.
2218 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
2219 (tsubst_decl): Handle tricky specializations. Use
2220 get_innermost_template_args.
2221 (instantiate_template): Simplify handling of partial
2222 instantiations.
2223 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
2224 (most_general_template): Reimplement, in a more straightforward
2225 manner.
2226 (regenerate_decl_from_template): Tweak formatting. Use
2227 TMPL_ARGS_DEPTH for clarity.
2228 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
2229
2230 * dump.c (dequeue_and_dump): Dump information about thunks.
2231
2232 2000-06-01 Richard Henderson <rth@cygnus.com>
2233
2234 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
2235
2236 2000-06-01 Richard Henderson <rth@cygnus.com>
2237
2238 * decl2.c (unsupported_options): Fix typo, make const.
2239 (lang_decode_option): Fix bsearch argument order.
2240
2241 2000-06-01 Mark Mitchell <mark@codesourcery.com>
2242
2243 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
2244 on FIELD_DECLs.
2245
2246 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2247
2248 * cp-tree.h (c_get_alias_set): Deleted.
2249 * Makefile.in (decl.o): Include ../expr.h.
2250 * decl.c (expr.h): Include.
2251 (init_decl_processing): Call record_component_aliases for arrays.
2252 (grokdeclarator): Likewise.
2253 Set TREE_ADDRESSABLE for fields that aren't bitfields.
2254 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
2255
2256 2000-05-31 Mark Mitchell <mark@codesourcery.com>
2257
2258 Remove guiding declaration support.
2259 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
2260 (flag_guiding_decls): Remove.
2261 * call.c (build_user_type_conversion_1): Remove support for
2262 guiding decls.
2263 (build_new_function_call): Likewise.
2264 (build_new_op): Likewise.
2265 (build_new_method_call): Likewise.
2266 * decl.c (start_function): Likewise.
2267 * friend.c (is_friend): Likewise.
2268 (do_friend): Likewise.
2269 * decl2.c ((flag_dump_translation_unit): Make it const.
2270 (flag_guiding_decls): Remove.
2271 (unsupported_options): New variable
2272 (compare_options): New function.
2273 (lang_decode_option): Use them.
2274
2275 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
2276
2277 * method.c (mangle_expression): Adjust test for legal expression
2278 operators.
2279
2280 * pt.c (instantiate_decl): Save and restore the local
2281 specializations list.
2282
2283 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
2284
2285 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
2286
2287 2000-05-30 Mark Mitchell <mark@codesourcery.com>
2288
2289 * call.c (add_template_candidate_real): Handle member template
2290 constructors for classes with virtual bases.
2291 (build_user_type_conversion_1): Use in_charge_arg_for_name.
2292 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
2293
2294 * ir.texi: Update thunk documentation.
2295
2296 * call.c (joust): Fix handling of overloaded builtin operators.
2297
2298 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
2299
2300 * cp-tree.h (DECL_ANTICIPATED): New macro.
2301 Document new use of DECL_LANG_FLAG_7.
2302 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
2303 in the user namespace.
2304 * lex.c (do_identifier): If the identifier's declaration has
2305 DECL_ANTICIPATED on, it has not yet been declared. But do not
2306 replace it with an ordinary implicit declaration.
2307
2308 * tinfo2.cc: Include stdlib.h.
2309
2310 2000-05-29 Mark Mitchell <mark@codesourcery.com>
2311
2312 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
2313 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
2314 CLASSTYPE_ALIGN.
2315
2316 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
2317
2318 * decl2.c (lang_decode_option): Use skip_leading_substring instead
2319 of plain strncmp.
2320
2321 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
2322
2323 * operators.def (<?): Duplicated, should have been...
2324 (>?): this. Fixed.
2325
2326 2000-05-27 Alex Samuel <samuel@codesourcery.com>
2327 Mark Mitchell <mark@codesourcery.com>
2328
2329 * cp-tree.h (ansi_opname): Make it a macro.
2330 (ansi_assopname): Likewise.
2331 (struct lang_decl_flags): Add assignment_operator_p.
2332 (struct lang_decl): Add operator_code.
2333 (DECL_VTT_PARM): Adjust.
2334 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
2335 overloaded operator.
2336 (SET_OVERLOADED_OPERATOR_CODE): New macro.
2337 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
2338 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
2339 (opname_tab): Remove.
2340 (assignop_tab): Likewise.
2341 (operator_name_info_t): New type.
2342 (operator_name_info): New variable.
2343 (assignment_operator_name_info): Likewise.
2344 (build_cp_library_fn): Remove declaration.
2345 (push_cp_library_fn): Likewise.
2346 (operator_name_string): Likewise.
2347 (build_decl_overload): Likewise.
2348 * call.c (print_z_candidates): Simplify.
2349 (build_object_call): Adjust usage of ansi_opname. Use
2350 DECL_OVERLOADED_OPERATOR_P.
2351 (op_error): Adjust operator name lookup.
2352 (build_conditional_expr): Adjust usage of ansi_opname.
2353 (build_new_op): Likewise.
2354 (build_op_delete_call): Likewise.
2355 (build_over_call): Likewise.
2356 (joust): Use DECL_OVERLOADED_OPERATOR_P.
2357 * decl.c (duplicate_decls): Copy operator_code.
2358 (init_decl_processing): Adjust parameters to push_cp_library_fn.
2359 (builtin_function): Adjust parameters to build_library_fn_1.
2360 (build_library_fn_1): Accept an overloaded operator code.
2361 (build_library_fn): Pass ERROR_MARK.
2362 (build_cp_library_fn): Accept an overloaded operator code.
2363 (push_cp_library_fn): Likewise.
2364 (grokfndecl): Tweak.
2365 (grokdeclarator): Simplify code to compute names of overloaded
2366 operators. Adjust use of ansi_opname.
2367 (ambi_op_p): Work on tree_codes, not identifiers.
2368 (unary_op_p): Likewise.
2369 (grok_op_properties): Likewise.
2370 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
2371 (lang_mark_tree): Don't try to mark the operator_code.
2372 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
2373 * error.c (dump_decl): Remove special handling for operator
2374 names.
2375 (dump_function_name): Likewise.
2376 (dump_expr): Adjust name lookup of operators.
2377 (op_to_string): Simplify.
2378 (assop_to_string): Likewise.
2379 * init.c (build_new_1): Adjust use of ansi_opname.
2380 * lex.c (opname_tab): Remove.
2381 (assignop_tab): Likewise.
2382 (ansi_opname): Likewise.
2383 (ansi_assopname): Likewise.
2384 (operator_name_string): Likewise.
2385 (reinit_lang_specific): Likewise.
2386 (operator_name_info): New variable.
2387 (assignment_operator_name_info): Likewise.
2388 (init_operators): New function.
2389 (init_parse): Use it.
2390 (do_identifier): Adjust use of ansi_opname.
2391 * method.c (mangle_expression): Don't use ansi_opname for
2392 mangling.
2393 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
2394 (build_decl_overload): Remove.
2395 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
2396 (do_build_assign_ref): Adjust use of ansi_opname.
2397 (synthesize_method): Likewise.
2398 (implicitly_declare_fn): Likewise.
2399 * operators.def: New file.
2400 * parse.y (operator): Adjust use of ansi_opname.
2401 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
2402 (set_mangled_name_for_template_decl): Don't play games with
2403 current_namespace.
2404 (special_function_p): Adjust use of ansi_opname.
2405 * typeck.c (check_return_expr): Likewise.
2406 * Make-lang.in (cc1plus): Depend on operators.def.
2407 * Makefile.in (lex.o): Likewise.
2408 (decl.o): Likewise.
2409
2410 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
2411
2412 * Make-lang.in (cplib2.ready): Eradicate.
2413
2414 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2415
2416 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
2417 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
2418 (built_min, cp_tree_equal): Likewise.
2419
2420 2000-05-26 Mark Mitchell <mark@codesourcery.com>
2421
2422 * class.c (layout_nonempty_base_or_field): Replace
2423 `record_layout_info' with `record_layout_info_s'.
2424
2425 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
2426
2427 Fix goto checking.
2428 * cp-tree.h (struct language_function): x_named_labels is now
2429 a struct named_label_list*.
2430 * decl.c (struct named_label_use_list): Renamed from...
2431 (struct named_label_list): ...this. New struct.
2432 (push_binding_level): Don't set eh_region.
2433 (note_level_for_eh): New fn.
2434 (pop_label): Take label and old value directly.
2435 (pop_labels): Adjust for new named_labels format.
2436 (lookup_label): Likewise.
2437 (poplevel): Note characteristics of a binding level containing a
2438 named label. Mess with named label lists earlier.
2439 (mark_named_label_lists): New fn.
2440 (mark_lang_function): Call it.
2441 (use_label): New fn, split out from...
2442 (make_label_decl): ...here. Don't call it.
2443 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
2444 check_previous_gotos): New fns, split out from...
2445 (define_label): ...here.
2446 (check_switch_goto): New fn.
2447 (define_case_label): Call it.
2448 (check_goto): New fn.
2449 * semantics.c (finish_goto_stmt): Call it and use_label.
2450 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
2451 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
2452
2453 2000-05-26 Mark Mitchell <mark@codesourcery.com>
2454
2455 * class.c (build_vtable_entry_ref): Correct usage of
2456 get_vtbl_decl_for_binfo.
2457
2458 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
2459 * method.c (implicitly_declare_fn): Not here.
2460
2461 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
2462
2463 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
2464 (CPTI_PTMD_DESC_TYPE): ... here.
2465 (ptmd_desc_type_node): Rename to ...
2466 (ptm_desc_type_node): ... here.
2467 * decl.c: Likewise.
2468 * rtti.c (ptmd_initializer): Rename to ...
2469 (ptm_initializer): ... here.
2470 (sythesize_tinfo_var): Adjust. Deal with pointer to member
2471 function.
2472 (create_tinfo_types): Adjust.
2473
2474 2000-05-25 Mark Mitchell <mark@codesourcery.com>
2475
2476 Finish implementation of VTTs.
2477 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
2478 CPTI_VTT_PARM_IDENTIFIER.
2479 (vtt_parm_identifier): New macro.
2480 (vtt_parm_type): Likewise.
2481 (BINFO_SUBVTT_INDEX): Likewise.
2482 (BINFO_VPTR_INDEX): Likewise.
2483 (struct lang_decl): Add vtt_parm.
2484 (DECL_VTT_PARM): New macro.
2485 (DECL_USE_VTT_PARM): Likewise.
2486 (DECL_NEEDS_VTT_PARM_P): Likewise.
2487 (get_vtt_name): Declare.
2488 (build_artifical_parm): Likewise.
2489 (fixup_all_virtual_upcast_offsets): Likewise.
2490 (expand_indirect_vtbls_init): Remove.
2491 * call.c (build_new_method_call): Pass the vtt to subobject
2492 constructors and destructors.
2493 * class.c (get_vtt_name): Give it external linkage.
2494 (build_clone): Handle the magic VTT parameters for clones.
2495 (clone_function_decl): Fix typo in comment.
2496 (build_vtt): Keep track of the indices in the VTTs where various
2497 entities are stored.
2498 (build_vtt_inits): Likewise.
2499 (dfs_build_vtt_inits): Likewise.
2500 (build_ctor_vtbl_group): Tweak type of construction vtables.
2501 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
2502 primary bases, when building construction vtables.
2503 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
2504 (initialize_predefined_identifiers): Add vtt_parm_identifier.
2505 (init_decl_processing): Initialize vtt_parm_type.
2506 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
2507 (lang_mark_tree): Make vtt_parm.
2508 * decl2.c (build_artificial_parm): New function.
2509 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
2510 (grokclassfn): Use build_artificial_parm.
2511 * init.c (initialize_vtbl_ptrs): Call
2512 fixup_all_virtual_upcast_offsets directly.
2513 (perform_member_init): Use the complete subobject destructor for
2514 member cleanups.
2515 (build_vtbl_address): New function.
2516 (expand_virtual_init): Handle VTTs.
2517 * optimize (maybe_clone_body): Likewise.
2518 * search.c (fixup_all_virtual_upcast_offsets): Give it external
2519 linkage.
2520 (expand_indirect_vtbls_init): Remove.
2521 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
2522 * tree.c (make_binfo): Make them bigger.
2523
2524 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2525
2526 * inc/cxxabi.h (__pbase_type_info): Define, based on
2527 __pointer_type_info.
2528 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
2529 (__pointer_to_member_type_info): Likewise.
2530 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
2531 (__pointer_to_member_type_info::__is_pointer_p): Remove.
2532 (__pointer_type_info::__do_catch): Rename to ...
2533 (__pbase_type_info::__do_catch): ... here. Adjust.
2534 (__pbase_type_info::__pointer_catch): Implement.
2535 (__pointer_type_info::__pointer_catch): Adjust.
2536 (__pointer_to_member_type_info::__pointer_catch): Adjust.
2537
2538 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2539
2540 * tinfo.h (__user_type_info::contained_virtual_p): New
2541 predicate.
2542 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
2543 shaped heirarchy.
2544 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
2545 diamond shaped heirarchy. Add early out for mixed diamond and
2546 duplicate shaped heirarchy.
2547
2548 2000-05-24 Mark Mitchell <mark@codesourcery.com>
2549
2550 * cp-tree.h (build_delete): Change prototype.
2551 (build_vec_delete): Likewise.
2552 * call.c (build_scoped_method_call): Use special_function_kind
2553 values to indicate the kind of destruction to be done.
2554 (build_method_call): Likewise.
2555 * decl.c (finish_destructor_body): Likewise.
2556 (maybe_build_cleanup_1): Likewise. Rename to ...
2557 (maybe_build_cleanup): ... this.
2558 * decl2.c (delete_sanity): Use special_function_kind
2559 values to indicate the kind of destruction to be done.
2560 (build_cleanup): Likewise.
2561 * init.c (perform_member_init): Likewise.
2562 (build_vec_delete_1): Likewise.
2563 (build_dtor_call): Simplify.
2564 (build_delete): Use special_function_kind
2565 values to indicate the kind of destruction to be done.
2566 (build_vbase_delete): Likewise.
2567 (build_vec_delete): Likewise.
2568
2569 * init.c (sort_member_init): Fix typo in error message generation
2570 code.
2571
2572 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
2573
2574 * semantics.c (begin_class_definition): make the packed
2575 attribute be sensitive to the "-fpack-struct" command line flag
2576
2577 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
2578
2579 Update new-abi upcast algorithm.
2580 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
2581 prototype and meaning of return value.
2582 (__si_class_type_info::__do_upcast): Likewise.
2583 (__vmi_class_type_info::__do_upcast): Likewise.
2584 * tinfo.cc (__class_type_info::__upcast_result): Replace
2585 whole2dst with part2dst. Adjust ctor.
2586 (__class_type_info::__do_upcast): Adjust call of worker function.
2587 (__class_type_info::__do_upcast): Adjust.
2588 (__si_class_type_info::__do_upcast): Adjust. Use parent's
2589 __do_upcast.
2590 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
2591 virtual base in diamond heirarchy bug.
2592
2593 2000-05-23 Mark Mitchell <mark@codesourcery.com>
2594
2595 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
2596 and bitfield to tinfo_fn_p.
2597 (DECL_TINFO_FN_P): Adjust.
2598 (SET_DECL_TINFO_FN_P): Likewise.
2599 (DECL_MUTABLE_P): Likewise.
2600 (DECL_C_BIT_FIELD): Likewise.
2601 (SET_DECL_C_BIT_FIELD): Likewise.
2602 (CLEAR_DECL_C_BIT_FIELD): Likewise.
2603 (DECL_UNINLINABLE): Likewise.
2604 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
2605 (handle_using_decl): Remove assertion.
2606 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
2607 to build FIELD_DECLs.
2608 (build_base_field): Likewise.
2609 (layout_class_type): Likewise.
2610 * decl.c (init_decl_processing): Likewise.
2611 (build_ptrmemfunc_type): Likewise.
2612 (grokdeclarator): Likewise.
2613 * decl2.c (grok_x_components): Likewise.
2614 * except.c (call_eh_info): Likewise.
2615 * init.c (init_init_processing): Likewise.
2616 * rtti.c (expand_class_desc): Likewise.
2617 (create_pseudo_type_info): Likewise.
2618 (get_vmi_pseudo_type_info): Likewise.
2619 (create_tinfo_types): Likewise.
2620 * ptree.c (print_lang_decl): Adjust.
2621 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
2622 before checking DECL_MUTABLE_P.
2623
2624 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
2625 parameters for template functions.
2626 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
2627 destructors as well as constructors.
2628
2629 2000-05-22 Mark Mitchell <mark@codesourcery.com>
2630
2631 * class.c (build_ctor_vtbl_group): Set inits.
2632 * optimize.c (maybe_clone_body): Set DECL_INLINE and
2633 DECL_THIS_INLINE appropriately for clones.
2634
2635 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
2636 (DECL_CONV_FN_P): Simplify.
2637 (DECL_OPERATOR): Remove.
2638 (language_to_string): Declare.
2639 * decl.c (duplicate_decls): Fix typo in comment.
2640 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
2641 (grok_op_properties): Use DECL_CONV_FN_P instead of
2642 IDENTIFIER_TYPENAME_P.
2643 * dump.c (dequeue_and_dump): Dump the language linkage of
2644 declarations.
2645 * error.c (language_to_string): Give it external linkage.
2646 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
2647 (implicitly_declare_fn): Set DECL_LANGUAGE.
2648 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
2649 IDENTIFIER_TYPENAME_P.
2650 (tsubst_decl): Likewise.
2651 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
2652 * semantics.c (finish_member_declaration): Don't mark members of
2653 classes declared in an extern "C" region as extern "C".
2654
2655 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2656
2657 * decl2.c (qualified_lookup_using_namespace): Look through
2658 namespace aliases.
2659
2660 * decl.c (push_using_decl): Return the old decl on namespace level.
2661
2662 2000-05-21 Mark Mitchell <mark@codesourcery.com>
2663
2664 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
2665 (VTT_NAME_PREFIX): New macro.
2666 (CTOR_VTBL_NAME_PREFIX): Likewise.
2667 (get_ctor_vtbl_name): New function.
2668 * class.c (get_vtable_name): Simplify.
2669 (get_vtt_name): New function.
2670 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
2671 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
2672 when a virtual base becomes primary.
2673 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
2674 VTTs.
2675 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
2676 additional parameters.
2677 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
2678 (initialize_array): New function.
2679 (build_vtt): Likewise.
2680 (build_vtt_inits): Likewise.
2681 (dfs_build_vtt_inits): Likewise.
2682 (dfs_fixup_binfo_vtbls): Likewise.
2683 (build_ctor_vtbl_group): Likewise.
2684 (initialize_vtable): Use initialize_array.
2685 (accumulate_vtbl_inits): Reimplement to handle construction
2686 vtables.
2687 (dfs_accumulate_vtbl_inits): Likewise.
2688 (bulid_vtbl_initializer): Adjust parameter name.
2689 * method.c (build_typename_overload): Remove #if 0'd code.
2690 (get_ctor_vtbl_name): New function.
2691 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
2692 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
2693
2694 * cp-tree.h (struct lang_type): Remove search_slot.
2695 (CLASSTYPE_SEARCH_SLOT): Remove.
2696 (emit_base_init): Change prototype.
2697 (initialize_vtbl_ptrs): Likewise.
2698 (expand_indirect_vtbls_init): Likewise.
2699 (clear_search_slots): Remove.
2700 * decl.c (lang_mark_tree): Don't mark search_slot.
2701 * init.c (initialize_vtbl_ptrs): Simplify.
2702 (emit_base_init): Likewise.
2703 * search.c (struct vbase_info): Document decl_ptr.
2704 (convert_pointer_to_single_level): Remove.
2705 (dfs_find_vbases): Remove.
2706 (dfs_init_base_pointers): Simplify.
2707 (dfs_clear_vbase_slots): Remove.
2708 (dfs_vtable_path_unmark): New function.
2709 (init_vbase_pointers): Simplify.
2710 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
2711 (expand_indirect_vtbls_init): Simplify. Don't call
2712 mark_all_temps_used.
2713 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
2714 initialize_vtbl_ptrs.
2715
2716 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
2717
2718 * except.c: Add static prototypes.
2719
2720 2000-05-20 H.J. Lu <hjl@gnu.org>
2721
2722 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
2723
2724 2000-05-19 Mark Mitchell <mark@codesourcery.com>
2725
2726 Don't create a separate copy of virtual bases for the
2727 CLASSTYPE_VBASECLASSES list.
2728 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
2729 (BINFO_FOR_VBASE): Remove.
2730 (CANONICAL_BINFO): Adjust.
2731 (binfo_for_vbase): New function.
2732 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
2733 instead of BINFO_FOR_VBASE.
2734 (build_vbase_pointer): Likewise.
2735 (build_secondary_vtable): Likewise.
2736 (dfs_mark_primary_bases): Likewise.
2737 (mark_primary_bases): Likewise.
2738 (layout_nonempty_base_or_field): Likewise.
2739 (dfs_set_offset_for_shared_vbases): Likewise.
2740 (dfs_set_offset_for_unshared_vbases): Likewise.
2741 (layout_virtual_bases): Likewise. Adjust for changes to the
2742 CLASSTYPE_VBASECLASSES list.
2743 (dump_class_hierarchy_r): Use binfo_for_vbase
2744 instead of BINFO_FOR_VBASE.
2745 (dump_class_hierarchy): Likewise.
2746 (finish_vtbls): Likewise.
2747 (build_vtbl_initializer): Adjust for changes to the
2748 CLASSTYPE_VBASECLASSES list.
2749 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
2750 * decl.c (finish_destructor_body): Adjust for changes to the
2751 CLASSTYPE_VBASECLASSES list.
2752 * init.c (sort_base_init): Use binfo_for_vbase.
2753 (construct_virtual_bases): Adjust for changes to the
2754 CLASSTYPE_VBASECLASSES list.
2755 (expand_member_init): Use binfo_for_vbase.
2756 (build_vbase_delete): Adjust for changes to the
2757 CLASSTYPE_VBASECLASSES list.
2758 * method.c (do_build_copy_constructor): Likewise.
2759 * rtti.c (get_base_offset): Use binfo_for_vbase.
2760 (expand_class_desc): Remove #if 0'd code.
2761 * search.c (struct vbase_info): Remove vbase_types.
2762 (get_base_distance): Use binfo_for_vbase.
2763 (lookup_field_queue_p): Use CANONICAL_BINFO.
2764 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
2765 (get_pure_virtuals): Adjust for changes to the
2766 CLASSTYPE_VBASECLASSES list.
2767 (dfs_find_vbases): Use binfo_for_vbase.
2768 (dfs_init_vbase_pointers): Likewise.
2769 (init_vbase_pointers): Don't initialize vi.vbase_types.
2770 (virtual_context): Use binfo_for_vbase.
2771 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
2772 CLASSTYPE_VBASECLASSES list.
2773 (expand_indirect_vtbls_init): Simplify.
2774 (dfs_get_vbase_types): Don't replicate virtual bases.
2775 (find_vbase_instance): Use binfo_for_vbase.
2776 (binfo_for_vbase): New function.
2777 * typeck.c (get_delta_difference): Use binfo_for_vbase.
2778
2779 2000-05-17 Mark Mitchell <mark@codesourcery.com>
2780
2781 * decl2.c (finish_anon_union): Generalize error messages to handle
2782 anonymous structures.
2783 * init.c (perform_member_init): Remove `name' parameter.
2784 (build_field_list): New function.
2785 (sort_member_init): Handle anonymous union initialization order
2786 correctly. Check for multiple initializations of the same union.
2787 (emit_base_init): Don't look up fields by name here.
2788 (expand_member_init): Record the result of name lookup for future
2789 reference.
2790 * typeck.c (build_component_ref): Fix formatting.
2791
2792 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
2793
2794 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
2795 * typeck.c (build_x_compound_expr): Replace warn_unused with
2796 warn_unused_value.
2797
2798 * decl2.c (lang_decode_option): Update -Wall unused flags by
2799 calling set_Wunused.
2800
2801 2000-05-16 Mark Mitchell <mark@codesourcery.com>
2802
2803 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
2804 * init.c (dfs_vtable_path_unmark): Remove.
2805 * search.c (marked_new_vtable_p): Likewise.
2806 (unmarked_new_vtable_p): Likewise.
2807 (dfs_search_slot_nonempty_p): Likewise.
2808 (dfs_mark): Likewise.
2809 (dfs_vtable_path_unmark): Likewise.
2810 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
2811 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
2812 (dfs_init_vbase_pointers): Remove special-case new ABI code.
2813 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
2814 (init_vbase_pointers): Simplify.
2815 (expand_indirect_vtbls_init): Likewise.
2816
2817 * class.c (copy_virtuals): New function.
2818 (build_primary_table): Use it.
2819 (build_secondary_vtable): Likewise.
2820 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
2821 indicate that no vcall offset is required.
2822 (add_virtual_function): Likewise.
2823 (modify_all_vtables): Likewise.
2824 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2825 (dfs_accumulate_vtbl_inits): Likewise.
2826 (build_vtbl_initializer): Make changes to handle construction
2827 vtables.
2828 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2829 (build_rtti_vtbl_entries): Likewise.
2830 (build_vtable_entries): Handle a NULL vcall_index.
2831
2832 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
2833
2834 * decl2.c (lang_decode_option): Fix thinko.
2835
2836 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
2837
2838 * except.c (check_handlers): New fn.
2839 * cp-tree.h: Declare it.
2840 * semantics.c (finish_handler_sequence): Call it.
2841 (finish_function_handler_sequence): Likewise.
2842 (finish_handler_parms): Set TREE_TYPE on the handler.
2843 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
2844 * search.c (get_base_distance_recursive): If protect>1, ignore
2845 special access.
2846 (get_base_distance): Don't reduce watch_access.
2847
2848 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
2849
2850 * lex.c: #include diagnostic.h.
2851 (lang_init_options): Set default prefixing rules.
2852
2853 * lang-options.h: Add -fdiagnostics-show-location=.
2854
2855 * decl2.c: #include diagnostic.h.
2856 (lang_decode_option): Handle -fdiagnostics-show-location=.
2857
2858 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
2859
2860 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
2861 * vec.cc: Revert my 2000-05-07 change.
2862
2863 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
2864
2865 * class.c (check_field_decls): Complain about non-static data
2866 members with same name as class in class with constructor.
2867
2868 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
2869
2870 * decl.c (grokdeclarator): Allow non-static data members with
2871 same name as class.
2872
2873 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
2874
2875 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
2876 and pending_inline.filename. Update prototypes.
2877 * decl.c (define_label): Constify filename parameter.
2878 * decl2.c (warn_if_unknown_interface): Constify local char *.
2879 * input.c Constify input_source.filename. Don't declare
2880 input_filename or lineno. Constify filename parameter to feed_input.
2881 * lex.c (init_parse): Constify parameter and return value.
2882 (cp_pragma_interface, cp_pragma_implementation): Constify
2883 filename argument.
2884 (reinit_parse_for_method, reinit_parse_for_block,
2885 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
2886 Constify local char *.
2887 * pt.c: Don't declare lineno or input_filename.
2888 (print_template_context, tsubst_friend_function, tsubst_decl,
2889 tsubst, instantiate_decl): Constify local char *.
2890 * semantics.c (expand_body): Constify local char *.
2891 * tree.c (build_srcloc): Constify filename parameter.
2892 * typeck.c (c_expand_asm_operands): Constify filename
2893 parameter.
2894
2895 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
2896
2897 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
2898 offsetof expansion.
2899
2900 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
2901
2902 * inc/cxxabi.h: Fix typos in comment.
2903 (__base_class_info::__offset): Use a static_cast.
2904
2905 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
2906
2907 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
2908 of std::size_t and std::ptrdiff_t respectively.
2909 * tinfo.cc: Likewise.
2910 * vec.cc: Likewise.
2911
2912 2000-05-06 Richard Henderson <rth@cygnus.com>
2913
2914 * typeck.c (build_c_cast): Don't warn integer->pointer size
2915 mismatch for constants.
2916
2917 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
2918
2919 * rtti.c (ptmd_initializer): Set non-public, if class is
2920 incomplete.
2921
2922 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
2923 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2924 __cxa_vec_delete): Likewise.
2925 * tinfo.cc (__dynamic_cast): Likewise.
2926 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2927 __cxa_vec_delete): Likewise.
2928
2929 2000-05-04 Mark Mitchell <mark@codesourcery.com>
2930
2931 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
2932 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
2933 (lang_decl_flags): Add vcall_offset.
2934 (THUNK_VCALL_OFFSET): Use it.
2935 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
2936 * method.c (make_thunk): Create the lang_decl here, not in
2937 emit_thunk.
2938 (emit_thunk): Make generic thunks into ordinary functions once
2939 they have been fed to expand_body.
2940 * semantics.c (expand_body): Set current_function_is_thunk here.
2941
2942 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2943
2944 * class.c (update_vtable_entry_for_fn): Prototype.
2945
2946 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
2947 and `tmpl'.
2948
2949 * search.c (dfs_build_inheritance_graph_order): Prototype.
2950
2951 2000-05-04 Mark Mitchell <mark@codesourcery.com>
2952
2953 * cp-tree.h (special_function_kind): Add various kinds of
2954 destructors.
2955 (special_function_p): New function.
2956 * class.c (overrides): Don't let one kind of destructor override
2957 another.
2958 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
2959 whether or not to instantiate a template.
2960 * tree.c (special_function_p): Define.
2961
2962 2000-05-03 Mark Mitchell <mark@codesourcery.com>
2963
2964 * cp-tree.def (THUNK_DECL): Remove.
2965 * cp-tree.h (DECL_THUNK_P): New macro.
2966 (DECL_NON_THUNK_FUNCTION_P): Likewise.
2967 (DECL_EXTERN_C_FUNCTION_P): Likewise.
2968 (SET_DECL_THUNK_P): Likewise.
2969 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
2970 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
2971 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
2972 * decl.c (decls_match): Use DECL_EXTERN_C_P.
2973 (duplicate_decls): Likewise.
2974 (pushdecl): Likewise. Adjust thunk handling.
2975 (grokfndecl): Use DECL_EXTERN_C_P.
2976 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
2977 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
2978 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
2979 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
2980 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
2981 DECL_NO_STATIC_CHAIN.
2982 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
2983 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
2984 * search.c (covariant_return_p): Remove THUNK_DECL handling.
2985 * ir.texi: Update.
2986
2987 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
2988
2989 * tree.c (walk_tree): Set lineno.
2990
2991 2000-05-01 Mark Mitchell <mark@codesourcery.com>
2992
2993 * exception.cc: Update license notice.
2994 * new.cc: Likewise.
2995 * new1.cc: Likewise.
2996 * new2.cc: Likewise.
2997 * tinfo.cc: Likewise.
2998 * tinfo2.cc: Likewise.
2999 * vec.cc: Likewise.
3000 * inc/cxxabi.h: Likewise.
3001 * inc/exception: Likewise.
3002 * inc/new: Likewise.
3003 * inc/new.h: Likewise.
3004 * inc/typeinfo: Likewise.
3005
3006 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
3007
3008 * tree.c (build_target_expr_with_type): If we already have a
3009 TARGET_EXPR, just return it.
3010
3011 * optimize.c (initialize_inlined_parameters): Don't generate an
3012 EXPR_STMT if we can just use DECL_INITIAL.
3013 * decl.c (emit_local_var): Only make the initialization a
3014 full-expression if stmts_are_full_exprs_p.
3015
3016 2000-05-01 Mark Mitchell <mark@codesourcery.com>
3017
3018 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
3019 macro.
3020 * call.c (standard_conversion): Use it.
3021 (direct_reference_binding): Likewise.
3022 (build_over_call): Likewise.
3023 (is_properly_derived_from): Likewise.
3024 (compare_ics): Likewise.
3025 * class.c (resolves_to_fixed_type_p): Likewise.
3026 * optimize.c (declare_return_variable): Likewise.
3027 * pt.c (is_specialization_of): Likewise.
3028 (unify): Likewise.
3029 * typeck.c (comp_target_parms): Likeiwse.
3030 (build_static_cast): Likewise.
3031 (build_reinterpret_cast): Likewise.
3032 (build_const_cast): Likewise.
3033 (comp_ptr_ttypes_real): Likewise.
3034 (comp_ptr_ttypes_const): Likewise.
3035 * typeck2.c (process_init_constructor): Likewise.
3036
3037 2000-04-30 Scott Snyder <snyder@fnal.gov>
3038
3039 * decl.c (finish_destructor_body): Use the base destructor when
3040 destroying virtual bases.
3041
3042 2000-04-30 Mark Mitchell <mark@codesourcery.com>
3043
3044 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
3045 STMT_EXPRs.
3046 * optimize.c (struct inline_data): Add target_exprs field.
3047 (declare_return_variable): When a function returns an aggregate,
3048 use the variable declared in the TARGET_EXPR as the remapped
3049 DECL_RESULT.
3050 (expand_call_inline): Update the pending target_exprs stack.
3051 (optimize_function): Initialize the stack.
3052
3053 * decl2.c (finish_file): Fix typo in comment.
3054
3055 * method.c (emit_thunk): Don't try to return a `void' value.
3056
3057 * optimize.c (initialize_inlined_parameters): If the parameter is
3058 addressable, we need to make a new VAR_DECL, even if the
3059 initializer is constant.
3060
3061 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
3062
3063 * decl.c (grok_op_properties): Add an extra check of argtypes.
3064
3065 2000-04-27 Mark Mitchell <mark@codesourcery.com>
3066
3067 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
3068 variables.
3069 (initialize_inlined_parameters): Try to avoid creating new
3070 VAR_DECLs.
3071
3072 2000-04-27 Alex Samuel <samuel@codesourcery.com>
3073
3074 * lex.c (my_get_run_time): Remove.
3075 (init_filename_times): Use get_run_time instead of my_get_run_time.
3076 (check_newline): Likewise.
3077 (dump_time_statistics): Likewise.
3078 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
3079 of computing elapsed time explicitly.
3080
3081 2000-04-26 Mark Mitchell <mark@codesourcery.com>
3082
3083 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
3084 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
3085 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
3086 before calling decl_constant_value.
3087 * class.c (check_bitfield_decl): Likewise.
3088 * cvt.c (ocp_convert): Likewise.
3089 (convert): Likewise.
3090 * decl.c (compute_array_index_type): Likewise.
3091 (build_enumerator): Likewise.
3092 * decl2.c (check_cp_case_value): Likewise.
3093 * pt.c (convert_nontype_argument): Likewise.
3094 (tsubst): Likewise.
3095 * typeck.c (decay_conversion): Likewise.
3096 (build_compound_expr): Likewise.
3097 (build_reinterpret_cast): Likewise.
3098 (build_c_cast): Likewise.
3099 (convert_for_assignment): Likewise.
3100
3101 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
3102
3103 * decl.c (finish_function): Don't play games with DECL_INLINE.
3104
3105 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
3106
3107 * ir.texi: Correct typo.
3108
3109 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3110
3111 * decl.c (grokdeclarator): Reject VLAs as members.
3112
3113 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
3114
3115 * call.c (standard_conversion): Accept conversion between
3116 COMPLEX_TYPEs.
3117
3118 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
3119
3120 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
3121
3122 * decl2.c (finish_file): Remove double setup for accounting
3123 compile time.
3124
3125 2000-04-24 Robert Lipe <robertlipe@usa.net>
3126
3127 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
3128
3129 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
3130
3131 * new.cc (set_new_handler): Needs to be in std::.
3132
3133 2000-04-23 Mark Mitchell <mark@codesourcery.com>
3134
3135 * cp-tree.h (lang_decl): Remove pretty_function_p.
3136 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
3137 language-specific node.
3138 * decl.c (cp_make_fname_decl): Use build_decl, not
3139 build_lang_decl, to build the variables.
3140 (grokvardecl): Don't call build_lang_decl for local variables in
3141 templates.
3142 (grokdeclarator): Don't call build_lang_decl for local type
3143 declarations in templates.
3144 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
3145 zero'd memory, rather than calling memset.
3146 * pt.c: Include hashtab.h.
3147 (local_specializations): New variable.
3148 (retrieve_local_specialization): Use it.
3149 (register_local_specialization): Likewise.
3150 (tsubst_decl): Don't assume local variables have
3151 DECL_LANG_SPECIFIC.
3152 (instantiate_decl): Set up local_specializations.
3153 * Makefile.in (HTAB_H): New variable.
3154
3155 2000-04-23 Richard Henderson <rth@cygnus.com>
3156
3157 * typeck.c (c_expand_asm_operands): Restore the original
3158 contents of the output list.
3159
3160 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
3161
3162 * ir.texi: Document complex number representation.
3163
3164 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
3165
3166 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
3167 (target_incomplete_p): New function.
3168 (tinfo_base_init): Create comdat NTBS name variable.
3169 (ptr_initializer): Add non_public parameter. Calculate it.
3170 (ptmd_initializer): Likewise.
3171 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
3172 (create_real_tinfo_var): Add non_public parameter. Use it.
3173 Push proxy into global namespace.
3174 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
3175 New enumeration.
3176 * inc/typeinfo (type_info::before, type_info::operator==):
3177 Compare __name addresses.
3178
3179 * tinfo2.cc: Remove new-abi builtins comment.
3180
3181 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
3182
3183 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
3184
3185 * call.c (joust): Exit early if we get the same function, too.
3186
3187 * decl2.c (key_method): Return NULL_TREE for template classes.
3188 (import_export_class): Don't need to check for template classes.
3189
3190 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
3191
3192 * lex.c: Remove references to cccp.c.
3193
3194 2000-04-18 Mark Mitchell <mark@codesourcery.com>
3195
3196 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
3197 volatile_memfunc. Add destructor_attr. Adjust dummy.
3198 (DECL_DESTRUCTOR_P): Use destructor_attr.
3199 (DECL_CONST_MEMFUNC_P): Reimplement.
3200 (DECL_VOLATILE_MEMFUNC_P): Remove.
3201 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
3202 (overrides): Use DECL_DESTRUCTOR_P.
3203 (check_for_override): Likewise.
3204 * decl.c (start_function): Likewise.
3205 * decl2.c (grokfclassfn): Likewise.
3206 (check_classfn): Likewise.
3207 (grok_function_init): Likewise.
3208
3209 2000-04-17 Mark Mitchell <mark@codesourcery.com>
3210
3211 * decl2.c (grokfield): Issue error on illegal data member
3212 declaration.
3213
3214 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
3215
3216 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
3217
3218 2000-04-16 Mark Mitchell <mark@codesourcery.com>
3219
3220 * class.c (build_vtable_entry): Don't build thunks for type-info
3221 functions.
3222
3223 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
3224
3225 * decl.c (decls_match): Allow a redeclaration of a builtin to
3226 specify args while the builtin did not.
3227
3228 2000-04-15 Mark Mitchell <mark@codesourcery.com>
3229
3230 * cp-tree.def (THUNK_DECL): Add to documentation.
3231 * cp-tree.h (flag_huge_objects): Declare.
3232 * class.c (modify_vtable_entry): Tidy.
3233 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
3234 Calculate delta appropriately for the new ABI.
3235 (dfs_modify_vtables): Use it.
3236 (modify_all_vtables): Fix thinko in code to add overriding copies
3237 of functions to primary vtables.
3238 (build_clone): Fix typo in comment.
3239 (clone_function_decl): Correct order of destructors in vtable.
3240 (build_vbase_offset_vtbl_entries): Adjust comment.
3241 (dfs_vcall_offset_queue_p): Remove.
3242 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
3243 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
3244 (build_vtable_entry): Correct check for pure virtual functions.
3245 Don't declare flag_huge_objects.
3246 * decl.c (flag_huge_objects): Remove declaration.
3247 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
3248 Use int_size_in_bytes.
3249 (emit_thunk): Handle vcall offset thunks.
3250
3251 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3252
3253 * decl2.c (parse_time, varconst_time): Delete declarations.
3254 (finish_file): Delete LINENO declaration.
3255 START_TIME and THIS_TIME now long.
3256
3257 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
3258
3259 * class.c (build_base_field): Reformat comment.
3260
3261 * inc/cxxabi.h (stddef.h): Comment inclusion.
3262 (__base_class_info::__offset): Comment shift.
3263
3264 2000-04-12 Mark Mitchell <mark@codesourcery.com>
3265
3266 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
3267 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
3268 (cp_push_exception_identifier): New macro.
3269 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
3270 (DECL_BASE_DESTRUCTOR_P): Likewise.
3271 (DECL_DELETING_DESTRUCTOR_P): Likewise.
3272 (get_vtbl_decl_for_binfo): Fix formatting.
3273 (in_charge_arg_for_name): New macro.
3274 (maybe_build_cleanup_and_delete): Remove declaration.
3275 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
3276 (in_charge_arg_for_name): New function.
3277 (build_new_method_call): Use it. Handle cloned destructors.
3278 (build_clone): Don't make the base constructor virtual.
3279 Automatically defer generated functions.
3280 (clone_function_decl): Handle destructors, too.
3281 (clone_constructors_and_destructors): Likewise.
3282 (create_vtable_ptr): Don't create a vtable entry for a cloned
3283 function.
3284 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
3285 (initialize_predefined_identifiers): Update appropriately.
3286 (finish_destructor_body): Simplify.
3287 (maybe_build_cleanup_and_delete): Remove.
3288 * except.c (expand_throw): Handle new-ABI destructors.
3289 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
3290 (build_dtor_call): New function.
3291 (build_delete): Use it. Simplify.
3292 * optimize.c (maybe_clone_body): Handle destructors.
3293 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
3294
3295 * exception.cc (cleanup_fn): New typedef.
3296 (CALL_CLEANUP): New macro.
3297 (cp_eh_info): Use them.
3298 (__cp_push_exception): Likewise.
3299 (__cp_pop_exception): Likewise.
3300
3301 2000-04-11 Mark Mitchell <mark@codesourcery.com>
3302
3303 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
3304 (complete_dtor_identifier): New macro.
3305 (CLASSTYPE_FIRST_CONVERSION): Remove.
3306 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
3307 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
3308 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
3309 (CLASSTYPE_CONSTRUCTORS): Likewise.
3310 (CLASSTYPE_DESTRUCTORS): Likewise.
3311 (lang_decl): Add cloned_function.
3312 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
3313 (DECL_BASE_CONSTRUCTOR_P): Likewise.
3314 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
3315 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
3316 (DECL_CLONED_FUNCTION_P): Likewise.
3317 (DECL_CLONED_FUNCTION): Likewise.
3318 (clone_function_decl): Declare.
3319 (maybe_clone_body): Likewise.
3320 * call.c (build_user_type_conversion_1): Call complete object
3321 constructors in the new ABI.
3322 (build_new_method_call): Don't add in-charge parameters under the
3323 new ABI.
3324 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
3325 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
3326 CLASSTYPE_DESTRUCTOR_SLOT.
3327 (build_clone): New function.
3328 (clone_function_decl): Likewise.
3329 (clone_constructors_and_destructors): Likewise.
3330 (check_bases_and_members): Use it.
3331 * decl.c (iniitialize_predefined_identifiers): Initialize
3332 complete_dtor_identifier.
3333 (finish_function): Don't add extra code to a clone.
3334 (lang_mark_tree): Mark cloned_function.
3335 * decl2.c (mark_used): Don't bother trying to instantiate things
3336 we synthesized.
3337 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
3338 * method.c (set_mangled_name_for_decl): Don't treat clones as
3339 constructors.
3340 (synthesize_method): Sythesize cloned functions, not the clones.
3341 * optimize.c (inline_data): Update comment on ret_label.
3342 (remap_block): Don't assume DECL_INITIAL exists.
3343 (copy_body_r): Allow ret_label to be NULL.
3344 (maybe_clone_body): Define.
3345 * pt.c (tsubst_decl): Handle clones.
3346 (instantiate_clone): New function.
3347 (instantiate_template): Use it.
3348 (set_mangled_name_for_template_decl): Don't treat clones as
3349 constructors.
3350 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
3351 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
3352 * semantics.c (expand_body): Clone function bodies as necessary.
3353
3354 * optimize.c (remap_decl): Avoid sharing structure for arrays
3355 whose size is only known at run-time.
3356 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
3357
3358 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
3359 to has_in_charge_parm_p.
3360 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
3361 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
3362 (DECL_COPY_CONSTRUCTOR_P): New macro.
3363 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
3364 (build_user_type_conversion_1): Likewise.
3365 (convert_like_real): Likewise.
3366 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
3367 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
3368 (copy_args_p): Likewise.
3369 (grok_ctor_properties): Likewise.
3370 (start_function): Likewise.
3371 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
3372 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
3373 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
3374 * method.c (do_build_copy_constructor): Use
3375 DECL_HAS_IN_CHARGE_PARM_P.
3376 (synthesize_method): Likewise.
3377 * pt.c (instantiate_template): Remove goto.
3378 * tree.c (build_cplus_method_type): Remove mention of obstacks in
3379 comment.
3380
3381 * cp-tre.h (finish_function): Change prototype.
3382 * decl.c (end_cleanup_fn): Adjust caller.
3383 (finish_function): Take only one parameter.
3384 * decl2.c (finish_objects): Adjust caller.
3385 (finish_static_storage_duration_function): Likewise.
3386 * method.c (emit_thunk): Likewise.
3387 * parse.y: Likewise.
3388 * parse.c: Regenerated.
3389 * pt.c (instantiate_decl): Likewise.
3390 * rtti.c (synthesize_tinfo_fn): Likewise.
3391 * semantics.c (expand_body): Likewise.
3392
3393 * cp-tree.h (copy_decl): New function.
3394 * class.c (finish_struct_1): Use it.
3395 * lex.c (copy_decl): Define it.
3396 * pt.c (tsubst_decl): Likewise.
3397 * tree.c (copy_template_template_parm): Likewise.
3398
3399 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
3400 has_nonpublic_assign_ref.
3401 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
3402 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
3403 * class.c (finish_struct_methods): Don't set
3404 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
3405 (interface_only): Don't declare.
3406 (interface_unknown): Likewise.
3407
3408 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3409
3410 * tree.h (HAVE_TEMPLATES): Remove definition.
3411 * lang-options.h (-fthis-is-variable): Remove documentation.
3412
3413 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
3414
3415 * class.c (instantiate_type): Handle object-relative template-id.
3416
3417 * semantics.c (finish_expr_stmt): Call convert_to_void here.
3418 * decl.c (cplus_expand_expr_stmt): Not here.
3419
3420 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
3421 Initialize exprtype earlier.
3422
3423 * parse.y (fn.def1): Check for defining types in return types.
3424
3425 * decl.c (check_tag_decl): Notice extra fundamental types.
3426 Diagnose empty decls in classes, too.
3427
3428 * decl.c (grokdeclarator): Don't override an anonymous name if no
3429 declarator was given.
3430
3431 * cvt.c (convert_to_void): Call resolve_offset_ref.
3432
3433 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
3434
3435 * decl2.c (decl_namespace): Handle getting a type.
3436
3437 * typeck.c (build_c_cast): Re-enable warning for cast between
3438 pointer and integer of different size.
3439
3440 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
3441
3442 * inc/cxxabi.h (__pointer_type_info): Add restrict and
3443 incomplete flags.
3444 (__pointer_type_info::__pointer_catch): New virtual function.
3445 (__pointer_to_member_type_info): Derive from
3446 __pointer_type_info. Adjust.
3447 (__pointer_to_member_type_info::__do_catch): Remove.
3448 (__pointer_to_member_type_info::__is_pointer_p): Declare.
3449 (__pointer_to_member_type_info::__pointer_catch): Declare.
3450 * rtti.c (qualifier_flags): Add restrict flag.
3451 (ptmd_initializer): Reorder members.
3452 (create_tinfo_types): Expand comments. Reorder
3453 ptmd_desc_type_node members.
3454 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
3455 Implement.
3456 (__pointer_type_info::__do_catch): Move specific code into
3457 __pointer_catch. Call it.
3458 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
3459 specific catch checking. Fix void conversion check.
3460 (__pointer_to_member_type_info::__do_catch): Remove.
3461 (__pointer_to_member_type_info::__pointer_catch): Implement.
3462
3463 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3464
3465 * lex.c (init_parse): Remove traces of classof and headof.
3466 * decl2.c (flag_operator_names): Default to 1.
3467 (lang_decode_option): Do not set it for -ansi.
3468
3469 2000-04-09 Mark Mitchell <mark@codesourcery.com>
3470
3471 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
3472 (DECL_MAIN_VARIANT): Remove.
3473 * decl.c (duplicate_decls): Don't set it.
3474 (start_function): Likewise.
3475 (lang_mark_tree): Don't mark it.
3476 * decl2.c (defer_fn): Don't use it.
3477 * lex.c (retrofit_lang_decl): Don't set it.
3478 * pt.c (tsubst_decl): Likewise.
3479 * ptree.c (print_lang_decl): Don't print it.
3480 * typeck.c (mark_addressable): Don't use it.
3481
3482 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
3483
3484 * vec.cc: Include <new> and <exception>.
3485 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
3486 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
3487 terminate.
3488 (__cxa_vec_delete): Catch dtor exceptions.
3489
3490 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
3491
3492 Prepend __ to implementation defined names.
3493 * inc/typeinfo (type_info): Rename _name to __name.
3494 (type_info::type_info): Rename parameter.
3495 (type_info::operator==, type_info::operator!=,
3496 type_info::before): Likewise.
3497 (type_info::is_pointer_p, type_info::is_function_p,
3498 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
3499 parameters.
3500 * inc/cxxabi.h
3501 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
3502 (__pointer_type_info::__pointer_type_info): Likewise.
3503 (__pointer_type_info::is_pointer_p,
3504 __pointer_type_info::do_catch): Prepend __. Rename parameters.
3505 (__array_type_info::__array_type_info): Rename parameters.
3506 (__function_type_info::__function_type_info): Likewise.
3507 (__function_type_info::is_function_p): Prepend __.
3508 (__enum_type_info::__enum_type_info): Rename parameters.
3509 (__pointer_to_member_type_info::__pointer_to_member_type_info):
3510 Likewise.
3511 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
3512 parameters.
3513 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
3514 (__class_type_info::__class_type_info): Rename parameters.
3515 (__class_type_info::sub_kind): Prepend __. Adjust member names.
3516 (__class_type_info::upcast_result,
3517 __class_type_info::dyncast_result): Prepend __. Move definition
3518 into tinfo.cc.
3519 (__class_type_info::do_upcast, __class_type_info::do_catch,
3520 __class_type_info::find_public_src,
3521 __class_type_info::do_dyncast,
3522 __class_type_info::do_find_public_src): Prepend __. Rename
3523 parameters.
3524 (__si_class_type_info::__si_class_type_info): Rename parameters.
3525 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
3526 __si_class_type_info::do_find_public_src): Prepent __. Rename
3527 parameters.
3528 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
3529 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
3530 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
3531 parameters.
3532 (__dynamic_cast): Rename parameters.
3533 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
3534 type_info::do_catch, type_info::do_upcast): Prepend __.
3535 (contained_p, public_p, virtual_p, contained_public_p,
3536 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
3537 (__class_type_info::do_catch,
3538 __class_type_info::do_upcast): Prepend __. Adjust.
3539 (__class_type_info::__upcast_result,
3540 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
3541 Adjust.
3542 (__class_type_info::find_public_src): Prepend __. Adjust.
3543 (__class_type_info::do_find_public_src,
3544 __si_class_type_info::do_find_public_src,
3545 __vmi_class_type_info::do_find_public_src): Likewise.
3546 (__class_type_info::do_dyncast,
3547 __si_class_type_info::do_dyncast,
3548 __vmi_class_type_info::do_dyncast): Likewise.
3549 (__class_type_info::do_upcast,
3550 __si_class_type_info::do_upcast,
3551 __vmi_class_type_info::do_upcast): Likewise.
3552 (__dynamic_cast): Adjust.
3553 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
3554 (__function_type_info::is_function_p): Likewise.
3555 (__pointer_type_info::do_catch): Likewise. Adjust.
3556 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
3557 (__throw_type_match_rtti_2): Adjust.
3558 (__is_pointer): Adjust.
3559
3560 2000-04-08 Mark Mitchell <mark@codesourcery.com>
3561
3562 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
3563 (complete_ctor_identifier): New macro.
3564 (special_function_kind): Add sfk_copy_constructor and
3565 sfk_assignment_operator.
3566 (LOOKUP_HAS_IN_CHARGE): Remove.
3567 (cons_up_default_function): Rename to ...
3568 (implicitly_declare_fn): ... this.
3569 * call.c (build_new_method_call): Add in-charge parameters for
3570 constructors here.
3571 * class.c (add_implicitly_declared_members): Change parameter name
3572 from cant_have_assignment to cant_have_const_assignment.
3573 Replace calls to cons_up_default_function to implicitly_declare_fn.
3574 * cvt.c (ocp_convert): Use complete_ctor_identifier.
3575 * decl.c (initialize_predefined_identifiers): Initialize it.
3576 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
3577 complex expression.
3578 * init.c (expand_default_init): Don't calculate the in-charge
3579 parameter here.
3580 (build_new_1): Likewise.
3581 * lex.c (cons_up_default_function): Move to method.c.
3582 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
3583 (implicitly_declare_fn): New function.
3584 * typeck.c (build_static_cast): Use complete_ctor_identifier.
3585 (build_modify_expr): Likewise.
3586 * typeck2.c (build_functional_cast): Likewise.
3587
3588 Under the new ABI, constructors don't return `this'.
3589 * cp-tree.h (warn_reorder): Declare.
3590 (special_function_kind): New enum.
3591 (global_base_init_list): Remove declaration.
3592 (emit_base_init): Don't return a value.
3593 (check_base_init): Don't declare.
3594 (is_aggr_typedef): Likewise.
3595 * decl.c (check_special_function_return_type): New function.
3596 (return_types): Remove.
3597 (grokdeclarator): Use check_special_function_return_type.
3598 (start_function): Don't initialize ctor_label under the new ABI.
3599 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
3600 * init.c (begin_init_stmts): Move to top of file.
3601 (finish_init_stmts): Likewise.
3602 (warn_reorder): Don't declare.
3603 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
3604 value.
3605 (check_base_init): Remove.
3606 (is_aggr_typedef): Likewise.
3607 (build_new_1): Don't use the return value of a constructor.
3608 * semantics.c (setup_vtbl_ptr): Don't use the return value
3609 of emit_base_init.
3610 * typeck.c (check_return_expr): Don't magically convert return
3611 statements into `return this' in constructors under the new ABI.
3612
3613 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
3614 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
3615 (base_ctor_identifier): New macro.
3616 (base_dtor_identifier): Likewise.
3617 (deleting_dtor_identifier): Likewise.
3618 * decl.c: Don't include obstack.h.
3619 (obstack_chunk_alloc): Don't define.
3620 (obstack_chunk_free): Likewise.
3621 (struct predefined_identifier): New type.
3622 (initialize_predefined_identifiers): New function.
3623 (init_decl_processing): Use it.
3624 (debug_temp_inits): Remove.
3625 (start_method): Don't call preserve_data.
3626 (hack_incomplete_structures): Update comment.
3627 * init.c (init_init_processing): Don't initialize
3628 nelts_identifier.
3629 (build_offset_rf): Remove dead code.
3630 (build_delete): Use CLASSTYPE_N_BASECLASSES.
3631 * search.c (init_search_processing): Don't initialize
3632 vptr_identifier.
3633
3634 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3635
3636 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
3637 some sign_compare warnings.
3638
3639 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3640
3641 Rename abi::__vmi_class_type_info members.
3642 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
3643 base_list, detail_masks members to vmi_flags, vmi_base_count,
3644 vmi_bases and vmi_flags_masks respectively.
3645 (__vmi_class_type_info::vmi_flags_masks): Rename
3646 details_unknown_mask to flags_unknown_mask.
3647 * tinfo.cc (__class_type_info::do_upcast): Adjust.
3648 (__vmi_class_type_info::do_find_public_src): Adjust.
3649 (__vmi_class_type_info::do_dyncast): Adjust.
3650 (__vmi_class_type_info::do_upcast): Adjust.
3651
3652 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3653
3654 * tinfo.cc (convert_to_base): New function.
3655 (get_vbase_offset): Remove. Move into convert_to_base.
3656 (__vmi_class_type_info::do_find_public_src): Adjust.
3657 (__vmi_class_type_info::do_dyncast): Adjust.
3658 (__vmi_class_type_info::do_upcast): Adjust.
3659
3660 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
3661
3662 * tinfo.cc (operator=): Use __builtin_strcmp.
3663 * tinfo2.cc (before): Likewise.
3664
3665 2000-04-06 Mark Mitchell <mark@codesourcery.com>
3666
3667 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
3668 (DECL_SAVED_INLINE): Rename to ...
3669 (DECL_DEFERRED_FN): ... this.
3670 (in_function_p): Remove declaration.
3671 (mark_inline_for_output): Rename to ...
3672 (defer_fn): ... this.
3673 * decl.c (finish_function): Adjust call to mark_inline_for_output.
3674 (in_function_p): Remove definition.
3675 * decl2.c (saved_inlines): Rename to ...
3676 (deferred_fns): ... this.
3677 (saved_inlines_used): Rename to ...
3678 (deferred_fns_used): ... this.
3679 (mark_inline_for_output): Rename to ...
3680 (defer_fn): ... this.
3681 (finish_file): Adjust accordingly.
3682 (init_decl2): Likewise.
3683 * lex.c (cons_up_default_function): Likewise.
3684 * pt.c (mark_decl_instantiated): Likewise.
3685 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
3686 circumstances.
3687 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
3688 * semantics.c (expand_body): Defer more functions.
3689
3690 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
3691
3692 * vec.cc: New file.
3693 * Make-lang.in (CXX_LIB2FUNCS): Add it.
3694 (vec.o): Build it.
3695 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3696 __cxa_vec_delete): Declare.
3697
3698 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
3699
3700 * rtti.c (dfs_class_hint_mark): New static function.
3701 (dfs_class_hint_unmark): New static function.
3702 (class_hint_flags): Use them.
3703
3704 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
3705
3706 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
3707
3708 2000-04-05 Mark Mitchell <mark@codesourcery.com>
3709
3710 * cp-tree.h (instantiate_decl): Change prototype.
3711 * decl2.c (mark_used): Adjust call.
3712 * optimize.c (inlinable_function_p): Adjust handling of templates.
3713 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
3714 (do_type_instantiation): Likewise.
3715 (instantiate_decl): Defer more templates.
3716 (instantiate_pending_templates): Adjust logic to handle inline
3717 friend functions.
3718
3719 * Makefile.in (GGC_H): New variable. Use it throughout in place
3720 of ggc.h.
3721
3722 * call.c: Don't include obstack.h. Include ggc.h.
3723 (obstack_chunk_alloc): Don't define.
3724 (obstack_chunk_free): Likewise.
3725 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
3726 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
3727 (pop_switch): Free it.
3728
3729 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
3730
3731 * dump.c (dequeue_and_dump): Don't try to print the bit_position
3732 if we don't have a DECL_FIELD_OFFSET.
3733
3734 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
3735
3736 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
3737 special_function_p.
3738
3739 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3740
3741 * cfns.gperf (hash, libc_name_p): Prototype.
3742
3743 * rtti.c (build_dynamic_cast_1): Constification.
3744
3745 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
3746
3747 * semantics.c (deferred_type_access_control): Prototype.
3748
3749 2000-04-04 Mark Mitchell <mark@codesourcery.com>
3750
3751 Correct many new ABI issues regarding vbase and vcall offset
3752 layout.
3753 * cp-tree.h (BINFO_VTABLE): Document.
3754 (struct lang_type): Tweak formatting.
3755 (BINFO_PRIMARY_BINFO): Add to documentation.
3756 (CLASSTYPE_VSIZE): Fix typo in comment.
3757 (CLASSTYPE_VBASECLASSES): Update documentation.
3758 (BINFO_VBASE_MARKED): Remove.
3759 (SET_BINFO_VBASE_MARKED): Likewise.
3760 (CLEAR_BINFO_VBASE_MARKED): Likewise.
3761 (BINFO_FIELDS_MARKED): Remove.
3762 (SET_BINFO_FIELDS_MARKED): Likewise.
3763 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
3764 (enum access_kind): New enumeration.
3765 (num_extra_vtbl_entries): Remove declaration.
3766 (size_extra_vtbl_entries): Likewise.
3767 (get_vtbl_decl_for_binfo): New function.
3768 (dfs_vbase_unmark): Remove declaration.
3769 (mark_primary_bases): Likewise.
3770 * class.c (SAME_FN): Remove.
3771 (struct vcall_offset_data_s): Move definition.
3772 (build_vbase_pointer): Use `build', not `build_binary_op', to
3773 access the vbase pointer under the new ABI.
3774 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
3775 (build_primary_vtable): Likewise.
3776 (dfs_mark_primary_bases): Move here from search.c.
3777 (mark_primary_bases): Likewise.
3778 (determine_primary_bases): Under the new ABI, don't make a base
3779 class a primary base just because we don't yet have any virtual
3780 functions.
3781 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
3782 (num_vfun_entries): Remove.
3783 (dfs_count_virtuals): Likewise.
3784 (num_extra_vtbl_entries): Likewise.
3785 (size_extra_vtbl_entries): Likewise.
3786 (layout_virtual_bases): Iterate in inheritance graph order under
3787 the new ABI.
3788 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
3789 indicate that a vfield is present.
3790 (init_class_processing): Initialize access_public_node, etc., from
3791 ak_public, etc.
3792 (get_vtbl_decl_for_binfo): New function.
3793 (dump_class_hierarchy_r): Likewise.
3794 (dump_class_hierarchy): Use it.
3795 (finish_vtbls): Build the vtbls in inheritance graph order.
3796 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
3797 (initialize_vtable): Use get_vtbl_decl_for_binfo.
3798 (accumulate_vtbl_inits): Add comments explaining why a pre-order
3799 walk is required.
3800 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
3801 where the vptr points, even for primary vtables.
3802 (build_vtbl_initializer): Adjust handling of vbase and vcall
3803 offsets.
3804 (build_vcall_and_vbase_vtable_entries): New function.
3805 (dfs_build_vbase_offset_vtbl_entries): Remove.
3806 (build_vbase_offset_vtbl_entries): Reimplement.
3807 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
3808 were already handled in a primary base class vtable.
3809 (build_vcall_offset_vtbl_entries): Adjust.
3810 (build_rtti_vtbl_entries): Adjust.
3811 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
3812 * init.c (expand_virtual_init): Simplify.
3813 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
3814 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
3815 * search.c (BINFO_ACCESS): New macro.
3816 (SET_BINFO_ACCESS): Likewise.
3817 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
3818 (access_in_type): Likewise.
3819 (dfs_accessible_p): Likewise.
3820 (protected_accessible_p): Likewise.
3821 (lookup_fnfields_1): Adjust documentation.
3822 (dfs_mark_primary_bases): Move to class.c
3823 (mark_primary_bases): Likewise.
3824 (dfs_vbase_unmark): Remove.
3825 (virtual_context): Use BINFO_FOR_VBASE.
3826 (dfs_get_vbase_types): Simplify.
3827 (dfs_build_inheritance_graph_order): New function.
3828 (get_vbase_types): Use it.
3829 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
3830
3831 * tinfo.cc (get_vbase_offset): New function.
3832 (__vmi_class_type_info::do_find_public_src): Use it.
3833 (__vmi_class_type_info::do_dyncast): Likewise.
3834 (__vmi_class_type_info::do_upcast): Likewise.
3835
3836 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
3837
3838 * lang-specs.h: Pass -fno-show-column to the preprocessor.
3839
3840 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
3841
3842 * rtti.c (class_hint_flags): Rename flags.
3843 (class_initializer): Remove flags.
3844 (synthesize_tinfo_var): Combine offset and flags. Add flags
3845 for __vmi_class_type_info.
3846 (create_tinfo_types): Remove flags from __class_type_info and
3847 __si_class_type_info. Merge flags and offset from
3848 base_class_type_info.
3849 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
3850 (__base_class_info::is_virtual_p): Adjust.
3851 (__base_class_info::is_public_p): Adjust.
3852 (__base_class_info::offset): New accessor.
3853 (__class_type_info::details): Remove member.
3854 (__class_type_info::__class_type_info): Lose details.
3855 (__class_type_info::detail_masks): Remove.
3856 (__si_class_type_info::__si_class_type_info): Lose details.
3857 (__vmi_class_type_info::details): New member.
3858 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
3859 (__vmi_class_type_info::detail_masks): New member.
3860 * tinfo.cc (__class_type_info::do_upcast): Initialize result
3861 with unknown_details_mask.
3862 (__vmi_class_type_info::do_find_public_src): Adjust
3863 (__vmi_class_type_info::do_dyncast): Adjust.
3864 (__vmi_class_type_info::do_upcast): Set result details, if
3865 needed. Adjust.
3866 (__dynamic_cast): Temporarily #if out optimization.
3867
3868 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
3869
3870 * rtti.c (get_tinfo_decl): Mark used.
3871 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
3872 mark as dealt with, if we output it.
3873
3874 2000-03-28 Mark Mitchell <mark@codesourcery.com>
3875
3876 * class.c: Reorganize to put virtual function table initialization
3877 machinery at the end of the file.
3878
3879 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
3880
3881 * class.c (finish_struct): Use bitsize_zero_node.
3882 * pt.c (instantiate_class_template): Likewise.
3883
3884 2000-03-28 Mark Mitchell <mark@codesourcery.com>
3885
3886 Put RTTI entries at negative offsets in new ABI.
3887 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
3888 vbase offset at index -3, not -1.
3889 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
3890 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
3891 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
3892 (build_rtti_vtbl_entries): New function.
3893 (set_rtti_entry): Remove.
3894 (build_primary_vtable): Don't use it.
3895 (build_secondary_vtable): Likewise.
3896 (start_vtable): Remove.
3897 (first_vfun_index): New function.
3898 (set_vindex): Likewise.
3899 (add_virtual_function): Don't call start_vtable. Do call
3900 set_vindex.
3901 (set_primary_base): Rename parameter.
3902 (determine_primary_base): Likewise.
3903 (num_vfun_entries): Don't use skip_rtti_stuff.
3904 (num_extra_vtbl_entries): Include RTTI information.
3905 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
3906 (skip_rtti_stuff): Remove.
3907 (dfs_modify_vtables): Don't use it.
3908 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
3909 (layout_nonempty_base_or_field): Update size handling.
3910 (create_vtable_ptr): Tweak.
3911 (layout_class_type): Adjust parameter names.
3912 (finish_struct_1): Simplify.
3913 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
3914 (skip_rtti_stuff): Remove.
3915 (first_vfun_index): New function.
3916 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3917 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
3918 (marked_vtable_pathp): Declare.
3919 (unmarked_vtable_pathp): Likewise.
3920 * error.c (dump_expr): Use first_vfun_index to calculate vtable
3921 offsets.
3922 * rtti.c (build_headof): Look for RTTI at negative offsets.
3923 (get_tinfo_decl_dynamic): Likewise.
3924 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
3925 here.
3926 (create_pseudo_type_info): Do it here instead. Adjust so that
3927 vptr points at first virtual function.
3928 * search.c (marked_vtable_pathp): Make it global.
3929 (unmarked_vtable_pathp): Likewise.
3930 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3931 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3932 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
3933 (get_pure_virtuals): Likewise.
3934 (expand_upcast_fixups): Likewise.
3935 * tree.c (debug_binfo): Likewise.
3936 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
3937 negative offset.
3938
3939 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3940
3941 * class.c (check_field_decl): Fix typo.
3942 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
3943 (check_methods): Likewise.
3944 (check_field_decls): Likewise.
3945 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
3946 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
3947 Use DECL_RESULT_FLD, not DECL_RESULT.
3948 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
3949 * lex.c (identifier_type): Likewise.
3950 * pt.c (determine_specialization, lookup_template_class): Likewise.
3951 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
3952 (resolve_overloaded_unification, more_specialized): Likewise.
3953 * semantics.c (finish_member_declaration): Likewise.
3954 * typeck.c (build_x_function_call): Likewise.
3955
3956 2000-03-26 Mark Mitchell <mark@codesourcery.com>
3957
3958 * class.c (layout_empty_base): Handle empty bases with non-byte
3959 alignment.
3960 (build_base_field): Likewise.
3961 (layout_virtual_bases): Likewise.
3962
3963 * class.c (finish_struct_1): Fix typo in this change:
3964
3965 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3966
3967 2000-03-25 Mark Mitchell <mark@codesourcery.com>
3968
3969 * decl.c (grokdeclarator): Count partial specializations when
3970 keeping track of how many template classes have been seen.
3971
3972 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
3973
3974 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3975
3976 * class.c (build_vbase_pointer_fields): layout_field now place_field.
3977 (get_vfield_offset): Use byte_position.
3978 (set_rtti_entry): Set OFFSET to ssizetype zero.
3979 (get_binfo_offset_as_int): Deleted.
3980 (dfs_record_base_offsets): Use tree_low_cst.
3981 (dfs_search_base_offsets): Likewise.
3982 (layout_nonempty_base_or_field): Reflect changes in RLI format
3983 and call byte_position.
3984 (layout_empty_base): Convert offset to ssizetype.
3985 (build_base_field): use rli_size_unit_so_far.
3986 (dfs_propagate_binfo_offsets): Do computation in proper type.
3987 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
3988 (layout_class_type): Reflect changes in RLI names and fields.
3989 (finish_struct_1): Set DECL_FIELD_OFFSET.
3990 * dump.c (dequeue_and_dump): Call bit_position.
3991 * expr.c (cplus_expand_constant): Use byte_position.
3992 * rtti.c (expand_class_desc): Use bitsize_one_node.
3993 * typeck.c (build_component_addr): Use byte_position and don't
3994 special case for zero offset.
3995
3996 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
3997
3998 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
3999
4000 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
4001 tinfo object.
4002 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
4003 vtable.
4004
4005 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4006
4007 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
4008 DECL_P macros.
4009 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
4010 make_typename_type, check_initializer, cp_finish_decl,
4011 xref_tag): Likewise.
4012 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
4013 decl_namespace, arg_assoc_template_arg, arg_assoc,
4014 validate_nonmember_using_decl, do_class_using_decl): Likewise.
4015 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
4016 args_to_string): Likewise.
4017 * friend.c (is_friend): Likewise.
4018 * lex.c (note_got_semicolon, note_list_got_semicolon,
4019 is_global): Likewise.
4020 * method.c (build_overload_nested_name, build_overload_value,
4021 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
4022 * parse.y (typename_sub, typename_sub1): Likewise.
4023 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
4024 process_partial_specialization, convert_template_argument,
4025 template_args_equal, add_pending_template, lookup_template_class,
4026 for_each_template_parm_r, maybe_fold_nontype_arg,
4027 tsubst, instantiate_template, type_unification_real, unify,
4028 instantiate_pending_templates, set_mangled_name_for_template_decl):
4029 Likewise.
4030 * repo.c (repo_get_id, repo_template_used): Likewise.
4031 * search.c (lookup_field_1): Likewise.
4032 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
4033 * xref.c (classname): Likewise.
4034
4035 2000-03-22 Mark Mitchell <mark@codesourcery.com>
4036
4037 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
4038 (CANONICAL_BINFO): New macro.
4039 (BINFO_NEW_VTABLE_MARKED): Use it.
4040 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
4041 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
4042 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
4043 not TREE_TYPE.
4044 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4045 (build_secondary_vtable): Likewise.
4046 (dfs_finish_vtbls): Likewise.
4047 (dfs_accumulate_vtbl_inits): Likewise.
4048 (accumulate_vtbl_inits): New function.
4049 (finish_vtbls): Make sure that virtual bases come after
4050 non-virtual bases in the vtable group.
4051 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
4052 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4053 * search.c (struct vbase_info): Move definition.
4054 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4055 (unmarked_new_vtable_p): Likewise.
4056 (dfs_mark_vtable_path): Remove.
4057 (dfs_mark_new_vtable): Remove.
4058 (dfs_unmark_new_vtable): Likewise.
4059 (dfs_clear_search_slot): Likewise.
4060 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4061 (dfs_clear_vbase_slots): Likewise.
4062 (init_vbase_pointers): LIkewise.
4063
4064 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
4065
4066 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
4067 SIZETYPE to a non-SIZETYPE.
4068
4069 2000-03-21 Mark Mitchell <mark@codesourcery.com>
4070
4071 * class.c (layout_virtual_bases): Adjust names in conditionally
4072 compiled code.
4073
4074 * class.c (record_base_offsets): New function.
4075 (layout_conflict_p): Likewise.
4076 (layout_nonempty_base_or_field): Use it.
4077 (layout_empty_base): New function.
4078 (build_base_field): Use it.
4079 (build_base_fields): Update comment.
4080 (layout_virtual_bases): Fold in a little code form
4081 layout_basetypes. Use layout_empty_base.
4082 (layout_basetypes): Remove.
4083 (end_of_class): New function.
4084 (layout_class_type): Use it. Adjust.
4085
4086 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
4087 (fntype_p): Remove.
4088 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
4089 comment.
4090 (dfs_skip_nonprimary_vbases_markedp): Likewise.
4091 * typeck.c (fntype_p): Remove.
4092
4093 * cp-tree.h (TI_SPEC_INFO): Remove.
4094 (CLASSTYPE_TI_SPEC_INFO): Likewise.
4095 * pt.c (process_partial_specialization): Likewise.
4096
4097 * class.c (build_base_field): Fix thinko in computation of binfo
4098 offsets.
4099
4100 * tree.c (mark_local_for_remap_p): Mark variables declared in
4101 TARGET_EXPRs as well.
4102
4103 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
4104
4105 * typeck.c (require_complete_type, complete_type,
4106 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
4107 build_array_ref, convert_arguments, pointer_diff,
4108 build_x_unary_op, build_unary_op, build_c_cast,
4109 build_modify_expr): Use COMPLETE_TYPE_P etc.
4110 * call.c (is_complete, convert_like_real,
4111 build_new_method_call): Likewise.
4112 * class.c (build_vbase_pointer_fields, check_bases,
4113 build_base_field, finish_struct_1, pushclass): Likewise.
4114 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
4115 * decl.c (maybe_process_template_type_declaration, pushtag,
4116 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
4117 layout_var_decl, check_initializer, cp_finish_decl,
4118 grokdeclarator, require_complete_types_for_parms,
4119 grok_op_properties, xref_tag, xref_basetypes,
4120 check_function_type): Likewise.
4121 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
4122 * friend.c (do_friend): Likewise.
4123 * init.c (build_offset_ref): Likewise.
4124 * parse.y (structsp): Likewise.
4125 * pt.c (maybe_process_partial_specialization,
4126 tsubst_friend_function, instantiate_class_template, tsubst,
4127 do_type_instantiation, instantiate_pending_templates): Likewise.
4128 * repo.c (repo_get_id): Likewise.
4129 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
4130 synthesize_tinfo_var, emit_support_tinfos): Likewise.
4131 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
4132 * semantics.c (begin_class_definition): Likewise.
4133 * tree.c (build_cplus_method_type): Likewise.
4134 * typeck2.c (digest_init, build_functional_cast,
4135 add_exception_specifier): Likewise.
4136 * parse.h, parse.c: Regenerated.
4137
4138 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
4139
4140 * inc/cxxabi.h: New header file. Define new-abi entry points.
4141 (__pointer_type_info::target): Rename member to ...
4142 (__pointer_type_info::type): ... here.
4143 (__base_class_info::type): Rename member to ...
4144 (__base_class_info::base): ... here.
4145 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
4146 * cp-tree.h (CPTI_ABI): New global tree enumeration.
4147 (abi_node): New global tree node.
4148 * decl.c (abi_node): Document.
4149 (init_decl_processing): Initialize abi_node.
4150 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
4151 (get_vmi_pseudo_type_info): Likewise.
4152 (create_tinfo_types): Likewise.
4153 (emit_support_tinfos): Likewise.
4154 * tinfo.h (cxxabi.h): Include for new-abi.
4155 Move rtti class definitions to new header file.
4156 * tinfo.cc (abi): Use the namespace.
4157 (std): Move new abi rtti classes from here ...
4158 (__cxxabiv1): ... to here.
4159 * tinfo2.cc (cxxabi.h): Include for new-abi.
4160 Move rtti class definitions to new header file.
4161 (std): Move new abi rtti classes from here ...
4162 (__cxxabiv1): ... to here.
4163 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
4164 namespace.
4165
4166 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
4167 Jason Merrill <jason@casey.cygnus.com>
4168
4169 * method.c (build_overload_int): Use host_integerp.
4170
4171 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4172
4173 * init.c (build_offset_ref): Handle the case of a templated member
4174 function.
4175
4176 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4177
4178 * except.c (expand_exception_blocks): Clear catch_clauses_last.
4179
4180 2000-03-18 Mark Mitchell <mark@codesourcery.com>
4181
4182 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
4183 * class.c (check_bitfield_decl): Turn illegal bitfields into
4184 non-bitfields.
4185 (dfs_propagate_binfo_offsets): Adjust for new size_binop
4186 semantics.
4187 (dfs_offset_for_unshared_vbases): Likewise.
4188 * cvt.c (cp_convert_to_pointer): Convert NULL to a
4189 pointer-to-member correctly under the new ABI.
4190 * expr.c (cplus_expand_constant): Don't use cp_convert when
4191 turning an offset into a pointer-to-member.
4192 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
4193 when dereferencing them under the new ABI.
4194 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
4195 of pointers-to-members under the new ABI.
4196
4197 * class.c (check_bitfield_decl): Remove restriction on really long
4198 bitfields.
4199 (layout_class_type): Implement new ABI handling of bitfields
4200 longer than their types.
4201
4202 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4203
4204 * parse.y (extdefs): Call ggc_collect.
4205 * parse.c: Regenerated.
4206
4207 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
4208
4209 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
4210 (note_name_declared_in_class): Use OVL_CURRENT to get at a
4211 potential overload.
4212
4213 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4214
4215 * class.c (build_vbase_path): Use integer_zerop.
4216 (build_vtable_entry): Use tree_low_cst.
4217 (get_vfield_offset): Use bit_position.
4218 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
4219 Use tree_low_cst.
4220 (check_bitfield_decl): Set DECL_SIZE using convert.
4221 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
4222 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
4223 Use tree_low_cst.
4224 (finish_struct_1): Use bit_position.
4225 (dump_class_hierarchy): Use tree_low_cst.
4226 * cp-tree.h (min_precision): Add declaration.
4227 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
4228 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
4229 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
4230 * expr.c (cplus_expand_constant): Use bit_position.
4231 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
4232 * rtti.c (get_base_offset): Use bit_position.
4233 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
4234 host_integerp, and tree_low_cst.
4235 (pointer_int_sum): Use integer_zerop.
4236 (build_component_addr): Use bit_position.
4237
4238 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
4239
4240 * typeck.c (require_complete_type): Don't assume size_zero_node.
4241 (complete_type_or_else): Likewise.
4242
4243 2000-03-16 Steven Grady <grady@digitaldeck.com>
4244 Jason Merrill <jason@casey.cygnus.com>
4245
4246 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
4247
4248 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
4249
4250 * decl2.c (grokfield): Bail out if type is error_mark_node.
4251
4252 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
4253
4254 * tinfo2.cc (__ptr_to_member_data): Rename to ...
4255 (__pointer_to_member_data): ... here. Adjust.
4256 * rtti.c (create_tinfo_types): Adjust.
4257
4258 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
4259
4260 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
4261 * decl.c (ref_desc_type_node): Undocument.
4262 * rtti.c (ptr_ref_initializer): Rename to ...
4263 (ptr_initializer): ... here. Adjust comments.
4264 (ptmd_initializer): Fix comment thinko.
4265 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
4266 (create_tinfo_types): Remove ref_desc_type_node init.
4267 * tinfo2.cc (__reference_type_info): Remove.
4268
4269 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
4270
4271 * decl.c (cp_finish_decl): Remove obsolete comment.
4272
4273 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
4274
4275 2000-03-14 Mark Mitchell <mark@codesourcery.com>
4276
4277 * cp-tree.h: Tweak documentation.
4278 * class.c (build_vbase_pointer_fields): Layout the fields, too.
4279 (avoid_overlap): Remove.
4280 (get_binfo_offset_as_int): New function.
4281 (dfs_serach_base_offsets): Likewise.
4282 (layout_nonempty_base_or_field): Likewise.
4283 (build_base_field): Layout fields here. Avoid placing two objects
4284 of the same type at the same address, under the new ABI.
4285 (build_base_fields): Adjust accordingly.
4286 (create_vtable_ptr): Return the new field, but don't attach it to
4287 TYPE_FIELDS.
4288 (remove_base_field): Remove.
4289 (remove_base_fields): Remove.
4290 (layout_basetypes): Adjust accordingly.
4291 (layout_class_type): Call layout_field for each field, rather than
4292 just making a wholesale call to layout_type.
4293
4294 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
4295
4296 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
4297
4298 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
4299
4300 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
4301
4302 * except.c (dtor_nothrow): New fn.
4303 (do_pop_exception): Use it. Take type parm.
4304 (push_eh_cleanup): Take type parm.
4305 (expand_start_catch_block): Pass it.
4306 (build_eh_type_type_ref): Accept null type.
4307
4308 2000-03-12 Mark Mitchell <mark@codesourcery.com>
4309
4310 * cp-tree.h (revert_static_member_fn): Change prototype.
4311 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
4312 (grok_op_properties): Likewise.
4313 (start_function): Likewise.
4314 (revert_static_member_fn): Simplify.
4315 * pt.c (check_explicit_specialization): Adjust call to
4316 revert_static_member_fn.
4317
4318 2000-03-11 Mark Mitchell <mark@codesourcery.com>
4319
4320 * cp-tree.h (scope_kind): New type.
4321 (tmpl_spec_kind): Likewise.
4322 (declare_pseudo_global_level): Remove.
4323 (pseudo_global_level_p): Rename to template_parm_scope_p.
4324 (pushlevel): Remove declaration.
4325 (begin_scope): New function.
4326 (finish_scope): Likewise.
4327 (current_tmpl_spec_kind): Likewise.
4328 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
4329 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
4330 Add template_spec_p.
4331 (toplevel_bindings_p): Adjust.
4332 (declare_pseudo_global_level): Remove.
4333 (pseudo_global_level_p): Rename to template_parm_scope_p.
4334 (current_tmpl_spec_kind): New function.
4335 (begin_scope): Likewise.
4336 (finish_scope): Likewise.
4337 (maybe_push_to_top_level): Adjust.
4338 (maybe_process_template_type_declaration): Likewise.
4339 (pushtag): Likewise.
4340 (pushdecl_nonclass_level): Likewise.
4341 (lookup_tag): Likewise.
4342 (grokfndecl): Handle member template specializations. Share
4343 constructor and non-constructor code.
4344 * decl2.c (check_classfn): Handle member template specializations.
4345 * pt.c (begin_template_parm_list): Use begin_scope.
4346 (begin_specialization): Likewise.
4347 (end_specialization): Likewise.
4348 (check_explicit_specialization): Use current_tmpl_spec_kind.
4349 Handle member template specializations.
4350 (end_template_decl): Use finish_scope. Remove call to
4351 get_pending_sizes.
4352 (push_template_decl_real): Remove bogus error message.
4353 (tsubst_decl): Fix typo in code contained in comment.
4354 (instantiate_template): Handle member template specializations.
4355 (most_general_template): Likewise.
4356
4357 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
4358
4359 * lex.c (whitespace_cr): Compress consecutive calls to warning().
4360 (do_identifier): Ditto for error().
4361
4362 * pt.c (convert_nontype_argument): Ditto for cp_error().
4363 (convert_template_argument): Ditto for cp_pedwarn().
4364
4365 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
4366
4367 * exception.cc (__check_null_eh_spec): New fn.
4368 * except.c (expand_end_eh_spec): Call it if the spec is throw().
4369
4370 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
4371
4372 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
4373 * except.c (expand_end_eh_spec): Add the return type.
4374 * rtti.c (throw_bad_cast): Add the parmtypes.
4375 (throw_bad_typeid): Likewise.
4376
4377 * semantics.c (expand_stmt): Only leave out rtl for unused
4378 artificials, and set DECL_IGNORED_P on them as well.
4379 * decl.c (wrapup_globals_for_namespace): Likewise.
4380
4381 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
4382
4383 * decl.c (maybe_commonize_var): Skip all artificial decls.
4384 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
4385
4386 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
4387
4388 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
4389 * cp-tree.h: Declare flag_enforce_eh_specs.
4390 * decl.c (store_parm_decls, finish_function): Check it.
4391
4392 C library functions don't throw.
4393 * Makefile.in (cfns.h): New target.
4394 (except.o): Depend on it.
4395 * Make-lang.in (cc1plus): Depend on cfns.gperf.
4396 * cfns.gperf: New file.
4397 * cfns.h: Generated.
4398 * except.c: Include it.
4399 (nothrow_libfn_p): New fn.
4400 * decl.c (grokfndecl): Use it.
4401 * cp-tree.h: Declare it.
4402
4403 * decl.c (push_overloaded_decl_1, auto_function,
4404 define_function): Lose.
4405 (build_library_fn_1): New static fn.
4406 (builtin_function): Use it.
4407 (get_atexit_node): Use build_library_fn_ptr.
4408 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
4409 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
4410 push_void_library_fn, push_throw_library_fn): New fns.
4411 * cp-tree.h: Declare them.
4412 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
4413 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
4414 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
4415 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
4416 * rtti.c (build_runtime_decl): Lose.
4417 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
4418 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
4419 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
4420
4421 * call.c (build_call): Remove result_type parm.
4422 Call mark_used on unused artificial fns.
4423 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
4424
4425 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
4426
4427 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
4428 appropriate.
4429 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
4430 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
4431 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
4432 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
4433 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4434 expand_generic_desc): Likewise.
4435
4436 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4437
4438 * exception.cc (__cp_pop_exception): Cleanup the original object.
4439
4440 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4441
4442 * decl.c (grok_op_properties): Merge conversion to void warning
4443 with other silly op warnings.
4444
4445 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
4446
4447 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
4448 array CONSTRUCTOR elements. Don't use expr_tree_cons.
4449
4450 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4451
4452 * decl.c (cp_make_fname_decl): New function.
4453 (wrapup_globals_for_namespace): Don't emit unused static vars.
4454 (init_decl_processing): Remove comment about use of
4455 array_domain_type. Set make_fname_decl.
4456 (cp_finish_decl): Remove __FUNCTION__ nadgering.
4457 * semantics.c (begin_compound_stmt): Remove
4458 current_function_name_declared flagging.
4459 (expand_stmt): Don't emit unused local statics.
4460 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
4461 specially.
4462
4463 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4464
4465 * typeck.c (convert_for_assignment): Don't look at array
4466 initializer.
4467 * call.c (convert_like_real): Likewise.
4468
4469 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
4470
4471 Add initial support for '\uNNNN' specifier.
4472 * lex.c (read_ucs): New fn.
4473 (readescape, skip_white_space): Call it.
4474 (is_extended_char, is_extended_char_1): New fns.
4475 (utf8_extend_token): New fn, #if 0'd out.
4476 (real_yylex): Treat extended chars like letters.
4477
4478 * search.c (note_debug_info_needed): Walk the bases even if we
4479 weren't deferring the type itself.
4480
4481 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4482
4483 * decl2.c (finish_objects): Constify a char*.
4484
4485 * method.c (emit_thunk): Likewise.
4486
4487 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
4488
4489 * typeck.c (dubious_conversion_warnings): Look through
4490 REFERENCE_TYPE.
4491
4492 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4493
4494 * class.c (dfs_modify_vtables): I is now unsigned.
4495 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
4496 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
4497 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
4498 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
4499 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
4500 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
4501 Call integer_all_onesp.
4502 * typeck2.c (process_init_constructor): Use compare_tree_int.
4503
4504 * lang-specs.h (as): Don't call if -syntax-only.
4505
4506 2000-03-06 Mark Mitchell <mark@codesourcery.com>
4507
4508 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
4509 RTL_EXPR_HAS_NO_SCOPE after all.
4510
4511 2000-03-05 Mark Mitchell <mark@codesourcery.com>
4512
4513 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
4514 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
4515 RTL_EXPR_HAS_NO_SCOPE.
4516
4517 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
4518 later.
4519
4520 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
4521
4522 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
4523
4524 * call.c (convert_like): Macrofy.
4525 (convert_like_with_context): New macro.
4526 (convert_like_real): Renamed from convert_like. Add calling
4527 context parameters, for diagnostics. Add recursive flag. Call
4528 dubious_conversion_warnings for outer conversion.
4529 (build_user_type_conversion): Use convert_like_with_context.
4530 (build_over_call): Likewise. Don't warn about dubious
4531 conversions here. Adjust convert_default_arg calls.
4532 (convert_default_arg): Add context parameters for diagnostics.
4533 Pass throught to convert_like_with_context.
4534 * cp-tree.h (convert_default_arg): Add context parameters.
4535 (dubious_conversion_warnings): Prototype new function.
4536 * typeck.c (convert_arguments): Adjust convert_default_arg call.
4537 (dubious_conversion_warnings): New function, broken
4538 out of convert_for_assignment.
4539 (convert_for_assignment): Adjust.
4540
4541 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
4542
4543 * decl2.c (key_method): Break out from...
4544 (import_export_vtable, import_export_class): ...here.
4545
4546 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
4547 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
4548
4549 * search.c (note_debug_info_needed, dfs_debug_mark,
4550 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
4551 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
4552
4553 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
4554
4555 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
4556 typos.
4557
4558 2000-03-02 Mark Mitchell <mark@codesourcery.com>
4559
4560 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
4561 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
4562 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
4563 (lang_type): Split gets_new into has_new and has_array_new.
4564 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4565 (TYPE_GETS_NEW): Split into ...
4566 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
4567 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
4568 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
4569 (build_op_new_call): Don't declare.
4570 (build_new_1): Likewise.
4571 * call.c (build_op_new_call): Remove.
4572 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4573 instead of TYPE_NEEDS_DESTRUCTOR.
4574 (finish_struct_bits): Likewise.
4575 (add_implicitly_declared_members): Likewise.
4576 (check_field_decl): Likewise.
4577 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
4578 correctly under the new ABI.
4579 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4580 instead of TYPE_NEEDS_DESTRUCTOR.
4581 (initialize_local_var): Likewise.
4582 (destroy_local_var): Likewise.
4583 (cp_finish_decl): Likewise.
4584 (register_dtor_fn): Likewise.
4585 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
4586 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
4587 TYPE_VEC_DELETE_TAKES_SIZE here.
4588 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
4589 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
4590 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4591 (finish_destructor_body): Likewise.
4592 (maybe_build_cleanup_1): Likewise.
4593 * decl2.c (do_static_destruction): Likewise.
4594 * init.c (build_new_1): Make it static.
4595 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4596 (expand_cleanup_for_base): Likewise.
4597 (get_cookie_size): New function.
4598 (build_new_1): Handle array-new cookies correctly under the new
4599 ABI.
4600 (build_vec_delete_1): Likewise.
4601 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4602 (build_delete): Likewise.
4603 (build_vec_delete): Handle array-new cookies correctly under the new
4604 ABI.
4605 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4606 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
4607 TYPE_HAS_ARRAY_NEW_OPERATOR.
4608 * ptree.c (print_lang_type): Check them.
4609 * search.c (context_for_name_lookup): Fix typo in comment.
4610 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4611 * tree.c (break_out_cleanups): Likewise.
4612 (build_cplus_array_test_1): Likewise.
4613 (cp_build_qualified_type_real): Likewise.
4614 * typeck.c (complete_type): Likewise.
4615
4616 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
4617 the command-line, not the end.
4618
4619 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
4620
4621 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
4622
4623 2000-03-02 Tom Tromey <tromey@cygnus.com>
4624
4625 * cp-tree.h (build_java_class_ref): Declare.
4626 * init.c (build_java_class_ref): No longer static.
4627 * except.c (expand_throw): Generate a Java-style `throw' if the
4628 thrown object is a "Java" object.
4629 (initialize_handler_parm): Generate a Java-style lookup of
4630 exception info if the caught object is a "Java" object.
4631 (catch_language, catch_language_init): New globals.
4632 (decl_is_java_type): New function.
4633 (expand_start_catch_block): Don't call push_eh_info() or
4634 push_eh_cleanup() when handling a Java-style "catch". Pass Java
4635 class reference to build_catch_block.
4636
4637 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4638
4639 * typeck.c (comptypes): Treat sizetype like its language equivalent.
4640
4641 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
4642
4643 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
4644 to merge reference/pointer code and fix incorrect warnings.
4645
4646 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
4647
4648 * search.c (protected_accessible_p): Use context_for_name_lookup.
4649
4650 * init.c (construct_virtual_bases): Fix thinko.
4651 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
4652
4653 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
4654
4655 * decl.c (current_function_decl): Move to toplev.c.
4656
4657 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
4658
4659 * pt.c (fn_type_unification): Unify return type, whenever
4660 provided.
4661 (get_bindings_real): Only pass return type when necessary.
4662 Remove explicit return type check.
4663 * class.c (resolve_address_of_overloaded_function): Pass desired
4664 return type to fn_type_unification.
4665
4666 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4667
4668 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
4669 DECL_FIELD_SIZE.
4670 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
4671 DECL_FIELD_SIZE.
4672 * rtti.c (expand_class_desc): Likewise.
4673 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
4674 (THUNK_VCALL_OFFSET): Likewise.
4675 (THUNK_DELTA): Reflect changes in ../tree.h.
4676
4677 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
4678
4679 * search.c (protected_accessible_p): Also allow the access if
4680 the member is public in DERIVED. Lose TYPE parm.
4681 (friend_accessible_p): Lose TYPE parm.
4682 (accessible_p): Adjust.
4683
4684 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4685
4686 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
4687 on things that are not sizes; ssize_binop deleted.
4688 Call size_diffop when appropriate.
4689 (dfs_build_vcall_offset_vtbl_entries): Likewise.
4690 (build_primary_vtable, build_secondary_vtable): Likewise.
4691 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
4692 Variable I is HOST_WIDE_INT.
4693 (get_vfield_offset): Pass proper types to size_binop.
4694 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
4695 (finish_struct_1): Likewise.
4696 (skip_rtti_stuff): Arg N is now pointer to signed.
4697 (layout_class_type): Use size_zero_node.
4698 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
4699 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
4700 * decl.c (complete_arry_type): Pass proper types to size_binop.
4701 (xref_basetypes): BINFO_OFFSET is sizetype.
4702 * error.c (dump_expr): Don't use size_binop non-sizes.
4703 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
4704 * init.c (construct_virtual_bases): Fix type error.
4705 (build_vec_delete_1): Pass proper type to size_binop and don't
4706 fold result.
4707 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
4708 * rtti.c (get_base_offset): Pass proper type to size_binop.
4709 * search.c (dfs_find_vbases): Fix type error.
4710 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
4711 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
4712 * tree.c (debug_binfo): Variable N is signed.
4713 Use HOST_WIDE_INT_PRINT_DEC.
4714 * typeck.c (comptypes): sizetype is same as equivalent integer type.
4715 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
4716 size_one_node and size_zero_node.
4717 (c_alignof): Use size_one_node.
4718 (build_component_addr): Pass proper types to size_binop.
4719 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
4720
4721 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
4722
4723 Implement class scope using-declarations for functions.
4724 * class.c (handle_using_decl): Call add_method for used functions.
4725 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
4726 (add_method): Used functions are hidden by local functions.
4727 (check_bases_and_members): Handle using-decls before finalizing
4728 CLASSTYPE_METHOD_VEC.
4729 * call.c (add_function_candidate): Add ctype parm; if non-zero,
4730 override the type of 'this' accordingly.
4731 (add_template_candidate, add_template_candidate_real): Add ctype parm.
4732 (convert_class_to_reference, build_user_type_conversion_1,
4733 build_new_function_call, build_object_call, build_new_op,
4734 build_new_method_call): Pass ctype parm.
4735
4736 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
4737 the baselink.
4738 * call.c (convert_class_to_reference, build_user_type_conversion_1,
4739 build_new_function_call, build_object_call, build_new_op,
4740 build_new_method_call, build_op_delete_call): Don't get basetype_path
4741 from a baselink.
4742 * typeck.c (build_component_ref): Likewise.
4743 * init.c (build_offset_ref): Likewise.
4744 (resolve_offset_ref): Don't call enforce_access.
4745 Call build_scoped_ref.
4746 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
4747 would cause an error or if -pedantic.
4748 * class.c (alter_access): Lose binfo parm.
4749
4750 2000-02-26 Mark Mitchell <mark@codesourcery.com>
4751
4752 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
4753 types.
4754
4755 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
4756
4757 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
4758 pseudo_type_info creation into the std namespace
4759
4760 2000-02-26 Mark Mitchell <mark@codesourcery.com>
4761
4762 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
4763 (import_export_class): Remove declaration.
4764 * decl2.c (import_export_class): Make it static.
4765 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
4766 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
4767 EXPR_WITH_FILE_LOCATION.
4768 * lex.c (check_newline): Tweak filename/lineno setting.
4769 * semantics.c (begin_while_stmt): Fix typo in comment.
4770
4771 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4772
4773 * lang-options.h (-fmessage-length=): Add missing option.
4774
4775 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
4776
4777 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
4778
4779 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
4780
4781 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
4782
4783 * optimize.c (expand_call_inline): Emit the return label before
4784 evaluating the return value.
4785
4786 2000-02-24 Mark Mitchell <mark@codesourcery.com>
4787
4788 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
4789 than duplicating functionality here.
4790 * optimize.c: Include input.h.
4791 (expand_call_inline): Use push_srcloc and pop_srcloc.
4792 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
4793 * parse.c: Regenerated.
4794 * Makefile.in (lex.o): Depend on input.h.
4795 (optimize.o): Likewise.
4796
4797 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
4798
4799 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
4800 function type, rather than ICE.
4801
4802 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
4803
4804 * decl.c (grokdeclarator): Call decl_type_access_control.
4805 * parse.y (parse_end_decl): Don't call decl_type_access_control if
4806 decl is null.
4807
4808 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
4809
4810 * decl.c (decls_match): Remove obsolete static member nadgering.
4811
4812 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4813
4814 * decl.c (grokdeclarator): Change ANSI to ISO.
4815 * lex.c (consume_string, readescape, do_identifier): Likewise.
4816 (parse_float, real_yylex): Likewise.
4817 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
4818 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
4819 new_type_id, maybe_label_decls, simple_stmt,
4820 for.init.statement): Likewise.
4821 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
4822 * semantics.c (finish_named_return_value): Likewise.
4823 * parse.c: Regenerate.
4824
4825 2000-02-21 Mark Mitchell <mark@codesourcery.com>
4826
4827 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
4828 (CPTI_CLASS_STAR_TYPE): Remove.
4829 (vtable_index_type): Likewise.
4830 (class_star_type_node): Remove.
4831 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
4832 (build_binary_op_nodefault): Remove.
4833 * call.c (build_new_op): Use build_binary_op instead of
4834 build_binary_op_nodefault.
4835 * decl.c (init_decl_processing): Remove class_star_type_node
4836 initialization. Make delta_type_node ptrdiff_type_node under the
4837 new ABI. Initialize vtable_index_type.
4838 (build_ptrmemfunc_type): Build different structures for the new
4839 ABI.
4840 (build_enumerator): Use build_binary_op instead of
4841 build_binary_op_nodefault.
4842 * method.c (build_overload_value): Mangle pointers-to-members
4843 appropriately under the new ABI.
4844 * typeck.c (build_array_ref): Use build_binary_op instead of
4845 build_binary_op_nodefault.
4846 (get_member_function_from_ptrfunc): Adjust for the new ABI.
4847 (build_binary_op_nodefault): Rename to ...
4848 (build_binary_op): ... this. Remove old version. Adjust for
4849 pointer-to-member comparisons under the new ABI.
4850 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
4851 (build_ptrmemfunc): Adjust for the new ABI.
4852 (expand_ptrmemfunc_cst): Likewise.
4853 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
4854 (pfn_from_ptrmemfunc): Adjust for the new ABI.
4855
4856 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
4857
4858 * call.c (build_object_call): Compress consecutive calls to
4859 cp_error.
4860 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
4861 (build_op_delete_call): Adjust message formatting.
4862
4863 * class.c (check_bases): Compress consecutive calls to
4864 cp_pedwarn.
4865 (finish_struct_anon): Say 'ISO C++'.
4866
4867 * decl.c (start_decl): Same here.
4868 (grok_reference_init): Likewise.
4869 (grokfndecl): Correct message formatting.
4870 (grokfndecl): Improve diagnostic.
4871 (check_static_variable_definition): Likewise. Say 'ISO C++'
4872 (compute_array_index_type): Say 'ISO C++'
4873 (create_array_type_for_decl): Compress consecutive calls to
4874 cp_error.
4875 (grokdeclarator): Say 'ISO C++'
4876 (grok_op_properties): Likewise.
4877
4878 * decl2.c (delete_sanity): Clairify diagnostic.
4879 (check_member_template): Same here.
4880 (grok_function_init): Use consistent terminology.
4881
4882 * expr.c (do_case): Say 'ISO C++'
4883
4884 * friend.c (do_friend): Compress consecutive calls to warning.
4885
4886 2000-02-20 Mark Mitchell <mark@codesourcery.com>
4887
4888 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
4889 * class.c (build_secondary_vtable): Reorganize. Don't create a
4890 new vtable under the new ABI.
4891 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
4892 computing the size.
4893 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
4894 the initializing elements.
4895 (initialize_vtable): New function.
4896 (dfs_finish_vtbls): Use it.
4897 (dfs_accumulate_vtbl_inits): New function.
4898 (finish_vtbls): Merge primary and secondary vtables under the new
4899 ABI.
4900 (finish_struct_1): Remove redundant call to layout_vtable_decl.
4901 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
4902 aren't VAR_DECLs.
4903
4904 * class.c (build_vtable): New function, split out from ...
4905 (get_vtable_decl): ... here, and ...
4906 (build_secondary_vtable): ... here.
4907
4908 * pt.c (tsubst_decl): Fix formatting.
4909
4910 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4911
4912 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
4913 (avoid_overlap, build_base_field): Likewise.
4914 (build_base_field, build_base_fields, is_empty_class):
4915 Test DECL_SIZE with integer_zero.
4916 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
4917 * cp-tree.h (struct lang_type): New field size_unit.
4918 (CLASSTYPE_SIZE_UNIT): New macro.
4919 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
4920 (cp_finish_decl): Delete -Wlarger-than processing.
4921 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
4922 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
4923 * tree.c (make_binfo): binfo vector is one entry longer.
4924 (walk_tree): Walk DECL_SIZE_UNIT.
4925
4926 2000-02-19 Mark Mitchell <mark@codesourcery.com>
4927
4928 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
4929 comment.
4930 (build_vtable_entry): Don't assume all vtable entries are
4931 functions.
4932 (build_vtbl_initializer): Adjust accordingly.
4933 (get_vtable_decl): Fix formatting.
4934
4935 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
4936
4937 * semantics.c (deferred_type_access_control): Walk the entire
4938 type_lookups list.
4939 (save_type_access_control): Rename from
4940 initial_deferred_type_access_control. Just remember the value.
4941 (decl_type_access_control): New fn.
4942 (begin_function_definition): Use deferred_type_access_control, after
4943 we've started the function. Set type_lookups to error_mark_node.
4944 * parse.y (frob_specs, fn.def1): Adjust.
4945 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
4946 (parse_end_decl, parse_bitfield0, parse_method): New fns.
4947 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
4948 (after_type_component_declarator0): Likewise.
4949 (after_type_component_declarator): Likewise.
4950 (notype_component_declarator): Likewise.
4951 * cp-tree.h: Adjust.
4952
4953 * decl.c (redeclaration_error_message): Allow redeclaration of
4954 namespace-scope decls.
4955
4956 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
4957
4958 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
4959
4960 2000-02-17 Mark Mitchell <mark@codesourcery.com>
4961
4962 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
4963 * decl2.c (grokclassfn): Likewise.
4964
4965 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
4966
4967 * decl2.c (lang_decode_option): Don't set default message length
4968 here.
4969 * lex.c (lang_init_options): Set it here.
4970
4971 2000-02-16 Mark Mitchell <mark@codesourcery.com>
4972
4973 Make DECL_CONTEXT mean the class in which a member function was
4974 declared, even for a virtual function.
4975 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
4976 (DECL_FRIEND_CONTEXT): New macro.
4977 (DECL_REAL_CONTEXT): Remove.
4978 (SET_DECL_FRIEND_CONTEXT): Likewise.
4979 (DECL_VIRTUAL_CONTEXT): Adjust.
4980 (DECL_CLASS_SCOPE_P): Use TYPE_P.
4981 (add_friends): Remove.
4982 (hack_decl_function_context): Likewise.
4983 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
4984 CP_DECL_CONTEXT.
4985 (build_over_call): Fix indentation. Use DECL_CONTEXT
4986 instead of DECL_CLASS_CONTEXT.
4987 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
4988 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4989 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4990 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
4991 (build_base_field): Likewise.
4992 (finish_struct_1): Likewise.
4993 (build_self_reference): Likewise.
4994 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
4995 DECL_REAL_CONTEXT.
4996 (pushtag): Use decl_function_context, not
4997 hack_decl_function_context.
4998 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4999 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
5000 (pushdecl): Remove bogus code.
5001 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
5002 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5003 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5004 Use decl_function_context, nothack_decl_function_context.
5005 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
5006 (grokdeclarator): Likewise. Use decl_function_context, not
5007 hack_decl_function_context.
5008 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
5009 (start_function): Use DECL_FRIEND_CONTEXT, not
5010 DECL_CLASS_CONTEXT. Use decl_function_context, not
5011 hack_decl_function_context.
5012 (finish_function): Use decl_function_context, not
5013 hack_decl_function_context.
5014 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
5015 DECL_CLASS_CONTEXT.
5016 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
5017 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
5018 (grokfield): Likewise.
5019 (finish_builtin_type): Likewise.
5020 (finish_vtable_vardec): Use decl_function_context, not
5021 hack_decl_function_context.
5022 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5023 (start_static_initialization_or_destruction): Likewise.
5024 (finish_static_initialization_or_destruction): Likewise.
5025 (mark_used): Adjust logic for deciding when to synthesize methods.
5026 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
5027 DECL_REAL_CONTEXT.
5028 * error.c (dump_function_decl): Use DECL_CONTEXT, not
5029 DECL_CLASS_CONTEXT.
5030 * friend.c (is_friend): Likewise.
5031 (add_friends): Remove.
5032 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
5033 * lex.c (begin_definition_of_inclass_inline): Use
5034 decl_function_context, not hack_decl_function_context.
5035 (process_next_inline): Likewise.
5036 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5037 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
5038 DECL_CLASSS_CONTEXT.
5039 (hack_identifier): Likewise.
5040 (synthesize_method): Use decl_function_context, not
5041 hack_decl_function_context.
5042 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
5043 DECL_REAL_CONTEXT.
5044 (is_member_template): Use decl_function_context, not
5045 hack_decl_function_context. Use DECL_CONTEXT, not
5046 DECL_CLASS_CONTEXT.
5047 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
5048 DECL_CLASS_CONTEXT.
5049 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
5050 DECL_REAL_CONTEXT.
5051 (push_template_decl_real): Likewise.
5052 (instantiate_class_template): Don't call add_friends.
5053 (tsubst_default_argument): Use DECL_CONTEXT, not
5054 DECL_REAL_CONTEXT.
5055 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
5056 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5057 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
5058 DECL_CLASS_CONTEXT.
5059 * repo.c (repo_inline_used): Likewise.
5060 * search.c (current_scope): Adjust for new _CONTEXT macros.
5061 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
5062 DECL_REAL_CONTEXT.
5063 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5064 (lookup_fnfields_here):Likewise.
5065 (check_final_overrider): Likewise.
5066 (init_vbase_pointers): Likewise.
5067 (virtual_context): Likewise.
5068 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
5069 (expand_body): Use decl_function_context, not
5070 hack_decl_function_context.
5071 * tree.c (hack_decl_function_context): Remove.
5072 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
5073 DECL_CLASS_CONTEXT.
5074 * typeck2.c (error_not_base_type): Likewise.
5075
5076 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
5077
5078 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
5079
5080 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5081
5082 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
5083
5084 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
5085
5086 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
5087
5088 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
5089
5090 * decl2.c (lang_decode_option): Enable automatic line wrapping.
5091
5092 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
5093
5094 * parse.y (frob_specs): Split out...
5095 (parse_decl): From here.
5096 (fn.def2): Call initial_deferred_type_access_control.
5097 (after_type_component_declarator0): Call frob_specs.
5098 (notype_component_declarator0): Likewise.
5099 * search.c (friend_accessible_p): Nested classes are friends of their
5100 enclosing classes.
5101
5102 2000-02-10 Mark Mitchell <mark@codesourcery.com>
5103
5104 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
5105 used to create an implicit temporary.
5106
5107 * class.c (dfs_modify_vtables): Tweak calculation of functions to
5108 override.
5109
5110 2000-02-08 Nathan Sidwell <nathan@acm.org>
5111
5112 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
5113 strip array element qualifiers too.
5114
5115 2000-02-07 Mark Mitchell <mark@codesourcery.com>
5116
5117 * decl.c (store_parm_decls): Don't build cleanups for parameters
5118 while processing_template_decl.
5119
5120 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
5121
5122 * cp-tree.h (struct saved_scope): Add incomplete field.
5123 (namespace_scope_incomplete): New macro.
5124 * decl.c (pushdecl): Use it.
5125 (hack_incomplete_structures): Use it. See through artificial
5126 binding levels.
5127 (mark_saved_scope): Mark it.
5128
5129 Implement access control for nested types.
5130 * search.c (type_access_control): New fn.
5131 (accessible_p): Now we do perform access control for types.
5132 * semantics.c (deferred_type_access_control): New fn.
5133 (initial_deferred_type_access_control): New fn.
5134 (begin_function_definition): Call it. Add lookups parm.
5135 * decl.c (struct binding_level): Add this_class field.
5136 (pushlevel_class): Set it.
5137 (mark_binding_level): Mark it.
5138 (lookup_name_real): Use it. Call type_access_control.
5139 (mark_saved_scope): Mark lookups field.
5140 * cp-tree.h (flagged_type_tree): Add lookups field.
5141 (struct saved_scope): Add lookups field.
5142 (type_lookups): New macro.
5143 * parse.y (declmods): Now <ftype>.
5144 (parse_decl): Add lookups parm. Call
5145 initial_deferred_type_access_control.
5146 (lang_extdef): Clear type_lookups.
5147 (typed_declspecs, declmods, typespec): Set lookups field.
5148 (initdcl): Call deferred_type_access_control.
5149 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
5150 component_decl_1, named_parm): Adjust.
5151 * friend.c (is_friend): Nested classes are friends of their
5152 enclosing classes.
5153
5154 * class.c (currently_open_derived_class): New fn.
5155 * method.c (hack_identifier): Use it.
5156
5157 * lex.c (do_identifier): Remove obsolete code.
5158
5159 * parse.y (typed_typespecs): Propagate new_type_flag properly.
5160
5161 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
5162
5163 * tinfo.h: Remove apostrophes from C++ comment (xgettext
5164 thinks this file is plain C).
5165
5166 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5167
5168 * Makefile.in (call.o): Depend on $(EXPR_H).
5169
5170 * call.c: Include "expr.h".
5171
5172 * class.c (dump_class_hierarchy): Add prototype.
5173
5174 * search.c (dfs_get_pure_virtuals): Likewise.
5175
5176 2000-02-1 Ulrich Drepper <drepper@redhat.com>
5177
5178 * parse.y (simple_stmt): Allow :: token in asm parameter list.
5179 * parse.c: Rebuilt.
5180
5181 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
5182
5183 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
5184 Store it in DECL_FCONTEXT.
5185 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
5186
5187 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
5188
5189 * tinfo.h (old abi): #include "tconfig.h".
5190 * tinfo.cc (convert_to_base): Move into old abi section.
5191
5192 2000-01-31 Mark Mitchell <mark@codesourcery.com>
5193
5194 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
5195 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
5196 (BINFO_PRIMARY_BINFO): New macro.
5197 (BF_DELTA): Rename to ...
5198 (BV_DELTA): ... this.
5199 (BF_VCALL_INDEX): Rename to ...
5200 (BV_VCALL_INDEX): ... this.
5201 (BF_FN): Rename to ...
5202 (BV_FN): ... this.
5203 * class.c (build_vbase_path): Adjust for changes to reverse_path.
5204 (set_rtti_entry): Rename BF_ macros to BV_ variants.
5205 (modify_vtable_entry): Simplify.
5206 (add_virtual_function): Rename BF_ macros to BV_ variants.
5207 (build_vtable_initializer): Likewise.
5208 (get_class_offset_1): Remove.
5209 (dfs_get_class_offset): Likewise.
5210 (get_class_offset): Likewise.
5211 (dfs_find_final_overrider): New function.
5212 (find_final_overrider): Likewise.
5213 (modify_one_vtable): Remove.
5214 (dfs_find_base): New function.
5215 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
5216 find_final_overrider.
5217 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
5218 virtuals.
5219 (dfs_fixup_vtable_deltas): Remove.
5220 (override_one_vtable): Remove.
5221 (merge_overrides): Likewise.
5222 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
5223 unreal chilren of virtual bases.
5224 (finish_struct_1): Don't use merge_overrides. Don't use
5225 dfs_fixup_vtable_deltas.
5226 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
5227 BINFOs.
5228
5229 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
5230 Jason Merrill <jason@yorick.cygnus.com>
5231
5232 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
5233
5234 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
5235
5236 * exception.cc (__throw_bad_typeid): Add missing std::.
5237
5238 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5239
5240 * cp-tree.h (make_thunk): PROTO -> PARAMS.
5241
5242 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
5243
5244 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
5245
5246 Runtime support for new-abi rtti.
5247 * inc/typeinfo (type_info::operator!=): Define in class.
5248 (type_info::before, type_info::name, type_info::operator==,
5249 type_info::operator!=): Define new ABI implementations.
5250 (type_info::is_pointer_p, type_info::is_function_p): Declare
5251 new virtual functions.
5252 (type_info::do_catch, type_info::do_upcast): Likewise.
5253
5254 * tinfo.h (__base_class_info): Define new class.
5255 (__class_type_info): Likewise.
5256 (__si_class_type_info): Likewise.
5257 (__vmi_class_type_info): Likewise.
5258 (__dynamic_cast): Prototype.
5259
5260 * tinfo.cc: Conditionalize old and new rtti mechanisms.
5261 (type_info::is_pointer_p): Define new function.
5262 (type_info::is_function_p): Likewise.
5263 (type_info::do_catch): Likewise.
5264 (type_info::do_upcast): Likewise.
5265 (vtable_prefix): New structure for vtable access.
5266 (adjust_pointer): Define new template function.
5267 (contained_p, public_p, virtual_p, contained_public_p,
5268 contained_nonpublic_p, contained_nonvirtual_p): Define new
5269 functions.
5270 (nonvirtual_base_type): New local variable.
5271 (__class_type_info::~__class_type_info): Define.
5272 (__si_class_type_info::~__si_class_type_info): Likewise.
5273 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
5274 (__class_type_info::do_catch): Define new function.
5275 (__class_type_info::do_upcast): Likewise.
5276 (__class_type_info::find_public_src): Likewise.
5277 (__class_type_info::do_find_public_src): Likewise.
5278 (__si_class_type_info::do_find_public_src): Likewise.
5279 (__vmi_class_type_info::do_find_public_src): Likewise.
5280 (__class_type_info::do_dyncast): Likewise.
5281 (__si_class_type_info::do_dyncast): Likewise.
5282 (__vmi_class_type_info::do_dyncast): Likewise.
5283 (__class_type_info::do_upcast): Likewise.
5284 (__si_class_type_info::do_upcast): Likewise.
5285 (__vmi_class_type_info::do_upcast): Likewise.
5286 (__dynamic_cast): Likewise.
5287
5288 * tinfo2.cc (__fundamental_type_info): Define new class.
5289 (__pointer_type_info): Likewise.
5290 (__reference_type_info): Likewise.
5291 (__array_type_info): Likewise.
5292 (__function_type_info): Likewise.
5293 (__enum_type_info): Likewise.
5294 (__ptr_to_member_type_info): Likewise.
5295 (__fundamental_type_info::~__fundamental_type_info): Define.
5296 (__pointer_type_info::~__pointer_type_info): Likewise.
5297 (__reference_type_info::~__reference_type_info): Likewise.
5298 (__array_type_info::~__array_type_info): Likewise.
5299 (__function_type_info::~__function_type_info): Likewise.
5300 (__enum_type_info::~__enum_type_info): Likewise.
5301 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
5302 (__pointer_type_info::do_catch): Define new function.
5303 (__ptr_to_member_type_info::do_catch): Define new function.
5304
5305 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
5306 (__is_pointer): Likewise.
5307
5308 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
5309
5310 2000-01-30 Mark Mitchell <mark@codesourcery.com>
5311
5312 * cp/class.c (build_vtable): Rename to build_primary_vtable.
5313 (prepare_fresh_vtable): Rename to build_secondary_vtable.
5314 (make_new_vtable): New function.
5315 (modify_vtable_entry): Handle generation of new vtables correctly.
5316 (modify_one_vtable): Remove unused parameter.
5317 (dfs_fixup_vtable_deltas): Likewise.
5318 (override_one_vtable): Use build_secondary_vtable.
5319 (finish_struct_1): Use build_primary_vtable and
5320 build_secondary_vtable.
5321
5322 2000-01-28 Ulrich Drepper <drepper@redhat.com>
5323
5324 * cp/decl.c: Adjust variable names, comments, help strings.
5325
5326 2000-01-29 Nathan Sidwell <nathan@acm.org>
5327
5328 * new2.cc (operator delete[]): Use operator delete, don't assume
5329 implementation.
5330
5331 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
5332
5333 * class.c (build_vtbl_initializer): Add argument to
5334 build_vtable_entry call.
5335
5336 2000-01-27 Mark Mitchell <mark@codesourcery.com>
5337
5338 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
5339 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
5340 (BF_DELTA): New macro.
5341 (BF_VCALL_INDEX): Likewise.
5342 (BF_FN): Likewise.
5343 (THUNK_VCALL_OFFSET): Likewise.
5344 (make_thunk): Change prototype.
5345 * class.c (build_vtable_entry): Integrate
5346 build_vtable_entry_for_fn. Handle vcall indices.
5347 (build_vtable_entry_for_fn): Remove.
5348 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
5349 BF_VCALL_INDEX, BF_FN.
5350 (modify_vtable_entry): Integrate common code from
5351 modify_one_vtable and dfs_fixup_vtable_deltas.
5352 (add_virtual_function): Set BF_VCALL_INDEX.
5353 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
5354 and BF_FN.
5355 (modify_one_vtable): Simplify.
5356 (dfs_fixup_vtable_deltas): Likewise.
5357 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
5358 * method.c (make_thunk): Handle vcall indices.
5359
5360 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
5361
5362 Compiler side new abi rtti (not enabled).
5363 * cp-tree.h (new_abi_rtti_p): New macro.
5364 (emit_support_tinfos): Prototype new function.
5365 (tinfo_decl_p): Likewise.
5366 (emit_tinfo_decl): Likwise.
5367 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
5368 macros.
5369 (doing_runtime): New local static.
5370 (init_rtti_processing): Add new-abi initializer.
5371 (get_tinfo_decl): Add new-abi logic.
5372 (tinfo_from_decl): Likewise.
5373 (build_dynamic_cast_1): Likewise.
5374 (qualifier_flags): New static function.
5375 (tinfo_base_init): Likewise.
5376 (generic_initializer): Likewise.
5377 (ptr_ref_initializer): Likewise.
5378 (ptmd_initializer): Likewise.
5379 (class_hint_flags): Likewise.
5380 (class_initializer): Likewise.
5381 (synthesize_tinfo_var): Likewise.
5382 (create_real_tinfo_var): Likewise.
5383 (create_pseudo_type_info): Likewise.
5384 (get_vmi_pseudo_type_info): Likewise.
5385 (create_tinfo_types): Likewise.
5386 (emit_support_tinfos): New global function.
5387 (tinfo_decl_p): New global predicate.
5388 (emit_tinfo_decl): New global function.
5389 * class.c (set_rtti_entry): Generalize for old and new rtti.
5390 (build_vtbl_initializer): Likewise.
5391 * decl2.c (finish_file): Likewise.
5392
5393 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
5394
5395 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
5396 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
5397
5398 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
5399
5400 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
5401 for scopes.
5402
5403 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
5404
5405 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
5406
5407 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
5408
5409 * optimize.c (calls_setjmp_r): Supply new argument
5410 to special_function_p.
5411
5412 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5413
5414 * call.c: PROTO -> PARAMS.
5415 * class.c: Likewise.
5416 * cp-tree.h: Likewise.
5417 * cvt.c: Likewise.
5418 * decl.c: Likewise.
5419 * decl.h: Likewise.
5420 * decl2.c: Likewise.
5421 * dump.c: Likewise.
5422 * errfn.c: Likewise.
5423 * error.c: Likewise.
5424 * except.c: Likewise.
5425 * expr.c: Likewise.
5426 * init.c: Likewise.
5427 * input.c: Likewise.
5428 * lex.c: Likewise.
5429 * lex.h: Likewise.
5430 * method.c: Likewise.
5431 * optimize.c: Likewise.
5432 * parse.y: Likewise.
5433 * pt.c: Likewise.
5434 * repo.c: Likewise.
5435 * rtti.c: Likewise.
5436 * search.c: Likewise.
5437 * semantics.c: Likewise.
5438 * spew.c: Likewise.
5439 * tree.c: Likewise.
5440 * typeck.c: Likewise.
5441 * typeck2.c: Likewise.
5442 * xref.c: Likewise.
5443
5444 2000-01-25 Richard Henderson <rth@cygnus.com>
5445
5446 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
5447
5448 2000-01-25 Mark Mitchell <mark@codesourcery.com>
5449
5450 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
5451 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
5452 (struct vcall_offset_data_s): New type.
5453 (dfs_vcall_offset_queue_p): New function.
5454 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5455 (build_vcall_offset_vtbl_entries): Likewise.
5456 (layout_vtable_decl): Likewise.
5457 (num_vfun_entries): Likewise.
5458 (num_extra_vtbl_entries): Add the entries for vcall offsets.
5459 (build_vtbl_initializer): Likewise.
5460 (dfs_finish_vtabls): Use layout_vtable_decl.
5461 (modify_one_vtables): Always duplicate vtables under the new ABI.
5462 (finish_struct_1): Use layout_vtable_decl.
5463
5464 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5465
5466 * decl.c (member_function_or_else): Change third arg from a format
5467 specifier to an `enum overload_flags'. Callers changed.
5468
5469 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
5470
5471 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
5472 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
5473 build_const_cast, get_delta_difference, check_return_expr): Avoid
5474 ANSI string concatenation usage.
5475
5476 2000-01-24 Mark Mitchell <mark@codesourcery.com>
5477
5478 * class.c (layout_class_type): Put the fields required to make a
5479 class non-empty at the end, not the beginning, of the TYPE_FIELDs
5480 list.
5481
5482 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
5483
5484 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
5485 template.
5486
5487 * decl2.c (mark_used): Do instantiate inlines that have been
5488 explicitly instantiated.
5489
5490 2000-01-24 Richard Henderson <rth@cygnus.com>
5491
5492 * call.c (build_over_call): Use expand_tree_builtin.
5493 * typeck.c (build_function_call_real): Likewise.
5494 (build_binary_op_nodefault): Handle unordered compares.
5495
5496 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5497
5498 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
5499 cp_tree_index values.
5500 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
5501 New global node #defines for them.
5502 * rtti.c (call_void_fn): Replace with ...
5503 (build_runtime_decl): ... new static function.
5504 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
5505 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
5506 (build_dynamic_cast_1): Always produce correctly typed result.
5507 Explicitly produce type_info addresses. Use dynamic_cast_node.
5508 * exception.cc (__throw_bad_cast): Return `void *'.
5509 (__throw_bad_typeid): Return `const type_info &'.
5510
5511 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5512
5513 * cp-tree.h (get_vtable_decl): Prototype new function.
5514 * class.c (get_vtable_decl): New function. Broken out from ...
5515 (build_vtable): ... here. Use it.
5516 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
5517 by get_vtable_decl.
5518
5519 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5520
5521 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
5522 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
5523 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
5524 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
5525 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
5526 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
5527 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
5528 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
5529 (CPTI_TINFO_VAR_ID): New enumeration.
5530 (__tp_desc_type_node, __access_mode_type_node,
5531 __bltn_desc_type_node, __user_desc_type_node,
5532 __class_desc_type_node, __ptr_desc_type_node,
5533 __attr_desc_type_node, __func_desc_type_node,
5534 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
5535 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
5536 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
5537 enum_desc_type_node, class_desc_type_node,
5538 si_class_desc_type_node, vmi_class_desc_type_node,
5539 ptmd_desc_type_node, base_desc_type_node): New #defines.
5540 (tinfo_fn_id, tinfo_fn_type): Rename to ...
5541 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
5542 (tinfo_var_id): New enumeration.
5543 (DECL_TINFO_FN_P): Augment comment.
5544 * decl.c (cp_global_trees): Adjust documentation.
5545 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
5546 tinfo_decl_type and tinfo_var_id.
5547 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
5548 (build_typeid): Remove unused variable.
5549 (get_tinfo_var): Use tinfo_var_id.
5550 (tinfo_name): New static function.
5551 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
5552 (tinfo_from_decl): Likewise.
5553 (get_base_offset): New static function, broken out of
5554 expand_class_desc.
5555 (expand_si_desc): Use tinfo_name.
5556 (expand_class_desc): Likewise. Lose local static variable.
5557 Use base_desc_type_node. Use get_base_offset.
5558 (expand_ptr_desc): Use tinfo_name.
5559 (expand_attr_desc): Likewise.
5560 (expand_generic_desc): Likewise.
5561
5562 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
5563 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
5564
5565 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5566
5567 * cp-tree.h (__eprintf): Remove declaration.
5568 * tree.c (__eprintf): Remove definition.
5569
5570 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
5571 Mark Mitchell <mark@codesourcery.com>
5572
5573 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
5574 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
5575
5576 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
5577
5578 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
5579
5580 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5581
5582 * cp-tree.h (register_dtor_fn): New function.
5583 * decl.c (destroy_local_static): Rename to ...
5584 (register_dtor_fn): ... this. Give it external linkage.
5585 (expand_static_init): Use it.
5586 * decl2.c (do_static_initialization): Likewise, if using
5587 __cxa_atexit.
5588 (do_static_destruction): Check that __cxa_atexit is not in use.
5589 (finish_file): Don't call do_static_destruction if using
5590 __cxa_atexit.
5591
5592 * typeck.c (convert_arguments): Restore two-message error
5593 reporting.
5594
5595 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
5596
5597 Remap dynamic cast hint values to be consistent across ABIs.
5598 * search.c (dynamic_cast_base_recurse): Remap generated value.
5599 (get_dynamic_cast_base_type): Adjust documentation.
5600 * tinfo.h (__user_type_info::dyncast): Likewise.
5601 (__user_type_info::find_public_subobj): Remap BOFF meaning.
5602 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
5603 (__class_type_info::do_dyncast): Likewise.
5604 (__class_type_info::do_find_public_subobj): Likewise.
5605 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
5606
5607 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5608
5609 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
5610
5611 * typeck2.c (incomplete_type_error): Restore previous
5612 cp_error and cp_error_at call sequence.
5613
5614 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
5615
5616 * class.c (dump_class_hierarchy): Make format agree with argument;
5617 cast pointer to unsigned long and print with %lx.
5618
5619 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5620
5621 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
5622
5623 * typeck.c (composite_pointer_type, common_type,
5624 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
5625 build_function_call_real, convert_arguments,
5626 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
5627 build_unary_op, mark_addressable, build_compound_expr,
5628 build_static_cast, build_reinterpret_cast, build_const_cast,
5629 build_c_cast, build_modify_expr, get_delta_difference,
5630 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
5631 'ISO C++'. Fusion consecutive calls to diagnotic message routines
5632 into a single one.
5633 * typeck2.c (readonly_error, abstract_virtuals_error,
5634 process_init_constructor, check_for_new_type): Likewise.
5635
5636 2000-01-19 Mark Mitchell <mark@codesourcery.com>
5637
5638 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
5639 VAR_DECLs.
5640
5641 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
5642
5643 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
5644 (build_x_typeid): Likewise.
5645 (get_tinfo_fn): Likewise.
5646 (get_tinfo_fn_unused): Rename to ...
5647 (get_tinfo_decl): ... here.
5648 * rtti.c (build_headof): Replace logic error with assertion.
5649 (get_tinfo_fn_dynamic): Rename to ...
5650 (get_tinfo_decl_dynamic): ... here. Make static. Use
5651 complete_type_or_else.
5652 (build_x_typeid): Move into ...
5653 (build_typeid): ... here. Adjust call to
5654 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
5655 throw_bad_typeid expression.
5656 (get_tinfo_fn_unused): Rename to ...
5657 (get_tinfo_decl): ... here. Adjust comment.
5658 (get_tinfo_fn): Delete.
5659 (tinfo_from_decl): New static function.
5660 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
5661 (get_typeid): Use complete_type_or_else.
5662 (build_dynamic_cast_1): Adjust calls to
5663 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
5664 * parse.y (primary): Adjust call to build_typeid.
5665 * except.c (build_eh_type_type_ref): Adjust call to
5666 get_tinfo_decl. Mark as used.
5667 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
5668 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
5669 * parse.c: Regenerated.
5670
5671 2000-01-17 Mark Mitchell <mark@codesourcery.com>
5672
5673 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
5674 calling convention.
5675 (resolves_to_fixed_type_p): Document calling convention.
5676 * rtti.c (build_x_typeid): Initialize NONNULL.
5677
5678 * cp-tree.h (build_shared_int_cst): New function.
5679 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
5680 * class.c (modify_vtable_entry): Likewise.
5681 (add_virtual_function): Split out code to generated shared
5682 INTEGER_CSTs to build_share_int_cst.
5683 (modify_all_vtables): Handle all the overridden functions here.
5684 Add overridden functions from non-primary virtual bases to the
5685 primary vtable.
5686 (finish_struct_1): Adjust call to modify_all_vtables. Add
5687 overridden functions from non-primary bases to the vtable.
5688 * tree.c (build_shared_int_cst): New function.
5689
5690 * cp-tree.h (scratchalloc): Remove.
5691 (build_scratch_list): Likewise.
5692 * call.c (convert_class_to_reference): Replace build_scratch_list
5693 and build_expr_list with build_tree_list.
5694 (add_candidate): Replace scratchalloc with expralloc. Note memory
5695 leak.
5696 (build_user_type_conversion_1): Replace build_scratch_list
5697 and build_expr_list with build_tree_list.
5698 (build_new_op): Likewise.
5699 (build_op_delete_call): Likewise.
5700 (convert_like): Likewise.
5701 * cvt.c (ocp_convert): Likewise.
5702 * decl.c (start_decl): Likewise.
5703 (start_function): Likewise.
5704 (finish_destructor_body): Likewise.
5705 (maybe_build_cleanup_1): Likewise.
5706 * decl2.c (reparse_decl_as_expr): Likewise.
5707 * init.c (perform_member_init): Likewise.
5708 (expand_cleanup_for_base): Likewise.
5709 (build_builtin_delete_call): Likewise.
5710 (build_new_1): Likewise.
5711 (build_delete): Likewise.
5712 * method.c (do_build_assign_ref): Likewise.
5713 * parse.y (already_scoped_stmt): Likewise.
5714 (nontrivial_exprlist): Likewise.
5715 (net_initializer): Likewise.
5716 (initlist): Likewise.
5717 * parse.c: Regenerated.
5718 * rtti.c (build_x_typeid): Likewise.
5719 (build_dynamic_cast_1): Likewise.
5720 * typeck.c (build_x_compound_expr): Likewise.
5721 (build_static_cast): Likewise.
5722 (build_modify_expr): Likewise.
5723
5724 * cp-tree.h (DECL_VINDEX): Add documentation.
5725 * class.c (build_vtable_entry): Likewise.
5726 (start_vtable): Add comment.
5727 (add_virtual_function): Replace pending_hard_virtuals with
5728 overridden_virtuals and pending_virtuals with new_virtuals.
5729 Replace redundant assignments with assertions.
5730 (check_for_override): Add comment.
5731 (check_bases_and_members): Replace pending_hard_virtuals with
5732 overridden_virtuals and pending_virtuals with new_virtuals.
5733 (create_vtbl_ptr): Likewise.
5734 (layout_class_type): Likewise.
5735 (finish_struct_1): Likewise. Add comments.
5736
5737 2000-01-16 Mark Mitchell <mark@codesourcery.com>
5738
5739 * class.c (finish_struct_1): Replace redundant code with
5740 assertions.
5741
5742 * cp-tree.h (flag_new_abi): Move.
5743 (flag_use_cxa_atexit): Likewise.
5744 (flag_honor_std): Likewise.
5745 (flag_rtti): Likewise.
5746 (vbase_offsets_in_vtable_p): Define.
5747 (vptrs_present_everywhere_p): Likewise.
5748 (TYPE_CONTAINS_VPTR_P): Likewise.
5749 (dfs_walk_real): Declare.
5750 * class.c (build_vbase_pointer_fields): Check
5751 vbase_offsets_in_vtable_p.
5752 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
5753 BINFO_VPTR_FIELD.
5754 (build_vbase_offset_vtbl_entries): Simplify.
5755 (build_vbase_offset_vtbl_entries): Adjust.
5756 (build_vbase_pointer): Add ability to look up vbase offsets in
5757 vtable.
5758 (start_vtable): New function.
5759 (add_virtual_function): Use it.
5760 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
5761 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
5762 (build_vtbl_initializer): Take the type of the complete object as
5763 input. Use it to correctly calculate vbase offsets.
5764 (dfs_finish_vtbls): Pass the complete type to
5765 build_vtbl_initializer.
5766 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
5767 (create_vtable_ptr): Create a vtable even if there are no
5768 new virtual functions, under the new ABI.
5769 (finish_struct_1): Likewise.
5770 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
5771 * decl.c (exapnd_static_init): Remove call to
5772 preserve_initializer.
5773 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
5774 vtables.
5775 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
5776 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
5777 (construct_virtual_bases): Don't initialize virtual base pointers
5778 under the new ABI.
5779 (build_aggr_init): Clean up comment.
5780 (expand_aggr_init_1): Likewise.
5781 * rtti.c (expand_class_desc): Store the virtual function table
5782 index where the vbase offset lives in the offset field.
5783 * search.c (dfs_walk_real): Make it global.
5784 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
5785 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
5786
5787 * tinfo.h (USItype): Make it signed under the new ABI.
5788 * tinfo.cc (convert_to_base): New function. Encapsulate base
5789 conversion logic here.
5790 (__class_type_info::do_upcast): Use it.
5791 (__class_type_info::do_dyncast): Likewise.
5792 (__class_type_info::do_find_public_subobj): Likewise.
5793
5794 * init.c (construct_virtual_bases): Don't look up the addresses of
5795 virtual bases at run-time.
5796
5797 * class.c (build_vbase_pointer): Relocate.
5798 (build_vbase_pointer_fields): Likewise.
5799 (dfs_build_vbase_offset_vtbl_entries): Likewise.
5800 (build_vbase_offset_vtbl_entries): Likewise.
5801
5802 * decl.c (init_decl_processing): Complain if -fnew-abi
5803 -fno-vtable-thunks is used.
5804
5805 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
5806 flag_new_abi.
5807
5808 2000-01-15 Mark Mitchell <mark@codesourcery.com>
5809
5810 * cp-tree.h (num_extra_vtbl_entries): New function.
5811 (size_extra_vtbl_entries): Likewise.
5812 (dfs_vtable_path_unmark): Likewise.
5813 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
5814 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5815 * class.c (num_extra_vtbl_entries): New function.
5816 (size_extra_vtbl_entries): Likewise.
5817 (dfs_build_vbase_offset_vtbl_entries): New function.
5818 (build_vbase_offset_vtbl_entries): Likewise.
5819 (build_vtbl_initializer): Use it.
5820 (finish_struct_1): Adjust vtable sizes (using
5821 num_extra_vtbl_entries).
5822 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
5823 THUNK_DECL is non-NULL before expanding it.
5824 * init.c (expand_virtual_init): Adjust the vtable pointer by
5825 size_extra_vtbl_entries before storing it.
5826 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
5827 Handle TREE_LIST parameters here, not in the dfs_* functions.
5828 (dfs_unmarked_real_bases_queue_p): Adjust.
5829 (dfs_marked_real_bases_queue_p): Likewise.
5830 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
5831 (dfs_vtable_path_marked_real_bases_queue_p): New function.
5832 (dfs_vtable_path_unmark): Likewise.
5833
5834 2000-01-14 Mark Mitchell <mark@codesourcery.com>
5835
5836 * optimize.c (copy_body_r): Clear the operand three of a
5837 TARGET_EXPR when copying it.
5838
5839 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5840
5841 * method.c (build_decl_overload_real): Check whether we are in ::
5842 before returning __builtin_new/delete.
5843
5844 2000-01-13 Mark Mitchell <mark@codesourcery.com>
5845
5846 * pt.c (tsubst_friend_function): Improve comment.
5847 (instantiate_decl): Avoid crashing when a "nested" function is
5848 instantiated from the top level.
5849
5850 * dump.c (dqeueue_and_dump): Dump
5851 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
5852
5853 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5854
5855 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
5856
5857 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
5858
5859 * g++spec.c (lang_specific_driver): Add -fnew-abi if
5860 ENABLE_NEW_GXX_ABI defined.
5861 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
5862 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
5863 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
5864
5865 2000-01-12 Mark Mitchell <mark@codesourcery.com>
5866
5867 * decl.c (start_cleanup_fn): Call pushdecl.
5868
5869 * call.c (convert_class_to_reference): Fix typos.
5870 (build_conditional_expr): Handle errors gracefully.
5871 * class.c (push_nested_class): Likewise.
5872 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
5873 (DECL_THIS_EXTERN): Use it.
5874 (DECL_THIS_STATIC): Likewise.
5875 * cvt.c (convert_to_void): Handle errors gracefully.
5876 (build_expr_type_conversion): Likewise.
5877 * decl.c (maybe_push_decl): Likewise.
5878 (start_decl_1): Likewise.
5879 (require_complete_types_for_parms): Likewise.
5880 * parse.y (structsp): Likewise.
5881 (base_class): Likewise.
5882 * parse.c: Regenerated.
5883 * pt.c (finish_member_template_decl): Likewise.
5884 * typeck.c (decay_conversion): Likewise.
5885
5886 * cp-tree.h (dfs_skip_vbases): New function.
5887 (find_vbase_instance): Likewise.
5888 * class.c (determine_primary_base): Allow a nearly empty base to
5889 serve as a primary base class under the new ABI.
5890 (get_class_offset_1): Rename to ...
5891 (dfs_get_class_offset): ... this. Simplify. Don't issue error
5892 messages here.
5893 (get_class_offset): Use it. Issue error messages here.
5894 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
5895 find the right copies of virtual bases.
5896 (fixup_vtable_deltas1): Rename to ...
5897 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
5898 bases as primary bases.
5899 (fixup_vtable_deltas): Remove.
5900 (override_one_vtable): Handle virtual bases as primary bases.
5901 (merge_overrides): Likewise.
5902 (finish_struct_1): Likewise.
5903 (dump_class_hierarchy): Dump primary-ness of bases as well.
5904 * search.c (mark_primary_bases): Use a pre-order traversal to
5905 handle primary virtual bases.
5906 (dfs_skip_vbases): New fiunction.
5907 (expand_upcast_fixups): Adjust to handle primary virtual bases.
5908 (fixup_virtual_upcast_offsets): Likewise.
5909 (fixup_all_virtual_upcast_offsets): Likewise.
5910 (dfs_find_vbase_instances): New function.
5911 (find_vbase_instance): Likewise.
5912
5913 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
5914
5915 * lex.c (DIR_SEPARATOR): Delete macro.
5916
5917 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
5918
5919 * decl2.c (lang_decode_option): Handle automatic line wrapping
5920 option.
5921
5922 2000-01-11 Mark Mitchell <mark@codesourcery.com>
5923
5924 * friend.c (do_friend): Don't resolve scopes when processing
5925 template declarations, even if the qualifying scope doesn't
5926 involve template parameters.
5927
5928 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
5929
5930 * class.c (dfs_modify_vtables_queue_p): Remove.
5931 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
5932 and dfs_marked_real_bases_queue_p instead of
5933 dfs_modify_vtables_queue_p.
5934
5935 * class.c (build_vbase_path): Simplify.
5936 (dfs_propagate_binfo_offsets): New function.
5937 (propagate_binfo_offsets): Use it.
5938 (remove_base_field): Simplify.
5939 (dfs_set_offset_for_vbases): Remove.
5940 (dfs_set_offset_for_shared_vbases): New function.
5941 (dfs_set_offset_for_unshared_vbases): Likewise.
5942 (layout_virtual_bases): Use them.
5943 (layout_basetypes): Don't call propagate_binfo_offsets.
5944 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
5945 for the vbases.
5946
5947 * class.c (build_base_field): New function, split out from ...
5948 (build_base_fields): ... here. Use it. Allocate primary bases
5949 first, under the new ABI.
5950 (get_vtable_entry): Remove.
5951 (remove_base_field): New function, split out from ...
5952 (remove_base_fields): ... here. Adjust since primary bases come
5953 first under the new ABI.
5954
5955 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
5956 (initialize_vtbl_ptrs): New function.
5957 (expand_indirect_vtbls_init): Change prototype.
5958 (convert_pointer_to_vbase): Declare.
5959 * init.c (expand_direct_vtbls_init): Remove.
5960 (dfs_initialize_vtbl_ptrs): New function.
5961 (initialize_vtbl_ptrs): Likewise.
5962 (emit_base_init): Use initialize_vtbl_ptrs.
5963 * search.c (convert_pointer_to_vbase): Make it global.
5964 (expand_indirect_vtbls_init): Remove vtable initialization code.
5965 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
5966
5967 * class.c (dfs_finish_vtbls): New function.
5968 (finish_vtbls): Use it.
5969 (dump_class_hierarchy): New function.
5970
5971 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
5972 (BINFO_VBASE_PRIMARY_P): New macro.
5973 (BINFO_VIRTUALS): Add to documentation.
5974 (SET_BINFO_PRIMARY_MARKED_P): Remove.
5975 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5976 (dfs_mark_primary_bases_queue_p): Likewise.
5977 (dfs_unmarked_real_bases_queue_p): New function.
5978 (dfs_marked_real_bases_queue_p): Likewise.
5979 * search.c (dfs_mark_primary_bases): Adjust.
5980 (mark_primary_bases): Likewise.
5981 (get_shared_vbase_if_not_primary): New function.
5982 (dfs_unmarked_real_bases_queue_p): Likewise.
5983 (dfs_marked_real_bases_queue_p): Likewise.
5984 (dfs_get_pure_virtuals): Simplify.
5985 (get_pure_virtuals): Likewise.
5986
5987 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5988
5989 * lex.c: Include tm_p.h.
5990
5991 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
5992
5993 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
5994
5995 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
5996
5997 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
5998 * pt.c (instantiate_decl): Defer comdat templates that might not be
5999 needed.
6000
6001 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
6002 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
6003 (finish_file): Likewise.
6004
6005 * decl2.c (import_export_class): Undo 12/14 change.
6006
6007 * error.c (dump_decl): operator new, not operatornew.
6008
6009 * class.c (field_decl_cmp): A nontype is "greater" than a type.
6010 * search.c (lookup_field_1): Look for the last field with the
6011 desired name.
6012
6013 2000-01-05 Nathan Sidwell <nathan@acm.org>
6014
6015 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
6016 FUNCTION_DECL.
6017
6018 2000-01-05 Nathan Sidwell <nathan@acm.org>
6019
6020 * typeck.c (build_static_cast): Don't strip target qualifiers
6021 when casting from a class.
6022
6023 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6024
6025 * class.c (warn_hidden): Initialize variable `fndecl'.
6026
6027 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
6028
6029 * decl.c (flag_isoc9x): New variable to be able to use code in
6030 c-common.c. For now always zero.
6031
6032 2000-01-03 Mark Mitchell <mark@codesourcery.com>
6033
6034 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
6035 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
6036 or unshare_base_binfos for virtual bases here.
6037 * search.c (dfs_get_vbase_types): Do it here.
6038 (get_vbase_types): Adjust.
6039
6040 2000-01-02 Mark Mitchell <mark@codesourcery.com>
6041
6042 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
6043 (BINFO_PRIMARY_MARKED_P): Use flag 5.
6044 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
6045 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6046 (unmark_primary_bases): Remove declaration.
6047 (unmarkedp): Declare.
6048 (dfs_vbase_unmark): Likewise.
6049 * class.c (determine_primary_base): Return immediately if there
6050 are no base classes. Call mark_primary_bases here.
6051 (modify_all_direct_vtables): Remove.
6052 (modify_all_indirect_vtables): Remove.
6053 (dfs_modify_vtables_queue_p): New function.
6054 (dfs_modify_vtables): New function.
6055 (modify_all_vtables): Use them.
6056 (build_base_fields): Build FIELD_DECLs for primary virtual base
6057 classes.
6058 (create_vtable_ptr): Don't call determine_primary_base here.
6059 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
6060 (dfs_set_offset_for_vbases): ... this.
6061 (layout_virtual_bases): Use it.
6062 (layout_class_type): Call determine_primary_base here.
6063 * search.c (unmarkedp): Make it global.
6064 (shared_marked_p): Simplify.
6065 (shared_unmarked_p): Likewise.
6066 (dfs_primary_bases_queue_p): Remove.
6067 (dfs_unmark_primary_bases): Likewise.
6068 (unmark_primary_bases): Likewise.
6069 (mark_primary_bases): Simplify.
6070 (get_pure_virtuals): Don't call mark_primary_bases here.
6071 (dfs_vbase_unmark): New function.
6072 (get_vbase_types): Simplify.
6073
6074 * class.c (struct base_info): Remove.
6075 (determine_primary_base): Take has_virtual_p rather than a
6076 base_info as input. Don't calculate max_has_virtual.
6077 (finish_struct_bits): Remove max_has_virtual argument.
6078 (create_vtable_ptr): Remove max_has_virtual_p argument.
6079 (layout_virtual_bases): Remove max argument.
6080 (layout_basetypes): Likewise.
6081 (layout_class_type): Remove max_has_virtual_p argument.
6082 (finish_struct_1): Remove max_has_virtual.
6083
6084 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
6085 (layout_basetypes): Remove.
6086 * class.c (propagate_binfo_offsets): Moved here from tree.c.
6087 Update to handle primary virtual bases.
6088 (remove_base_fields): New function, split out from
6089 layout_basetypes.
6090 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
6091 (layout_virtual_bases): New function, split out from
6092 layout_basetypes. Update to handle primary virtual bases.
6093 (layout_basetypes): Moved here from tree.c. Use
6094 remove_base_fields and layout_virtual_bases.
6095 * search.c (dfs_mark_primary_bases_queue_p): New function.
6096 (mark_primary_bases): Use it.
6097 * tree.c (CEIL): Remove.
6098 (propagate_binfo_offsets): Remove.
6099 (layout_basetypes): Remove.
6100
6101 2000-01-01 Mark Mitchell <mark@codesourcery.com>
6102
6103 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
6104 (BINFO_PRIMARY_MARKED_P): New macro.
6105 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
6106 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6107 (mark_primary_bases): New function.
6108 (unmark_primary_bases): Likewise.
6109 * search.c (get_abstract_virtuals_1): Remove.
6110 (dfs_mark_primary_bases): New function.
6111 (mark_primary_bases): Likewise.
6112 (dfs_unmark_primary_bases): Likewise.
6113 (unmark_primary_bases): Likewise.
6114 (dfs_get_pure_virtuals): Likewise.
6115
6116 2000-01-01 Mark Mitchell <mark@codesourcery.com>
6117
6118 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
6119 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
6120 (modify_one_vtable): Adjust.
6121 (fixup_vtable_deltas1): Likewise.
6122 (override_one_vtable): Likewise.
6123 * search.c (get_abstract_virtuals_1): Likewise.
6124 (get_pure_virtuals): Likewise.
6125 (expand_upcast_fixups): Likewise.
6126 * tree.c (debug_binfo): Likewise.
6127
6128 * class.c (build_vtable): Don't return a value. Don't rebuild
6129 vtables for bases that have already been handled.
6130 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
6131 already been handled.
6132 (modify_one_vtable): Adjust accordingly.
6133 (fixup_vtable_deltas1): Likewise.
6134 (finish_struct_1): Likewise.
6135
6136 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6137
6138 * call.c (build_new_method_call): Also check destructors.
6139
This page took 0.328032 seconds and 5 git commands to generate.