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