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