re PR c++/8511 ((hopefully) reproducible cc1plus SIGSEGV.)
[gcc.git] / gcc / cp / ChangeLog
1 2002-11-30 Mark Mitchell <mark@codesourcery.com>
2
3 PR c++/8511
4 * pt.c (instantiate_decl): Handle template friends defined outside
5 of the class correctly.
6
7 2002-11-29 Joe Buck <jbuck@synopsys.com>
8
9 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
10 anonymous structs.
11
12 2002-11-29 Mark Mitchell <mark@codesourcery.com>
13
14 * class.c (walk_subobject_offsets): Recur on binfos as well as on
15 types.
16 (layout_nonempty_base_or_field): Pass it a binfo when processing a
17 base class.
18 (layout_empty_base): Likewise.
19 (build_base_field): Likewise.
20
21 2002-11-27 Mark Mitchell <mark@codesourcery.com>
22
23 * class.c (build_base_field): Make sure we get the canonical base
24 when descending through primary bases.
25
26 2002-11-26 Geoffrey Keating <geoffk@apple.com>
27
28 * decl.c (check_initializer): Don't error on initialisation of
29 a scalar with a brace-enclosed expression.
30
31 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
32
33 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
34 (template_parms_equal): Remove prototype.
35 * typeck.c (buuld_indirect_ref): Reformat.
36
37 2002-11-25 Mark Mitchell <mark@codesourcery.com>
38
39 * tree.c (cp_build_qualified_type_real): Correct handling of
40 array types.
41 * class.c (walk_subobject_offsets): Fix thinko.
42 (build_base_field): Record offsets of empty bases in primary
43 virtual bases.
44 (layout_class_type): Record offsets of empty bases in fields.
45
46 * search.c (is_subobject_of_p_1): Fix thinko.
47 (lookup_field_queue_p): Likewise.
48
49 2002-11-24 Mark Mitchell <mark@codesourcery.com>
50
51 * class.c (layout_class_type): Reuse tail padding when laying out
52 virtual bases.
53
54 2002-11-22 Mark Mitchell <mark@codesourcery.com>
55
56 * rtti.c (qualifier_flags): Fix thinko.
57
58 2002-11-21 Glen Nakamura <glen@imodulo.com>
59
60 PR c++/8342
61 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
62 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
63 of the branches of a COND_EXPR.
64
65 2002-11-19 Mark Mitchell <mark@codesourcery.com>
66
67 * pt.c (for_each_template_parm): Free allocated memory.
68 * search.c (is_subobject_of_p_1): New function.
69 (is_subobject_of_p): Avoid walking virtual bases multiple times.
70
71 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
72
73 * g++spec.c (lang_specific_spec_functions): New.
74
75 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
76
77 * ChangeLog: Follow spelling conventions.
78 * class.c: Likewise.
79 * decl2.c: Likewise.
80
81 2002-11-14 Zack Weinberg <zack@codesourcery.com>
82
83 * search.c (dfs_push_decls): Do not try to reorder elements
84 3..n of method_vec if method_vec has only two elements.
85 Reverse order of two tests to avoid accessing unallocated
86 memory.
87
88 2002-11-14 Mark Mitchell <mark@codesourcery.com>
89
90 * class.c (dfs_find_final_overrider): Adjust so that the most
91 derived object is a binfo, rather than a class type.
92 (find_final_overrider): Likewise.
93 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
94 (add_vcall_offset): Likewise.
95
96 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
97
98 PR c++/8389
99 * pt.c (instantiate_template): Push class scope for member
100 functions.
101 (get_mostly_instantiated_function_type): Likewise. Don't call
102 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
103 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
104 * mangle.c (write_encoding, write_unqualified_name): Adjust.
105
106 2002-11-07 Mark Mitchell <mark@codesourcery.com>
107
108 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
109 vcall offfsets. Split out ...
110 (add_vcall_offset): ... new function.
111
112 PR c++/8338
113 * pt.c (for_each_template_parm): Add htab parameter.
114 (process_partial_specialization): Adjust call.
115 (push_template_decl_real): Likewise.
116 (pair_fn_data): Add visited.
117 (for_each_template_parm_r): Avoid walking duplicates more than
118 once.
119 (uses_template_parms): Adjust call to for_each_template_parm.
120
121 2002-11-07 Mark Mitchell <mark@codesourcery.com>
122
123 * class.c (add_implicitly_declared_members): Put implicitly
124 declared functions at the end of TYPE_METHODs when -fabi-version
125 is at least 2.
126
127 2002-11-05 Geoffrey Keating <geoffk@apple.com>
128
129 * decl2.c (finish_file): Correct spelling.
130
131 2002-11-03 Mark Mitchell <mark@codesourcery.com>
132
133 * call.c (build_special_member_call): Do not try to lookup VTTs by
134 name.
135 * class.c (vtbl_init_data): Add generate_vcall_entries.
136 (get_vtable_decl): Do not look up virtual tables by name.
137 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
138 (set_primary_base): Do not set CLASSTYPE_RTTI.
139 (determine_primary_base): Likewise.
140 (get_matching_virtual): Remove.
141 (get_vcall_index): New function.
142 (update_vtable_entry_for_fn): Do not try to use virtual thunks
143 when they are not required. Assign vcall indices at this point.
144 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
145 Do update dynamic_classes.
146 (build_vtt): Do not add VTTs to the symbol table.
147 (build_ctor_vtbl_group): Likewise.
148 (build_vtbl_initializer): Simplify handling of vcall indices.
149 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
150 for the most derived class.
151 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
152 the vtable.
153 * cp-tree.h (dynamic_classes): New macro.
154 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
155 (CLASSTYPE_RTTI): Remove.
156 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
157 (CLASSTYPE_VCALL_INDICES): New macro.
158 (CLASSTYPE_VTABLES): Likewise.
159 (BV_USE_VCALL_INDEX_P): Remove.
160 (build_vtable_path): Remove.
161 * decl2.c (finish_vtable_vardecl): Remove.
162 (key_method): Remove #if 0'd code.
163 (finish_vtable_vardecl): Rename to ...
164 (maybe_emit_vtables): ... this.
165 (finish_file): Use it.
166 * search.c (look_for_overrides_here): Update comment.
167
168 2002-11-01 Zack Weinberg <zack@codesourcery.com>
169
170 PR c/7353 redux
171 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
172
173 2002-10-30 Jason Merrill <jason@redhat.com>
174
175 PR c++/8186
176 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
177 * call.c (convert_for_arg_passing): Set it.
178 * except.c (stabilize_throw_expr): Recurse for such an arg.
179
180 2002-10-31 Mark Mitchell <mark@codesourcery.com>
181
182 * cp-tree.h (lang_decl_flags): Remove init_priority.
183 (lang_decl): Add delta.
184 (GLOBAL_INIT_PRIORITY): Remove.
185 (THUNK_DELTA): Revise definition.
186 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
187 * dump.c (cp_dump_tree): Don't dump it.
188
189 2002-10-30 Mark Mitchell <mark@codesourcery.com>
190
191 PR c++/8160
192 * typeck2.c (process_init_constructor): Call complete_array_type.
193
194 PR c++/8149
195 * decl.c (make_typename_type): Issue errors about invalid results.
196
197 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
198
199 Core issue 287, PR c++/7639
200 * cp-tree.h (lang_type_class): Add decl_list field.
201 (CLASSTYPE_DECL_LIST): New macro.
202 (maybe_add_class_template_decl_list): Add declaration.
203 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
204 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
205 (maybe_add_class_template_decl_list): New function.
206 (add_implicitly_declared_members): Use it.
207 * decl.c (maybe_process_template_type_declaration): Likewise.
208 (pushtag): Likewise.
209 * friend.c (add_friend): Likewise.
210 (make_friend_class): Likewise.
211 * semantics.c (finish_member_declaration): Likewise.
212 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
213 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
214 to process members and friends in the order of declaration.
215
216 2002-10-29 Mark Mitchell <mark@codesourcery.com>
217
218 PR c++/8287
219 * decl.c (finish_destructor_body): Create the label to jump to
220 when returning from a destructor here.
221 (finish_function_body): Rather than here.
222
223 2002-10-25 Zack Weinberg <zack@codesourcery.com>
224
225 PR c++/7266
226 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
227 SCOPE_REF is not null before dereferencing it.
228
229 2002-10-25 Mark Mitchell <mark@codesourcery.com>
230
231 * call.c (build_over_call): Use DECL_CONTEXT, not
232 DECL_VIRTUAL_CONTEXT.
233 * class.c (modify_vtable_entry): Don't mess with
234 DECL_VIRTUAL_CONTEXT.
235 (set_vindex): Remove.
236 (set_primary_base): Remove vfuns_p parameter.
237 (determine_primary_base): Likewise.
238 (modify_all_vtables): Likewise.
239 (layout_class_type): Likewise. Adjust calls to other functions
240 accordingly.
241 (finish_struct_1): Adjust calls to modified functions. Set
242 DECL_VINDEX here.
243 * cp-tree.h (lang_type_class): Remove vsize.
244 (CLASSTYPE_VSIZE): Remove.
245 (lang_decl): Remove thunks.
246 (DECL_THUNKS): Adjust.
247 (DECL_VIRTUAL_CONTEXT): Remove.
248 (duplicate_decls): Don't copy it.
249 * pt.c (build_template_decl): Don't set it.
250 (tsubst_decl): Likewise.
251 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
252
253 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
254 (build_vtable_entry): Remove.
255 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
256 (lang_decl): Add thunks.
257 (DECL_THUNKS): New macro.
258 * decl.c (duplicate_decls): Copy it.
259 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
260 * semantics.c (emit_associated_thunks): Simplify.
261
262 2002-10-24 David Edelsohn <edelsohn@gnu.org>
263
264 PR c++/7228
265 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
266 lang_type structure exists before accessing field.
267 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
268 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
269 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
270 * class.c (check_field_decls): Use new macros.
271 * typeck2.c (process_init_constructor): Remove redundant check for
272 existence of lang_type structure.
273
274 2002-10-24 Mark Mitchell <mark@codesourcery.com>
275
276 * class.c (end_of_base): New method.
277 (end_of_class): Use it. Check indirect virtual bases.
278
279 * class.c (check_field_decls): Fix typo.
280
281 2002-10-23 Mark Mitchell <mark@codesourcery.com>
282
283 PR c++/8067
284 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
285 related variables.
286
287 PR c++/7679
288 * spew.c (next_token): Do not return an endless stream of
289 END_OF_SAVED_INPUT tokens.
290 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
291 the cached token stream.
292 (snarf_defarg): Likewise.
293
294 2002-10-23 Zack Weinberg <zack@codesourcery.com>
295
296 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
297 variably_modified_type_p.
298 * cp-tree.h: Remove prototype of variably_modified_type_p.
299 * tree.c (variably_modified_type_p): Remove; now implemented
300 in language-independent code.
301
302 2002-10-22 Mark Mitchell <mark@codesourcery.com>
303
304 PR c++/6579
305 * spew.c (snarf_parenthesized_expression): New function.
306 (snarf_block): Use it.
307
308 2002-10-22 Richard Henderson <rth@redhat.com>
309
310 * method.c (use_thunk): Always compute vcall_value; assert that
311 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
312 for vcall thunks as well.
313
314 2002-10-21 Mark Mitchell <mark@codesourcery.com>
315
316 * class.c (empty_base_at_nonzero_offset_p): New function.
317 (layout_nonempty_base_or_field): Do not check for conflicts when
318 laying out a virtual base using the GCC 3.2 ABI.
319 (build_base_field): Correct checking for presence of empty classes
320 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
321
322 * class.c (include_empty_classes): Use normalize_rli.
323 (layout_class_type): Likewise.
324
325 * decl.c (reshape_init): Tweak handling of character arrays.
326
327 PR c++/8218
328 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
329 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
330 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
331 (check_field_decls): Likewise.
332 (layout_class_type): Likewise.
333 (finish_struct_1): Initialize it.
334 (walk_subobject_offsets): Use it to prune searches.
335
336 2002-10-20 Mark Mitchell <mark@codesourcery.com>
337
338 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
339 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
340 TARGET_ASM_OUTPUT_MI_THUNK in comments.
341
342 2002-10-18 Zack Weinberg <zack@codesourcery.com>
343
344 * decl.c (start_decl): Point users of the old initialized-
345 typedef extension at __typeof__.
346
347 2002-10-18 Mark Mitchell <mark@codesourcery.com>
348
349 * Make-lang.in (method.o): Depend on TARGET_H.
350 * method.c (target.h): Include it.
351 (use_thunk): Use target hooks. Use vcall thunks, if available.
352
353 2002-10-18 Mark Mitchell <mark@codesourcery.com>
354
355 * class.c (base_derived_from): Make sure return value is a bool.
356
357 2002-10-18 Mark Mitchell <mark@codesourcery.com>
358
359 * class.c (find_final_overrider_data_s): Remove overriding_fn and
360 overriding_base.
361 (dfs_base_derived_from): New function.
362 (base_derived_from): Likewise.
363 (dfs_find_final_overrider): Use base_derived_from.
364 (find_final_overrider): Adjust.
365
366 2002-10-18 Jason Merrill <jason@redhat.com>
367
368 PR c++/8080
369 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
370 with condition decls in a template.
371
372 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
373
374 * class.c (add_method): Compare template parms too.
375
376 2002-10-17 Mark Mitchell <mark@codesourcery.com>
377
378 PR c++/7584
379 * class.c (handle_using_decl): Allow the declaration used to be
380 from an ambiguous base.
381
382 * pt.c (convert_template_argument): Revert this change:
383 2002-10-16 Mark Mitchell <mark@codesourcery.com>
384 * pt.c (convert_template_argument): Do not fold non-type
385 template rguments when inside a template.
386
387 * init.c (expand_default_init): Handle brace-enclosed initializers
388 correctly.
389
390 2002-10-16 Mark Mitchell <mark@codesourcery.com>
391
392 * mangle.c (write_expression): Correct handling of enumeration
393 constants.
394 (write_template_arg): Likewise.
395 * pt.c (convert_template_argument): Do not fold non-type template
396 arguments when inside a template.
397
398 PR c++/7478
399 * cvt.c (convert_to_reference): Allow references as the incoming
400 type.
401
402 2002-10-16 Mark Mitchell <mark@codesourcery.com>
403
404 PR c++/7524
405 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
406 build_qualified_type.
407
408 2002-10-15 Richard Henderson <rth@redhat.com>
409
410 * error.c (dump_expr): Use real_to_decimal directly, and with
411 the new arguments.
412
413 2002-10-15 Mark Mitchell <mark@codesourcery.com>
414
415 * decl.c (reshape_init): Fix typo.
416
417 * cp-tree.h (operator_name_info_t): Add arity.
418 * lex.c (init_operators): Initialize it.
419 * mangle.c (write_conversion_operator_name): New function.
420 (write_unqualified_name): Use it.
421 (write_template_args): Accept template arguments as a TREE_LIST.
422 (write_expression): Adjust handling of qualified names to match
423 specification.
424
425 2002-10-15 Jason Merrill <jason@redhat.com>
426
427 * call.c (call_builtin_trap): New fn.
428 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
429 (build_call): Don't set current_function_returns_abnormally outside
430 a function.
431
432 2002-10-14 Mark Mitchell <mark@codesourcery.com>
433
434 * class.c (check_field_decls): Remove empty_p parameter. Instead,
435 clear CLASSTYPE_EMPTY_P.
436 (build_base_field): Likewise.
437 (build_base_fields): Likewise.
438 (check_bases_and_members): Likewise.
439 (create_vtbl_ptr): Likewise.
440 (layout_class_type): Likewise. Ensure that empty classes have
441 size zero when used as base classes in the 3.2 ABI.
442 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
443 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
444 parameter.
445 (is_empty_class): Correct definition when using post-3.2 ABI.
446 * cp-tree.h (lang_type_class): Add empty_p.
447 (CLASSTYPE_EMPTY_P): New macro.
448
449 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
450
451 * init.c (build_delete): Do not apply save_expr for arrays.
452 (build_vec_delete): Likewise.
453
454 2002-10-14 Mark Mitchell <mark@codesourcery.com>
455
456 * decl.c (layout_var_decl): Call layout_decl even for variables
457 whose type is an array with unspecified bounds.
458
459 PR c++/7176
460 * lex.c (do_identifier): Add another option for the parsing
461 parameter.
462 * parse.y (do_id): Use it.
463
464 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
465
466 PRs C++/6803, C++/7721 and C++/7803
467 * decl.c (grokdeclarator): Gracefully handle template-name as
468 decl-specifier.
469
470 2002-10-11 Jason Molenda <jmolenda@apple.com>
471
472 * init.c (build_field_list): Provide uses_unions_p with a default
473 value.
474
475 2002-10-11 Mark Mitchell <mark@codesourcery.com>
476
477 PR c++/5661
478 * cp-tree.h (variably_modified_type_p): New function.
479 (grokdeclarator) Tighten check for variably modified types as
480 fields.
481 * pt.c (convert_template_argument): Do not allow variably modified
482 types as template arguments.
483 * tree.c (variably_modified_type_p): New function.
484
485 * NEWS: Document removal of "new X = ..." extension.
486 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
487 brace-enclosed initializers.
488 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
489 (initialize_local_var): Remove declaration.
490 (expand_static_init): Likewise.
491 * decl.c (next_initializable_field): New function.
492 (reshape_init): Likewise.
493 (check_initializer): Use them. Build dynamic initializer for
494 aggregates here too.
495 (initialize_local_var): Simplify, and incorporate cleanup
496 insertion code as well.
497 (destroy_local_var): Remove.
498 (cp_finish_decl): Tidy.
499 (expand_static_init): Fold checks for whether or not a variable
500 needs initialization into this function. Simplify.
501 * decl2.c (do_static_initialization): Simplify.
502 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
503 be done for us automatically.
504 (expand_default_init): Handle brace-enclosed initializers
505 correctly.
506 (expand_aggr_init_1): Remove RTL-generation code.
507 (build_vec_init): Remove "new X = ..." support.
508 * parse.y (new_initializer): Likewise.
509 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
510 brace-enclosed initializer.
511 (create_pseudo_type_info): Likewise.
512 * typeck2.c (store_init_value): Don't try to handle digest_init
513 being called more than once.
514 (digest_init): Tidy handling of brace-enclosed initializers.
515
516 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
517
518 * decl.c (typename_hash): Use htab_hash_pointer.
519
520 2002-10-10 Jim Wilson <wilson@redhat.com>
521
522 * decl.c (duplicate_decls): Don't call decl_attributes.
523
524 2002-10-09 Zack Weinberg <zack@codesourcery.com>
525
526 PR c/7353
527 * decl.c (start_decl): Unconditionally issue error for
528 'typedef foo = bar'.
529 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
530 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
531
532 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
533
534 * decl2.c (prune_vtable_vardecl): Delete unused function.
535
536 2002-10-03 Mark Mitchell <mark@codesourcery.com>
537
538 PR c++/7754
539 * decl2.c (finish_anon_union): Do not expand anonymous unions when
540 procesing template functions.
541 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
542 type. Call layout_decl.
543 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
544
545 2002-10-07 Richard Henderson <rth@redhat.com>
546
547 * decl2.c, pt.c: Revert c++/7754 fix.
548
549 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
550
551 PR c++/7804
552 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
553
554 2002-10-03 Mark Mitchell <mark@codesourcery.com>
555
556 PR c++/7931
557 * pt.c (for_each_template_parm_r): Handle BASELINKs.
558
559 PR c++/7754
560 * decl2.c (finish_anon_union): Do not expand anonymous unions when
561 procesing template functions.
562 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
563 type. Call layout_decl.
564 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
565
566 2002-10-03 Mark Mitchell <mark@codesourcery.com>
567
568 PR c++/8006
569 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
570 template parameters.
571 (globals): Add entity and need_abi_warning.
572 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
573 CLASSTYPE_TEMPLATE_INFO.
574 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
575 TYPE_TI_TEMPLATE.
576 (write_prefix): Handle typename types correctly.
577 (write_template_prefix): Handle template template parameters
578 correctly.
579 (start_mangling): Add entity parameter.
580 (finish_mangling): Warn about names whose mangling will change.
581 (mangle_decl_string): Adjust.
582 (mangle_type_string): Likewise.
583 (mangle_special_for_type): Likewise.
584 (mangle_ctor_vtbl_for_type): Likewise.
585 (mangle_thunk): Likewise.
586 (mangle_guard_variable): Likewise.
587 (mangle_ref_init_variable): Likewise.
588
589 2002-10-02 Mark Mitchell <mark@codesourcery.com>
590
591 PR c++/7188.
592 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
593 * cp-tree.h (emit_base_init): Rename to ....
594 (emit_mem_initializers): ... this.
595 (expand_member_init): Change prototype.
596 * init.c (perform_member_init): Compute explicit, rather than
597 requiring it as a parameter.
598 (sort_member_init): Rename to ...
599 (sort_mem_initializers): ... this. Process bases and data members
600 together.
601 (sort_base_init): Remove.
602 (emit_base_init): Rename to ...
603 (emit_mem_initializers): ... this.
604 (expand_aggr_vbase_init_1): Remove.
605 (construct_virtual_bases): Rename to ...
606 (construct_virtual_base): ... this.
607 (expand_member_init): Rework handling of base initializers.
608 * method.c (do_build_copy_constructor): Use
609 finish_mem_initializers.
610 * parse.y (member_init): Adjust calls to expand_member_init.
611 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
612 (tsubst_initializer_list): Use expand_member_init.
613 * semantics.c (finish_mem_intiailizers): Simplify.
614
615 2002-10-02 Matt Austern <austern@apple.com>
616 * decl.c (walk_vtables_r): Fixed typo that caused result to
617 never get a nonzero value.
618
619 2002-10-02 Roger Sayle <roger@eyesopen.com>
620
621 PR optimization/6627
622 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
623 from here, and move it to tree.h.
624 * decl.c (cxx_init_decl_processing): If storing the vbit
625 in function pointers, ensure that force_align_functions_log
626 is atleast one.
627
628 2002-10-02 Matt Austern <austern@apple.com>
629
630 * class.c (check_field_decls): Changed warning about const member
631 variables so that it doesn't get issued for a class aggregate.
632
633 2002-10-01 Mark Mitchell <mark@codesourcery.com>
634
635 * decl.c (cp_finish_decl): Make sure array types are laid out,
636 even if the array bounds are unknown.
637
638 2002-10-01 Steve Ellcey <sje@cup.hp.com>
639
640 * class.c (build_vtbl_initializer): Change build_c_cast
641 to build1.
642
643 2002-10-01 Mark Mitchell <mark@codesourcery.com>
644
645 * decl.c (cp_finish_decl): Make sure array types are laid out,
646 even if the array bounds are unknown.
647
648 * decl.c (cp_finish_decl): Correct check for dynamic
649 initialization of thread-local storage.
650
651 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
652
653 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
654 overloaded.
655
656 2002-09-30 Steve Ellcey <sje@cup.hp.com>
657
658 * class.c (build_vtbl_initializer): Add cast.
659 (add_vcall_offset_vtbl_entries_1):
660 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
661
662 2002-09-30 Mark Mitchell <mark@codesourcery.com>
663
664 * class.c (walk_subobject_offsets): Correct the calculation of
665 offsets for virtual bases. Correct the counting of array
666 elements.
667 (layout_nonempty_base_or_field): Simplify. Correct the
668 calculation of offsets to be propagated through the binfo
669 hierarchy.
670 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
671 Add the FIELD_DECL to TYPE_FIELDS.
672 (build_base_fields): Adjust accordingly.
673 (layout_virtual_bases): Use build_base_field.
674 (end_of_class): Return a tree, not an integer.
675 (warn_about_ambiguous_direct_bases): Rename to ...
676 (warn_about_ambiguous_bases): ... this.
677 (include_empty_classes): New function.
678 (layout_class_type): Create an alternative version of the type to
679 be used when as a base class type. Do not call
680 finish_record_layout until we are done laying out the class.
681 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
682 as_base.
683 (CLASSTYPE_SIZE): Reimplement.
684 (CLASSTYPE_SIZE_UNIT): Likewise.
685 (CLASSTYPE_ALIGN): Likweise.
686 (CLASSTYPE_USER_ALIGN): Likewise.
687 (CLASSTYPE_AS_BASE): New macro.
688 (DECL_INITIALIZED_P): Likewise.
689 (extract_init): Remove prototype.
690 (build_forced_zero_init): Rename to ...
691 (build_zero_init): ... this.
692 (force_store_init_value): Remove.
693 * decl.c (obscure_complex_init): Remove.
694 (duplicate_decls): Copy DECL_INITIALIZED_P.
695 (check_initializer): Do not leave junk in DECL_INITIAL.
696 (cp_finish_decl): Handle zero-initialization of entities with
697 static storage duration.
698 * expr.c (extract_init): Remove.
699 * init.c (build_forced_zero_init): Remove.
700 (build_zero_init): New function.
701 (build_default_init): Use it.
702 (build_field_list): Skip FIELD_DECLs for base subobjects.
703 (push_base_cleanups): Likewise.
704 * method.c (do_build_assign_ref): Likewise.
705 (synthesize_exception_spec): Likewise.
706 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
707 (regenerate_decl_from_template): To not set DECL_INITIAL for a
708 static data member whose initialization took place in its class.
709 (instantiate_decl): Do not pass an initializer to cp_finish_decl
710 in that situation.
711 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
712 (dfs_unuse_fields): Likewise.
713 * tree.c (pod_type_p): Handle error_mark_node.
714 (zero_init_p): Likewise.
715 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
716 subobjects.
717 * typeck2.c (store_init_value): Remove #if 0'd code.
718 (force_store_init_value): Remove.
719 (process_init_constructor): Use build_zero_init.
720
721 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
722
723 PR c++/7788
724 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
725
726 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
727
728 * cp-tree.h: Fix comment typos.
729 * decl.c: Likewise.
730 * pt.c: Likewise.
731
732 2002-09-25 Mark Mitchell <mark@codesourcery.com>
733
734 * cp/class.c (contains_empty_class_p): New method.
735 (walk_subobject_offsets): Correct computation of field offset.
736 (layout_empty_base): Correct placement of emtpy base classes.
737 (layout_class_type): Warn about ABI changes.
738
739 2002-09-23 Mark Mitchell <mark@codesourcery.com>
740
741 * cp/class.c (layout_virtual_bases): Do not round the size of the
742 type to a multiple of the alignment before laying out virtual bases.
743 (layout_class_type): Correct handling of bit-fields that are wider
744 than their type inside unions. Round the size of the type to a
745 even number of bytes when computing the size without virtual
746 bases.
747 * cp/cp-tree.h (abi_version_at_least): New macro.
748
749 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
750
751 * ChangeLog: Follow spelling conventions.
752 * ChangeLog.2: Likewise.
753 * call.c: Likewise.
754 * class.c: Likewise.
755 * cp-tree.h: Likewise.
756 * cvt.c: Likewise.
757 * decl.c: Likewise.
758 * decl2.c: Likewise.
759 * except.c: Likewise.
760 * friend.c: Likewise.
761 * g++spec.c: Likewise.
762 * init.c: Likewise.
763 * lex.c: Likewise.
764 * mangle.c: Likewise.
765 * method.c: Likewise.
766 * operators.def: Likewise.
767 * optimize.c: Likewise.
768 * pt.c: Likewise.
769 * rtti.c: Likewise.
770 * search.c: Likewise.
771 * semantics.c: Likewise.
772 * spew.c: Likewise.
773 * tree.c: Likewise.
774 * typeck.c: Likewise.
775
776 2002-09-18 Devang Patel <dpatel@apple.com>
777
778 * cp/cp-tree.h: New prototype for walk_vtabls().
779 * cp/decl.c (walk_vtables_r): New function.
780 (struct cp_binding_level): Add new members, namespaces,
781 names_size and vtables.
782 (add_decl_to_level): Add decl in namespaces or vtables
783 chain, if conditions match.
784 (walk_vtables): New function.
785 (walk_namespaces_r): Travers separate namespace chain
786 for namespace decls.
787 (wrapup_globals_for_namespace): Use names_size instead
788 of list_length().
789 * cp/decl2.c (finish_file): Use walk_vtables() instead of
790 walk_globals() to walk vtable decls.
791
792 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
793
794 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
795 ICE with invalid pointers & references.
796
797 2002-09-17 Zack Weinberg <zack@codesourcery.com>
798
799 * Make-lang.in: Remove all references to the demangler.
800 * cxxfilt.c: Moved to binutils.
801
802 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
803
804 PR c++/7718
805 * pt.c (tsubst_decl): Remove assert.
806
807 Remove DR 295 implementation.
808 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
809 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
810 about ignoring volatile qualifiers.
811
812 * search.c (lookup_member): Correct documentation.
813
814 2002-09-16 Geoffrey Keating <geoffk@apple.com>
815
816 * cp-tree.h (union lang_tree_node): Add chain_next option.
817
818 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
819
820 * parse.y (parse_finish_call_expr): Check lookup_member result.
821
822 PR c++/7015
823 * semantic.c (finish_asm_stmt): Fix operand/output_operands
824 thinko.
825 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
826
827 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
828
829 PR c++/7919
830 * call.c (build_over_call): Convert this pointer for fns found by
831 using decls.
832
833 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
834
835 * ChangeLog: Follow spelling conventions.
836 * ChangeLog.1: Likewise.
837
838 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
839
840 PR c++/7768
841 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
842
843 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
844
845 * error.c: Fix comment formatting.
846 * except.c: Likewise.
847 * expr.c: Likewise.
848 * friend.c: Likewise.
849 * g++spec.c: Likewise.
850 * init.c: Likewise.
851 * lex.c: Likewise.
852 * mangle.c: Likewise.
853 * method.c: Likewise.
854 * optimize.c: Likewise.
855 * pt.c: Likewise.
856 * rtti.c: Likewise.
857 * search.c: Likewise.
858 * semantics.c: Likewise.
859 * spew.c: Likewise.
860 * tree.c: Likewise.
861 * typeck.c: Likewise.
862 * typeck2.c: Likewise.
863
864 2002-09-13 Matt Austern <austern@apple.com>
865
866 PR C++/7828
867 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
868 * cp/call.c: Change call-by-const-reference mechanism to use
869 non_cast_lvalue_p when deciding whether the create a temporary.
870 We need a temporary when passing, e.g. (long) x by const ref.
871
872 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
873
874 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
875
876 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
877
878 * decl.c: Fix comment formatting.
879 * decl2.c: Likewise.
880
881 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
882
883 * call.c: Fix comment formatting.
884 * class.c: Likewise.
885 * cp-lang.c: Likewise.
886 * cp-tree.h: Likewise.
887 * cvt.c: Likewise.
888
889 2002-09-11 Zack Weinberg <zack@codesourcery.com>
890
891 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
892 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
893 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
894 minor adjustments (use version_string, eliminate yet another
895 duplicate of xmalloc)
896
897 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
898
899 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
900
901 2002-09-05 Jason Merrill <jason@redhat.com>
902
903 * typeck2.c (add_exception_specifier): Only pedwarn for an
904 incomplete type.
905 (require_complete_eh_spec_types): New fn.
906 (cxx_incomplete_type_diagnostic): Also support pedwarning.
907 * typeck.c (complete_type_or_diagnostic): Likewise.
908 * call.c (build_call): Call require_complete_eh_spec_types.
909 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
910 on an incomplete type.
911
912 2002-09-04 Jakub Jelinek <jakub@redhat.com>
913
914 * decl.c (start_cleanup_fn): Clear interface_only before
915 start_function, restore it afterwards.
916
917 2002-08-31 Jason Merrill <jason@redhat.com>
918
919 * cp-lang.c (cp_expr_size): Allow initialization from a
920 CONSTRUCTOR.
921
922 2002-08-30 Richard Henderson <rth@redhat.com>
923
924 PR opt/7515
925 * tree.c: Include target.h.
926 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
927 don't bind locally.
928 * Makefile.in (tree.o): Update.
929
930 2002-08-27 Mark Mitchell <mark@codesourcery.com>
931
932 * class.c (layout_virtual_bases): Warn about bugs in G++ that
933 result in incorrect object layouts.
934 (layout_class_type): Likewise.
935
936 2002-08-24 Matt Austern <austern@apple.com>
937
938 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
939 are allowable.
940 (real_lvalue_p): Update caller.
941 (lvalue_p): Ditto.
942 (non_cast_lvalue_or_else): New.
943 * tree.h: Declare it.
944 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
945
946 2002-08-22 Mark Mitchell <mark@codesourcery.com>
947
948 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
949 and COND_EXPR specially; fix error message output.
950
951 2002-08-22 Jason Merrill <jason@redhat.com>
952
953 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
954 * semantics.c (nullify_returns_r): Likewise.
955
956 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
957
958 Fix PR/7621
959 * typeck.c (finish_class_member_access_expr): Diagnose cases where
960 name lookup finds nothing.
961
962 2002-08-15 Jason Merrill <jason@redhat.com>
963
964 * semantics.c (finish_then_clause): Remove redundant assignment.
965 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
966 extra binding level outside the if/switch statement.
967 (finish_while_cond, finish_for_cond): Rewrite complex condition
968 into the loop body.
969
970 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
971
972 * parse.y (sizeof, alignof, typeof): New non-terminals to
973 increment skip_evaluation. Replace terminals with them and
974 decrement skip_evaluation at the end of rules using them.
975 * decl2.c (mark_used): Don't assemble_external if
976 skipping evaluation.
977
978 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
979
980 Fix PR/7504
981 * parse.y (parse_finish_call_expr): Handle incomplete
982 type used to name a scope.
983
984 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
985
986 PR c++/7598
987 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
988 regression caused by my 2002-08-08 patch.
989
990 2002-08-13 Mark Mitchell <mark@codesourcery.com>
991
992 * decl.c (pushdecl_class_level): Honor requests to bind names to
993 OVERLOADs.
994
995 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
996
997 * decl2.c (build_call_from_tree): Fix uninitialized variable.
998 * parse.y (parse_finish_call_expr): Likewise.
999 * repo.c (old_args, old_dir, old_main): Const-ify.
1000
1001 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
1002
1003 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
1004 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
1005 * optimize.c (maybe_clone_body): Likewise.
1006 * pt.c (tsubst_enum): Likewise.
1007 (lookup_template_class): Likewise.
1008 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
1009
1010 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
1011
1012 * lang-specs.h: Remove -ansi.
1013
1014 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
1015
1016 * tree.c (maybe_dummy_object): Replace // with /* */
1017
1018 2002-08-09 Mark Mitchell <mark@codesourcery.com>
1019
1020 * call.c (standard_conversion): Use build_ptrmem_type.
1021 * cp-tree.h (build_ptrmem_type): New function.
1022 (adjust_result_of_qualified_name_lookup): Likewise.
1023 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
1024 static data members.
1025 (build_ptrmem_type): New function.
1026 (grokdeclarator): Do not use build_offset_type when encountering a
1027 qualified name.
1028 * parse.y (parse_finish_call_expr): Use
1029 adjust_result_of_qualified_name_lookup.
1030 * search.c (adjust_result_of_qualified_name_lookup): New function.
1031 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
1032 accessing OFFSET_TYPEs directly.
1033
1034 2002-08-08 Mike Stump <mrs@apple.com>
1035
1036 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
1037 (type_decays_to): Likewise.
1038 * class.c (find_final_overrider): Likewise.
1039 (maybe_note_name_used_in_class): Likewise.
1040 * decl.c (current_tmpl_spec_kind): Likewise.
1041 (add_binding): Likewise.
1042 (push_class_binding): Likewise.
1043 (duplicate_decls): Likewise.
1044 (layout_var_decl): Likewise.
1045 (grokfndecl): Likewise.
1046 (grokdeclarator): Likewise.
1047 (check_default_argument): Likewise.
1048 * decl2.c (handle_class_head): Likewise.
1049 * error.c (dump_template_decl): Likewise.
1050 * init.c (build_offset_ref): Likewise.
1051 * pt.c (check_specialization_scope): Likewise.
1052 (determine_specialization): Likewise.
1053 (check_explicit_specialization): Likewise.
1054 (maybe_check_template_type): Likewise.
1055 (process_partial_specialization): Likewise.
1056 (check_default_tmpl_args): Likewise.
1057 (push_template_decl_real): Likewise.
1058 (convert_template_argument): Likewise.
1059 (try_class_unification): Likewise.
1060 (get_bindings_real): Likewise.
1061 (do_decl_instantiation): Likewise.
1062 * semantics.c (begin_function_definition): Likewise.
1063 (finish_member_declaration): Likewise.
1064 (check_multiple_declarators): Likewise.
1065 * typeck.c (comp_array_types): Likewise.
1066 (comptypes): Likewise.
1067 (expr_sizeof): Likewise.
1068 (build_binary_op): Likewise.
1069 (dubious_conversion_warnings): Likewise.
1070 (check_return_expr): Likewise.
1071
1072 2002-08-08 Mark Mitchell <mark@codesourcery.com>
1073
1074 * typeck.c (build_class_member_access_expr): Do not return
1075 error_mark_node when no error has occurred.
1076
1077 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1078
1079 * typeck.c (build_component_addr): Remove.
1080 (build_unary_op): Just check it's not a bitfield, and then build
1081 an ADDR_EXPR.
1082
1083 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1084
1085 * class.c (convert_to_base): Correct check for error_mark_node.
1086 (create_vtable_ptr): Remove unused VFUNS_P parm.
1087
1088 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1089
1090 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
1091
1092 2002-08-07 Mark Mitchell <mark@codesourcery.com>
1093
1094 Rework build_component_ref.
1095 * call.c (build_vfield_ref): Do not go through build_component_ref.
1096 (build_field_call): Use build_class_member_access_expr.
1097 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
1098 (build_object_call): Likewise.
1099 * class.c (convert_to_base): New function.
1100 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
1101 (instantiate_type): Handle BASELINKs.
1102 * cp-tree.def (BASELINK): New tree code.
1103 * cp-tree.h (BASELINK_P): Reimplement.
1104 (SET_BASELINK_P): Remove.
1105 (BASELINK_BINFO): Reimplement.
1106 (BASELINK_FUNCTIONS): Likewise.
1107 (BASELINK_ACCESS_BINFO): Likewise.
1108 (BASELINK_OPTYPE): Likewise.
1109 (convert_to_base): New function.
1110 (name_p): Likewise.
1111 (build_object_ref): Remove.
1112 (build_component_ref_1): Likewise.
1113 (build_component_ref): Likewise.
1114 (build_x_component_ref): Likewise.
1115 (build_class_member_access_expr): New function.
1116 (finish_class_member_access_expr): Likewise.
1117 (build_ptrmemfunc_access_expr): Likewise.
1118 * decl.c (grokdeclarator): Handle BASELINKs.
1119 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
1120 finish_class_member_access_expr.
1121 (arg_assoc): Handle BASELINKs.
1122 (do_class_using_decl): Likewise.
1123 * error.c (dump_decl): Likewise.
1124 (dump_expr): Use build_ptrmemfunc_access_expr.
1125 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
1126 destructors.
1127 (build_throw): Use BASELINK_FUNCTIONS.
1128 * init.c (perform_member_init): Use
1129 build_class_member_access_expr.
1130 (build_offset_ref): Handle BASELINKs. Use
1131 build_class_member_access_expr.
1132 * method.c (hack_identifier): Likewise.
1133 * parse.y (do_id): Use BASELINK, not TREE_LIST.
1134 (primary): Remove uses of build_object_ref.
1135 * pt.c (lookup_template_function): Handle BASELINKs.
1136 (resolve_overloaded_unification): Likewise.
1137 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
1138 (lookup_field): Use BASELINK, not TREE_LIST.
1139 (lookup_fnfiels): Likewise.
1140 (setup_class_bindings): Likewise.
1141 * semantics.c (finish_object_call_expr): Do not use
1142 build_method_call when we already know what function is being
1143 called.
1144 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
1145 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
1146 TREE_CHAIN.
1147 (name_p): New function.
1148 * typeck.c (build_object_ref): Remove.
1149 (build_component_ref_1): Likewise.
1150 (build_x_component_ref): Likewise.
1151 (build_class_member_access_expr): New function.
1152 (finish_class_member_access_expr): Likewise.
1153 (build_ptrmemfunc_access_expr): Likewise.
1154 (get_member_function_from_ptrfunc): Use
1155 build_ptrmemfunc_access_expr.
1156 (build_binary_op): Likewise.
1157 (build_unary_op): Likewise.
1158 (build_ptrmemfunc): Likewise.
1159 (pfn_from_ptrmemfunc): Likewise.
1160 * typeck2.c (build_m_component_ref): Adjust comment.
1161
1162 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
1163
1164 * Make-lang.in (CXX_C_OBJS): Update.
1165 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
1166 * cp-tree.h (cxx_decode_option): Remove.
1167 * decl2.c (compare_options, lang_f_options, unsupported_options,
1168 cxx_decode_option): Remove.
1169
1170 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
1171
1172 * typeck.c (build_x_unary_op): Handle pointer-to-member.
1173
1174 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
1175
1176 * class.c: Don't include obstack.h.
1177 (popclass):
1178 * decl2.c: Delete bogus comment.
1179 * error.c: Don't include obstack.h.
1180 * except.c: Likewise.
1181 (dump_type): Correct comment.
1182 * method.c: Don't include obstack.h.
1183 * tree.c: Likewise.
1184
1185 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
1186
1187 Fix PR/2213
1188 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
1189 expressions to pointer-to-data-member of pointer-to-member-functions.
1190
1191 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
1192
1193 * cvt.c (ocp_convert): Delete obsolete code.
1194 * parse.y (permanent_obstack): Delete declaration.
1195 * pt.c (permanent_obstack): Delete declaration.
1196 * repo.c (permanent_obstack): Delete declaration.
1197 (open_repo_file): Use xmalloc instead of permanent_obstack.
1198 (init_repo): Use xstrdup instead of permanent_obstack.
1199
1200 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
1201
1202 * cp-tree.h (VF_DERIVED_VALUE): Remove.
1203 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
1204
1205 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
1206
1207 PR 7470.
1208 C++ ABI change - vfunc ordering.
1209 * class.c (add_virtual_function): Remove.
1210 (dfs_modify_all_vtables): Take list of all declared
1211 virtuals. Assign all that are not in primary base.
1212 (check_for_override): Adjust comments.
1213 (create_vtable_ptr): Take single list of virtuals. Build chain
1214 of declared virtuals here.
1215 (layout_class_type): Take single list of virtuals. Adjust.
1216 (finish_struct_1): Keep virtuals on single list. Adjust.
1217
1218 2002-08-02 Mark Mitchell <mark@codesourcery.com>
1219
1220 * init.c (build_member_call): Use build_new_method_call, not
1221 build_method_call.
1222
1223 2002-08-02 Krister Walfridsson <cato@df.lth.se>
1224
1225 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
1226
1227 2002-08-02 Mark Mitchell <mark@codesourcery.com>
1228
1229 * call.c (build_method_call): Issue a more helpful error message
1230 about ambiguous method names.
1231
1232 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
1233
1234 * tree.c (build_shared_int_cst): Make cache file scope, and
1235 GTY it.
1236
1237 2002-08-02 Jason Merrill <jason@redhat.com>
1238
1239 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
1240 (cp_expr_size): New fn.
1241 * call.c (build_over_call): Lose empty class hackery.
1242 (convert_arg_to_ellipsis): Promote non-POD warning to error.
1243 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
1244
1245 * semantics.c (expand_body): Do tree optimization in the function
1246 context, too.
1247
1248 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
1249
1250 * cp-tree.h: Move all warning and flag declarations to c-common.h.
1251 * decl.c: Move all warning and flag variables to c-common.c.
1252 * decl2.c: Move all warning and flag variables to c-common.c.
1253 * lex.c (flag_digraphs): Remove.
1254 (warn_traditional): Now in c-common.c.
1255
1256 2002-07-31 Mark Mitchell <mark@codesourcery.com>
1257
1258 * call.c (build_field_call): Do not look up the field by name.
1259 (build_method_call): Simplify.
1260 (struct z_candidate): Add access_path and conversion_path. Remove
1261 basetype_path.
1262 (convert_class_to_reference): Adjust use of
1263 add_function_candidate.
1264 (add_candidate): Add conversion_path argument.
1265 (add_function_candidate): Use it.
1266 (add_conv_dndidate): Likewise.
1267 (build_builtin_candidate): Likewise.
1268 (add_template_candidate_real): Add conversion_path argument.
1269 (add_template_conv_candidate): Likewise.
1270 (add_template_candidate): Likewise.
1271 (build_user_type_conversion_1): Use it.
1272 (build_new_function_call): Remove name lookup code. Adjust use of
1273 add_template_candidate and add_function_candidate.
1274 (build_new_op): Likewise.
1275 (convert_like_real): Use build_special_member_call.
1276 (build_over_call): Use cand->conversion_path.
1277 (build_special_member_call): New method.
1278 (build_new_method_call): Remove name lookup code.
1279 * cp-tree.def (OFFSET_REF): Update documentation.
1280 (TEMPLATE_ID_EXPR): Likewise.
1281 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
1282 (BASELINK_OPTYPE): Likewise.
1283 (build_new_method_call): Adjust prototype.
1284 (build_special_member_call): New method.
1285 (build_baselink): New method.
1286 (build_offset_ref_call_from_tree): Likewise.
1287 (build_call_from_tree): Likewise.
1288 (finish_qualified_call_expr): Remove.
1289 (finish_call_expr): Adjust prototype.
1290 (build_x_function_call): Remove.
1291 * cvt.c (ocp_convert): Use build_special_member_call.
1292 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
1293 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
1294 CALL_EXPR.
1295 (build_offset_ref_call_from_tree): New function.
1296 (build_call_from_tree): Likewise.
1297 * init.c (expand_cleanup): Use build_special_member_call.
1298 (expand_default_init): Likewise.
1299 (build_member_call): Use finish_call_expr.
1300 (build_new_1): Use build_special_member_call.
1301 (push_base_cleanups): Likewise.
1302 * method.c (do_build_assign_ref): Likewise.
1303 * parse.y (template_id): Do not pass a COMPONENT_REF to
1304 lookup_template_function.
1305 (primary): Use parse_finish_call_epxr, not finish_call_expr.
1306 (parse_finish_call_expr): New function.
1307 * pt.c (lookup_template_function): Add assertions.
1308 * search.c (lookup_base): Allow T to be a binfo.
1309 (build_baselink): New function.
1310 (lookup_member): Use it.
1311 * semantics.c (finish_call_expr): Do not do name lookup.
1312 (finish_object_call_expr): Remove #if 0'd code.
1313 (finish_qualified_call_expr): Remove.
1314 * typeck.c (build_x_function_call): Remove.
1315 (build_static_case): Use build_special_member_call.
1316 * typeck2.c (build_functional_cast): Likewise.
1317
1318 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1319
1320 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
1321
1322 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
1323
1324 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
1325
1326 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
1327
1328 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
1329 documentation.
1330
1331 2002-07-29 Alan Modra <amodra@bigpond.net.au>
1332
1333 * cp-tree.h: Comment typo fix.
1334
1335 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
1336
1337 * spew.c (space_for_token): Allocate zeroed memory for a new token
1338 chunk.
1339
1340 2002-07-27 Roger Sayle <roger@eyesopen.com>
1341
1342 * decl.c (builtin_function_1): No need to explicitly mark
1343 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
1344
1345 2002-07-27 Roger Sayle <roger@eyesopen.com>
1346
1347 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
1348
1349 2002-07-26 Jason Merrill <jason@redhat.com>
1350
1351 * call.c (build_over_call): Likewise.
1352 (cp_convert_parm_for_inlining): New fn.
1353 (convert_for_arg_passing): New fn.
1354 (convert_default_arg, build_over_call): Use it.
1355 (type_passed_as): New fn.
1356 * pt.c (tsubst_decl): Use it.
1357 * decl2.c (cp_build_parm_decl): New fn.
1358 (build_artificial_parm): Use it.
1359 (start_static_storage_duration_function): Likewise.
1360 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
1361 (grokparms): Don't mess with DECL_ARG_TYPE.
1362 * typeck.c (convert_arguments): Use convert_for_arg_passing.
1363 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
1364 Define.
1365 * cp-tree.h: Declare new fns.
1366
1367 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
1368
1369 * cp-tree.h (flag_operator_names): Remove.
1370 * decl2.c (flag_operator_names): Remove.
1371 (lang_f_options): Remove operator-names.
1372 * lex.c (D_OPNAME): Remove.
1373 (reswords): Remove operator names.
1374 (rid_to_yy): Remove operator names.
1375 (init_reswords): No need to handle D_OPNAME.
1376 * spew.c (read_process_identifier): There are no operator
1377 names.
1378
1379 2002-07-26 Jason Merrill <jason@redhat.com>
1380
1381 * dump.c (cp_dump_tree): Call c_dump_tree.
1382 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
1383
1384 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
1385
1386 * error.c (print_whitespace): Remove.
1387 * g++spec.c (LIBUNWIND): Move.
1388 * mangle.c (mangled_position, write_signed_number): Remove.
1389
1390 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
1391
1392 * decl2.c (cxx_decode_option): Similarly.
1393
1394 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
1395
1396 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
1397 (cxx_sizeof_or_alignof_type): Take a third argument.
1398 (cxx_sizeof): Adjust definition.
1399 (cxx_alignof): Likewise.
1400 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
1401 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
1402 complaining.
1403 (c_sizeof_nowarn): Remove definition.
1404 (build_unary_op): Use cxx_sizeof_nowarn.
1405
1406 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
1407
1408 * tree.c (cp_build_qualified_type_real): When copying
1409 pointer-to-method types, unshare the record that holds
1410 the cached pointer-to-member-function type.
1411
1412 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
1413
1414 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
1415
1416 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
1417
1418 Fix PR/7363:
1419 * typeck.c (cxx_sizeof_or_alignof_type): New function.
1420 (c_sizeof): Remove definition.
1421 (expr_sizeof): Use cxx_sizeof.
1422 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
1423 * decl.c (finish_destructor_body): Use cxx_sizeof.
1424 * semantics.c (finish_alignof): Likewise.
1425 (finish_alignof): Use cxx_alignof.
1426 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
1427 (cxx_sizeof_or_alignof_type): Declare.
1428 (my_friendly_assert): Move to ../c-common.h.
1429
1430 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
1431
1432 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
1433
1434 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1435
1436 PR c++/7347, c++/7348
1437 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
1438 * decl.c (make_typename_type): Use it.
1439 (make_unbound_class_template): Likewise.
1440 (lookup_name_real): Don't call type_access_control if scope is
1441 template parameter dependent.
1442 * parse.y (template_arg): Call make_unbound_class_template with
1443 tf_parsing set.
1444 (nest_name_specifier): Call make_typename_type with tf_parsing set.
1445 (typename_sub0): Likewise.
1446 (typename_sub1): Likewise.
1447 (instantiate_decl): Push class scope.
1448 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
1449 for both static variable and member function template.
1450 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
1451 and arguments.
1452 * search.c (type_access_control): Do type access for TEMPLATE_DECL
1453 too.
1454
1455 2002-07-20 Roger Sayle <roger@eyesopen.com>
1456
1457 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
1458 test by using positive_option. Make whitespace consistent.
1459
1460 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
1461
1462 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
1463 members with 'locus'. Adjust use throughout.
1464 (struct feed): Likewise.
1465 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
1466 Adjust use.
1467 (snarf_defarg): Use error(), not error_with_file_and_line().
1468
1469 2002-07-19 Chris Demetriou <cgd@broadcom.com>
1470
1471 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
1472 cpp_options is included.
1473
1474 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1475
1476 PR c++/2862, c++/2863
1477 * pt.c (determine_specialization): Compare the length of
1478 TYPE_ARG_TYPES. Tidy.
1479
1480 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1481
1482 PR c++/3797
1483 * decl.c (duplicate_decls): Don't propagate inlining parameters from
1484 olddecl to newdecl when newdecl is a specialization of the
1485 instantiation olddecl.
1486
1487 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1488
1489 PR c++/4802, c++/5387
1490 * decl.c (make_typename_type): Use enforce_access.
1491
1492 2002-07-17 Scott Snyder <snyder@fnal.gov>
1493
1494 PR c++/7320
1495 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
1496
1497 2002-07-12 Mark Mitchell <mark@codesourcery.com>
1498
1499 * class.c (add_method): Correct handling of conversion operators.
1500
1501 2002-07-11 Mark Mitchell <mark@codesourcery.com>
1502
1503 PR c++/7224
1504 * class.c (add_method): Simplify.
1505
1506 2002-07-11 Jason Merrill <jason@redhat.com>
1507
1508 PR c++/7279
1509 * tree.c (cp_copy_res_decl_for_inlining): Also copy
1510 TREE_ADDRESSABLE.
1511
1512 2002-07-10 Graham Stott <graham.stott@btinternet.com>
1513
1514 * pt.c (template_parm_this_level_p, push_template_decl_real):
1515 Pass depth as int pointer.
1516
1517 2002-07-11 Tim Josling <tej@melbpc.org.au>
1518
1519 Remove front end hard coding from gengtype.c.
1520
1521 * config-lang.in (gtfiles): Add files needed for this front end.
1522
1523 2002-07-10 Mark Mitchell <mark@codesourcery.com>
1524
1525 * cp-tree.h (unqualified_name_lookup_error): Declare it.
1526 (begin_function_definition): Adjust prototype.
1527 * lex.c (unqualified_name_lookup_error): New function, split out
1528 from ...
1529 (do_identifier): ... here.
1530 * parse.y (parse_begin_function_definition): New function.
1531 (fn.def1): Use it.
1532 * semantics.c (begin_function_definition): Accept decl-specifiers
1533 and attributes as separate parameters.
1534
1535 2002-07-10 Jason Merrill <jason@redhat.com>
1536
1537 PR c++/6255
1538 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
1539 modifying the old one.
1540
1541 2002-07-09 Mark Mitchell <mark@codesourcery.com>
1542
1543 * cp-tree.h (constructor_name_p): Declare it.
1544 (check_template_template_default_arg): Likewise.
1545 * class.c (handle_using_decl): Use constructor_name_p.
1546 * decl.c (grokdeclarator): Likewise.
1547 * decl2.c (constructor_name_p): Define it.
1548 * init.c (build_member_call): Use constructor_name_p.
1549 * parse.y (template_parm): Use check_template_template_default_arg.
1550 * pt.c (check_explicit_specialization): Use constructor_name_p.
1551 * semantics.c (check_template_template_default_arg): New function.
1552
1553 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1554
1555 * pt.c (can_complete_type_without_circularity): Add static to
1556 function definition.
1557
1558 2002-07-08 Mark Mitchell <mark@codesourcery.com>
1559
1560 * cp-tree.h (have_extern_spec): Declare it
1561 * decl.c (have_extern_spec): Define it.
1562 (start_decl): Eliminate use of used_extern_spec.
1563 (start_function): Likewise.
1564 * parse.y (have_extern_spec): Remove declaration.
1565 (used_extern_spec): Likewise.
1566 (frob_specs): Eliminate use of used_extern_spec.
1567 (.hush_warning): Likewise.
1568
1569 2002-07-07 Mark Mitchell <mark@codesourcery.com>
1570
1571 * Make-lang.in (cp/parse.o): Depend on decl.h.
1572 * cp-tree.h (do_decl_instantiation): Change prototype.
1573 * parse.y: Include decl.h.
1574 (parse_decl_instantiation): New function.
1575 (explicit_instantiation): Use it.
1576 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
1577 and DECLSPECS.
1578
1579 2002-07-07 Roger Sayle <roger@eyesopen.com>
1580
1581 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
1582 constructor and destructor tests when passed a TEMPLATE_DECL.
1583
1584 2002-07-05 Jason Merrill <jason@redhat.com>
1585
1586 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
1587 pointers.
1588
1589 PR optimization/7145
1590 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
1591
1592 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
1593
1594 Repair damage on weak-impared targets caused by my previous patch.
1595 * cp-tree.h (import_export_tinfo): Add parameter.
1596 * decl2.c (import_export_tinfo): Add parameter, post adjust
1597 DECL_COMDAT.
1598 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
1599 import_export_tinfo.
1600
1601 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1602
1603 PR c++/6944
1604 * init.c (build_aggr_init): Remove qualifiers of init before calling
1605 build_vec_init.
1606 (build_vec_init): Flatten multi-dimensional array during cleanup.
1607 (build_vec_delete_1): Abort if the type of each element is array.
1608
1609 2002-07-03 Graham Stott <graham.stott@btinternet.com>
1610
1611 * pt.c (instantiate_class_template): Fix typo.
1612
1613 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1614
1615 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
1616 by CVS conflict in my last patch.
1617
1618 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1619
1620 PR c++/6716
1621 * pt.c (can_complete_type_without_circularity): New function.
1622 (instantiate_class_template): Use it.
1623 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
1624 message due to incomplete fields.
1625
1626 2002-07-01 Mark Mitchell <mark@codesourcery.com>
1627
1628 PR c++/7112
1629 * mangle.c (write_expression): Add mangling for sizeof when
1630 applied to a type.
1631 * operators.def: Remove stale comment.
1632
1633 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
1634
1635 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
1636 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
1637 (tinfo_decl_type): Replace with ...
1638 (type_info_ptr_type): ... this.
1639 (import_export_tinfo): Declare.
1640 (tinfo_decl_p): Rename to ...
1641 (unemitted_tinfo_decl_p): ... this.
1642 * decl2.c (import_export_decl): Break out tinfo handling into ...
1643 (import_export_tinfo): ... here. New function.
1644 (finish_file): Adjust.
1645 * rtti.c (TINFO_REAL_NAME): New macro.
1646 (init_rtti_processing): Create the tinfo types.
1647 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
1648 (get_tinfo_decl): Adjust.
1649 (get_tinfo_ptr): New function.
1650 (get_type_id): Use it.
1651 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
1652 (ptr_initializer): Use get_tinfo_ptr.
1653 (ptm_initializer): Likewise.
1654 (synthesize_tinfo_var): Break into ...
1655 (get_pseudo_ti_init): ... this. Just create the initializer.
1656 (get_pseudo_ti_desc): .. and this.
1657 (create_real_tinfo_var): Remove.
1658 (create_pseudo_type_info): Don't create the vtable decl here.
1659 (get_vmi_pseudo_type_info): Remove.
1660 (create_tinfo_types): Adjust.
1661 (tinfo_decl_p): Rename to ...
1662 (unemitted_tinfo_decl_p): ... here. Adjust.
1663 (emit_tinfo_decl): Adjust. Create the initializer.
1664
1665 2002-06-27 Mark Mitchell <mark@codesourcery.com>
1666
1667 PR c++/6695
1668 * pt.c (tsubst_friend_class): Substitute into the context of the
1669 friend before using it.
1670
1671 2002-06-26 Mark Mitchell <mark@codesourcery.com>
1672
1673 * cp-tree.h (xref_tag): Change prototype.
1674 (handle_class_head): Likewise.
1675 (build_x_component_ref): Likewise.
1676 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
1677 (xref_tag): Take attributes as a separate parameter.
1678 (xref_tag_from_type): Adjust call to xref_tag.
1679 * decl2.c (build_expr_from_tree): Adjust call to
1680 build_x_component_ref.
1681 (handle_class_head): Take attributes as a separate parameter.
1682 * parse.y (parse_xref_tag): New function.
1683 (parse_handle_class_head): Likewise.
1684 (primary): Use parse_xref_tag.
1685 (class_head_decl): Use parse_handle_class_head.
1686 (class_head_defn): Likewise.
1687 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
1688 (build_dynamic_cast_1): Likewise.
1689 (create_pseudo_type_info): Likewise.
1690 (emit_support_tinfos): Likewise.
1691 * typeck.c (build_object_ref): Adjust call to
1692 build_x_component_ref.
1693 (build_x_component_ref): Remove protect parameter.
1694
1695 2002-06-25 Mark Mitchell <mark@codesourcery.com>
1696
1697 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
1698 * class.c (handle_using_decl): Likewise.
1699 (instantiate_type): Likewise.
1700 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
1701 (xref_basetypes): Change prototype.
1702 (begin_mem_initializers): New function.
1703 (get_overloaded_fn): Likewise.
1704 * decl.c (xref_basetypes): Simplify.
1705 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
1706 * init.c (build_offset_ref): Likewise.
1707 * parse.y (base_init): Use begin_mem_initializers().
1708 (structsp): Adjust call to xref_basetypes.
1709 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
1710 (instantiate_class_template): Adjust call to xref_basetypes.
1711 * semantics.c (begin_mem_initializers): New function.
1712 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
1713 (really_overlaoded_fn): Likewise.
1714 (get_overloaded_fn): New function.'
1715 (get_first_fn): USe BASELINK_FUNCTIONS.
1716
1717 2002-06-24 Mark Mitchell <mark@codesourcery.com>
1718
1719 * cp-tree.h (SCALAR_TYPE_P): New macro.
1720 (check_for_out_of_scope_variable): New function.
1721 (at_class_scope_p): Likewise.
1722 (finish_fname): Likewise.
1723 * class.c (finish_struct): Use at_function_scope_p.
1724 * decl.c (check_for_out_of_scope_variable): New function, split
1725 out from do_identifier.
1726 (finish_enum): Use at_function_scope_p.
1727 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
1728 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
1729 (primary): Use at_function_scope_p.
1730 * search.c (at_class_scope_p): New function.
1731 * semantics.c (finish_fname): Likewise.
1732 (check_multiple_declarators): Use at_function_scope_p.
1733
1734 2002-06-23 Mark Mitchell <mark@codesourcery.com>
1735
1736 * parse.y (parse_scoped_id): New function.
1737 (primary): Use it.
1738 * cp-tree.h (do_scoped_id): Adjust declaration.
1739 * lex.c (do_scoped_id): Remove call to yylex.
1740 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
1741 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
1742 expanding it inline.
1743
1744 2002-06-23 Matt Thomas <matt@3am-software.com>
1745
1746 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
1747 "#if VMS_TARGET".
1748
1749 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1750
1751 * mangle.c (integer_type_codes): Const-ify.
1752
1753 2002-06-20 Richard Henderson <rth@redhat.com>
1754
1755 PR c++/6747
1756 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
1757 Call put_var_into_stack.
1758
1759 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1760
1761 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
1762 array size calculation.
1763
1764 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1765
1766 PR c++/6892
1767 * pt.c (tsubst_expr): Handle FILE_STMT.
1768
1769 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1770
1771 PR c++/6723
1772 * pt.c (lookup_template_class): Don't build complete argument of
1773 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
1774 argument.
1775
1776 2002-06-19 Akim Demaille <akim@epita.fr>
1777
1778 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
1779 decl.h's TYPENAME.
1780 * spew.c, lex.c: Adjust.
1781 * parse.y (explicit_instantiation): Add empty action to override
1782 the default $$ = $1 where it introduces a type clash.
1783
1784 2002-06-14 Jason Merrill <jason@redhat.com>
1785
1786 * semantics.c (begin_for_stmt): Push the 'for' scope before
1787 adding the FOR_STMT.
1788
1789 C++ ABI changes.
1790 * class.c (build_base_field): Set DECL_PACKED.
1791 (layout_class_type): Don't use tail padding of PODs.
1792 * mangle.c (write_unqualified_name): Fix template conversion op
1793 mangling.
1794
1795 2002-06-16 Richard Henderson <rth@redhat.com>
1796
1797 PR opt/6793
1798 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
1799 after template instantiation.
1800
1801 2002-06-16 Richard Henderson <rth@redhat.com>
1802
1803 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
1804
1805 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
1806
1807 * cp-tree.h (compiler_error): Remove declaration.
1808 * lex.c (compiler_error): Remove definition.
1809
1810 2002-06-14 Steve Ellcey <sje@cup.hp.com>
1811
1812 * g++spec.c (LIBUNWIND): New.
1813 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
1814
1815 2002-06-13 Jessica Han <jessica@cup.hp.com>
1816
1817 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
1818 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
1819 (build_vbase_offset_vtbl_entries): Likewise.
1820 * rtti.c (build_headof): Likewise.
1821 (get_tinfo_decl_dynamic): Likewise.
1822 (create_pseudo_type_info): Likewise.
1823
1824 2002-06-12 Stan Shebs <shebs@apple.com>
1825
1826 * mpw-config.in: Remove file, no longer used.
1827 * mpw-make.sed: Ditto.
1828
1829 2002-06-07 Zack Weinberg <zack@codesourcery.com>
1830
1831 * decl2.c: Update call to cpp_handle_option.
1832
1833 2002-06-07 H.J. Lu (hjl@gnu.org)
1834
1835 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
1836
1837 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
1838
1839 * error.c (cp_error_at): Fix typo.
1840
1841 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
1842
1843 * error.c (cp_diagnostic_starter): Adjust call.
1844 (maybe_print_instantiation_context): Change prototype to take a
1845 'diagnostic_info *'.
1846 (print_instantiation_full_context): Likewise.
1847 (print_instantiation_partial_context): Likewise.
1848 (cp_diagnostic_starter): Likewise.
1849 (cp_diagnostic_finalizer): Likewise.
1850 (cp_print_error_function): Likewise.
1851 (cp_printer): Take a secondary parameter as a 'text_info *'.
1852 Remove output_state savings. Adjust calls.
1853
1854 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
1855
1856 * pt.c (inline_parm_levels): Mark for GC.
1857
1858 * mangle.c (start_mangling): Allocate G.substitutions here...
1859 (init_mangle): ... rather than here.
1860 (finish_mangling): Clear the varray pointer when done with it.
1861 * spew.c (yylexstring): Don't use VARRAY_FREE.
1862 * search.c (bfs_walk): Don't use VARRAY_FREE.
1863 * decl2.c (pending_statics): Use gengtype to mark.
1864 (deferred_fns): Likewise.
1865 (ssdf_decls): Likewise.
1866 (init_decl2): Delete.
1867 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
1868 (cxx_init_decl_processing): Don't call init_decl2.
1869 (cxx_pop_function_context): Don't use VARRAY_FREE.
1870 * cp-tree.h (struct saved_scope): No need for special marking
1871 of varrays.
1872 (struct language_function): Likewise.
1873 (local_classes): Use gengtype to mark.
1874 (init_decl2): Delete prototype.
1875 * class.c (init_class_processing): Don't use
1876 ggc_add_tree_varray_root.
1877 (build_vtbl_initializer): Don't use VARRAY_FREE.
1878
1879 * decl.c (typename_compare): Don't use same_type_p.
1880
1881 * decl.c: Include hashtab.h instead of hash.h.
1882 (typename_hash): Update to use htab_h.
1883 (typename_compare): Likewise.
1884 (typename_htab): Use gengtype to mark.
1885 (build_typename_type): Update to use htab_h.
1886 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
1887
1888 * Make-lang.in (gt-cp-tree.h): New rule.
1889 (cp/tree.o): Depend on gt-cp-tree.h.
1890 * config-lang.in (gtfiles): Add cp/tree.c.
1891 * tree.c: Include gt-cp-tree.h.
1892 (list_hash_table): Use gengtype to mark.
1893 (init_tree): Use gengtype to mark trees.
1894
1895 * Make-lang.in (cp/decl.o): Add debug.h dependency.
1896 * call.c (struct z_candidate): Use gengtype.
1897 (USER_CONV_CAND): Use WRAPPER_ZC.
1898 (convert_class_to_reference): Use build_zc_wrapper.
1899 (build_type_conversion_1): Likewise.
1900 (build_over_call): Use WRAPPER_ZC.
1901 (add_warning): Use build_zc_wrapper.
1902 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
1903 * cp-tree.h (struct lang_identifier): Use gengtype.
1904 (struct template_parm_index_s): Likewise.
1905 (struct ptrmem_cst): Likewise.
1906 (struct tree_binding): Likewise.
1907 (struct tree_overload): Likewise.
1908 (struct tree_srcloc): Likewise.
1909 (struct tree_wrapper): Likewise. Also modify to have a pointer
1910 to struct z_candidate rather than void.
1911 (enum cp_tree_node_structure_enum): New.
1912 (union lang_tree_node): New.
1913 (cxx_mark_tree): Delete prototype.
1914 (cp_tree_node_structure): New prototype.
1915 (build_ptr_wrapper): Delete prototype.
1916 (build_int_wrapper): Delete prototype.
1917 (build_zc_wrapper): New prototype.
1918 * decl.c: Include debug.h
1919 (cxx_mark_tree): Delete.
1920 (cp_tree_node_structure): New.
1921 * tree.c (build_ptr_wrapper): Delete.
1922 (build_int_wrapper): Delete.
1923 (build_zc_wrapper): New.
1924
1925 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
1926 Correct typo. Patch from k_fukui@highway.ne.jp.
1927
1928 * semantics.c (current_stmt_tree): Update for change to
1929 struct language_function.
1930 (finish_mem_initializers): Likewise.
1931 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
1932 * cp-tree.h (struct language_function): Rename from
1933 cp_language_function. Change all uses.
1934 (cp_function_chain): Don't need to cast.
1935
1936 * class.c (duplicate_tag_error): Reset discriminator.
1937 (check_bases_and_members): Update for data structure changes.
1938 * cp-tree.h (struct lang_id2): Use gengtype.
1939 (flagged_type_tree): Likewise.
1940 (SET_LANG_ID): Use GGC on struct lang_id2.
1941 (struct cp_language_function): Use gengtype. Remove field
1942 'x_vcalls_possible_p'.
1943 (current_vcalls_possible_p): Delete.
1944 (struct lang_type_header): New.
1945 (struct lang_type_class): Rename from struct lang_type. Include
1946 struct lang_type_header.
1947 (struct lang_type_ptrmem): New.
1948 (struct lang_type): New.
1949 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
1950 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
1951 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
1952 (struct lang_decl_flags): Use gengtype. Add discriminators.
1953 (struct lang_decl): Use gengtype. Add and use discriminators.
1954 Update the macros that reference moved fields.
1955 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
1956 (SET_DECL_THUNK_P): Set discriminator too.
1957 (clear_inline_text_obstack): Delete prototype.
1958 (finish_inline_definitions): Delete prototype.
1959 (mark_pending_inlines): Delete prototype.
1960 (lang_check_failed): New prototype.
1961 * decl.c (struct named_label_use_list): Use gengtype.
1962 (struct named_label_list): Likewise.
1963 (mark_binding_level): Delete.
1964 (mark_named_label_lists): Delete.
1965 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
1966 (cxx_init_decl_processing): Use generated marker routine.
1967 (begin_destructor_body): Delete dead set to
1968 current_vcalls_possible_p.
1969 (mark_lang_function): Delete.
1970 (mark_cp_function_context): Delete.
1971 (lang_mark_tree): Use generated marker routines.
1972 * decl2.c (start_objects): Set discriminator when setting
1973 GLOBAL_INIT_PRIORITY.
1974 * lex.c (retrofit_lang_decl): Set discriminators.
1975 (copy_lang_type): Update for changes to lang_type structure.
1976 (cp_make_lang_type): Set discriminator.
1977 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
1978 * search.c: Include ggc.h.
1979 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
1980 (finish_inline_definitions): Delete.
1981 * spew.c (struct token): Use gengtype.
1982 (struct token_chunk): New.
1983 (struct unparsed_text): Use gengtype. Store tokens in chunks.
1984 (struct feed): Use gengtype.
1985 (feed_obstack): Delete.
1986 (feed): Mark as GC root.
1987 (pending_inlines): Mark as GC root.
1988 (pending_inlines_tail): Likewise.
1989 (processing_these_inlines): Likewise.
1990 (token_obstack): Make static.
1991 (first_token): Likewise.
1992 (init_spew): Don't initialize deleted things; use gengtype for roots.
1993 (clear_inline_text_obstack): Delete.
1994 (feed_input): Use GC for struct feed. Update for changes to
1995 struct unparsed_text.
1996 (mark_pending_inlines): Delete.
1997 (next_token): Rename from add_token. Change all callers. Update
1998 for changes to struct unparsed_text.
1999 (space_for_token): New.
2000 (remove_last_token): New.
2001 (alloc_unparsed_text): New.
2002 (snarf_block): Take an unparsed_text. Update for changes to struct
2003 unparsed_text.
2004 (snarf_method): Update for changes to struct unparsed_text.
2005 (snarf_defarg): Update for changes to struct unparsed_text.
2006 * tree.c (lang_check_failed): New.
2007
2008 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
2009 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
2010 (cp/spew.o): Add dependency on gt-<filename>.h.
2011 (cp/decl2.o): Add dependency on gt-<filename>.h.
2012 (cp/call.o): Add dependency on gt-<filename>.h.
2013 (cp/pt.o): Add dependency on gt-<filename>.h.
2014 (cp/repo.o): Add dependency on gt-<filename>.h.
2015 (cp/parse.o): Add dependency on gt-<filename>.h.
2016 * call.c: Use gengtype for roots.
2017 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
2018 decl2.c parse.y pt.c repo.c spew.c.
2019 * cp-tree.h: Use gengtype for roots.
2020 (struct saved_scope): Use GGC, gengtype.
2021 (cp_parse_init): Delete prototype.
2022 (init_pt): Delete prototype.
2023 * decl.c: Use gengtype for roots.
2024 (mark_saved_scope): Delete.
2025 (cxx_init_decl_processing): Don't call deleted initilisation
2026 routines.
2027 (signed_size_zero_node): Delete, unused.
2028 * decl.h: Use gengtype for roots.
2029 * decl2.c: Use gengtype for roots.
2030 * lex.h: Use gengtype for roots.
2031 * parse.y: Use gengtype for roots.
2032 (cp_parse_init): Delete.
2033 * pt.c: Use gengtype for roots.
2034 (init_pt): Delete.
2035 * repo.c: Use gengtype for roots.
2036 * spew.c: Use gengtype for roots.
2037
2038 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
2039 (cp/decl.o): Add dependency on gtype-cp.h.
2040 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
2041 Include gtype-cp.h. Allow for filename changes.
2042
2043 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
2044 (cp/decl.o): Add cp/gt-decl.h dependency.
2045 * config-lang.in (gtfiles): New.
2046 * tree.h: Rename struct binding_level to struct cp_binding_level.
2047 * decl.c: Rename struct binding_level to struct cp_binding_level.
2048 Include cp/gt-decl.h.
2049 (struct cp_binding_level): Use gengtype.
2050 (make_binding_level): Use GGC on struct cp_binding_level.
2051 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
2052 (cxx_init_decl_processing): Mark free_binding_level as
2053 deletable.
2054
2055 * decl.c (mark_cp_function_context): Update calling sequence.
2056
2057 * decl.c (start_function): Don't free 'struct
2058 cp_language_function'.
2059 (pop_cp_function_context): Likewise.
2060 (save_function_data): Allocate it using GC.
2061 * semantics.c (genrtl_start_function): Don't free 'struct
2062 cp_language_function'.
2063
2064 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
2065
2066 * lang-specs.h: Use cpp_debug_options.
2067
2068 2002-05-28 Zack Weinberg <zack@codesourcery.com>
2069
2070 * mangle.c, tree.c: Include real.h.
2071 * Make-lang.in: Update dependency lists.
2072
2073 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
2074
2075 * lex.c: Don't include c-lex.h.
2076 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
2077
2078 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
2079
2080 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
2081
2082 2002-05-22 Richard Henderson <rth@redhat.com>
2083
2084 * decl.c (obscure_complex_init): Check for VAR_DECL
2085 before using DECL_THREAD_LOCAL.
2086
2087 2002-05-22 Richard Henderson <rth@redhat.com>
2088
2089 * decl.c (check_tag_decl): Handle RID_THREAD.
2090 (obscure_complex_init): Reject run-time init of tls.
2091 (grokvardecl, grokdeclarator): Handle RID_THREAD.
2092 * lex.c (reswords): Add __thread.
2093 (rid_to_yy): Map RID_THREAD to SCSPEC.
2094
2095 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
2096
2097 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
2098 * cp-tree.h (cxx_post_options): Kill.
2099 * cp-lex.c (cxx_post_options): Kill.
2100
2101 2002-05-21 Richard Henderson <rth@redhat.com>
2102
2103 * lex.c (rid_to_yy): Add RID_THREAD.
2104
2105 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
2106
2107 * init.c (build_vec_init): Test for trivial copy-assignment when
2108 copy-assigning arrays.
2109
2110 2002-05-20 Andreas Jaeger <aj@suse.de>
2111
2112 * init.c (build_default_init): Remove unused variable.
2113
2114 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
2115
2116 * call.c (any_strictly_viable): New.
2117 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
2118
2119 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2120
2121 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
2122
2123 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2124
2125 PR c++/186, DR 259
2126 * pt.c (do_decl_instantiation): Don't complain explicit
2127 instantiation after explicit specialization.
2128 (do_type_instantiation): Likewise.
2129
2130 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
2131
2132 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
2133 renamed from...
2134 (complete_type_or_else): ... this. Redefined as macro.
2135 (cxx_incomplete_type_diagnostic): Declare.
2136 (cxx_incomplete_type_error): Define as macro.
2137 * init.c (build_delete): Warn about incomplete types other than
2138 void, and use the built-in operator delete for them.
2139 * typeck.c (complete_type_or_diagnostic): Renamed from
2140 complete_type_or_else. Added warn_only argument, passed to...
2141 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
2142 warnings or errors depending on new warn_only argument. Renamed
2143 from...
2144 (cxx_incomplete_type_error): ... this. New implementation in
2145 terms of cxx_incomplete_type_diagnostic.
2146
2147 2002-05-18 Jason Merrill <jason@redhat.com>
2148
2149 PR c++/6611
2150 * decl2.c (import_export_decl): If we clear
2151 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
2152
2153 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2154
2155 PR c++/6620
2156 * pt.c (verify_class_unification): Don't check if PARM is template
2157 parameter dependent. Simplify.
2158 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
2159 parameter dependent expression.
2160
2161 2002-05-14 Jason Merrill <jason@redhat.com>
2162
2163 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
2164 Do set DECL_COMDAT.
2165 (synthesize_tinfo_var): Take the public decl.
2166 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
2167 (emit_tinfo_decl): Adjust. Call import_export_decl.
2168 * decl2.c (import_export_decl): Simplify tinfo decl handling.
2169
2170 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
2171
2172 * cp-tree.h (struct lang_type): Added non_zero_init.
2173 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
2174 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
2175 * class.c (check_field_decls): Test non_zero_init.
2176 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
2177 zero-to-NULL conversions.
2178 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
2179 type that needs zero-initialization without zeros.
2180 (check_initializer_decl): Compute zero-initializer for types
2181 that require a non-trivial one.
2182 * init.c (build_forced_zero_init): New function.
2183 (build_default_init): Use it.
2184 * tree.c (zero_init_p): New function.
2185 * typeck2.c (force_store_init_value): New function.
2186 (process_init_constructor): Create non-trivial zero-initializers
2187 for array members and class fields.
2188
2189 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
2190
2191 * lang-specs.h: Remove redundant -lang-c++.
2192
2193 2002-05-13 Jason Merrill <jason@redhat.com>
2194
2195 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
2196 (fixed_type_or_null): See through reference vars.
2197 (build_base_path): Vtable contents are constant.
2198 * typeck.c (get_member_function_from_ptrfunc): Likewise.
2199
2200 2002-05-12 Jason Merrill <jason@redhat.com>
2201
2202 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
2203 structs are safe.
2204
2205 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
2206
2207 * cp-tree.h (flag_ansi): Remove.
2208 * decl2.c (flag_ansi): Remove.
2209 (cxx_decode_option): Set flag_iso and flag_undef.
2210
2211 2002-05-09 Jason Merrill <jason@redhat.com>
2212
2213 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
2214 Use subtraction rather than a bitmask to get the index.
2215 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
2216
2217 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
2218
2219 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
2220
2221 * Make-lang.in (decl2.o): Update.
2222 * cp-tree.h (warn_multichar): Remove.
2223 * decl2.c: Include c-common.h.
2224 (warn_multichar): Remove.
2225
2226 2002-05-03 Jason Merrill <jason@redhat.com>
2227
2228 * tree.c (build_cplus_array_type): Only const and volatile get
2229 special handling.
2230
2231 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
2232
2233 2002-04-30 Mark Mitchell <mark@codesourcery.com>
2234
2235 ABI change, returning simple classes from functions.
2236 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
2237 TYPE_HAS_TRIVIAL_INIT_REF is false or
2238 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
2239
2240 2002-04-30 Jason Merrill <jason@redhat.com>
2241
2242 PR debug/6436
2243 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
2244 anonymous class with a typedef if there are attributes.
2245
2246 2002-04-29 Paul Eggert <eggert@twinsun.com>
2247
2248 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
2249
2250 2002-04-29 Jakub Jelinek <jakub@redhat.com>
2251
2252 PR c++/6477
2253 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
2254 non-NULL first.
2255
2256 2002-04-29 Mark Mitchell <mark@codesourcery.com>
2257
2258 PR c++/6492
2259 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
2260 enter that scope before name lookup.
2261
2262 PR c++/6486
2263 * method.c (do_build_copy_constructor): Avoid building
2264 cv-qualified reference types.
2265
2266 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
2267
2268 PR c++/5719
2269 * decl.c (grok_op_properties): Assignment ops don't have to return
2270 by value. operator% should.
2271
2272 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
2273
2274 PR c/6343
2275 * decl.c (duplicate_decls): Call merge_weak.
2276
2277 2002-04-26 Richard Henderson <rth@redhat.com>
2278
2279 * parse.y (malloced_yyss, malloced_yyvs): New.
2280 (yyoverflow): Re-add. Set them.
2281 (free_parser_stacks): New.
2282
2283 2002-04-26 Mark Mitchell <mark@codesourcery.com>
2284
2285 PR c++/6497
2286 * method.c (do_build_assign_ref): Pass a derivation to
2287 build_method_call when calling base class assignment operators.
2288
2289 2002-04-26 Richard Henderson <rth@redhat.com>
2290
2291 * parse.y (yyoverflow): Revert.
2292
2293 2002-04-26 Richard Henderson <rth@redhat.com>
2294
2295 PR c/3581
2296 * parse.y (string): Remove. Update all uses to use STRING
2297 instead, and not call combine_strings.
2298 * rtti.c (tinfo_name): Use fix_string_type.
2299 * semantics.c (finish_asm_stmt): Don't call combine_strings.
2300 * spew.c (yylexstring): New.
2301 (read_token): Use it.
2302
2303 2002-04-25 Richard Henderson <rth@redhat.com>
2304
2305 PR c/2161
2306 * parse.y (yyoverflow): New.
2307
2308 2002-04-25 Jason Merrill <jason@redhat.com>
2309
2310 PR c++/5607
2311 * search.c (check_final_overrider): No longer static.
2312 * class.c (update_vtable_entry_for_fn): Call it.
2313 * cp-tree.h: Adjust.
2314
2315 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
2316
2317 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
2318 * cp-tree.h (cxx_set_yydebug): Die.
2319 * lex.c (YYDEBUG): Get from c-lex.h.
2320 (cxx_set_yydebug): Remove.
2321 * parse.y: Include c-lex.h.
2322 (YYDEBUG): Get from c-lex.h.
2323
2324 2002-04-24 Mark Mitchell <mark@codesourcery.com>
2325
2326 PR c++/6438.
2327 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
2328 void.
2329
2330 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
2331
2332 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
2333 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
2334 Redefine.
2335 * cp-tree.h (cp_attribute_table): Rename.
2336 * decl.c (lang_attribute_table): Remove declaration.
2337 (cxx_init_decl_processing): Don't set it.
2338 * tree.c (cp_attribute_table): Rename.
2339
2340 2002-04-24 Jason Merrill <jason@redhat.com>
2341
2342 PR c++/6331
2343 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
2344 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
2345 The pedwarn for array assignment is now unconditional.
2346 * tree.c (build_cplus_array_type_1): Still process simple array types
2347 normally in templates.
2348
2349 PR c++/6395
2350 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
2351 stuff for comdats.
2352
2353 2002-04-23 Jakub Jelinek <jakub@redhat.com>
2354
2355 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
2356 node with attributes.
2357
2358 2002-2-23 David O'Brien <obrien@FreeBSD.org>
2359
2360 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
2361 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
2362
2363 2002-04-23 Mark Mitchell <mark@codesourcery.com>
2364
2365 PR c++/6256:
2366 * pt.c (tsubst_friend_class): Handle templates with explicit
2367 nested names.
2368
2369 PR c++/6331:
2370 * typeck.c (merge_types): Remember the cv-qualification of pointer
2371 types when merging them.
2372
2373 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
2374
2375 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
2376 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
2377 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
2378 cxx_mark_function_context): New.
2379 * decl.c (push_cp_function_context, pop_cp_function_context,
2380 mark_cp_function_context): Rename for consistency.
2381 (cxx_init_decl_processing): Don't set old hooks.
2382
2383 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
2384
2385 * call.c (convert_type_from_ellipsis): Rename, update.
2386 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
2387 * cp-tree.h (convert_type_from_ellipsis): Rename.
2388 * decl.c (cxx_init_decl_processing): Don't set hook.
2389
2390 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
2391
2392 * call.c (build_new_method_call): Update.
2393 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
2394 * cp-tree.h (cxx_incomplete_type_error): New.
2395 * decl.c (grokdeclarator, grokparms): Update.
2396 * decl2.c (check_classfn): Update.
2397 * pt.c (tsubst): Update.
2398 * typeck.c (complete_type_or_else, expr_sizeof,
2399 decay_conversion): Update.
2400 * typeck2.c (incomplete_type_error): Rename.
2401 (add_exception_specifier): Update.
2402
2403 2002-04-18 Jason Merrill <jason@redhat.com>
2404
2405 PR c++/5658
2406 * search.c (setup_class_bindings): A class template qualifies as a
2407 type binding.
2408
2409 2002-04-17 Jakub Jelinek <jakub@redhat.com>
2410
2411 PR c++/6316
2412 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
2413 before expanding.
2414
2415 2002-04-16 Mark Mitchell <mark@codesourcery.com>
2416
2417 * init.c (begin_init_stmts): Remove commented out code.
2418 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
2419 * semantics.c (begin_gobal_stmt_expr): Adjust call to
2420 expand_start_stmt_expr.
2421
2422 2002-04-15 Mark Mitchell <mark@codesourcery.com>
2423
2424 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
2425 dso_handle itself, to __cxa_atexit.
2426
2427 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2428
2429 * error.c (cxx_print_error_function): Adjust call to macros.
2430
2431 2002-04-14 Jakub Jelinek <jakub@redhat.com>
2432
2433 * class.c (layout_virtual_bases): Do all dsize computation on trees.
2434
2435 2002-04-14 Jason Merrill <jason@redhat.com>
2436
2437 * typeck.c (get_member_function_from_ptrfunc): Don't do
2438 gratuitious division and multiplication on
2439 ptrmemfunc_vbit_in_delta targets.
2440
2441 2002-04-12 Mark Mitchell <mark@codesourcery.com>
2442
2443 PR c++/5373.
2444 * semantics.c (finish_expr_stmt): Remember the type of the
2445 expression before any conversions are performed.
2446
2447 2002-04-12 Mark Mitchell <mark@codesourcery.com>
2448
2449 PR c++/5189.
2450 * call.c (add_template_candidate_real): Do not treat member
2451 templates as copy constructors.
2452
2453 2002-04-12 Mark Mitchell <mark@codesourcery.com>
2454
2455 * decl.c (duplicate_decls): Do not copy the RTL for a variable
2456 declaration if the old variable had an incomplete type and the new
2457 variable does not.
2458 (complete_vars): Do not call layout_decl for completed variables.
2459
2460 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
2461
2462 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
2463 with an explicit one.
2464 (follow_tag_typedef): New.
2465 (lookup_tag): Use it to extract the tag of an explicit typedef.
2466 (xref_tag): Likewise.
2467
2468 2002-04-11 Andrew Haley <aph@redhat.com>
2469
2470 * typeck.c (type_after_usual_arithmetic_conversions):
2471 If two types have the same variant, return immediately.
2472 When two floating-point operands are the same precision:
2473 convert to float if one of the operands is float;
2474 if neither operand is one of the standard types, return the type
2475 of the first operand.
2476
2477 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
2478
2479 PR c++/5507
2480 * decl.c (make_typename_type): Remove implicit typenameness.
2481
2482 2002-04-09 Jason Merrill <jason@redhat.com>
2483
2484 PR optimization/6189
2485 * semantics.c (genrtl_start_function): Don't free
2486 DECL_SAVED_FUNCTION_DATA for inline functions.
2487
2488 * init.c (build_member_call): For now, don't convert to
2489 intermediate base if it would cause an error.
2490
2491 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
2492
2493 * parse.y (namespace_qualifier, maybe_identifier,
2494 begin_explicit_instantiation, end_explicit_instantiation,
2495 apparent_template_type, .finish_template_type,
2496 do_id, maybe_init, defarg_again, component_decl_1):
2497 Add ending ';', in accordance with POSIX.
2498
2499 2002-04-06 Mark Mitchell <mark@codesourcery.com>
2500
2501 PR c++/5571
2502 * class.c (layout_class_type): Remember incomplete static
2503 variables.
2504 (finish_struct_1): Call complete_vars, not
2505 hack_incomplete_structures.
2506 * cp-tree.h (hack_incomplete_structures): Rename to ...
2507 (complete_vars): ... this.
2508 (struct saved_scope): Remove incomplete.
2509 (namespace_scope_incomplete): Remove.
2510 * decl.c (struct binding_level): Remove incomplete.
2511 (incomplete_vars): New variable.
2512 (mark_binding_level): Don't mark incomplete.
2513 (print_binding_level): Don't print it.
2514 (mark_saved_scope): Don't mark incomplete.
2515 (pushdecl): Use maybe_register_incopmlete_var.
2516 (cxx_init_decl_processing): Register incomplete_vars for GC.
2517 (start_decl_1): Clarify error message.
2518 (hack_incomplete_vars): Remove.
2519 (maybe_register_incomplete_var): New function.
2520 (complete_vars): Likewise.
2521
2522 2002-04-06 Jason Merrill <jason@redhat.com>
2523
2524 PR c++/4934
2525 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
2526 set before checking it.
2527
2528 PR c++/525
2529 * init.c (build_member_call): Use build_scoped_ref.
2530 (resolve_offset_ref): Likewise.
2531 * call.c (build_scoped_method_call): Likewise.
2532 * tree.c (maybe_dummy_object): Kludge around current_class_type being
2533 wrong.
2534 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
2535 * cp-tree.h: Adjust.
2536
2537 * init.c (push_base_cleanups): Just use build_scoped_method_call.
2538
2539 PR c++/6179
2540 * method.c (implicitly_declare_fn): Pass unqualified type to
2541 synthesize_exception_spec.
2542
2543 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
2544
2545 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
2546 * cvt.c: Update comment.
2547 * init.c (expand_cleanup_for_base): Update.
2548 * semantics.c (finish_parenthesized_expr): Update.
2549 * typeck.c (cp_truthvalue_conversion): Update.
2550
2551 2002-04-04 Jason Merrill <jason@redhat.com>
2552
2553 * semantics.c (finish_eh_cleanup): New fn.
2554 * cp-tree.h: Add prototype.
2555 * init.c (perform_member_init, expand_cleanup_for_base): Use
2556 finish_eh_cleanup.
2557 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
2558 * cp-tree.h: Remove references.
2559 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
2560 * dump.c (cp_dump_tree): Likewise.
2561 * pt.c (tsubst_expr): Likewise.
2562 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
2563 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
2564 * tree.c (cp_statement_code_p): Likewise.
2565
2566 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
2567
2568 PR c++/5636
2569 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
2570 cleanup for nrv.
2571
2572 PR c++/5104
2573 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
2574 specifiers.
2575 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
2576
2577 2002-04-03 Richard Henderson <rth@redhat.com>
2578
2579 * cp-lang.c (cxx_warn_unused_global_decl): New.
2580 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
2581
2582 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
2583
2584 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
2585 * tree.c (init_tree): Don't set hook.
2586
2587 2002-04-03 Roger Sayle <roger@eyesopen.com>
2588
2589 PR c++/5998:
2590 * decl.c (duplicate_decls): Don't mess with assembler names when
2591 redeclaring builtin functions as static.
2592
2593 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
2594
2595 * call.c (build_addr_func): Update.
2596 * class.c (resolve_address_of_overloaded_function): Update.
2597 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
2598 * cp-tree.h (cxx_mark_addressable): New.
2599 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
2600 * decl2.c (build_cleanup): Update.
2601 * except.c (build_throw): Update.
2602 * init.c (resolve_offset_ref): Update.
2603 * pt.c (convert_nontype_argument): Update.
2604 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
2605 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
2606 unary_complex_lvalue): Update.
2607 (mark_addressable): Rename.
2608
2609 2002-04-01 Roger Sayle <roger@eyesopen.com>
2610
2611 PR c++/5998:
2612 * decl.c (duplicate_decls): Overwrite the RTL when (and only
2613 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
2614 but follow the SET_DECL_RTL idiom used elsewhere in the function.
2615
2616 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
2617
2618 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2619 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
2620 * decl.c (grokdeclarator): Update.
2621 * mangle.c (write_integer_cst): Update.
2622 * typeck.c (build_binary_op): Update.
2623
2624 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
2625
2626 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
2627 * lex.c (cxx_init): Don't set hook.
2628
2629 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
2630
2631 * Make-lang.in (error.o): Update.
2632 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
2633 * cp-tree.h (struct diagnostic_context): Predeclare.
2634 (cxx_print_error_function): New.
2635 * error.c: Include langhooks-def.h.
2636 (lang_print_error_function): Rename. Update.
2637 (init_error): Don't set hook.
2638
2639 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
2640
2641 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
2642 Redefine.
2643 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
2644 * decl.c (finish_enum): Similarly.
2645 * error.c (dump_type): Similarly.
2646 * lex.c (cxx_init): Similarly.
2647 * mangle.c (write_builtin_type): Similarly.
2648 * typeck.c (comptypes): Similarly.
2649
2650 2002-03-28 Roger Sayle <roger@eyesopen.com>
2651
2652 PR c++/5998:
2653 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
2654 in the g++ front-end.
2655 (duplicate_decl): Allow redefinition of anticipated built-ins.
2656 Fix inlining problem by over-writing the old DECL_RTL.
2657 (lookup_namespace_name): Fail to find an identifier in the
2658 specified namespace if its still anticipated.
2659 (builtin_function_1): New function split out from builtin_function
2660 to create a builtin in the current namespace with given context.
2661 (builtin_function): Call builtin_function_1 to define the
2662 appropriate builtins in both the std and global namespaces.
2663 (select_decl): Don't test for anticipated decls here.
2664 (unqualified_namespace_lookup): Instead ignore them whilst
2665 searching through scopes and namespaces.
2666 * decl2.c (do_nonmember_using_decl): If a using declaration
2667 specifies an anticipated built-in function, mark it as no longer
2668 anticipated in that scope.
2669 (ambiguous_decl): Avoid resolving to an anticipated decl.
2670 * lex.c (do_scoped_id): Fail to find an identifier in the global
2671 namespace if its still anticipated.
2672
2673 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
2674
2675 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
2676 * cp-tree.h (cp_make_lang_type): Rename.
2677 * lex.c (cp_make_lang_type): Rename.
2678 (make_aggr_type): Update.
2679 * tree.c (init_tree): Don't set make_lang_type_fn.
2680
2681 2002-03-29 Jakub Jelinek <jakub@redhat.com>
2682
2683 PR c++/6073
2684 * class.c (finish_struct_1): Update static field's DECL_MODE even
2685 if its type is a variant of t.
2686
2687 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
2688
2689 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
2690 * cp-tree.h (cxx_insert_default_attributes): New.
2691 * decl.c (insert_default_attributes): Rename.
2692
2693 2002-03-27 Mark Mitchell <mark@codesourcery.com>
2694
2695 PR c++/4884
2696 * call.c (build_op_delete_call): Allow for the fact the placement
2697 may be a COMPOUND_EXPR.
2698
2699 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
2700
2701 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
2702 * cp-tree.h (init_cplus_expand): Remove.
2703 (cxx_expand_expr): New.
2704 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
2705 fix prototype.
2706 (init_cplus_expand): Remove.
2707 * lex.c (cxx_init): Don't call init_cplus_expand.
2708
2709 2002-03-26 Mark Mitchell <mark@codesourcery.com>
2710
2711 PR c++/4884.
2712 * init.c (build_new_1): Allow for the fact the result of
2713 build_function_call may be a COMPOUND_EXPR.
2714
2715 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
2716
2717 PR c++/5682
2718 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
2719 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
2720 (dfs_skip_nonprimary_vbases_markedp): Remove.
2721 * search.c (get_shared_vbase_if_not_primary): Remove.
2722 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
2723 (dfs_skip_nonprimary_vbases_markedp): Remove.
2724 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
2725 (dfs_marked_real_bases_queue_p): Likewise.
2726
2727 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
2728
2729 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
2730 * cp-tree.h (cxx_mark_tree): New.
2731 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
2732
2733 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
2734
2735 * cp-tree.h (cxx_maybe_build_cleanup): New.
2736 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
2737 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
2738 * tree.c (build_target_expr): Update.
2739 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
2740
2741 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
2742
2743 * decl2.c (cxx_decode_option): Handle -E.
2744 * lang-specs.h (default_compilers): Preprocess with cc1plus.
2745 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
2746
2747 2002-03-23 Jakub Jelinek <jakub@redhat.com>
2748
2749 PR c++/6037
2750 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
2751
2752 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2753
2754 * error.c (dump_type): Be careful about implicit typenames.
2755
2756 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2757
2758 PR C++/3656
2759 * semantics.c (finish_base_specifier): Handle erronous base
2760 classes.
2761
2762 2002-03-22 Zack Weinberg <zack@codesourcery.com>
2763
2764 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
2765 REAL_IS_NOT_DOUBLE.
2766
2767 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
2768
2769 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
2770 an index into the vtable_entry array regardless of
2771 TARGET_PTRMEMFUNC_VBIT_LOCATION.
2772
2773 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
2774
2775 * tree.c (cp_cannot_inline_tree_fn): Same.
2776
2777 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
2778
2779 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
2780 insert_block, getdecls, global_bindings_p): New.
2781
2782 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
2783
2784 PR c++/4361
2785 * mangle.c (struct globals) Add internal_mangling_p member.
2786 (write_template_param): Do internal mangling, if needed.
2787 (mangle_conv_op_name_for_type): Request internal mangling.
2788
2789 2002-03-20 Jason Merrill <jason@redhat.com>
2790
2791 PR c++/2136
2792 * init.c (build_delete): Check access for a member op delete here.
2793 * decl2.c (delete_sanity): Not here.
2794
2795 2002-03-19 Jason Merrill <jason@redhat.com>
2796
2797 PR c++/5118
2798 * class.c (get_vfield_name): Use the constructor_name.
2799
2800 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
2801
2802 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
2803 * cp-tree.h (lang_printable_name): Rename.
2804 * error.c (lang_decl_name): Use new hook.
2805 * lex.c (cxx_init): Remove old hook.
2806 * pt.c (tsubst_decl): Use new hook.
2807 * tree.c (lang_printable_name): Rename.
2808
2809 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
2810
2811 PR c++/3882
2812 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
2813 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
2814 only after recording the declaration.
2815
2816 2002-03-18 Jason Merrill <jason@redhat.com>
2817
2818 PR c++/2039
2819 * init.c (resolve_offset_ref): Hand off to build_component_ref.
2820
2821 PR c++/4222, c++/5995
2822 * call.c (build_over_call): Fix empty class logic.
2823
2824 PR c++/3870
2825 * cp-tree.h (struct saved_scope): Add last_parms field.
2826 * decl.c (maybe_push_to_top_level): Save last_function_parms.
2827 (pop_from_top_level): Restore it.
2828
2829 PR c++/4377
2830 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
2831 NON_LVALUE_EXPRs.
2832
2833 PR c++/4003
2834 * pt.c (tsubst_friend_function): Use decl_namespace_context.
2835
2836 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
2837 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
2838 type with a nontrivial destructor.
2839
2840 2002-03-17 Jason Merrill <jason@redhat.com>
2841
2842 PR c++/4460
2843 * class.c (build_base_path): Virtual base layout is fixed in
2844 in-charge [cd]tors.
2845
2846 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
2847
2848 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
2849 * parse.y (yyparse): Remove macro.
2850
2851 2002-03-17 Jason Merrill <jason@redhat.com>
2852
2853 PR c++/5757
2854 * init.c (build_new_1): Pass the right pointer to op delete.
2855
2856 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
2857
2858 PR c++/4361
2859 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
2860 conversion operators go.
2861 (struct lang_decl_flags): Add template_conv_p and unused
2862 bitfields.
2863 (DECL_TEMPLATE_CONV_FN_P): New macro.
2864 * call.c (build_user_type_conversion_1): Don't check second type
2865 conversion of overload set first.
2866 * class.c (add_method): Make sure templated conversion operators
2867 all end up on slot 2.
2868 * lex.c (do_identifier): A conversion operator token might be
2869 satisfied by a templated conversion operator.
2870 * pt.c (check_explicit_specialization): Use
2871 CLASSTYPE_FIRST_CONVERSION_SLOT.
2872 (template_parm_this_level_p): New function.
2873 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
2874 * search.c (lookup_fnfields_1): Template conversions will be on
2875 the first slot.
2876 * typeck.c (build_component_ref): Preserve the type of an
2877 conversion operator name on the overload type.
2878 (build_x_function_call): Retrieve the conversion operator name.
2879
2880 2002-03-15 Richard Henderson <rth@redhat.com>
2881
2882 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
2883
2884 2002-03-15 Mark Mitchell <mark@codesourcery.com>
2885
2886 * cp-tree.h (CLEANUP_DECL): Remove.
2887 (CLEANUP_EXPR): Likewise.
2888 * decl.c (destroy_local_var): Simplify.
2889 (maybe_build_cleanup): Tidy.
2890 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
2891 * semantics.c (cp_expand_stmt): Likewise.
2892 * cp/tree.c (cp_statement_code_p): Likewise.
2893
2894 2002-03-15 Jason Merrill <jason@redhat.com>
2895
2896 PR c++/5857
2897 * decl.c (duplicate_decls): Use merge_types instead of common_type.
2898 * typeck.c (common_type): Just hand off to
2899 type_after_usual_arithmetic_conversions and
2900 composite_pointer_type.
2901 (merge_types): New fn.
2902 (commonparms): Use it instead of common_type.
2903 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
2904 (composite_pointer_type): Also handle attributes.
2905 * cp-tree.h: Declare merge_types.
2906
2907 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
2908 variables.
2909 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
2910
2911 2002-03-14 Richard Henderson <rth@redhat.com>
2912
2913 * decl.c: Include c-pragma.h.
2914 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
2915 * Make-lang.in: Update dependencies.
2916
2917 2002-03-14 Jakub Jelinek <jakub@redhat.com>
2918
2919 PR c++/5908
2920 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
2921 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
2922
2923 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
2924
2925 * mangle.c (write_builtin_type): Handle 128-bit integers even if
2926 they are not a standard integer type.
2927
2928 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
2929
2930 * cp-tree.h (init_init_processing): Remove declaration.
2931 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
2932 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
2933
2934 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2935
2936 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
2937 Define.
2938 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
2939 tree_code_length.
2940 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
2941 cplus_tree_code_name): Delete.
2942 (cxx_init): Don't call add_c_tree_codes, instead set
2943 lang_unsafe_for_reeval. Don't try to copy into the various
2944 tree_code arrays.
2945
2946 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
2947
2948 PR c++/5659
2949 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
2950 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
2951 definitions.
2952
2953 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
2954
2955 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
2956 DR209 is now not a defect.
2957 * cp-tree.h (skip_type_access_control): Remove.
2958 * decl.c (grokdeclarator): Do type access control for friend
2959 declarations.
2960 * semantics.c (decl_type_access_control): Don't reset
2961 current_type_lookups.
2962 (save_type_access_control): Always save the lookups.
2963 (skip_type_access_control): Remove.
2964 (finish_class_definition): Don't change type_lookups.
2965
2966 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
2967
2968 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
2969 It is incorrect.
2970 * typeck.c (build_static_cast): Compare non-qualified types
2971 with pointer to member conversions.
2972
2973 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
2974 Daniel Berlin <dan@dberlin.org>
2975
2976 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
2977 (cxx_get_alias_set): Use it.
2978
2979 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2980
2981 * cp-tree.h (stabilize_expr): Prototype.
2982
2983 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
2984
2985 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
2986 conditional return void.
2987
2988 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
2989
2990 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
2991 * cp-tree.h (cxx_unsave): New.
2992 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
2993 (init_tree): Update.
2994
2995 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2996
2997 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
2998 explicit sizeof/sizeof.
2999 * decl2.c (cxx_decode_option): Likewise.
3000 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
3001
3002 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
3003
3004 PR c++/775
3005 * decl.c (lookup_tag): Only reject enum/class mismatch, not
3006 class/union mismatch.
3007 * parse.y (check_class_key): New function.
3008 (structsp): Call it.
3009
3010 2002-03-01 Michael Matz <matz@suse.de>
3011
3012 * typeck.c (cp_pointer_int_sum): Complete inner type which is
3013 used later by size_in_bytes().
3014
3015 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
3016
3017 * cp-tree.h: Require __GNUC__ to be #defined.
3018 (build_init): Add missing prototype.
3019
3020 2002-03-01 Jason Merrill <jason@redhat.com>
3021
3022 * except.c: Don't include decl.h or obstack.h. Do include
3023 tree-inline.h.
3024 (build_throw): Destroy temporaries from the thrown
3025 expression before calling __cxa_throw. Construct a thrown
3026 temporary directly into the exception object.
3027 (stabilize_throw_expr): New function.
3028 (wrap_cleanups_r): New function.
3029 * tree.c (stabilize_expr): New function.
3030 * init.c (build_init): New function.
3031 * Make-lang.in (cp/except.o): Adjust .h deps.
3032
3033 2002-02-28 Jason Merrill <jason@redhat.com>
3034
3035 * search.c (lookup_base_r): Don't clear is_non_public just because
3036 we found a friendly scope.
3037
3038 * decl.c (finish_function): Only warn about missing return
3039 statement with -Wreturn-type.
3040
3041 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
3042
3043 * class.c (build_clone): Update.
3044 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3045 * cp-tree.h (cxx_dup_lang_specific_decl): New.
3046 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
3047 (copy_decl): Update.
3048 * method.c (make_thunk): Update.
3049
3050 2002-02-27 Zack Weinberg <zack@codesourcery.com>
3051
3052 * decl2.c: Delete traditional-mode-related code copied from
3053 the C front end but not used, or used only to permit the
3054 compiler to link.
3055
3056 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
3057
3058 PR c++/4093
3059 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
3060 to void.
3061
3062 2002-02-22 Jakub Jelinek <jakub@redhat.com>
3063
3064 PR other/5746
3065 * semantics.c (finish_switch_cond): Don't call get_unwidened
3066 if error_mark_node.
3067
3068 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
3069
3070 PR c++/2645, DR 295
3071 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
3072 tf_keep_type_decl.
3073 (make_typename_type): Use tsubst_flags_t.
3074 * decl.c (make_typename_type): Adjust. Return non-artificial
3075 TYPE_DECLs, if required.
3076 (grokdeclarator): Simplify CVR qualification handling. Allow bad
3077 qualifiers on typedef types.
3078 * decl2.c (handle_class_head): Adjust make_typename_type call.
3079 * parse.y (nested_name_specifier): Likewise.
3080 (typename_sub0): Likewise.
3081 (typename_sub1): Likewise.
3082 * pt.c (convert_template_argument): Adjust make_typename_type
3083 return value.
3084 (tsubst): Adjust cp_build_qualified_type_real calls.
3085 (check_cv_quals_for_unify): Cope with allowing bad qualifications
3086 on template type parms.
3087 (instantiate_decl): Recheck substitutions to give warnings on bad
3088 qualifications.
3089 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
3090
3091 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
3092
3093 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
3094
3095 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
3096 unless DECL_ALWAYS_INLINE.
3097
3098 2002-02-20 Jakub Jelinek <jakub@redhat.com>
3099
3100 * typeck.c (cp_pointer_int_sum): Renamed from
3101 pointer_int_sum, call pointer_int_sum.
3102
3103 2002-02-20 Jakub Jelinek <jakub@redhat.com>
3104
3105 * decl.c (duplicate_decls): Return 0 if issued error about
3106 redeclaration.
3107
3108 2002-02-19 Jason Merrill <jason@redhat.com>
3109
3110 ABI change: Mangle `void (A::*)() const' as
3111 M1AKFvvE, not MK1AFvvE.
3112 * mangle.c (write_function_type): Write cv-quals for member
3113 function type here.
3114 (write_pointer_to_member_type): Not here.
3115
3116 2002-02-18 Jason Merrill <jason@redhat.com>
3117
3118 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
3119 (do_decl_instantiation): Likewise.
3120
3121 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
3122
3123 PR c++/5685
3124 * decl.c (duplicate_decls): Make warning unconditional
3125 if duplicate default argument declarations are present.
3126
3127 2002-02-17 Jakub Jelinek <jakub@redhat.com>
3128
3129 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
3130 shortening.
3131
3132 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
3133
3134 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
3135 remove incorrect comment. Move #if 0'd code to common path. Use
3136 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
3137
3138 2002-02-13 Jason Merrill <jason@redhat.com>
3139
3140 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
3141 (finish_function): Don't warn if current_function_returns_null.
3142
3143 * typeck2.c (digest_init): Do handle values of vector type.
3144
3145 * typeck2.c (digest_init, process_init_constructor): Treat vectors
3146 like arrays.
3147
3148 2002-02-11 Jason Merrill <jason@redhat.com>
3149
3150 * parse.y (reserved_declspecs): Don't handle attributes.
3151 (reserved_typespecquals): Handle them here.
3152 * Make-lang.in (parse.c): Adjust expected conflicts.
3153
3154 2002-02-08 Jakub Jelinek <jakub@redhat.com>
3155
3156 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
3157 instead of compstmt.
3158 (compstmt_or_stmtexpr): Renamed from compstmt.
3159 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
3160
3161 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
3162
3163 Rename instantiate_type_flags to tsubst_flags_t & expand use.
3164 * cp-tree.h (instantiate_type_flags): Rename to ...
3165 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
3166 add tf_warning flag.
3167 (instantiate_type): Adjust prototype.
3168 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
3169 do_type_instantiation, cp_build_qualified_type_real): Likewise.
3170 cp_build_qualified_type: Adjust.
3171 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
3172 tf_*.
3173 * call.c (standard_conversion): Rename itf_* to tf_*.
3174 (reference_binding): Likewise.
3175 (convert_like_real): Likewise.
3176 * cvt.c (cp_convert_to_pointer): Likewise.
3177 (convert_to_reference): Likewise.
3178 * decl.c (lookup_namespace_name): Use tf_* flags.
3179 (make_typename_type): Likewise.
3180 (grokdeclarator): Likewise.
3181 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
3182 (coerce_template_template_parms, convert_template_argument,
3183 coerce_template_parms, maybe_get_template_decl_from_type_decl,
3184 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
3185 instantiate_class_template, tsubst_template_arg_vector,
3186 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
3187 tsubst_decl, tsubst_arg_types, tsubst_function_type,
3188 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
3189 instantiate_template, fn_type_unification,
3190 resolve_overloaded_unification, verify_class_unification,
3191 unify, get_bindings_real, do_type_instantiation,
3192 regenerate_decl_from_template, instantiate_decl,
3193 tsubst_initializer_list, tsubst_enum,
3194 get_mostly_instantiated_function_type,
3195 invalid_nontype_parm_type_p): Likewise.
3196 * tree.c (cp_build_qualified_type_real): Likewise.
3197 * typeck.c (build_binary_op): Rename itf_* to tf_*.
3198 (build_ptrmemfunc): Likewise.
3199 (convert_for_assignment): Likewise.
3200
3201 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
3202
3203 PR c++/109
3204 * decl.c (grokdeclarator): Allow friend declarations from
3205 dependent types.
3206 * decl2.c (handle_class_head): Don't push into template parm contexts.
3207 * pt.c (push_template_decl_real): Template parm contexts are never
3208 being defined.
3209
3210 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
3211
3212 * class.c: Include target.h.
3213 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
3214 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
3215 bit-field layout.
3216 * Make-lang.in: Adjust deps.
3217
3218 2002-02-05 Jason Merrill <jason@redhat.com>
3219
3220 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
3221
3222 2002-02-04 Jakub Jelinek <jakub@redhat.com>
3223
3224 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
3225 (finish_switch_cond): Set SWITCH_TYPE.
3226
3227 2002-02-04 Richard Henderson <rth@redhat.com>
3228
3229 * method.c (use_thunk): Always initialize the block tree. Reindent.
3230 * semantics.c (expand_body): Emit thunks after function, not before.
3231
3232 2002-02-04 Jason Merrill <jason@redhat.com>
3233
3234 * decl.c (start_function): Call cplus_decl_attributes immediately
3235 after grokdeclarator.
3236
3237 * decl.c (start_function): Combine DECL_RESULT handling code.
3238
3239 2002-02-03 Jason Merrill <jason@redhat.com>
3240
3241 * xref.c: Remove.
3242 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
3243 (cp/xref.o): Remove dependencies.
3244 * class.c (finish_struct_1, check_methods): Don't call xref fns.
3245 (finish_struct_1): Likewise.
3246 * friend.c (make_friend_class): Likewise.
3247 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
3248 * spew.c (read_process_identifier): Likewise.
3249
3250 2002-02-01 Jason Merrill <jason@redhat.com>
3251
3252 PR c++/4872
3253 * decl.c (finish_function): Warn about a non-void function with
3254 no return statement and no abnormal exit.
3255 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
3256 (current_function_returns_abnormally): New macro.
3257 * call.c (build_call): Set it.
3258
3259 * typeck.c (build_component_ref): Always complain about offsetof
3260 constructs on non-PODs. Only make it an error for members of
3261 virtual bases.
3262
3263 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
3264 (dump_function_decl): Always dump parms.
3265
3266 * decl2.c (finish_static_data_member_decl): Complain about a local
3267 class with a static data member.
3268
3269 PR c++/4286
3270 * search.c (lookup_field_1): Don't xref a static data member
3271 just because we looked it up.
3272
3273 2002-01-31 Jason Merrill <jason@redhat.com>
3274
3275 * Make-lang.in (parse.c): Handle .output file.
3276
3277 PR c++/3395
3278 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
3279 not TREE_TYPE.
3280 * semantics.c (finish_class_definition): Adjust.
3281
3282 Allow attributes in parms and casts.
3283 * parse.y (named_parm): Don't strip attrs.
3284 (declmods): Remove 'attributes' production.
3285 (nonempty_cv_qualifiers): Accept attributes.
3286 (ATTRIBUTE): Give precedence.
3287 * decl.c (groktypename): Handle attributes.
3288 (grokparms): Likewise.
3289
3290 2002-01-29 Jakub Jelinek <jakub@redhat.com>
3291
3292 * decl2.c (cxx_decode_option): Pass 0 as last argument to
3293 cpp_handle_option.
3294 * lang-specs.h: Use cpp_unique_options instead of cpp_options
3295 when used together with cc1_options.
3296
3297 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
3298
3299 PR c++/5132
3300 * typeck2.c (digest_init): Make sure non-array core type is
3301 instantiated.
3302 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
3303 constructor, rather than build a new one.
3304 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
3305 PURPOSE of constructor elts.
3306
3307 2002-01-23 Zack Weinberg <zack@codesourcery.com>
3308
3309 * Make-lang.in (parse.c): Adjust expected number of
3310 shift-reduce conflicts.
3311 (decl.o): Depend on diagnostic.h.
3312 * decl.c: Include diagnostic.h.
3313 (grokdeclarator): Check for null pointer.
3314 (finish_function): Don't abort when
3315 current_binding_level->parm_flag != 1, if errors have
3316 occurred; throw away the statement tree and extra binding
3317 levels, and continue.
3318 * lex.c (note_list_got_semicolon): Check for null pointer.
3319 * method.c (hack_identifier): Just return error_mark_node if
3320 value is error_mark_node.
3321 * parse.y (primary: TYPEID(type_id)): No need to use
3322 TYPE_MAIN_VARIANT here.
3323 (handler_seq): Accept an empty list of catch clauses and
3324 generate a fake handler block to avoid later crashes.
3325 (ansi_raise_identifier): Accept the error token too.
3326 * semantics.c (begin_class_definition,
3327 finish_class_definition): Check for error_mark_node.
3328
3329 2002-01-23 Zack Weinberg <zack@codesourcery.com>
3330
3331 * typeck2.c (friendly_abort): Delete definition.
3332 * cp-tree.h (friendly_abort): Don't prototype.
3333 (my_friendly_assert): Use fancy_abort.
3334
3335 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
3336
3337 * cp-tree.h (my_friendly_abort): Remove.
3338
3339 2002-01-23 Jakub Jelinek <jakub@redhat.com>
3340
3341 * spew.c (pending_inlines, pending_inlines_tail,
3342 processing_these_inlines): Make static.
3343 (mark_pending_inlines): Remove static.
3344 (begin_parsing_inclass_inline): If in function, save pi
3345 for GC to cp_function_chain->unparsed_inlines instead.
3346 (process_next_inline): Likewise.
3347 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
3348 (mark_pending_inlines): Add prototype.
3349 * decl.c (spew_debug): Remove unused extern.
3350 (mark_lang_function): Call mark_pending_inlines.
3351
3352 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
3353
3354 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
3355 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
3356 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
3357 Change my_fancy_abort() to abort().
3358
3359 2002-01-23 Jason Merrill <jason@redhat.com>
3360
3361 PR c++/5453
3362 * class.c (fixed_type_or_null): Fix thinko.
3363
3364 PR c++/3331
3365 * init.c (resolve_offset_ref): Use build_indirect_ref.
3366
3367 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
3368
3369 2002-01-22 Jason Merrill <jason@redhat.com>
3370
3371 * parse.y (function_body): Suppress the block for the outermost
3372 curly braces.
3373 * decl.c (pushdecl): Don't try to skip it.
3374 (begin_function_body): Keep the block we create, not the next one.
3375 * init.c (emit_base_init): Don't mess with keep_next_level.
3376
3377 * class.c (build_base_path): Tweak formatting.
3378
3379 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
3380
3381 Fix regression introduced with patch for c++/775
3382 * parse.y (class_head_defn): Check for template specializations
3383 with a different class-key.
3384
3385 2002-01-17 Jason Merrill <jason@redhat.com>
3386
3387 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
3388 (begin_function_body): Call them and keep_next_level.
3389 * init.c (emit_base_init): Call keep_next_level.
3390 * semantics.c (setup_vtbl_ptr): Lose.
3391 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
3392 (vtbls_set_up_p): Lose.
3393 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
3394 * method.c (do_build_copy_constructor): Likewise.
3395 (synthesize_method): Call finish_mem_initializers.
3396 * parse.y (nodecls): Likewise.
3397
3398 * error.c (dump_type_suffix): Print the exception specs before
3399 recursing.
3400 (dump_function_decl): Here, too.
3401
3402 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
3403
3404 2002-01-10 Ira Ruben <ira@apple.com>
3405
3406 PR c++/907
3407 * decl.c (start_method): Handle attrlist.
3408
3409 2002-01-10 Jakub Jelinek <jakub@redhat.com>
3410
3411 * decl2.c (max_tinst_depth): Increase default limit to 500.
3412
3413 2002-01-10 Graham Stott <grahams@redhat.com>
3414
3415 * spew.c (YYCHAR): Uppercase macro parameter and add
3416 parenthesis.
3417 (YYCODE): Likewise.
3418 (NAME): Uppercase macro parameter.
3419
3420 2002-01-09 Graham Stott <grahams@redhat.com>
3421
3422 * decl.h (grokdeclarator): Wrap long line.
3423
3424 * semantics.c (FINISH_COND): Uppercase macro paramaters and
3425 add parenthesis.
3426
3427 2002-01-08 Graham Stott <grahams@redhat.com>
3428
3429 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
3430 (PALLOC): Uppercase macro parameter and whitespace.
3431 (SALLOC): Uppercase macro parameter.
3432 (SFREE): Uppercase macros parameter, add parenthese and
3433 whitespace.
3434 (STREQL): Uppercase macro parameter and whitespace.
3435 (STRNEQ): Likewise.
3436 (STRLSS): Likewise.
3437 (STRLEQ): Likewise.
3438 (STRGTR): Likewise.
3439 (STRGEQ): Likewise.
3440
3441 * call.c (convert_like): Add parenthesis and wrap.
3442 (convert_like_with_context): Likewise.
3443 (ICS_RANK): Whitespace.
3444 (NEED_TEMPORARY_P): Remove parenthesis.
3445
3446 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
3447 whitespace.
3448 (VTT_MARKED_BINFO_P): Likewise.
3449
3450 * decl.c (BINDING_LEVEL): Add parenthesis.
3451 (DEF_OPERATOR): Likewise.
3452
3453 * mangle.c (MANGLE_TRACE): Add parenthesis.
3454 (MANGLE_TRACE_TREE): Likewise.
3455 (write_signed_number): Likewise.
3456 (write_unsigned_number): Likewise.
3457
3458 * pt.c (ccat): Uppercase macro parameter.
3459 (cat): Likewise
3460
3461 * search.c (SET_BINFO_ACCESS): Add parenthesis.
3462
3463 2002-01-07 Jason Merrill <jason@redhat.com>
3464
3465 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
3466 to pedwarn.
3467
3468 PR c++/3536
3469 * method.c (make_thunk): If !flag_weak, give the thunk the
3470 function's linkage.
3471 (use_thunk): Here, too.
3472
3473 2002-01-07 Graham Stott <grahams@redhat.com>
3474
3475 * error.c: Update copyright date.
3476 (print_scope_operator): Add parenthesis.
3477 (print_left_paren): Likewise.
3478 (print_right_paren): Likewise.
3479 (print_left_bracket): Likewise.
3480 (print_right_bracket): Likewise.
3481 (print_template_argument_list_start): Likewise.
3482 (print_template_argument_list_end): Likewise.
3483 (print_non_consecutive_character): Likewise.
3484 (print_tree_identifier): Likewise.
3485 (print_identifier): Likewise.
3486 (NEXT_CODE): Uppercase macro parameter.
3487 (ident_fndecl): Delete unused.
3488 (GLOBAL_THING): Likewise.
3489
3490 2002-01-06 Graham Stott <grahams@redhat.com>
3491
3492 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
3493 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
3494 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
3495 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
3496 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
3497 (C_IS_RESERVED_WORD): Uppercase macro parameter.
3498 (C_RID_YYCODE) Likewise.
3499 (ptrmem_cst): Use rtx.
3500 (LOCAL_BINDING_P): Add whitespace.
3501 (INHERITED_VALUE_BINDING_P): Likewise.
3502 (BINDING_SCOPE): Wrap long line.
3503 (BINDING_HAS_LEVEL_P): Remove parenthesis.
3504 (BINDING_VALUE): Wrap long line.
3505 (BINDING_TYPE): Whitespace.
3506 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
3507 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
3508 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
3509 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
3510 (same_type_p): Uppercase macro parameters.
3511 (same_type_ignoring_top_level_qualifiers_p): Likewise.
3512 (OVL_FUNCTION): Wrap long line.
3513 (OVL_CHAIN): Whitespace.
3514 (OVL_CURRENT): Add parenthesis and whitespace.
3515 (OVL_NEXT): Whitespace.
3516 (OVL_USED): Likewise.
3517 (IDENTIFIER_TYPE_VALUE): Likewise.
3518 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
3519 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
3520 (LANG_ID_FIELD): Whitespace.
3521 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
3522 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
3523 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
3524 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
3525 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
3526 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
3527 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
3528 (IDENTIFIER_VIRTUAL_P): Likewise.
3529 (IDENTIFIER_OPNAME_P): Likewise.
3530 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
3531 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
3532 (C_SET_EXP_ORIGINAL_CODE): Likewise.
3533 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
3534 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
3535 (IS_AGGR_TYPE): Uppercase macro parameter.
3536 (CLASS_TYPE_P): Likewise.
3537 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
3538 (IS_AGGR_TYPE_2): Whitespace.
3539 (TAGGED_TYPE_P): Uppercase macro parameter.
3540 (TYPE_BUILT_IN): Whitespace.
3541 (TYPE_FOR_JAVA): Likewise.
3542 (FUNCTION_ARG_CHAIN): Remove parenthesis.
3543 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
3544 (FUNCTION_FIRST_USER_PARAM): Likewise.
3545 (PROMOTES_TO_AGGR_TYPE): Whitespace.
3546 (DERIVED_FROM_P): Add parenthesis and wrap.
3547 (UNIQUELY_DERIVED_FROM_P): Likewise.
3548 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
3549 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3550 (CLASSTYPE_USE_TEMPLATE): Whitespace.
3551 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
3552 (TYPE_GETS_DELETE): Add parenthesis.
3553 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
3554 (TYPE_HAS_ASSIGN_REF): Likewise,
3555 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
3556 (TYPE_HAS_INIT_REF): Likewise.
3557 (TYPE_HAS_CONST_INIT_REF): Likewise.
3558 (TYPE_BEING_DEFINED): Likewise.
3559 (TYPE_LANG_SPECIFIC): Likewise.
3560 (CLASSTYPE_RTTI): Likewise.
3561 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
3562 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
3563 (TYPE_OVERLOADS_ARROW): Likewise.
3564 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
3565 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
3566 (CLASSTYPE_METHOD_VEC): Likewise.
3567 (CLASSTYPE_MARKED_N): Likewise.
3568 (CLASSTYPE_MARKED): Likewise.
3569 (CLASSTYPE_MARKED2): Likewise.
3570 (CLASSTYPE_MARKED3): Likewise.
3571 (CLASSTYPE_MARKED4): Likewise.
3572 (CLASSTYPE_MARKED5): Likewise.
3573 (CLASSTYPE_MARKED6): Likewise.
3574 (SET_CLASSTYPE_MARKED): Whitespace.
3575 (CLEAR_CLASSTYPE_MARKED): Likewise.
3576 (SET_CLASSTYPE_MARKED2): Likewise.
3577 (CLEAR_CLASSTYPE_MARKED2): Likewise.
3578 (SET_CLASSTYPE_MARKED3): Likewise.
3579 (CLEAR_CLASSTYPE_MARKED3): Likewise.
3580 (SET_CLASSTYPE_MARKED4): Likewise.
3581 (CLEAR_CLASSTYPE_MARKED4): Likewise.
3582 (SET_CLASSTYPE_MARKED5): Likewise.
3583 (CLEAR_CLASSTYPE_MARKED5): Likewise.
3584 (SET_CLASSTYPE_MARKED6): Likewise.
3585 (CLEAR_CLASSTYPE_MARKED6): Likewise.
3586 (CLASSTYPE_TAGS): Likewise.
3587 (CLASSTYPE_VSIZE): Likewise.
3588 (CLASSTYPE_VBASECLASSES): Likewise.
3589 (CANONICAL_BINFO): Add parenthesis.
3590 (CLASSTYPE_SIZE(NODE): Likewise.
3591 (CLASSTYPE_SIZE_UNIT): Likewise.
3592 (CLASSTYPE_ALIGN(NODE): Likewise.
3593 (CLASSTYPE_USER_ALIGN): Likewise.
3594 (TYPE_JAVA_INTERFACE): Likewise.
3595 (CLASSTYPE_PURE_VIRTUALS): Likewise.
3596 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
3597 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
3598 (CLASSTYPE_HAS_MUTABLE): Likewise.
3599 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
3600 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
3601 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
3602 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
3603 (CLASSTYPE_INTERFACE_ONLY): Likewise.
3604 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
3605 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
3606 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
3607 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
3608 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
3609 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
3610 (BINFO_UNSHARED_MARKED): Whitespace.
3611 (BINFO_MARKED): Whitespace and wrap.
3612 (SET_BINFO_MARKED): Likewise.
3613 (CLEAR_BINFO_MARKED): Likewise.
3614 (BINFO_VTABLE_PATH_MARKED): Likewise.
3615 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
3616 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
3617 (BINFO_SUBVTT_INDEX): Remove parenthesis.
3618 (BINFO_VPTR_INDEX): Likewise.
3619 (BINFO_PRIMARY_BASE_OF): Likewise,
3620 (CLASSTYPE_VFIELDS): Whitespace.
3621 (VF_DERIVED_VALUE): Wrap long line.
3622 (NAMESPACE_LEVEL): Whitespace.
3623 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
3624 (DEFARG_POINTER): Whitespace.
3625 (DECL_NEEDED_P): Remove parenthesis.
3626 (DECL_LANGUAGE): Whitespace.
3627 (SET_DECL_LANGUAGE): Add parenthesis.
3628 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
3629 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
3630 (DECL_IN_AGGR_P): Whitespace.
3631 (DECL_FRIEND_P): Likewise.
3632 (DECL_BEFRIENDING_CLASSES): Likewise.
3633 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
3634 (DECL_NONCONVERTING_P): Whitespace.
3635 (DECL_PURE_VIRTUAL_P): Likewise.
3636 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
3637 (DECL_PENDING_INLINE_INFO): Whitespace.
3638 (DECL_SORTED_FIELDS): Likewise.
3639 (DECL_DEFERRED_FN): Likewise.
3640 (DECL_TEMPLATE_INFO): Likewise.
3641 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
3642 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
3643 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
3644 (TMPL_ARGS_LEVEL): Likewise.
3645 (SET_TMPL_ARGS_LEVEL): Likewise.
3646 (INNERMOST_TEMPLATE_PARMS): Whitespace.
3647 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
3648 (INTEGRAL_CODE_P(CODE): Add parenthesis.
3649 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
3650 (TYPE_HAS_CONSTRUCTOR): Whitespace.
3651 (TREE_HAS_CONSTRUCTOR): Likewise.
3652 (TYPE_HAS_DESTRUCTOR): Likewise.
3653 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
3654 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
3655 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
3656 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
3657 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
3658 (TYPE_PTRMEMFUNC_P): Likewise.
3659 (TYPE_PTRMEMFUNC_FLAG): Likewise.
3660 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
3661 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
3662 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
3663 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
3664 (DECL_ACCESS): Whitespace.
3665 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
3666 (DECL_GLOBAL_DTOR_P): Likewise.
3667 (GLOBAL_INIT_PRIORITY): Likewise.
3668 (DECL_TEMPLATE_PARMS): Likewise.
3669 (DECL_TEMPLATE_RESULT): Likewise.
3670 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
3671 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
3672 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
3673 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
3674 (PRIMARY_TEMPLATE_P): Add parenthesis.
3675 (DECL_USE_TEMPLATE): Whitespace.
3676 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
3677 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
3678 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
3679 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
3680 (CALL_DECLARATOR_PARMS): Remove parenthesis.
3681 (CALL_DECLARATOR_QUALS): Likewise.
3682 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
3683 (TEMP_NAME_P): Wrap.
3684 (VFIELD_NAME_P): Likewise.
3685 (B_SET): Uppercase macro parameters and add parenthesis.
3686 (B_CLR): Likewise.
3687 (B_TST): Likewise.
3688 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
3689 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
3690 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
3691 (same_or_base_type_p): Likewise.
3692 (cp_deprecated): Likewise.
3693
3694 2002-01-05 Richard Henderson <rth@redhat.com>
3695
3696 * semantics.c (expand_body): Revert last change.
3697
3698 2002-01-04 Jason Merrill <jason@redhat.com>
3699
3700 PR c++/4122
3701 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
3702 lost primary.
3703
3704 * class.c (build_vtbl_initializer): Check for a lost primary
3705 before calculating the vtable entry to throw away.
3706
3707 2002-01-02 Jason Merrill <jason@redhat.com>
3708
3709 * semantics.c (expand_body): Call outlining_inline_function when
3710 emitting an inline function out of line.
3711
3712 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3713
3714 PR c++/5116, c++/764 reversion
3715 * call.c (build_new_op): Revert the instantiations. They are
3716 incorrect.
3717
3718 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3719
3720 PR c++/5089
3721 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
3722
3723 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3724
3725 PR c++/3716
3726 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
3727 (tsubst, case POINTER_TYPE): Handle pmfs here.
3728 (tsubst, case OFFSET_TYPE): Check it is not an offset to
3729 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
3730
3731 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3732
3733 PR c++/35
3734 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
3735 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
3736 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
3737 PARM_DECL.
3738 (tsubst_template_parms): Break up loop statements.
3739 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
3740 parm PARM_DECLs don't get promoted.
3741
3742 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3743
3744 PR c++/5123
3745 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
3746 (build_x_function_call): Cope with a COMPONENT_REF containing a
3747 TEMPLATE_ID_EXPR.
3748
3749 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3750
3751 PR c++/5213
3752 * pt.c (convert_template_argument): Be more careful determining
3753 when RECORD_TYPE templates are or are not templates.
3754
3755 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3756
3757 PR c++/775
3758 * cp-tree.h (handle_class_head): Adjust prototype.
3759 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
3760 parameters. Use for all class heads.
3761 * parse.y (named_class_head_sans_basetype, named_class_head,
3762 named_complex_class_head_sans_basetype,
3763 named_class_head_sans_basetype_defn,
3764 unnamed_class_head): Remove.
3765 (class_head, class_head_apparent_template): Recognize class heads
3766 (class_head_decl, class_head_defn): New reductions. Process class
3767 heads.
3768 (structsp): Adjust class definition and class declaration
3769 reductions.
3770 (maybe_base_class_list): Give diagnostic on empty list.
3771
3772 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3773
3774 PR c++/4379
3775 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
3776 single non-static member.
3777 (unary_complex_lvalue): If it cannot be a pointer to member, don't
3778 make it so. Check it is not pointer to reference.
3779
3780 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3781
3782 PR c++/5132
3783 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
3784 are processing a template decl.
3785
3786 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
3787
3788 PR c++/5116, c++/764
3789 * call.c (build_new_op): Make sure template class operands are
3790 instantiated. Simplify arglist construction.
3791
3792 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
3793
3794 * call.c (build_user_type_conversion_1): Use my_friendly_assert
3795 rather than if ... abort.
3796 * cvt.c (convert_to_reference): Likewise.
3797 * semantics.c (setup_vtbl_ptr): Likewise.
3798 * pt.c (lookup_template_class): Comment typo.
3799
3800 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
3801
3802 PR c++/5125
3803 * pt.c (push_template_decl_real): Make sure DECL has
3804 DECL_LANG_SPECIFIC.
3805
3806 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
3807
3808 PR c++/335
3809 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
3810 for non-reference fields.
3811 * typeck.c (require_complete_type): Use resolve_offset_ref).
3812
3813 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
3814
3815 PR c++/196
3816 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
3817
3818 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
3819
3820 PR c++/160
3821 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
3822 up. Don't stabilize_references when initializing a reference.
3823
3824 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3825
3826 * decl2.c (lang_f_options): Const-ify.
3827
3828 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
3829
3830 * config-lang.in (diff_excludes): Remove.
3831
3832 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
3833
3834 PR c++/90
3835 * typeck.c (build_function_call_real): Use original function
3836 expression for errors.
3837
3838 2001-12-18 Jason Merrill <jason@redhat.com>
3839
3840 PR c++/3242
3841 * class.c (add_method): Do compare 'this' quals when trying to match a
3842 used function. Don't defer to another used function.
3843
3844 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
3845
3846 * pt.c (instantiate_clone): Remove, fold into ...
3847 (instantiate_template): ... here. Simplify by removing mutual
3848 recursion.
3849 * typeck2.c (build_m_component_ref): Don't cv qualify the function
3850 pointed to by a pointer to function.
3851 * class.c (delete_duplicate_fields_1): Typo.
3852
3853 2001-12-18 Jason Merrill <jason@redhat.com>
3854
3855 C++ ABI change: destroy value arguments in caller.
3856 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
3857 create an extra binding level for the parameters.
3858 * decl.c (store_parm_decls): Don't do parameter cleanups.
3859
3860 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
3861
3862 * call.c (build_new_method_call): Use '%#V'.
3863 * error.c (cv_to_string): Use V parameter to determine padding.
3864
3865 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
3866
3867 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
3868 spellings in messages.
3869
3870 2001-12-17 Zack Weinberg <zack@codesourcery.com>
3871
3872 * cp-tree.h: Delete #defines for cp_error, cp_warning,
3873 cp_pedwarn, and cp_compiler_error.
3874 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
3875 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
3876 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3877 typeck2.c: Change calls to the above macros to use their
3878 language-independent equivalents: error, warning, pedwarn, and
3879 internal_error respectively.
3880
3881 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
3882
3883 * decl2.c (finish_file): Remove back_end_hook.
3884
3885 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
3886
3887 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
3888 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
3889 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
3890
3891 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
3892
3893 * lang-options.h: Use American spelling in messages.
3894
3895 2001-12-13 Jason Merrill <jason@redhat.com>
3896
3897 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
3898
3899 Use cleanups to run base and member destructors.
3900 * init.c (push_base_cleanups): New function, split out from...
3901 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
3902 * decl.c (finish_destructor_body): Move vbase destruction code to
3903 push_base_cleanups.
3904 (begin_function_body, finish_function_body): New fns.
3905 (finish_function): Move [cd]tor handling and call_poplevel to
3906 finish_function_body.
3907 (pushdecl): Skip the new level.
3908 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
3909 (setup_vtbl_ptr): Call push_base_cleanups.
3910 * method.c (synthesize_method): Call {begin,end}_function_body.
3911 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
3912 * cp-tree.h: Declare new fns.
3913 * parse.y (function_body, .begin_function_body): New nonterminals.
3914 (fndef, pending_inline, function_try_block): Use function_body.
3915 (ctor_initializer_opt, function_try_block): No longer has a value.
3916 (base_init): Remove .set_base_init token.
3917 (.set_base_init, compstmt_or_error): Remove.
3918 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
3919
3920 * optimize.c (maybe_clone_body): Fix parameter updating.
3921
3922 2001-12-12 Jason Merrill <jason@redhat.com>
3923
3924 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
3925 * semantics.c (genrtl_start_function): Don't pass
3926 parms_have_cleanups or push an extra binding level.
3927 (genrtl_finish_function): Lose cleanup_label cruft.
3928
3929 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
3930 (ctor_label): Remove.
3931 * semantics.c (finish_return_stmt): Lose ctor_label support.
3932 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
3933 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
3934 dtor_label.
3935
3936 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
3937 check for [cd]tors.
3938 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
3939
3940 * decl.c (finish_function): Check VMS_TARGET, not VMS.
3941
3942 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
3943 (end_cleanup_fn): And poplevel.
3944
3945 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
3946 if we're in a template.
3947
3948 2001-12-12 Jakub Jelinek <jakub@redhat.com>
3949
3950 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
3951 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
3952 THIS_NAME_P): Delete.
3953 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
3954 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
3955 with internal naming scheme.
3956 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
3957
3958 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
3959
3960 * decl.c (grokdeclarator): Deprecated implicit typename use.
3961
3962 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
3963
3964 PR g++/51
3965 * parse.y (frob_specs): Indicate it is a language linkage which
3966 contained the extern.
3967 * decl.c (grokdeclarator): Allow extern language linkage with
3968 other specifiers.
3969
3970 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
3971
3972 PR g++/72
3973 * decl.c (add_binding): Don't reject duplicate typedefs involving
3974 template parameters.
3975
3976 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
3977
3978 * parse.y, semantics.c: Similarly.
3979
3980 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
3981
3982 PR g++/87
3983 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
3984 (copy_args_p): Rename to ...
3985 (copy_fn_p): ... here.
3986 (grok_special_member_properties): New function.
3987 (grok_op_properties): Lose VIRTUALP parameter.
3988 (copy_assignment_arg_p): Remove.
3989 * call.c (build_over_call): Use copy_fn_p.
3990 * decl.c (grokfndecl): Reformat. Adjust call to
3991 grok_op_properties.
3992 (copy_args_p): Rename to ...
3993 (copy_fn_p): ... here. Reject template functions. Check for pass
3994 by value.
3995 (grok_special_member_properties): Remember special functions.
3996 (grok_ctor_properties): Don't remember them here, just check.
3997 (grok_op_properties): Likewise.
3998 (start_method): Call grok_special_member_properties.
3999 * decl2.c (grokfield): Likewise.
4000 (copy_assignment_arg_p): Remove.
4001 (grok_function_init): Don't remember abstract assignment here.
4002 * pt.c (instantiate_class_template): Call
4003 grok_special_member_properties.
4004 (tsubst_decl): Adjust grok_op_properties call.
4005
4006 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
4007
4008 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
4009 RID_TYPES_COMPATIBLE_P.
4010
4011 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
4012
4013 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
4014 call to build_aggr_init.
4015 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
4016
4017 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
4018
4019 * parse.y: Replace uses of the string non-terminal with STRING.
4020 Don't perform string concatentaion here.
4021 (string): Remove non-terminal.
4022 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
4023
4024 2001-12-05 Jason Merrill <jason@redhat.com>
4025
4026 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
4027 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
4028 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
4029 * pt.c (push_tinst_level): No longer static.
4030 * cp-tree.h: Declare them.
4031
4032 * init.c (resolve_offset_ref): Don't check access for the base
4033 conversion to access a FIELD_DECL.
4034
4035 * cp-tree.h (TYPE_REFFN_P): New macro.
4036 * decl.c (bad_specifiers): Check it, too.
4037
4038 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
4039 on the __*_type_info type if we haven't seen a definition.
4040
4041 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
4042
4043 * decl.c: Include c-common.h.
4044 (shadow_warning): Move to c-common.c.
4045
4046 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4047
4048 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
4049
4050 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
4051
4052 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
4053
4054 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
4055
4056 PR g++/164
4057 * init.c (sort_base_init): Allow binfos to be directly specified.
4058 * method.c (do_build_copy_constructor): Explicitly convert to the
4059 base instance.
4060 (do_build_assign_ref): Likewise.
4061
4062 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
4063
4064 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
4065 declaration and initialization.
4066
4067 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
4068
4069 * typeck2.c: Remove leading capital from diagnostic messages, as
4070 per GNU coding standards.
4071
4072 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
4073
4074 PR c++/3394
4075 * decl.c (xref_basetypes): Handle attributes between
4076 'class' and name.
4077
4078 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
4079
4080 PR g++/3381
4081 * parse.y (named_complex_class_head_sans_basetype): Add new
4082 reduction.
4083 * Make-lang.in (parse.c): Adjust expected conflict count.
4084
4085 2001-12-03 Jason Merrill <jason@redhat.com>
4086
4087 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
4088 immediate binfos for our virtual bases.
4089
4090 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
4091
4092 * call.c (build_java_interface_fn_ref): Similarly.
4093 * except.c (is_admissible_throw_operand): Similarly.
4094 * init.c (build_java_class_ref): Similarly.
4095 * xref.c (open_xref_file): Similarly.
4096
4097 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
4098
4099 * class.c (finish_struct): Remove trailing periods from messages.
4100 * decl.c (check_tag_decl): Similarly.
4101 * lex.c (cxx_set_yydebug): Similarly.
4102 * typeck2.c (friendly_abort): Similarly.
4103
4104 2001-11-29 Mark Mitchell <mark@codesourcery.com>
4105
4106 PR c++/3048
4107 * cp-tree.h (ovl_member): Remove.
4108 * decl2.c (merge_functions): Handle extern "C" functions
4109 specially.
4110 * tree.c (ovl_member): Remove.
4111
4112 2001-11-29 Mark Mitchell <mark@codesourcery.com>
4113
4114 PR c++/4842
4115 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
4116 FUNCTION_DECL, as input.
4117 (mark_overriders): Remove.
4118 (warn_hidden): Rework for the new ABI.
4119
4120 2001-11-29 Mark Mitchell <mark@codesourcery.com>
4121
4122 PR c++/3471
4123 * call.c (convert_like_real): Do not build additional temporaries
4124 for rvalues of class type.
4125
4126 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
4127
4128 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
4129 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
4130 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
4131 (DERIVED_FROM_P): Likewise.
4132 (enum base_access): Renumber, add ba_quiet bit mask.
4133 (get_binfo): Remove.
4134 (get_base_distance): Remove.
4135 (binfo_value): Remove.
4136 (ACCESSIBLY_DERIVED_FROM_P): Remove.
4137 * call.c (standard_conversion): Use lookup_base.
4138 * class.c (strictly_overrides): Likewise.
4139 (layout_virtual_bases): Likewise.
4140 (warn_about_ambiguous_direct_bases): Likewise.
4141 (is_base_of_enclosing_class): Likewise.
4142 (add_vcall_offset_vtbl_entries_1): Likewise.
4143 * cvt.c (build_up_reference): Adjust comment.
4144 * init.c (build_member_call): Reformat.
4145 * search.c (get_binfo): Remove.
4146 (get_base_distance_recursive): Remove.
4147 (get_base_distance): Remove.
4148 (lookup_base_r): Tweak.
4149 (lookup_base): Add ba_quiet control. Complete the types here.
4150 (covariant_return_p): Use lookup_base.
4151 * tree.c (binfo_value): Remove.
4152 (maybe_dummy_object): Use lookup_base.
4153 * typeck.c (build_static_cast): Use lookup_base.
4154 (get_delta_difference): Likewise.
4155 * typeck2.c (binfo_or_else): Use lookup_base.
4156 (build_scoped_ref): Add back error_mark_check.
4157 (build_m_component_ref): Use lookup_base.
4158
4159 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
4160
4161 * Make-lang.in (c++.generated-manpages): New dummy target.
4162
4163 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4164
4165 * Make-lang.in (cp-lang.o): Depends on c-common.h.
4166 * cp-lang.c (c-common.h): Include.
4167 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
4168 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
4169 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
4170
4171 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
4172
4173 * decl2.c (c_language): Move to c-common.c.
4174 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
4175 functions.
4176 (cxx_init): Update.
4177
4178 2001-11-26 Jason Merrill <jason@redhat.com>
4179
4180 * call.c (joust): Remove COND_EXPR hack.
4181
4182 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
4183
4184 * search.c (lookup_base_r): Declare bk in variable declaration
4185 space.
4186
4187 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
4188
4189 PR g++/3145
4190 * class.c (build_vbase_pointer): Remove.
4191 (build_vbase_path): Remove.
4192 (build_base_path): New function.
4193 * cp-tree.h (base_access, base_kind): New enumerations.
4194 (build_base_path): Declare.
4195 (convert_pointer_to_real): Remove.
4196 (convert_pointer_to): Remove.
4197 (lookup_base): Declare.
4198 (convert_pointer_to_vbase): Remove.
4199 * call.c (build_scoped_method_call): Use lookup_base &
4200 build_base_path instead of convert_pointer_to_real,
4201 get_base_distance & get_binfo.
4202 (build_over_call): Likewise.
4203 * cvt.c (cp_convert_to_pointer): Likewise.
4204 (convert_to_pointer_force): Likewise.
4205 (build_up_reference): Likewise.
4206 (convert_pointer_to_real): Remove.
4207 (convert_pointer_to): Remove.
4208 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
4209 instead of convert_pointer_to_vbase & build_vbase_path.
4210 (emit_base_init): Use build_base_path instead of
4211 convert_pointer_to_real.
4212 (expand_virtual_init): Lose unrequired conversions.
4213 (resolve_offset_ref): Use lookup_base and build_base_path
4214 instead of convert_pointer_to.
4215 * rtti.c (build_dynamic_cast_1): Use lookup_base &
4216 build_base_path instead of get_base_distance & build_vbase_path.
4217 * search.c (get_vbase_1): Remove.
4218 (get_vbase): Remove.
4219 (convert_pointer_to_vbase): Remove.
4220 (lookup_base_r): New function.
4221 (lookup_base): New function.
4222 * typeck.c (require_complete_type): Use lookup_base &
4223 build_base_path instead of convert_pointer_to.
4224 (build_component_ref): Likewise.
4225 (build_x_function_call): Likewise.
4226 (get_member_function_from_ptrfunc): Likewise.
4227 (build_component_addr): Likewise.
4228 * typeck2.c (build_scoped_ref): Likewise.
4229
4230 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4231
4232 * cp-tree.h (CP_TYPE_QUALS): Removed.
4233 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
4234 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
4235 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
4236 * dump.c (cp_dump_tree): Use void* dump_info argument to match
4237 lang-hooks prototype.
4238 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
4239 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
4240 CP_TYPE_QUALS changed to cp_type_quals.
4241 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
4242 (CXX_C_OBJS): Remove c-dump.o.
4243
4244 2001-11-21 Mark Mitchell <mark@codesourcery.com>
4245
4246 PR c++/3637
4247 * pt.c (lookup_template_class): Ensure that all specializations
4248 are registered on the list corresponding to the most general
4249 template.
4250
4251 2001-11-20 Mark Mitchell <mark@codesourcery.com>
4252
4253 * call.c (non_reference): Add documentation.
4254 (convert_class_to_reference): Do not strip reference types
4255 from conversion operators.
4256 (maybe_handle_ref_bind): Simplify.
4257 (compare_ics): Correct handling of references.
4258
4259 2001-11-19 John Wilkinson <johnw@research.att.com>
4260
4261 * dump.c (dump_op): New function.
4262 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
4263 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
4264 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
4265
4266 2001-11-19 Mark Mitchell <mark@codesourcery.com>
4267
4268 PR4629
4269 * semantics.c (finish_sizeof): Make sure that expression created
4270 while processing a template do not have a type.
4271 (finish_alignof): Likewise.
4272 * typeck.c (c_sizeof): Likewise.
4273 (expr_sizeof): Likewise.
4274
4275 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
4276
4277 * lex.c (cxx_finish): Call c_common_finish.
4278 (finish_parse): Remove.
4279
4280 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4281
4282 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
4283 when displaying error message about missing array bounds.
4284
4285 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4286
4287 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
4288 CONST_CAST_EXPR.
4289 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
4290
4291 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
4292
4293 * cp-tree.h (print_class_statistics): Restore.
4294
4295 2001-11-15 Jason Merrill <jason@redhat.com>
4296
4297 * method.c (use_thunk): Don't emit debugging information for thunks.
4298
4299 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
4300 * decl.c (make_typename_type): Handle getting a class template.
4301 * search.c (lookup_field_r): A class template is good enough for
4302 want_type.
4303
4304 * call.c (convert_like_real): Only use cp_convert for the bad part.
4305 (standard_conversion): Also allow bad int->enum.
4306 * typeck.c (ptr_reasonably_similar): Also allow functions to
4307 interconvert. Pointers to same-size integers are reasonably
4308 similar.
4309
4310 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
4311 give it void type.
4312
4313 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
4314
4315 PR g++/3154
4316 * init.c (sort_base_init): Remove unreachable code.
4317 (expand_member_init): Adjust comment to reflect reality. Simplify
4318 and remove unreachable code.
4319
4320 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
4321
4322 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
4323 (cxx_init): Update prototype.
4324 * decl.c (init_decl_processing): Rename. Move null node init
4325 to its creation time.
4326 * lex.c (cxx_init_options): Update.
4327 (cxx_init): Combine with old init_parse; also call
4328 cxx_init_decl_processing.
4329
4330 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
4331
4332 * decl.c (check_initializer): Try to complete the type of an
4333 array element before checking whether it's complete. Don't
4334 complain about arrays with complete element types but an
4335 unknown size.
4336 (cp_finish_decl): Build the hierarchical constructor before
4337 calling maybe_deduce_size_from_array_init.
4338
4339 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
4340
4341 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
4342
4343 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
4344
4345 PR g++/4206
4346 * parse.y (already_scoped_stmt): Remove.
4347 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
4348
4349 2001-11-12 H.J. Lu <hjl@gnu.org>
4350
4351 * cvt.c (ocp_convert): Don't warn the address of a weak
4352 function is always `true'.
4353
4354 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
4355
4356 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
4357 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
4358 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
4359 * cp-tree.h (print_class_statistics): Remove.
4360 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
4361 cxx_print_identifier, cxx_set_yydebug): New.
4362 * lex.c (set_yydebug): Rename c_set_yydebug.
4363 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
4364 lang_print_xnode): Rename.
4365 * tree.c (print_lang_statistics): Rename.
4366
4367 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4368
4369 * class.c (dump_array): Fix format specifier warning.
4370
4371 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
4372
4373 * cp-lang.c (LANG_HOOKS_NAME): Override.
4374 (struct lang_hooks): Constify.
4375 * lex.c (cxx_init_options): Update.
4376 (lang_identify): Remove.
4377 * parse.y (language_string): Remove.
4378
4379 2001-11-08 Andreas Franck <afranck@gmx.de>
4380
4381 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
4382 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
4383 suggested by autoconf.
4384 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
4385 (c++.install-common): Use the transformed target alias names.
4386
4387 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4388
4389 * Make-lang.in: Update.
4390 * cp-lang.c: Include langhooks-def.h.
4391
4392 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4393
4394 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
4395
4396 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4397
4398 * lex.c (copy_lang_type): Add static prototype.
4399
4400 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4401
4402 * pt.c (unify): Handle SCOPE_REF.
4403
4404 2001-11-01 Jakub Jelinek <jakub@redhat.com>
4405
4406 * tree.c (cp_copy_res_decl_for_inlining): Adjust
4407 DECL_ABSTRACT_ORIGIN for the return variable.
4408
4409 2001-10-31 Zack Weinberg <zack@codesourcery.com>
4410
4411 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4412
4413 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
4414
4415 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
4416 semantics.c, spew.c: Fix spelling errors.
4417
4418 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4419
4420 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
4421
4422 2001-10-25 Zack Weinberg <zack@codesourcery.com>
4423
4424 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
4425 pop_everything.
4426
4427 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4428
4429 * cp-lang.c (cxx_get_alias_set): New function.
4430 Point LANG_HOOKS_GET_ALIAS_SET to it.
4431
4432 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4433
4434 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
4435 * cp-tree.h (make_unbound_class_template): Prototype new function.
4436 * decl.c (make_unbound_class_template): New function.
4437 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
4438 * error.c (dump_type): Likewise.
4439 * mangle.c (write_type): Likewise.
4440 * parse.y (template_parm): Likewise.
4441 (template_argument): Use make_unbound_class_template.
4442 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
4443 (tsubst): Likewise.
4444 (tsubst_copy): Likewise.
4445 (unify): Likewise.
4446 * tree.c (walk_tree): Likewise.
4447 * typeck.c (comptypes): Likewise.
4448
4449 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4450
4451 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
4452 extra calls into fewer ones.
4453
4454 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
4455
4456 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
4457 Warn when merging inline with attribute noinline.
4458 (start_decl, start_function): Warn if inline and attribute
4459 noinline appear in the same declaration.
4460
4461 2001-10-16 H.J. Lu <hjl@gnu.org>
4462
4463 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
4464 for tree checking disabled.
4465
4466 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
4467
4468 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
4469 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
4470
4471 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
4472
4473 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
4474 (unify): Only handle MINUS_EXPR specially if the above flag is set
4475 and the subtracted constant is 1. Clear the flag on recursive calls.
4476 Set it when unifying the maximum value in an INTEGER_TYPE's range.
4477
4478 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
4479
4480 * decl.c (bad_specifiers): Don't allow exception specifications
4481 on any typedefs.
4482
4483 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
4484
4485 * cp/lex.c (init_cp_pragma): Similarly.
4486
4487 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4488
4489 * pt.c (lookup_template_class): Build complete template arguments
4490 for BOUND_TEMPLATE_TEMPLATE_PARM.
4491
4492 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4493
4494 * cp-tree.h (TYPE_BINFO): Update comment.
4495 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
4496 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
4497 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
4498 (copy_type): Prototype new function.
4499 * lex.c (copy_lang_decl): Gather tree node statistics.
4500 (copy_lang_type): New function.
4501 (copy_type): Likewise.
4502 (cp_make_lang_type): Create lang_type for
4503 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
4504 and BOUND_TEMPLATE_TEMPLATE_PARM.
4505 * pt.c (tsubst): Use copy_type instead of copy_node.
4506 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
4507
4508 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4509
4510 * pt.c (determine_specialization): Ignore functions without
4511 DECL_TEMPLATE_INFO.
4512
4513 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
4514
4515 PR g++/4476
4516 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
4517
4518 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
4519
4520 * typeck2.c (store_init_value): Don't re-digest a bracketed
4521 initializer.
4522
4523 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
4524 ANON_AGGR_TYPE_P.
4525
4526 2001-10-11 Richard Henderson <rth@redhat.com>
4527
4528 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
4529 of an asm statement.
4530 (build_vtbl_ref_1): Split out from build_vtbl_ref.
4531 (build_vfn_ref): Use it to handle vtable descriptors before
4532 calling build_vtable_entry_ref.
4533 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
4534
4535 2001-10-10 Richard Henderson <rth@redhat.com>
4536
4537 * parse.y (asm_operand): Allow named operands.
4538 * semantics.c (finish_asm_stmt): Tweek for changed location
4539 of the operand constrant.
4540
4541 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
4542
4543 * call.c (standard_conversion): Add bad conversion between
4544 integers and pointers.
4545 (convert_like_real): Don't use convert_for_initialization for bad
4546 conversions; complain here and use cp_convert.
4547 (build_over_call): Don't handle bad conversions specially.
4548 (perform_implicit_conversion): Allow bad conversions.
4549 (can_convert_arg_bad): New fn.
4550 * cp-tree.h: Declare it.
4551 * typeck.c (convert_for_assignment): Use it.
4552 (ptr_reasonably_similar): Any target type is similar to void.
4553
4554 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
4555
4556 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
4557 (cp/cp-lang.o): New rule.
4558 * cp-tree.h: Declare hooks.
4559 * tree.c: Make hooks non-static.
4560 (init_tree): Don't initialize hooks here.
4561 * lex.c: Likewise. Move definition of lang_hooks to...
4562 * cp-lang.c: ... new file.
4563
4564 2001-10-08 Richard Henderson <rth@redhat.com>
4565
4566 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
4567 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
4568
4569 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4570
4571 * class.c (build_vtable_entry_ref): Const-ify.
4572 * decl.c (predefined_identifier,
4573 initialize_predefined_identifiers): Likewise.
4574 * init.c (build_new_1): Likewise.
4575 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
4576 Likewise.
4577
4578 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
4579
4580 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
4581 (INSNS_PER_STMT): Likewise.
4582 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
4583 (copy_body, initialize_inlined_parameters): Likewise.
4584 (declare_return_variable, inlinable_function_p): Likewise.
4585 (expand_call_inline, expand_calls_inline): Likewise.
4586 (optimize_inline_calls, clone_body): Likewise.
4587 * tree.c (walk_tree): Moved to ../tree-inline.c.
4588 (walk_tree_without_duplicates): Likewise.
4589 (copy_tree_r, remap_save_expr): Likewise.
4590
4591 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
4592
4593 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
4594 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
4595 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
4596 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
4597 (flag_inline_trees): Moved declaration to ../tree-inline.h.
4598 (walk_tree): Moved declaration to ../tree-inline.h.
4599 (walk_tree_without_duplicates, copy_tree_r): Likewise.
4600 (remap_save_expr): Likewise.
4601 * decl.c: Include tree-inline.h.
4602 (lang_mark_tree): Don't mark inlined_fns.
4603 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
4604 * optimize.c: Include tree-inline.h.
4605 (optimize_inline_calls): Move declaration to ../tree.h, as
4606 non-static.
4607 (remap_decl): Use language-independent constructs and hooks.
4608 (remap_block, copy_body_r, declare_return_variable): Likewise.
4609 (inlinable_function_p): Likewise. Don't test for
4610 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
4611 no longer language-specific.
4612 (optimize_inline_calls): Likewise. Make it non-static. Moved
4613 call of dump_function to...
4614 (optimize_function): Here...
4615 (clone_body): New function, extracted from...
4616 (maybe_clone_body): ... here. Build decl_map locally and pass
4617 it on to clone_body.
4618 * pt.c, semantics.c: Include tree-inline.h.
4619 * tree.c: Likewise.
4620 (cp_walk_subtrees): New language-specific hook for tree inlining.
4621 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
4622 cp_is_overload_p, cp_auto_var_in_fn_p,
4623 cp_copy_res_decl_for_inlining): Likewise.
4624 (walk_tree): Move language-specific constructs into...
4625 (cp_walk_subtrees): this new function.
4626 (copy_tree_r): Use language-independent constructs and hooks.
4627 (init_tree): Initialize tree inlining hooks.
4628 (remap_save_expr): Adjust prototype so that the declaration
4629 does not require the definition of splay_tree.
4630
4631 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
4632
4633 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
4634 to build the declaration instead of the declaration itself.
4635
4636 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
4637
4638 * decl2.c (cxx_decode_option): Add 'else'.
4639
4640 * spew.c (end_input): No longer static.
4641 * cp-tree.h: Declare it.
4642 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
4643
4644 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
4645
4646 * call.c (build_over_call), typeck.c (build_function_call_real):
4647 Pass type attributes to check_function_format rather than name or
4648 assembler name. Don't require there to be a name or assembler
4649 name to check formats.
4650
4651 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
4652
4653 * decl.c (init_decl_processing): Don't call
4654 init_function_format_info. Initialize lang_attribute_table
4655 earlier.
4656 (builtin_function): Call decl_attributes.
4657 (insert_default_attributes): New.
4658
4659 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
4660
4661 * decl.c (grokdeclarator): Copy array typedef handling from C
4662 frontend.
4663
4664 * decl.c (grokdeclarator): Copy too-large array handling from C
4665 frontend.
4666
4667 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
4668
4669 * config-lang.in (target_libs): Added target-gperf, so that we
4670 don't try to build it if C++ is disabled.
4671
4672 2001-09-23 Zack Weinberg <zack@codesourcery.com>
4673
4674 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
4675 (cp/errfn.o): Delete rule.
4676 (cp/error.o): Depend on flags.h.
4677 * errfn.c: Delete file.
4678 * cp-tree.h: Declare warn_deprecated. Remove definitions of
4679 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
4680 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
4681 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
4682 internal_error respectively. Make cp_deprecated into a macro.
4683 Don't define cp_printer typedef or declare cp_printers.
4684 * error.c: Include flags.h.
4685 Delete: struct tree_formatting_info, print_function_argument_list,
4686 print_declaration, print_expression, print_function_declaration,
4687 print_function_parameter, print_type_id, print_cv_qualifier_seq,
4688 print_type_specifier_seq, print_simple_type_specifier,
4689 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
4690 print_parameter_declaration_clause, print_exception_specification,
4691 print_nested_name_specifier, and definition of cp_printers.
4692 (locate_error): New function.
4693 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
4694 rewritten in terms of locate_error and diagnostic.c.
4695 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
4696 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
4697 (init_error): Adjust to match.
4698
4699 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4700
4701 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
4702
4703 2001-09-21 Richard Henderson <rth@redhat.com>
4704
4705 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
4706 (build_vtbl_initializer): Likewise.
4707 (build_vfn_ref): New.
4708 * cp-tree.h: Declare it.
4709 * call.c (build_over_call): Use it.
4710 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
4711 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
4712
4713 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
4714
4715 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
4716
4717 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
4718
4719 Table-driven attributes.
4720 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
4721 * decl2.c (cplus_decl_attributes): Only take one attributes
4722 parameter.
4723 * cp-tree.c (cplus_decl_attributes): Update prototype.
4724 * class.c (finish_struct), decl.c (start_decl, start_function),
4725 decl2.c (grokfield), friend.c (do_friend), parse.y
4726 (parse_bitfield): Update calls to cplus_decl_attributes.
4727 * decl.c (grokdeclarator): Take a pointer to a single ordinary
4728 attribute list.
4729 * decl.h (grokdeclarator): Update prototype.
4730 * decl2.c (grokfield): Take a single ordinary attribute list.
4731 * friend.c (do_friend): Likewise.
4732 * decl.c (shadow_tag, groktypename, start_decl,
4733 start_handler_parms, grokdeclarator, grokparms, start_function,
4734 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
4735 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
4736 (process_template_parm, do_decl_instantiation): Pass single
4737 ordinary attribute lists around.
4738 * decl.c (grokdeclarator): Correct handling of nested attributes.
4739 Revert the patch
4740 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
4741 * decl.c (grokdeclarator): Embedded attrs bind to the right,
4742 not the left.
4743 .
4744 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
4745 (cp_attribute_table): Declare.
4746 * decl.c (valid_lang_attribute): Don't define.
4747 (lang_attribute_table): Define.
4748 (init_decl_processing): Initialize lang_attribute_table instead of
4749 valid_lang_attribute.
4750 * tree.c (cp_valid_lang_attribute): Remove.
4751 (handle_java_interface_attribute, handle_com_interface_attribute,
4752 handle_init_priority_attribute): New functions.
4753 (cp_attribute_table): New array.
4754 * decl2.c (import_export_class): Don't use
4755 targetm.valid_type_attribute.
4756
4757 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4758
4759 * Make-lang.in (cp/error.o): Depend on real.h
4760 * error.c: #include "real.h"
4761
4762 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4763
4764 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
4765 xmalloc/strcpy/strcat.
4766
4767 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4768
4769 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
4770 Const-ification.
4771 * pt.c (tsubst_decl): Likewise.
4772
4773 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4774
4775 * decl2.c (lang_f_options): Const-ification.
4776 * lex.c (cplus_tree_code_name): Likewise.
4777 * spew.c (yyerror): Likewise.
4778
4779 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
4780
4781 PR c++/3986
4782 * class.c (force_canonical_binfo_r): Check & move an indirect
4783 primary base first.
4784 (force_canonical_binfo): Check that it's not already
4785 canonical.
4786 (mark_primary_virtual_base): Remove BINFO parameter.
4787 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
4788
4789 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
4790
4791 Remove TYPE_NONCOPIED_PARTS.
4792 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
4793 CLASSTYPE_PURE_VIRTUALS.
4794 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
4795 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
4796 (layout_class_type): Don't call fixup_inline_methods here ...
4797 (finish_struct_1): ... call it here.
4798
4799 2001-09-04 Mark Mitchell <mark@codesourcery.com>
4800
4801 * decl.c (duplicate_decls): Remove code deadling with
4802 DECL_SAVED_INSNS.
4803 * decl2.c (finish_file): Likewise.
4804 * pt.c (instantiate_decl): Likewise.
4805 * semantics.c (expand_body): Don't defer local functions if
4806 they wouldn't be deferred for some other reason. Don't
4807 generate RTL for functions that will not be emitted.
4808 (genrtl_start_function): Remove code deadling with
4809 DECL_SAVED_INSNS.
4810 (genrtl_finish_function): Likewise.
4811
4812 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
4813
4814 PR c++/4203
4815 * call.c (build_over_call): Do not optimize any empty base
4816 construction.
4817
4818 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4819
4820 * error.c (dump_template_decl): Output template parameters
4821 together with their specifiers.
4822 Output `class' prefix for template template parameter.
4823 (dump_decl): Fix formatting.
4824
4825 2001-08-30 Kurt Garloff <garloff@suse.de>
4826
4827 * optimize.c (inlinable_function_p): Allow only smaller single
4828 functions. Halve inline limit after reaching recursive limit.
4829
4830 2001-08-30 Joern Rennecke <amylaar@redhat.com>
4831 Jason Merrill <jason_merrill@redhat.com>
4832
4833 * class.c (build_vtable_entry_ref): Subtract in char*, not
4834 ptrdiff_t.
4835
4836 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
4837
4838 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
4839 (build_cplus_array_type): Use cp_build_qualified_type, not
4840 TYPE_MAIN_VARIANT, to get an unqualified version.
4841
4842 * decl2.c (grok_alignof): Lose.
4843 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
4844 * typeck.c (c_alignof): Lose.
4845 * semantics.c (finish_sizeof, finish_alignof): New.
4846 * parse.y: Use them.
4847 * cp-tree.h: Declare them.
4848
4849 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
4850
4851 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
4852 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
4853 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
4854
4855 2001-08-19 Jakub Jelinek <jakub@redhat.com>
4856
4857 * typeck2.c (add_exception_specifier): Only require complete type if
4858 not in processing template declaration.
4859
4860 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4861
4862 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
4863 GNU_xref_start_scope and GNU_xref_end_scope.
4864
4865 * tree.c (TYPE_HASH): Moved to ../tree.h.
4866
4867 2001-08-16 Mark Mitchell <mark@codesourcery.com>
4868
4869 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
4870 on COMPOUND_EXPRs.
4871
4872 2001-08-14 Richard Henderson <rth@redhat.com>
4873
4874 * class.c, cp-tree.h (build_vfn_ref): Remove.
4875 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
4876
4877 2001-08-13 Mark Mitchell <mark@codesourcery.com>
4878
4879 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
4880 empty class assignment as having side-effects to avoid
4881 spurious warnings.
4882
4883 2001-08-13 Zack Weinberg <zackw@panix.com>
4884
4885 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
4886 * except.c: Include libfuncs.h.
4887
4888 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4889
4890 * decl.c (grokdeclarator): Clarify diagnostic message.
4891
4892 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4893
4894 * decl2.c (do_nonmember_using_decl): Replace using directive
4895 with using declaration in the error message.
4896
4897 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4898
4899 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
4900 criterion to avoid rebuilding expression tree instead of
4901 processing_template_decl.
4902
4903 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
4904
4905 Support named return value optimization for inlines, too.
4906 * decl.c (finish_function): Nullify returns here.
4907 * semantics.c (genrtl_start_function): Not here.
4908 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
4909 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
4910 Also nullify the CLEANUP_STMT for the nrv.
4911 * cp-tree.h: Declare it.
4912 * optimize.c (declare_return_variable): Replace the nrv with the
4913 return variable.
4914 * typeck.c (check_return_expr): Be more flexible on alignment check.
4915 Ignore cv-quals when checking for a matching type.
4916
4917 2001-08-09 Richard Henderson <rth@redhat.com>
4918
4919 * decl2.c (finish_objects): Use target hooks instead of
4920 assemble_constructor and assemble_destructor.
4921
4922 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
4923
4924 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
4925
4926 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
4927
4928 PR c++/3820
4929 Stop using TYPE_NONCOPIED_PARTS.
4930 * call.c (build_over_call): Be careful when copy constructing
4931 or assigning to an empty class.
4932 * class.c (check_bases_and_members): It has a
4933 COMPLEX_ASSIGN_REF if it has a vptr.
4934 (layout_class_type): Don't add empty class padding to
4935 TYPE_NONCOPIED_PARTS.
4936 (finish_struct_1): Don't add the VFIELD either.
4937 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
4938 initialization.
4939
4940 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
4941
4942 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
4943
4944 2001-08-06 Richard Henderson <rth@redhat.com>
4945
4946 * decl2.c (finish_objects): Pass a symbol_ref and priority to
4947 assemble_{constructor,destructor}. Remove priority handling.
4948
4949 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
4950
4951 Don't allow template-id in using-declaration.
4952 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
4953 (do_class_using_decl): Likewise.
4954
4955 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4956
4957 * cp/spew.c (read_token): No need to pop buffers.
4958
4959 2001-08-02 Stan Shebs <shebs@apple.com>
4960
4961 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
4962 (fnaddr_from_vtable_entry): Remove decl.
4963 * method.c (use_thunk): Update comment.
4964
4965 2001-08-01 Andrew Cagney <ac131313@redhat.com>
4966
4967 * repo.c (get_base_filename): Change return value to const char
4968 pointer.
4969
4970 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
4971
4972 Kill -fhonor-std.
4973 * NEWS: Document.
4974 * cp-tree.h (flag_honor_std): Remove.
4975 (CPTI_FAKE_STD): Remove.
4976 (std_node): Remove comment about it being NULL.
4977 (fake_std_node): Remove.
4978 * decl.c (in_fake_std): Remove.
4979 (walk_namespaces_r): Remove fake_std_node check.
4980 (push_namespace): Remove in_fake_std code.
4981 (pop_namespace): Likewise.
4982 (lookup_name_real): Remove fake_std_node check.
4983 (init_decl_processing): Always create std_node. Always add
4984 std:: things there.
4985 (builtin_function): Always put non '_' fns in std.
4986 * decl2.c (flag_honor_std): Remove.
4987 (lang_f_options): Remove honor-std.
4988 (unsupported_options): Add honor-std.
4989 (set_decl_namespace): Remove fake_std_node check.
4990 (validate_nonmember_using_decl): Likewise.
4991 (do_using_directive): Likewise.
4992 (handle_class_head): Likewise.
4993 * dump.c (cp_dump_tree): Likewise.
4994 * except.c (init_exception_processing): Adjust.
4995 * init.c (build_member_call): Remove fake_std_node check.
4996 (build_offset_ref): Likewise.
4997 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
4998 * rtti.c (init_rtti_processing): Adjust.
4999
5000 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
5001
5002 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
5003 operand while calling cp_tree_equal.
5004
5005 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
5006
5007 The 3.0 ABI no longer has vbase pointer fields.
5008 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
5009 FORMAT_VBASE_NAME): Remove.
5010 * method.c (do_build_copy_constructor): Adjust.
5011 (do_build_assign_ref): Adjust.
5012 * search.c (lookup_field_r): Adjust.
5013 * typeck.c (build_component_ref): Adjust.
5014
5015 The 3.0 ABI always has a vtable pointer at the start of every
5016 polymorphic class.
5017 * rtti.c (build_headof_sub): Remove.
5018 (build_headof): Adjust.
5019 (get_tinfo_decl_dynamic): No need to check flag_rtti
5020 here. Adjust.
5021 (create_real_tinfo_var): Explain why we need a hidden name.
5022
5023 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
5024
5025 PR c++/3631
5026 * class.c (update_vtable_entry_for_fn): The fixed adjustment
5027 of a virtual thunk should be from declaring base.
5028
5029 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
5030
5031 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
5032 the shared virtual base, so preserving inheritance graph order.
5033
5034 2001-07-30 Andreas Jaeger <aj@suse.de>
5035
5036 * decl2.c: Remove unused var global_temp_name_counter.
5037
5038 2001-07-28 Richard Henderson <rth@redhat.com>
5039
5040 * method.c (pending_inlines): Remove.
5041
5042 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
5043
5044 * class.c (mark_primary_virtual_base): Don't adjust base
5045 offsets here.
5046 (dfs_unshared_virtual_bases): Adjust them here.
5047 (mark_primary_bases): Explain why we adjust at the end.
5048
5049 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
5050
5051 * class.c (finish_struct_1): When copying the primary base's
5052 VFIELD, make sure we find it is at offset zero.
5053
5054 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5055
5056 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
5057 tsubst_expr for default template arguments.
5058
5059 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
5060
5061 PR c++/3621
5062 * spew.c (yylex): Only copy the token's lineno, if it is
5063 nonzero.
5064
5065 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
5066
5067 PR c++/3624
5068 * call.c (resolve_args): Simplify, call
5069 convert_from_reference.
5070 (build_new_op): Resolve and convert from reference ARG1
5071 earlier. Adjust ARG2 & ARG3 resolve and conversion.
5072
5073 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
5074
5075 * decl.c (last_function_parm_tags): Remove.
5076 (current_function_parm_tags): Remove.
5077 (init_decl_processing): Adjust.
5078 (start_function): Adjust.
5079 (store_parm_decls): Adjust.
5080
5081 PR c++/3152
5082 * decl.c (grokdeclarator): Detect when a function typedef is
5083 declaring a function, and create last_function_parms correctly.
5084
5085 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
5086
5087 * call.c (joust): Only prefer a non-builtin candidate to a builtin
5088 one if they have the same signature.
5089
5090 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
5091 it rather than toplevel_bindings_p. Give it a mangled name if static.
5092 (convert_to_reference): Adjust.
5093 * decl2.c (get_temp_name): Lose.
5094 * mangle.c (mangle_ref_init_variable): New fn.
5095 (mangle_guard_variable): Strip the ref-init header.
5096 * cp-tree.h: Adjust.
5097 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
5098 initializer.
5099 (grok_reference_init): Always use DECL_INITIAL.
5100
5101 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5102
5103 PR c++/3416
5104 * call.c (build_conditional_expr): Recheck args after
5105 conversions.
5106 * cp-tree.h (build_conditional_expr): Move to correct file.
5107 * typeck.c (decay_conversion): Diagnose any unknown types
5108 reaching here.
5109 (build_binary_op): Don't do initial decay or default
5110 conversions on overloaded functions.
5111 (build_static_cast): Don't do a decay conversion here.
5112
5113 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5114
5115 PR c++/3543
5116 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
5117 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
5118
5119 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5120
5121 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
5122 (create_vtbl_ptr): ... here.
5123
5124 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
5125
5126 * class.c (build_vbase_offset_vbtl_entries): Look for
5127 non-primary base of which we are a sub vtable.
5128
5129 2001-07-24 Phil Edwards <pme@sources.redhat.com>
5130
5131 * semantics.c (finish_this_expr): Remove unused code.
5132
5133 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
5134
5135 Simplify rtti, now we've only one ABI.
5136 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
5137 CPTI_TINFO_VAR_ID.
5138 (tinfo_decl_id, tinfo_var_id): Remove.
5139 (get_typeid_1): Remove.
5140 * rtti.c
5141 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
5142 (typeid_ok_p): New function.
5143 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
5144 (get_tinfo_decl): Remove old abi documentation.
5145 (tinfo_from_decl): Remove.
5146 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
5147 (get_typeid_1): Remove.
5148 (get_base_offset): Remove.
5149 (synthesize_tinfo_var): Absorb get_base_offset.
5150 (create_real_tinfo_var): Don't use tinfo_decl_id.
5151
5152 2001-07-23 Graham Stott <grahams@redhat.com>
5153
5154 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
5155 variable has_two_argument_delete_p.
5156
5157 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
5158
5159 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
5160 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
5161 (CPTI_INDEX_IDENTIFIER): Remove.
5162 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
5163 (delta2_identifier): Remove.
5164 (index_identifier): Remove.
5165 (pfn_or_delta2_identifier): Remove.
5166 (flag_vtable_thunks): Remove.
5167 (VTABLE_DELTA2_NAME): Remove.
5168 (VTABLE_INDEX_NAME): Remove.
5169 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
5170 (vfunc_ptr_type_node): Adjust.
5171 (VTABLE_NAME_PREFIX): Adjust.
5172 (build_vfn_ref): Lose first parameter.
5173 (fixup_all_virtual_upcast_offsets): Remove.
5174 * decl.c (initialize_predefined_identifiers): Remove
5175 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
5176 (init_decl_processing): Remove no-vtable-thunk code.
5177 * decl2.c (flag_vtable_thunks): Remove.
5178 (mark_vtable_entries): Remove no-vtable-thunk code.
5179 * error.c (dump_decl): Remove no-vtable-thunk code.
5180 (dump_expr): Adjust ptr to member function code.
5181 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
5182 code.
5183 * rtti.c (build_headof): Remove no-vtable-thunk code.
5184 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
5185 * search.c (get_base_distance): Remove expand_upcast_fixups case.
5186 (virtual_context) Remove.
5187 (expand_upcast_fixups): Remove.
5188 (fixup_virtual_upcast_offsets): Remove.
5189 (fixup_all_virtual_upcast_offsets): Remove.
5190 * typeck.c (get_member_function_from_ptrfunc): Remove
5191 no-vtable-thunk code.
5192 * call.c (build_over_call): Adjust call to build_vfn_ref.
5193 * class.c (build_vfn_ref): Lose first parameter. Remove
5194 no-vtable-thunk code.
5195 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
5196 (build_vtable_entry): Remove no-vtable-thunk code.
5197
5198 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
5199
5200 Remove old-abi remnants. Remove comments about old abi
5201 behavior. Remove references to 'new-abi' in comments.
5202 * cp-tree.h: Adjust comments.
5203 (vbase_offsets_in_vtable_p): Delete.
5204 (vcall_offsets_in_vtable_p): Delete.
5205 (vptrs_present_everywhere_p): Delete.
5206 (all_overridden_vfuns_in_vtables_p): Delete.
5207 (merge_primary_and_secondary_vtables_p): Delete.
5208 (TYPE_CONTAINS_VPTR_P): Adjust.
5209 (VTT_NAME_PREFIX): Remove.
5210 (CTOR_VTBL_NAME_PREFIX): Remove.
5211 (init_vbase_pointers): Remove.
5212 * class.c: Adjust coments.
5213 (build_vbase_pointer_fields): Delete.
5214 (build_vbase_pointer): Remove old-abi code.
5215 (build_secondary_vtable): Likewise.
5216 (modify_all_vtables): Likewise.
5217 (create_vtable_ptr): Likewise.
5218 (layout_class_type): Likewise.
5219 (finish_struct_1): Likewise.
5220 (finish_vtbls): Likewise.
5221 (dfs_finish_vtbls): Delete.
5222 (build_vbase_offset_vtbl_entries): Remove old-abi code.
5223 * cvt.c: Adjust comments.
5224 * decl.c: Adjust comments.
5225 * decl2.c: Adjust comments.
5226 * init.c: Adjust comments.
5227 (construct_virtual_bases): Remove old-abi code.
5228 * lang-specs.h: Remove -fno-new-abi.
5229 * mangle.c: Adjust comments.
5230 * rtti.c: Adjust comments.
5231 (get_base_offset): Remove old-abi-code.
5232 * search.c: Adjust comments.
5233 (dfs_init_vbase_pointers): Remove.
5234 (dfs_vtable_path_unmark): Remove.
5235 (init_vbase_pointers): Remove.
5236 * semantics.c: Adjust comments.
5237 (emit_associated_thunks): Remove old-abi code.
5238 * typeck.c: Adjust comments.
5239
5240 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
5241
5242 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
5243 params.h.
5244
5245 2001-07-19 Mark Mitchell <mark@codesourcery.com>
5246
5247 * class.c (finish_struct_anon): Forbid nested classes.
5248
5249 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
5250
5251 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
5252 * optimize.c: Include debug.h.
5253 (maybe_clone_body): Use debug hook.
5254 * semantics.c: Include debug.h.
5255 (expand_body): Use debug hook.
5256
5257 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
5258
5259 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
5260
5261 2001-07-18 Mark Mitchell <mark@codesourcery.com>
5262
5263 * class.c (type_requires_array_cookie): New function.
5264 (check_methods): Don't try to figure out whether the type needs a
5265 cookie here.
5266 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
5267 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
5268 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
5269 * pt.c (instantiate_class_template): Don't set
5270 TYPE_VEC_DELETE_TAKES_SIZE.
5271 * NEWS: Document ABI changes from GCC 3.0.
5272
5273 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
5274 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
5275
5276 * NEWS (Changes in GCC 3.0): Fix typo.
5277
5278 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
5279
5280 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
5281 which attributes are to be attached, and a flags argument. Update
5282 call to decl_attributes.
5283 (grokfield): Update call to decl_attributes.
5284 * class.c (finish_struct): Update call to cplus_decl_attributes.
5285 * cp-tree.h (cplus_decl_attributes): Update prototype.
5286 * decl.c (start_decl, grokdeclarator, start_function): Update
5287 calls to decl_attributes and cplus_decl_attributes.
5288 * friend.c (do_friend): Update call to cplus_decl_attributes.
5289 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
5290
5291 2001-07-12 Mark Mitchell <mark@codesourcery.com>
5292
5293 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
5294 for `register' variables with an asm-specification.
5295
5296 2001-07-11 Mark Mitchell <mark@codesourcery.com>
5297
5298 * semantics.c (finish_asm_stmt): Mark the output operands
5299 to an asm addressable, if necessary.
5300
5301 2001-07-11 Ben Elliston <bje@redhat.com>
5302
5303 * Revert this change -- there is a subtle bug.
5304
5305 PR c++/80
5306 * decl.c (finish_enum): New "attributes" argument; pass it to
5307 cplus_decl_attributes. Use a narrower type if the enum is packed.
5308 * cp-tree.h (finish_enum): Adjust prototype.
5309 * parse.y (enum_head): New non-terminal.
5310 (structsp): Use it. Enums now may be preceded or followed by
5311 optional attributes -- pass their chained tree to finish_enum().
5312 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
5313
5314 2001-07-10 Mark Mitchell <mark@codesourcery.com>
5315
5316 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
5317 variables.
5318
5319 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
5320
5321 * semantics.c (cp_expand_stmt): Fix for null
5322 current_function_return_value.
5323
5324 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
5325
5326 * call.c (build_op_delete_call): Initialize fn.
5327 (convert_like_real): Delete conditional.
5328 (joust): Initialize *w and *l.
5329 * class.c: Add prototype for binfo_ctor_vtable.
5330 (get_primary_binfo): Initialize result.
5331 * init.c (build_java_class_ref): Initialize name.
5332
5333 2001-07-09 Erik Rozendaal <dlr@acm.org>
5334
5335 * typeck.c (unary_complex_lvalue): Do not duplicate the
5336 argument to modify, pre-, or post-increment when used as an
5337 lvalue and when the argument has side-effects.
5338
5339 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
5340
5341 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
5342 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
5343 cplus_decl_attributes even if attrs is NULL.
5344 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
5345
5346 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
5347
5348 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
5349 calls to decl_attributes.
5350
5351 2001-07-06 Ira Ruben <ira@apple.com>
5352
5353 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
5354 be DECL_TEMPLATE_RESULT.
5355
5356 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5357
5358 * cp-tree.h (copy_template_template_parm): Rename to ...
5359 (bind_template_template_parm): ... here.
5360 * tree.c (copy_template_template_parm): Rename to ...
5361 (bind_template_template_parm): ... here. Remove the case when
5362 NEWARGS is NULL_TREE.
5363 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
5364 BOUND_TEMPLATE_TEMPLATE_PARM.
5365 * pt.c (lookup_template_class): Adjust.
5366
5367 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
5368
5369 * cvt.c (convert_lvalue): New fn.
5370 * cp-tree.h: Declare it.
5371 * method.c (do_build_assign_ref): Use it.
5372 (do_build_copy_constructor): Convert parm to base types
5373 before calling base constructors.
5374
5375 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
5376 DECL_USER_ALIGN. Check flag_elide_constructors instead of
5377 optimize.
5378 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
5379
5380 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
5381
5382 * optimize.c (optimize_inline_calls): New function, broken out
5383 of ...
5384 (optimize_function): ... here. Call it. Don't inline if it is
5385 a thunk.
5386 (dump_function): Print name of dump flag causing this dump.
5387 * semantics.c (expand_body): Move thunk inline check to
5388 optimize_function.
5389
5390 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
5391
5392 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
5393 (comptypes): Use target.comp_type_attributes.
5394
5395 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
5396
5397 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
5398
5399 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
5400
5401 * error.c (lang_print_error_function): Add a `diagnostic_context *'
5402 parameter. Tweak.
5403
5404 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5405
5406 * decl2.c (import_export_class): Update.
5407
5408 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
5409
5410 * error.c (init_error): Adjust settings.
5411
5412 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
5413
5414 * error.c (init_error): Adjust settings.
5415
5416 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
5417
5418 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
5419 return pointers to data members by reference rather than by value.
5420
5421 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
5422
5423 Implement the Named Return Value optimization.
5424 * cp-tree.h (struct cp_language_function): Add x_return_value.
5425 (current_function_return_value): Now a macro.
5426 * decl.c: Don't define it.
5427 (define_label, finish_case_label): Don't clear it.
5428 (init_decl_processing): Don't register it with GC.
5429 * semantics.c (genrtl_finish_function): Don't check it for
5430 no_return_label. Copy the RTL from the return value to
5431 current_function_return_value and walk, calling...
5432 (nullify_returns_r): ...this new fn.
5433 * typeck.c (check_return_expr): Set current_function_return_value.
5434
5435 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
5436
5437 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
5438 sharing a ctor vtable with. Merge code for cases 1 and 2.
5439 (binfo_ctor_vtable): New fn.
5440 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
5441
5442 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
5443
5444 * class.c (dfs_find_final_overrider): Fix logic.
5445
5446 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
5447 virtual thunk instead of non-virtual.
5448 (get_matching_virtual): Uncomment.
5449
5450 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
5451 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
5452 PARM, not ARG.
5453
5454 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
5455
5456 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
5457 we've not emerged from the hierarchy of RTTI_BINFO on reaching
5458 a non-virtual base.
5459
5460 2001-06-13 Mark Mitchell <mark@codesourcery.com>
5461
5462 * NEWS: Update release number.
5463
5464 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
5465
5466 PR c++/3130, c++/3131, c++/3132
5467 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
5468 * class.c (force_canonical_binfo_r): Move
5469 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
5470 virtual bases unless they're primary and what they're primary
5471 too has been moved.
5472 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
5473 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
5474 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
5475 derived binfo.
5476 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
5477 (layout_nonempty_base_or_field): Add most derived type
5478 parameter. Adjust.
5479 (layout_empty_base): Likewise.
5480 (build_base_field): Likewise.
5481 (build_base_fields): Likewise.
5482 (propagate_binfo_offsets): Add most derived type
5483 parameter. Skip non canonical virtual bases too.
5484 (dfs_set_offset_for_unshared_vbases): Don't skip primary
5485 bases. Do skip canonical bases.
5486 (layout_virtual_bases): Adjust.
5487 (layout_class_type): Adjust.
5488 (dfs_get_primary_binfo): Build list of virtual primary base
5489 candidates.
5490 (get_primary_binfo): Check that the shared virtual primary
5491 base candidate was found first.
5492 (accumulate_vtbl_inits): Don't do anything for non-vptr
5493 containing binfos. For case 1 primary virtual bases, keep
5494 checking that we've not emerged from the hierarchy of RTTI_BINFO.
5495
5496 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
5497
5498 PR c++/3089
5499 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
5500 hierarchy looking for primary bases for a ctor
5501 vtable. Recursively call oneself, if we meet our primary via
5502 this route and haven't met it yet via inheritance graph order.
5503
5504 2001-06-11 Mark Mitchell <mark@codesourcery.com>
5505
5506 * lang-options.h: Emit documentation for -fno-honor-std, not
5507 -fhonor-std.
5508
5509 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
5510
5511 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
5512 Don't clobber delta.
5513 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
5514
5515 2001-06-10 Mark Mitchell <mark@codesourcery.com>
5516 Gabriel Dos Reis <gdr@codesourcery.com>
5517
5518 * Make-lang.in (cp/call.o): Depend on diagnostic.h
5519 (cp/typeck.o): Depend on diagnostic.h
5520 (cp/typeck2.o): Depend on diagnostic.h
5521 (cp/repo.o): Depend on dignostic.h
5522 * typeck.c: #include diagnostic.h
5523 (convert_for_initialization): Remove extern declaration for
5524 warningcount and errorcount.
5525
5526 * call.c: #include diagnostic.h
5527 (convert_like_real): Remove extern declaration for warnincount and
5528 errorcount.
5529
5530 * repo.c: #include diagnostic.h
5531 * typeck2.c: #include diagnostic.h
5532
5533 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
5534
5535 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
5536 in previous change.
5537
5538 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
5539
5540 PR c++/2929
5541 * friend.c (do_friend): Use push_decl_namespace for classes at
5542 namespace scope.
5543
5544 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
5545 Jason Merrill <jason_merrill@redhat.com>
5546
5547 PR c++/3061
5548 * class.c (build_secondary_vtable): Use assert, rather than an error
5549 message.
5550 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
5551 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
5552 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
5553 Don't set BINFO_VTABLE for a primary virtual base.
5554
5555 2001-06-07 Mark Mitchell <mark@codesourcery.com>
5556
5557 * decl.c (duplicate_decls): Update source position information
5558 when a template function is defined.
5559
5560 2001-06-07 Phil Edwards <pme@sources.redhat.com>
5561
5562 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
5563
5564 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
5565
5566 PR c++/2914
5567 * decl.c (pushtag): Don't push into a complete type's scope.
5568
5569 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
5570
5571 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
5572 (struct lang_decl_flags): Lose generate_with_vtable_p.
5573 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
5574 * class.c (copy_virtuals): Adjust.
5575 * decl2.c (mark_vtable_entries): Adjust.
5576 * method.c (make_thunk, build_vtable_entry): Adjust.
5577 * class.c (update_vtable_entry_for_fn): Only look as far as the
5578 first defining class.
5579 (build_vtbl_initializer): Put nothing in the slot for a function only
5580 defined in a lost primary virtual base.
5581 (add_vcall_offset_vtbl_entries_1): Use the same code for
5582 the lost primary case and the normal case.
5583 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
5584 (get_vfield_offset, get_derived_offset): Lose.
5585 (dfs_find_final_overrider): Use look_for_overrides_here.
5586 (get_matching_virtual): New fn.
5587 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
5588 not BV_VCALL_INDEX.
5589 * search.c (look_for_overrides_here): Split out from...
5590 (look_for_overrides_r): Here.
5591
5592 * class.c (find_final_overrider): Return error_mark_node on error.
5593
5594 * decl2.c (key_method): #if 0 accidental change.
5595
5596 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
5597
5598 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
5599 (build_over_call): Likewise.
5600 * decl.c (grokparms): Likewise.
5601 * pt.c (tsubst_decl): Likewise.
5602 * typeck.c (convert_arguments): Likewise.
5603
5604 2001-06-05 Mark Mitchell <mark@codesourcery.com>
5605
5606 * semantics.c (begin_class_definition): Robustify.
5607
5608 * pt.c (instantiate_decl): Tell the repository code about the
5609 clones, not the cloned functions.
5610 * repo.c (repo_template_used): Explicitly instantiate the cloned
5611 function, not the clones.
5612
5613 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
5614
5615 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
5616 ICS_BAD_FLAG on created conversion.
5617 (compare_ics): Break out rank.
5618
5619 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
5620
5621 * decl.c (xref_tag): Remove extraneous %s on dependent name
5622 lookup warning.
5623
5624 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
5625
5626 * class.c (layout_vtable_decl): Fix off by one error on
5627 build_index_type.
5628 (build_vtt): Likewise.
5629 (build_ctor_vtbl_group): Likewise.
5630
5631 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
5632
5633 * class.c (maybe_indent_hierarchy): New function.
5634 (dump_class_hierarchy_r): Add flags. Dump extra binfo
5635 information, if enabled. Use maybe_indent_hierarchy. Adjust
5636 output format.
5637 (dump_class_hierarchy): Adjust prototype. Adjust output format.
5638 (dump_array, dump_vtable, dump_vtt): New functions.
5639 (finish_struct_1): Adjust hierarchy dumping.
5640 (initialize_vtable): Call dump_vtable.
5641 (build_vtt): Call dump_vtt.
5642 (build_ctor_vtbl_group): Call dump_vtable.
5643 * decl2.c (flag_dump_class_layout): Remove.
5644 (cxx_decode_option): Remove dump translation unit
5645 and dump class hierarchy check. Call dump_switch_p.
5646 (finish_file): Adjust dumping.
5647 (dump.c): Only dump base classes if not TDF_SLIM.
5648 Only dump namespace members if not TDF_SLIM.
5649 * optimize.c (dump_function): New function.
5650 (optimize_function): Call dump_function.
5651 * semantics.c (expand_body): Use dump_enabled_p.
5652
5653 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
5654
5655 PR g++/2936
5656 Part missed from first commit
5657 * decl2.c (finish_anon_union): Copy context.
5658
5659 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
5660
5661 PR g++/2936
5662 * optimize.c (remap_decl): Remap anonymous aggregate members too.
5663
5664 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
5665
5666 PR g++/2823
5667 * semantics.c (expand_body): Don't optimize thunks.
5668
5669 2001-05-25 Sam TH <sam@uchicago.edu>
5670
5671 * cp-tree.h lex.h: Fix header include guards.
5672
5673 2001-05-25 Mark Mitchell <mark@codesourcery.com>
5674
5675 * decl.c (init_decl_processing): Tweak.
5676
5677 2001-05-24 Mark Mitchell <mark@codesourcery.com>
5678
5679 * decl.c (duplicate_decls): Tidy.
5680 (init_decl_processing): Always set flag_no_builtin.
5681
5682 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
5683
5684 PR c++/2184
5685 * decl2.c (do_local_using_decl): Push the decls, even in a
5686 template.
5687
5688 2001-05-22 Mark Mitchell <mark@codesourcery.com>
5689
5690 * optimize.c (initialize_inlined_parameters): Don't set
5691 TREE_READONLY for a VAR_DECL taking the place of an inlined
5692 PARM_DECL.
5693
5694 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
5695
5696 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
5697 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
5698 attribute.
5699
5700 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
5701
5702 * parse.y: Refer to compound literals as such, not as
5703 constructor-expressions.
5704
5705 2001-05-21 Mark Mitchell <mark@codesourcery.com>
5706
5707 * call.c (build_op_delete_call): Ignore exception-specifications
5708 when looking for matching delete operators.
5709 * init.c (build_new_1): Compute whether or not the allocation
5710 function used is a placement allocation function or not, and
5711 communicate this information to build_op_delete_call.
5712
5713 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
5714
5715 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
5716 (build_vtbl_ref): Adjust.
5717 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
5718 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
5719 Re-add vtable-gc.
5720 (unsupported_options): Correspondingly.
5721
5722 * decl2.c (maybe_make_one_only): Check flag_weak, not
5723 supports_one_only().
5724
5725 * cp-tree.def (START_CATCH_STMT): Lose.
5726 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
5727 * tree.c (cp_statement_code_p): Don't case it.
5728 * semantics.c (cp_expand_stmt): Likewise.
5729 * cp-tree.h (START_CATCH_TYPE): Lose.
5730 (HANDLER_TYPE): New.
5731 * except.c (expand_start_catch_block): Don't start any blocks.
5732 Return the type.
5733 (expand_end_catch_block): Don't end any blocks.
5734 * parse.y (handler): Don't pass anything from finish_handler_parms
5735 to finish_handler.
5736 * pt.c (tsubst_expr): Likewise.
5737 * semantics.c (begin_handler): Call note_level_for_catch here.
5738 (finish_handler_parms): Don't return anything.
5739 (genrtl_catch_block, begin_catch_block): Lose.
5740 (genrtl_handler): Call expand_start_catch here.
5741
5742 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
5743
5744 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
5745 (get_vtable_decl, build_vtt): Not here.
5746
5747 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
5748
5749 PR c++/2781
5750 * optimize.c (update_cloned_parm): Copy addressability and other
5751 flags.
5752
5753 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5754
5755 * pt.c (determine_specialization): Ignore artificial functions.
5756
5757 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
5758
5759 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
5760 (C_RID_CODE): Remove.
5761 * lex.c (cxx_init_options): Call set_identifier_size. Update.
5762 (init_parse): Don't do it here.
5763
5764 2001-05-18 Diego Novillo <dnovillo@redhat.com>
5765
5766 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
5767 function declaration to avoid stripping the symbol's attributes.
5768
5769 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
5770
5771 * decl.c (pushdecl): Adjust error string.
5772 (xref_tag): Adjust friend class injection warning. Remove the
5773 inherited name from the class shadowed scope.
5774
5775 2001-05-17 Mark Mitchell <mark@codesourcery.com>
5776
5777 * except.c (cp_protect_cleanup_actions): New function.
5778 (init_exception_processing): Don't set protect_cleanup_actions
5779 here. Do set lang_protect_cleanup_actions.
5780
5781 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
5782
5783 * spew.c (read_token): Call yyerror on all unexpected tokens.
5784
5785 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
5786
5787 * init.c (member_init_ok_or_else): Take a tree rather than
5788 string for name.
5789 (expand_member_init): Adjust.
5790
5791 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
5792
5793 * decl.c (duplicate_decls): Suppress warning about duplicate
5794 decls if the first decl is a friend.
5795
5796 2001-05-12 Zack Weinberg <zackw@stanford.edu>
5797
5798 * except.c (choose_personality_routine): Export. Add
5799 explanatory comment. Take an enum languages, not a boolean.
5800 (initialize_handler_parm): Adjust to match.
5801 * cp-tree.h: Prototype choose_personality_routine.
5802 * lex.c (handle_pragma_java_exceptions): New function.
5803 (init_cp_pragma): Register #pragma GCC java_exceptions.
5804
5805 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5806
5807 * method.c (build_mangled_C99_name): Remove unused prototype.
5808
5809 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
5810
5811 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
5812 * typeck.c (get_member_function_from_ptrfunc,
5813 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
5814 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
5815
5816 Reverted Geoff Keating's 2001-05-03's patch.
5817
5818 2001-05-11 Ira Ruben <ira@apple.com>
5819
5820 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
5821
5822 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
5823
5824 * cp-tree.h (finish_label_expr, lookup_label): Delete.
5825 * parse.y: Update for '&&'; don't issue warning here.
5826 * semantics.c (finish_label_expr): Delete.
5827
5828 2001-05-07 Mark Mitchell <mark@codesourcery.com>
5829
5830 * splay-tree.h (splay_tree_max): New function.
5831 (splay_tree_min): Likewise.
5832
5833 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
5834
5835 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
5836 (pfn_vflag_identifier): Define.
5837 Update comment about layout of pointer functions.
5838 (build_ptrmemfunc1): Update prototype.
5839 (expand_ptrmemfunc_cst): Update prototype.
5840 * decl.c (initialize_predefined_identifiers): Initialize
5841 pfn_vflag_identifier.
5842 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
5843 an extra field to the type.
5844 * expr.c (cplus_expand_constant): Pass 'flag' between
5845 expand_ptrmemfunc_cst and build_ptrmemfunc1.
5846 * typeck.c (get_member_function_from_ptrfunc): When
5847 FUNCTION_BOUNDARY < 16, look at additional field to determine
5848 if a pointer-to-member is a real pointer or a vtable offset.
5849 (build_ptrmemfunc1): Add new parameter to contain extra field.
5850 (build_ptrmemfunc): Pass the extra field around.
5851 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
5852 (pfn_from_ptrmemfunc): Ignore the extra field.
5853
5854 2001-05-03 Mark Mitchell <mark@codesourcery.com>
5855
5856 * cp-tree.h (flag_inline_trees): Update documentation.
5857 * decl.c (init_decl_processing): Adjust handling of
5858 flag_inline_functions and flag_inline_trees to support -O3.
5859 (grokfndecl): Set DECL_INLINE on all functions if that's what
5860 the user requested.
5861 (save_function_data): Clear DECL_INLINE in
5862 current_function_cannot_inline is non-NULL.
5863 * decl2.c (flag_inline_trees): Update documentation.
5864
5865 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
5866
5867 * dump.c (cp_dump_tree, USING_STMT case): New case.
5868 * tree.c (cp_statement_code_p): Add USING_STMT.
5869 * decl2.c (do_using_directive): Add the using directive statement.
5870
5871 * tree.c (walk_tree): Reformat an if block.
5872
5873 2001-05-02 Mark Mitchell <mark@codesourcery.com>
5874
5875 * decl.c (compute_array_index_type): Don't try to do anything with
5876 the indices when processing a template.
5877
5878 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5879
5880 * call.c: NULL_PTR -> NULL.
5881 * class.c: Likewise.
5882 * cvt.c: Likewise.
5883 * decl.c: Likewise.
5884 * decl2.c: Likewise.
5885 * except.c: Likewise.
5886 * init.c: Likewise.
5887 * rtti.c: Likewise.
5888 * search.c: Likewise.
5889 * tree.c: Likewise.
5890 * typeck.c: Likewise.
5891 * typeck2.c: Likewise.
5892
5893 2001-05-02 Mark Mitchell <mark@codesourcery.com>
5894
5895 * decl2.c (do_using_directive): Revert previous patch.
5896
5897 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5898
5899 * cp-tree.def (USING_STMT): New statement node.
5900 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
5901 * decl2.c (do_using_directive): Add USING_STMT to statement
5902 tree. Don't emit errors when processing template decl.
5903 * pt.c (tsubst_expr, USING_STMT case): New case.
5904 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
5905
5906 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5907
5908 * call.c (build_new_op): Convert args from reference here.
5909 (build_conditional_expr): Don't convert here.
5910
5911 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
5912
5913 * spew.c (last_token_id): New static variable.
5914 (read_token): Set it here.
5915 (yyerror): Use it here.
5916
5917 2001-04-30 Richard Henderson <rth@redhat.com>
5918
5919 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
5920 * decl.c: Likewise.
5921
5922 2001-04-30 Mark Mitchell <mark@codesourcery.com>
5923
5924 * gxxint.texi: Remove.
5925 * Make-lang.in: Remove all traces of gxxint.texi.
5926
5927 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
5928
5929 * decl2.c (start_static_initialization_or_destruction): Correct
5930 logic to handle the -fno-use-cxa-atexit case.
5931
5932 2001-04-30 Mark Mitchell <mark@codesourcery.com>
5933
5934 * optimize.c (update_cloned_parm): New function.
5935 (maybe_clone_body): Use it. Update the `this' parameter too.
5936
5937 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
5938
5939 * decl2.c (unsupported_options): Add new-abi.
5940 * lang-options.h: Remove no longer supported options.
5941
5942 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5943
5944 * except.c (can_convert_eh): Don't check template parms,
5945 typename types etc.
5946
5947 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5948
5949 * optimize.c (maybe_clone_body): Copy parameter names and locations.
5950
5951 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
5952
5953 * cp-tree.h (adjust_clone_args): Prototype new function.
5954 * class.c (adjust_clone_args): New function.
5955 * decl.c (start_function): Call it for in charge ctors.
5956
5957 2001-04-26 Mark Mitchell <mark@codesourcery.com>
5958
5959 * method.c (use_thunk): Make sure that thunks really are emitted
5960 when requested.
5961
5962 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
5963
5964 * mangle.c (write_chars): New macro.
5965 (hwint_to_ascii): New function
5966 (write_number): Use it.
5967 (write_integer_cst): Deal with really big numbers.
5968
5969 2001-04-25 Mark Mitchell <mark@codesourcery.com>
5970
5971 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
5972 the clone.
5973
5974 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
5975
5976 * decl.c (grokdeclarator): Set context of namespace scope
5977 TYPE_DECLS.
5978
5979 2001-04-24 Zack Weinberg <zackw@stanford.edu>
5980
5981 * cp/optimize.c: Include hashtab.h.
5982 (struct inline_data): Add tree_pruner.
5983 (expand_call_inline, expand_calls_inline): Use it when calling
5984 walk_tree.
5985 (optimize_function): Initialize and free tree_pruner.
5986
5987 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
5988
5989 Lazy __FUNCTION__ generation.
5990 * cp-tree.def (FUNCTION_NAME): Remove.
5991 * cp-tree.h (function_name_declared_p): Remove.
5992 (cp_fname_init): Prototype.
5993 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
5994 don't call declare_function_name. Call start_fname_decls.
5995 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
5996 clobber the line number.
5997 (cp_fname_init): New function.
5998 (start_function): Call start_fname_decls.
5999 (finish_function): Call finish_fname_decls.
6000 * lex.c (reswords): Add slots for __FUNCTION__ et al.
6001 (rid_to_yy): Add mappings for __FUNCTION__ et al.
6002 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
6003 * parse.y (VAR_FUNC_NAME): New token.
6004 (primary): Add VAR_FUNC_NAME.
6005 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
6006 generation.
6007 (tsubst, FUNCTION_NAME case): Remove.
6008 (tsubst_copy, FUNCTION_NAME case): Remove.
6009 (tsubst_expr, DECL_STMT case): Be careful with a
6010 DECL_PRETTY_FUNCTION_P.
6011 (instantiate_decl): Remove function_name_declared_p.
6012 * semantics.c (begin_compound_statement): Don't call
6013 declare_function_name here.
6014 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
6015 (finish_translation_unit): Call finish_fname_decls.
6016 (expand_body): Remove function_name_declared_p.
6017 * typeck2.c (digest_init): Allow any ERROR_MARK.
6018
6019 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
6020
6021 * pt.c (tsubst_decl): Use VOID_TYPE_P.
6022 * semantics.c: Fix some typos.
6023
6024 2001-04-23 Phil Edwards <pme@sources.redhat.com>
6025
6026 * cp/decl2.c (flag_honor_std): Always initialize to 1.
6027
6028 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6029
6030 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
6031
6032 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
6033
6034 * except.c (build_throw): Wrap the initialization of the exception
6035 object in a MUST_NOT_THROW_EXPR.
6036 (do_free_exception): #if 0.
6037
6038 2001-04-20 Mark Mitchell <mark@codesourcery.com>
6039
6040 * cp-tree.h (finish_enum): Change prototype.
6041 * decl.c (finish_enum): Reorganize.
6042 * parse.y (structsp): Adjust calls to finish_enum.
6043
6044 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
6045
6046 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
6047 't' case.
6048
6049 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
6050
6051 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
6052 (layout_empty_base): Return at end flag.
6053 (build_base_field): Likewise.
6054 (build_base_fields): Likewise.
6055 (layout_virtual_bases): Don't add 1 to eoc value.
6056 (end_of_class): Use full size for empty bases.
6057 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
6058 empty bases. Don't add 1 to eoc value. Only add trailing padding
6059 if we're an empty class with no empty bases.
6060 (dump_class_hierarchy): Dump size and alignment.
6061
6062 2001-04-20 Jakub Jelinek <jakub@redhat.com>
6063
6064 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
6065 ICS_BAD_FLAG.
6066
6067 2001-04-20 Jakub Jelinek <jakub@redhat.com>
6068
6069 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
6070 is found, look first if name does not match the structure name.
6071
6072 2001-04-19 Mark Mitchell <mark@codesourcery.com>
6073
6074 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
6075 set.
6076 (SET_DECL_LANGUAGE): New macro.
6077 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
6078 (pushdecl): Likewise.
6079 (build_library_fn_1): Likewise.
6080 (build_cp_library_fn): Likewise.
6081 (grokfndecl): Likewise.
6082 (grokvardecl): Mark `extern "C"' variables as having C linkage.
6083 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
6084 * lex.c (retrofit_lang_decl): Likewise.
6085 * mangle.c (mangle_decl_string): Don't mangle the names of
6086 variables declared with C language linkage.
6087 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
6088
6089 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
6090
6091 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
6092 flag_access_control from uninitialized storage.
6093
6094 2001-04-15 Mark Mitchell <mark@codesourcery.com>
6095
6096 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
6097 * mangle.c (write_pointer_to_member_type): Fix mangling of
6098 pointers to cv-qualified member function types.
6099
6100 * init.c (build_delete): Create a SAVE_EXPR for the address if
6101 we're going to use it more than once.
6102
6103 2001-04-13 Mark Mitchell <mark@codesourcery.com>
6104
6105 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
6106 (expand_ptremfunc_cst): Change prototype.
6107 (delta2_from_ptrmemfunc): Remove.
6108 * expr.c (cplus_expand_constant): Adjust call to
6109 expand_ptrmemfunc_cst.
6110 * typeck.c (build_ptrmemfunc1): Simplify.
6111 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
6112 results in a constant.
6113 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
6114 (delta2_from_ptrmemfunc): Remove.
6115 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
6116
6117 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
6118
6119 * cp-tree.h (decl_namespace_list): New macro.
6120 (struct saved_scope): Add decl_ns_list.
6121 * decl.c (mark_saved_scope): Mark it.
6122 * decl2.c: Lose static decl_namespace_list.
6123 (init_decl2): Don't save it.
6124
6125 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6126
6127 * cp-tree.h (warn_return_type, yylex): Delete redundant
6128 declarations.
6129
6130 * decl.c (current_class_depth, global_namespace): Likewise.
6131
6132 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
6133
6134 * repo.c (flag_use_repository): Likewise.
6135
6136 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6137
6138 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
6139 set_block, pushdecl, getdecls, gettags, init_decl_processing,
6140 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
6141 lvalue_or_else, print_lang_statistics, comp_target_types,
6142 unsigned_type, signed_type, signed_or_unsigned_type,
6143 build_function_call, mark_addressable, incomplete_type_error):
6144 Delete redundant declarations.
6145
6146 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
6147
6148 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
6149 (TYPE_ANONYMOUS_P): New macro.
6150 (TAGGED_TYPE_P): New macro.
6151 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
6152 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
6153 * tree.c (no_linkage_helper): Likewise.
6154 * semantics.c (begin_class_definition): Likewise.
6155 * pt.c (convert_template_argument): Likewise.
6156 * lex.c (check_for_missing_semicolon): Likewise.
6157
6158 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
6159
6160 * class.c (dfs_unshared_virtual_bases): New function.
6161 (mark_primary_bases): Call it.
6162 (check_bases): Ignore virtual bases when determining
6163 nearly-emptiness.
6164
6165 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
6166
6167 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
6168
6169 2001-04-11 Mark Mitchell <mark@codesourcery.com>
6170
6171 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
6172 cloned function to the clone.
6173
6174 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6175
6176 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
6177
6178 * semantics.c: Include expr.h.
6179
6180 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
6181
6182 * method.c (implicitly_declare_fn): Commonize code for copy ctor
6183 and assignment op. Set TREE_USED for parameter.
6184
6185 2001-04-10 Mark Mitchell <mark@codesourcery.com>
6186
6187 * class.c (find_final_overrider_data): Add `candidates'.
6188 (dfs_find_final_overrider): Don't issue error messages
6189 prematurely.
6190 (find_final_overrider): Issue error messages here.
6191 (build_base_field): Don't warn about amgibuous direct bases here.
6192 (warn_about_ambiguous_direct_bases): New function.
6193 (layout_class_type): Use it.
6194
6195 2001-04-10 Richard Henderson <rth@redhat.com>
6196
6197 * typeck.c (build_array_ref): Push the array reference inside
6198 COMPOUND_EXPR and COND_EXPR.
6199
6200 2001-04-05 Mark Mitchell <mark@codesourcery.com>
6201
6202 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
6203 * decl.c (duplicate_decls): Adjust accordingly.
6204 (maybe_commonize_var): Likewise.
6205 (grokfndecl): Likewise.
6206 (start_function): Likewise.
6207 (start_method): Likewise.
6208 * decl2.c (key_method): Likewise.
6209 (import_export_decl): Likewise.
6210 * method.c (implicitly_declare_fn): Likewise.
6211 * optimize.c (maybe_clone_body): Likewise.
6212
6213 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
6214
6215 * lang-specs.h: Add __DEPRECATED.
6216
6217 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
6218
6219 * search.c (get_dynamic_cast_base_type): When building a new
6220 constant, set its type to ssizetype.
6221
6222 2001-04-04 Jakub Jelinek <jakub@redhat.com>
6223
6224 * optimize.c (expand_call_inline): Only add newly inlined statements
6225 into inlined_stmts.
6226
6227 2001-04-03 Mark Mitchell <mark@codesourcery.com>
6228
6229 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
6230 (OPERATOR_FORMAT): Likewise.
6231 (OPERATOR_TYPENAME_FORMAT): Likewise.
6232 * operators.def: Remove old name-mangling information.
6233 * decl.c (grok_op_properties): Adjust accordingly.
6234 * lex.c (init_operators): Likewise.
6235 * rtti.c (get_tinfo_decl): Issue error messages about types that
6236 have variable size.
6237
6238 2001-04-03 Mark Mitchell <mark@codesourcery.com>
6239
6240 * decl2.c (import_export_decl): Don't call import_export_class
6241 when processing an inline member function.
6242 * semantics.c (expand_body): Call import_export_decl before
6243 emitting inline functions.
6244
6245 2001-03-28 Richard Henderson <rth@redhat.com>
6246
6247 IA-64 ABI Exception Handling:
6248 * cp-tree.def (EH_SPEC_BLOCK): New.
6249 (MUST_NOT_THROW_EXPR): New.
6250 * cp-tree.h: Update changed function declarations.
6251 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
6252 (CPTI_CALL_UNEXPECTED): New.
6253 (struct cp_language_function): Rename x_eh_spec_try_block
6254 to x_eh_spec_block.
6255 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
6256 * decl.c (current_binding_level): If no current function
6257 bindings, revert to scope_chain.
6258 (initialize_predefined_identifiers): Remove __cp_push_exception.
6259 (store_parm_decls): Use begin_eh_spec_block.
6260 (finish_function): Use finish_eh_spec_block.
6261 (mark_lang_function): Update for name changes.
6262 * decl2.c (finish_file): No mark_all_runtime_matches.
6263 * dump.c (cp_dump_tree): Handle new tree codes.
6264 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
6265 * except.c (catch_language_init, catch_language): Remove.
6266 (init_exception_processing): Don't set language code.
6267 Initialize call_unexpected_node, protect_cleanup_actions,
6268 eh_personality_libfunc, lang_eh_runtime_type.
6269 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
6270 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
6271 (prepare_eh_type): Split out type canonicalizations ...
6272 (build_eh_type_type): ... from here.
6273 (build_eh_type_type_ref): Remove.
6274 (mark_all_runtime_matches): Remove.
6275 (build_exc_ptr): New.
6276 (do_begin_catch, do_end_catch): New.
6277 (do_pop_exception): Remove.
6278 (build_terminate_handler): Remove.
6279 (choose_personality_routine): Split out language choice from ...
6280 (initialize_handler_parm): ... here.
6281 Use MUST_NOT_THROW_EXPR.
6282 (expand_start_catch_block): Use do_begin_catch. Simplify Java
6283 exception object handling.
6284 (expand_start_eh_spec, expand_end_eh_spec): Remove.
6285 (expand_exception_blocks, alloc_eh_object): Remove.
6286 (begin_eh_spec_block, finish_eh_spec_block): New.
6287 (do_allocate_exception, do_free_exception): New.
6288 (expand_throw): Merge into ...
6289 (build_throw): ... here. Update for abi.
6290 * expr.c (cplus_expand_expr): No expand_internal_throw.
6291 Handle MUST_NOT_THROW_EXPR.
6292 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
6293 * semantics.c (*) Update for except.h name changes.
6294 (genrtl_try_block): No protect_with_terminate.
6295 (genrtl_eh_spec_block): New.
6296 (genrtl_handler): Don't emit the goto here.
6297 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
6298 (genrtl_finish_function): Don't expand_exception_blocks.
6299 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
6300
6301 2001-03-28 Richard Henderson <rth@redhat.com>
6302
6303 * decl.c (struct named_label_list): Rename eh_region to
6304 in_try_scope, add in_catch_scope.
6305 (struct binding_level): Rename eh_region to is_try_scope,
6306 add is_catch_scope.
6307 (note_level_for_try): Rename from note_level_for_eh.
6308 (note_level_for_catch): New.
6309 (poplevel): Copy both is_try_scope and is_catch_scope to
6310 the named_label_list struct.
6311 (check_previous_goto_1): Don't check for catch block via
6312 DECL_ARTIFICIAL; use in_try_scope instead.
6313 (check_goto): Likewise.
6314 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
6315 * except.c (expand_start_catch_block): Call note_level_for_catch.
6316 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
6317
6318 2001-03-27 Richard Henderson <rth@redhat.com>
6319
6320 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
6321 exceptions_via_longjmp.
6322
6323 2001-03-27 Phil Edwards <pme@sources.redhat.com>
6324
6325 * pt.c (check_default_tmpl_args): Make error messages clearer.
6326
6327 2001-03-26 Phil Edwards <pme@sources.redhat.com>
6328
6329 * error.c: Also undefine 'A' macro used for cp_printers definition.
6330
6331 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6332
6333 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
6334
6335 2001-03-26 Mike Yang <yang@research.att.com>
6336 Mark Mitchell <mark@codesourcery.com>
6337
6338 * dump.c (dump_access): New function.
6339 (cp_dump_tree): Use it. Dump basetype information for class
6340 types.
6341
6342 2001-03-26 Mark Mitchell <mark@codesourcery.com>
6343
6344 * Makefile.in (optimize.o): Depend on params.h.
6345 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
6346 (init_decl_processing): Set flag_no_inline when doing
6347 inlining-on-trees.
6348 * optimize.c: Include params.h.
6349 (struct inline_data): Improve documentation of FNS. Add
6350 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
6351 (INSNS_PER_STMT): New macro.
6352 (remap_block): Use CLONING_P.
6353 (inlinable_function_p): Don't inline big functions.
6354 (expand_call_inline): Keep track of how much inlining we've done.
6355 (optimize_function): Set FIRST_INLINED_FN.
6356 (maybe_clone_body): Set CLONING_P.
6357 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
6358 tree nodes.
6359 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
6360 rest_of_compilation. Clear DECL_RTL for local variables
6361 afterwards.
6362 (clear_decl_rtl): New function.
6363
6364 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
6365
6366 Implement DR 209
6367 * cp-tree.h (skip_type_access_control,
6368 reset_type_access_control): Prototype.
6369 * decl.c (grokdeclarator): Access of friends is not checked.
6370 * parse.y (component_decl_list): Reset type access control.
6371 * semantics.c (decl_type_access_control): Clear
6372 current_type_lookups.
6373 (save_type_access_control): Don't save if not deferring.
6374 (skip_type_access_control, reset_type_access_control): New
6375 functions.
6376 (begin_class_definition): Do type access control for basetypes.
6377 Start deferred access control.
6378 (finish_class_definition): Resume immediate access control if
6379 this is a local class.
6380
6381 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6382
6383 * class.c (add_method): Use memcpy/memmove, not bcopy.
6384
6385 * decl.c (duplicate_decls): Likewise.
6386
6387 2001-03-23 Jakub Jelinek <jakub@redhat.com>
6388
6389 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
6390 not `_'.
6391
6392 2001-03-23 Jakub Jelinek <jakub@redhat.com>
6393
6394 * decl.c (local_names): Define.
6395 (push_local_name): New.
6396 (grok_reference_init): Return init if initializing static reference
6397 variable with non-constant instead of emitting it.
6398 Move expand_static_init call to cp_finish_decl.
6399 (layout_var_decl): Call push_local_name.
6400 (maybe_commonize_var): Allow inlining functions even if they have
6401 static local variables, use comdat_linkage for them if flag_weak.
6402 (check_initializer): Call obscure_complex_init if
6403 grok_reference_init returned nonzero.
6404 (save_function_data): Clear x_local_names.
6405 (pop_cp_function_context): Free x_local_names.
6406 (mark_inlined_fns): Remove.
6407 (mark_lang_function): Mark x_local_names.
6408 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
6409 Mark inlined_fns as tree, remove call to mark_inlined_fns.
6410 * class.c (alter_access): Ensure DECL_ACCESS is never set if
6411 DECL_DISCRIMINATOR_P.
6412 * cp-tree.h (cp_language_function): Add x_local_names.
6413 (lang_decl_flags): Add discriminator into u2.
6414 (lang_decl_inlined_fns): Remove.
6415 (lang_decl): inlined_fns is now a TREE_VEC.
6416 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
6417 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
6418 TREE_VEC, not a custom structure.
6419 (optimize_function): Likewise.
6420 * mangle.c (discriminator_for_local_entity): Discriminate among
6421 VAR_DECL local entities.
6422 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
6423 is not valid.
6424
6425 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
6426
6427 Add support for Java interface method calls.
6428 * cp-tree.h (struct lang_type): Add java_interface flag.
6429 (TYPE_JAVA_INTERFACE): New macro.
6430 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
6431 by setting TYPE_JAVA_INTERFACE.
6432 * call.c (java_iface_lookup_fn): New static.
6433 (build_over_call): If calling a method declared in a
6434 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
6435 expression which resolves the function address.
6436 (build_java_interface_fn_ref): New function.
6437
6438 2001-03-22 Richard Henderson <rth@redhat.com>
6439
6440 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
6441 * except.c: Don't include it.
6442
6443 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
6444 based on an idea from Joe Buck <jbuck@synopsys.com>
6445
6446 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
6447 New nonterminals.
6448 (data_def, component_decl): Add reductions to bad_decl.
6449
6450 2001-03-22 Jakub Jelinek <jakub@redhat.com>
6451
6452 * method.c (do_build_assign_ref): Don't use build_modify_expr for
6453 anonymous aggregates, since they don't have assignment operator
6454 method.
6455 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
6456 assignment operators for anonymous structure fields.
6457
6458 2001-03-21 Jason Merrill <jason@redhat.com>
6459
6460 * pt.c (instantiate_decl): Abort if we see a member constant
6461 instantiation that doesn't already have its initializer.
6462 Downgrade explicit instantiation without definition to pedwarn.
6463
6464 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
6465 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
6466 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
6467
6468 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
6469 (pending_vtables): Remove.
6470 * decl2.c (pending_vtables): Remove.
6471 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
6472 CLASSTYPE_VTABLE_NEEDS_WRITING.
6473 (import_export_class): Likewise.
6474 (init_decl2): Don't mark pending_vtables.
6475 * lex.c (handle_pragma_vtable): Just sorry.
6476 * pt.c (instantiate_class_template): Don't mess with
6477 CLASSTYPE_VTABLE_NEEDS_WRITING.
6478 (mark_class_instantiated): Likewise.
6479 * ptree.c (print_lang_type): Don't print it.
6480 * semantics.c (begin_class_definition): Don't set it.
6481
6482 * pt.c (template_tail): Replace with last_pending_template.
6483 (maybe_templates, maybe_template_tail): Remove.
6484 (add_pending_template): Adjust.
6485 (instantiate_pending_templates): Adjust.
6486
6487 * cp-tree.h (struct saved_scope): Remove lang_stack field.
6488 (current_lang_stack): Remove.
6489 * decl.c (maybe_push_to_top_level): Don't initialize it.
6490 (duplicate_decls): Use current_lang_depth.
6491 (xref_basetypes): Likewise.
6492 * class.c (current_lang_depth): New fn.
6493 (push_lang_context): Use more varray functionality.
6494 (pop_lang_context): Likewise.
6495
6496 * error.c (GLOBAL_THING): Always use '__'.
6497
6498 2001-03-21 Mark Mitchell <mark@codesourcery.com>
6499
6500 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
6501
6502 * mangle.c (mangle_decl_string): Mangle the names of overloaded
6503 operators, even when they have `extern "C"' linkage.
6504
6505 2001-03-19 Mark Mitchell <mark@codesourcery.com>
6506
6507 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
6508 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
6509 where it's not necessary.
6510 (add_method): Remove optimization involving comparison of
6511 DECL_ASSEMBLER_NAME.
6512 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
6513 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
6514 where it's not necessary.
6515 (check_methods): Likewise.
6516 (build_clone): Likewise.
6517 (built_vtt): Likewise.
6518 * cp-tree.h (DECL_NEEDED_P): Likewise.
6519 * decl.c (pushtag): Likewise.
6520 (duplicate_decls): Likewise.
6521 (pushdecl): Likewise.
6522 (builtin_function): Likewise.
6523 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
6524 (build_cp_library_fn): Likewise.
6525 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
6526 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
6527 where it's not necessary.
6528 (make_rtl_for_nonlocal_decl): Likewise.
6529 (cp_finish_decl): Likewise.
6530 (grokfndecl): Likewise.
6531 (grokvardecl): Likewise.
6532 (grokdeclarator): Likewise.
6533 (start_function): Likewise.
6534 (cp_missing_return_ok_p): Likewise.
6535 * decl2.c (grokclassfn): Likewise.
6536 (check_classfn): Likewise.
6537 (finish_static_data_member_decl): Likewise.
6538 (grokfield): Likewise.
6539 * error.c (GLOBAL_IORD_P): Remove.
6540 (dump_global_iord): Improve output.
6541 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
6542 * except.c (nothrow_libfn_p): Summarily reject any function not in
6543 namespace-scope.
6544 * init.c (build_java_class_ref): Don't explicitly set
6545 DECL_ASSEMBLER_NAME after calling mangle_decl.
6546 * mangle.c (mangle_decl_string): Handle extern "C" functions.
6547 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
6548 * method.c (set_mangled_name_for_decl): Don't explicitly set
6549 DECL_ASSEMBLER_NAME after calling mangle_decl.
6550 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
6551 IDENTIFIER_GLOBAL_VALUE for the thunk.
6552 * pt.c (set_mangled_name_for_template_decl): Remove.
6553 (check_explicit_specialization): Don't use it.
6554 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
6555 (tsubst_friend_function): Likewise.
6556 (tsubst_decl): Likewise.
6557 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
6558 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
6559 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
6560 where it's not necessary.
6561 (tinfo_base_init): Likewise.
6562 (create_real_tinfo_var): Likewise.
6563 * search.c (looup_field_1): Likewise.
6564 * semantics.c (finish_named_return_value): Likewise.
6565 * tree.c (init_tree): Set lang_set_decl_assembler_name.
6566
6567 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
6568
6569 Correct semantics restrictions checking in throw-expression.
6570 * except.c (is_admissible_throw_operand): New function.
6571 (build_throw): Use it.
6572
6573 2001-03-14 Mark Mitchell <mark@codesourcery.com>
6574
6575 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
6576 and its ilk.
6577
6578 2001-03-14 Mark Mitchell <mark@codesourcery.com>
6579
6580 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
6581 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
6582 * decl.c (duplicate_decls): Likewise.
6583 (builtin_function): Likewise.
6584 (build_library_fn): Likewise.
6585 (build_cp_library_fn): Likewise.
6586 (check_initializer): Likewise.
6587 (cp_finish_decl): Likewise.
6588 * decl2.c (grokfield): Likewise.
6589 (grok_function_init): Remove #if 0'd code.
6590 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
6591 * friend.c (do_friend): Likewise.
6592 * init.c (get_temp_regvar): Likewise.
6593 * method.c (make_thunk): Likewise.
6594 * pt.c (tsubst_friend_function): Likewise.
6595 (tsubst_decl): Likewise.
6596 (regenerate_decl_from_template): Likewise.
6597 * semantics.c (genrtl_named_return_value): Likewise.
6598 (expand_body): Likewise.
6599 (genrtl_finish_function): Likewise.
6600 * tree.c (cp_tree_equal): Likewise.
6601
6602 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
6603
6604 * call.c (convert_like_real): Add extra semantics to INNER
6605 parameter. Don't convert to temporary if a user conversion
6606 gives us an lvalue that we're about to bind to a reference.
6607 Set INNER to indicate pending reference binding on recursive
6608 calls.
6609
6610 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
6611
6612 * cp/lex.c: Delete duplicate pending_lang_change.
6613
6614 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
6615
6616 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
6617 Similarly.
6618 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
6619 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
6620
6621 2001-03-09 Zack Weinberg <zackw@stanford.edu>
6622
6623 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
6624
6625 2001-03-08 Stan Shebs <shebs@apple.com>
6626
6627 * cp-tree.h (set_identifier_local_value): Remove unused decl.
6628
6629 2001-03-06 Zack Weinberg <zackw@stanford.edu>
6630
6631 * spew.c: Remove references to CPP_OSTRING.
6632
6633 2001-03-06 Andrew Haley <aph@redhat.com>
6634
6635 * typeck.c (convert_arguments): Check that we have an fndecl.
6636
6637 2001-03-05 Andrew Haley <aph@redhat.com>
6638
6639 * typeck.c (convert_arguments): Don't do ellipsis conversion for
6640 __built_in_constant_p.
6641
6642 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
6643
6644 * typeck.c (build_static_cast): Allow enum to enum conversions
6645 as per DR 128.
6646
6647 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
6648
6649 * class.c (check_field_decls): Pointers to member do not a
6650 non-pod struct make, as per DR 148.
6651
6652 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
6653
6654 * call.c (joust): cp_pedwarn when using gnu extension concerning
6655 worst conversion sequences.
6656
6657 2001-03-01 Zack Weinberg <zackw@stanford.edu>
6658
6659 * decl.c: Replace all uses of 'boolean' with 'bool'.
6660
6661 2001-03-01 Zack Weinberg <zackw@stanford.edu>
6662
6663 * lang-specs.h: Add zero initializer for cpp_spec field to
6664 all array elements that need one. Don't put an #ifdef inside
6665 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
6666 use it.
6667
6668 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
6669
6670 Implement using decls inside template functions.
6671 * decl2.c (validate_nonmember_using_decl): Don't special case
6672 fake_std_node in the global namespace. Don't reject early when
6673 processing a template.
6674 (do_local_using_decl): Add to statement tree. Don't do further
6675 processing when building a template.
6676 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
6677
6678 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
6679
6680 * decl2.c (do_nonmember_using_decl): Don't complain if we find
6681 same function. Do complain about ambiguating extern "C"
6682 declarations.
6683
6684 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
6685
6686 Remove floating point and complex type template constant parms.
6687 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
6688 COMPLEX_TYPE extensions.
6689 (invalid_nontype_parm_type_p): Likewise.
6690
6691 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
6692
6693 * except.c (call_eh_info): Revert "match_function"'s type.
6694
6695 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
6696
6697 Fix ctor vtable vcall offsets.
6698 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
6699 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
6700 (get_matching_base): Remove.
6701 (get_original_base): New function.
6702 (build_vtbl_initializer): Initialize vid.rtti_binfo.
6703 Use a virtual thunk for a ctor vtable with an index
6704 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
6705 primary base within a constructor vtable. Only set
6706 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
6707 when primary base has been lost.
6708 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
6709
6710 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
6711
6712 * call.c (joust): Ensure more_specialized()'s argument length
6713 parameter has correct value for constructors.
6714
6715 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
6716
6717 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
6718
6719 * decl.c (mark_inlined_fns): Prototype.
6720
6721 2001-02-22 Mark Mitchell <mark@codesourcery.com>
6722
6723 * spew.c (yylex): Correct handling of friends.
6724
6725 2001-02-22 Mark Mitchell <mark@codesourcery.com>
6726
6727 * mangle.c (write_encoding): Pass write_function_type the
6728 FUNCTION_DECL for the function being encoded.
6729 (write_function_type): Pass it along to write_bare_function_type.
6730 (write_bare_function_type): Pass it along to write_method_parms.
6731 (write_method_parms): Don't mangle the compiler-generated
6732 parameters to a constructor or destructor.
6733
6734 2001-02-22 Andreas Jaeger <aj@suse.de>
6735
6736 * optimize.c: Include toplev.h for
6737 note_deferral_of_defined_inline_function prototype.
6738
6739 2001-02-22 Jakub Jelinek <jakub@redhat.com>
6740
6741 * cp-tree.h (struct lang_decl_inlined_fns): New.
6742 (struct lang_decls): Add inlined_fns.
6743 (DECL_INLINED_FNS): New macro.
6744 * optimize.c (struct inline_data): Add inlined_fns.
6745 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
6746 (inlinable_function_p): Likewise, fix typo in comment,
6747 function is not inlinable if it already inlined function currently
6748 being optimized.
6749 (expand_call_inline): Add fn to inlined_fns if necessary.
6750 (optimize_function): Initialize inlined_fns.
6751 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
6752 * decl.c (mark_inlined_fns): New function.
6753 (lang_mark_tree): Call it.
6754
6755 2001-02-21 Jason Merrill <jason@redhat.com>
6756
6757 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
6758 (DECL_UNINLINABLE): Move to middle-end.
6759
6760 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
6761 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
6762 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
6763 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
6764 parms and outer BLOCK. note_deferral_of_defined_inline_function.
6765
6766 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
6767 second parm of op=.
6768
6769 2001-02-19 Mark Mitchell <mark@codesourcery.com>
6770
6771 * decl2.c (set_decl_namespace): Allow explicit instantiations in
6772 any namespace.
6773
6774 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6775
6776 * optimize.c (expand_call_inline): Don't walk subtrees of type
6777 nodes.
6778
6779 2001-02-18 Mark Mitchell <mark@codesourcery.com>
6780
6781 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
6782 for a destructor.
6783
6784 2001-02-18 Jason Merrill <jason@redhat.com>
6785
6786 Do put the VTT parameter in DECL_ARGUMENTS.
6787 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
6788 (current_vtt_parm): New macro.
6789 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
6790 (DECL_HAS_VTT_PARM_P): New macro.
6791 (DECL_VTT_PARM): Remove.
6792 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
6793 * decl.c (duplicate_decls): Only copy the operator code if
6794 appropriate.
6795 (start_function): Set current_vtt_parm.
6796 (lang_mark_tree): Don't mark vtt_parm.
6797 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
6798 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
6799 * class.c (build_clone): Maybe remove the VTT parm.
6800 * optimize.c (maybe_clone_body): Set up the VTT parm.
6801 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
6802 * call.c (build_over_call): Just allow the VTT arg.
6803 * method.c (make_thunk): Don't set DECL_VTT_PARM.
6804 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
6805 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
6806 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
6807 * error.c (dump_function_decl): Likewise.
6808 * call.c (build_user_type_conversion_1, convert_like_real): Abort
6809 if we try to call a constructor with in-charge or VTT parms.
6810 * method.c (skip_artificial_parms_for): New fn.
6811 * call.c (add_function_candidate, build_over_call): Call it.
6812 * call.c (build_new_method_call): Use current_vtt_parm.
6813 * init.c (expand_virtual_init): Likewise.
6814 * class.c (same_signature_p): No longer static.
6815 * cp-tree.h: Declare it.
6816 * search.c (look_for_overrides_r): Use it.
6817
6818 2001-02-17 Mark Mitchell <mark@codesourcery.com>
6819
6820 * cp-tree.h (new_abi_rtti_p): Remove.
6821 (name_mangling_version): Likewise.
6822 (flag_do_squangling): Likewise.
6823 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
6824 * decl.c (grokfndecl): Likewise.
6825 * decl2.c (name_mangling_version): Remove.
6826 (flag_do_squangling): Likewise.
6827 (lang_f_options): Remove `squangle'.
6828 (unsupported_options): Add `squangle'.
6829 (cxx_decode_option): Issue a warning about uses of
6830 -fname-mangling-version.
6831 (finish_file): Remove old ABI support.
6832 * pt.c (check_explicit_specialization): Likewise.
6833 (tsubst_decl): Likewise.
6834 * rtti.c (init_rtti_processing): Likewise.
6835 (build_headof): Likewise.
6836 (get_tinfo_decl_dynamic): Likewise.
6837 (tinfo_from_decl): Likewise.
6838 (build_dynamic_cast_1): Likewise.
6839 (synthesize_tinfo_var): Likewise.
6840 * init.c (build_new): Allow enumeration types for the array-bounds
6841 in a direct-new-declarator.
6842
6843 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
6844
6845 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
6846 TREE_PROTECTED from the template being specialized.
6847
6848 2001-02-17 Jason Merrill <jason@redhat.com>
6849
6850 * decl2.c (build_artificial_parm): Set TREE_READONLY.
6851
6852 * decl.c (bad_specifiers): Allow throw specs on things with
6853 pointer-to-function or -member-function type.
6854 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
6855 a pmf.
6856
6857 2001-02-17 Mark Mitchell <mark@codesourcery.com>
6858
6859 * call.c (check_dtor_name): Handle template names correctly.
6860
6861 2001-02-16 Jason Merrill <jason@redhat.com>
6862
6863 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
6864 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
6865 * optimize.c (maybe_clone_body): Don't substitute it.
6866 * call.c (build_new_method_call): Check in_chrg instead.
6867 * init.c (expand_virtual_init): Likewise.
6868
6869 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
6870
6871 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
6872 class-type introduces at least a type-name.
6873
6874 2001-02-16 Jakub Jelinek <jakub@redhat.com>
6875
6876 * call.c (convert_like_real): Create a temporary for non-lvalue.
6877
6878 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
6879
6880 * cp-tree.h: Fix typos in comments.
6881
6882 2001-02-16 Jason Merrill <jason@redhat.com>
6883
6884 * optimize.c (remap_block): If we're compiling a clone, pass the
6885 new block to insert_block.
6886
6887 2001-02-16 Mark Mitchell <mark@codesourcery.com>
6888
6889 * semantics.c (finish_asm_stmt): Robustify.
6890
6891 2001-02-15 Mark Mitchell <mark@codesourcery.com>
6892
6893 * pt.c (push_template_decl_real): Don't remangle the name of a
6894 class template.
6895
6896 2001-02-15 Jim Meyering <meyering@lucent.com>
6897
6898 * Make-lang.in (c++.install-common): Depend on installdirs.
6899 (c++.install-info): Likewise.
6900 (c++.install-man): Likewise.
6901
6902 2001-02-15 Mark Mitchell <mark@codesourcery.com>
6903
6904 * typeck2.c (build_m_component_ref): Robustify.
6905
6906 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
6907
6908 * friend.c (do_friend): Don't take the nested [template] class
6909 into account when deciding whether to warn about the friend
6910 function not referring to a template function.
6911
6912 2001-02-14 Jakub Jelinek <jakub@redhat.com>
6913
6914 * typeck.c (build_unary_op): Clarify error message.
6915
6916 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
6917
6918 * parse.y (component_constructor_declarator): allow optional
6919 parentheses around constructor class name.
6920
6921 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6922
6923 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
6924 section.
6925 * init.c (emit_base_init): Remove incorrect comment about
6926 virtual bases.
6927 * method.c (make_thunk): Fix comment alignment.
6928
6929 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6930
6931 Kill remnants of this is variable.
6932 * cp-tree.h (flag_this_is_variable): Remove.
6933 * decl2.c (flag_this_is_variable): Remove.
6934 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
6935 (build_vbase_path): The path is non-static, even in a cdtor.
6936 (resolves_to_fixed_type_p): Add additional return value.
6937 * search.c (init_vbase_pointers): Adjust.
6938 * tree.c (lvalue_p_1): Adjust.
6939 * typeck.c (mark_addressable): Adjust.
6940
6941 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6942
6943 * pt.c (unify): Don't check cv quals of array types.
6944
6945 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
6946
6947 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
6948 check whether we already have the type.
6949
6950 2001-02-13 Mark Mitchell <mark@codesourcery.com>
6951
6952 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
6953 * call.c (build_op_delete_call): Simplify to remove duplicate
6954 code.
6955 * class.c (clone_function_decl): Don't build the deleting variant
6956 of a non-virtual destructor.
6957 * decl.c (finish_destructor_body): Don't call delete if this is a
6958 non-virtual destructor.
6959 * init.c (build_delete): Explicitly call `operator delete' when
6960 deleting an object with a non-virtual destructor.
6961
6962 2001-02-13 Jason Merrill <jason@redhat.com>
6963
6964 * lang-specs.h: Add more __EXCEPTIONS.
6965
6966 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6967
6968 * typeck2.c (process_init_constructor): Check
6969 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
6970
6971 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6972
6973 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
6974 Remove spurious information in comment. Allow further
6975 adjustments of REFERENCE_TYPE args.
6976
6977 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
6978
6979 * errfn.c (cp_deprecated): Tweak diagnostic text.
6980 * parse.y (new_initializer): Deprecate initializer lists
6981 extension.
6982
6983 2001-02-12 Mark Mitchell <mark@codesourcery.com>
6984
6985 Remove old ABI support.
6986
6987 2001-02-11 Mark Mitchell <mark@codesourcery.com>
6988
6989 * decl2.c (flag_vtable_thunks): Always set it to 1.
6990 (flag_new_abi): Likewise.
6991 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
6992
6993 * Makefile.in (g++spec.o): Fix typo.
6994
6995 2001-02-09 Jason Merrill <jason@redhat.com>
6996
6997 * lang-specs.h: Restore definition of __EXCEPTIONS.
6998
6999 2001-02-08 Jason Merrill <jason@redhat.com>
7000
7001 * search.c (shared_member_p): New function.
7002 (lookup_field_r): Use it.
7003 * cp-tree.h (SHARED_MEMBER_P): Remove.
7004
7005 * method.c (process_overload_item): Handle template-dependent array
7006 bounds.
7007 * pt.c (type_unification_real): If we end up with undeduced nontype
7008 parms, try again.
7009
7010 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
7011 types.
7012
7013 * typeck2.c (friendly_abort): Don't say anything if we have
7014 earlier errors or sorries.
7015
7016 * decl.c (check_tag_decl): Notice attempts to redefine bool and
7017 wchar_t. Ignore if in_system_header.
7018
7019 * decl.c (maybe_push_cleanup_level): New fn...
7020 (start_decl_1): ...split out from here.
7021 * cvt.c (build_up_reference): Use it.
7022 * cp-tree.h: Declare it.
7023
7024 2001-02-07 Mark Mitchell <mark@codesourcery.com>
7025
7026 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
7027 spec.
7028
7029 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
7030
7031 * pt.c (lookup_template_class): Make sure it's a primary
7032 template or template_template_parm when called from the parser.
7033 (instantiate_template_class): Add assertion.
7034
7035 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
7036
7037 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
7038 from error_mark_node.
7039
7040 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
7041
7042 Fix specification and implementation bugs in V3 ABI
7043 construction vtables.
7044 * cp-tree.h (flag_dump_class_layout): New flag.
7045 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
7046 (BINFO_LOST_PRIMARY_P): New flag.
7047 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
7048 (BINFO_PRIMARY_MARKED_P): Rename to ...
7049 (BINFO_PRIMARY_P): ... here.
7050 (binfo_via_virtual): New prototype.
7051 * decl2.c (flag_dump_class_layout): New flag.
7052 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
7053 use `=' as a file name separator.
7054 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
7055 bases.
7056 (build_vtbl_address): If this is a virtual primary base, then
7057 get the vtbl of what it is ultimately primary for.
7058 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
7059 for BINFO_PRIMARY_P.
7060 (dfs_skip_nonprimary_vbases_markedp): Likewise.
7061 (get_shared_vbase_if_not_primary): Likewise.
7062 (dfs_get_pure_virtuals): Likewise.
7063 (expand_upcast_fixups): Likewise.
7064 (fixup_virtual_upcast_offsets): Likewise.
7065 (dfs_find_vbase_instance): Likewise.
7066 (find_vbase_instance): Likewise.
7067 (binfo_from_vbase): Adjust comment to reflect reality.
7068 (binfo_via_virtual): New function.
7069 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
7070 for binfo walking during VTT construction.
7071 (dfs_mark_primary_bases): Remove.
7072 (force_canonical_binfo_r): New function.
7073 (force_canonical_binfo): New function.
7074 (mark_primary_virtual_base): New function.
7075 (mark_primary_bases): Walk in inheritance graph order, use
7076 mark_primary_virtual_base.
7077 (determine_primary_base): Use some more intermediate variables.
7078 (dfs_find_final_overrider): Don't check for overriding along a
7079 virtual path.
7080 (dfs_modify_vtables): Walk into primary virtual bases too.
7081 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
7082 (build_base_fields): Likewise.
7083 (dfs_set_offset_for_unshared_vbases): Likewise.
7084 (layout_virtual_bases): Likewise.
7085 (end_of_class): Likewise.
7086 (finish_struct_1): Call dump_class_hierarchy, if requested.
7087 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
7088 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
7089 (dump_class_hierarchy): Add file parameter. Append to file, if
7090 required.
7091 (finish_vtbls): Adjust accumulate_vtbl_inits call.
7092 Use canonical base for virtual bases.
7093 (build_vtt): Add more comments. Adjust build_vtt_inits call.
7094 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
7095 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
7096 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
7097 virtual VTTs.
7098 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
7099 from DATA. We want virtual primary bases and all bases via virtual.
7100 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
7101 virtual base when not a construction vtable.
7102 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
7103 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
7104 Use canonical bases when processing virtual bases.
7105 (accumulate_vtbl_inits): We're interested in any base via a
7106 virtual path.
7107 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
7108 within a construction vtable, determine what is being overridden.
7109 (build_vtbl_initializer): Add more comments
7110 (add_vcall_offset_vtbl_entries_1): Adjust comment.
7111 (build_rtti_vtbl_entries): Check if the base has lost its
7112 primary.
7113
7114 2001-02-05 Mark Mitchell <mark@codesourcery.com>
7115
7116 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
7117
7118 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7119
7120 * decl.c (pushdecl): Call abort instead of fatal.
7121 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
7122 * init.c (build_new_1): Likewise.
7123 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
7124 * decl.c (build_typename_type): hash_table_init now returns void.
7125 decl.c (init_decl_processing): Make an error non-fatal.
7126
7127 2001-02-04 Mark Mitchell <mark@codesourcery.com>
7128
7129 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
7130 Document.
7131 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
7132 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
7133 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
7134 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
7135 * decl.c (maybe_commonize_var): Use the new name-mangling where
7136 appropriate.
7137 * decl2.c (comdat_linkage): Enhance comments. Make all
7138 compiler-generated things static, if COMDAT is not available.
7139 (get_tinfo_decl): Do not make typeinfo objects that belong in the
7140 library COMDAT.
7141 (tinfo_base_init): Use the correct mangled name for typeinfo
7142 strings, and push them into the global scope.
7143 (typeinfo_in_lib_p): New function.
7144 (synthesize_tinfo_var): Use it.
7145 (create_real_tinfo_var): Likewise.
7146
7147 2001-02-03 Jakub Jelinek <jakub@redhat.com>
7148
7149 * decl.c (push_class_binding): Use context_for_name_lookup instead
7150 of CP_DECL_CONTEXT.
7151 * search.c (context_for_name_lookup): Remove static. Check for NULL
7152 context in the loop.
7153 * cp-tree.h (context_for_name_lookup): Add prototype.
7154
7155 2001-02-02 Jakub Jelinek <jakub@redhat.com>
7156
7157 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
7158 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
7159 Remove.
7160 * call.c (convert_class_to_reference, build_user_type_conversion_1,
7161 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
7162
7163 2001-02-02 Mark Mitchell <mark@codesourcery.com>
7164
7165 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
7166 of macros used when compiling g++spec.c.
7167 * g++spec.c (lang_specific_driver): Link with the shared
7168 libgcc by default.
7169
7170 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
7171
7172 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
7173 make_reference_declarator, make_call_declarator), method.c
7174 (implicitly_declare_fn), parse.y (namespace_using_decl,
7175 notype_unqualified_id, expr_or_declarator, new_type_id,
7176 after_type_declarator, direct_after_type_declarator,
7177 notype_declarator, complex_notype_declarator,
7178 complex_direct_notype_declarator, qualified_id,
7179 notype_qualified_id, overqualified_id, direct_new_declarator,
7180 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
7181 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
7182 instead of build_parse_node.
7183
7184 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7185
7186 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
7187 (minus_one_node): Moved to top level gcc directory. Renamed
7188 to integer_minus_one_node.
7189
7190 * init.c (init_init_processing): Don't set minus_one_node.
7191 (build_vec_init): Use integer_minus_one_node.
7192
7193 * rtti.c (get_tinfo_decl_dynamic): Likewise.
7194
7195 2001-01-28 Jakub Jelinek <jakub@redhat.com>
7196
7197 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
7198 identical and they would be replaced with constant, remove
7199 MODIFY_EXPR from the tree.
7200
7201 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7202
7203 * Make-lang.in: Remove all dependencies on defaults.h.
7204 * call.c: Don't include defaults.h.
7205 * decl.c: Likewise.
7206 * decl2.c: Likewise.
7207 * except.c: Likewise.
7208 * pt.c: Likewise.
7209 * rtti.c: Likewise.
7210 * tree.c: Likewise.
7211 * typeck.c: Likewise.
7212
7213 2001-01-25 Jakub Jelinek <jakub@redhat.com>
7214
7215 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
7216 operators even in "C" linkage.
7217 * method.c (set_mangled_name_for_decl): Likewise.
7218 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
7219 overloaded operators in "C" linkage.
7220
7221 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
7222
7223 * pt.c (tsubst_decl): Remove IN_DECL parameter.
7224 (tsubst_arg_types): Check parameter is not void.
7225 (tsubst): Adjust tsubst_decl call.
7226
7227 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
7228
7229 * call.c (add_builtin_candidate): Quote std properly, from
7230 previous change.
7231
7232 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7233
7234 * pt.c (check_explicit_specialization): Clone constructors and
7235 destructors.
7236
7237 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
7238
7239 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
7240 indicates anything special about template depth. Make sure we
7241 only count the user visible template classes.
7242
7243 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
7244
7245 * call.c (build_conv): Typo in comment.
7246 (add_builtin_candidate): Add more explanation.
7247 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
7248 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
7249 when we have enumeral types.
7250 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
7251 candidates for relops and eqops.
7252 (joust): Simplify control flow. Allow a non-template user
7253 function to hide a builtin.
7254
7255 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
7256
7257 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
7258 (more_specialized): Add deduction parameter.
7259 * call.c (joust): Adjust more_specialized call.
7260 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
7261 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
7262 (get_bindings_order): Remove.
7263 (get_bindings_real): Add DEDUCE parameter.
7264 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
7265 REFERENCE_TYPE jig for DEDUCE_ORDER.
7266 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
7267 maybe_adjust_types_for_deduction.
7268 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
7269 directly.
7270 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
7271 (check_cv_quals_for_unify): Use new unify qualifier flags.
7272 (unify): Clear new unify qualifier flags.
7273 (get_bindings_real): Add DEDUCE parameter.
7274 (get_bindings): Adjust call to get_bindings_real.
7275 (get_bindings_overload): Likewise.
7276 (most_specialized_instantiation): Adjust call to
7277 more_specialized.
7278
7279 2001-01-19 Jason Merrill <jason@redhat.com>
7280
7281 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
7282
7283 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
7284 -fnew-abi.
7285
7286 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
7287
7288 * decl2.c (arg_assoc_class): Fix double iteration logic.
7289
7290 2001-01-19 Jason Merrill <jason@redhat.com>
7291
7292 * init.c (build_delete): Always call convert_force to strip cv-quals.
7293
7294 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
7295 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
7296 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
7297
7298 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
7299
7300 * search.c (get_vbase_1): Count only virtual bases.
7301
7302 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
7303
7304 * class.c (duplicate_tag_error): Robustify flag clearing.
7305
7306 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
7307
7308 * cp-tree.h (lookup_template_class): Add complain parm.
7309 * decl.c (lookup_namespace_name): Adjust call to
7310 lookup_template_class.
7311 (make_typename_type): Likewise.
7312 * semantics.c (finish_template_type): Likewise.
7313 * pt.c (lookup_template_class): Add complain parm. Adjust.
7314 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
7315 (tsubst): Likewise.
7316
7317 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
7318
7319 * pt.c (copy_default_args_to_explicit_spec): Preserve
7320 object's CV quals. Reorganize.
7321
7322 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
7323
7324 * typeck.c (build_modify_expr): Say `initialization' for
7325 INIT_EXPRs.
7326 * init.c (build_default_init): Convert to enumeral type, if
7327 needed.
7328
7329 2001-01-18 Jakub Jelinek <jakub@redhat.com>
7330
7331 * parse.y (nomods_initdcl0): Properly set things up for
7332 initdcl0_innards.
7333
7334 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
7335
7336 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
7337 (type_unification_real): Set it.
7338 (unify): Use it.
7339
7340 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
7341
7342 * decl.c (finish_destructor_body): Convert to vbase pointer here.
7343
7344 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
7345
7346 * semantics.c (begin_class_definition): Check we're not inside a
7347 template parm list.
7348
7349 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
7350
7351 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
7352 BASELINK_P.
7353
7354 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7355
7356 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
7357 * call.c (build_over_call): Add comment.
7358
7359 2001-01-16 Daniel Berlin <dberlin@redhat.com>
7360
7361 * cvt.c (ocp_convert): Handle vector type conversion
7362 * typeck2.c (digest_init): Handle vector type initializations
7363
7364 2001-01-16 Phil Edwards <pme@sources.redhat.com>
7365
7366 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
7367 was given.
7368
7369 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
7370
7371 * pt.c (check_nontype_parm): Rename to ...
7372 (invalid_nontype_parm_type_p): ... here.
7373 (process_template_parm): Adjust.
7374 (convert_template_argument): Adjust.
7375
7376 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
7377
7378 * pt.c (check_nontype_parm): New function.
7379 (process_template_parm): Use it.
7380 (convert_template_argument): Use it.
7381 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
7382 member.
7383
7384 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
7385
7386 * tree.c: Add defaults.h
7387 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
7388 * Make-lang.in (cp/tree.o): Add defaults.h.
7389
7390 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
7391
7392 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
7393
7394 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
7395
7396 * g++.1: Change to be ".so man1/gcc.1".
7397
7398 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
7399
7400 * Make-lang.in (c++.info, c++.install-info): Build and install g++
7401 internals info.
7402 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
7403 ($(srcdir)/cp/g++int.info): New target.
7404 * gxxint.texi: Add info directory entry. Use @@ in email address.
7405 * .cvsignore: Update.
7406
7407 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
7408
7409 * typeck.c (build_c_cast): Do template processing earlier.
7410 Always pedwarn on array casts.
7411
7412 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
7413
7414 * friend.c (make_friend_class): Make sure a templated class is
7415 actually a template.
7416
7417 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
7418
7419 * decl2.c (get_guard): Set linkage from guarded decl.
7420
7421 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
7422
7423 * call.c (convert_default_arg): Check for unprocessed
7424 DEFAULT_ARG.
7425 * cp-tree.h (replace_defarg): Move to spew.c.
7426 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
7427 spew.c, which is where they really are.
7428 (done_pending_defargs): Declare.
7429 (unprocessed_defarg_fn): Declare.
7430 * decl.c (replace_defarg): Move to spew.c
7431 * parse.y (structsp): Call done_pending_defargs.
7432 * spew.c (defarg_fns): Rearrange list structure.
7433 (defarg_fnsdone): New static variable.
7434 (defarg_depfns): New static variable.
7435 (init_spew): Adjust.
7436 (add_defarg_fn): Store the type in TREE_TYPE.
7437 (do_pending_defargs): Detect and deal with ordering constraints
7438 and circularity.
7439 (done_pending_defargs): New function.
7440 (unprocessed_defarg_fn): New function.
7441 (replace_defarg): Moved from decl.c. Robustify. Don't save
7442 if circularity detected.
7443
7444 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
7445
7446 * pt.c (unify): Check array has a domain, before checking
7447 whether it is variable sized.
7448
7449 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
7450
7451 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
7452 parameters with pointers to arrays of unknown bound.
7453
7454 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
7455
7456 * parse.y (template_parm_header, template_spec_header): New
7457 reductions. Split out from ...
7458 (template_header): ... here. Use them.
7459 (template_template_parm): Use template_parm_header.
7460 * semantics.c (finish_template_template_parm): Add assert.
7461
7462 2001-01-10 Mark Mitchell <mark@codesourcery.com>
7463
7464 * mangle.c (write_builtin_type): Fix thinko.
7465
7466 * pt.c (copy_default_args_to_explicit_spec_1): New function.
7467 (copy_default_args_to_explicit_spec): Likewise.
7468 (check_explicit_specialization): Use it.
7469
7470 * class.c (finish_struct_1): Remove last argument in call to
7471 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
7472 * decl.c (builtin_function): Likewise.
7473 (build_cp_library_fn): Likewise.
7474 (check_initializer): Likewise.
7475 (make_rtl_for_nonlocal_decl): Likewise.
7476 (cp_finish_decl): Likewise.
7477 (start_function): Likewise.
7478 * decl2.c (finish_anon_union): Likewise.
7479 * friend.c (do_friend): Likewise.
7480 * init.c (build_java_class_ref): Likewise.
7481 * method.c (make_thunk): Likewise.
7482 * pt.c (tsubst_friend_function): Likewise.
7483 * semantics.c (expand_body): Likewise.
7484
7485 2001-01-10 Mark Mitchell <mark@codesourcery.com>
7486
7487 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
7488 looking at DECL_CLONED_FUNCTION for non-functions.
7489
7490 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
7491
7492 * error.c (dump_template_parameter): Use parm to determine how
7493 to print default value.
7494
7495 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
7496
7497 * class.c (duplicate_tag_error): Clear more flags.
7498
7499 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
7500
7501 * call.c (build_new_method_call): Use binfo_for_vbase.
7502
7503 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
7504
7505 * cp-tree.h (flag_cond_mismatch): Don't declare.
7506 * decl2.c (flag_cond_mismatch): Don't define.
7507 (lang_f_options): Remove cond-mismatch.
7508 (unsupported_options): Add cond-mismatch.
7509
7510 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
7511
7512 * class.c (handle_using_decl): Reject using of constructor name
7513 of sourcing class. Allow injecting of a method with same name as
7514 nested class. Fixup error messages.
7515
7516 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
7517
7518 * decl2.c (lang_decode_option): Handle -Wformat=2.
7519
7520 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
7521
7522 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
7523 initialized_in_class.
7524 (DECL_DEFINED_IN_CLASS_P): Rename to ...
7525 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
7526 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
7527 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
7528 * pt.c (check_default_tmpl_args): Adjust for
7529 DECL_INITIALIZED_IN_CLASS_P.
7530 (instantiate_class_template): Likewise.
7531 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
7532
7533 * class.c (finish_struct): Constify saved_filename.
7534
7535 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
7536
7537 * class.c (duplicate_tag_error): Adjust diagnostic.
7538 (finish_struct): Locally set location to start of struct.
7539 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
7540
7541 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
7542
7543 * decl.c (struct binding_level): Adjust class_shadowed comments
7544 to reflect reality.
7545 (push_class_level_binding): Adjust comments to reflect reality.
7546 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
7547 Don't set TREE_VALUE on the class_shadowed list.
7548
7549 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7550
7551 * decl2.c (acceptable_java_type): Allow references too.
7552 * init.c (build_java_class_ref): When using the new ABI, search
7553 `class$' and have it mangled with `mangle_decl.'
7554 * mangle.c (write_java_integer_type_codes): New function.
7555 (write_builtin_type): Detect and mangle Java integer and real
7556 types.
7557
7558 2001-01-07 Mark Mitchell <mark@codesourcery.com>
7559
7560 * decl2.c (grokfield): Don't accept `asm' specifiers for
7561 non-static data members.
7562
7563 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7564
7565 * expr.c (cplus_expand_expr): Don't reset `target'.
7566
7567 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
7568
7569 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
7570
7571 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
7572
7573 * parse.y (template_datadef): Check for error_mark_node.
7574
7575 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
7576
7577 * cp-tree.def (DEFAULT_ARG): Make `x' class.
7578
7579 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
7580
7581 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
7582 (record_builtin_type): Make non-static.
7583 (flag_short_double): Don't declare.
7584 (init_decl_processing): Remove the creation of many tree nodes now
7585 in c_common_nodes_and_builtins.
7586 (build_void_list_node): New function.
7587 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
7588 * cp-tree.h (flag_short_wchar): Don't declare.
7589
7590 2001-01-04 Mark Mitchell <mark@codesourcery.com>
7591
7592 * call.c (build_conv): Don't use build1 for USER_CONV.
7593 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
7594
7595 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
7596
7597 * lex.c (lang_init): Call c_common_lang_init.
7598
7599 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
7600
7601 * search.c (lookup_fnfields_here): Remove.
7602 (look_for_overrides_r): Use lookup_fnfields_1.
7603 Ignore functions from using declarations.
7604
7605 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
7606
7607 Implement exceptions specifiers for implicit member functions.
7608 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
7609 * method.c (synthesize_exception_spec): New function.
7610 (locate_dtor, locate_ctor, locate_copy): New functions.
7611 (implicitly_declare_fn): Generate the exception spec too.
7612 * search.c (check_final_overrider): Check artificial functions
7613 too.
7614 * typeck2.c (merge_exception_specifiers): New function.
7615
7616 2001-01-03 Jason Merrill <jason@redhat.com>
7617
7618 * init.c (build_default_init): New fn.
7619 (perform_member_init): Split out from here.
7620 (build_new_1): Use it. Simplify initialization logic.
7621 (build_vec_init): Take an array, rather than a pointer and maxindex.
7622 Speed up simple initializations. Don't clean up if we're assigning.
7623 * cp-tree.h: Adjust.
7624 * decl2.c (do_static_initialization): Remove TREE_VEC case.
7625 * parse.y (new_initializer): Return void_zero_node for ().
7626 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
7627 * typeck2.c (digest_init): Only complain about user-written
7628 CONSTRUCTORs.
7629
7630 2000-12-22 Mike Stump <mrs@wrs.com>
7631
7632 * decl2.c: (max_tinst_depth): Increase to 50.
7633
7634 2001-01-02 Mark Mitchell <mark@codesourcery.com>
7635
7636 * class.c (invalidate_class_lookup_cache): Zero the
7637 previous_class_values.
7638 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
7639 TREE_INT_CST_HIGH.
7640 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
7641 * decl.c (free_bindings): New variable.
7642 (push_binding): Don't create a new binding if we have one on the
7643 free list.
7644 (pop_binding): Put old bindings on the free list.
7645 (init_decl_processing): Use size_int, not build_int_2.
7646 Register free_bindings as a GC root.
7647 (cp_make_fname_decl): Use size_int, not build_int_2.
7648 (push_inline_template_parms_recursive): Likewise.
7649 (end_template_parm_list): Likewise.
7650 (for_each_template_parm): Do not use walk_tree_without_duplicates.
7651 (tsubst_template_parms): Use size_int, not build_int_2.
7652 (tsubst): Likewise.
7653 * rtti.c (get_vmi_pseudo_type_info): Likewise.
7654
7655 2001-01-02 Richard Henderson <rth@redhat.com>
7656
7657 * parse.y (asm): Set ASM_INPUT_P.
7658
7659 2001-01-02 Jason Merrill <jason@redhat.com>
7660
7661 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
7662 for v3 ABI.
7663
7664 * typeck.c (cp_truthvalue_conversion): New fn.
7665 * cvt.c (ocp_convert): Use it.
7666
7667 * cp-tree.h: Lose c-common.c decls.
7668
7669 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
7670 * cvt.c (convert_to_void): Use type_unknown_p.
7671
7672 * typeck.c (strip_all_pointer_quals): Also strip quals from
7673 pointer-to-member types.
7674
7675 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
7676 parse.y as C.
7677
7678 * call.c (build_new_method_call): Do evaluate the object parameter
7679 when accessing a static member.
7680 * typeck.c (build_component_ref): Likewise.
7681
7682 2001-01-02 Andreas Jaeger <aj@suse.de>
7683
7684 * decl.c (cp_missing_noreturn_ok_p): New.
7685 (init_decl_processing): Set lang_missing_noreturn_ok_p.
7686
7687 2000-12-29 Jakub Jelinek <jakub@redhat.com>
7688
7689 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
7690
7691 2000-12-29 Mark Mitchell <mark@codesourcery.com>
7692
7693 * class.c (pushclass): Remove #if 0'd code.
7694 * cp-tree.h (overload_template_name): Remove.
7695 * decl.c (store_bindings): Simplify.
7696 (pop_from_top_level): Likewise.
7697 * pt.c (overload_template_name): Remove.
7698 (instantiate_decl): Don't call push_to_top_level if it's not
7699 needed.
7700
7701 2000-12-28 Mark Mitchell <mark@codesourcery.com>
7702
7703 * pt.c (register_local_specialization): Don't return a value.
7704 (lookup_template_class): Use move-to-front heuristic when looking
7705 up template instantiations.
7706 (instantiate_decl): Only push_to_top_level when we're actually
7707 going to instantiate the template.
7708
7709 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
7710
7711 * search.c (binfo_for_vtable): Return least derived class, not
7712 most. Handle secondary vtables.
7713
7714 2000-12-22 Jason Merrill <jason@redhat.com>
7715
7716 * pt.c (more_specialized): Don't optimize len==0.
7717 (fn_type_unification): If we're adding the return type, increase len.
7718
7719 * typeck.c (build_binary_op): Fix pmf comparison logic.
7720
7721 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
7722 DECL_STATIC_FUNCTION_P.
7723
7724 * semantics.c (genrtl_finish_function): Don't try to jump to
7725 return_label unless it exists.
7726
7727 In partial ordering for a call, ignore parms for which we don't have
7728 a real argument.
7729 * call.c (joust): Pass len to more_specialized.
7730 (add_template_candidate_real): Strip 'this', pass len.
7731 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
7732 (get_bindings_order): New fn. Pass len down.
7733 (get_bindings_real): Strip 'this', pass len.
7734 (fn_type_unification): Likewise.
7735 (type_unification_real): Succeed after checking 'len' args.
7736 (most_specialized_instantiation): Lose explicit_args parm.
7737 * class.c (resolve_address_of_overloaded_function): Strip 'this',
7738 pass len.
7739
7740 2000-12-21 Jason Merrill <jason@redhat.com>
7741
7742 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
7743 DECL_TEMPLATE_RESULT.
7744
7745 * search.c (lookup_field_r): Call lookup_fnfields_1, not
7746 lookup_fnfields_here.
7747
7748 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
7749
7750 * call.c (build_object_call): Also allow conversions that return
7751 reference to pointer to function.
7752 (add_conv_candidate): Handle totype being ref to ptr to fn.
7753 (build_field_call): Also allow members of type reference to function.
7754 Lose support for calling pointer to METHOD_TYPE fields.
7755
7756 * error.c (dump_expr): Handle *_CAST_EXPR.
7757
7758 * typeck2.c (build_scoped_ref): Always convert to the naming class.
7759
7760 * tree.c (break_out_cleanups): Lose.
7761 * cp-tree.h: Remove prototype.
7762 * typeck.c (build_component_ref): Don't break_out_cleanups.
7763 (build_compound_expr): Likewise.
7764 * semantics.c (finish_expr_stmt): Likewise.
7765
7766 2000-12-20 Richard Henderson <rth@redhat.com>
7767
7768 * cp-tree.h: Update declarations.
7769 * decl.c (finish_case_label): Return the new stmt node.
7770 * semantics.c (finish_goto_stmt): Likewise.
7771 (finish_expr_stmt, finish_return_stmt): Likewise.
7772 (finish_break_stmt, finish_continue_stmt): Likewise.
7773 (finish_asm_stmt): Likewise.
7774 * parse.y (already_scoped_stmt): Set STMT_LINENO.
7775 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
7776 (simple_if, simple_stmt): Return the new stmt node.
7777 (save_lineno): New.
7778
7779 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
7780
7781 * cp-tree.h: Don't declare warn_long_long.
7782
7783 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7784
7785 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
7786 IS_AGGR_TYPE.
7787
7788 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7789
7790 * pt.c (unify): Handle when both ARG and PARM are
7791 BOUND_TEMPLATE_TEMPLATE_PARM.
7792
7793 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7794
7795 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
7796 DECL_TEMPLATE_PARM_P.
7797
7798 2000-12-15 Jason Merrill <jason@redhat.com>
7799
7800 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
7801
7802 * init.c (build_new_1): Don't strip quals from type.
7803
7804 * decl.c (pushdecl): Don't check for linkage on a non-decl.
7805
7806 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
7807
7808 * call.c (build_new_function_call): Lose space before paren in
7809 error message.
7810 (build_new_method_call): Likewise.
7811
7812 * typeck2.c (build_m_component_ref): Propagate quals from datum.
7813
7814 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7815
7816 * pt.c (check_explicit_specialization): Propagate default
7817 function arguments to explicit specializations.
7818
7819 2000-12-13 DJ Delorie <dj@redhat.com>
7820
7821 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
7822 and <? operators.
7823
7824 2000-12-08 Jason Merrill <jason@redhat.com>
7825
7826 * error.c (dump_function_name): Don't let the user see __comp_ctor.
7827
7828 Clean up copy-initialization in overloading code.
7829 * call.c (build_user_type_conversion_1): Die if we are asked to
7830 convert to the same or a base type.
7831 (implicit_conversion): Avoid doing so. Lose reference binding code.
7832 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
7833 direct-initialization. Also do direct-init part of copy-init.
7834 (build_user_type_conversion): Don't provide context to convert_like.
7835 * cvt.c (ocp_convert): build_user_type_conversion will now provide
7836 the constructor call for copy-init.
7837
7838 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
7839 instantiation of a member template.
7840 (do_decl_instantiation): Not here.
7841
7842 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
7843
7844 * class.c (check_field_decls): Don't special case anonymous
7845 fields in error messages.
7846 (note_name_declared_in_class): Use %D on diagnostic.
7847
7848 * tree.c (pod_type_p): Use strip_array_types.
7849 (cp_valid_lang_attribute): Likewise.
7850 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
7851 multiple evaluations.
7852 (cp_has_mutable_p): Use strip_array_types.
7853
7854 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
7855
7856 * cp-tree.h (sufficient_parms_p): Declare new function.
7857 * call.c (sufficient_parms_p): New function, broken out of ...
7858 (add_function_candidate): ... here. Use it.
7859 (add_conv_candidate): Use it.
7860 * decl.c (grok_ctor_properties): Use it.
7861
7862 2000-12-07 Jakub Jelinek <jakub@redhat.com>
7863
7864 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
7865
7866 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
7867
7868 * decl2.c (lang_decode_option): Handle -Wformat-security.
7869
7870 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7871
7872 * pt.c (verify_class_unification): New function.
7873 (get_class_bindings): Use it.
7874 (try_class_unification): Tidy.
7875 (unify): Handle when argument of a template-id is not
7876 template parameter dependent.
7877 (template_args_equal): Handle when TREE_CODE's do not match.
7878
7879 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
7880
7881 * lang-specs.h (c++): When invoking the stand-alone preprocessor
7882 for -save-temps, pass all relevant -Defines to it, and then don't
7883 pass them to cc1plus.
7884
7885 2000-12-05 Will Cohen <wcohen@redhat.com>
7886
7887 * decl.c (finish_case_label): Cleared
7888 more_cleanups_ok in surrounding function scopes.
7889 (define_label): Likewise.
7890
7891 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
7892
7893 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
7894 (get_matching_virtual): Remove.
7895 (look_for_overrides): Declare new function.
7896 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
7897 DECL_VINDEX here.
7898 * class.c (check_for_override): Move base class iteration code
7899 to look_for_overrides.
7900 * search.c (next_baselink): Remove.
7901 (get_virtuals_named_this): Remove.
7902 (get_virtual_destructor): Remove.
7903 (tree_has_any_destructors_p): Remove.
7904 (struct gvnt_info): Remove.
7905 (check_final_overrider): Remove `virtual' from error messages.
7906 (get_matching_virtuals): Remove. Move functionality to ...
7907 (look_for_overrides): ... here, and ...
7908 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
7909 to be overriding.
7910
7911 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
7912
7913 * typeck.c (get_delta_difference): If via a virtual base,
7914 return zero.
7915 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
7916 adjustment.
7917
7918 2000-12-04 Richard Henderson <rth@redhat.com>
7919
7920 * error.c (dump_tree): Use output_add_string not OB_PUTS.
7921
7922 2000-12-04 Jason Merrill <jason@redhat.com>
7923
7924 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
7925 (write_builtin_type): Pass intSI_type_node and the like through
7926 type_for_mode.
7927 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
7928 Pass intSI_type_node and the like through type_for_mode.
7929 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
7930 * pt.c (tsubst, unify): Likewise.
7931 * tree.c (walk_tree): Likewise.
7932 * error.c (dump_type): Likewise.
7933 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
7934
7935 * Make-lang.in: Tweak top comment for emacs.
7936 (cp/TAGS): Restore.
7937
7938 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
7939
7940 * class.c (clone_function_decl): Robustify.
7941
7942 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
7943
7944 * decl.c (store_bindings): Only search in the non modified
7945 old_bindings for duplicates.
7946
7947 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
7948
7949 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
7950 TYPE_POLYMORPHIC_P.
7951
7952 * typeck.c (build_static_cast): Remove unused variable.
7953
7954 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7955
7956 * pt.c: Fix typo in comment.
7957
7958 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
7959
7960 * decl2.c (warn_format): Remove definition.
7961 (lang_decode_option): Handle -Wformat-nonliteral,
7962 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
7963
7964 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
7965
7966 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
7967 (init_decl_processing): Don't create string_type_node,
7968 const_string_type_node, wint_type_node, intmax_type_node,
7969 uintmax_type_node, default_function_type, ptrdiff_type_node and
7970 unsigned_ptrdiff_type_node. Adjust position of call to
7971 c_common_nodes_and_builtins.
7972 (identifier_global_value): New function.
7973
7974 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
7975
7976 * call.c (standard_conversion): Reject pointer to member
7977 conversions from ambiguous, inaccessible or virtual bases.
7978 * typeck.c (build_static_cast): Don't check pointers to members
7979 specially.
7980
7981 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7982
7983 * method.c (do_build_copy_constructor): Preserve cv
7984 qualifications when accessing source object members.
7985 (do_build_assign_ref): Likewise. Remove separate diagnostics for
7986 unnamed fields.
7987
7988 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7989
7990 * method.c (do_build_assign_ref): Construct appropriately
7991 CV-qualified base reference. Don't allow const casts in base
7992 conversion.
7993
7994 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
7995
7996 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
7997 incomplete return type.
7998
7999 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8000
8001 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
8002 * semantics.c (finish_base_specifier): Accept a _TYPE not a
8003 _DECL.
8004
8005 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8006
8007 * spew.c (yyerror): Cope if yylval.ttype is NULL.
8008
8009 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8010
8011 * decl.c (grokdeclarator): Diagnose undefined template contexts.
8012
8013 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8014
8015 * decl.c (grokdeclarator): Do type access control on friend
8016 class.
8017
8018 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
8019
8020 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
8021 bison parser ickiness.
8022 * pt.c (tsubst_friend_function): Enter namespace scope when
8023 tsubsting the function name.
8024 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
8025
8026 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
8027
8028 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
8029 * cvt.c (cp_convert_to_pointer): Add force parameter.
8030 Allow conversions via virtual base if forced.
8031 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
8032 (ocp_convert): Likewise.
8033 * search.c (binfo_from_vbase): Return the virtual base's binfo.
8034 * typeck.c (get_delta_difference): Adjust handling of virtual
8035 bases.
8036
8037 2000-11-26 Mark Mitchell <mark@codesourcery.com>
8038
8039 * tree.c (struct list_hash): Remove.
8040 (list_hash_table): Make it be an htab.
8041 (struct list_proxy): New type.
8042 (list_hash_eq): New function.
8043 (list_hash_pieces): Renamed from ...
8044 (list_hash): ... this.
8045 (list_hash_lookup): Remove.
8046 (list_hash_add): Remove.
8047 (hash_tree_cons): Use the generic hashtable.
8048 (mark_list_hash): Remove.
8049 (init_tree): Create the hashtable.
8050
8051 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
8052
8053 * method.c (build_mangled_C9x_name): Rename to
8054 build_mangled_C99_name. Change C9X references in comments to
8055 refer to C99.
8056
8057 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
8058
8059 * parse.y (unary_expr): Move VA_ARG from here ...
8060 (primary): ... to here.
8061
8062 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
8063
8064 * semantics.c (finish_id_expr): If type is error_mark, return
8065 error_mark.
8066
8067 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
8068
8069 * pt.c (lookup_template_class): Simplify loop exit constructs.
8070 Cope when there is no partial instantiation of a template
8071 template member.
8072
8073 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
8074
8075 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
8076
8077 2000-11-22 Mark Mitchell <mark@codesourcery.com>
8078
8079 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
8080 prefix.
8081
8082 * pt.c (do_decl_instantiate): Explicitly clone constructors and
8083 destructors that haven't already been cloned.
8084
8085 2000-11-20 Richard Henderson <rth@redhat.com>
8086
8087 * parse.y (yyparse_1): Rename the parser entry point.
8088
8089 2000-11-20 Alex Samuel <samuel@codesourcery.com>
8090
8091 * mangle.c (write_name): Use <unscoped-name> for names directly in
8092 function scope.
8093 (write_unscoped_name): Accept names directly in function scope.
8094
8095 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
8096
8097 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
8098 * parse.y (extdef): Add EXPORT reduction.
8099 * spew.c (yylex): Don't skip export here.
8100
8101 2000-11-19 Mark Mitchell <mark@codesourcery.com>
8102
8103 * decl.c (init_decl_processing): Correct name of pure virtual
8104 function under the new ABI.
8105 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
8106 (throw_bad_typeid): Likewise for bad typeid function.
8107
8108 2000-11-18 Mark Mitchell <mark@codesourcery.com>
8109
8110 * decl.c (grokparms): Don't even function types of `void' type,
8111 either.
8112 * mangle.c (write_type): Don't crash when confronted with the
8113 error_mark_node.
8114
8115 * decl.c (grokparms): Don't create parameters of `void' type.
8116
8117 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
8118
8119 * lex.c (mark_impl_file_chain): Delete.
8120 (init_parse): Remove call to ggc_add_string_root. No need to
8121 ggc_strdup a string constant. Do not add impl_file_chain to GC
8122 roots.
8123 (handle_pragma_implementation): No need to ggc_strdup main_filename.
8124
8125 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8126
8127 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
8128
8129 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8130
8131 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
8132 * decl.c (grokdeclarator): Don't reject void parms here.
8133 (require_complete_types_for_parms): Simplify, use
8134 complete_type_or_else.
8135 (grokparms): Remove bitrot. Remove funcdef parm.
8136 Deal with ellipsis parm lists here.
8137 * semantics.c (finish_parmlist): Don't append void_list_node
8138 here. Set PARMLIST_ELLIPSIS_P.
8139
8140 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
8141
8142 * typeck2.c (incomplete_type_error): Reorganize to avoid
8143 excessive diagnostics.
8144
8145 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
8146
8147 * lex.c (struct impl_files, internal_filename): Constify a char *.
8148
8149 2000-11-16 Mark Mitchell <mark@codesourcery.com>
8150
8151 * mangle.c (write_special_name_constructor): Don't generate
8152 assembler junk when confronted with an old-style constructor.
8153 (write_special_name_destructor): Likewise.
8154 (mangle_decl_string): Do it here instead.
8155
8156 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
8157
8158 * call.c (op_error): Make error messages clearer.
8159
8160 2000-11-15 Mark Mitchell <mark@codesourcery.com>
8161
8162 * decl.c (wrapup_globals_for_namespace): Don't mark things
8163 TREE_ASM_WRITTEN when they're not.
8164
8165 2000-11-15 Jason Merrill <jason@redhat.com>
8166
8167 * typeck2.c (friendly_abort): Uncount the error before handing
8168 off to fancy_abort.
8169
8170 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
8171
8172 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
8173
8174 2000-11-14 Mark Mitchell <mark@codesourcery.com>
8175
8176 * class.c (build_vtbl_initializer): Fix typo in comment.
8177 * typeck.c (expr_sizeof): Don't crash on errors.
8178
8179 2000-11-14 Jim Wilson <wilson@redhat.com>
8180
8181 * lang-specs.h: Add %2 after %(cc1_options).
8182
8183 2000-11-14 Richard Henderson <rth@redhat.com>
8184
8185 * typeck.c (c_sizeof): Be strict about casting result value
8186 back to c_size_type_node.
8187 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
8188
8189 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
8190
8191 * typeck.c (build_unary_op): Use boolean_increment from
8192 c-common.c, moving the relevant code there.
8193
8194 2000-11-11 Jason Merrill <jason@redhat.com>
8195
8196 * typeck.c (mark_addressable): Don't call put_var_into_stack.
8197
8198 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
8199 in inlines.
8200
8201 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8202
8203 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
8204 * lex.c (copy_lang_decl): Likewise.
8205
8206 2000-11-09 Mark Mitchell <mark@codesourcery.com>
8207
8208 * dump.c (cp_dump_tree): Don't dump function bodies here.
8209
8210 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8211 (dump.o): Update dependency list.
8212 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
8213 (flag_dump_translation_unit): Likewise.
8214 (CP_TYPE_QUALS): Adjust definition.
8215 (DECL_C_BIT_FIELD): Remove.
8216 (SET_DECL_C_BIT_FIELD): Likewise.
8217 (CLEAR_DECL_C_BIT_FIELD): Likewise.
8218 (add_maybe_template): Likewise.
8219 (strip_array_types): Likewise.
8220 (dump_node_to_file): Likewise.
8221 (cp_dump_tree): New function.
8222 * decl.c (init_decl_processing): Set lang_dump_tree.
8223 * decl2.c (flag_dump_translation_unit): Remove.
8224 * dump.c: Move most of it to ../c-dump.c.
8225 (cp_dump_tree): New function.
8226 * pt.c (add_maybe_template): Remove.
8227 * typeck.c (strip_array_types): Likewise.
8228
8229 2000-11-07 Eric Christopher <echristo@redhat.com>
8230
8231 * decl.c (init_decl_processing): Change definition of
8232 __wchar_t to wchar_t. Remove artificial declaration of
8233 wchar_t.
8234 * lex.c: Change instances of __wchar_t to wchar_t.
8235
8236 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
8237
8238 * lex.c (do_identifier): Don't lookup_name for operators.
8239 * parse.y (operator): Save looking_for_typename.
8240 (unoperator): Restore it.
8241 * spew.c (frob_opname): Use nth_token for lookahead.
8242
8243 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
8244
8245 * decl.c (grok_op_properties): Always use coerce_new_type and
8246 coerce_delete_type.
8247 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
8248 exception specification. Tidy up.
8249 (coerce_delete_type): Preserve exception specification. Tidy up.
8250
8251 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
8252
8253 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
8254 (push_binding_level), error.c (cp_tree_printer), pt.c
8255 (process_partial_specialization, tsubst_template_arg_vector),
8256 search.c (lookup_member): Use memset () instead of bzero ().
8257
8258 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
8259
8260 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
8261
8262 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
8263
8264 * Make-lang.in (c++.distdir): Remove.
8265
8266 2000-11-04 Mark Mitchell <mark@codesourcery.com>
8267
8268 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
8269 declarations from different namespaces to be combined.
8270
8271 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
8272
8273 * decl.c: Include tm_p.h.
8274
8275 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
8276
8277 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
8278
8279 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
8280
8281 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
8282 (build_overload_value), repo.c (open_repo_file), xref.c
8283 (open_xref_file): Use strchr () and strrchr () instead of index ()
8284 and rindex ().
8285
8286 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
8287
8288 * call.c (build_over_call): Call fold on the CALL_EXPR.
8289
8290 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
8291
8292 * error.c (dump_template_decl): Separate template hearders with
8293 space not comma.
8294
8295 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
8296
8297 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
8298 TS_* flags with corresponding TFF_*. Adjust prototypes of
8299 functions (which used to take a tree_string_flags) to take an int.
8300
8301 * cp-tree.h (enum tree_string_flags): Remove
8302 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
8303 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
8304 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
8305 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
8306 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
8307 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
8308 (type_as_string, decl_as_string, expr_as_string,
8309 context_as_string): Adjust prototype.
8310
8311 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
8312 instead of TS_PLAIN.
8313
8314 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
8315 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
8316 plain `0'.
8317
8318 2000-10-30 Mark Mitchell <mark@codesourcery.com>
8319
8320 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
8321 (linkage_kind): New enumeration.
8322 (decl_linkage): New function.
8323 * decl2.c (comdat_linkage): Extend comment.
8324 * error.c (dump_function_decl): Print the arguments used to
8325 instantiate a template, even when not printing the type of the
8326 function.
8327 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
8328 not TREE_PUBLIC, to test for external linkage.
8329 * tree.c (decl_linkage): New function.
8330
8331 2000-10-28 Mark Mitchell <mark@codesourcery.com>
8332
8333 * pt.c (instantiate_decl): Always instantiate static data members
8334 initialized in-class.
8335
8336 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
8337
8338 * Make-lang.in: Move all build rules here from Makefile.in,
8339 adapt to new context. Wrap all rules that change the current
8340 directory in parentheses. Expunge all references to $(P).
8341 When one command depends on another and they're run all at
8342 once, use && to separate them, not ;. Add OUTPUT_OPTION to
8343 all object-file generation rules. Delete obsolete variables.
8344
8345 * Makefile.in: Delete.
8346 * config-lang.in: Delete outputs= line.
8347
8348 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
8349
8350 * error.c (dump_function_decl): Print no space between
8351 `ptr-operator' the `type-specifier' of the return type.
8352 (dump_type_prefix): Make sure we put space at the appropriate
8353 place.
8354
8355 2000-10-23 Jason Merrill <jason@redhat.com>
8356
8357 * call.c (equal_functions): Also call decls_match for extern "C" fns.
8358
8359 2000-10-22 Jason Merrill <jason@redhat.com>
8360
8361 * call.c (build_conditional_expr): Use ocp_convert to force
8362 rvalue conversion.
8363
8364 2000-10-22 Mark Mitchell <mark@codesourcery.com>
8365
8366 * call.c (standard_conversion): Use RVALUE_CONVs for all
8367 expressions that satisfy lvalue_p, not just those that satisfy
8368 real_lvalue_p.
8369
8370 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
8371
8372 * typeck.c (c_sizeof): Return an expression of `size_t' type,
8373 not one with TYPE_IS_SIZETYPE set.
8374 (dubious_conversion_warnings): Remove special-case code.
8375
8376 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
8377
8378 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
8379 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
8380 (dump_type_prefix): Print vector-of-int as 'int vector'.
8381 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
8382 * tree.c (walk_tree): Handle VECTOR_TYPE.
8383
8384 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
8385
8386 2000-10-21 Jason Merrill <jason@redhat.com>
8387
8388 * parse.y (operator): Set got_object from got_scope.
8389 Set looking_for_typename.
8390 * decl.c (lookup_name_real): Clear val after setting from_obj.
8391 Reorganize diagnostic.
8392
8393 2000-10-20 Jason Merrill <jason@redhat.com>
8394
8395 * tree.c (walk_tree): Don't walk into default args.
8396
8397 * error.c (dump_expr): Use host_integerp.
8398
8399 2000-10-20 David Edelsohn <edelsohn@gnu.org>
8400
8401 * typeck2.c (abstract_virtuals_error): Use "because" instead of
8402 "since" in error message.
8403
8404 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8405
8406 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
8407
8408 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
8409
8410 * decl.c (revert_static_member_fn): Fixed typo.
8411
8412 2000-10-19 Mark Mitchell <mark@codesourcery.com>
8413
8414 * class.c (subobject_offset_fn): New type.
8415 (dfs_record_base_offsets): Remove.
8416 (record_base_offsets): Likewise.
8417 (dfs_search_base_offsets): Likewise.
8418 (record_subobject_offset): New function.
8419 (check_subobject_offset): Likewise.
8420 (walk_subobject_offsets): Likewise.
8421 (record_subobject_offsets): Likewise.
8422 (layout_conflict_p): Reimplement.
8423 (layout_nonempty_base_or_field): Correct handling of type
8424 conflicts during layout.
8425 (layout_empty_base): Likewise.
8426 (build_base_field): Adjust to handle new representation of empty
8427 base offset table.
8428 (build_base_fields): Likewise.
8429 (layout_virtual_bases): Likewise.
8430 (splay_tree_compare_integer_csts): New function.
8431 (layout_class_type): Use a splay_tree, rather than a varray, to
8432 represent the offsets of empty bases.
8433
8434 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
8435 * decl.c (select_decl): Don't return declarations that are
8436 DECL_ANTICIPATED.
8437
8438 2000-10-18 Mark Mitchell <mark@codesourcery.com>
8439
8440 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
8441 (fake_std_node): New macro.
8442 * decl.c (in_std): Rename to ...
8443 (in_fake_std): ... this.
8444 (flag_no_builtin): Remove.
8445 (flag_no_nonansi_builtin): Likewise.
8446 (walk_namespaces_r): Use fake_std_node.
8447 (push_namespace): Use std_identifier.
8448 (pop_namespace): Use in_fake_std.
8449 (lookup_name_real): Use fake_std_node.
8450 (init_decl_processing): When -fhonor-std, create the `std'
8451 namespace. Don't create a dummy fake_std_node in that case.
8452 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
8453 (builtin_function): Put builtins whose names don't begin
8454 with `_' in the std namespace.
8455 * decl2.c (flag_no_builtin): Remove.
8456 (flag_no_nonansi_builtin): Likewise.
8457 (set_decl_namespace): Use fake_std_node.
8458 (validate_nonmember_using_decl): Likewise.
8459 (do_using_directive): Likewise.
8460 (handle_class_head): Likewise.
8461 * dump.c (dequeue_and_dump): Likewise.
8462 * except.c (init_exception_processing): Use std_identifier.
8463 * init.c (build_member_call): Use fake_std_node.
8464 * rtti.c (init_rtti_processing): Use std_identifier.
8465
8466 2000-10-17 Mark Mitchell <mark@codesourcery.com>
8467
8468 * cp-tree.h (back_end_hook): Remove declaration.
8469 * decl2.c (back_end_hook): Remove definition.
8470
8471 * dump.c (dequeue_and_dump): Dump TREE_USED.
8472
8473 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
8474
8475 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
8476
8477 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
8478
8479 * decl.c (WINT_TYPE): Define.
8480 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
8481 c_size_type_node, signed_size_type_node and wint_type_node.
8482
8483 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
8484
8485 * decl2.c (warn_missing_format_attribute): New variable.
8486 (lang_decode_option): Decode -Wmissing-format-attribute.
8487
8488 2000-10-16 Mark Mitchell <mark@codesourcery.com>
8489
8490 * typeck.c (qualify_type): Remove.
8491 (composite_pointer_type): Fix handling of conversions to `cv void*'.
8492
8493 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8494
8495 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
8496
8497 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8498
8499 * Makefile.in (parse.c, parse.h): Create atomically.
8500
8501 2000-10-12 Mark Mitchell <mark@codesourcery.com>
8502
8503 * class.c (current_obstack): Remove.
8504 * decl.c (ggc_p): Remove.
8505 (start_decl): Don't use decl_tree_cons.
8506 (grokdeclarator): Don't use build_decl_list.
8507 (start_function): Don't use decl_tree_cons.
8508 (finish_function): Don't mess with obstacks.
8509 * decl2.c (grok_x_components): Don't use build_decl_list.
8510 * lex.c (make_call_declarator): Don't call decl_tree_cons.
8511 (implicitly_declare_fn): Don't call build_decl_list.
8512 * parse.y (frob_specs): Don't call build_decl_list or
8513 decl_tree_cons.
8514 (expr_or_declarator_intern): Don't call decl_tree_cons.
8515 (primary): Don't call build_decl_list.
8516 (fcast_or_absdcl): Likewise.
8517 (typed_declspecs): Don't call decl_tree_cons.
8518 (reserved_declspecs): Don't call build_decl_list.
8519 (declmods): Likewise.
8520 (reserved_typespecquals): Likewise.
8521 (aggr): Likewise.
8522 (new_type_id): Likewise.
8523 (cv_qualifiers): Likewise.
8524 (after_type_declarator_intern): Likewise.
8525 (notype_declarator_intern): Likewise.
8526 (absdcl_intern): Likewise.
8527 (named_parm): Likewise.
8528 * pt.c (most_specialized_class): Likewise.
8529 * repo.c (temporary_obstack): Make it a structure, not a pointer.
8530 (init_repo): Initialize it.
8531 * search.c (current_obstack): Remove.
8532 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
8533
8534 2000-10-09 Richard Henderson <rth@cygnus.com>
8535
8536 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
8537 (c++ language support bits for libgcc): Remove.
8538 (c++.clean): Remove cplib2.txt cleanup.
8539 * config-lang.in (headers, lib2funcs): Remove.
8540
8541 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
8542 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
8543 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
8544 * inc/new.h, inc/typeinfo: Remove files.
8545
8546 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
8547
8548 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
8549 defined.
8550 (init_decl_processing): Initialize intmax_type_node and
8551 uintmax_type_node.
8552
8553 2000-10-06 Richard Henderson <rth@cygnus.com>
8554
8555 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
8556 (original_result_rtx): Remove.
8557 * decl.c (save_function_data): Don't clear x_result_rtx.
8558 (mark_lang_function): Don't mark it either.
8559 * expr.c (fixup_result_decl): Remove.
8560 * semantics.c (genrtl_named_return_value): Frob the return decl
8561 before calling emit_local_var.
8562 (genrtl_finish_function): Don't call fixup_result_decl.
8563 Always emit the jump to return_label.
8564
8565 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
8566
8567 * pt.c (lookup_template_class): Set current access for enum.
8568 (tsubst_enum): Set file & line for enum decl.
8569
8570 * spew.c (yylex): Remove unused variable.
8571
8572 2000-10-05 Richard Henderson <rth@cygnus.com>
8573
8574 * semantics.c (genrtl_finish_function): Don't init or check
8575 can_reach_end; remove noreturn and return value checks.
8576
8577 2000-10-05 Tom Tromey <tromey@cygnus.com>
8578
8579 * init.c (build_java_class_ref): Use `build_static_name' with a
8580 suffix, not a prefix, to build the class object's name.
8581
8582 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
8583
8584 * cp-tree.h (access_kind): Fix comment typo.
8585 * decl2.c (grokfield): Fix diagnostic typo.
8586 * semantics.c (finish_template_type): Fix comment typo.
8587 (finish_qualified_object_call_expr): Likewise.
8588
8589 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
8590
8591 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
8592 tsubsting fails.
8593
8594 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
8595
8596 * spew.c (frob_id): New static function.
8597 (frob_opname): Use it.
8598 (yylex): Use it.
8599
8600 2000-10-01 Mark Mitchell <mark@codesourcery.com>
8601
8602 * decl.c (lang_mark_false_label_stack): Remove.
8603 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
8604
8605 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
8606
8607 * gxxint.texi: Use @email for formatting email addresses.
8608
8609 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
8610
8611 * error.c: Remove direct obstack manipulation. Replace with
8612 output_buffer-based formatting. Adjust calls to removed macros.
8613 (obstack_chunk_alloc, obstack_chunk_free): Remove.
8614 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
8615 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
8616
8617 2000-09-24 Mark Mitchell <mark@codesourcery.com>
8618
8619 * ir.texi: Move to ../c-tree.texi.
8620
8621 2000-09-20 Jason Merrill <jason@redhat.com>
8622
8623 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
8624
8625 2000-09-21 Andreas Jaeger <aj@suse.de>
8626
8627 * errfn.c: Move declaration of cp_printer and cp_printers to ...
8628 * cp-tree.h: ... here.
8629
8630 * error.c: Remove declaration of cp_printer.
8631
8632 2000-09-20 Mark Mitchell <mark@codesourcery.com>
8633
8634 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
8635
8636 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
8637
8638 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
8639 users.
8640
8641 2000-09-18 Mark Mitchell <mark@codesourcery.com>
8642
8643 * decl.c (start_function): Robustify.
8644
8645 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8646
8647 * cp-tree.h (check_function_format): Accept a `status' parameter.
8648
8649 * call.c, typeck.c: Updates calls to `check_function_format'.
8650
8651 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
8652
8653 * decl2.c (handle_class_head): Always push some scope even
8654 in the error case.
8655
8656 2000-09-16 Mark Mitchell <mark@codesourcery.com>
8657
8658 * cp-tree.h (struct cp_language_function): Remove
8659 x_scope_stmt_stack and name_declared.
8660 (current_scope_stmt_stack): Remove.
8661 (function_name_declared_p): New macro.
8662 (struct lang_decl_flags): Use c_lang_decl as a base class.
8663 (context): Remove.
8664 (struct lang_decl): Replace saved_tree with context.
8665 (DECL_FRIEND_CONTEXT): Adjust accordingly.
8666 (SET_DECL_FRIEND_CONTEXT): Likewise.
8667 (DECL_VIRTUAL_CONTEXT): Likewise.
8668 (DECL_SAVED_TREE): Remove.
8669 (C_DECLARED_LABEL_FLAG): Likewise.
8670 (cplus_expand_expr_stmt): Don't declare.
8671 (add_decl_stmt): Likewise.
8672 (add_scope_stmt): Likewise.
8673 * decl.c (mark_stmt_tree): Remove.
8674 (case_compare): Likewise.
8675 (finish_case_label): Use c_add_case_label.
8676 (init_decl_processing): Set more language-specific hooks.
8677 (build_enumerator): Fix typo in comment.
8678 (cplus_expand_expr_stmt): Remove.
8679 (mark_lang_function): Use mark_c_language_function.
8680 (lang_mark_tree): Use c_mark_lang_decl.
8681 * decl2.c: Change order of inclusion.
8682 * except.c: Likewise.
8683 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
8684 back on c_expand_expr.
8685 * friend.c: Include expr.h.
8686 * init.c: Change order of inclusion.
8687 * Makefile.in: Update dependencies.
8688 * lex.h (free_lang_decl_chain): Remove.
8689 * optimize.c (maybe_clone_body): Use function_name_declared_p.
8690 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
8691 it doesn't exist.
8692 (instantiate_decl): Use function_name_declared_p.
8693 * semantics.c (lang_expand_expr_stmt): Remove.
8694 (set_current_function_name_declared): Likewise.
8695 (current_function_name_declared): Likewise.
8696 (begin_compound_stmt): Use function_name_declared_p.
8697 (add_decl_stmt): Remove.
8698 (setup_vtbl_ptr): Use function_name_declared_p.
8699 (add_scope_stmt): Remove.
8700 (current_scope_stmt_stack): New function.
8701 (cp_expand_stmt): Don't handle SCOPE_STMTs.
8702 (expand_body): Use function_name_declared_p.
8703 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
8704 * typeck.c: Change order of includes.
8705 (convert_sequence): Remove.
8706
8707 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
8708
8709 * lex.c (reswords): Add _Complex.
8710
8711 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8712
8713 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
8714
8715 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
8716
8717 * init.c (begin_init_stmts): Don't use // comments.
8718
8719 2000-09-12 Jason Merrill <jason@redhat.com>
8720
8721 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
8722 all non-extern arrays.
8723
8724 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
8725 typenames, too. Downgrade complaint to pedwarn.
8726 (xref_tag): Warn about surprising behavior of 'friend struct T'.
8727 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
8728 'class This::Inherited'.
8729
8730 2000-09-12 Mark Mitchell <mark@codesourcery.com>
8731
8732 * decl.c (finish_case_label): Given the LABEL_DECL a
8733 DECL_CONTEXT.
8734
8735 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
8736
8737 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
8738 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
8739 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
8740 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
8741 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
8742 New macros.
8743 (sorry_for_unsupported_tree, print_scope_operator,
8744 print_left_paren, print_right_paren, print_left_bracket,
8745 print_right_bracket, print_whitespace): Likewise.
8746 (aggr_variety): Rename to class_key_or_enum.
8747 (print_type): Rename to print_type_id.
8748 (print_type_specifier_seq, print_simple_type_specifier,
8749 print_elaborated_type_specifier,
8750 print_rest_of_abstract_declarator,
8751 print_parameter_declaration_clause, print_exception_specification,
8752 print_nested_name_specifier, print_template_id,
8753 typedef_original_name, print_template_argument_list_start,
8754 print_template_argument_list_end): New functions.
8755
8756 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
8757
8758 * ir.texi: Add more documentation.
8759
8760 2000-09-11 Mark Mitchell <mark@codesourcery.com>
8761
8762 * cp-tree.h (struct saved_scope): Remove x_function_parms.
8763 (current_function_parms): Don't define.
8764 (struct cp_language_function): Remove parms_stored.
8765 (current_function_just_assigned_this): Don't define.
8766 (current_function_parms_stored): Likewise.
8767 (static_ctors): Declare.
8768 (static_dtors): Likewise.
8769 (SF_EXPAND): Don't define.
8770 (expand_start_early_try_stmts): Remove declaration.
8771 (store_parm_decls): Likewise.
8772 * decl.c (static_ctors): Don't declare.
8773 (static_dtors): Likewise.
8774 (struct binding_level): Remove this_block.
8775 (poplevel): Remove dead code.
8776 (set_block): Likewise.
8777 (mark_binding_level): Don't mark this_block.
8778 (mark_saved_scope): Don't mark x_function_parms.
8779 (init_decl_processing): Don't add current_function_parms as a GC
8780 root.
8781 (check_function_type): Change prototype.
8782 (start_function): Remove RTL-generation code.
8783 (expand_start_early_try_stmts): Remove.
8784 (store_parm_decls): Give it internal linkage. Remove
8785 RTL-generation code.
8786 (finish_function): Remove RTL-generation code.
8787 * decl2.c (static_ctors): Fix formatting.
8788 (static_dtors): Likewise.
8789 * method.c (use_thunk): Don't call store_parm_decls.
8790 (synthesize_method): Likewise.
8791 * optimize.c (maybe_clone_body): Likewise.
8792 * parse.y (fn.def2): Likewise.
8793 (.set_base_init): Likewise.
8794 (nodecls): Likewise.
8795 * pt.c (instantiate_decl): Likewise.
8796 * rtti.c (synthesize_tinfo_fn): Likewise.
8797 * semantics.c (genrtl_try_block): Simplify.
8798 (expand_body): Use genrtl_start_function and
8799 genrtl_finish_function.
8800 (genrtl_start_function): New function.
8801 (genrtl_finish_function): Likewise.
8802
8803 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
8804
8805 * error.c (cp_tree_printer, case 'P'): Append break.
8806
8807 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
8808
8809 * cp-tree.h (frob_opname): Declare.
8810 * parse.y (saved_scopes): New static variable.
8811 (cp_parse_init): Adjust.
8812 (do_id): If lastiddecl is NULL, do do_identifier.
8813 (operator): Save scope information.
8814 (unoperator): New reduction. Restore scope information.
8815 (operator_name): Append unoperator. Call frob_opname.
8816 * spew.c (frob_opname): Define.
8817
8818 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
8819
8820 * decl.c, rtti.c: Include defaults.h if not already included.
8821 Don't define the *_TYPE_SIZE macros.
8822
8823 2000-09-09 Mark Mitchell <mark@codesourcery.com>
8824
8825 * cp-tree.h (push_switch): Change prototype.
8826 (check_cp_case_value): Remove declaration.
8827 (decl_constant_value): Likewise.
8828 * decl.c (struct cp_switch): Add switch_stmt and cases.
8829 (case_compare): New function.
8830 (push_switch): Set switch_stmt. Initialize cases.
8831 (pop_switch): Clean up cases.
8832 (define_case_label): Rename to ...
8833 (finish_case_label): ... this. Do semantic analysis for case
8834 labels here.
8835 (start_function): Correct comment.
8836 * decl2.c (check_cp_case_value): Remove.
8837 * expr.c (do_case): Remove.
8838 * pt.c (tsubst_expr): Adjust call to finish_case_label.
8839 * semantics.c (genrtl_do_poplevel): Remove declaration.
8840 (RECHAIN_STMTS): Remove.
8841 (finish_break_stmt): Use build_break_stmt.
8842 (finish_continue_stmt): Use build_continue_stmt.
8843 (finish_switch_cond): Adjust condition here, rater than in
8844 c_expand_start_case.
8845 (finish_case_label): Remove.
8846 * typeck.c (c_expand_return): Remove.
8847 (c_expand_start_case): Likewise.
8848
8849 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
8850
8851 * ir.texi: Document type nodes.
8852
8853 2000-09-06 Mark Mitchell <mark@codesourcery.com>
8854
8855 * cp-tree.h (init_cp_semantics): Declare.
8856 (genrtl_try_block): Don't declare.
8857 (genrtl_handler): Likewise.
8858 (genrtl_catch_block): Likewise.
8859 (genrtl_ctor_stmt): Likewise.
8860 (genrtl_subobject): Likewise.
8861 (genrtl_do_poplevel): Likewise.
8862 (genrtl_named_return_value): Likewise.
8863 * lex.c (init_parse): Call init_cp_semantics.
8864 * semantics.c (genrtl_try_block): Give it internal linkage.
8865 (genrtl_handler): Likewise.
8866 (genrtl_catch_block): Likewise.
8867 (genrtl_ctor_stmt): Likewise.
8868 (genrtl_subobject): Likewise.
8869 (genrtl_do_poplevel): Likewise.
8870 (genrtl_named_return_value): Likewise.
8871 (lang_expand_stmt): Rename to ...
8872 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
8873 (init_cp_semantics): Define.
8874
8875 * decl.c (initialize_local_var): Remove RTL-generating code.
8876 * semantics.c (genrtl_try_block): Fix formatting.
8877
8878 Move statement-tree facilities from C++ to C front-end.
8879 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
8880 (void_zero_node): Remove.
8881 (stmt_tree): Likewise.
8882 (scope_chain): Adjust.
8883 (language_function): Rename to cp_language_function.
8884 (cp_function_chain): Adjust.
8885 (current_stmt_tree): Remove.
8886 (last_tree): Likewise.
8887 (last_expr_type): Likewise.
8888 (struct lang_decl): Adjust.
8889 (STMT_IS_FULL_EXPR_P): Remove.
8890 (add_tree): Remove.
8891 (begin_stmt_tree): Likewise.
8892 (finish_stmt_tree): Likewise.
8893 (walk_tree_fn): Likewise.
8894 (walk_stmt_tree): Likewise.
8895 * class.c (finish_struct): Replace use of add_tree with add_stmt.
8896 * decl.c (mark_stmt_tree): Adjust type.
8897 (init_decl_processing): Don't build void_zero_node.
8898 (initialize_local_var): Adjust usage of current_stmt_tree.
8899 (finish_enum): Use add_stmt, not add_tree.
8900 (save_function_data): Adjust use of language_function.
8901 (finish_constructor_body): Use add_stmt, not add_tree.
8902 (finish_destructor_body): Likewise.
8903 (push_cp_function_context): Adjust use of language_function.
8904 (pop_cp_function_context): Likewise.
8905 (mark_lang_function): Likewise.
8906 (mark_cp_function_context): Likewise.
8907 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
8908 (build_vec_init): Likewise.
8909 * semantics.c (SET_LAST_STMT): Remove.
8910 (RECHAIN_STMTS): Don't use it.
8911 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
8912 (current_stmt_tree): Define.
8913 (add_tree): Remove.
8914 (finish_goto_stmt): Use add_stmt, not add_tree.
8915 (finish_expr_stmt): Likewise.
8916 (begin_if_stmt): Likewise.
8917 (finish_then_clause): Likewise.
8918 (begin_while_stmt): Likewise.
8919 (begin_do_stmt): Likewise.
8920 (finish_return_stmt): Likewise.
8921 (begin_for_stmt): Likewise.
8922 (finish_break_stmt): Likewise.
8923 (finish_continue_stmt): Likewise.
8924 (begin_switch_stmt): Likewise.
8925 (finish_case_label): Likewise.
8926 (begin_try_block): Likewise.
8927 (begin_function_try_block): Likewise.
8928 (begin_handler): Likewise.
8929 (begin_catch_block): Likewise.
8930 (begin_compound_stmt): Likewise.
8931 (begin_asm_stmt): Likewise.
8932 (finish_asm_stmt): Likewise.
8933 (finish_label_stmt): Likewise.
8934 (add_decl_stmt): Likewise.
8935 (finish_subobject): Likewise.
8936 (finish_decl_cleanup): Likewise.
8937 (finish_named_return_value): Likewise.
8938 (setup_vtbl_ptr): Likewise.
8939 (add_scope_stmt): Likewise.
8940 (finish_stmt_expr): Likewise.
8941 (prune_unused_decls): Remove.
8942 (begin_stmt_tree): Likewise.
8943 (finish_stmt_tree): Likewise.
8944 (prep_stmt): Adjust use of current_stmt_tree.
8945 (lang_expand_stmt): Likewise.
8946 * tree.c (statement_code_p): Remove.
8947 (cp_statement_code_p): New function.
8948 (walk_stmt_tree): Remove.
8949 (init_tree): Set lang_statement_code_p.
8950
8951 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
8952
8953 Integrated preprocessor.
8954
8955 * Make-lang.in, Makefile.in: Remove all references to input.c,
8956 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
8957 * gxx.gperf, hash.h, input.c: Delete.
8958 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
8959 initialized properly.
8960
8961 * class.c (fixup_pending_inline): Take a tree, not a
8962 struct pending_inline *. All callers changed.
8963 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
8964 RID_PROTECTED entries in ridpointers[] array here.
8965 * decl.c (duplicate_decls): Do not refer to struct
8966 pending_inline.
8967 (record_builtin_type, init_decl_processing): Use RID_MAX not
8968 CP_RID_MAX.
8969 (grokdeclarator): Use C_IS_RESERVED_WORD.
8970 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
8971 cpplib.
8972 (grok_x_components): Do not inspect pending_inlines chain.
8973
8974 * cp-tree.h (struct lang_identifier): Add rid_code entry.
8975 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
8976 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
8977 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
8978 TIME_IDENTIFIER_FILEINFO): Kill.
8979 Update prototypes.
8980 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
8981 single 32-bit word.
8982 * parse.y: Call do_pending_inlines unconditionally.
8983 reinit_parse_for_method is now snarf_method. fn.defpen is no
8984 longer necessary. Remove unnecessary <itype> annotation on
8985 SCOPE. Do not refer to end_of_file or struct pending_inline.
8986 * semantics.c (begin_inline_definitions): Call
8987 do_pending_inlines unconditionally.
8988
8989 * lex.c: Remove all code now shared with C front end.
8990 Initialize cpplib properly if USE_CPPLIB. Put reserved words
8991 into the get_identifier table. Rewrite pragma handling to
8992 work with the registry. Move code to save tokens for later
8993 processing to spew.c.
8994
8995 * spew.c: Rewrite everything in terms of token streams instead
8996 of text. Move routines here from lex.c / input.c as
8997 appropriate. GC-mark trees hanging off the pending inlines
8998 chain.
8999
9000 2000-09-06 Mark Mitchell <mark@codesourcery.com>
9001
9002 * NEWS: Mention that the named return value extension has been
9003 deprecated.
9004 * cp-tree.h (original_result_rtx): Define.
9005 (TREE_REFERENCE_EXPR): Remove.
9006 (DECL_VPARENT): Likewise.
9007 (pushdecl_nonclass_level): Likewise.
9008 (store_return_init): Likewise.
9009 (reinit_lang_specific): Likewise.
9010 (genrtl_named_return_value): Change prototype.
9011 * decl.c (original_result_rtx): Remove.
9012 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
9013 Do not generate RTL for local variables here.
9014 (store_return_init): Remove.
9015 * semantics.c (genrtl_named_return_value): Simplify. Fold in
9016 store_return_init.
9017 (finish_named_return_value): Adjust accordingly. Warn that this
9018 extension is deprecated.
9019 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
9020
9021 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9022
9023 * pt.c (type_unification_real): Replace switch with if.
9024 (unify): Tsubst non-type parms before comparing.
9025
9026 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9027
9028 * error.c (dump_typename): New function, broken out of ...
9029 (dump_type): ... here. Use it.
9030 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
9031
9032 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9033
9034 * init.c (build_offset_ref): Deal with namespace scoped
9035 TEMPLATE_ID_EXPRs.
9036
9037 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
9038
9039 * class.c (resolve_address_of_overloaded_function): Add
9040 explanation message.
9041 * decl.c (define_case_label): Reformat explanation.
9042 * decl2.c (finish_static_data_member_decl): Likewise.
9043 (grokfield): Likewise.
9044 * friend.c (do_friend): Likewise.
9045
9046 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
9047
9048 * tree.c (walk_tree): Expose tail recursion.
9049 (walk_stmt_tree): New function.
9050 * cp-tree.h: Prototype walk_stmt_tree.
9051 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
9052 the BLOCKs directly. If a BLOCK has no variables after
9053 pruning, discard it.
9054 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
9055 restore the line number.
9056
9057 2000-09-05 Mark Mitchell <mark@codesourcery.com>
9058
9059 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
9060 (pt.o): Remove dependency on HTAB_H.
9061 * cp-tree.h: Include hashtab.h.
9062 (walk_tree): Change prototype.
9063 (walk_tree_without_duplicates): New function.
9064 * decl.c (check_default_argument): Use it.
9065 * optimize.c (remap_decl): Adjust calls to walk_tree.
9066 (copy_body): Likewise.
9067 (expand_calls_inline): Likewise.
9068 (calls_setjmp_p): Use walk_tree_without_duplicates.
9069 * pt.c: Don't include hashtab.h.
9070 (for_each_template_parm): Use walk_tree_without_duplicates.
9071 * semantics.c (finish-stmt_tree): Likewise.
9072 (expand_body): Likewise.
9073 * tree.c (walk_tree): Add additional parameter.
9074 (walk_tree_without_duplicates): New function.
9075 (count_trees): Use it.
9076 (verify_stmt_tree): Adjust call to walk_tree.
9077 (find_tree): Use walk_tree_without_duplicates.
9078 (no_linkage_check): Likewise.
9079 (break_out_target_exprs): Adjust call to walk_tree.
9080 (cp_unsave): Likewise.
9081
9082 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9083
9084 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
9085 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
9086 * cp-tree.h (TYPE_BINFO): Adjust comment.
9087 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
9088 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
9089 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9090 (TYPE_TEMPLATE_INFO): Likewise.
9091 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
9092 * class.c (push_nested_class): Likewise.
9093 * decl.c (lookup_name_real): Likewise.
9094 (grokdeclarator): Likewise.
9095 (grok_op_properties): Likewise.
9096 (xref_tag): Likewise.
9097 (xref_basetypes): Likewise.
9098 * decl2.c (constructor_name_full): Likewise.
9099 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
9100 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
9101 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
9102 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9103 (dump_type_suffix): Likewise.
9104 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
9105 instead.
9106 (get_aggr_from_typedef): Likewise.
9107 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
9108 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9109 (write_template_parm): Likewise.
9110 (write_template_template_parm): Check tree code instead of
9111 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9112 * method.c (build_overload_nested_name): Add
9113 BOUND_TEMPLATE_TEMPLATE_PARM.
9114 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
9115 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9116 * pt.c (convert_template_argument): Check tree code instead of
9117 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9118 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
9119 (for_each_template_parm): Adjust comment.
9120 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
9121 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9122 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
9123 template_args_equal to compare template template parameter cases.
9124 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9125 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
9126 instead.
9127 * tree.c (copy_template_template_parm): Decide whether to create
9128 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
9129 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
9130 (copy_tree_r): Likewise.
9131 * typeck.c (comptypes): Likewise. Check tree code instead of
9132 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
9133
9134 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
9135
9136 * decl.c (finish_function): Move the code for handling functions
9137 marked with the constructor and destructor attributes inside the
9138 expand_p block.
9139
9140 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9141
9142 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
9143
9144 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9145
9146 * pt.c (lookup_template_class): Remove abort.
9147 * tree.c (get_type_decl): Allow error_mark_node.
9148
9149 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
9150
9151 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
9152 TEMPLATE_ID_EXPRs.
9153
9154 2000-09-03 Mark Mitchell <mark@codesourcery.com>
9155
9156 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
9157 new ABI mangling.
9158
9159 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
9160
9161 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
9162 union tag mismatch error reporting.
9163
9164 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
9165
9166 * call.c (build_scoped_method_call): Check it is not a namespace.
9167
9168 2000-08-30 Jason Merrill <jason@redhat.com>
9169
9170 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
9171
9172 * tree.c (bot_manip): Check TREE_CONSTANT rather than
9173 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
9174 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
9175
9176 * decl.c (start_function): Always call make_function_rtl.
9177
9178 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
9179
9180 * semantics.c (prune_unused_decls): New function.
9181 (finish_stmt_tree): Call it via walk_tree.
9182
9183 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
9184
9185 * class.c (build_secondary_vtable): Constify a char *.
9186 * decl.c (init_decl_processing): Initialize function_id_node,
9187 pretty_function_id_node, and func_id_node.
9188 * input.c (struct input_source): Constify 'str'.
9189 (feed_input): Constify first argument.
9190 * mangle.c (write_identifier): Constify argument.
9191 * pt.c (mangle_class_name_for_template): Constify argument.
9192
9193 2000-08-29 Mark Mitchell <mark@codesourcery.com>
9194
9195 * typeck.c (mark_addressable): Remove code that pokes around in
9196 RTL.
9197
9198 2000-08-28 Jason Merrill <jason@redhat.com>
9199
9200 * lex.c (file_name_nondirectory): Move to toplev.c.
9201
9202 * cp-tree.h (LOCAL_CLASS_P): New macro.
9203 * class.c (finish_struct_1): Use it.
9204
9205 2000-08-27 Alex Samuel <samuel@codesourcery.com>
9206
9207 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
9208 (write_encoding): Pass another argument to write_name.
9209 (write_name): Add ignore_local_scope parameter. Fix handling of
9210 local names.
9211 (write_nested_name): Use write_unqualified_name.
9212 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
9213 (write_template_prefix): Use write_unqualified_name.
9214 (write_component): Remove.
9215 (write_local_name): Add parameter. Use direct local entity to
9216 discriminator calculation.
9217 (write_class_enum_type): Pass another argument to write_name.
9218 (write_template_template_arg): Likewise.
9219 (make_guard_variable): Likewise.
9220
9221 2000-08-27 Jason Merrill <jason@redhat.com>
9222
9223 * decl.c (pushdecl): Matching decls for local externs are found in
9224 the current level. Propagate linkage information from previous
9225 declarations.
9226
9227 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
9228
9229 * ir.texi (Expressions): Fix typo.
9230
9231 2000-08-25 Greg McGary <greg@mcgary.org>
9232
9233 * tree.c (init_tree): Use ARRAY_SIZE.
9234
9235 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
9236
9237 * error.c (cp_tree_printer): Rework.
9238
9239 2000-08-25 Mark Mitchell <mark@codesourcery.com>
9240
9241 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
9242 dyn-string.o.
9243 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
9244 (cp-demangle.o): Remove target.
9245 (dyn-string.o): Likewise.
9246
9247 * decl.c (grokfndecl): Require that `main' return an `int'.
9248 * mangle.c (write_encoding): Don't mangle return types for
9249 conversion functions.
9250
9251 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
9252
9253 * error.c (tree_formatting_info): New data type.
9254 (tree_being_formatted): New macro.
9255 (tree_formatting_flags): Likewise.
9256 (put_whitespace): Likewise.
9257 (print_tree_identifier): Likewise.
9258 (print_identifier): Likewise.
9259 (cp_tree_printer, print_function_argument_list, print_declaration,
9260 print_expression, print_function_declaration,
9261 print_function_parameter, print_type, print_cv_qualifier): New
9262 functions.
9263 (init_error): Initialize lang_printer.
9264
9265 2000-08-24 Jason Merrill <jason@redhat.com>
9266
9267 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
9268 adjustment necessary.
9269
9270 2000-08-24 Greg McGary <greg@mcgary.org>
9271
9272 * cp-tree.h (MAIN_NAME_P): Remove macro.
9273
9274 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
9275
9276 * error.c (print_instantiation_context): Don't forget to flush the
9277 buffer.
9278
9279 2000-08-23 Jason Merrill <jason@redhat.com>
9280
9281 * typeck.c (build_ptrmemfunc): Save the input pmf.
9282
9283 * method.c (process_modifiers): Use same_type_p.
9284
9285 2000-08-23 Mark Mitchell <mark@codesourcery.com>
9286
9287 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
9288 * mangle.c (write_function_type): Change prototype.
9289 (write_encoding): Don't mangle return types for
9290 constructors or destructors.
9291 (write_type): Adjust call to write_function_type.
9292 * pt.c (instantiate_template): Instantiate alternate entry points
9293 when instantiating the main function.
9294
9295 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
9296
9297 * error.c (cp_print_error_function): Don't use embedded '\n' in
9298 output_printf.
9299
9300 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
9301
9302 * decl.c (init_decl_processing): Remove bogus initialization.
9303 * error.c (lang_print_error_function): Restore here.
9304 (init_error): Initialize print_error_function.
9305
9306 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9307
9308 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
9309
9310 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
9311
9312 * Makefile.in (error.o): Depends on diagnostic.h
9313
9314 * cp-tree.h (problematic_instantiation_changed,
9315 record_last_problematic_instantiation, current_instantiation,
9316 print_instantiation_context): Declare.
9317 (maybe_print_template_context): Remove.
9318
9319 * decl.c (init_decl_processing): Set print_error_function to NULL.
9320 (lang_print_error_function): Remove, since we're using a new
9321 machinery.
9322
9323 * error.c: #include diagnostic.h
9324 (function_category): New function.
9325 (cp_diagnostic_starter): Likewise.
9326 (cp_diagnostic_finalizer): Likewise.
9327 (cp_print_error_function): Likewise.
9328 (maybe_print_instantiation_context): Likewise.
9329 (print_instantiation_full_context): Likewise.
9330 (print_instantiation_partial_context): Likewise.
9331 (print_instantiation_context): Define.
9332 (init_error): Initialize diagnostic pager and finalizer.
9333
9334 * pt.c (problematic_instantiation_changed): Define.
9335 (record_last_problematic_instantiation): Likewise.
9336 (current_instantiation): Likewise.
9337 (maybe_print_template_context): Remove.
9338 (print_template_context): Likewise.
9339 (current_tinst_level): Make static to reflect Brendan Kehoe's
9340 change of 1995-04-13.
9341 (push_tinst_level): Call print_instantiation_context.
9342
9343 2000-08-21 Nix <nix@esperi.demon.co.uk>
9344
9345 * lang-specs.h: Do not process -o or run the assembler if
9346 -fsyntax-only.
9347
9348 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
9349
9350 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
9351 variables.
9352 * decl2.c (lang_decode_option): Disable gettext attributes for
9353 -ansi.
9354
9355 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
9356
9357 * lex.c (lang_init_options): Default diagnostic message maximum
9358 length to 80, when line-wrapping.
9359
9360 2000-08-20 Mark Mitchell <mark@codesourcery.com>
9361
9362 * class.c (build_vtbl_initializer): Clear the entire
9363 vtbl_init_data. Start keeping track of the functions for which we
9364 have created vcall offsets here.
9365 (dfs_build_vcall_offset_vtbl_entries): Remove.
9366 (build_vcall_offset_vtbl_entries): Reimplement.
9367 (add_vcall_offset_vtbl_entries_r): New function.
9368 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
9369 computing when vcall offsets are necessary.
9370
9371 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
9372
9373 * decl.c (member_function_or_else): Use cp_error ... %T.
9374 (grokdeclarator): Likewise.
9375 (start_method): Likewise.
9376 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
9377
9378 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
9379
9380 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
9381 TYPE_DECLs.
9382
9383 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
9384
9385 * cp-tree.h (PTRMEM_OK_P): New macro.
9386 (itf_ptrmem_ok): New enumeration value.
9387 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
9388 argument. Diagnose implicit pointer to member.
9389 (instantiate_type): Don't diagnose implicit pointer to member
9390 here. Pass itf_ptrmem_ok if ok. Adjust calls to
9391 resolve_address_of_overloaded_function.
9392 * init.c (build_offset_ref): Set PTRMEM_OK_P.
9393 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
9394 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
9395 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
9396 (build_unary_op): Deal with single non-static member in
9397 microsoft-land.
9398
9399 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
9400
9401 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
9402
9403 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
9404
9405 * cp-tree.h (enum_name_string): Remove prototype.
9406 (report_case_error): Remove prototype.
9407 * cp/typeck2.c (enum_name_string): Remove.
9408 (report_case_error): Remove.
9409 * error.c (dump_expr): Deal with enum values directly.
9410 Correctly negate integer constant.
9411
9412 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
9413
9414 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
9415 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
9416 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
9417 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
9418 (__cxa_vec_new): Use __cxa_vec_new2.
9419 (__cxa_vec_delete): Use __cxa_vec_delete2.
9420
9421 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
9422
9423 * vec.cc (__cxa_vec_new): Set "C" linkage.
9424 (__cxa_vec_ctor): Likewise.
9425 (__cxa_vec_cctor): Likewise.
9426 (__cxa_vec_dtor): Likewise.
9427 (__cxa_vec_delete): Likewise.
9428 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
9429 (__cxa_vec_ctor): Likewise.
9430 (__cxa_vec_cctor): Likewise.
9431 (__cxa_vec_dtor): Likewise.
9432 (__cxa_vec_delete): Likewise.
9433
9434 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
9435
9436 * class.c (instantiate_type): Reinstate local variable
9437 deleted in previous change.
9438
9439 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
9440 itf_no_attributes.
9441
9442 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
9443
9444 * cp-tree.h (instantiate_type_flags): New enumeration.
9445 (instantiate_type): Change parameter.
9446 * class.c (instantiate_type): Adjust prototype. Adjust.
9447 * call.c (standard_conversion): Adjust instantiate_type call.
9448 (reference_binding): Likewise.
9449 (build_op_delete_call): Likewise.
9450 (convert_like_real): Likewise.
9451 * cvt.c (cp_convert_to_pointer): Likewise.
9452 (convert_to_reference): Likewise.
9453 * pt.c (convert_nontype_argument): Likewise.
9454 * typeck.c (build_binary_op): Likewise.
9455 (build_ptrmemfunc): Likewise.
9456 (convert_for_assignment): Likewise.
9457
9458 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
9459
9460 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
9461 (current_aggr): Define.
9462 * decl.c (grokdeclarator): Make sure a friend class is an
9463 elaborated type specifier.
9464 * parse.y (current_aggr): Remove static definition.
9465 (cp_parse_init): Adjust.
9466 (structsp): Clear and restore current_aggr.
9467 (component_decl_list): Clear current_aggr.
9468
9469 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
9470 aggregate tag on the typename's context.
9471
9472 * pt.c (tsubst_friend_class): Return error_mark_node, if
9473 parms becomes NULL.
9474 (instantiate_class_template): Ignore error_mark_node friend types.
9475
9476 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
9477
9478 * cvt.c (warn_ref_binding): New static function, broken out of ...
9479 (convert_to_reference): ... here. Use it.
9480
9481 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9482
9483 * parse.y (template_arg): Add rule for template qualified with
9484 global scope.
9485
9486 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9487
9488 * decl2.c (add_function): Reorganize.
9489 (arg_assoc): Do not consider function template decls.
9490
9491 2000-08-11 Jason Merrill <jason@redhat.com>
9492
9493 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
9494 looking inside.
9495
9496 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
9497
9498 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
9499 (lookup_nested_tag): Likewise.
9500
9501 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
9502 can be produced.
9503
9504 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
9505
9506 * parse.y (named_complex_class_head_sans_basetype): Remove
9507 always true if.
9508
9509 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
9510
9511 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
9512 explicit TEMPLATE_ID_EXPR args.
9513 (build_expr_from_tree, case CALL_EXPR): Likewise.
9514
9515 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
9516
9517 * decl.c (check_tag_decl): Diagnose typename's which don't
9518 declare anything.
9519
9520 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
9521
9522 * init.c (build_aggr_init): Reject bogus array initializers
9523 early.
9524
9525 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
9526
9527 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
9528 runtime.
9529 * cp/tinfo.cc (__dynamic_cast): Likewise.
9530 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
9531
9532 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
9533
9534 * cvt.c (convert_to_pointer_force): Fix error message when
9535 attempting to cast from ambiguous base.
9536
9537 2000-08-08 Jason Merrill <jason@redhat.com>
9538
9539 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
9540 (tsubst_template_arg_vector): Likewise.
9541
9542 * decl2.c (build_anon_union_vars): Choose the largest field; don't
9543 assume that one will be as large as the union.
9544
9545 2000-08-07 Kazu Hirata <kazu@hxi.com>
9546
9547 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
9548 * decl.c (pop_labels): Likewise.
9549
9550 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
9551
9552 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
9553 specifications.
9554 (__pointer_to_member_type_info): Likewise.
9555 (__base_class_info): Likewise.
9556 (__class_type_info): Likewise.
9557 (__si_class_type_info): Likewise.
9558 (__vmi_class_type_info): Likewise.
9559 * tinfo.cc (__si_class_type_info::__do_find_public_src):
9560 Changed member names to match specifications.
9561 (__vmi_class_type_info::__do_find_public_src): Likewise.
9562 (__si_class_type_info::__do_dyncast): Likewise.
9563 (__vmi_class_type_info::__do_dyncast): Likewise.
9564 (__si_class_type_info::__do_upcast): Likewise.
9565 (__vmi_class_type_info::__do_upcast): Likewise.
9566 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
9567 (__pbase_type_info::__pointer_catch): Likewise.
9568 (__pointer_type_info::__pointer_catch): Likewise.
9569 (__pointer_to_member_type_info::__pointer_catch): Likewise.
9570
9571 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
9572
9573 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
9574 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
9575 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
9576
9577 2000-08-04 Mark Mitchell <mark@codesourcery.com>
9578
9579 * cp-tree.h (add_method): Change prototype.
9580 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
9581 Don't double the size of the method vector in the error case.
9582 (handle_using_decl): Adjust call to add_method.
9583 (add_implicitly_declared_members): Likewise.
9584 (clone_function_decl): Likewise.
9585 * decl2.c (check_classfn): Likewise.
9586 * semantics.c (finish_member_declaration): Likewise.
9587
9588 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
9589
9590 * decl.c (flag_isoc94): New variable.
9591
9592 2000-08-02 Jason Merrill <jason@redhat.com>
9593
9594 * pt.c (do_type_instantiation): Add complain parm; don't complain
9595 if called recursively.
9596 * cp-tree.h, parse.y: Adjust.
9597
9598 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
9599
9600 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
9601 -Wno-strict-prototypes.
9602
9603 * g++spec.c: Adjust type of second argument to
9604 lang_specific_driver, and update code as necessary.
9605
9606 * cp-tree.h: Don't prototype min_precision here.
9607 (my_friendly_assert): Cast expression to void.
9608 * semantics.c (do_poplevel): Initialize scope_stmts.
9609
9610 2000-08-02 Mark Mitchell <mark@codesourcery.com>
9611
9612 * cp-tree.h (DECL_NEEDED_P): Tweak.
9613
9614 2000-07-28 Jason Merrill <jason@redhat.com>
9615
9616 * lang-specs.h: Use %i in rule for .ii files.
9617
9618 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
9619
9620 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
9621
9622 2000-07-30 Mark Mitchell <mark@codesourcery.com>
9623
9624 Allow indirect primary bases.
9625 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
9626 primary_base.
9627 (CLASSTYPE_VFIELD_PARENT): Remove.
9628 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
9629 (BINFO_PRIMARY_BINFO): Remove.
9630 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
9631 (BINFO_VBASE_PRIMARY_P): Likewise.
9632 (BINFO_PRIMARY_BASE_OF): New macro.
9633 (BINFO_INDIRECT_PRIMARY_P): Likewise.
9634 (get_primary_binfo): New function.
9635 * decl.c (lang_mark_tree): Make lang_type::primary_base.
9636 * class.c (vcall_offset_data_s): Rename to ...
9637 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
9638 and add ctor_vtbl_p.
9639 (get_derived_offset): Use get_primary_binfo.
9640 (dfs_mark_primary_bases): Adjust handling of virtual primary
9641 bases.
9642 (mark_primary_bases): Likewise.
9643 (set_primary_base): Take a binfo, not an integer, as a
9644 representation of the primary base.
9645 (indirect_primary_base_p): Remove.
9646 (determine_primary_base): Adjust for indirect primary bases.
9647 (dfs_find_final_overrider): Fix typo in coment.
9648 (update_vtable_entry_for_fn): Use get_primary_binfo.
9649 (layout_nonempty_base_or_field): Tweak.
9650 (build_base_fields): Adjust for new primary base semantics.
9651 (dfs_propagate_binfo_offsets): Remove.
9652 (propagate_binfo_offsets): Rewrite.
9653 (dfs_set_offset_for_shared_vbases): Remove.
9654 (layout_virtual_bases): Don't use it.
9655 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
9656 ABI.
9657 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
9658 CLASSTYPE_VFIELD_PARENT.
9659 (dfs_get_primary_binfo): New function.
9660 (get_primary_binfo): Likewise.
9661 (dump_class_hierarchy_r): Tweak printing of primary bases.
9662 (build_vtbl_initializer): Fix typo in comments. Use
9663 vtbl_init_data.
9664 (build_vcall_and_vbase_vtbl_entries): Likewise.
9665 (build_vbaes_offset_vtbl_entries): Likewise.
9666 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
9667 BV_VCALL_INDEX to handle indirect primary bases.
9668 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
9669 (build_rtti_vtbl_entries): Likewise.
9670 * search.c (get_shared_vbase_if_not_primary): Tweak.
9671 (find_vbase_instance): Likewise.
9672 (binfo_for_vtable): Simplify.
9673 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
9674 (make_binfo): Make it have 11 entries.
9675
9676 2000-07-30 Alex Samuel <samuel@codesourcery.com>
9677
9678 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
9679 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
9680 ascertaining primaryness.
9681 (G): Remove template_args.
9682 (decl_is_template_id): New function.
9683 (write_encoding): Use decl_is_template_id.
9684 (write_name): Likewise. Handle type_decls. Get main variant of
9685 type decls.
9686 (write_nested_name): Likewise.
9687 (write_prefix): Likewise.
9688 (write_template_prefix): Likewise.
9689 (write_special_name_constructor): Remove defunct production from
9690 comment.
9691 (write_bare_function_type): Remove comment about absent parameter.
9692 (write_template_template_arg): Add missing grammar production to
9693 comment.
9694
9695 2000-07-27 Jason Merrill <jason@redhat.com>
9696
9697 * decl.c (duplicate_decls): If common_type produces a non-typedef
9698 type for a typedef, just use the old type.
9699
9700 2000-07-27 Mark Mitchell <mark@codesourcery.com>
9701
9702 * cp-tree.h (function_depth): Declare.
9703 (verify_stmt_tree): Likewise.
9704 (find_tree): Likewise.
9705 * decl.c (function_depth): Give it external linkage.
9706 * optimize.c (optimize_function): Increment and decrement it.
9707 * tree.c (verify_stmt_tree_r): New function.
9708 (verify_stmt_tree): Likewise.
9709 (find_tree_r): Likewise.
9710 (find_tree): Likewise.
9711
9712 2000-07-27 Jason Merrill <jason@redhat.com>
9713
9714 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
9715 TYPE_PTRMEMFUNC_P.
9716 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
9717
9718 2000-07-26 Mark Mitchell <mark@codesourcery.com>
9719
9720 * decl.c (start_cleanup_fn): Mark the function as `inline'.
9721 * decl2.c (get_guard): Call cp_finish_decl, not
9722 rest_of_decl_compilation, for local guards.
9723 * lex.c (do_identifier): Remove unused variable.
9724
9725 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
9726
9727 * parse.y: Add missing ';'.
9728
9729 2000-07-26 Mark Mitchell <mark@codesourcery.com>
9730
9731 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
9732 of `extern "C++"'.
9733
9734 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
9735
9736 Kill strict_prototype. Backwards compatibility only for
9737 non NO_IMPLICIT_EXTERN_C systems.
9738 * cp-tree.h (flag_strict_prototype): Remove.
9739 (strict_prototype): Remove.
9740 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
9741 * decl.c (maybe_push_to_top_level): Adjust.
9742 (pop_from_top_level): Adjust.
9743 (decls_match): Only allow sloppy parm matching for ancient
9744 system headers.
9745 (init_decl_processing): Adjust.
9746 (grokdeclarator): Adjust.
9747 * decl2.c (flag_strict_prototype): Remove.
9748 (strict_prototype): Remove.
9749 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
9750 (lang_f_options): Remove "strict-prototype".
9751 (unsupported-options): Add "strict-prototype".
9752 * lex.c (do_identifier): Adjust.
9753 (do_scoped_id): Adjust.
9754 * parse.y (empty_parms): Adjust.
9755 * class.c (push_lang_context): Adjust.
9756 (pop_lang_context): Adjust.
9757 * typeck.c (comp_target_parms): Adjust.
9758
9759 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
9760
9761 * decl.c (poplevel): Deal with anonymous variables at for scope.
9762 (maybe_inject_for_scope_var): Likewise.
9763
9764 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
9765
9766 * decl.c: Remove all signal handling code, now done in toplev.c.
9767
9768 2000-07-23 Mark Mitchell <mark@codesourcery.com>
9769
9770 * decl.c (make_rtl_for_nonlocal_decl): Rework.
9771
9772 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
9773 correctly.
9774
9775 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
9776
9777 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
9778 Define my_friendly_assert and my_friendly_abort as macros
9779 which may call friendly_abort. Prototype friendly abort, not
9780 my_friendly_abort or my_friendly_assert.
9781 * decl.c (signal_catch): Report the signal caught in the error
9782 message. Call fatal directly.
9783 * typeck2.c (ack, my_friendly_assert): Delete.
9784 (my_friendly_abort): Rename to friendly_abort. Expect file,
9785 line, and function parameters. Report the abort code, then
9786 call fancy_abort. Do not mask an abort if errors have
9787 already occurred.
9788
9789 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
9790
9791 * typeck.c (comp_target_parms): Remove obsolete parameter.
9792 (comp_target_types): Adjust.
9793
9794 2000-07-17 Jason Merrill <jason@redhat.com>
9795
9796 * typeck.c (mark_addressable): Never set TREE_USED.
9797 * call.c (build_call): Don't abort on calls to library functions
9798 that have been declared normally.
9799
9800 * typeck.c (build_binary_op): Fix grammar in warning.
9801
9802 * exception.cc (__eh_free): Fix prototype.
9803
9804 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
9805
9806 * decl.c (pushdecl): Handle seeing an OVERLOAD in
9807 IDENTIFIER_NAMESPACE_VALUE.
9808
9809 2000-07-16 Mark Mitchell <mark@codesourcery.com>
9810
9811 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
9812 * method.c (use_thunk): Correct handling of vcall offsets.
9813
9814 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
9815
9816 * .cvsignore: parse.h and parse.c have no cp- prefix.
9817
9818 2000-07-13 Mark Mitchell <mark@codesourcery.com>
9819
9820 * .cvsignore: New file.
9821
9822 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
9823
9824 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
9825
9826 2000-07-12 Mark Mitchell <mark@codesourcery.com>
9827
9828 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
9829 * parse.c: Remove.
9830 * parse.h: Likewise.
9831
9832 2000-07-11 Mark Mitchell <mark@codesourcery.com>
9833
9834 * class.c (layout_class_type): Add pointers to virtual bases after
9835 base classes under the old ABI.
9836
9837 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
9838
9839 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
9840 (finish_continue_stmt): Likewise.
9841 (begin_for_stmt): Remove call to note_level_for_for.
9842 (finish_goto_stmt): Change call from build_min_nt
9843 to build_stmt.
9844 (finish_expr_stmt): Likewise.
9845 (begin_if_stmt): Likewise.
9846 (begin_while_stmt): Likewise.
9847 (finish_while_stmt): Likewise.
9848 (finish_return_stmt): Likewise.
9849 (begin_for_stmt): Likewise.
9850 (finish_for_stmt): Likewise.
9851 (finish_break_stmt): Likewise.
9852 (begin_switch_stmt): Likewise.
9853 (finish_case_label): Likewise.
9854 (genrtl_try_block): Likewise.
9855 (begin_try_block): Likewise.
9856 (begin_handler): Likewise.
9857 (begin_compound_stmt): Likewise.
9858 (finish_asm_stmt): Likewise.
9859 (finish_label_stmt): Likewise.
9860 (add_decl_stmt): Likewise.
9861 (finish_subobject): Likewise.
9862 (finish_decl_cleanup): Likewise.
9863 (finish_named_return_value): Likewise.
9864 (setup_vtbl_ptr): Likewise.
9865 (add_scope_stmt): Likewise.
9866 * decl.c (finish_constructor_body): Likewise.
9867 (finish_destructor_body): Likewise.
9868 * optimize.c (copy_body_r): Likewise.
9869 (initialize_inlined_parameters): Likewise.
9870 (declare_return_variable): Likewise.
9871 (expand_call_inline): Likewise.
9872
9873 2000-07-10 Jakub Jelinek <jakub@redhat.com>
9874
9875 * semantics.c (expand_body): Sync interface information
9876 at the end of function body expansion.
9877
9878 2000-07-09 Jason Merrill <jason@redhat.com>
9879
9880 * init.c (build_new_1): Bail early if the call to new fails.
9881
9882 * decl.c (compute_array_index_type): Check specifically for
9883 an INTEGER_CST, not just TREE_CONSTANT.
9884
9885 * decl.c (duplicate_decls): Don't call duplicate_decls on
9886 the DECL_TEMPLATE_RESULT.
9887 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
9888 codes.
9889
9890 * error.c (dump_template_bindings): Don't crash if we had an
9891 invalid argument list.
9892
9893 * typeck.c (c_expand_start_case): Do narrowing here.
9894 * semantics.c (finish_switch_cond): Not here.
9895
9896 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
9897
9898 * parse.y (asm_clobbers): Do string concatenation.
9899
9900 2000-07-09 Mark Mitchell <mark@codesourcery.com>
9901
9902 * decl.c (pushtag): Don't put local classes in template functions
9903 on the local_classes list.
9904
9905 2000-07-04 Scott Snyder <snyder@fnal.gov>
9906
9907 * decl2.c (get_guard): Add missing return for old ABI local
9908 variable case.
9909
9910 2000-07-09 Mark Mitchell <mark@codesourcery.com>
9911
9912 * cp-tree.h (char_type_p): New function.
9913 * decl.c (init_decl_processing): Don't initialize
9914 signed_wchar_type_node or unsigned_wchar_type_node.
9915 (complete_array_type): Handle brace-enclosed string-constants.
9916 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
9917 * tree.c (char_type_p): New function.
9918 * typeck2.c (digest_init): Use char_type_p.
9919
9920 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
9921
9922 * pt.c (tsubst): Don't layout type, if it's error_mark.
9923
9924 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
9925
9926 * pt.c (instantiate_pending_templates): Reset template level.
9927
9928 2000-07-05 Jason Merrill <jason@redhat.com>
9929
9930 * call.c (joust): Don't complain about `operator char *()' beating
9931 `operator const char *() const'.
9932
9933 2000-07-04 scott snyder <snyder@fnal.gov>
9934 Jason Merrill <jason@redhat.com>
9935
9936 * repo.c (repo_get_id): Handle the case where a class with virtual
9937 bases has a null TYPE_BINFO_VTABLE.
9938
9939 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
9940 Jason Merrill <jason@redhat.com>
9941
9942 * parse.y (member_init): Just pass in the type.
9943 * init.c (expand_member_init): Handle getting a type.
9944
9945 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9946 Jason Merrill <jason@redhat.com>
9947
9948 * decl.c (finish_function): Warn if a function has no return
9949 statement.
9950 Suggested by Andrew Koenig.
9951 * typeck.c (check_return_expr): Do set current_function_returns_value
9952 if we got an error_mark_node.
9953
9954 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
9955
9956 * decl2.c (push_decl_namespace): Push the original namespace.
9957
9958 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
9959
9960 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
9961 * semantics.c (begin_class_definition): Clear it.
9962
9963 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
9964
9965 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
9966 (genrtl_expr_stmt): Likewise.
9967 (genrtl_decl_stmt): Likewise.
9968 (genrtl_if_stmt): Likewise.
9969 (genrtl_while_stmt): Likewise.
9970 (genrtl_do_stmt): Likewise.
9971 (genrtl_return_stmt): Likewise.
9972 (genrtl_for_stmt): Likewise.
9973 (genrtl_break_stmt): Likewise.
9974 (genrtl_continue_stmt): Likewise.
9975 (genrtl_scope_stmt): Likewise.
9976 (genrtl_switch_stmt): Likewise.
9977 (genrtl_case_label): Likewise.
9978 (genrtl_begin_compound_stmt): Likewise.
9979 (genrtl_finish_compound_stmt): Likewise.
9980 (genrtl_compound_stmt): Likewise.
9981 (genrtl_asm_stmt): Likewise.
9982
9983 * init.c (begin_init_stmts): Remove call to
9984 genrtl_begin_compound_stmt.
9985 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
9986
9987 * semantics.c (lang_expand_stmt): Changed call to
9988 genrtl_compound_stmt to ignore return value.
9989
9990 2000-07-02 Mark Mitchell <mark@codesourcery.com>
9991
9992 * mangle.c (canonicalize_for_substitution): Return the canonical
9993 variant of a type.
9994
9995 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
9996 TYPE_DECL.
9997 * typeck.c (commonparms): Remove obstack manipulations.
9998
9999 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
10000
10001 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
10002
10003 * Makefile.in (OBJS): Added ../c-semantics.o.
10004 (OBJDEPS): Likewise.
10005
10006 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
10007 ../c-common.h.
10008 (struct stmt_tree): Added comment.
10009 (current_function_name_declared): Removed.
10010 (stmts_are_full_exprs_p): Likewise.
10011 (genrtl_do_pushlevel): Likewise.
10012 (genrtl_clear_out_block): Likewise.
10013 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
10014 (DECL_ANON_UNION_ELEMS): Likewise.
10015 (emit_local_var): Likewise.
10016 (make_rtl_for_local_static): Likewise.
10017 (do_case): Likewise.
10018 (expand_stmt): Likewise.
10019 (genrtl_decl_cleanup): Likewise.
10020 (c_expand_asm_operands): Likewise.
10021 (c_expand_return): Likewise.
10022 (c_expand_start_case): Likewise.
10023
10024 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
10025 (emit_local_var): Likewise.
10026 (initialize_local_var): Change reference to
10027 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10028 Change reference to stmts_are_full_exprs_p to
10029 current_stmt_tree->stmts_are_full_exprs_p.
10030 (push_cp_function_context): Likewise.
10031
10032 * expect.c (expand_throw): Change reference to
10033 stmts_are_full_exprs_p.
10034
10035 * init.c (build_aggr_init): Change reference to
10036 stmts_are_full_exprs_p.
10037 (build_vec_init): Likewise.
10038
10039 * optimize.c (maybe_clone_body): Change reference to
10040 current_function_name_declared to
10041 cp_function_chain->name_declared.
10042
10043 * pt.c (instantiate_decl): Change reference to
10044 current_function_name_declared to
10045 cp_function_chain->name_declared.
10046
10047 * semantics.c (expand_cond): Moved declaration to c-common.h.
10048 (genrtl_do_pushlevel): Moved to c-semantics.c.
10049 (genrtl_clear_out_block): Likewise.
10050 (genrtl_goto_stmt): Likewise.
10051 (genrtl_expr_stmt): Likewise.
10052 (genrtl_decl_stmt): Likewise.
10053 (gerntl_if_stmt): Likewise.
10054 (genrtl_while_stmt): Likewise.
10055 (genrtl_do_stmt): Likewise.
10056 (genrtl_return_stmt): Likewise.
10057 (genrtl_for_stmt): Likewise.
10058 (genrtl_break_stmt): Likewise.
10059 (genrtl_continue_stmt): Likewise.
10060 (genrtl_scope_stmt): Likewise.
10061 (genrtl_switch_stmt): Likewise.
10062 (genrtl_case_label): Likewise.
10063 (genrtl_begin_compound_stmt): Likewise.
10064 (genrtl_finish_compound_stmt): Likewise.
10065 (genrtl_compound_stmt): Likewise.
10066 (genrtl_asm_stmt): Likewise.
10067 (genrtl_decl_cleanup): Likewise.
10068 (expand_cond): Likewise.
10069 (expand_stmt): Renamed to ...
10070 (lang_expand_stmt): ... this.
10071 (lang_expand_expr_stmt): Initialize.
10072 (set_current_function_name_declared): Likewise.
10073 (stmts_are_full_exprs_p): Likewise.
10074 (current_function_name_declared): Likewise.
10075 (anon_aggr_type_p): Likewise.
10076 (do_poplevel): Change reference to
10077 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
10078 Change reference to stmts_are_full_exprs_p to
10079 current_stmt_tree->stmts_are_full_exprs_p.
10080 (add_tree): Likewise.
10081 (finish_expr_stmt): Likewise.
10082 (prep_stmt): Likewise.
10083 (lang_expand_stmt): Likewise.
10084 (begin_compound_stmt): Change reference to
10085 current_function_name_declared to
10086 cp_function_chain->name_declared and call to
10087 current_function_name_declared().
10088 (setup_vtbl_ptr): Likewise.
10089 (genrtl_do_poplevel): Removed.
10090
10091 2000-06-30 Jason Merrill <jason@redhat.com>
10092
10093 * init.c (init_init_processing): Go back to aligning like
10094 double_type_node for old ABI.
10095 (get_cookie_size): Make cookie larger if we get a type that needs
10096 more alignment.
10097 (build_vec_delete): Call it.
10098
10099 * typeck.c (qualify_type_recursive): New fn.
10100 (composite_pointer_type): Use it.
10101 (build_binary_op): Use composite_pointer_type.
10102
10103 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
10104 Jason Merrill <jason@redhat.com>
10105
10106 * typeck.c (check_return_expr): Don't complain about returning
10107 NULL from operator new if -fcheck-new.
10108 * cp-tree.h: Declare flag_check_new here.
10109 * init.c: Not here.
10110
10111 2000-06-28 Alex Samuel <samuel@codesourcery.com>
10112
10113 * mangle.c (find_substitution): Use same_type_p.
10114 (write_encoding): Don't check for substitutions.
10115
10116 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
10117
10118 * parse.y (expr_no_comma_rangle): New non-terminal.
10119 (template_parm): Use it for default parameter case.
10120 (template_arg): Use it.
10121 (expr_no_commas): Remove commented out undefined extensions.
10122 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
10123 * parse.h, parse.c: Rebuilt.
10124
10125 2000-06-30 Mark Mitchell <mark@codesourcery.com>
10126
10127 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
10128 (finish_asm_stmt): Do it here, instead.
10129
10130 * cp-tree.h (ridpointers): Don't declare.
10131 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
10132 (record_builtin_java_type): Likewise.
10133 (init_decl_processing): Likewise.
10134 * lex.c: Move inclusion of lex.h.
10135 (ridpointers): Don't define.
10136 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
10137 RID_MAX.
10138 * lex.h (enum rid): Rename to ...
10139 (enum cp_rid): ... this.
10140 (ridpointers): Don't declare.
10141 * parse.y: Move inclusion of lex.h.
10142 * parse.c: Regenerated.
10143 * spew.c: Move inclusion of lex.h.
10144
10145 * cp-tree.h (struct language_function): Remove temp_name_counter.
10146 (temp_name_counter): Remove.
10147 (get_temp_name): Change prototype.
10148 (get_guard): New function.
10149 (get_guard_cond): Likewise.
10150 (set_guard): Likewise.
10151 * cvt.c (build_up_reference): Adjust call to get_temp_name.
10152 * decl.c (expand_static_init): Use get_guard and friends to
10153 implement guard variables.
10154 * decl2.c (get_temp_name): Assume that the variables created are
10155 always static.
10156 (get_sentry): Rename to ...
10157 (get_guard): ... this. Implement new ABI guard variables.
10158 (get_guard_bits): New function.
10159 (get_guard_cond): Likewise.
10160 (set_guard): Likewise.
10161 (start_static_initialization_or_destruction): Use them.
10162 (do_static_initialization): Replace sentry with guard throughout.
10163 (do_static_destruction): Likewise.
10164 * init.c (create_temporary_var): Add comment.
10165
10166 2000-06-28 Alex Samuel <samuel@codesourcery.com>
10167
10168 * mangle.c (find_substitution): Use same_type_p.
10169 (write_encoding): Don't check for substitutions.
10170
10171 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
10172
10173 * parse.y (expr_no_comma_rangle): New non-terminal.
10174 (template_parm): Use it for default parameter case.
10175 (template_arg): Use it.
10176 (expr_no_commas): Remove commented out undefined extensions.
10177 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
10178 * parse.h, parse.c: Rebuilt.
10179
10180 2000-06-29 Mark Mitchell <mark@codesourcery.com>
10181
10182 * cp-tree.h (flag_const_strings): Remove.
10183 (warn_parentheses): Likewise.
10184 (warn_format): Likewise.
10185 (common_type): Likewise.
10186 (default_conversion): Likewise.
10187 (build_binary_op): Likewise.
10188 (cp_build_binary_op): New macro.
10189 * call.c (build_new_op): Use cp_build_binary_op instead of
10190 build_binary_op.
10191 * class.c (build_vtable_entry_ref): Likewise.
10192 * decl.c (expand_static_init): Likewise.
10193 (compute_array_index_type): Likewise.
10194 (build_enumerator): Likewise.
10195 * decl2.c (delete_sanity): Likewise.
10196 (start_static_initialization_or_destruction): Likewise.
10197 * error.c (dump_type_suffix): Likewise.
10198 * init.c (resolve_offset_ref): Likewise.
10199 (build_new): Likewise.
10200 (build_new_1): Likewise.
10201 (build_vec_delete_1): Likewise.
10202 (build_vec_init): Likewise.
10203 (build_delete): Likewise.
10204 * rtti.c (synthesize_tinfo_fn): Likewise.
10205 (synthesize_tinfo_var): Likewise.
10206 * search.c (expand_upcast_fixups): Likewise.
10207 (fixup_all_virtual_upcast_offsets): Likewise.
10208 * typeck.c (build_array_ref): Likewise.
10209 (get_member_function_from_ptrfunc): Likewise.
10210 (build_binary_op): Add parameter.
10211 (pointer_int_sum): Use cp_build_binary_op.
10212 (pointer_diff): Likewise.
10213 (build_modify_expr): Likewise.
10214 (get_delta_difference): Likewise.
10215 (build_ptrmemfunc): Likewise.
10216
10217 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
10218
10219 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
10220 * decl.c (create_implicit_typedef): Adjust.
10221 * decl2.c (build_artificial_parm): Adjust.
10222 * method.c (implicitly_declare_fn): Adjust.
10223 * pt.c (push_inline_template_parms_recursive): Adjust.
10224 (process_template_parm): Adjust.
10225 (overloaded_template_name): Adjust.
10226 * semantics.c (finish_template_template_parm): Adjust.
10227
10228 2000-06-28 Mark Mitchell <mark@codesourcery.com>
10229
10230 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
10231 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
10232 where to emit thunks.
10233 (build_vtt): Adjust call to build_vtt_inits.
10234 (build_vtt_inits): Add parameter to indicate whether or not
10235 sub-VTTs for virtual bases should be included. Adjust handling of
10236 construction vtables.
10237 (get_matching_base): New function.
10238 (dfs_build_vtt_inits): Rename to ...
10239 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
10240 construction vtables.
10241 (dfs_fixup_binfo_vtbls): Likewise.
10242 (build_ctor_vtbl_groups): Build construction vtables for virtual
10243 bases, too.
10244 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
10245 to build construction vtbls.
10246 (dfs_accumulate_vtbl_inits): Adjust handling of
10247 construction vtables.
10248
10249 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
10250 types correctly.
10251
10252 2000-06-27 Mark Mitchell <mark@codesourcery.com>
10253
10254 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
10255
10256 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
10257
10258 * search.c (hides): Remove.
10259 (is_subobject_of_p): Add most_derived parameter. Use
10260 CANONICAL_BINFO.
10261 (lookup_field_queue_p): Adjust.
10262 (lookup_field_r): Adjust.
10263
10264 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
10265
10266 * decl2.c (handle_class_head): Bash typedefs to the type's main
10267 decl.
10268
10269 2000-06-25 Mark Mitchell <mark@codesourcery.com>
10270
10271 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
10272 (begin_global_stmt_expr): ... this.
10273 (genrtl_finish_stmt_expr): Rename to ...
10274 (finish_global_stmt_expr): ... this.
10275 * init.c (begin_init_stmts): Adjust calls.
10276 (finish_init_stmts): Likewise.
10277 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
10278 (begin_global_stmt_expr): ... this.
10279 (genrtl_finish_stmt_expr): Rename to ...
10280 (finish_global_stmt_expr): ... this.
10281
10282 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10283
10284 * search.c (lookup_member): Fix typo in comment.
10285
10286 2000-06-24 Jason Merrill <jason@redhat.com>
10287
10288 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
10289 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
10290
10291 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10292
10293 * parse.y (complex_direct_notype_declarator): Support global_scope.
10294 * Makefile.in: Adjust conflict count.
10295
10296 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10297
10298 * parse.y (template_arg): Convert TEMPLATE_DECL
10299 that is a template template parameter to
10300 TEMPLATE_TEMPLATE_PARM here.
10301
10302 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10303 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
10304 (copy_template_template_parm): Adjust prototype.
10305 * decl.c (grokdeclarator): Remove dead code.
10306 * pt.c (process_template_parm): Tidy.
10307 (lookup_template_class): Construct nodes in
10308 copy_template_template_parm.
10309 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
10310 lookup_template_class. Use TYPE_TI_TEMPLATE.
10311 * tree.c (copy_template_template_parm): Add NEWARGS
10312 parameter.
10313 (mapcar): Adjust call to copy_template_template_parm.
10314 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
10315 * method.c (build_template_template_parm_names): Change error
10316 code to avoid compilation warning.
10317
10318 * gxxint.texi: Document template template parameter
10319 name mangling.
10320
10321 2000-06-21 Alex Samuel <samuel@codesourcery.com>
10322
10323 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
10324 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
10325 (cp-demangle.o): New rule.
10326 (dyn-string.o): Likewise.
10327 * inc/cxxabi.h (__cxa_demangle): New declaration.
10328
10329 2000-06-22 Mark Mitchell <mark@codesourcery.com>
10330
10331 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
10332 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
10333 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
10334 a tree, not an int.
10335 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
10336 (make_thunk): Change prototype.
10337 (emit_thunk): Rename to use_thunk.
10338 (mangle_thunk): Change prototype.
10339 * class.c (get_derived_offset): Simplify.
10340 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
10341 BV_GENERATE_THUNK_WITH_VTABLE_P.
10342 (build_primary_vtable): Simplify.
10343 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
10344 (dfs_find_base): Remove.
10345 (update_vtable_entry_for_fn): Correct bug in finding the base
10346 where a virtual function was first declared. Figure out whether
10347 or not to emit a vcall-thunk with the vtables in which it appears.
10348 Correct logic for deciding whether to use an ordinary thunk, or a
10349 vcall thunk.
10350 (finish_struct_1): Remove unnecssary code.
10351 (build_vtbl_initializer): Use ssize_int for the running counter of
10352 negative indices.
10353 (build_vtbl_initializer): Only use vcall thunks where necessary.
10354 Mark thunks as needing to be emitted with their vtables, or not.
10355 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
10356 indices. Use size_binop.
10357 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
10358 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
10359 size_binop.
10360 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
10361 (build_vtable_entry): Mark thunks as needing to be emitted with
10362 their vtables, or not.
10363 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
10364 * decl2.c (mark_vtable_entries): Use use_thunk instead of
10365 emit_thunk.
10366 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
10367 information.
10368 * error.c (dump_expr): Use BV_FN.
10369 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
10370 not an int.
10371 * method.c (make_thunk): Likewise.
10372 (emit_thunk): Rename to use_thunk. Allow callers to decide
10373 whether or not to actually emit the thunk. Adjust for changes in
10374 representation of vcall offsets.
10375 * search.c (dfs_get_pure_virtuals): Use BV_FN.
10376 * semantics.c (emit_associated_thunks): New function.
10377 (expand_body): Use it.
10378 * ir.texi: Adjust decriptions of thunks.
10379
10380 2000-06-22 Jason Merrill <jason@redhat.com>
10381
10382 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
10383 (tsubst_friend_function): Copy it here.
10384
10385 * decl.c (grok_op_properties): Fix typo.
10386
10387 * decl2.c (delete_sanity): Clarify warning, avoid failure on
10388 deleting void*.
10389
10390 * pt.c (check_explicit_specialization): Clarify error.
10391
10392 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
10393 an old OVERLOAD when we're declaring a non-function.
10394 (pushdecl, destroy_local_var): Check for error_mark_node.
10395 (warn_extern_redeclared_static): Also bail early if
10396 we're a CONST_DECL.
10397 (push_overloaded_decl): Ignore an old error_mark_node.
10398
10399 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
10400
10401 * call.c (build_x_va_arg): Check if in a template decl.
10402 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
10403
10404 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
10405
10406 * class.c (push_lang_context): TYPE_NAME gets you to the Java
10407 types DECLs.
10408 * decl.c (check_goto): Computed gotos assumed OK.
10409
10410 2000-06-20 Jason Merrill <jason@redhat.com>
10411
10412 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
10413 for which we don't need to look for instantiations.
10414
10415 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
10416
10417 * parse.y (program): Always call finish_translation_unit.
10418 * parse.c, parse.h: Rebuilt.
10419
10420 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
10421
10422 * method.c: Don't include hard-reg-set.h.
10423
10424 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
10425
10426 * rtti.c (get_base_offset): Cope when vbase field is in a base.
10427
10428 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
10429
10430 * call.c (build_conditional_expr): Use VOID_TYPE_P.
10431 * cvt.c (cp_convert_to_pointer): Likewise.
10432 (convert_to_void): Likewise.
10433 * error.c (dump_expr): Likewise.
10434 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
10435 * init.c (build_delete): Likewise.
10436 * method.c (emit_thunk): Likewise.
10437 * optmize.c (declare_return_variable): Likewise.
10438 * rtti.c (get_tinfo_decl_dynamic): Likewise.
10439 (get_typeid): Likewise.
10440 (build_dynamic_cast_1): Likewise.
10441 * typeck.c (composite_pointer_type): Likewise.
10442 (common_type): Likewise.
10443 (build_indirect_ref): Likewise.
10444 (build_binary_op): Likewise.
10445 (build_x_compound_expr): Likewise.
10446 (check_return_expr): Likewise.
10447 * typeck2.c (add_exception_specifier): Likewise.
10448
10449 * mangle.c (write_method_parms): Use direct comparison for end
10450 of parmlist.
10451
10452 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
10453
10454 * cp-tree.h (genrtl_try_block): Declare function.
10455 (genrtl_handler): Likewise.
10456 (genrtl_catch_block): Likewise.
10457 (genrtl_ctor_stmt): Likewise.
10458 (genrtl_subobject): Likewise.
10459 (genrtl_decl_cleanup): Likewise.
10460 (genrtl_do_poplevel): Likewise.
10461 (genrtl_do_pushlevel): Likewise.
10462 (genrtl_clear_out_block): Likewise.
10463 (genrtl_goto_stmt): Likewise.
10464 (genrtl_expr_stmt): Likewise.
10465 (genrtl_decl_stmt): Likewise.
10466 (genrtl_if_stmt): Likewise.
10467 (genrtl_while_stmt): Likewise.
10468 (genrtl_do_stmt): Likewise.
10469 (genrtl_return_stmt): Likewise.
10470 (genrtl_for_stmt): Likewise.
10471 (genrtl_break_stmt): Likewise.
10472 (genrtl_continue_stmt): Likewise.
10473 (genrtl_scope_stmt): Likewise.
10474 (genrtl_switch_stmt): Likewise.
10475 (genrtl_case_label): Likewise.
10476 (genrtl_begin_compound_stmt): Likewise.
10477 (genrtl_finish_compound_stmt): Likewise.
10478 (genrtl_compound_stmt): Likewise.
10479 (genrtl_asm_stmt): Likewise.
10480 (genrtl_named_return_value): Likewise.
10481 (genrtl_begin_stmt_expr): Likewise.
10482 (genrtl_finish_stmt_expr): Likewise.
10483 (finish_for_stmt): Removed first argument.
10484 (finish_switch_stmt): Likewise.
10485
10486 * semantics.c (genrtl_try_block): Define function.
10487 (genrtl_handler): Likewise.
10488 (genrtl_catch_block): Likewise.
10489 (genrtl_ctor_stmt): Likewise.
10490 (genrtl_subobject): Likewise.
10491 (genrtl_decl_cleanup): Likewise.
10492 (genrtl_do_poplevel): Likewise.
10493 (genrtl_do_pushlevel): Likewise.
10494 (genrtl_clear_out_block): Likewise.
10495 (genrtl_goto_stmt): Likewise.
10496 (genrtl_expr_stmt): Likewise.
10497 (genrtl_decl_stmt): Likewise.
10498 (genrtl_if_stmt): Likewise.
10499 (genrtl_while_stmt): Likewise.
10500 (genrtl_do_stmt): Likewise.
10501 (genrtl_return_stmt): Likewise.
10502 (genrtl_for_stmt): Likewise.
10503 (genrtl_break_stmt): Likewise.
10504 (genrtl_continue_stmt): Likewise.
10505 (genrtl_scope_stmt): Likewise.
10506 (genrtl_switch_stmt): Likewise.
10507 (genrtl_case_label): Likewise.
10508 (genrtl_begin_compound_stmt): Likewise.
10509 (genrtl_finish_compound_stmt): Likewise.
10510 (genrtl_compound_stmt): Likewise.
10511 (genrtl_asm_stmt): Likewise.
10512 (genrtl_named_return_value): Likewise.
10513 (genrtl_begin_stmt_expr): Likewise.
10514 (genrtl_finish_stmt_expr): Likewise.
10515 (finish_for_stmt): Removed first argument and generate rtl
10516 specific code.
10517 (finish_switch_stmt): Likewise.
10518 (do_poplevel): Removed generate rtl specific code.
10519 (do_pushlevel): Likewise.
10520 (add_tree): Likewise.
10521 (finish_goto_stmt): Likewise.
10522 (finish_expr_stmt): Likewise.
10523 (begin_if_stmt): Likewise.
10524 (finish_if_stmt_cond): Likewise.
10525 (finish_then_clause): Likewise.
10526 (begin_else_clause): Likewise.
10527 (finish_else_clause): Likewise.
10528 (finish_if_stmt): Likewise.
10529 (clear_out_block): Likewise.
10530 (begin_while_stmt): Likewise.
10531 (finish_while_stmt_cond): Likewise.
10532 (finish_while_stmt): Likewise.
10533 (begin_do_stmt): Likewise.
10534 (finish_do_body): Likewise.
10535 (finish_do_stmt): Likewise.
10536 (finish_return_stmt): Likewise.
10537 (begin_for_stmt): Likewise.
10538 (finish_for_init_stmt): Likewise.
10539 (finish_for_cond): Likewise.
10540 (finish_for_expr): Likewise.
10541 (finish_break_stmt): Likewise.
10542 (finish_continue_stmt): Likewise.
10543 (begin_switch_stmt): Likewise.
10544 (finish_switch_cond): Likewise.
10545 (finish_case_label): Likewise.
10546 (begin_try_block): Likewise.
10547 (begin_function_try_block): Likewise.
10548 (finish_try_block): Likewise.
10549 (finish_cleanup_try_block): Likewise.
10550 (finish_cleanup): Likewise.
10551 (finish_function_try_block): Likewise.
10552 (finish_handler_sequence): Likewise.
10553 (finish_function_handler_sequence): Likewise.
10554 (begin_handler): Likewise.
10555 (finish_handler_parms): Likewise.
10556 (begin_catch_block): Likewise.
10557 (finish_handler): Likewise.
10558 (begin_compound_stmt): Likewise.
10559 (finish_compound_stmt): Likewise.
10560 (finish_asm_stmt): Likewise.
10561 (finish_label_stmt): Likewise.
10562 (finish_label_decl): Likewise.
10563 (finish_subobject): Likewise.
10564 (finish_decl_cleanup): Likewise.
10565 (finish_named_return_value): Likewise.
10566 (begin_stmt_expr): Likewise.
10567 (finish_stmt_expr): Likewise.
10568
10569 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
10570 to call genrtl_expr_stmt when appropriate.
10571
10572 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
10573 begin_compound_expr to call genrtl_begin_stmt_expr and
10574 genrtl_begin_compound_expr when appropriate.
10575 (finish_init_stmts): Changed calls to finish_compound_expr and
10576 finish_stmt_expr to call genrtl_finish_compound_expr and
10577 genrtl_finish_stmt_expr when appropriate.
10578 (expand_default_init): Changed call to finish_expr_stmt to call
10579 genrtl_expr_stmt when appropriate.
10580 (build_vec_init): Likewise.
10581
10582 * parse.y (simple_stmt): Removed first argument from call to
10583 finish_for_stmt. Removed first argument from call to
10584 finish_switch_stmt.
10585
10586 * parse.c: Regenerated.
10587
10588 * pt.c (tsubst_expr): Removed first argument from call to
10589 finish_for_stmt. Removed first argument from call to
10590 finish_switch_stmt.
10591
10592 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
10593
10594 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
10595 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
10596
10597 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
10598 (cplus_tree_code_length[]): Likewise.
10599 (cplus_tree_code_name[]): Likewise.
10600 (init_parse): Added call to add_c_tree_codes. Changed
10601 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
10602
10603 2000-06-16 Mark Mitchell <mark@codesourcery.com>
10604
10605 * cp-tree.h (finish_mem_initializers): Declare.
10606 (count_trees): Likewise.
10607 * parse.y (base_init): Use finish_mem_initializers.
10608 * semantics.c (finish_mem_initializers): New function.
10609
10610 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
10611 the number of trees.
10612 (n_trees): Remove.
10613 (count_trees): Don't use it.
10614
10615 2000-06-15 Jason Merrill <jason@redhat.com>
10616
10617 * tree.c (count_trees): New debugging function.
10618
10619 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
10620 * init.c (build_member_call): Pull out the name of a DECL.
10621
10622 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
10623 * semantics.c (expand_body): Push to TV_INTEGRATION here.
10624 * optimize.c (optimize_function): Not here.
10625 * pt.c (instantiate_decl): Push to TV_PARSE.
10626
10627 2000-06-15 Mark Mitchell <mark@codesourcery.com>
10628
10629 * cp-tree.h (struct language_function): Remove x_base_init_list
10630 and x_member_init_list.
10631 (current_base_init_list): Remove.
10632 (current_member_init_list): Likewise.
10633 (setup_vtbl_ptr): Change prototype.
10634 (emit_base_init): Likewise.
10635 (expand_member_init): Likewise.
10636 (reinit_parse_for_function): Remove.
10637 * decl.c (save_function_data): Don't clear x_base_init_list and
10638 x_member_init_list.
10639 (mark_language_function): Don't mark them.
10640 * init.c (perform_member_init): Tweak comment.
10641 (sort_member_init): Take the list of initializers as an argument.
10642 (sort_base_init): Likewise.
10643 (emit_base_init): Likewise.
10644 (expand_member_init): Return the initializer. Don't use global
10645 variables.
10646 * lex.c (reinit_parse_for_function): Remove.
10647 * method.c (build_template_parm_names): Correct substitution.
10648 (do_build_copy_constructor): Don't use current_member_init_list
10649 and current_base_init_list.
10650 (synthesize_method): Likewise.
10651 * parse.y (base_init): Split mem-initializers into
10652 base-initializers and field-initializers.
10653 (member_init_list): Build up the list here.
10654 (member_init): Return the initializer.
10655 (fn.depfn): Don't use reinit_parse_for_function.
10656 * parse.c: Regenerated.
10657 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
10658 ERROR_MARK.
10659 (tsubst_expr): Don't use current_member_init_list
10660 and current_base_init_list.
10661 (tsubst_expr_values): Rename to ...
10662 (tsubst_initializer_list): ... this. Use convert_from_reference.
10663 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
10664 and current_base_init_list.
10665 (begin_function_definition): Don't call reinit_parse_for_function.
10666
10667 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
10668
10669 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
10670 correctly.
10671
10672 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
10673
10674 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
10675
10676 * cp-tree.h (IF_COND): Move to c-common.h.
10677 (THEN_CLAUSE): Likewise.
10678 (ELSE_CLAUSE): Likewise.
10679 (WHILE_COND): Likewise.
10680 (WHILE_BODY): Likewise.
10681 (DO_COND): Likewise.
10682 (DO_BODY): Likewise.
10683 (RETURN_EXPR): Likewise.
10684 (EXPR_STMT_EXPR): Likewise.
10685 (FOR_INIT_STMT): Likewise.
10686 (FOR_COND): Likewise.
10687 (FOR_EXPR): Likewise.
10688 (FOR_BODY): Likewise.
10689 (SWITCH_COND): Likewise.
10690 (SWITCH_BODY): Likewise.
10691 (CASE_LOW): Likewise.
10692 (CASE_HIGH): Likewise.
10693 (GOTO_DESTINATION): Likewise.
10694 (COMPOUND_BODY): Likewise.
10695 (ASM_CV_QUAL): Likewise.
10696 (ASM_STRING): Likewise.
10697 (ASM_OUTPUTS): Likewise.
10698 (ASM_INPUTS): Likewise.
10699 (ASM_CLOBBERS): Likewise.
10700 (DECL_STMT_DECL): Likewise.
10701 (STMT_EXPR_STMT): Likewise.
10702 (LABEL_STMT_LABEL): Likewise.
10703 (SCOPE_BEGIN_P): Likewise.
10704 (SCOPE_END_P): Likewise.
10705 (SCOPE_STMT_BLOCK): Likewise.
10706 (SCOPE_NULLIFIED_P): Likewise.
10707 (SCOPE_NO_CLEANUPS_P): Likewise.
10708 (SCOPE_PARTIAL_P): Likewise.
10709 (ASM_VOLATILE_P): Likewise.
10710 (STMT_LINENO): Likewise.
10711 (STMT_LINENO_FOR_FN_P): Likewise.
10712
10713 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
10714 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
10715 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
10716 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
10717 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
10718
10719 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
10720
10721 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
10722 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
10723
10724 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
10725 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
10726 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
10727
10728 2000-06-14 Mark Mitchell <mark@codesourcery.com>
10729
10730 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
10731 * class.c (dfs_find_final_overrider): Set it appropriately.
10732 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
10733 avoid unneeded secondary vptrs.
10734
10735 2000-06-13 Jakub Jelinek <jakub@redhat.com>
10736
10737 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
10738 (check_bitfield_decl, check_field_decl): Likewise.
10739 (build_vtbl_or_vbase_field, build_base_field): Likewise.
10740 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
10741 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
10742 (xfer_tag, finish_enum): Likewise.
10743 * decl2.c (finish_builtin_type): Likewise.
10744 * init.c (init_init_processing): Likewise.
10745 * pt.c (instantiate_class_template): Likewise.
10746 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
10747 * cp-tree.h (struct lang_type): Add user_align member.
10748 (CLASSTYPE_USER_ALIGN): Define.
10749
10750 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
10751
10752 * Make-lang.in (c++.install-common): Install g++-cross in
10753 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
10754 $(target_alias)-g++ and $(target_alias)-c++.
10755
10756 2000-06-12 Mark Mitchell <mark@codesourcery.com>
10757
10758 * class.c (vcall_offset_data_s): Add last_init and fns.
10759 (overrides): Rename to same_signature_p.
10760 (dfs_find_final_overrider): Adjust accordingly.
10761 (mark_overriders): Likewise.
10762 (warn_hidden): Likewise.
10763 (build_vtbl_initializer): Reorganize machinery for building things
10764 at negative offsets.
10765 (build_vcall_and_vbase_vtbl_entries): Likewise.
10766 (build_vbase_offset_vtbl_entries): Likewise.
10767 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
10768 offset entries. Do not create two entries for functions with the
10769 same signature.
10770 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
10771 (build_rtti_vtbl_entries): Reorganize machinery for building things
10772 at negative offsets.
10773
10774 * optimize.c (expand_call_inline): Don't recurse into the code
10775 used to initialize the parameters more than once.
10776
10777 2000-06-11 Mark Mitchell <mark@codesourcery.com>
10778
10779 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
10780 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
10781 (find_substitution): Only use the `Sa' substitution for
10782 std::allocator, not instantiations of it.
10783 (write_template_prefix): Move comment. Only use a TREE_LIST to
10784 represent substitutions for a member template.
10785 (write_array_type): Mangle array dimensions correctly.
10786 * optimize.c (maybe_clone_body): Copy more information from the
10787 cloned function.
10788 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
10789 on the regenerated declaration.
10790
10791 2000-06-11 Chip Salzenberg <chip@valinux.com>
10792 Mark Mitchell <mark@codesourcery.com>
10793
10794 * class.c (build_vtable): Clarify comment.
10795 (build_ctor_vtbl_group): Pass the most derived type to
10796 build_vtable.
10797
10798 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10799
10800 * decl2.c (compare_options): Don't needlessly cast away const-ness.
10801
10802 2000-06-10 Mark Mitchell <mark@codesourcery.com>
10803
10804 * decl.c (add_binding): Handle duplicate declarations of external
10805 variables.
10806
10807 2000-06-09 Chip Salzenberg <chip@valinux.com>
10808 Mark Mitchell <mark@codesourcery.com>
10809
10810 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
10811 argument.
10812 (write_signed_number): New macro.
10813 (write_unsigned_number): Likewise.
10814 (write_source_name): Use them.
10815 (write_number): Handle signed and unsigned values.
10816 (write_integer_cst): Use tree_int_cst_sgn, and use
10817 write_unsigned_number or write_signed_number as appropriate.
10818 (write_discriminator): Use write_unsigned_number or
10819 write_signed_number as appropriate.
10820 (write_template_arg_literal): Likewise.
10821 (write_array_type): Use tree_low_cst.
10822 (write_template_parm): Use write_unsigned_number or
10823 write_signed_number as appropriate.
10824 (write_substitution): Adjust call to write_number.
10825 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
10826 (write_expression): Handle non-type template arguments of
10827 reference type correctly.
10828 (mangle_thunk): Use write_signed_number.
10829
10830 2000-06-09 Chip Salzenberg <chip@valinux.com>
10831
10832 * mangle.c (find_substition): Don't mangle objects with typename
10833 substitutions (e.g. "cin" as "Si").
10834
10835 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
10836
10837 * call.c (add_candidate): Use ggc_alloc_cleared.
10838 * decl.c (lookup_label): Likewise.
10839 * lex.c (retrofit_lang_decl): Likewise.
10840
10841 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
10842
10843 * semantics.c (expand_body): Push to TV_EXPAND.
10844 * optimize.c (optimize_function): Push to TV_INTEGRATION.
10845 * decl.c (start_function): Always call announce_function.
10846
10847 * tinfo2.cc: Just declare abort.
10848
10849 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
10850
10851 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
10852 whenever @ is a symbolic name.
10853
10854 2000-06-08 Jakub Jelinek <jakub@redhat.com>
10855
10856 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
10857
10858 2000-06-07 Mark Mitchell <mark@codesourcery.com>
10859
10860 * decl.c (pushdecl): Look up functions by DECL_NAME, not
10861 DECL_ASSEMBLER_NAME.
10862
10863 2000-06-06 Mark Mitchell <mark@codesourcery.com>
10864
10865 * decl2.c (c_language): Define.
10866
10867 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
10868
10869 * lex.c (lang_init_options): Tweak.
10870
10871 * decl2.c: Remove #inclusion of diagnostic.h
10872 (lang_decode_option): Move diagnostic formatting options to
10873 toplevel.
10874
10875 * lang-options.h: Remove documentation for diagnostic options.
10876
10877 * Makefile.in (lex.o): Depends upon diagnostic.h
10878
10879 2000-06-06 Mark Mitchell <mark@codesourcery.com>
10880
10881 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
10882 the same DECL_RESULT, it's not a redefinition.
10883 * pt.c (tsubst_decl): Remove code to handle illegal
10884 specializations.
10885
10886 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
10887
10888 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
10889
10890 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
10891
10892 * search.c (maybe_suppress_debug_info): Don't check
10893 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
10894
10895 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
10896 here if extern_p.
10897
10898 Remember instantiation context in deferred instantiations.
10899 * cp-tree.h (struct tinst_level): Remove.
10900 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
10901 * pt.c (current_tinst_level): Now a tree.
10902 (print_template_context, push_tinst_level, pop_tinst_level,
10903 tinst_for_decl): Adjust.
10904 (reopen_tinst_level): New fn.
10905 (init_pt): Register current_tinst_level as a root.
10906 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
10907 of the pending templates list.
10908 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
10909 * lex.c (extract_interface_info): Adjust.
10910 * decl2.c (warn_if_unknown_interface): Adjust.
10911
10912 2000-06-05 Mark Mitchell <mark@codesourcery.com>
10913
10914 * class.c (indirect_primary_base_p): New function.
10915 (determine_primary_base): Use it.
10916
10917 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
10918
10919 Update new-abi dynamic cast algorithm.
10920 * tinfo.cc (__class_type_info::__dyncast_result): Add
10921 whole_details. Adjust constructor.
10922 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
10923 Avoid unnecessary searching.
10924 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
10925
10926 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10927
10928 * decl.c (init_decl_processing): Don't call record_component_aliases.
10929 * tree.c (build_cplus_array_type_1): Likewise.
10930
10931 2000-06-04 Mark Mitchell <mark@codesourcery.com>
10932
10933 * ir.texi: Correct typo.
10934 * mangle.c (write_expression): Handle non-type template arguments
10935 with reference type.
10936 * method.c (build_overload_value): Likewise.
10937 * pt.c (convert_nontype_argument): Explicitly represent conversion
10938 to a reference with an ADDR_EXPR.
10939 (unify): Always unify arguments in left-to-right order.
10940
10941 2000-06-03 Alex Samuel <samuel@codesourcery.com>
10942 Mark Mitchell <mark@codesourcery.com>
10943
10944 * Make-lang.in (CXX_SRCS): Add mangle.c.
10945 * Makefile.in (CXX_OBJS): Add mangle.o.
10946 (mangle.o): New rule.
10947
10948 * class.c (local_classes): New variable.
10949 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
10950 (get_vtt_name): Use mangle_vtt_name for new ABI.
10951 (init_class_processing): Initialize local_classes.
10952 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
10953 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
10954 (std_identifier): New macro.
10955 (DECL_VOLATILE_MEMFUNC_P): New macro.
10956 (DECL_NAMESPACE_STD_P): Likewise.
10957 (local_classes): Declare.
10958 (get_mostly_instantiated_function_type): Declare.
10959 (init_mangle): Declare.
10960 (mangle_decl): Likewise.
10961 (mangle_type_string): Likewise.
10962 (mangle_type): Likewise.
10963 (mangle_typeinfo_for_type): Likewise.
10964 (mangle_typeinfo_string_for_type): Likewise.
10965 (mangle_vtbl_for_type): Likewise.
10966 (mangle_vtt_for_type): Likewise.
10967 (mangle_ctor_vtbl_for_type): Likewise.
10968 (mangle_thunk): Likewise.
10969 (mangle_conv_op_name_for_type): Likewise.
10970 (mangle_guard_variable): Likewise.
10971 * decl.c (pushtag): Keep track of local classes.
10972 (initialize_predefined_identifiers): Initialize std_identifier.
10973 (init_decl_processing): Use std_identifier.
10974 (start_decl): Don't treat instantiations as specializations.
10975 (grokdeclarator): Likewise.
10976 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
10977 name for fully-instantiated templates.
10978 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
10979 destructors with the new ABI.
10980 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
10981 (grokfield): Use mangle_type for new ABI.
10982 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
10983 (get_sentry): Use mangle_guard_variable for new ABI.
10984 (start_static_initialization_or_destruction): Likewise.
10985 * expr.c (extract_aggr_init): Remove.
10986 (extract_scalar_init): Likewise.
10987 (extract_init): Remove #if 0'd code.
10988 * mangle.c: New function.
10989 * method.c (build_mangled_name): Assert not flag_new_abi.
10990 (build_static_name): Likewise.
10991 (build_decl_overload_real): Likewise.
10992 (build_typename_overload): Likewise.
10993 (build_overload_with_type): Likewise.
10994 (build_overload_name): Likewise.
10995 (get_ctor_vtbl_name): Likewise.
10996 (start_squangling): Likewise.
10997 (get_id_2): Likewise.
10998 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
10999 (init_method): Call init_mangle for new ABI.
11000 (make_thunk): Call mangle_thunk for new ABI.
11001 * operators.def: Correct new ABI manglings for the `%' operator.
11002 Add `::' operator.
11003 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
11004 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
11005 (lookup_template_class): Call mangle_decl for new ABI.
11006 (get_mostly_instantiated_function_type): New function.
11007 (set_mangled_name_for_template_decl): Use it.
11008 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
11009 the new ABI. Use mangle_conv_op_name_for_type for instantiated
11010 conversion op names.
11011 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
11012 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
11013 (tinfo_base_init): Likewise. Mangle typeinfo string name with
11014 mangle_typeinfo_string_for_type.
11015
11016 2000-06-03 Mark Mitchell <mark@codesourcery.com>
11017
11018 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
11019 (INNERMOST_TEMPLATE_ARGS): New macro.
11020 (innermost_args): Remove.
11021 (get_innermost_template_args): New function.
11022 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
11023 * error.c (dump_function_decl): Be caution when using
11024 most_general_template.
11025 * method.c (build_template_parm_names): Use
11026 INNERMOST_TEMPLATE_ARGS.
11027 * pt.c (add_to_template_args): Tidy comment
11028 (get_innermost_template_args): New function.
11029 (check_explicit_specialization): Clear DECL_INITIAL for a new
11030 specialization.
11031 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
11032 Tidy.
11033 (push_template_decl): Always register specializations of the most
11034 general template.
11035 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
11036 (coerce_template_parms): Likewise.
11037 (lookup_template_class): Likewise.
11038 (innermost_args): Remove.
11039 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
11040 (tsubst_decl): Handle tricky specializations. Use
11041 get_innermost_template_args.
11042 (instantiate_template): Simplify handling of partial
11043 instantiations.
11044 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
11045 (most_general_template): Reimplement, in a more straightforward
11046 manner.
11047 (regenerate_decl_from_template): Tweak formatting. Use
11048 TMPL_ARGS_DEPTH for clarity.
11049 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
11050
11051 * dump.c (dequeue_and_dump): Dump information about thunks.
11052
11053 2000-06-01 Richard Henderson <rth@cygnus.com>
11054
11055 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
11056
11057 2000-06-01 Richard Henderson <rth@cygnus.com>
11058
11059 * decl2.c (unsupported_options): Fix typo, make const.
11060 (lang_decode_option): Fix bsearch argument order.
11061
11062 2000-06-01 Mark Mitchell <mark@codesourcery.com>
11063
11064 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
11065 on FIELD_DECLs.
11066
11067 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11068
11069 * cp-tree.h (c_get_alias_set): Deleted.
11070 * Makefile.in (decl.o): Include ../expr.h.
11071 * decl.c (expr.h): Include.
11072 (init_decl_processing): Call record_component_aliases for arrays.
11073 (grokdeclarator): Likewise.
11074 Set TREE_ADDRESSABLE for fields that aren't bitfields.
11075 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
11076
11077 2000-05-31 Mark Mitchell <mark@codesourcery.com>
11078
11079 Remove guiding declaration support.
11080 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
11081 (flag_guiding_decls): Remove.
11082 * call.c (build_user_type_conversion_1): Remove support for
11083 guiding decls.
11084 (build_new_function_call): Likewise.
11085 (build_new_op): Likewise.
11086 (build_new_method_call): Likewise.
11087 * decl.c (start_function): Likewise.
11088 * friend.c (is_friend): Likewise.
11089 (do_friend): Likewise.
11090 * decl2.c ((flag_dump_translation_unit): Make it const.
11091 (flag_guiding_decls): Remove.
11092 (unsupported_options): New variable
11093 (compare_options): New function.
11094 (lang_decode_option): Use them.
11095
11096 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
11097
11098 * method.c (mangle_expression): Adjust test for legal expression
11099 operators.
11100
11101 * pt.c (instantiate_decl): Save and restore the local
11102 specializations list.
11103
11104 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
11105
11106 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
11107
11108 2000-05-30 Mark Mitchell <mark@codesourcery.com>
11109
11110 * call.c (add_template_candidate_real): Handle member template
11111 constructors for classes with virtual bases.
11112 (build_user_type_conversion_1): Use in_charge_arg_for_name.
11113 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
11114
11115 * ir.texi: Update thunk documentation.
11116
11117 * call.c (joust): Fix handling of overloaded builtin operators.
11118
11119 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
11120
11121 * cp-tree.h (DECL_ANTICIPATED): New macro.
11122 Document new use of DECL_LANG_FLAG_7.
11123 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
11124 in the user namespace.
11125 * lex.c (do_identifier): If the identifier's declaration has
11126 DECL_ANTICIPATED on, it has not yet been declared. But do not
11127 replace it with an ordinary implicit declaration.
11128
11129 * tinfo2.cc: Include stdlib.h.
11130
11131 2000-05-29 Mark Mitchell <mark@codesourcery.com>
11132
11133 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
11134 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
11135 CLASSTYPE_ALIGN.
11136
11137 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
11138
11139 * decl2.c (lang_decode_option): Use skip_leading_substring instead
11140 of plain strncmp.
11141
11142 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
11143
11144 * operators.def (<?): Duplicated, should have been...
11145 (>?): this. Fixed.
11146
11147 2000-05-27 Alex Samuel <samuel@codesourcery.com>
11148 Mark Mitchell <mark@codesourcery.com>
11149
11150 * cp-tree.h (ansi_opname): Make it a macro.
11151 (ansi_assopname): Likewise.
11152 (struct lang_decl_flags): Add assignment_operator_p.
11153 (struct lang_decl): Add operator_code.
11154 (DECL_VTT_PARM): Adjust.
11155 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
11156 overloaded operator.
11157 (SET_OVERLOADED_OPERATOR_CODE): New macro.
11158 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
11159 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
11160 (opname_tab): Remove.
11161 (assignop_tab): Likewise.
11162 (operator_name_info_t): New type.
11163 (operator_name_info): New variable.
11164 (assignment_operator_name_info): Likewise.
11165 (build_cp_library_fn): Remove declaration.
11166 (push_cp_library_fn): Likewise.
11167 (operator_name_string): Likewise.
11168 (build_decl_overload): Likewise.
11169 * call.c (print_z_candidates): Simplify.
11170 (build_object_call): Adjust usage of ansi_opname. Use
11171 DECL_OVERLOADED_OPERATOR_P.
11172 (op_error): Adjust operator name lookup.
11173 (build_conditional_expr): Adjust usage of ansi_opname.
11174 (build_new_op): Likewise.
11175 (build_op_delete_call): Likewise.
11176 (build_over_call): Likewise.
11177 (joust): Use DECL_OVERLOADED_OPERATOR_P.
11178 * decl.c (duplicate_decls): Copy operator_code.
11179 (init_decl_processing): Adjust parameters to push_cp_library_fn.
11180 (builtin_function): Adjust parameters to build_library_fn_1.
11181 (build_library_fn_1): Accept an overloaded operator code.
11182 (build_library_fn): Pass ERROR_MARK.
11183 (build_cp_library_fn): Accept an overloaded operator code.
11184 (push_cp_library_fn): Likewise.
11185 (grokfndecl): Tweak.
11186 (grokdeclarator): Simplify code to compute names of overloaded
11187 operators. Adjust use of ansi_opname.
11188 (ambi_op_p): Work on tree_codes, not identifiers.
11189 (unary_op_p): Likewise.
11190 (grok_op_properties): Likewise.
11191 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
11192 (lang_mark_tree): Don't try to mark the operator_code.
11193 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
11194 * error.c (dump_decl): Remove special handling for operator
11195 names.
11196 (dump_function_name): Likewise.
11197 (dump_expr): Adjust name lookup of operators.
11198 (op_to_string): Simplify.
11199 (assop_to_string): Likewise.
11200 * init.c (build_new_1): Adjust use of ansi_opname.
11201 * lex.c (opname_tab): Remove.
11202 (assignop_tab): Likewise.
11203 (ansi_opname): Likewise.
11204 (ansi_assopname): Likewise.
11205 (operator_name_string): Likewise.
11206 (reinit_lang_specific): Likewise.
11207 (operator_name_info): New variable.
11208 (assignment_operator_name_info): Likewise.
11209 (init_operators): New function.
11210 (init_parse): Use it.
11211 (do_identifier): Adjust use of ansi_opname.
11212 * method.c (mangle_expression): Don't use ansi_opname for
11213 mangling.
11214 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
11215 (build_decl_overload): Remove.
11216 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
11217 (do_build_assign_ref): Adjust use of ansi_opname.
11218 (synthesize_method): Likewise.
11219 (implicitly_declare_fn): Likewise.
11220 * operators.def: New file.
11221 * parse.y (operator): Adjust use of ansi_opname.
11222 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
11223 (set_mangled_name_for_template_decl): Don't play games with
11224 current_namespace.
11225 (special_function_p): Adjust use of ansi_opname.
11226 * typeck.c (check_return_expr): Likewise.
11227 * Make-lang.in (cc1plus): Depend on operators.def.
11228 * Makefile.in (lex.o): Likewise.
11229 (decl.o): Likewise.
11230
11231 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
11232
11233 * Make-lang.in (cplib2.ready): Eradicate.
11234
11235 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11236
11237 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
11238 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
11239 (built_min, cp_tree_equal): Likewise.
11240
11241 2000-05-26 Mark Mitchell <mark@codesourcery.com>
11242
11243 * class.c (layout_nonempty_base_or_field): Replace
11244 `record_layout_info' with `record_layout_info_s'.
11245
11246 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
11247
11248 Fix goto checking.
11249 * cp-tree.h (struct language_function): x_named_labels is now
11250 a struct named_label_list*.
11251 * decl.c (struct named_label_use_list): Renamed from...
11252 (struct named_label_list): ...this. New struct.
11253 (push_binding_level): Don't set eh_region.
11254 (note_level_for_eh): New fn.
11255 (pop_label): Take label and old value directly.
11256 (pop_labels): Adjust for new named_labels format.
11257 (lookup_label): Likewise.
11258 (poplevel): Note characteristics of a binding level containing a
11259 named label. Mess with named label lists earlier.
11260 (mark_named_label_lists): New fn.
11261 (mark_lang_function): Call it.
11262 (use_label): New fn, split out from...
11263 (make_label_decl): ...here. Don't call it.
11264 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
11265 check_previous_gotos): New fns, split out from...
11266 (define_label): ...here.
11267 (check_switch_goto): New fn.
11268 (define_case_label): Call it.
11269 (check_goto): New fn.
11270 * semantics.c (finish_goto_stmt): Call it and use_label.
11271 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
11272 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
11273
11274 2000-05-26 Mark Mitchell <mark@codesourcery.com>
11275
11276 * class.c (build_vtable_entry_ref): Correct usage of
11277 get_vtbl_decl_for_binfo.
11278
11279 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
11280 * method.c (implicitly_declare_fn): Not here.
11281
11282 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
11283
11284 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
11285 (CPTI_PTMD_DESC_TYPE): ... here.
11286 (ptmd_desc_type_node): Rename to ...
11287 (ptm_desc_type_node): ... here.
11288 * decl.c: Likewise.
11289 * rtti.c (ptmd_initializer): Rename to ...
11290 (ptm_initializer): ... here.
11291 (sythesize_tinfo_var): Adjust. Deal with pointer to member
11292 function.
11293 (create_tinfo_types): Adjust.
11294
11295 2000-05-25 Mark Mitchell <mark@codesourcery.com>
11296
11297 Finish implementation of VTTs.
11298 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
11299 CPTI_VTT_PARM_IDENTIFIER.
11300 (vtt_parm_identifier): New macro.
11301 (vtt_parm_type): Likewise.
11302 (BINFO_SUBVTT_INDEX): Likewise.
11303 (BINFO_VPTR_INDEX): Likewise.
11304 (struct lang_decl): Add vtt_parm.
11305 (DECL_VTT_PARM): New macro.
11306 (DECL_USE_VTT_PARM): Likewise.
11307 (DECL_NEEDS_VTT_PARM_P): Likewise.
11308 (get_vtt_name): Declare.
11309 (build_artificial_parm): Likewise.
11310 (fixup_all_virtual_upcast_offsets): Likewise.
11311 (expand_indirect_vtbls_init): Remove.
11312 * call.c (build_new_method_call): Pass the vtt to subobject
11313 constructors and destructors.
11314 * class.c (get_vtt_name): Give it external linkage.
11315 (build_clone): Handle the magic VTT parameters for clones.
11316 (clone_function_decl): Fix typo in comment.
11317 (build_vtt): Keep track of the indices in the VTTs where various
11318 entities are stored.
11319 (build_vtt_inits): Likewise.
11320 (dfs_build_vtt_inits): Likewise.
11321 (build_ctor_vtbl_group): Tweak type of construction vtables.
11322 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
11323 primary bases, when building construction vtables.
11324 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
11325 (initialize_predefined_identifiers): Add vtt_parm_identifier.
11326 (init_decl_processing): Initialize vtt_parm_type.
11327 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
11328 (lang_mark_tree): Make vtt_parm.
11329 * decl2.c (build_artificial_parm): New function.
11330 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
11331 (grokclassfn): Use build_artificial_parm.
11332 * init.c (initialize_vtbl_ptrs): Call
11333 fixup_all_virtual_upcast_offsets directly.
11334 (perform_member_init): Use the complete subobject destructor for
11335 member cleanups.
11336 (build_vtbl_address): New function.
11337 (expand_virtual_init): Handle VTTs.
11338 * optimize (maybe_clone_body): Likewise.
11339 * search.c (fixup_all_virtual_upcast_offsets): Give it external
11340 linkage.
11341 (expand_indirect_vtbls_init): Remove.
11342 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
11343 * tree.c (make_binfo): Make them bigger.
11344
11345 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
11346
11347 * inc/cxxabi.h (__pbase_type_info): Define, based on
11348 __pointer_type_info.
11349 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
11350 (__pointer_to_member_type_info): Likewise.
11351 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
11352 (__pointer_to_member_type_info::__is_pointer_p): Remove.
11353 (__pointer_type_info::__do_catch): Rename to ...
11354 (__pbase_type_info::__do_catch): ... here. Adjust.
11355 (__pbase_type_info::__pointer_catch): Implement.
11356 (__pointer_type_info::__pointer_catch): Adjust.
11357 (__pointer_to_member_type_info::__pointer_catch): Adjust.
11358
11359 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
11360
11361 * tinfo.h (__user_type_info::contained_virtual_p): New
11362 predicate.
11363 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
11364 shaped hierarchy.
11365 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
11366 diamond shaped hierarchy. Add early out for mixed diamond and
11367 duplicate shaped hierarchy.
11368
11369 2000-05-24 Mark Mitchell <mark@codesourcery.com>
11370
11371 * cp-tree.h (build_delete): Change prototype.
11372 (build_vec_delete): Likewise.
11373 * call.c (build_scoped_method_call): Use special_function_kind
11374 values to indicate the kind of destruction to be done.
11375 (build_method_call): Likewise.
11376 * decl.c (finish_destructor_body): Likewise.
11377 (maybe_build_cleanup_1): Likewise. Rename to ...
11378 (maybe_build_cleanup): ... this.
11379 * decl2.c (delete_sanity): Use special_function_kind
11380 values to indicate the kind of destruction to be done.
11381 (build_cleanup): Likewise.
11382 * init.c (perform_member_init): Likewise.
11383 (build_vec_delete_1): Likewise.
11384 (build_dtor_call): Simplify.
11385 (build_delete): Use special_function_kind
11386 values to indicate the kind of destruction to be done.
11387 (build_vbase_delete): Likewise.
11388 (build_vec_delete): Likewise.
11389
11390 * init.c (sort_member_init): Fix typo in error message generation
11391 code.
11392
11393 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
11394
11395 * semantics.c (begin_class_definition): make the packed
11396 attribute be sensitive to the "-fpack-struct" command line flag
11397
11398 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
11399
11400 Update new-abi upcast algorithm.
11401 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
11402 prototype and meaning of return value.
11403 (__si_class_type_info::__do_upcast): Likewise.
11404 (__vmi_class_type_info::__do_upcast): Likewise.
11405 * tinfo.cc (__class_type_info::__upcast_result): Replace
11406 whole2dst with part2dst. Adjust ctor.
11407 (__class_type_info::__do_upcast): Adjust call of worker function.
11408 (__class_type_info::__do_upcast): Adjust.
11409 (__si_class_type_info::__do_upcast): Adjust. Use parent's
11410 __do_upcast.
11411 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
11412 virtual base in diamond hierarchy bug.
11413
11414 2000-05-23 Mark Mitchell <mark@codesourcery.com>
11415
11416 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
11417 and bitfield to tinfo_fn_p.
11418 (DECL_TINFO_FN_P): Adjust.
11419 (SET_DECL_TINFO_FN_P): Likewise.
11420 (DECL_MUTABLE_P): Likewise.
11421 (DECL_C_BIT_FIELD): Likewise.
11422 (SET_DECL_C_BIT_FIELD): Likewise.
11423 (CLEAR_DECL_C_BIT_FIELD): Likewise.
11424 (DECL_UNINLINABLE): Likewise.
11425 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
11426 (handle_using_decl): Remove assertion.
11427 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
11428 to build FIELD_DECLs.
11429 (build_base_field): Likewise.
11430 (layout_class_type): Likewise.
11431 * decl.c (init_decl_processing): Likewise.
11432 (build_ptrmemfunc_type): Likewise.
11433 (grokdeclarator): Likewise.
11434 * decl2.c (grok_x_components): Likewise.
11435 * except.c (call_eh_info): Likewise.
11436 * init.c (init_init_processing): Likewise.
11437 * rtti.c (expand_class_desc): Likewise.
11438 (create_pseudo_type_info): Likewise.
11439 (get_vmi_pseudo_type_info): Likewise.
11440 (create_tinfo_types): Likewise.
11441 * ptree.c (print_lang_decl): Adjust.
11442 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
11443 before checking DECL_MUTABLE_P.
11444
11445 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
11446 parameters for template functions.
11447 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
11448 destructors as well as constructors.
11449
11450 2000-05-22 Mark Mitchell <mark@codesourcery.com>
11451
11452 * class.c (build_ctor_vtbl_group): Set inits.
11453 * optimize.c (maybe_clone_body): Set DECL_INLINE and
11454 DECL_THIS_INLINE appropriately for clones.
11455
11456 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
11457 (DECL_CONV_FN_P): Simplify.
11458 (DECL_OPERATOR): Remove.
11459 (language_to_string): Declare.
11460 * decl.c (duplicate_decls): Fix typo in comment.
11461 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
11462 (grok_op_properties): Use DECL_CONV_FN_P instead of
11463 IDENTIFIER_TYPENAME_P.
11464 * dump.c (dequeue_and_dump): Dump the language linkage of
11465 declarations.
11466 * error.c (language_to_string): Give it external linkage.
11467 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
11468 (implicitly_declare_fn): Set DECL_LANGUAGE.
11469 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
11470 IDENTIFIER_TYPENAME_P.
11471 (tsubst_decl): Likewise.
11472 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
11473 * semantics.c (finish_member_declaration): Don't mark members of
11474 classes declared in an extern "C" region as extern "C".
11475
11476 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11477
11478 * decl2.c (qualified_lookup_using_namespace): Look through
11479 namespace aliases.
11480
11481 * decl.c (push_using_decl): Return the old decl on namespace level.
11482
11483 2000-05-21 Mark Mitchell <mark@codesourcery.com>
11484
11485 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
11486 (VTT_NAME_PREFIX): New macro.
11487 (CTOR_VTBL_NAME_PREFIX): Likewise.
11488 (get_ctor_vtbl_name): New function.
11489 * class.c (get_vtable_name): Simplify.
11490 (get_vtt_name): New function.
11491 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
11492 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
11493 when a virtual base becomes primary.
11494 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
11495 VTTs.
11496 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
11497 additional parameters.
11498 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
11499 (initialize_array): New function.
11500 (build_vtt): Likewise.
11501 (build_vtt_inits): Likewise.
11502 (dfs_build_vtt_inits): Likewise.
11503 (dfs_fixup_binfo_vtbls): Likewise.
11504 (build_ctor_vtbl_group): Likewise.
11505 (initialize_vtable): Use initialize_array.
11506 (accumulate_vtbl_inits): Reimplement to handle construction
11507 vtables.
11508 (dfs_accumulate_vtbl_inits): Likewise.
11509 (bulid_vtbl_initializer): Adjust parameter name.
11510 * method.c (build_typename_overload): Remove #if 0'd code.
11511 (get_ctor_vtbl_name): New function.
11512 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
11513 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
11514
11515 * cp-tree.h (struct lang_type): Remove search_slot.
11516 (CLASSTYPE_SEARCH_SLOT): Remove.
11517 (emit_base_init): Change prototype.
11518 (initialize_vtbl_ptrs): Likewise.
11519 (expand_indirect_vtbls_init): Likewise.
11520 (clear_search_slots): Remove.
11521 * decl.c (lang_mark_tree): Don't mark search_slot.
11522 * init.c (initialize_vtbl_ptrs): Simplify.
11523 (emit_base_init): Likewise.
11524 * search.c (struct vbase_info): Document decl_ptr.
11525 (convert_pointer_to_single_level): Remove.
11526 (dfs_find_vbases): Remove.
11527 (dfs_init_base_pointers): Simplify.
11528 (dfs_clear_vbase_slots): Remove.
11529 (dfs_vtable_path_unmark): New function.
11530 (init_vbase_pointers): Simplify.
11531 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
11532 (expand_indirect_vtbls_init): Simplify. Don't call
11533 mark_all_temps_used.
11534 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
11535 initialize_vtbl_ptrs.
11536
11537 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
11538
11539 * except.c: Add static prototypes.
11540
11541 2000-05-20 H.J. Lu <hjl@gnu.org>
11542
11543 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
11544
11545 2000-05-19 Mark Mitchell <mark@codesourcery.com>
11546
11547 Don't create a separate copy of virtual bases for the
11548 CLASSTYPE_VBASECLASSES list.
11549 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
11550 (BINFO_FOR_VBASE): Remove.
11551 (CANONICAL_BINFO): Adjust.
11552 (binfo_for_vbase): New function.
11553 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
11554 instead of BINFO_FOR_VBASE.
11555 (build_vbase_pointer): Likewise.
11556 (build_secondary_vtable): Likewise.
11557 (dfs_mark_primary_bases): Likewise.
11558 (mark_primary_bases): Likewise.
11559 (layout_nonempty_base_or_field): Likewise.
11560 (dfs_set_offset_for_shared_vbases): Likewise.
11561 (dfs_set_offset_for_unshared_vbases): Likewise.
11562 (layout_virtual_bases): Likewise. Adjust for changes to the
11563 CLASSTYPE_VBASECLASSES list.
11564 (dump_class_hierarchy_r): Use binfo_for_vbase
11565 instead of BINFO_FOR_VBASE.
11566 (dump_class_hierarchy): Likewise.
11567 (finish_vtbls): Likewise.
11568 (build_vtbl_initializer): Adjust for changes to the
11569 CLASSTYPE_VBASECLASSES list.
11570 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
11571 * decl.c (finish_destructor_body): Adjust for changes to the
11572 CLASSTYPE_VBASECLASSES list.
11573 * init.c (sort_base_init): Use binfo_for_vbase.
11574 (construct_virtual_bases): Adjust for changes to the
11575 CLASSTYPE_VBASECLASSES list.
11576 (expand_member_init): Use binfo_for_vbase.
11577 (build_vbase_delete): Adjust for changes to the
11578 CLASSTYPE_VBASECLASSES list.
11579 * method.c (do_build_copy_constructor): Likewise.
11580 * rtti.c (get_base_offset): Use binfo_for_vbase.
11581 (expand_class_desc): Remove #if 0'd code.
11582 * search.c (struct vbase_info): Remove vbase_types.
11583 (get_base_distance): Use binfo_for_vbase.
11584 (lookup_field_queue_p): Use CANONICAL_BINFO.
11585 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
11586 (get_pure_virtuals): Adjust for changes to the
11587 CLASSTYPE_VBASECLASSES list.
11588 (dfs_find_vbases): Use binfo_for_vbase.
11589 (dfs_init_vbase_pointers): Likewise.
11590 (init_vbase_pointers): Don't initialize vi.vbase_types.
11591 (virtual_context): Use binfo_for_vbase.
11592 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
11593 CLASSTYPE_VBASECLASSES list.
11594 (expand_indirect_vtbls_init): Simplify.
11595 (dfs_get_vbase_types): Don't replicate virtual bases.
11596 (find_vbase_instance): Use binfo_for_vbase.
11597 (binfo_for_vbase): New function.
11598 * typeck.c (get_delta_difference): Use binfo_for_vbase.
11599
11600 2000-05-17 Mark Mitchell <mark@codesourcery.com>
11601
11602 * decl2.c (finish_anon_union): Generalize error messages to handle
11603 anonymous structures.
11604 * init.c (perform_member_init): Remove `name' parameter.
11605 (build_field_list): New function.
11606 (sort_member_init): Handle anonymous union initialization order
11607 correctly. Check for multiple initializations of the same union.
11608 (emit_base_init): Don't look up fields by name here.
11609 (expand_member_init): Record the result of name lookup for future
11610 reference.
11611 * typeck.c (build_component_ref): Fix formatting.
11612
11613 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
11614
11615 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
11616 * typeck.c (build_x_compound_expr): Replace warn_unused with
11617 warn_unused_value.
11618
11619 * decl2.c (lang_decode_option): Update -Wall unused flags by
11620 calling set_Wunused.
11621
11622 2000-05-16 Mark Mitchell <mark@codesourcery.com>
11623
11624 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
11625 * init.c (dfs_vtable_path_unmark): Remove.
11626 * search.c (marked_new_vtable_p): Likewise.
11627 (unmarked_new_vtable_p): Likewise.
11628 (dfs_search_slot_nonempty_p): Likewise.
11629 (dfs_mark): Likewise.
11630 (dfs_vtable_path_unmark): Likewise.
11631 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
11632 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
11633 (dfs_init_vbase_pointers): Remove special-case new ABI code.
11634 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
11635 (init_vbase_pointers): Simplify.
11636 (expand_indirect_vtbls_init): Likewise.
11637
11638 * class.c (copy_virtuals): New function.
11639 (build_primary_table): Use it.
11640 (build_secondary_vtable): Likewise.
11641 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
11642 indicate that no vcall offset is required.
11643 (add_virtual_function): Likewise.
11644 (modify_all_vtables): Likewise.
11645 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
11646 (dfs_accumulate_vtbl_inits): Likewise.
11647 (build_vtbl_initializer): Make changes to handle construction
11648 vtables.
11649 (dfs_build_vcall_offset_vtbl_entries): Likewise.
11650 (build_rtti_vtbl_entries): Likewise.
11651 (build_vtable_entries): Handle a NULL vcall_index.
11652
11653 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
11654
11655 * decl2.c (lang_decode_option): Fix thinko.
11656
11657 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
11658
11659 * except.c (check_handlers): New fn.
11660 * cp-tree.h: Declare it.
11661 * semantics.c (finish_handler_sequence): Call it.
11662 (finish_function_handler_sequence): Likewise.
11663 (finish_handler_parms): Set TREE_TYPE on the handler.
11664 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
11665 * search.c (get_base_distance_recursive): If protect>1, ignore
11666 special access.
11667 (get_base_distance): Don't reduce watch_access.
11668
11669 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
11670
11671 * lex.c: #include diagnostic.h.
11672 (lang_init_options): Set default prefixing rules.
11673
11674 * lang-options.h: Add -fdiagnostics-show-location=.
11675
11676 * decl2.c: #include diagnostic.h.
11677 (lang_decode_option): Handle -fdiagnostics-show-location=.
11678
11679 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
11680
11681 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
11682 * vec.cc: Revert my 2000-05-07 change.
11683
11684 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
11685
11686 * class.c (check_field_decls): Complain about non-static data
11687 members with same name as class in class with constructor.
11688
11689 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
11690
11691 * decl.c (grokdeclarator): Allow non-static data members with
11692 same name as class.
11693
11694 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
11695
11696 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
11697 and pending_inline.filename. Update prototypes.
11698 * decl.c (define_label): Constify filename parameter.
11699 * decl2.c (warn_if_unknown_interface): Constify local char *.
11700 * input.c Constify input_source.filename. Don't declare
11701 input_filename or lineno. Constify filename parameter to feed_input.
11702 * lex.c (init_parse): Constify parameter and return value.
11703 (cp_pragma_interface, cp_pragma_implementation): Constify
11704 filename argument.
11705 (reinit_parse_for_method, reinit_parse_for_block,
11706 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
11707 Constify local char *.
11708 * pt.c: Don't declare lineno or input_filename.
11709 (print_template_context, tsubst_friend_function, tsubst_decl,
11710 tsubst, instantiate_decl): Constify local char *.
11711 * semantics.c (expand_body): Constify local char *.
11712 * tree.c (build_srcloc): Constify filename parameter.
11713 * typeck.c (c_expand_asm_operands): Constify filename
11714 parameter.
11715
11716 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
11717
11718 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
11719 offsetof expansion.
11720
11721 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
11722
11723 * inc/cxxabi.h: Fix typos in comment.
11724 (__base_class_info::__offset): Use a static_cast.
11725
11726 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
11727
11728 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
11729 of std::size_t and std::ptrdiff_t respectively.
11730 * tinfo.cc: Likewise.
11731 * vec.cc: Likewise.
11732
11733 2000-05-06 Richard Henderson <rth@cygnus.com>
11734
11735 * typeck.c (build_c_cast): Don't warn integer->pointer size
11736 mismatch for constants.
11737
11738 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
11739
11740 * rtti.c (ptmd_initializer): Set non-public, if class is
11741 incomplete.
11742
11743 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
11744 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
11745 __cxa_vec_delete): Likewise.
11746 * tinfo.cc (__dynamic_cast): Likewise.
11747 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
11748 __cxa_vec_delete): Likewise.
11749
11750 2000-05-04 Mark Mitchell <mark@codesourcery.com>
11751
11752 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
11753 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
11754 (lang_decl_flags): Add vcall_offset.
11755 (THUNK_VCALL_OFFSET): Use it.
11756 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
11757 * method.c (make_thunk): Create the lang_decl here, not in
11758 emit_thunk.
11759 (emit_thunk): Make generic thunks into ordinary functions once
11760 they have been fed to expand_body.
11761 * semantics.c (expand_body): Set current_function_is_thunk here.
11762
11763 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11764
11765 * class.c (update_vtable_entry_for_fn): Prototype.
11766
11767 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
11768 and `tmpl'.
11769
11770 * search.c (dfs_build_inheritance_graph_order): Prototype.
11771
11772 2000-05-04 Mark Mitchell <mark@codesourcery.com>
11773
11774 * cp-tree.h (special_function_kind): Add various kinds of
11775 destructors.
11776 (special_function_p): New function.
11777 * class.c (overrides): Don't let one kind of destructor override
11778 another.
11779 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
11780 whether or not to instantiate a template.
11781 * tree.c (special_function_p): Define.
11782
11783 2000-05-03 Mark Mitchell <mark@codesourcery.com>
11784
11785 * cp-tree.def (THUNK_DECL): Remove.
11786 * cp-tree.h (DECL_THUNK_P): New macro.
11787 (DECL_NON_THUNK_FUNCTION_P): Likewise.
11788 (DECL_EXTERN_C_FUNCTION_P): Likewise.
11789 (SET_DECL_THUNK_P): Likewise.
11790 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
11791 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
11792 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
11793 * decl.c (decls_match): Use DECL_EXTERN_C_P.
11794 (duplicate_decls): Likewise.
11795 (pushdecl): Likewise. Adjust thunk handling.
11796 (grokfndecl): Use DECL_EXTERN_C_P.
11797 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
11798 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
11799 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
11800 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
11801 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
11802 DECL_NO_STATIC_CHAIN.
11803 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
11804 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
11805 * search.c (covariant_return_p): Remove THUNK_DECL handling.
11806 * ir.texi: Update.
11807
11808 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
11809
11810 * tree.c (walk_tree): Set lineno.
11811
11812 2000-05-01 Mark Mitchell <mark@codesourcery.com>
11813
11814 * exception.cc: Update license notice.
11815 * new.cc: Likewise.
11816 * new1.cc: Likewise.
11817 * new2.cc: Likewise.
11818 * tinfo.cc: Likewise.
11819 * tinfo2.cc: Likewise.
11820 * vec.cc: Likewise.
11821 * inc/cxxabi.h: Likewise.
11822 * inc/exception: Likewise.
11823 * inc/new: Likewise.
11824 * inc/new.h: Likewise.
11825 * inc/typeinfo: Likewise.
11826
11827 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
11828
11829 * tree.c (build_target_expr_with_type): If we already have a
11830 TARGET_EXPR, just return it.
11831
11832 * optimize.c (initialize_inlined_parameters): Don't generate an
11833 EXPR_STMT if we can just use DECL_INITIAL.
11834 * decl.c (emit_local_var): Only make the initialization a
11835 full-expression if stmts_are_full_exprs_p.
11836
11837 2000-05-01 Mark Mitchell <mark@codesourcery.com>
11838
11839 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
11840 macro.
11841 * call.c (standard_conversion): Use it.
11842 (direct_reference_binding): Likewise.
11843 (build_over_call): Likewise.
11844 (is_properly_derived_from): Likewise.
11845 (compare_ics): Likewise.
11846 * class.c (resolves_to_fixed_type_p): Likewise.
11847 * optimize.c (declare_return_variable): Likewise.
11848 * pt.c (is_specialization_of): Likewise.
11849 (unify): Likewise.
11850 * typeck.c (comp_target_parms): Likeiwse.
11851 (build_static_cast): Likewise.
11852 (build_reinterpret_cast): Likewise.
11853 (build_const_cast): Likewise.
11854 (comp_ptr_ttypes_real): Likewise.
11855 (comp_ptr_ttypes_const): Likewise.
11856 * typeck2.c (process_init_constructor): Likewise.
11857
11858 2000-04-30 Scott Snyder <snyder@fnal.gov>
11859
11860 * decl.c (finish_destructor_body): Use the base destructor when
11861 destroying virtual bases.
11862
11863 2000-04-30 Mark Mitchell <mark@codesourcery.com>
11864
11865 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
11866 STMT_EXPRs.
11867 * optimize.c (struct inline_data): Add target_exprs field.
11868 (declare_return_variable): When a function returns an aggregate,
11869 use the variable declared in the TARGET_EXPR as the remapped
11870 DECL_RESULT.
11871 (expand_call_inline): Update the pending target_exprs stack.
11872 (optimize_function): Initialize the stack.
11873
11874 * decl2.c (finish_file): Fix typo in comment.
11875
11876 * method.c (emit_thunk): Don't try to return a `void' value.
11877
11878 * optimize.c (initialize_inlined_parameters): If the parameter is
11879 addressable, we need to make a new VAR_DECL, even if the
11880 initializer is constant.
11881
11882 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
11883
11884 * decl.c (grok_op_properties): Add an extra check of argtypes.
11885
11886 2000-04-27 Mark Mitchell <mark@codesourcery.com>
11887
11888 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
11889 variables.
11890 (initialize_inlined_parameters): Try to avoid creating new
11891 VAR_DECLs.
11892
11893 2000-04-27 Alex Samuel <samuel@codesourcery.com>
11894
11895 * lex.c (my_get_run_time): Remove.
11896 (init_filename_times): Use get_run_time instead of my_get_run_time.
11897 (check_newline): Likewise.
11898 (dump_time_statistics): Likewise.
11899 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
11900 of computing elapsed time explicitly.
11901
11902 2000-04-26 Mark Mitchell <mark@codesourcery.com>
11903
11904 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
11905 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
11906 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
11907 before calling decl_constant_value.
11908 * class.c (check_bitfield_decl): Likewise.
11909 * cvt.c (ocp_convert): Likewise.
11910 (convert): Likewise.
11911 * decl.c (compute_array_index_type): Likewise.
11912 (build_enumerator): Likewise.
11913 * decl2.c (check_cp_case_value): Likewise.
11914 * pt.c (convert_nontype_argument): Likewise.
11915 (tsubst): Likewise.
11916 * typeck.c (decay_conversion): Likewise.
11917 (build_compound_expr): Likewise.
11918 (build_reinterpret_cast): Likewise.
11919 (build_c_cast): Likewise.
11920 (convert_for_assignment): Likewise.
11921
11922 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
11923
11924 * decl.c (finish_function): Don't play games with DECL_INLINE.
11925
11926 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
11927
11928 * ir.texi: Correct typo.
11929
11930 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11931
11932 * decl.c (grokdeclarator): Reject VLAs as members.
11933
11934 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
11935
11936 * call.c (standard_conversion): Accept conversion between
11937 COMPLEX_TYPEs.
11938
11939 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
11940
11941 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
11942
11943 * decl2.c (finish_file): Remove double setup for accounting
11944 compile time.
11945
11946 2000-04-24 Robert Lipe <robertlipe@usa.net>
11947
11948 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
11949
11950 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
11951
11952 * new.cc (set_new_handler): Needs to be in std::.
11953
11954 2000-04-23 Mark Mitchell <mark@codesourcery.com>
11955
11956 * cp-tree.h (lang_decl): Remove pretty_function_p.
11957 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
11958 language-specific node.
11959 * decl.c (cp_make_fname_decl): Use build_decl, not
11960 build_lang_decl, to build the variables.
11961 (grokvardecl): Don't call build_lang_decl for local variables in
11962 templates.
11963 (grokdeclarator): Don't call build_lang_decl for local type
11964 declarations in templates.
11965 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
11966 zero'd memory, rather than calling memset.
11967 * pt.c: Include hashtab.h.
11968 (local_specializations): New variable.
11969 (retrieve_local_specialization): Use it.
11970 (register_local_specialization): Likewise.
11971 (tsubst_decl): Don't assume local variables have
11972 DECL_LANG_SPECIFIC.
11973 (instantiate_decl): Set up local_specializations.
11974 * Makefile.in (HTAB_H): New variable.
11975
11976 2000-04-23 Richard Henderson <rth@cygnus.com>
11977
11978 * typeck.c (c_expand_asm_operands): Restore the original
11979 contents of the output list.
11980
11981 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
11982
11983 * ir.texi: Document complex number representation.
11984
11985 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
11986
11987 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
11988 (target_incomplete_p): New function.
11989 (tinfo_base_init): Create comdat NTBS name variable.
11990 (ptr_initializer): Add non_public parameter. Calculate it.
11991 (ptmd_initializer): Likewise.
11992 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
11993 (create_real_tinfo_var): Add non_public parameter. Use it.
11994 Push proxy into global namespace.
11995 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
11996 New enumeration.
11997 * inc/typeinfo (type_info::before, type_info::operator==):
11998 Compare __name addresses.
11999
12000 * tinfo2.cc: Remove new-abi builtins comment.
12001
12002 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
12003
12004 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
12005
12006 * call.c (joust): Exit early if we get the same function, too.
12007
12008 * decl2.c (key_method): Return NULL_TREE for template classes.
12009 (import_export_class): Don't need to check for template classes.
12010
12011 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
12012
12013 * lex.c: Remove references to cccp.c.
12014
12015 2000-04-18 Mark Mitchell <mark@codesourcery.com>
12016
12017 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
12018 volatile_memfunc. Add destructor_attr. Adjust dummy.
12019 (DECL_DESTRUCTOR_P): Use destructor_attr.
12020 (DECL_CONST_MEMFUNC_P): Reimplement.
12021 (DECL_VOLATILE_MEMFUNC_P): Remove.
12022 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
12023 (overrides): Use DECL_DESTRUCTOR_P.
12024 (check_for_override): Likewise.
12025 * decl.c (start_function): Likewise.
12026 * decl2.c (grokfclassfn): Likewise.
12027 (check_classfn): Likewise.
12028 (grok_function_init): Likewise.
12029
12030 2000-04-17 Mark Mitchell <mark@codesourcery.com>
12031
12032 * decl2.c (grokfield): Issue error on illegal data member
12033 declaration.
12034
12035 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
12036
12037 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
12038
12039 2000-04-16 Mark Mitchell <mark@codesourcery.com>
12040
12041 * class.c (build_vtable_entry): Don't build thunks for type-info
12042 functions.
12043
12044 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
12045
12046 * decl.c (decls_match): Allow a redeclaration of a builtin to
12047 specify args while the builtin did not.
12048
12049 2000-04-15 Mark Mitchell <mark@codesourcery.com>
12050
12051 * cp-tree.def (THUNK_DECL): Add to documentation.
12052 * cp-tree.h (flag_huge_objects): Declare.
12053 * class.c (modify_vtable_entry): Tidy.
12054 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
12055 Calculate delta appropriately for the new ABI.
12056 (dfs_modify_vtables): Use it.
12057 (modify_all_vtables): Fix thinko in code to add overriding copies
12058 of functions to primary vtables.
12059 (build_clone): Fix typo in comment.
12060 (clone_function_decl): Correct order of destructors in vtable.
12061 (build_vbase_offset_vtbl_entries): Adjust comment.
12062 (dfs_vcall_offset_queue_p): Remove.
12063 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
12064 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
12065 (build_vtable_entry): Correct check for pure virtual functions.
12066 Don't declare flag_huge_objects.
12067 * decl.c (flag_huge_objects): Remove declaration.
12068 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
12069 Use int_size_in_bytes.
12070 (emit_thunk): Handle vcall offset thunks.
12071
12072 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12073
12074 * decl2.c (parse_time, varconst_time): Delete declarations.
12075 (finish_file): Delete LINENO declaration.
12076 START_TIME and THIS_TIME now long.
12077
12078 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
12079
12080 * class.c (build_base_field): Reformat comment.
12081
12082 * inc/cxxabi.h (stddef.h): Comment inclusion.
12083 (__base_class_info::__offset): Comment shift.
12084
12085 2000-04-12 Mark Mitchell <mark@codesourcery.com>
12086
12087 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
12088 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
12089 (cp_push_exception_identifier): New macro.
12090 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
12091 (DECL_BASE_DESTRUCTOR_P): Likewise.
12092 (DECL_DELETING_DESTRUCTOR_P): Likewise.
12093 (get_vtbl_decl_for_binfo): Fix formatting.
12094 (in_charge_arg_for_name): New macro.
12095 (maybe_build_cleanup_and_delete): Remove declaration.
12096 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
12097 (in_charge_arg_for_name): New function.
12098 (build_new_method_call): Use it. Handle cloned destructors.
12099 (build_clone): Don't make the base constructor virtual.
12100 Automatically defer generated functions.
12101 (clone_function_decl): Handle destructors, too.
12102 (clone_constructors_and_destructors): Likewise.
12103 (create_vtable_ptr): Don't create a vtable entry for a cloned
12104 function.
12105 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
12106 (initialize_predefined_identifiers): Update appropriately.
12107 (finish_destructor_body): Simplify.
12108 (maybe_build_cleanup_and_delete): Remove.
12109 * except.c (expand_throw): Handle new-ABI destructors.
12110 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
12111 (build_dtor_call): New function.
12112 (build_delete): Use it. Simplify.
12113 * optimize.c (maybe_clone_body): Handle destructors.
12114 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
12115
12116 * exception.cc (cleanup_fn): New typedef.
12117 (CALL_CLEANUP): New macro.
12118 (cp_eh_info): Use them.
12119 (__cp_push_exception): Likewise.
12120 (__cp_pop_exception): Likewise.
12121
12122 2000-04-11 Mark Mitchell <mark@codesourcery.com>
12123
12124 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
12125 (complete_dtor_identifier): New macro.
12126 (CLASSTYPE_FIRST_CONVERSION): Remove.
12127 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
12128 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
12129 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
12130 (CLASSTYPE_CONSTRUCTORS): Likewise.
12131 (CLASSTYPE_DESTRUCTORS): Likewise.
12132 (lang_decl): Add cloned_function.
12133 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
12134 (DECL_BASE_CONSTRUCTOR_P): Likewise.
12135 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
12136 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
12137 (DECL_CLONED_FUNCTION_P): Likewise.
12138 (DECL_CLONED_FUNCTION): Likewise.
12139 (clone_function_decl): Declare.
12140 (maybe_clone_body): Likewise.
12141 * call.c (build_user_type_conversion_1): Call complete object
12142 constructors in the new ABI.
12143 (build_new_method_call): Don't add in-charge parameters under the
12144 new ABI.
12145 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
12146 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
12147 CLASSTYPE_DESTRUCTOR_SLOT.
12148 (build_clone): New function.
12149 (clone_function_decl): Likewise.
12150 (clone_constructors_and_destructors): Likewise.
12151 (check_bases_and_members): Use it.
12152 * decl.c (iniitialize_predefined_identifiers): Initialize
12153 complete_dtor_identifier.
12154 (finish_function): Don't add extra code to a clone.
12155 (lang_mark_tree): Mark cloned_function.
12156 * decl2.c (mark_used): Don't bother trying to instantiate things
12157 we synthesized.
12158 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
12159 * method.c (set_mangled_name_for_decl): Don't treat clones as
12160 constructors.
12161 (synthesize_method): Sythesize cloned functions, not the clones.
12162 * optimize.c (inline_data): Update comment on ret_label.
12163 (remap_block): Don't assume DECL_INITIAL exists.
12164 (copy_body_r): Allow ret_label to be NULL.
12165 (maybe_clone_body): Define.
12166 * pt.c (tsubst_decl): Handle clones.
12167 (instantiate_clone): New function.
12168 (instantiate_template): Use it.
12169 (set_mangled_name_for_template_decl): Don't treat clones as
12170 constructors.
12171 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
12172 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
12173 * semantics.c (expand_body): Clone function bodies as necessary.
12174
12175 * optimize.c (remap_decl): Avoid sharing structure for arrays
12176 whose size is only known at run-time.
12177 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
12178
12179 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
12180 to has_in_charge_parm_p.
12181 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
12182 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
12183 (DECL_COPY_CONSTRUCTOR_P): New macro.
12184 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
12185 (build_user_type_conversion_1): Likewise.
12186 (convert_like_real): Likewise.
12187 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
12188 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
12189 (copy_args_p): Likewise.
12190 (grok_ctor_properties): Likewise.
12191 (start_function): Likewise.
12192 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
12193 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
12194 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
12195 * method.c (do_build_copy_constructor): Use
12196 DECL_HAS_IN_CHARGE_PARM_P.
12197 (synthesize_method): Likewise.
12198 * pt.c (instantiate_template): Remove goto.
12199 * tree.c (build_cplus_method_type): Remove mention of obstacks in
12200 comment.
12201
12202 * cp-tre.h (finish_function): Change prototype.
12203 * decl.c (end_cleanup_fn): Adjust caller.
12204 (finish_function): Take only one parameter.
12205 * decl2.c (finish_objects): Adjust caller.
12206 (finish_static_storage_duration_function): Likewise.
12207 * method.c (emit_thunk): Likewise.
12208 * parse.y: Likewise.
12209 * parse.c: Regenerated.
12210 * pt.c (instantiate_decl): Likewise.
12211 * rtti.c (synthesize_tinfo_fn): Likewise.
12212 * semantics.c (expand_body): Likewise.
12213
12214 * cp-tree.h (copy_decl): New function.
12215 * class.c (finish_struct_1): Use it.
12216 * lex.c (copy_decl): Define it.
12217 * pt.c (tsubst_decl): Likewise.
12218 * tree.c (copy_template_template_parm): Likewise.
12219
12220 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
12221 has_nonpublic_assign_ref.
12222 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
12223 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
12224 * class.c (finish_struct_methods): Don't set
12225 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
12226 (interface_only): Don't declare.
12227 (interface_unknown): Likewise.
12228
12229 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12230
12231 * tree.h (HAVE_TEMPLATES): Remove definition.
12232 * lang-options.h (-fthis-is-variable): Remove documentation.
12233
12234 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
12235
12236 * class.c (instantiate_type): Handle object-relative template-id.
12237
12238 * semantics.c (finish_expr_stmt): Call convert_to_void here.
12239 * decl.c (cplus_expand_expr_stmt): Not here.
12240
12241 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
12242 Initialize exprtype earlier.
12243
12244 * parse.y (fn.def1): Check for defining types in return types.
12245
12246 * decl.c (check_tag_decl): Notice extra fundamental types.
12247 Diagnose empty decls in classes, too.
12248
12249 * decl.c (grokdeclarator): Don't override an anonymous name if no
12250 declarator was given.
12251
12252 * cvt.c (convert_to_void): Call resolve_offset_ref.
12253
12254 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
12255
12256 * decl2.c (decl_namespace): Handle getting a type.
12257
12258 * typeck.c (build_c_cast): Re-enable warning for cast between
12259 pointer and integer of different size.
12260
12261 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
12262
12263 * inc/cxxabi.h (__pointer_type_info): Add restrict and
12264 incomplete flags.
12265 (__pointer_type_info::__pointer_catch): New virtual function.
12266 (__pointer_to_member_type_info): Derive from
12267 __pointer_type_info. Adjust.
12268 (__pointer_to_member_type_info::__do_catch): Remove.
12269 (__pointer_to_member_type_info::__is_pointer_p): Declare.
12270 (__pointer_to_member_type_info::__pointer_catch): Declare.
12271 * rtti.c (qualifier_flags): Add restrict flag.
12272 (ptmd_initializer): Reorder members.
12273 (create_tinfo_types): Expand comments. Reorder
12274 ptmd_desc_type_node members.
12275 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
12276 Implement.
12277 (__pointer_type_info::__do_catch): Move specific code into
12278 __pointer_catch. Call it.
12279 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
12280 specific catch checking. Fix void conversion check.
12281 (__pointer_to_member_type_info::__do_catch): Remove.
12282 (__pointer_to_member_type_info::__pointer_catch): Implement.
12283
12284 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12285
12286 * lex.c (init_parse): Remove traces of classof and headof.
12287 * decl2.c (flag_operator_names): Default to 1.
12288 (lang_decode_option): Do not set it for -ansi.
12289
12290 2000-04-09 Mark Mitchell <mark@codesourcery.com>
12291
12292 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
12293 (DECL_MAIN_VARIANT): Remove.
12294 * decl.c (duplicate_decls): Don't set it.
12295 (start_function): Likewise.
12296 (lang_mark_tree): Don't mark it.
12297 * decl2.c (defer_fn): Don't use it.
12298 * lex.c (retrofit_lang_decl): Don't set it.
12299 * pt.c (tsubst_decl): Likewise.
12300 * ptree.c (print_lang_decl): Don't print it.
12301 * typeck.c (mark_addressable): Don't use it.
12302
12303 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
12304
12305 * vec.cc: Include <new> and <exception>.
12306 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
12307 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
12308 terminate.
12309 (__cxa_vec_delete): Catch dtor exceptions.
12310
12311 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
12312
12313 Prepend __ to implementation defined names.
12314 * inc/typeinfo (type_info): Rename _name to __name.
12315 (type_info::type_info): Rename parameter.
12316 (type_info::operator==, type_info::operator!=,
12317 type_info::before): Likewise.
12318 (type_info::is_pointer_p, type_info::is_function_p,
12319 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
12320 parameters.
12321 * inc/cxxabi.h
12322 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
12323 (__pointer_type_info::__pointer_type_info): Likewise.
12324 (__pointer_type_info::is_pointer_p,
12325 __pointer_type_info::do_catch): Prepend __. Rename parameters.
12326 (__array_type_info::__array_type_info): Rename parameters.
12327 (__function_type_info::__function_type_info): Likewise.
12328 (__function_type_info::is_function_p): Prepend __.
12329 (__enum_type_info::__enum_type_info): Rename parameters.
12330 (__pointer_to_member_type_info::__pointer_to_member_type_info):
12331 Likewise.
12332 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
12333 parameters.
12334 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
12335 (__class_type_info::__class_type_info): Rename parameters.
12336 (__class_type_info::sub_kind): Prepend __. Adjust member names.
12337 (__class_type_info::upcast_result,
12338 __class_type_info::dyncast_result): Prepend __. Move definition
12339 into tinfo.cc.
12340 (__class_type_info::do_upcast, __class_type_info::do_catch,
12341 __class_type_info::find_public_src,
12342 __class_type_info::do_dyncast,
12343 __class_type_info::do_find_public_src): Prepend __. Rename
12344 parameters.
12345 (__si_class_type_info::__si_class_type_info): Rename parameters.
12346 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
12347 __si_class_type_info::do_find_public_src): Prepent __. Rename
12348 parameters.
12349 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
12350 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
12351 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
12352 parameters.
12353 (__dynamic_cast): Rename parameters.
12354 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
12355 type_info::do_catch, type_info::do_upcast): Prepend __.
12356 (contained_p, public_p, virtual_p, contained_public_p,
12357 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
12358 (__class_type_info::do_catch,
12359 __class_type_info::do_upcast): Prepend __. Adjust.
12360 (__class_type_info::__upcast_result,
12361 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
12362 Adjust.
12363 (__class_type_info::find_public_src): Prepend __. Adjust.
12364 (__class_type_info::do_find_public_src,
12365 __si_class_type_info::do_find_public_src,
12366 __vmi_class_type_info::do_find_public_src): Likewise.
12367 (__class_type_info::do_dyncast,
12368 __si_class_type_info::do_dyncast,
12369 __vmi_class_type_info::do_dyncast): Likewise.
12370 (__class_type_info::do_upcast,
12371 __si_class_type_info::do_upcast,
12372 __vmi_class_type_info::do_upcast): Likewise.
12373 (__dynamic_cast): Adjust.
12374 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
12375 (__function_type_info::is_function_p): Likewise.
12376 (__pointer_type_info::do_catch): Likewise. Adjust.
12377 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
12378 (__throw_type_match_rtti_2): Adjust.
12379 (__is_pointer): Adjust.
12380
12381 2000-04-08 Mark Mitchell <mark@codesourcery.com>
12382
12383 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
12384 (complete_ctor_identifier): New macro.
12385 (special_function_kind): Add sfk_copy_constructor and
12386 sfk_assignment_operator.
12387 (LOOKUP_HAS_IN_CHARGE): Remove.
12388 (cons_up_default_function): Rename to ...
12389 (implicitly_declare_fn): ... this.
12390 * call.c (build_new_method_call): Add in-charge parameters for
12391 constructors here.
12392 * class.c (add_implicitly_declared_members): Change parameter name
12393 from cant_have_assignment to cant_have_const_assignment.
12394 Replace calls to cons_up_default_function to implicitly_declare_fn.
12395 * cvt.c (ocp_convert): Use complete_ctor_identifier.
12396 * decl.c (initialize_predefined_identifiers): Initialize it.
12397 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
12398 complex expression.
12399 * init.c (expand_default_init): Don't calculate the in-charge
12400 parameter here.
12401 (build_new_1): Likewise.
12402 * lex.c (cons_up_default_function): Move to method.c.
12403 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
12404 (implicitly_declare_fn): New function.
12405 * typeck.c (build_static_cast): Use complete_ctor_identifier.
12406 (build_modify_expr): Likewise.
12407 * typeck2.c (build_functional_cast): Likewise.
12408
12409 Under the new ABI, constructors don't return `this'.
12410 * cp-tree.h (warn_reorder): Declare.
12411 (special_function_kind): New enum.
12412 (global_base_init_list): Remove declaration.
12413 (emit_base_init): Don't return a value.
12414 (check_base_init): Don't declare.
12415 (is_aggr_typedef): Likewise.
12416 * decl.c (check_special_function_return_type): New function.
12417 (return_types): Remove.
12418 (grokdeclarator): Use check_special_function_return_type.
12419 (start_function): Don't initialize ctor_label under the new ABI.
12420 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
12421 * init.c (begin_init_stmts): Move to top of file.
12422 (finish_init_stmts): Likewise.
12423 (warn_reorder): Don't declare.
12424 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
12425 value.
12426 (check_base_init): Remove.
12427 (is_aggr_typedef): Likewise.
12428 (build_new_1): Don't use the return value of a constructor.
12429 * semantics.c (setup_vtbl_ptr): Don't use the return value
12430 of emit_base_init.
12431 * typeck.c (check_return_expr): Don't magically convert return
12432 statements into `return this' in constructors under the new ABI.
12433
12434 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
12435 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
12436 (base_ctor_identifier): New macro.
12437 (base_dtor_identifier): Likewise.
12438 (deleting_dtor_identifier): Likewise.
12439 * decl.c: Don't include obstack.h.
12440 (obstack_chunk_alloc): Don't define.
12441 (obstack_chunk_free): Likewise.
12442 (struct predefined_identifier): New type.
12443 (initialize_predefined_identifiers): New function.
12444 (init_decl_processing): Use it.
12445 (debug_temp_inits): Remove.
12446 (start_method): Don't call preserve_data.
12447 (hack_incomplete_structures): Update comment.
12448 * init.c (init_init_processing): Don't initialize
12449 nelts_identifier.
12450 (build_offset_rf): Remove dead code.
12451 (build_delete): Use CLASSTYPE_N_BASECLASSES.
12452 * search.c (init_search_processing): Don't initialize
12453 vptr_identifier.
12454
12455 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12456
12457 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
12458 some sign_compare warnings.
12459
12460 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
12461
12462 Rename abi::__vmi_class_type_info members.
12463 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
12464 base_list, detail_masks members to vmi_flags, vmi_base_count,
12465 vmi_bases and vmi_flags_masks respectively.
12466 (__vmi_class_type_info::vmi_flags_masks): Rename
12467 details_unknown_mask to flags_unknown_mask.
12468 * tinfo.cc (__class_type_info::do_upcast): Adjust.
12469 (__vmi_class_type_info::do_find_public_src): Adjust.
12470 (__vmi_class_type_info::do_dyncast): Adjust.
12471 (__vmi_class_type_info::do_upcast): Adjust.
12472
12473 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
12474
12475 * tinfo.cc (convert_to_base): New function.
12476 (get_vbase_offset): Remove. Move into convert_to_base.
12477 (__vmi_class_type_info::do_find_public_src): Adjust.
12478 (__vmi_class_type_info::do_dyncast): Adjust.
12479 (__vmi_class_type_info::do_upcast): Adjust.
12480
12481 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
12482
12483 * tinfo.cc (operator=): Use __builtin_strcmp.
12484 * tinfo2.cc (before): Likewise.
12485
12486 2000-04-06 Mark Mitchell <mark@codesourcery.com>
12487
12488 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
12489 (DECL_SAVED_INLINE): Rename to ...
12490 (DECL_DEFERRED_FN): ... this.
12491 (in_function_p): Remove declaration.
12492 (mark_inline_for_output): Rename to ...
12493 (defer_fn): ... this.
12494 * decl.c (finish_function): Adjust call to mark_inline_for_output.
12495 (in_function_p): Remove definition.
12496 * decl2.c (saved_inlines): Rename to ...
12497 (deferred_fns): ... this.
12498 (saved_inlines_used): Rename to ...
12499 (deferred_fns_used): ... this.
12500 (mark_inline_for_output): Rename to ...
12501 (defer_fn): ... this.
12502 (finish_file): Adjust accordingly.
12503 (init_decl2): Likewise.
12504 * lex.c (cons_up_default_function): Likewise.
12505 * pt.c (mark_decl_instantiated): Likewise.
12506 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
12507 circumstances.
12508 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
12509 * semantics.c (expand_body): Defer more functions.
12510
12511 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
12512
12513 * vec.cc: New file.
12514 * Make-lang.in (CXX_LIB2FUNCS): Add it.
12515 (vec.o): Build it.
12516 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
12517 __cxa_vec_delete): Declare.
12518
12519 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
12520
12521 * rtti.c (dfs_class_hint_mark): New static function.
12522 (dfs_class_hint_unmark): New static function.
12523 (class_hint_flags): Use them.
12524
12525 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
12526
12527 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
12528
12529 2000-04-05 Mark Mitchell <mark@codesourcery.com>
12530
12531 * cp-tree.h (instantiate_decl): Change prototype.
12532 * decl2.c (mark_used): Adjust call.
12533 * optimize.c (inlinable_function_p): Adjust handling of templates.
12534 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
12535 (do_type_instantiation): Likewise.
12536 (instantiate_decl): Defer more templates.
12537 (instantiate_pending_templates): Adjust logic to handle inline
12538 friend functions.
12539
12540 * Makefile.in (GGC_H): New variable. Use it throughout in place
12541 of ggc.h.
12542
12543 * call.c: Don't include obstack.h. Include ggc.h.
12544 (obstack_chunk_alloc): Don't define.
12545 (obstack_chunk_free): Likewise.
12546 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
12547 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
12548 (pop_switch): Free it.
12549
12550 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
12551
12552 * dump.c (dequeue_and_dump): Don't try to print the bit_position
12553 if we don't have a DECL_FIELD_OFFSET.
12554
12555 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
12556
12557 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
12558 special_function_p.
12559
12560 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12561
12562 * cfns.gperf (hash, libc_name_p): Prototype.
12563
12564 * rtti.c (build_dynamic_cast_1): Constification.
12565
12566 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
12567
12568 * semantics.c (deferred_type_access_control): Prototype.
12569
12570 2000-04-04 Mark Mitchell <mark@codesourcery.com>
12571
12572 Correct many new ABI issues regarding vbase and vcall offset
12573 layout.
12574 * cp-tree.h (BINFO_VTABLE): Document.
12575 (struct lang_type): Tweak formatting.
12576 (BINFO_PRIMARY_BINFO): Add to documentation.
12577 (CLASSTYPE_VSIZE): Fix typo in comment.
12578 (CLASSTYPE_VBASECLASSES): Update documentation.
12579 (BINFO_VBASE_MARKED): Remove.
12580 (SET_BINFO_VBASE_MARKED): Likewise.
12581 (CLEAR_BINFO_VBASE_MARKED): Likewise.
12582 (BINFO_FIELDS_MARKED): Remove.
12583 (SET_BINFO_FIELDS_MARKED): Likewise.
12584 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
12585 (enum access_kind): New enumeration.
12586 (num_extra_vtbl_entries): Remove declaration.
12587 (size_extra_vtbl_entries): Likewise.
12588 (get_vtbl_decl_for_binfo): New function.
12589 (dfs_vbase_unmark): Remove declaration.
12590 (mark_primary_bases): Likewise.
12591 * class.c (SAME_FN): Remove.
12592 (struct vcall_offset_data_s): Move definition.
12593 (build_vbase_pointer): Use `build', not `build_binary_op', to
12594 access the vbase pointer under the new ABI.
12595 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
12596 (build_primary_vtable): Likewise.
12597 (dfs_mark_primary_bases): Move here from search.c.
12598 (mark_primary_bases): Likewise.
12599 (determine_primary_bases): Under the new ABI, don't make a base
12600 class a primary base just because we don't yet have any virtual
12601 functions.
12602 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
12603 (num_vfun_entries): Remove.
12604 (dfs_count_virtuals): Likewise.
12605 (num_extra_vtbl_entries): Likewise.
12606 (size_extra_vtbl_entries): Likewise.
12607 (layout_virtual_bases): Iterate in inheritance graph order under
12608 the new ABI.
12609 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
12610 indicate that a vfield is present.
12611 (init_class_processing): Initialize access_public_node, etc., from
12612 ak_public, etc.
12613 (get_vtbl_decl_for_binfo): New function.
12614 (dump_class_hierarchy_r): Likewise.
12615 (dump_class_hierarchy): Use it.
12616 (finish_vtbls): Build the vtbls in inheritance graph order.
12617 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
12618 (initialize_vtable): Use get_vtbl_decl_for_binfo.
12619 (accumulate_vtbl_inits): Add comments explaining why a pre-order
12620 walk is required.
12621 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
12622 where the vptr points, even for primary vtables.
12623 (build_vtbl_initializer): Adjust handling of vbase and vcall
12624 offsets.
12625 (build_vcall_and_vbase_vtable_entries): New function.
12626 (dfs_build_vbase_offset_vtbl_entries): Remove.
12627 (build_vbase_offset_vtbl_entries): Reimplement.
12628 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
12629 were already handled in a primary base class vtable.
12630 (build_vcall_offset_vtbl_entries): Adjust.
12631 (build_rtti_vtbl_entries): Adjust.
12632 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
12633 * init.c (expand_virtual_init): Simplify.
12634 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
12635 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
12636 * search.c (BINFO_ACCESS): New macro.
12637 (SET_BINFO_ACCESS): Likewise.
12638 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
12639 (access_in_type): Likewise.
12640 (dfs_accessible_p): Likewise.
12641 (protected_accessible_p): Likewise.
12642 (lookup_fnfields_1): Adjust documentation.
12643 (dfs_mark_primary_bases): Move to class.c
12644 (mark_primary_bases): Likewise.
12645 (dfs_vbase_unmark): Remove.
12646 (virtual_context): Use BINFO_FOR_VBASE.
12647 (dfs_get_vbase_types): Simplify.
12648 (dfs_build_inheritance_graph_order): New function.
12649 (get_vbase_types): Use it.
12650 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
12651
12652 * tinfo.cc (get_vbase_offset): New function.
12653 (__vmi_class_type_info::do_find_public_src): Use it.
12654 (__vmi_class_type_info::do_dyncast): Likewise.
12655 (__vmi_class_type_info::do_upcast): Likewise.
12656
12657 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
12658
12659 * lang-specs.h: Pass -fno-show-column to the preprocessor.
12660
12661 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
12662
12663 * rtti.c (class_hint_flags): Rename flags.
12664 (class_initializer): Remove flags.
12665 (synthesize_tinfo_var): Combine offset and flags. Add flags
12666 for __vmi_class_type_info.
12667 (create_tinfo_types): Remove flags from __class_type_info and
12668 __si_class_type_info. Merge flags and offset from
12669 base_class_type_info.
12670 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
12671 (__base_class_info::is_virtual_p): Adjust.
12672 (__base_class_info::is_public_p): Adjust.
12673 (__base_class_info::offset): New accessor.
12674 (__class_type_info::details): Remove member.
12675 (__class_type_info::__class_type_info): Lose details.
12676 (__class_type_info::detail_masks): Remove.
12677 (__si_class_type_info::__si_class_type_info): Lose details.
12678 (__vmi_class_type_info::details): New member.
12679 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
12680 (__vmi_class_type_info::detail_masks): New member.
12681 * tinfo.cc (__class_type_info::do_upcast): Initialize result
12682 with unknown_details_mask.
12683 (__vmi_class_type_info::do_find_public_src): Adjust
12684 (__vmi_class_type_info::do_dyncast): Adjust.
12685 (__vmi_class_type_info::do_upcast): Set result details, if
12686 needed. Adjust.
12687 (__dynamic_cast): Temporarily #if out optimization.
12688
12689 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
12690
12691 * rtti.c (get_tinfo_decl): Mark used.
12692 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
12693 mark as dealt with, if we output it.
12694
12695 2000-03-28 Mark Mitchell <mark@codesourcery.com>
12696
12697 * class.c: Reorganize to put virtual function table initialization
12698 machinery at the end of the file.
12699
12700 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
12701
12702 * class.c (finish_struct): Use bitsize_zero_node.
12703 * pt.c (instantiate_class_template): Likewise.
12704
12705 2000-03-28 Mark Mitchell <mark@codesourcery.com>
12706
12707 Put RTTI entries at negative offsets in new ABI.
12708 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
12709 vbase offset at index -3, not -1.
12710 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
12711 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
12712 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
12713 (build_rtti_vtbl_entries): New function.
12714 (set_rtti_entry): Remove.
12715 (build_primary_vtable): Don't use it.
12716 (build_secondary_vtable): Likewise.
12717 (start_vtable): Remove.
12718 (first_vfun_index): New function.
12719 (set_vindex): Likewise.
12720 (add_virtual_function): Don't call start_vtable. Do call
12721 set_vindex.
12722 (set_primary_base): Rename parameter.
12723 (determine_primary_base): Likewise.
12724 (num_vfun_entries): Don't use skip_rtti_stuff.
12725 (num_extra_vtbl_entries): Include RTTI information.
12726 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
12727 (skip_rtti_stuff): Remove.
12728 (dfs_modify_vtables): Don't use it.
12729 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
12730 (layout_nonempty_base_or_field): Update size handling.
12731 (create_vtable_ptr): Tweak.
12732 (layout_class_type): Adjust parameter names.
12733 (finish_struct_1): Simplify.
12734 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
12735 (skip_rtti_stuff): Remove.
12736 (first_vfun_index): New function.
12737 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
12738 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
12739 (marked_vtable_pathp): Declare.
12740 (unmarked_vtable_pathp): Likewise.
12741 * error.c (dump_expr): Use first_vfun_index to calculate vtable
12742 offsets.
12743 * rtti.c (build_headof): Look for RTTI at negative offsets.
12744 (get_tinfo_decl_dynamic): Likewise.
12745 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
12746 here.
12747 (create_pseudo_type_info): Do it here instead. Adjust so that
12748 vptr points at first virtual function.
12749 * search.c (marked_vtable_pathp): Make it global.
12750 (unmarked_vtable_pathp): Likewise.
12751 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
12752 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
12753 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
12754 (get_pure_virtuals): Likewise.
12755 (expand_upcast_fixups): Likewise.
12756 * tree.c (debug_binfo): Likewise.
12757 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
12758 negative offset.
12759
12760 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12761
12762 * class.c (check_field_decl): Fix typo.
12763 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
12764 (check_methods): Likewise.
12765 (check_field_decls): Likewise.
12766 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
12767 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
12768 Use DECL_RESULT_FLD, not DECL_RESULT.
12769 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
12770 * lex.c (identifier_type): Likewise.
12771 * pt.c (determine_specialization, lookup_template_class): Likewise.
12772 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
12773 (resolve_overloaded_unification, more_specialized): Likewise.
12774 * semantics.c (finish_member_declaration): Likewise.
12775 * typeck.c (build_x_function_call): Likewise.
12776
12777 2000-03-26 Mark Mitchell <mark@codesourcery.com>
12778
12779 * class.c (layout_empty_base): Handle empty bases with non-byte
12780 alignment.
12781 (build_base_field): Likewise.
12782 (layout_virtual_bases): Likewise.
12783
12784 * class.c (finish_struct_1): Fix typo in this change:
12785
12786 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12787
12788 2000-03-25 Mark Mitchell <mark@codesourcery.com>
12789
12790 * decl.c (grokdeclarator): Count partial specializations when
12791 keeping track of how many template classes have been seen.
12792
12793 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
12794
12795 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12796
12797 * class.c (build_vbase_pointer_fields): layout_field now place_field.
12798 (get_vfield_offset): Use byte_position.
12799 (set_rtti_entry): Set OFFSET to ssizetype zero.
12800 (get_binfo_offset_as_int): Deleted.
12801 (dfs_record_base_offsets): Use tree_low_cst.
12802 (dfs_search_base_offsets): Likewise.
12803 (layout_nonempty_base_or_field): Reflect changes in RLI format
12804 and call byte_position.
12805 (layout_empty_base): Convert offset to ssizetype.
12806 (build_base_field): use rli_size_unit_so_far.
12807 (dfs_propagate_binfo_offsets): Do computation in proper type.
12808 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
12809 (layout_class_type): Reflect changes in RLI names and fields.
12810 (finish_struct_1): Set DECL_FIELD_OFFSET.
12811 * dump.c (dequeue_and_dump): Call bit_position.
12812 * expr.c (cplus_expand_constant): Use byte_position.
12813 * rtti.c (expand_class_desc): Use bitsize_one_node.
12814 * typeck.c (build_component_addr): Use byte_position and don't
12815 special case for zero offset.
12816
12817 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
12818
12819 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
12820
12821 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
12822 tinfo object.
12823 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
12824 vtable.
12825
12826 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12827
12828 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
12829 DECL_P macros.
12830 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
12831 make_typename_type, check_initializer, cp_finish_decl,
12832 xref_tag): Likewise.
12833 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
12834 decl_namespace, arg_assoc_template_arg, arg_assoc,
12835 validate_nonmember_using_decl, do_class_using_decl): Likewise.
12836 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
12837 args_to_string): Likewise.
12838 * friend.c (is_friend): Likewise.
12839 * lex.c (note_got_semicolon, note_list_got_semicolon,
12840 is_global): Likewise.
12841 * method.c (build_overload_nested_name, build_overload_value,
12842 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
12843 * parse.y (typename_sub, typename_sub1): Likewise.
12844 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
12845 process_partial_specialization, convert_template_argument,
12846 template_args_equal, add_pending_template, lookup_template_class,
12847 for_each_template_parm_r, maybe_fold_nontype_arg,
12848 tsubst, instantiate_template, type_unification_real, unify,
12849 instantiate_pending_templates, set_mangled_name_for_template_decl):
12850 Likewise.
12851 * repo.c (repo_get_id, repo_template_used): Likewise.
12852 * search.c (lookup_field_1): Likewise.
12853 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
12854 * xref.c (classname): Likewise.
12855
12856 2000-03-22 Mark Mitchell <mark@codesourcery.com>
12857
12858 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
12859 (CANONICAL_BINFO): New macro.
12860 (BINFO_NEW_VTABLE_MARKED): Use it.
12861 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
12862 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
12863 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
12864 not TREE_TYPE.
12865 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12866 (build_secondary_vtable): Likewise.
12867 (dfs_finish_vtbls): Likewise.
12868 (dfs_accumulate_vtbl_inits): Likewise.
12869 (accumulate_vtbl_inits): New function.
12870 (finish_vtbls): Make sure that virtual bases come after
12871 non-virtual bases in the vtable group.
12872 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
12873 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12874 * search.c (struct vbase_info): Move definition.
12875 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12876 (unmarked_new_vtable_p): Likewise.
12877 (dfs_mark_vtable_path): Remove.
12878 (dfs_mark_new_vtable): Remove.
12879 (dfs_unmark_new_vtable): Likewise.
12880 (dfs_clear_search_slot): Likewise.
12881 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12882 (dfs_clear_vbase_slots): Likewise.
12883 (init_vbase_pointers): LIkewise.
12884
12885 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
12886
12887 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
12888 SIZETYPE to a non-SIZETYPE.
12889
12890 2000-03-21 Mark Mitchell <mark@codesourcery.com>
12891
12892 * class.c (layout_virtual_bases): Adjust names in conditionally
12893 compiled code.
12894
12895 * class.c (record_base_offsets): New function.
12896 (layout_conflict_p): Likewise.
12897 (layout_nonempty_base_or_field): Use it.
12898 (layout_empty_base): New function.
12899 (build_base_field): Use it.
12900 (build_base_fields): Update comment.
12901 (layout_virtual_bases): Fold in a little code form
12902 layout_basetypes. Use layout_empty_base.
12903 (layout_basetypes): Remove.
12904 (end_of_class): New function.
12905 (layout_class_type): Use it. Adjust.
12906
12907 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
12908 (fntype_p): Remove.
12909 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
12910 comment.
12911 (dfs_skip_nonprimary_vbases_markedp): Likewise.
12912 * typeck.c (fntype_p): Remove.
12913
12914 * cp-tree.h (TI_SPEC_INFO): Remove.
12915 (CLASSTYPE_TI_SPEC_INFO): Likewise.
12916 * pt.c (process_partial_specialization): Likewise.
12917
12918 * class.c (build_base_field): Fix thinko in computation of binfo
12919 offsets.
12920
12921 * tree.c (mark_local_for_remap_p): Mark variables declared in
12922 TARGET_EXPRs as well.
12923
12924 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
12925
12926 * typeck.c (require_complete_type, complete_type,
12927 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
12928 build_array_ref, convert_arguments, pointer_diff,
12929 build_x_unary_op, build_unary_op, build_c_cast,
12930 build_modify_expr): Use COMPLETE_TYPE_P etc.
12931 * call.c (is_complete, convert_like_real,
12932 build_new_method_call): Likewise.
12933 * class.c (build_vbase_pointer_fields, check_bases,
12934 build_base_field, finish_struct_1, pushclass): Likewise.
12935 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
12936 * decl.c (maybe_process_template_type_declaration, pushtag,
12937 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
12938 layout_var_decl, check_initializer, cp_finish_decl,
12939 grokdeclarator, require_complete_types_for_parms,
12940 grok_op_properties, xref_tag, xref_basetypes,
12941 check_function_type): Likewise.
12942 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
12943 * friend.c (do_friend): Likewise.
12944 * init.c (build_offset_ref): Likewise.
12945 * parse.y (structsp): Likewise.
12946 * pt.c (maybe_process_partial_specialization,
12947 tsubst_friend_function, instantiate_class_template, tsubst,
12948 do_type_instantiation, instantiate_pending_templates): Likewise.
12949 * repo.c (repo_get_id): Likewise.
12950 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
12951 synthesize_tinfo_var, emit_support_tinfos): Likewise.
12952 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
12953 * semantics.c (begin_class_definition): Likewise.
12954 * tree.c (build_cplus_method_type): Likewise.
12955 * typeck2.c (digest_init, build_functional_cast,
12956 add_exception_specifier): Likewise.
12957 * parse.h, parse.c: Regenerated.
12958
12959 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
12960
12961 * inc/cxxabi.h: New header file. Define new-abi entry points.
12962 (__pointer_type_info::target): Rename member to ...
12963 (__pointer_type_info::type): ... here.
12964 (__base_class_info::type): Rename member to ...
12965 (__base_class_info::base): ... here.
12966 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
12967 * cp-tree.h (CPTI_ABI): New global tree enumeration.
12968 (abi_node): New global tree node.
12969 * decl.c (abi_node): Document.
12970 (init_decl_processing): Initialize abi_node.
12971 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
12972 (get_vmi_pseudo_type_info): Likewise.
12973 (create_tinfo_types): Likewise.
12974 (emit_support_tinfos): Likewise.
12975 * tinfo.h (cxxabi.h): Include for new-abi.
12976 Move rtti class definitions to new header file.
12977 * tinfo.cc (abi): Use the namespace.
12978 (std): Move new abi rtti classes from here ...
12979 (__cxxabiv1): ... to here.
12980 * tinfo2.cc (cxxabi.h): Include for new-abi.
12981 Move rtti class definitions to new header file.
12982 (std): Move new abi rtti classes from here ...
12983 (__cxxabiv1): ... to here.
12984 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
12985 namespace.
12986
12987 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
12988 Jason Merrill <jason@casey.cygnus.com>
12989
12990 * method.c (build_overload_int): Use host_integerp.
12991
12992 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12993
12994 * init.c (build_offset_ref): Handle the case of a templated member
12995 function.
12996
12997 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12998
12999 * except.c (expand_exception_blocks): Clear catch_clauses_last.
13000
13001 2000-03-18 Mark Mitchell <mark@codesourcery.com>
13002
13003 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
13004 * class.c (check_bitfield_decl): Turn illegal bitfields into
13005 non-bitfields.
13006 (dfs_propagate_binfo_offsets): Adjust for new size_binop
13007 semantics.
13008 (dfs_offset_for_unshared_vbases): Likewise.
13009 * cvt.c (cp_convert_to_pointer): Convert NULL to a
13010 pointer-to-member correctly under the new ABI.
13011 * expr.c (cplus_expand_constant): Don't use cp_convert when
13012 turning an offset into a pointer-to-member.
13013 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
13014 when dereferencing them under the new ABI.
13015 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
13016 of pointers-to-members under the new ABI.
13017
13018 * class.c (check_bitfield_decl): Remove restriction on really long
13019 bitfields.
13020 (layout_class_type): Implement new ABI handling of bitfields
13021 longer than their types.
13022
13023 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13024
13025 * parse.y (extdefs): Call ggc_collect.
13026 * parse.c: Regenerated.
13027
13028 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
13029
13030 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
13031 (note_name_declared_in_class): Use OVL_CURRENT to get at a
13032 potential overload.
13033
13034 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13035
13036 * class.c (build_vbase_path): Use integer_zerop.
13037 (build_vtable_entry): Use tree_low_cst.
13038 (get_vfield_offset): Use bit_position.
13039 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
13040 Use tree_low_cst.
13041 (check_bitfield_decl): Set DECL_SIZE using convert.
13042 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
13043 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
13044 Use tree_low_cst.
13045 (finish_struct_1): Use bit_position.
13046 (dump_class_hierarchy): Use tree_low_cst.
13047 * cp-tree.h (min_precision): Add declaration.
13048 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
13049 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
13050 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
13051 * expr.c (cplus_expand_constant): Use bit_position.
13052 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
13053 * rtti.c (get_base_offset): Use bit_position.
13054 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
13055 host_integerp, and tree_low_cst.
13056 (pointer_int_sum): Use integer_zerop.
13057 (build_component_addr): Use bit_position.
13058
13059 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
13060
13061 * typeck.c (require_complete_type): Don't assume size_zero_node.
13062 (complete_type_or_else): Likewise.
13063
13064 2000-03-16 Steven Grady <grady@digitaldeck.com>
13065 Jason Merrill <jason@casey.cygnus.com>
13066
13067 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
13068
13069 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
13070
13071 * decl2.c (grokfield): Bail out if type is error_mark_node.
13072
13073 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
13074
13075 * tinfo2.cc (__ptr_to_member_data): Rename to ...
13076 (__pointer_to_member_data): ... here. Adjust.
13077 * rtti.c (create_tinfo_types): Adjust.
13078
13079 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
13080
13081 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
13082 * decl.c (ref_desc_type_node): Undocument.
13083 * rtti.c (ptr_ref_initializer): Rename to ...
13084 (ptr_initializer): ... here. Adjust comments.
13085 (ptmd_initializer): Fix comment thinko.
13086 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
13087 (create_tinfo_types): Remove ref_desc_type_node init.
13088 * tinfo2.cc (__reference_type_info): Remove.
13089
13090 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
13091
13092 * decl.c (cp_finish_decl): Remove obsolete comment.
13093
13094 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
13095
13096 2000-03-14 Mark Mitchell <mark@codesourcery.com>
13097
13098 * cp-tree.h: Tweak documentation.
13099 * class.c (build_vbase_pointer_fields): Layout the fields, too.
13100 (avoid_overlap): Remove.
13101 (get_binfo_offset_as_int): New function.
13102 (dfs_serach_base_offsets): Likewise.
13103 (layout_nonempty_base_or_field): Likewise.
13104 (build_base_field): Layout fields here. Avoid placing two objects
13105 of the same type at the same address, under the new ABI.
13106 (build_base_fields): Adjust accordingly.
13107 (create_vtable_ptr): Return the new field, but don't attach it to
13108 TYPE_FIELDS.
13109 (remove_base_field): Remove.
13110 (remove_base_fields): Remove.
13111 (layout_basetypes): Adjust accordingly.
13112 (layout_class_type): Call layout_field for each field, rather than
13113 just making a wholesale call to layout_type.
13114
13115 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
13116
13117 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
13118
13119 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
13120
13121 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
13122
13123 * except.c (dtor_nothrow): New fn.
13124 (do_pop_exception): Use it. Take type parm.
13125 (push_eh_cleanup): Take type parm.
13126 (expand_start_catch_block): Pass it.
13127 (build_eh_type_type_ref): Accept null type.
13128
13129 2000-03-12 Mark Mitchell <mark@codesourcery.com>
13130
13131 * cp-tree.h (revert_static_member_fn): Change prototype.
13132 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
13133 (grok_op_properties): Likewise.
13134 (start_function): Likewise.
13135 (revert_static_member_fn): Simplify.
13136 * pt.c (check_explicit_specialization): Adjust call to
13137 revert_static_member_fn.
13138
13139 2000-03-11 Mark Mitchell <mark@codesourcery.com>
13140
13141 * cp-tree.h (scope_kind): New type.
13142 (tmpl_spec_kind): Likewise.
13143 (declare_pseudo_global_level): Remove.
13144 (pseudo_global_level_p): Rename to template_parm_scope_p.
13145 (pushlevel): Remove declaration.
13146 (begin_scope): New function.
13147 (finish_scope): Likewise.
13148 (current_tmpl_spec_kind): Likewise.
13149 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
13150 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
13151 Add template_spec_p.
13152 (toplevel_bindings_p): Adjust.
13153 (declare_pseudo_global_level): Remove.
13154 (pseudo_global_level_p): Rename to template_parm_scope_p.
13155 (current_tmpl_spec_kind): New function.
13156 (begin_scope): Likewise.
13157 (finish_scope): Likewise.
13158 (maybe_push_to_top_level): Adjust.
13159 (maybe_process_template_type_declaration): Likewise.
13160 (pushtag): Likewise.
13161 (pushdecl_nonclass_level): Likewise.
13162 (lookup_tag): Likewise.
13163 (grokfndecl): Handle member template specializations. Share
13164 constructor and non-constructor code.
13165 * decl2.c (check_classfn): Handle member template specializations.
13166 * pt.c (begin_template_parm_list): Use begin_scope.
13167 (begin_specialization): Likewise.
13168 (end_specialization): Likewise.
13169 (check_explicit_specialization): Use current_tmpl_spec_kind.
13170 Handle member template specializations.
13171 (end_template_decl): Use finish_scope. Remove call to
13172 get_pending_sizes.
13173 (push_template_decl_real): Remove bogus error message.
13174 (tsubst_decl): Fix typo in code contained in comment.
13175 (instantiate_template): Handle member template specializations.
13176 (most_general_template): Likewise.
13177
13178 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
13179
13180 * lex.c (whitespace_cr): Compress consecutive calls to warning().
13181 (do_identifier): Ditto for error().
13182
13183 * pt.c (convert_nontype_argument): Ditto for cp_error().
13184 (convert_template_argument): Ditto for cp_pedwarn().
13185
13186 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
13187
13188 * exception.cc (__check_null_eh_spec): New fn.
13189 * except.c (expand_end_eh_spec): Call it if the spec is throw().
13190
13191 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
13192
13193 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
13194 * except.c (expand_end_eh_spec): Add the return type.
13195 * rtti.c (throw_bad_cast): Add the parmtypes.
13196 (throw_bad_typeid): Likewise.
13197
13198 * semantics.c (expand_stmt): Only leave out rtl for unused
13199 artificials, and set DECL_IGNORED_P on them as well.
13200 * decl.c (wrapup_globals_for_namespace): Likewise.
13201
13202 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
13203
13204 * decl.c (maybe_commonize_var): Skip all artificial decls.
13205 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
13206
13207 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
13208
13209 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
13210 * cp-tree.h: Declare flag_enforce_eh_specs.
13211 * decl.c (store_parm_decls, finish_function): Check it.
13212
13213 C library functions don't throw.
13214 * Makefile.in (cfns.h): New target.
13215 (except.o): Depend on it.
13216 * Make-lang.in (cc1plus): Depend on cfns.gperf.
13217 * cfns.gperf: New file.
13218 * cfns.h: Generated.
13219 * except.c: Include it.
13220 (nothrow_libfn_p): New fn.
13221 * decl.c (grokfndecl): Use it.
13222 * cp-tree.h: Declare it.
13223
13224 * decl.c (push_overloaded_decl_1, auto_function,
13225 define_function): Lose.
13226 (build_library_fn_1): New static fn.
13227 (builtin_function): Use it.
13228 (get_atexit_node): Use build_library_fn_ptr.
13229 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
13230 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
13231 push_void_library_fn, push_throw_library_fn): New fns.
13232 * cp-tree.h: Declare them.
13233 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
13234 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
13235 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
13236 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
13237 * rtti.c (build_runtime_decl): Lose.
13238 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
13239 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
13240 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
13241
13242 * call.c (build_call): Remove result_type parm.
13243 Call mark_used on unused artificial fns.
13244 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
13245
13246 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
13247
13248 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
13249 appropriate.
13250 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
13251 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
13252 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
13253 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
13254 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
13255 expand_generic_desc): Likewise.
13256
13257 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
13258
13259 * exception.cc (__cp_pop_exception): Cleanup the original object.
13260
13261 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
13262
13263 * decl.c (grok_op_properties): Merge conversion to void warning
13264 with other silly op warnings.
13265
13266 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
13267
13268 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
13269 array CONSTRUCTOR elements. Don't use expr_tree_cons.
13270
13271 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
13272
13273 * decl.c (cp_make_fname_decl): New function.
13274 (wrapup_globals_for_namespace): Don't emit unused static vars.
13275 (init_decl_processing): Remove comment about use of
13276 array_domain_type. Set make_fname_decl.
13277 (cp_finish_decl): Remove __FUNCTION__ nadgering.
13278 * semantics.c (begin_compound_stmt): Remove
13279 current_function_name_declared flagging.
13280 (expand_stmt): Don't emit unused local statics.
13281 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
13282 specially.
13283
13284 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
13285
13286 * typeck.c (convert_for_assignment): Don't look at array
13287 initializer.
13288 * call.c (convert_like_real): Likewise.
13289
13290 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
13291
13292 Add initial support for '\uNNNN' specifier.
13293 * lex.c (read_ucs): New fn.
13294 (readescape, skip_white_space): Call it.
13295 (is_extended_char, is_extended_char_1): New fns.
13296 (utf8_extend_token): New fn, #if 0'd out.
13297 (real_yylex): Treat extended chars like letters.
13298
13299 * search.c (note_debug_info_needed): Walk the bases even if we
13300 weren't deferring the type itself.
13301
13302 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13303
13304 * decl2.c (finish_objects): Constify a char*.
13305
13306 * method.c (emit_thunk): Likewise.
13307
13308 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
13309
13310 * typeck.c (dubious_conversion_warnings): Look through
13311 REFERENCE_TYPE.
13312
13313 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13314
13315 * class.c (dfs_modify_vtables): I is now unsigned.
13316 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
13317 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
13318 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
13319 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13320 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
13321 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
13322 Call integer_all_onesp.
13323 * typeck2.c (process_init_constructor): Use compare_tree_int.
13324
13325 * lang-specs.h (as): Don't call if -syntax-only.
13326
13327 2000-03-06 Mark Mitchell <mark@codesourcery.com>
13328
13329 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
13330 RTL_EXPR_HAS_NO_SCOPE after all.
13331
13332 2000-03-05 Mark Mitchell <mark@codesourcery.com>
13333
13334 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
13335 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
13336 RTL_EXPR_HAS_NO_SCOPE.
13337
13338 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
13339 later.
13340
13341 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
13342
13343 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
13344
13345 * call.c (convert_like): Macrofy.
13346 (convert_like_with_context): New macro.
13347 (convert_like_real): Renamed from convert_like. Add calling
13348 context parameters, for diagnostics. Add recursive flag. Call
13349 dubious_conversion_warnings for outer conversion.
13350 (build_user_type_conversion): Use convert_like_with_context.
13351 (build_over_call): Likewise. Don't warn about dubious
13352 conversions here. Adjust convert_default_arg calls.
13353 (convert_default_arg): Add context parameters for diagnostics.
13354 Pass through to convert_like_with_context.
13355 * cp-tree.h (convert_default_arg): Add context parameters.
13356 (dubious_conversion_warnings): Prototype new function.
13357 * typeck.c (convert_arguments): Adjust convert_default_arg call.
13358 (dubious_conversion_warnings): New function, broken
13359 out of convert_for_assignment.
13360 (convert_for_assignment): Adjust.
13361
13362 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
13363
13364 * decl2.c (key_method): Break out from...
13365 (import_export_vtable, import_export_class): ...here.
13366
13367 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
13368 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
13369
13370 * search.c (note_debug_info_needed, dfs_debug_mark,
13371 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
13372 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
13373
13374 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
13375
13376 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
13377 typos.
13378
13379 2000-03-02 Mark Mitchell <mark@codesourcery.com>
13380
13381 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
13382 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
13383 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
13384 (lang_type): Split gets_new into has_new and has_array_new.
13385 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13386 (TYPE_GETS_NEW): Split into ...
13387 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
13388 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
13389 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
13390 (build_op_new_call): Don't declare.
13391 (build_new_1): Likewise.
13392 * call.c (build_op_new_call): Remove.
13393 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
13394 instead of TYPE_NEEDS_DESTRUCTOR.
13395 (finish_struct_bits): Likewise.
13396 (add_implicitly_declared_members): Likewise.
13397 (check_field_decl): Likewise.
13398 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
13399 correctly under the new ABI.
13400 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
13401 instead of TYPE_NEEDS_DESTRUCTOR.
13402 (initialize_local_var): Likewise.
13403 (destroy_local_var): Likewise.
13404 (cp_finish_decl): Likewise.
13405 (register_dtor_fn): Likewise.
13406 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
13407 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
13408 TYPE_VEC_DELETE_TAKES_SIZE here.
13409 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
13410 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
13411 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13412 (finish_destructor_body): Likewise.
13413 (maybe_build_cleanup_1): Likewise.
13414 * decl2.c (do_static_destruction): Likewise.
13415 * init.c (build_new_1): Make it static.
13416 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13417 (expand_cleanup_for_base): Likewise.
13418 (get_cookie_size): New function.
13419 (build_new_1): Handle array-new cookies correctly under the new
13420 ABI.
13421 (build_vec_delete_1): Likewise.
13422 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13423 (build_delete): Likewise.
13424 (build_vec_delete): Handle array-new cookies correctly under the new
13425 ABI.
13426 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13427 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
13428 TYPE_HAS_ARRAY_NEW_OPERATOR.
13429 * ptree.c (print_lang_type): Check them.
13430 * search.c (context_for_name_lookup): Fix typo in comment.
13431 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
13432 * tree.c (break_out_cleanups): Likewise.
13433 (build_cplus_array_test_1): Likewise.
13434 (cp_build_qualified_type_real): Likewise.
13435 * typeck.c (complete_type): Likewise.
13436
13437 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
13438 the command-line, not the end.
13439
13440 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
13441
13442 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
13443
13444 2000-03-02 Tom Tromey <tromey@cygnus.com>
13445
13446 * cp-tree.h (build_java_class_ref): Declare.
13447 * init.c (build_java_class_ref): No longer static.
13448 * except.c (expand_throw): Generate a Java-style `throw' if the
13449 thrown object is a "Java" object.
13450 (initialize_handler_parm): Generate a Java-style lookup of
13451 exception info if the caught object is a "Java" object.
13452 (catch_language, catch_language_init): New globals.
13453 (decl_is_java_type): New function.
13454 (expand_start_catch_block): Don't call push_eh_info() or
13455 push_eh_cleanup() when handling a Java-style "catch". Pass Java
13456 class reference to build_catch_block.
13457
13458 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13459
13460 * typeck.c (comptypes): Treat sizetype like its language equivalent.
13461
13462 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
13463
13464 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
13465 to merge reference/pointer code and fix incorrect warnings.
13466
13467 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
13468
13469 * search.c (protected_accessible_p): Use context_for_name_lookup.
13470
13471 * init.c (construct_virtual_bases): Fix thinko.
13472 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
13473
13474 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
13475
13476 * decl.c (current_function_decl): Move to toplev.c.
13477
13478 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
13479
13480 * pt.c (fn_type_unification): Unify return type, whenever
13481 provided.
13482 (get_bindings_real): Only pass return type when necessary.
13483 Remove explicit return type check.
13484 * class.c (resolve_address_of_overloaded_function): Pass desired
13485 return type to fn_type_unification.
13486
13487 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13488
13489 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
13490 DECL_FIELD_SIZE.
13491 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
13492 DECL_FIELD_SIZE.
13493 * rtti.c (expand_class_desc): Likewise.
13494 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
13495 (THUNK_VCALL_OFFSET): Likewise.
13496 (THUNK_DELTA): Reflect changes in ../tree.h.
13497
13498 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
13499
13500 * search.c (protected_accessible_p): Also allow the access if
13501 the member is public in DERIVED. Lose TYPE parm.
13502 (friend_accessible_p): Lose TYPE parm.
13503 (accessible_p): Adjust.
13504
13505 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13506
13507 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
13508 on things that are not sizes; ssize_binop deleted.
13509 Call size_diffop when appropriate.
13510 (dfs_build_vcall_offset_vtbl_entries): Likewise.
13511 (build_primary_vtable, build_secondary_vtable): Likewise.
13512 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
13513 Variable I is HOST_WIDE_INT.
13514 (get_vfield_offset): Pass proper types to size_binop.
13515 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
13516 (finish_struct_1): Likewise.
13517 (skip_rtti_stuff): Arg N is now pointer to signed.
13518 (layout_class_type): Use size_zero_node.
13519 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
13520 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
13521 * decl.c (complete_arry_type): Pass proper types to size_binop.
13522 (xref_basetypes): BINFO_OFFSET is sizetype.
13523 * error.c (dump_expr): Don't use size_binop non-sizes.
13524 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
13525 * init.c (construct_virtual_bases): Fix type error.
13526 (build_vec_delete_1): Pass proper type to size_binop and don't
13527 fold result.
13528 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
13529 * rtti.c (get_base_offset): Pass proper type to size_binop.
13530 * search.c (dfs_find_vbases): Fix type error.
13531 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
13532 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
13533 * tree.c (debug_binfo): Variable N is signed.
13534 Use HOST_WIDE_INT_PRINT_DEC.
13535 * typeck.c (comptypes): sizetype is same as equivalent integer type.
13536 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
13537 size_one_node and size_zero_node.
13538 (c_alignof): Use size_one_node.
13539 (build_component_addr): Pass proper types to size_binop.
13540 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
13541
13542 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
13543
13544 Implement class scope using-declarations for functions.
13545 * class.c (handle_using_decl): Call add_method for used functions.
13546 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
13547 (add_method): Used functions are hidden by local functions.
13548 (check_bases_and_members): Handle using-decls before finalizing
13549 CLASSTYPE_METHOD_VEC.
13550 * call.c (add_function_candidate): Add ctype parm; if nonzero,
13551 override the type of 'this' accordingly.
13552 (add_template_candidate, add_template_candidate_real): Add ctype parm.
13553 (convert_class_to_reference, build_user_type_conversion_1,
13554 build_new_function_call, build_object_call, build_new_op,
13555 build_new_method_call): Pass ctype parm.
13556
13557 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
13558 the baselink.
13559 * call.c (convert_class_to_reference, build_user_type_conversion_1,
13560 build_new_function_call, build_object_call, build_new_op,
13561 build_new_method_call, build_op_delete_call): Don't get basetype_path
13562 from a baselink.
13563 * typeck.c (build_component_ref): Likewise.
13564 * init.c (build_offset_ref): Likewise.
13565 (resolve_offset_ref): Don't call enforce_access.
13566 Call build_scoped_ref.
13567 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
13568 would cause an error or if -pedantic.
13569 * class.c (alter_access): Lose binfo parm.
13570
13571 2000-02-26 Mark Mitchell <mark@codesourcery.com>
13572
13573 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
13574 types.
13575
13576 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
13577
13578 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
13579 pseudo_type_info creation into the std namespace
13580
13581 2000-02-26 Mark Mitchell <mark@codesourcery.com>
13582
13583 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
13584 (import_export_class): Remove declaration.
13585 * decl2.c (import_export_class): Make it static.
13586 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
13587 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
13588 EXPR_WITH_FILE_LOCATION.
13589 * lex.c (check_newline): Tweak filename/lineno setting.
13590 * semantics.c (begin_while_stmt): Fix typo in comment.
13591
13592 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13593
13594 * lang-options.h (-fmessage-length=): Add missing option.
13595
13596 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
13597
13598 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
13599
13600 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
13601
13602 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
13603
13604 * optimize.c (expand_call_inline): Emit the return label before
13605 evaluating the return value.
13606
13607 2000-02-24 Mark Mitchell <mark@codesourcery.com>
13608
13609 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
13610 than duplicating functionality here.
13611 * optimize.c: Include input.h.
13612 (expand_call_inline): Use push_srcloc and pop_srcloc.
13613 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
13614 * parse.c: Regenerated.
13615 * Makefile.in (lex.o): Depend on input.h.
13616 (optimize.o): Likewise.
13617
13618 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
13619
13620 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
13621 function type, rather than ICE.
13622
13623 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
13624
13625 * decl.c (grokdeclarator): Call decl_type_access_control.
13626 * parse.y (parse_end_decl): Don't call decl_type_access_control if
13627 decl is null.
13628
13629 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
13630
13631 * decl.c (decls_match): Remove obsolete static member nadgering.
13632
13633 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13634
13635 * decl.c (grokdeclarator): Change ANSI to ISO.
13636 * lex.c (consume_string, readescape, do_identifier): Likewise.
13637 (parse_float, real_yylex): Likewise.
13638 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
13639 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
13640 new_type_id, maybe_label_decls, simple_stmt,
13641 for.init.statement): Likewise.
13642 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
13643 * semantics.c (finish_named_return_value): Likewise.
13644 * parse.c: Regenerate.
13645
13646 2000-02-21 Mark Mitchell <mark@codesourcery.com>
13647
13648 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
13649 (CPTI_CLASS_STAR_TYPE): Remove.
13650 (vtable_index_type): Likewise.
13651 (class_star_type_node): Remove.
13652 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
13653 (build_binary_op_nodefault): Remove.
13654 * call.c (build_new_op): Use build_binary_op instead of
13655 build_binary_op_nodefault.
13656 * decl.c (init_decl_processing): Remove class_star_type_node
13657 initialization. Make delta_type_node ptrdiff_type_node under the
13658 new ABI. Initialize vtable_index_type.
13659 (build_ptrmemfunc_type): Build different structures for the new
13660 ABI.
13661 (build_enumerator): Use build_binary_op instead of
13662 build_binary_op_nodefault.
13663 * method.c (build_overload_value): Mangle pointers-to-members
13664 appropriately under the new ABI.
13665 * typeck.c (build_array_ref): Use build_binary_op instead of
13666 build_binary_op_nodefault.
13667 (get_member_function_from_ptrfunc): Adjust for the new ABI.
13668 (build_binary_op_nodefault): Rename to ...
13669 (build_binary_op): ... this. Remove old version. Adjust for
13670 pointer-to-member comparisons under the new ABI.
13671 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
13672 (build_ptrmemfunc): Adjust for the new ABI.
13673 (expand_ptrmemfunc_cst): Likewise.
13674 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
13675 (pfn_from_ptrmemfunc): Adjust for the new ABI.
13676
13677 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
13678
13679 * call.c (build_object_call): Compress consecutive calls to
13680 cp_error.
13681 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
13682 (build_op_delete_call): Adjust message formatting.
13683
13684 * class.c (check_bases): Compress consecutive calls to
13685 cp_pedwarn.
13686 (finish_struct_anon): Say 'ISO C++'.
13687
13688 * decl.c (start_decl): Same here.
13689 (grok_reference_init): Likewise.
13690 (grokfndecl): Correct message formatting.
13691 (grokfndecl): Improve diagnostic.
13692 (check_static_variable_definition): Likewise. Say 'ISO C++'
13693 (compute_array_index_type): Say 'ISO C++'
13694 (create_array_type_for_decl): Compress consecutive calls to
13695 cp_error.
13696 (grokdeclarator): Say 'ISO C++'
13697 (grok_op_properties): Likewise.
13698
13699 * decl2.c (delete_sanity): Clairify diagnostic.
13700 (check_member_template): Same here.
13701 (grok_function_init): Use consistent terminology.
13702
13703 * expr.c (do_case): Say 'ISO C++'
13704
13705 * friend.c (do_friend): Compress consecutive calls to warning.
13706
13707 2000-02-20 Mark Mitchell <mark@codesourcery.com>
13708
13709 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
13710 * class.c (build_secondary_vtable): Reorganize. Don't create a
13711 new vtable under the new ABI.
13712 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
13713 computing the size.
13714 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
13715 the initializing elements.
13716 (initialize_vtable): New function.
13717 (dfs_finish_vtbls): Use it.
13718 (dfs_accumulate_vtbl_inits): New function.
13719 (finish_vtbls): Merge primary and secondary vtables under the new
13720 ABI.
13721 (finish_struct_1): Remove redundant call to layout_vtable_decl.
13722 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
13723 aren't VAR_DECLs.
13724
13725 * class.c (build_vtable): New function, split out from ...
13726 (get_vtable_decl): ... here, and ...
13727 (build_secondary_vtable): ... here.
13728
13729 * pt.c (tsubst_decl): Fix formatting.
13730
13731 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13732
13733 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
13734 (avoid_overlap, build_base_field): Likewise.
13735 (build_base_field, build_base_fields, is_empty_class):
13736 Test DECL_SIZE with integer_zero.
13737 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
13738 * cp-tree.h (struct lang_type): New field size_unit.
13739 (CLASSTYPE_SIZE_UNIT): New macro.
13740 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
13741 (cp_finish_decl): Delete -Wlarger-than processing.
13742 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
13743 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
13744 * tree.c (make_binfo): binfo vector is one entry longer.
13745 (walk_tree): Walk DECL_SIZE_UNIT.
13746
13747 2000-02-19 Mark Mitchell <mark@codesourcery.com>
13748
13749 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
13750 comment.
13751 (build_vtable_entry): Don't assume all vtable entries are
13752 functions.
13753 (build_vtbl_initializer): Adjust accordingly.
13754 (get_vtable_decl): Fix formatting.
13755
13756 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
13757
13758 * semantics.c (deferred_type_access_control): Walk the entire
13759 type_lookups list.
13760 (save_type_access_control): Rename from
13761 initial_deferred_type_access_control. Just remember the value.
13762 (decl_type_access_control): New fn.
13763 (begin_function_definition): Use deferred_type_access_control, after
13764 we've started the function. Set type_lookups to error_mark_node.
13765 * parse.y (frob_specs, fn.def1): Adjust.
13766 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
13767 (parse_end_decl, parse_bitfield0, parse_method): New fns.
13768 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
13769 (after_type_component_declarator0): Likewise.
13770 (after_type_component_declarator): Likewise.
13771 (notype_component_declarator): Likewise.
13772 * cp-tree.h: Adjust.
13773
13774 * decl.c (redeclaration_error_message): Allow redeclaration of
13775 namespace-scope decls.
13776
13777 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
13778
13779 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
13780
13781 2000-02-17 Mark Mitchell <mark@codesourcery.com>
13782
13783 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
13784 * decl2.c (grokclassfn): Likewise.
13785
13786 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
13787
13788 * decl2.c (lang_decode_option): Don't set default message length
13789 here.
13790 * lex.c (lang_init_options): Set it here.
13791
13792 2000-02-16 Mark Mitchell <mark@codesourcery.com>
13793
13794 Make DECL_CONTEXT mean the class in which a member function was
13795 declared, even for a virtual function.
13796 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
13797 (DECL_FRIEND_CONTEXT): New macro.
13798 (DECL_REAL_CONTEXT): Remove.
13799 (SET_DECL_FRIEND_CONTEXT): Likewise.
13800 (DECL_VIRTUAL_CONTEXT): Adjust.
13801 (DECL_CLASS_SCOPE_P): Use TYPE_P.
13802 (add_friends): Remove.
13803 (hack_decl_function_context): Likewise.
13804 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
13805 CP_DECL_CONTEXT.
13806 (build_over_call): Fix indentation. Use DECL_CONTEXT
13807 instead of DECL_CLASS_CONTEXT.
13808 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
13809 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
13810 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13811 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
13812 (build_base_field): Likewise.
13813 (finish_struct_1): Likewise.
13814 (build_self_reference): Likewise.
13815 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
13816 DECL_REAL_CONTEXT.
13817 (pushtag): Use decl_function_context, not
13818 hack_decl_function_context.
13819 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13820 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
13821 (pushdecl): Remove bogus code.
13822 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
13823 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13824 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13825 Use decl_function_context, nothack_decl_function_context.
13826 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
13827 (grokdeclarator): Likewise. Use decl_function_context, not
13828 hack_decl_function_context.
13829 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
13830 (start_function): Use DECL_FRIEND_CONTEXT, not
13831 DECL_CLASS_CONTEXT. Use decl_function_context, not
13832 hack_decl_function_context.
13833 (finish_function): Use decl_function_context, not
13834 hack_decl_function_context.
13835 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
13836 DECL_CLASS_CONTEXT.
13837 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
13838 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
13839 (grokfield): Likewise.
13840 (finish_builtin_type): Likewise.
13841 (finish_vtable_vardec): Use decl_function_context, not
13842 hack_decl_function_context.
13843 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13844 (start_static_initialization_or_destruction): Likewise.
13845 (finish_static_initialization_or_destruction): Likewise.
13846 (mark_used): Adjust logic for deciding when to synthesize methods.
13847 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
13848 DECL_REAL_CONTEXT.
13849 * error.c (dump_function_decl): Use DECL_CONTEXT, not
13850 DECL_CLASS_CONTEXT.
13851 * friend.c (is_friend): Likewise.
13852 (add_friends): Remove.
13853 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
13854 * lex.c (begin_definition_of_inclass_inline): Use
13855 decl_function_context, not hack_decl_function_context.
13856 (process_next_inline): Likewise.
13857 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13858 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
13859 DECL_CLASSS_CONTEXT.
13860 (hack_identifier): Likewise.
13861 (synthesize_method): Use decl_function_context, not
13862 hack_decl_function_context.
13863 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
13864 DECL_REAL_CONTEXT.
13865 (is_member_template): Use decl_function_context, not
13866 hack_decl_function_context. Use DECL_CONTEXT, not
13867 DECL_CLASS_CONTEXT.
13868 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
13869 DECL_CLASS_CONTEXT.
13870 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
13871 DECL_REAL_CONTEXT.
13872 (push_template_decl_real): Likewise.
13873 (instantiate_class_template): Don't call add_friends.
13874 (tsubst_default_argument): Use DECL_CONTEXT, not
13875 DECL_REAL_CONTEXT.
13876 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
13877 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13878 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
13879 DECL_CLASS_CONTEXT.
13880 * repo.c (repo_inline_used): Likewise.
13881 * search.c (current_scope): Adjust for new _CONTEXT macros.
13882 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
13883 DECL_REAL_CONTEXT.
13884 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13885 (lookup_fnfields_here):Likewise.
13886 (check_final_overrider): Likewise.
13887 (init_vbase_pointers): Likewise.
13888 (virtual_context): Likewise.
13889 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
13890 (expand_body): Use decl_function_context, not
13891 hack_decl_function_context.
13892 * tree.c (hack_decl_function_context): Remove.
13893 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
13894 DECL_CLASS_CONTEXT.
13895 * typeck2.c (error_not_base_type): Likewise.
13896
13897 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
13898
13899 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
13900
13901 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13902
13903 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
13904
13905 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
13906
13907 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
13908
13909 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
13910
13911 * decl2.c (lang_decode_option): Enable automatic line wrapping.
13912
13913 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
13914
13915 * parse.y (frob_specs): Split out...
13916 (parse_decl): From here.
13917 (fn.def2): Call initial_deferred_type_access_control.
13918 (after_type_component_declarator0): Call frob_specs.
13919 (notype_component_declarator0): Likewise.
13920 * search.c (friend_accessible_p): Nested classes are friends of their
13921 enclosing classes.
13922
13923 2000-02-10 Mark Mitchell <mark@codesourcery.com>
13924
13925 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
13926 used to create an implicit temporary.
13927
13928 * class.c (dfs_modify_vtables): Tweak calculation of functions to
13929 override.
13930
13931 2000-02-08 Nathan Sidwell <nathan@acm.org>
13932
13933 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
13934 strip array element qualifiers too.
13935
13936 2000-02-07 Mark Mitchell <mark@codesourcery.com>
13937
13938 * decl.c (store_parm_decls): Don't build cleanups for parameters
13939 while processing_template_decl.
13940
13941 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
13942
13943 * cp-tree.h (struct saved_scope): Add incomplete field.
13944 (namespace_scope_incomplete): New macro.
13945 * decl.c (pushdecl): Use it.
13946 (hack_incomplete_structures): Use it. See through artificial
13947 binding levels.
13948 (mark_saved_scope): Mark it.
13949
13950 Implement access control for nested types.
13951 * search.c (type_access_control): New fn.
13952 (accessible_p): Now we do perform access control for types.
13953 * semantics.c (deferred_type_access_control): New fn.
13954 (initial_deferred_type_access_control): New fn.
13955 (begin_function_definition): Call it. Add lookups parm.
13956 * decl.c (struct binding_level): Add this_class field.
13957 (pushlevel_class): Set it.
13958 (mark_binding_level): Mark it.
13959 (lookup_name_real): Use it. Call type_access_control.
13960 (mark_saved_scope): Mark lookups field.
13961 * cp-tree.h (flagged_type_tree): Add lookups field.
13962 (struct saved_scope): Add lookups field.
13963 (type_lookups): New macro.
13964 * parse.y (declmods): Now <ftype>.
13965 (parse_decl): Add lookups parm. Call
13966 initial_deferred_type_access_control.
13967 (lang_extdef): Clear type_lookups.
13968 (typed_declspecs, declmods, typespec): Set lookups field.
13969 (initdcl): Call deferred_type_access_control.
13970 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
13971 component_decl_1, named_parm): Adjust.
13972 * friend.c (is_friend): Nested classes are friends of their
13973 enclosing classes.
13974
13975 * class.c (currently_open_derived_class): New fn.
13976 * method.c (hack_identifier): Use it.
13977
13978 * lex.c (do_identifier): Remove obsolete code.
13979
13980 * parse.y (typed_typespecs): Propagate new_type_flag properly.
13981
13982 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
13983
13984 * tinfo.h: Remove apostrophes from C++ comment (xgettext
13985 thinks this file is plain C).
13986
13987 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13988
13989 * Makefile.in (call.o): Depend on $(EXPR_H).
13990
13991 * call.c: Include "expr.h".
13992
13993 * class.c (dump_class_hierarchy): Add prototype.
13994
13995 * search.c (dfs_get_pure_virtuals): Likewise.
13996
13997 2000-02-1 Ulrich Drepper <drepper@redhat.com>
13998
13999 * parse.y (simple_stmt): Allow :: token in asm parameter list.
14000 * parse.c: Rebuilt.
14001
14002 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
14003
14004 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
14005 Store it in DECL_FCONTEXT.
14006 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
14007
14008 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
14009
14010 * tinfo.h (old abi): #include "tconfig.h".
14011 * tinfo.cc (convert_to_base): Move into old abi section.
14012
14013 2000-01-31 Mark Mitchell <mark@codesourcery.com>
14014
14015 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
14016 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
14017 (BINFO_PRIMARY_BINFO): New macro.
14018 (BF_DELTA): Rename to ...
14019 (BV_DELTA): ... this.
14020 (BF_VCALL_INDEX): Rename to ...
14021 (BV_VCALL_INDEX): ... this.
14022 (BF_FN): Rename to ...
14023 (BV_FN): ... this.
14024 * class.c (build_vbase_path): Adjust for changes to reverse_path.
14025 (set_rtti_entry): Rename BF_ macros to BV_ variants.
14026 (modify_vtable_entry): Simplify.
14027 (add_virtual_function): Rename BF_ macros to BV_ variants.
14028 (build_vtable_initializer): Likewise.
14029 (get_class_offset_1): Remove.
14030 (dfs_get_class_offset): Likewise.
14031 (get_class_offset): Likewise.
14032 (dfs_find_final_overrider): New function.
14033 (find_final_overrider): Likewise.
14034 (modify_one_vtable): Remove.
14035 (dfs_find_base): New function.
14036 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
14037 find_final_overrider.
14038 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
14039 virtuals.
14040 (dfs_fixup_vtable_deltas): Remove.
14041 (override_one_vtable): Remove.
14042 (merge_overrides): Likewise.
14043 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
14044 unreal chilren of virtual bases.
14045 (finish_struct_1): Don't use merge_overrides. Don't use
14046 dfs_fixup_vtable_deltas.
14047 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
14048 BINFOs.
14049
14050 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
14051 Jason Merrill <jason@yorick.cygnus.com>
14052
14053 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
14054
14055 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
14056
14057 * exception.cc (__throw_bad_typeid): Add missing std::.
14058
14059 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14060
14061 * cp-tree.h (make_thunk): PROTO -> PARAMS.
14062
14063 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
14064
14065 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
14066
14067 Runtime support for new-abi rtti.
14068 * inc/typeinfo (type_info::operator!=): Define in class.
14069 (type_info::before, type_info::name, type_info::operator==,
14070 type_info::operator!=): Define new ABI implementations.
14071 (type_info::is_pointer_p, type_info::is_function_p): Declare
14072 new virtual functions.
14073 (type_info::do_catch, type_info::do_upcast): Likewise.
14074
14075 * tinfo.h (__base_class_info): Define new class.
14076 (__class_type_info): Likewise.
14077 (__si_class_type_info): Likewise.
14078 (__vmi_class_type_info): Likewise.
14079 (__dynamic_cast): Prototype.
14080
14081 * tinfo.cc: Conditionalize old and new rtti mechanisms.
14082 (type_info::is_pointer_p): Define new function.
14083 (type_info::is_function_p): Likewise.
14084 (type_info::do_catch): Likewise.
14085 (type_info::do_upcast): Likewise.
14086 (vtable_prefix): New structure for vtable access.
14087 (adjust_pointer): Define new template function.
14088 (contained_p, public_p, virtual_p, contained_public_p,
14089 contained_nonpublic_p, contained_nonvirtual_p): Define new
14090 functions.
14091 (nonvirtual_base_type): New local variable.
14092 (__class_type_info::~__class_type_info): Define.
14093 (__si_class_type_info::~__si_class_type_info): Likewise.
14094 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
14095 (__class_type_info::do_catch): Define new function.
14096 (__class_type_info::do_upcast): Likewise.
14097 (__class_type_info::find_public_src): Likewise.
14098 (__class_type_info::do_find_public_src): Likewise.
14099 (__si_class_type_info::do_find_public_src): Likewise.
14100 (__vmi_class_type_info::do_find_public_src): Likewise.
14101 (__class_type_info::do_dyncast): Likewise.
14102 (__si_class_type_info::do_dyncast): Likewise.
14103 (__vmi_class_type_info::do_dyncast): Likewise.
14104 (__class_type_info::do_upcast): Likewise.
14105 (__si_class_type_info::do_upcast): Likewise.
14106 (__vmi_class_type_info::do_upcast): Likewise.
14107 (__dynamic_cast): Likewise.
14108
14109 * tinfo2.cc (__fundamental_type_info): Define new class.
14110 (__pointer_type_info): Likewise.
14111 (__reference_type_info): Likewise.
14112 (__array_type_info): Likewise.
14113 (__function_type_info): Likewise.
14114 (__enum_type_info): Likewise.
14115 (__ptr_to_member_type_info): Likewise.
14116 (__fundamental_type_info::~__fundamental_type_info): Define.
14117 (__pointer_type_info::~__pointer_type_info): Likewise.
14118 (__reference_type_info::~__reference_type_info): Likewise.
14119 (__array_type_info::~__array_type_info): Likewise.
14120 (__function_type_info::~__function_type_info): Likewise.
14121 (__enum_type_info::~__enum_type_info): Likewise.
14122 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
14123 (__pointer_type_info::do_catch): Define new function.
14124 (__ptr_to_member_type_info::do_catch): Define new function.
14125
14126 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
14127 (__is_pointer): Likewise.
14128
14129 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
14130
14131 2000-01-30 Mark Mitchell <mark@codesourcery.com>
14132
14133 * cp/class.c (build_vtable): Rename to build_primary_vtable.
14134 (prepare_fresh_vtable): Rename to build_secondary_vtable.
14135 (make_new_vtable): New function.
14136 (modify_vtable_entry): Handle generation of new vtables correctly.
14137 (modify_one_vtable): Remove unused parameter.
14138 (dfs_fixup_vtable_deltas): Likewise.
14139 (override_one_vtable): Use build_secondary_vtable.
14140 (finish_struct_1): Use build_primary_vtable and
14141 build_secondary_vtable.
14142
14143 2000-01-28 Ulrich Drepper <drepper@redhat.com>
14144
14145 * cp/decl.c: Adjust variable names, comments, help strings.
14146
14147 2000-01-29 Nathan Sidwell <nathan@acm.org>
14148
14149 * new2.cc (operator delete[]): Use operator delete, don't assume
14150 implementation.
14151
14152 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
14153
14154 * class.c (build_vtbl_initializer): Add argument to
14155 build_vtable_entry call.
14156
14157 2000-01-27 Mark Mitchell <mark@codesourcery.com>
14158
14159 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
14160 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
14161 (BF_DELTA): New macro.
14162 (BF_VCALL_INDEX): Likewise.
14163 (BF_FN): Likewise.
14164 (THUNK_VCALL_OFFSET): Likewise.
14165 (make_thunk): Change prototype.
14166 * class.c (build_vtable_entry): Integrate
14167 build_vtable_entry_for_fn. Handle vcall indices.
14168 (build_vtable_entry_for_fn): Remove.
14169 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
14170 BF_VCALL_INDEX, BF_FN.
14171 (modify_vtable_entry): Integrate common code from
14172 modify_one_vtable and dfs_fixup_vtable_deltas.
14173 (add_virtual_function): Set BF_VCALL_INDEX.
14174 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
14175 and BF_FN.
14176 (modify_one_vtable): Simplify.
14177 (dfs_fixup_vtable_deltas): Likewise.
14178 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
14179 * method.c (make_thunk): Handle vcall indices.
14180
14181 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
14182
14183 Compiler side new abi rtti (not enabled).
14184 * cp-tree.h (new_abi_rtti_p): New macro.
14185 (emit_support_tinfos): Prototype new function.
14186 (tinfo_decl_p): Likewise.
14187 (emit_tinfo_decl): Likwise.
14188 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
14189 macros.
14190 (doing_runtime): New local static.
14191 (init_rtti_processing): Add new-abi initializer.
14192 (get_tinfo_decl): Add new-abi logic.
14193 (tinfo_from_decl): Likewise.
14194 (build_dynamic_cast_1): Likewise.
14195 (qualifier_flags): New static function.
14196 (tinfo_base_init): Likewise.
14197 (generic_initializer): Likewise.
14198 (ptr_ref_initializer): Likewise.
14199 (ptmd_initializer): Likewise.
14200 (class_hint_flags): Likewise.
14201 (class_initializer): Likewise.
14202 (synthesize_tinfo_var): Likewise.
14203 (create_real_tinfo_var): Likewise.
14204 (create_pseudo_type_info): Likewise.
14205 (get_vmi_pseudo_type_info): Likewise.
14206 (create_tinfo_types): Likewise.
14207 (emit_support_tinfos): New global function.
14208 (tinfo_decl_p): New global predicate.
14209 (emit_tinfo_decl): New global function.
14210 * class.c (set_rtti_entry): Generalize for old and new rtti.
14211 (build_vtbl_initializer): Likewise.
14212 * decl2.c (finish_file): Likewise.
14213
14214 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
14215
14216 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
14217 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
14218
14219 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
14220
14221 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
14222 for scopes.
14223
14224 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
14225
14226 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
14227
14228 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
14229
14230 * optimize.c (calls_setjmp_r): Supply new argument
14231 to special_function_p.
14232
14233 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14234
14235 * call.c: PROTO -> PARAMS.
14236 * class.c: Likewise.
14237 * cp-tree.h: Likewise.
14238 * cvt.c: Likewise.
14239 * decl.c: Likewise.
14240 * decl.h: Likewise.
14241 * decl2.c: Likewise.
14242 * dump.c: Likewise.
14243 * errfn.c: Likewise.
14244 * error.c: Likewise.
14245 * except.c: Likewise.
14246 * expr.c: Likewise.
14247 * init.c: Likewise.
14248 * input.c: Likewise.
14249 * lex.c: Likewise.
14250 * lex.h: Likewise.
14251 * method.c: Likewise.
14252 * optimize.c: Likewise.
14253 * parse.y: Likewise.
14254 * pt.c: Likewise.
14255 * repo.c: Likewise.
14256 * rtti.c: Likewise.
14257 * search.c: Likewise.
14258 * semantics.c: Likewise.
14259 * spew.c: Likewise.
14260 * tree.c: Likewise.
14261 * typeck.c: Likewise.
14262 * typeck2.c: Likewise.
14263 * xref.c: Likewise.
14264
14265 2000-01-25 Richard Henderson <rth@cygnus.com>
14266
14267 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
14268
14269 2000-01-25 Mark Mitchell <mark@codesourcery.com>
14270
14271 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
14272 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
14273 (struct vcall_offset_data_s): New type.
14274 (dfs_vcall_offset_queue_p): New function.
14275 (dfs_build_vcall_offset_vtbl_entries): Likewise.
14276 (build_vcall_offset_vtbl_entries): Likewise.
14277 (layout_vtable_decl): Likewise.
14278 (num_vfun_entries): Likewise.
14279 (num_extra_vtbl_entries): Add the entries for vcall offsets.
14280 (build_vtbl_initializer): Likewise.
14281 (dfs_finish_vtabls): Use layout_vtable_decl.
14282 (modify_one_vtables): Always duplicate vtables under the new ABI.
14283 (finish_struct_1): Use layout_vtable_decl.
14284
14285 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14286
14287 * decl.c (member_function_or_else): Change third arg from a format
14288 specifier to an `enum overload_flags'. Callers changed.
14289
14290 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
14291
14292 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
14293 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
14294 build_const_cast, get_delta_difference, check_return_expr): Avoid
14295 ANSI string concatenation usage.
14296
14297 2000-01-24 Mark Mitchell <mark@codesourcery.com>
14298
14299 * class.c (layout_class_type): Put the fields required to make a
14300 class non-empty at the end, not the beginning, of the TYPE_FIELDs
14301 list.
14302
14303 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
14304
14305 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
14306 template.
14307
14308 * decl2.c (mark_used): Do instantiate inlines that have been
14309 explicitly instantiated.
14310
14311 2000-01-24 Richard Henderson <rth@cygnus.com>
14312
14313 * call.c (build_over_call): Use expand_tree_builtin.
14314 * typeck.c (build_function_call_real): Likewise.
14315 (build_binary_op_nodefault): Handle unordered compares.
14316
14317 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
14318
14319 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
14320 cp_tree_index values.
14321 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
14322 New global node #defines for them.
14323 * rtti.c (call_void_fn): Replace with ...
14324 (build_runtime_decl): ... new static function.
14325 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
14326 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
14327 (build_dynamic_cast_1): Always produce correctly typed result.
14328 Explicitly produce type_info addresses. Use dynamic_cast_node.
14329 * exception.cc (__throw_bad_cast): Return `void *'.
14330 (__throw_bad_typeid): Return `const type_info &'.
14331
14332 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
14333
14334 * cp-tree.h (get_vtable_decl): Prototype new function.
14335 * class.c (get_vtable_decl): New function. Broken out from ...
14336 (build_vtable): ... here. Use it.
14337 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
14338 by get_vtable_decl.
14339
14340 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
14341
14342 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
14343 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
14344 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
14345 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
14346 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
14347 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
14348 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
14349 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
14350 (CPTI_TINFO_VAR_ID): New enumeration.
14351 (__tp_desc_type_node, __access_mode_type_node,
14352 __bltn_desc_type_node, __user_desc_type_node,
14353 __class_desc_type_node, __ptr_desc_type_node,
14354 __attr_desc_type_node, __func_desc_type_node,
14355 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
14356 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
14357 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
14358 enum_desc_type_node, class_desc_type_node,
14359 si_class_desc_type_node, vmi_class_desc_type_node,
14360 ptmd_desc_type_node, base_desc_type_node): New #defines.
14361 (tinfo_fn_id, tinfo_fn_type): Rename to ...
14362 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
14363 (tinfo_var_id): New enumeration.
14364 (DECL_TINFO_FN_P): Augment comment.
14365 * decl.c (cp_global_trees): Adjust documentation.
14366 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
14367 tinfo_decl_type and tinfo_var_id.
14368 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
14369 (build_typeid): Remove unused variable.
14370 (get_tinfo_var): Use tinfo_var_id.
14371 (tinfo_name): New static function.
14372 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
14373 (tinfo_from_decl): Likewise.
14374 (get_base_offset): New static function, broken out of
14375 expand_class_desc.
14376 (expand_si_desc): Use tinfo_name.
14377 (expand_class_desc): Likewise. Lose local static variable.
14378 Use base_desc_type_node. Use get_base_offset.
14379 (expand_ptr_desc): Use tinfo_name.
14380 (expand_attr_desc): Likewise.
14381 (expand_generic_desc): Likewise.
14382
14383 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
14384 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
14385
14386 2000-01-23 Mark Mitchell <mark@codesourcery.com>
14387
14388 * cp-tree.h (__eprintf): Remove declaration.
14389 * tree.c (__eprintf): Remove definition.
14390
14391 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
14392 Mark Mitchell <mark@codesourcery.com>
14393
14394 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
14395 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
14396
14397 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
14398
14399 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
14400
14401 2000-01-23 Mark Mitchell <mark@codesourcery.com>
14402
14403 * cp-tree.h (register_dtor_fn): New function.
14404 * decl.c (destroy_local_static): Rename to ...
14405 (register_dtor_fn): ... this. Give it external linkage.
14406 (expand_static_init): Use it.
14407 * decl2.c (do_static_initialization): Likewise, if using
14408 __cxa_atexit.
14409 (do_static_destruction): Check that __cxa_atexit is not in use.
14410 (finish_file): Don't call do_static_destruction if using
14411 __cxa_atexit.
14412
14413 * typeck.c (convert_arguments): Restore two-message error
14414 reporting.
14415
14416 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
14417
14418 Remap dynamic cast hint values to be consistent across ABIs.
14419 * search.c (dynamic_cast_base_recurse): Remap generated value.
14420 (get_dynamic_cast_base_type): Adjust documentation.
14421 * tinfo.h (__user_type_info::dyncast): Likewise.
14422 (__user_type_info::find_public_subobj): Remap BOFF meaning.
14423 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
14424 (__class_type_info::do_dyncast): Likewise.
14425 (__class_type_info::do_find_public_subobj): Likewise.
14426 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
14427
14428 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
14429
14430 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
14431
14432 * typeck2.c (incomplete_type_error): Restore previous
14433 cp_error and cp_error_at call sequence.
14434
14435 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
14436
14437 * class.c (dump_class_hierarchy): Make format agree with argument;
14438 cast pointer to unsigned long and print with %lx.
14439
14440 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
14441
14442 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
14443
14444 * typeck.c (composite_pointer_type, common_type,
14445 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
14446 build_function_call_real, convert_arguments,
14447 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
14448 build_unary_op, mark_addressable, build_compound_expr,
14449 build_static_cast, build_reinterpret_cast, build_const_cast,
14450 build_c_cast, build_modify_expr, get_delta_difference,
14451 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
14452 'ISO C++'. Fusion consecutive calls to diagnostic message routines
14453 into a single one.
14454 * typeck2.c (readonly_error, abstract_virtuals_error,
14455 process_init_constructor, check_for_new_type): Likewise.
14456
14457 2000-01-19 Mark Mitchell <mark@codesourcery.com>
14458
14459 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
14460 VAR_DECLs.
14461
14462 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
14463
14464 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
14465 (build_x_typeid): Likewise.
14466 (get_tinfo_fn): Likewise.
14467 (get_tinfo_fn_unused): Rename to ...
14468 (get_tinfo_decl): ... here.
14469 * rtti.c (build_headof): Replace logic error with assertion.
14470 (get_tinfo_fn_dynamic): Rename to ...
14471 (get_tinfo_decl_dynamic): ... here. Make static. Use
14472 complete_type_or_else.
14473 (build_x_typeid): Move into ...
14474 (build_typeid): ... here. Adjust call to
14475 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
14476 throw_bad_typeid expression.
14477 (get_tinfo_fn_unused): Rename to ...
14478 (get_tinfo_decl): ... here. Adjust comment.
14479 (get_tinfo_fn): Delete.
14480 (tinfo_from_decl): New static function.
14481 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
14482 (get_typeid): Use complete_type_or_else.
14483 (build_dynamic_cast_1): Adjust calls to
14484 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
14485 * parse.y (primary): Adjust call to build_typeid.
14486 * except.c (build_eh_type_type_ref): Adjust call to
14487 get_tinfo_decl. Mark as used.
14488 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
14489 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
14490 * parse.c: Regenerated.
14491
14492 2000-01-17 Mark Mitchell <mark@codesourcery.com>
14493
14494 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
14495 calling convention.
14496 (resolves_to_fixed_type_p): Document calling convention.
14497 * rtti.c (build_x_typeid): Initialize NONNULL.
14498
14499 * cp-tree.h (build_shared_int_cst): New function.
14500 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
14501 * class.c (modify_vtable_entry): Likewise.
14502 (add_virtual_function): Split out code to generated shared
14503 INTEGER_CSTs to build_share_int_cst.
14504 (modify_all_vtables): Handle all the overridden functions here.
14505 Add overridden functions from non-primary virtual bases to the
14506 primary vtable.
14507 (finish_struct_1): Adjust call to modify_all_vtables. Add
14508 overridden functions from non-primary bases to the vtable.
14509 * tree.c (build_shared_int_cst): New function.
14510
14511 * cp-tree.h (scratchalloc): Remove.
14512 (build_scratch_list): Likewise.
14513 * call.c (convert_class_to_reference): Replace build_scratch_list
14514 and build_expr_list with build_tree_list.
14515 (add_candidate): Replace scratchalloc with expralloc. Note memory
14516 leak.
14517 (build_user_type_conversion_1): Replace build_scratch_list
14518 and build_expr_list with build_tree_list.
14519 (build_new_op): Likewise.
14520 (build_op_delete_call): Likewise.
14521 (convert_like): Likewise.
14522 * cvt.c (ocp_convert): Likewise.
14523 * decl.c (start_decl): Likewise.
14524 (start_function): Likewise.
14525 (finish_destructor_body): Likewise.
14526 (maybe_build_cleanup_1): Likewise.
14527 * decl2.c (reparse_decl_as_expr): Likewise.
14528 * init.c (perform_member_init): Likewise.
14529 (expand_cleanup_for_base): Likewise.
14530 (build_builtin_delete_call): Likewise.
14531 (build_new_1): Likewise.
14532 (build_delete): Likewise.
14533 * method.c (do_build_assign_ref): Likewise.
14534 * parse.y (already_scoped_stmt): Likewise.
14535 (nontrivial_exprlist): Likewise.
14536 (net_initializer): Likewise.
14537 (initlist): Likewise.
14538 * parse.c: Regenerated.
14539 * rtti.c (build_x_typeid): Likewise.
14540 (build_dynamic_cast_1): Likewise.
14541 * typeck.c (build_x_compound_expr): Likewise.
14542 (build_static_cast): Likewise.
14543 (build_modify_expr): Likewise.
14544
14545 * cp-tree.h (DECL_VINDEX): Add documentation.
14546 * class.c (build_vtable_entry): Likewise.
14547 (start_vtable): Add comment.
14548 (add_virtual_function): Replace pending_hard_virtuals with
14549 overridden_virtuals and pending_virtuals with new_virtuals.
14550 Replace redundant assignments with assertions.
14551 (check_for_override): Add comment.
14552 (check_bases_and_members): Replace pending_hard_virtuals with
14553 overridden_virtuals and pending_virtuals with new_virtuals.
14554 (create_vtbl_ptr): Likewise.
14555 (layout_class_type): Likewise.
14556 (finish_struct_1): Likewise. Add comments.
14557
14558 2000-01-16 Mark Mitchell <mark@codesourcery.com>
14559
14560 * class.c (finish_struct_1): Replace redundant code with
14561 assertions.
14562
14563 * cp-tree.h (flag_new_abi): Move.
14564 (flag_use_cxa_atexit): Likewise.
14565 (flag_honor_std): Likewise.
14566 (flag_rtti): Likewise.
14567 (vbase_offsets_in_vtable_p): Define.
14568 (vptrs_present_everywhere_p): Likewise.
14569 (TYPE_CONTAINS_VPTR_P): Likewise.
14570 (dfs_walk_real): Declare.
14571 * class.c (build_vbase_pointer_fields): Check
14572 vbase_offsets_in_vtable_p.
14573 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
14574 BINFO_VPTR_FIELD.
14575 (build_vbase_offset_vtbl_entries): Simplify.
14576 (build_vbase_offset_vtbl_entries): Adjust.
14577 (build_vbase_pointer): Add ability to look up vbase offsets in
14578 vtable.
14579 (start_vtable): New function.
14580 (add_virtual_function): Use it.
14581 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
14582 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
14583 (build_vtbl_initializer): Take the type of the complete object as
14584 input. Use it to correctly calculate vbase offsets.
14585 (dfs_finish_vtbls): Pass the complete type to
14586 build_vtbl_initializer.
14587 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
14588 (create_vtable_ptr): Create a vtable even if there are no
14589 new virtual functions, under the new ABI.
14590 (finish_struct_1): Likewise.
14591 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
14592 * decl.c (exapnd_static_init): Remove call to
14593 preserve_initializer.
14594 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
14595 vtables.
14596 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
14597 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
14598 (construct_virtual_bases): Don't initialize virtual base pointers
14599 under the new ABI.
14600 (build_aggr_init): Clean up comment.
14601 (expand_aggr_init_1): Likewise.
14602 * rtti.c (expand_class_desc): Store the virtual function table
14603 index where the vbase offset lives in the offset field.
14604 * search.c (dfs_walk_real): Make it global.
14605 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
14606 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
14607
14608 * tinfo.h (USItype): Make it signed under the new ABI.
14609 * tinfo.cc (convert_to_base): New function. Encapsulate base
14610 conversion logic here.
14611 (__class_type_info::do_upcast): Use it.
14612 (__class_type_info::do_dyncast): Likewise.
14613 (__class_type_info::do_find_public_subobj): Likewise.
14614
14615 * init.c (construct_virtual_bases): Don't look up the addresses of
14616 virtual bases at run-time.
14617
14618 * class.c (build_vbase_pointer): Relocate.
14619 (build_vbase_pointer_fields): Likewise.
14620 (dfs_build_vbase_offset_vtbl_entries): Likewise.
14621 (build_vbase_offset_vtbl_entries): Likewise.
14622
14623 * decl.c (init_decl_processing): Complain if -fnew-abi
14624 -fno-vtable-thunks is used.
14625
14626 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
14627 flag_new_abi.
14628
14629 2000-01-15 Mark Mitchell <mark@codesourcery.com>
14630
14631 * cp-tree.h (num_extra_vtbl_entries): New function.
14632 (size_extra_vtbl_entries): Likewise.
14633 (dfs_vtable_path_unmark): Likewise.
14634 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
14635 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
14636 * class.c (num_extra_vtbl_entries): New function.
14637 (size_extra_vtbl_entries): Likewise.
14638 (dfs_build_vbase_offset_vtbl_entries): New function.
14639 (build_vbase_offset_vtbl_entries): Likewise.
14640 (build_vtbl_initializer): Use it.
14641 (finish_struct_1): Adjust vtable sizes (using
14642 num_extra_vtbl_entries).
14643 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
14644 THUNK_DECL is non-NULL before expanding it.
14645 * init.c (expand_virtual_init): Adjust the vtable pointer by
14646 size_extra_vtbl_entries before storing it.
14647 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
14648 Handle TREE_LIST parameters here, not in the dfs_* functions.
14649 (dfs_unmarked_real_bases_queue_p): Adjust.
14650 (dfs_marked_real_bases_queue_p): Likewise.
14651 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
14652 (dfs_vtable_path_marked_real_bases_queue_p): New function.
14653 (dfs_vtable_path_unmark): Likewise.
14654
14655 2000-01-14 Mark Mitchell <mark@codesourcery.com>
14656
14657 * optimize.c (copy_body_r): Clear the operand three of a
14658 TARGET_EXPR when copying it.
14659
14660 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14661
14662 * method.c (build_decl_overload_real): Check whether we are in ::
14663 before returning __builtin_new/delete.
14664
14665 2000-01-13 Mark Mitchell <mark@codesourcery.com>
14666
14667 * pt.c (tsubst_friend_function): Improve comment.
14668 (instantiate_decl): Avoid crashing when a "nested" function is
14669 instantiated from the top level.
14670
14671 * dump.c (dqeueue_and_dump): Dump
14672 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
14673
14674 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14675
14676 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
14677
14678 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
14679
14680 * g++spec.c (lang_specific_driver): Add -fnew-abi if
14681 ENABLE_NEW_GXX_ABI defined.
14682 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
14683 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
14684 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
14685
14686 2000-01-12 Mark Mitchell <mark@codesourcery.com>
14687
14688 * decl.c (start_cleanup_fn): Call pushdecl.
14689
14690 * call.c (convert_class_to_reference): Fix typos.
14691 (build_conditional_expr): Handle errors gracefully.
14692 * class.c (push_nested_class): Likewise.
14693 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
14694 (DECL_THIS_EXTERN): Use it.
14695 (DECL_THIS_STATIC): Likewise.
14696 * cvt.c (convert_to_void): Handle errors gracefully.
14697 (build_expr_type_conversion): Likewise.
14698 * decl.c (maybe_push_decl): Likewise.
14699 (start_decl_1): Likewise.
14700 (require_complete_types_for_parms): Likewise.
14701 * parse.y (structsp): Likewise.
14702 (base_class): Likewise.
14703 * parse.c: Regenerated.
14704 * pt.c (finish_member_template_decl): Likewise.
14705 * typeck.c (decay_conversion): Likewise.
14706
14707 * cp-tree.h (dfs_skip_vbases): New function.
14708 (find_vbase_instance): Likewise.
14709 * class.c (determine_primary_base): Allow a nearly empty base to
14710 serve as a primary base class under the new ABI.
14711 (get_class_offset_1): Rename to ...
14712 (dfs_get_class_offset): ... this. Simplify. Don't issue error
14713 messages here.
14714 (get_class_offset): Use it. Issue error messages here.
14715 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
14716 find the right copies of virtual bases.
14717 (fixup_vtable_deltas1): Rename to ...
14718 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
14719 bases as primary bases.
14720 (fixup_vtable_deltas): Remove.
14721 (override_one_vtable): Handle virtual bases as primary bases.
14722 (merge_overrides): Likewise.
14723 (finish_struct_1): Likewise.
14724 (dump_class_hierarchy): Dump primary-ness of bases as well.
14725 * search.c (mark_primary_bases): Use a pre-order traversal to
14726 handle primary virtual bases.
14727 (dfs_skip_vbases): New fiunction.
14728 (expand_upcast_fixups): Adjust to handle primary virtual bases.
14729 (fixup_virtual_upcast_offsets): Likewise.
14730 (fixup_all_virtual_upcast_offsets): Likewise.
14731 (dfs_find_vbase_instances): New function.
14732 (find_vbase_instance): Likewise.
14733
14734 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
14735
14736 * lex.c (DIR_SEPARATOR): Delete macro.
14737
14738 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
14739
14740 * decl2.c (lang_decode_option): Handle automatic line wrapping
14741 option.
14742
14743 2000-01-11 Mark Mitchell <mark@codesourcery.com>
14744
14745 * friend.c (do_friend): Don't resolve scopes when processing
14746 template declarations, even if the qualifying scope doesn't
14747 involve template parameters.
14748
14749 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
14750
14751 * class.c (dfs_modify_vtables_queue_p): Remove.
14752 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
14753 and dfs_marked_real_bases_queue_p instead of
14754 dfs_modify_vtables_queue_p.
14755
14756 * class.c (build_vbase_path): Simplify.
14757 (dfs_propagate_binfo_offsets): New function.
14758 (propagate_binfo_offsets): Use it.
14759 (remove_base_field): Simplify.
14760 (dfs_set_offset_for_vbases): Remove.
14761 (dfs_set_offset_for_shared_vbases): New function.
14762 (dfs_set_offset_for_unshared_vbases): Likewise.
14763 (layout_virtual_bases): Use them.
14764 (layout_basetypes): Don't call propagate_binfo_offsets.
14765 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
14766 for the vbases.
14767
14768 * class.c (build_base_field): New function, split out from ...
14769 (build_base_fields): ... here. Use it. Allocate primary bases
14770 first, under the new ABI.
14771 (get_vtable_entry): Remove.
14772 (remove_base_field): New function, split out from ...
14773 (remove_base_fields): ... here. Adjust since primary bases come
14774 first under the new ABI.
14775
14776 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
14777 (initialize_vtbl_ptrs): New function.
14778 (expand_indirect_vtbls_init): Change prototype.
14779 (convert_pointer_to_vbase): Declare.
14780 * init.c (expand_direct_vtbls_init): Remove.
14781 (dfs_initialize_vtbl_ptrs): New function.
14782 (initialize_vtbl_ptrs): Likewise.
14783 (emit_base_init): Use initialize_vtbl_ptrs.
14784 * search.c (convert_pointer_to_vbase): Make it global.
14785 (expand_indirect_vtbls_init): Remove vtable initialization code.
14786 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
14787
14788 * class.c (dfs_finish_vtbls): New function.
14789 (finish_vtbls): Use it.
14790 (dump_class_hierarchy): New function.
14791
14792 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
14793 (BINFO_VBASE_PRIMARY_P): New macro.
14794 (BINFO_VIRTUALS): Add to documentation.
14795 (SET_BINFO_PRIMARY_MARKED_P): Remove.
14796 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
14797 (dfs_mark_primary_bases_queue_p): Likewise.
14798 (dfs_unmarked_real_bases_queue_p): New function.
14799 (dfs_marked_real_bases_queue_p): Likewise.
14800 * search.c (dfs_mark_primary_bases): Adjust.
14801 (mark_primary_bases): Likewise.
14802 (get_shared_vbase_if_not_primary): New function.
14803 (dfs_unmarked_real_bases_queue_p): Likewise.
14804 (dfs_marked_real_bases_queue_p): Likewise.
14805 (dfs_get_pure_virtuals): Simplify.
14806 (get_pure_virtuals): Likewise.
14807
14808 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14809
14810 * lex.c: Include tm_p.h.
14811
14812 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
14813
14814 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
14815
14816 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
14817
14818 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
14819 * pt.c (instantiate_decl): Defer comdat templates that might not be
14820 needed.
14821
14822 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
14823 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
14824 (finish_file): Likewise.
14825
14826 * decl2.c (import_export_class): Undo 12/14 change.
14827
14828 * error.c (dump_decl): operator new, not operatornew.
14829
14830 * class.c (field_decl_cmp): A nontype is "greater" than a type.
14831 * search.c (lookup_field_1): Look for the last field with the
14832 desired name.
14833
14834 2000-01-05 Nathan Sidwell <nathan@acm.org>
14835
14836 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
14837 FUNCTION_DECL.
14838
14839 2000-01-05 Nathan Sidwell <nathan@acm.org>
14840
14841 * typeck.c (build_static_cast): Don't strip target qualifiers
14842 when casting from a class.
14843
14844 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14845
14846 * class.c (warn_hidden): Initialize variable `fndecl'.
14847
14848 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
14849
14850 * decl.c (flag_isoc9x): New variable to be able to use code in
14851 c-common.c. For now always zero.
14852
14853 2000-01-03 Mark Mitchell <mark@codesourcery.com>
14854
14855 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
14856 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
14857 or unshare_base_binfos for virtual bases here.
14858 * search.c (dfs_get_vbase_types): Do it here.
14859 (get_vbase_types): Adjust.
14860
14861 2000-01-02 Mark Mitchell <mark@codesourcery.com>
14862
14863 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
14864 (BINFO_PRIMARY_MARKED_P): Use flag 5.
14865 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
14866 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
14867 (unmark_primary_bases): Remove declaration.
14868 (unmarkedp): Declare.
14869 (dfs_vbase_unmark): Likewise.
14870 * class.c (determine_primary_base): Return immediately if there
14871 are no base classes. Call mark_primary_bases here.
14872 (modify_all_direct_vtables): Remove.
14873 (modify_all_indirect_vtables): Remove.
14874 (dfs_modify_vtables_queue_p): New function.
14875 (dfs_modify_vtables): New function.
14876 (modify_all_vtables): Use them.
14877 (build_base_fields): Build FIELD_DECLs for primary virtual base
14878 classes.
14879 (create_vtable_ptr): Don't call determine_primary_base here.
14880 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
14881 (dfs_set_offset_for_vbases): ... this.
14882 (layout_virtual_bases): Use it.
14883 (layout_class_type): Call determine_primary_base here.
14884 * search.c (unmarkedp): Make it global.
14885 (shared_marked_p): Simplify.
14886 (shared_unmarked_p): Likewise.
14887 (dfs_primary_bases_queue_p): Remove.
14888 (dfs_unmark_primary_bases): Likewise.
14889 (unmark_primary_bases): Likewise.
14890 (mark_primary_bases): Simplify.
14891 (get_pure_virtuals): Don't call mark_primary_bases here.
14892 (dfs_vbase_unmark): New function.
14893 (get_vbase_types): Simplify.
14894
14895 * class.c (struct base_info): Remove.
14896 (determine_primary_base): Take has_virtual_p rather than a
14897 base_info as input. Don't calculate max_has_virtual.
14898 (finish_struct_bits): Remove max_has_virtual argument.
14899 (create_vtable_ptr): Remove max_has_virtual_p argument.
14900 (layout_virtual_bases): Remove max argument.
14901 (layout_basetypes): Likewise.
14902 (layout_class_type): Remove max_has_virtual_p argument.
14903 (finish_struct_1): Remove max_has_virtual.
14904
14905 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
14906 (layout_basetypes): Remove.
14907 * class.c (propagate_binfo_offsets): Moved here from tree.c.
14908 Update to handle primary virtual bases.
14909 (remove_base_fields): New function, split out from
14910 layout_basetypes.
14911 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
14912 (layout_virtual_bases): New function, split out from
14913 layout_basetypes. Update to handle primary virtual bases.
14914 (layout_basetypes): Moved here from tree.c. Use
14915 remove_base_fields and layout_virtual_bases.
14916 * search.c (dfs_mark_primary_bases_queue_p): New function.
14917 (mark_primary_bases): Use it.
14918 * tree.c (CEIL): Remove.
14919 (propagate_binfo_offsets): Remove.
14920 (layout_basetypes): Remove.
14921
14922 2000-01-01 Mark Mitchell <mark@codesourcery.com>
14923
14924 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
14925 (BINFO_PRIMARY_MARKED_P): New macro.
14926 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
14927 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
14928 (mark_primary_bases): New function.
14929 (unmark_primary_bases): Likewise.
14930 * search.c (get_abstract_virtuals_1): Remove.
14931 (dfs_mark_primary_bases): New function.
14932 (mark_primary_bases): Likewise.
14933 (dfs_unmark_primary_bases): Likewise.
14934 (unmark_primary_bases): Likewise.
14935 (dfs_get_pure_virtuals): Likewise.
14936
14937 2000-01-01 Mark Mitchell <mark@codesourcery.com>
14938
14939 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
14940 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
14941 (modify_one_vtable): Adjust.
14942 (fixup_vtable_deltas1): Likewise.
14943 (override_one_vtable): Likewise.
14944 * search.c (get_abstract_virtuals_1): Likewise.
14945 (get_pure_virtuals): Likewise.
14946 (expand_upcast_fixups): Likewise.
14947 * tree.c (debug_binfo): Likewise.
14948
14949 * class.c (build_vtable): Don't return a value. Don't rebuild
14950 vtables for bases that have already been handled.
14951 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
14952 already been handled.
14953 (modify_one_vtable): Adjust accordingly.
14954 (fixup_vtable_deltas1): Likewise.
14955 (finish_struct_1): Likewise.
14956
14957 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14958
14959 * call.c (build_new_method_call): Also check destructors.