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