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