Makefile.in (lang_checks): Add.
[gcc.git] / gcc / cp / ChangeLog
1 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
2
3 * Make-lang.in (check-g++, lang_checks): Add.
4
5 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6
7 PR c++/12932
8 * class.c (currently_open_derived_class): Check if
9 current_class_type is NULL_TREE.
10 * semantics.c (finish_call_expr): Check if
11 currently_open_derived_class returns NULL_TREE.
12 * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
13 parameter.
14
15 2003-11-17 Jason Merrill <jason@redhat.com>
16
17 * init.c (build_new_1): Preevaluate placement args.
18 * call.c (build_op_delete_call): Don't expose placement args to
19 overload resolution.
20
21 2003-11-16 Jason Merrill <jason@redhat.com>
22
23 * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
24 and TAGS files that include them for each front end.
25
26 2003-11-15 Bernardo Innocenti <bernie@develer.com>
27
28 PR c++/2294
29 * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
30 build failure on libjava.
31
32 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
33
34 PR c++/2294
35 * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
36 unless the declaration is a built-in.
37 (set_namespace_binding): While binding OVERLOADs with only one
38 declaration, we still need to call supplement_binding.
39
40 2003-11-14 Mark Mitchell <mark@codesourcery.com>
41
42 PR c++/12762
43 * parser.c (cp_parser_enclosed_template_argument_list): New
44 function.
45 (cp_parser_template_id): Use it.
46 (cp_parser_simple_type_specifier): Recognize invalid template
47 syntax.
48
49 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
50
51 PR c++/2094
52 * pt.c (unify): Add support for PTRMEM_CST and
53 FIELD_DECL unification.
54
55 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
56
57 * decl.c (grokfndecl): Change OK to type tree.
58
59 2003-11-12 Mark Mitchell <mark@codesourcery.com>
60
61 * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
62 CONSTRUCTOR.
63
64 * decl.c (cp_make_fname_decl): When creating a top-level
65 __FUNCTION__-like symbol, do register it with pushdecl.
66
67 * decl.c (finish_case_label): Do not check that we are within a
68 switch statement here.
69 * parser.c (struct cp_parser): Add in_iteration_statement_p and
70 in_switch_statement_p.
71 (cp_parser_new): Initialize them.
72 (cp_parser_labeled_statement): Check validity of case labels
73 here.
74 (cp_parser_selection_statement): Set in_switch_statement_p.
75 (cp_parser_iteration_statement): Set in_iteration_statement_p.
76 (cp_parser_jump_statement): Check validity of break/continue
77 statements here.
78
79 PR c++/12735
80 * cp-tree.h (duplicate_decls): Return a tree.
81 * decl.c (duplicate_decls): Clarify documentation. Return
82 error_mark_node to indicate a failed redeclaration.
83 * friend.c (do_friend): Handle that case.
84 * name-lookup.c (pushdecl): Likewise.
85
86 2003-11-11 Jason Merrill <jason@redhat.com>
87
88 * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
89 * name-lookup.c (parse_using_directive): New fn.
90 (is_associated_namespace): New fn.
91 (arg_assoc_namespace): Also check associated namespaces.
92 * name-lookup.h: Declare new fns.
93 * pt.c (maybe_process_partial_specialization): Allow
94 specialization in associated namespace.
95 * parser.c (cp_parser_using_directive): Accept attributes. Use
96 parse_using_directive.
97
98 2003-11-10 Richard Henderson <rth@redhat.com>
99
100 * cvt.c (convert_to_void): Use void_zero_node after overload failure.
101
102 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
103
104 PR c++/12832
105 * name-lookup.c (supplement_binding): Gracefully handle names
106 used at non-class scope prior declaration.
107
108 2003-11-06 Matt Austern <austern@apple.com>
109
110 * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
111 * method.c (use_thunk): give thunk same visibility as function.
112 * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
113
114 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
115
116 PR c++/11616
117 * pt.c (instantiate_pending_templates): Save and restore
118 input_location.
119
120 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
121
122 PR c++/2019
123 * friend.c (add_friend): Don't display previous declaration in
124 case of duplicate friend warning.
125
126 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
127
128 PR c++/9810
129 * call.c (build_over_call): Check access using primary template
130 if FN is a member function template.
131
132 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
133
134 PR c++/12796
135 * class.c (handle_using_decl): Set input_location before calling
136 error_not_base_type.
137
138 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
139
140 PR c++/10371
141 * semantics.c (finish_non_static_data_member): Handle when
142 both processing_template_decl and qualifying_scope are true.
143
144 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
145
146 PR c++/11076
147 * class.c (handle_using_decl): Swap arguments of error_not_base_type.
148 * parser.c (cp_parser_direct_declarator): Only resolve typename for
149 namespace scope declarations.
150
151 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
152
153 PR c++/12698, c++/12699, c++/12700, c++/12566
154 * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
155 (debug_class, debug_thunks): New.
156 * class.c (dump_class_hierarchy_1): New break out from ...
157 (dump_class_hierarchy): ... here.
158 (dump_thunk, debug_thunks, debug_class): New.
159 (update_vtable_entry_for_fn): Add ssizetype casts. Correct
160 continued search for primary binfo via virtual.
161 (build_vtbl_initializer): Follow covariant thunk alias.
162 * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
163 (finish_thunk): Look for an alias of the covariant thunk and point
164 to it.
165 (use_thunk): We should never use an alias.
166 * semantics.c (emit_associated_thunks): Do not emit aliases.
167
168 PR c++/12566
169 * cp-tree.h (cp_fname_init): Add TYPE pointer param.
170 * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
171 create an ad-hoc ERROR_MARK.
172 (cp_make_fname_decl): Adjust.
173 * pt.c (tsubst_expr): Adjust.
174
175 2003-10-23 Jason Merrill <jason@redhat.com>
176
177 PR c++/12726
178 * tree.c (build_target_expr_with_type): Don't call force_rvalue
179 for CONSTRUCTORs.
180
181 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
182
183 * call.c: Fix comment formatting.
184 * class.c: Likewise.
185 * cxx-pretty-print.c: Likewise.
186 * init.c: Likewise.
187 * parser.c: Likewise.
188 * pt.c: Likewise.
189 * semantics.c: Likewise.
190 * tree.c: Likewise.
191 * typeck.c: Likewise.
192 * typeck2.c: Likewise.
193
194 2003-10-21 Mark Mitchell <mark@codesourcery.com>
195
196 PR c++/11962
197 * typeck.c (build_x_conditional_expr): Handle missing middle
198 operands in templates.
199 * mangle.c (write_expression): Issue errors about attempts to
200 mangle a non-existant middle operator to the ?: operator.
201
202 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
203 * decl.c (cp_finish_decl): Remove clause intended for asm directives
204 in struct or class fields: this code is never executed.
205
206 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
207
208 * decl.c (start_decl): Exit if push_template_decl returns
209 error_mark_node.
210
211 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
212
213 * ChangeLog: Fix typos.
214 * call.c: Fix comment typos.
215 * class.c: Likewise.
216 * cp-tree.h: Likewise.
217 * cvt.c: Likewise.
218 * cxx-pretty-print.c: Likewise.
219 * decl.c: Likewise.
220 * decl2.c: Likewise.
221 * init.c: Likewise.
222 * mangle.c: Likewise.
223 * name-lookup.c: Likewise.
224 * parser.c: Likewise.
225 * search.c: Likewise.
226 * semantics.c: Likewise.
227 * tree.c: Likewise.
228 * typeck.c: Likewise.
229
230 2003-10-20 Jan Hubicka <jh@suse.cz>
231
232 * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
233 the expansion.
234
235 2003-10-20 Mark Mitchell <mark@codesourcery.com>
236
237 * Make-lang.in (c++.install-info): Remove.
238
239 2003-10-20 Jason Merrill <jason@redhat.com>
240
241 * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
242 field.
243
244 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
245
246 PR c++/9781, c++/10583, c++/11862
247 * decl.c (cp_finish_decl): Exit immediately if decl is an
248 error_mark_node.
249 * pt.c (push_template_decl_real): Return error_mark_node for
250 invalid template declaration of variable.
251
252 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
253
254 PR c++/12495
255 * pt.c (lookup_template_class): Handle when current_class_type
256 is a local class.
257
258 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
259
260 PR c++/2513
261 * decl.c (make_typename_type): Use dependent_type_p.
262 (make_unbound_class_template): Likewise.
263 * pt.c (instantiate_class_template): Increment
264 processing_template_decl during substitution of template friend
265 function. Preincrement processing_template_decl rather than
266 postincrement.
267 (get_mostly_instantiated_function_type): Increment
268 processing_template_decl during partial substitution of function
269 type.
270
271 2003-10-15 Jan Hubicka <jh@suse.cz>
272
273 PR c++/12574
274 * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
275
276 2003-10-14 Jason Merrill <jason@redhat.com>
277
278 PR c++/11878
279 * tree.c (build_target_expr_with_type): Call force_rvalue for
280 classes with non-trivial copy ctors.
281
282 PR c++/11063
283 * typeck.c (build_modify_expr): Call convert rather than abort.
284
285 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
286
287 Breack out decl.c (3/n)
288 * name-lookup.c: Include flags.h
289 (lookup_name_current_level): Make static.
290 (add_decl_to_level): Likewise.
291 (push_local_binding): Likewise.
292 (push_overloaded_decl): Likewise.
293 (lookup_using_namespace): Likewise.
294 (qualified_lookup_using_namespace): Likewise.
295 (lookup_type_current_level): Likewise.
296 (unqualified_namespace_lookup): Likewise.
297 (namespace_ancestor): Likewise.
298 (push_using_directive): Likewise.
299 * decl.c (pushdecl): Move to name-lookup.c.
300 (pushdecl_top_level_1): Likewise.
301 (pushdecl_top_level): Likewise.
302 (pushdecl_top_level_and_finish): Likewise.
303 (maybe_push_decl): Likewise.
304 (push_using_decl): Likewise.
305 (push_overloaded_decl): Likewise.
306 (make_anon_name): Likewise.
307 (anon_cnt): Likewise.
308 (clear_anon_tags): Likewise.
309 (maybe_inject_for_scope_var): Likewise.
310 (check_for_out_of_scope_variable): Likewise.
311 * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
312 * decl.c (warn_extern_redeclared_static): Export.
313 * cp-tree.h (warn_extern_redeclared_static): Declare.
314
315 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
316
317 * Make-lang.in: Replace uses of $(target_alias) with
318 $(target_noncanonical).
319
320 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
321
322 * ChangeLog: Add PR number to patch for PR c++/12370.
323
324 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
325
326 * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
327 (binding_for_name): Likewise.
328 (cxx_binding_clear): Move to name-lookup.c.
329 * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
330 (binding_for_name): Likewise.
331 * decl2.c (is_ancestor): Move to name-lookup.c
332 (namespace_ancestor): Likewise.
333 (add_using_namespace): Likewise.
334 (ambiguous_decl): Likewise.
335 (lookup_using_namespace): Likewise.
336 (qualified_lookup_using_namespace): Likewise.
337 (set_decl_namespace): Likewise.
338 (decl_namespace): Likewise.
339 (current_decl_namespace): Likewise.
340 (push_decl_namespace): Likewise.
341 (pop_decl_namespace): Likewise.
342 (push_scope): Likewise.
343 (pop_scope): Likewise.
344 (struct arg_lookup): Likewise.
345 (arg_assoc): Likewise.
346 (arg_assoc_args): Likewise.
347 (arg_assoc_type): Likewise.
348 (add_function): Likewise.
349 (arg_assoc_namespace): Likewise.
350 (arg_assoc_class): Likewise.
351 (arg_assoc_template_arg): Likewise.
352 (do_namespace_alias): Likewise.
353 (validate_nonmember_using_decl): Likewise.
354 (do_nonmember_using_decl): Likewise.
355 (do_toplevel_using_decl): Likewise.
356 (do_local_using_decl): Likewise.
357 (do_class_using_decl): Likewise.
358 (do_using_directive): Likewise.
359 (constructor_name_full): Likewise.
360 (constructor_name): Likewise.
361 (constructor_name_p): Likewise.
362
363 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
364
365 Break out decl.c (2/n)
366 * name-lookup.c: Include diagnostic.h
367 (cxx_binding_free): Make static.
368 (cxx_binding_make): Likewise.
369 (binding_table_new): Likewise
370 (binding_table_free): Likewise.
371 (binding_table_insert): Likewise.
372 (binding_table_find_anon_type): Likewise.
373 (binding_table_reverse_maybe_remap): Likewise.
374 (supplement_binding): Likewise.
375 * name-lookup.h (global_scope_name): Declare extern.
376 (global_type_node): Likewise.
377 (cxx_binding_free): Don't export.
378 (cxx_binding_make): Likewise.
379 (binding_table_new): Likewise.
380 (binding_table_free): Likewise.
381 (binding_table_insert): Likewise.
382 (binding_table_find_anon_type): Likewise.
383 (binding_table_reverse_maybe_remap): Likewise.
384 * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
385 * decl.c (lookup_namespace_name): Move to name-lookup.c
386 (select_decl): Likewise.
387 (unqualified_namespace_lookup): Likewise.
388 (lookup_qualified_name): Likewise.
389 (lookup_name_real): Likewise.
390 (lookup_name_nonclass): Likewise.
391 (lookup_function_nonclass): Likewise.
392 (lookup_name): Likewise.
393 (lookup_name_current_level): Likewise.
394 (lookup_type_current_level): Likewise.
395 (lookup_flags): Likewise.
396 (qualify_lookup): Likewise.
397 (lookup_tag): Likewise.
398 (lookup_tag_reverse): Likewise.
399 (getdecls): Likewise.
400 (storedecls): Remove.
401 (cxx_remember_type_decls): Move to name-lookup.c.
402 (global_bindings_p): Likewise.
403 (innermost_nonclass_level): Likewise.
404 (toplevel_bindings_p): Likewise.
405 (namespace_bindings_p): Likewise.
406 (kept_level_p): Likewise.
407 (innermost_scope_kind): Likewise.
408 (template_parm_scope_p): Likewise.
409 (push_binding): Likewise.
410 (push_local_binding): Likewise.
411 (add_decl_to_level): Likewise. Make extern.
412 (push_class_binding): Move to name-lookup.c.
413 (resume_level): Likewise. Rename to resume_scope.
414 (begin_scope): Move to name-lookup.c.
415 (indent): Likewise.
416 (binding_depth): Likewise.
417 (is_class_level): Likewise.
418 (cxx_scope_descriptor): Likewise.
419 (cxx_scope_debug): Likewise.
420 (namespace_scope_ht_size): Likewise.
421 (leave_scope): Likewise.
422 (pushlevel_class): Likewise.
423 (poplevel_class): Likewise.
424 (clear_identifier_class_values): Likewise.
425 (pushdecl_with_scope): Likewise.
426 (pushdecl_namespace_level): Likewise.
427 (pushdecl_class_level): Likewise.
428 (push_class_level_binding): Likewise.
429 (push_using_directive): Likewise.
430 (identifier_global_value): Likewise.
431 (keep_next_level_flag): Likewise.
432 (keep_next_level): Likewise.
433 (free_binding_level): Likewise.
434 (set_class_shadows): Likewise.
435 (maybe_push_cleanup_level): Likewise.
436 (cp_namespace_decls): Likewise.
437 (bt_print_entry): Likewise.
438 (print_binding_level): Likewise.
439 (print_other_binding_stack): Likewise.
440 (print_binding_stack): Likewise.
441 (push_namespace): Likewise.
442 (pop_namespace): Likewise.
443 (push_nested_namespace): Likewise.
444 (pop_nested_namespace): Likewise.
445 (cxx_saved_binding_make): Likewise.
446 (struct cxx_saved_binding_make): Likewise.
447 (store_bindings): Likewise.
448 (maybe_push_to_top_level): Likewise.
449 (push_to_top_level): Likewise.
450 (pop_from_top_level): Likewise.
451 (identifier_type_value): Likewise.
452 (set_identifier_type_value): Likewise.
453 (set_identifier_type_value_with_scope): Likewise.
454 (pop_everything): Likewise.
455 (pushtag): Likewise.
456 (follow_tag_typedef): Likewise.
457 (maybe_process_template_type_declaration): Likewise.
458 (pop_binding): Likewise.
459 * cp-tree.h: Move corresponding declarations to name-lookup.h
460
461 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
462
463 * cvt.c (ocp_convert): Move warning to C common code.
464
465 2003-10-09 Jason Merrill <jason@redhat.com>
466
467 PR c++/6392
468 * tree.c (build_cplus_array_type): Handle all quals the same.
469 (cp_build_qualified_type_real): Look through arrays first.
470
471 * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
472 (build_target_expr_with_type): Likewise.
473
474 * pt.c (instantiate_class_template): Sanity check that our
475 enclosing class has been instantiated.
476
477 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
478
479 * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
480 * error.c (dump_function_decl): Use it to skip the dump of the
481 arguments.
482 (dump_expr): When dumping a declaration found within an
483 expression, always set TFF_NO_FUNCTION_ARGUMENTS
484 in the flags.
485
486 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
487
488 PR c++/11097
489 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
490 USING_DECL.
491
492 2003-10-06 Mark Mitchell <mark@codesourcery.com>
493
494 PR c++/10147
495 * call.c (initialize_reference): Tweak error message.
496 * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
497 pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
498 * cxx-pretty-print.c (pp_cxx_id_expression): Always display
499 qualified entities using qualified names.
500
501 PR c++/12337
502 * init.c (build_new_1): Make sure that the expression returned is
503 not an lvalue.
504
505 PR c++/12344, c++/12236, c++/8656
506 * decl.c (start_function): Do not ignore attributes embedded in a
507 function declarator.
508
509 2003-10-06 Mark Mitchell <mark@codesourcery.com>
510
511 * Make-lang.in (c++.info): Remove.
512 (c++.dvi): Remove.
513 (c++.generated-manpages): Replace with ...
514 (generated-manpages): ... this.
515
516 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
517
518 * decl.c (struct cp_binding_level): Move to name-lookup.h
519 (current_binding_level): Likewise.
520 (class_binding_level): Likewise.
521 * cp-tree.h (enum scope_kind): Likewise.
522
523 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
524
525 * name-lookup.c (binding_entry_free): Nullify name and type
526 fields.
527
528 2003-10-02 Mark Mitchell <mark@codesourcery.com>
529
530 PR c++/12486
531 * typeck.c (finish_class_member_access_expr): Issue diagnostic
532 on erroneous use of qualified name.
533
534 2003-09-30 Richard Henderson <rth@redhat.com>
535
536 PR c++/12370
537 * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
538
539 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
540
541 * g++spec.c: Convert to ISO C90 prototypes.
542 * parser.c: Likewise.
543
544 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
545
546 * decl.c (pop_binding): Don't mess with nullifying binding->scope
547 here.
548 * name-lookup.c: Re-format.
549 (cxx_binding_free): Nullify binding->scope.
550
551 2003-09-29 Jan Hubicka <jh@suse.cz>
552
553 PR C++/12047
554 * except.c (build_eh_type_type): Call mark_used on the type.
555
556 2003-09-28 Richard Henderson <rth@redhat.com>
557
558 * typeck.c (c_expand_asm_operands): Take location_t, instead of
559 individual file and line.
560
561 2003-09-28 Andreas Jaeger <aj@suse.de>
562
563 * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
564 definition.
565 * init.c (push_base_cleanups): Likewise.
566 * decl2.c (finish_file): Likewise.
567 * mangle.c (init_mangle): Likewise.
568 (dump_substitution_candidates): Likewise.
569 * search.c: Likewise.
570
571 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
572
573 * name-lookup.h (get_global_value_if_present): New function.
574 (is_typename_at_global_scope): Likewise.
575 * except.c (do_begin_catch): Use get_global_value_if_present.
576 (do_end_catch): Likewise.
577 (do_allocate_exception): Likewise.
578 (do_free_exception): Likewise.
579 (build_throw): Likewise.
580 * parser.c (cp_parser_member_declaration): Likewise.
581 * rtti.c (throw_bad_cast): Likewise.
582 (throw_bad_typeid): Likewise.
583 * decl.c (check_tag_decl): Use is_typename_at_global_scope.
584 (grokdeclarator): Likewise.
585 * cp-tree.h (global_namespace): Move to name-lookup.h
586 * call.c (call_builtin_trap): Tidy.
587
588 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
589
590 PR c++/11415
591 * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
592 error message when parser->scope is global_namespace.
593
594 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
595
596 * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
597 macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
598
599 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
600
601 * decl.c (pop_binding_level, suspend_binding_level,
602 find_class_binding_level): Merge into leave_scope. Remove.
603 (leave_scope): New function.
604 (poplevel): Update.
605 (poplevel_class): Likewise.
606 (pop_namespace): Likewise.
607
608 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
609
610 PR c++/5655
611 * parser.c (cp_parser_check_access_in_redeclaration): New function.
612 (cp_parser_member_declaration): Use it.
613 (cp_parser_template_declaration_after_export): Likewise.
614
615 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
616
617 * cp-tree.h (scope_kind): Add new enumerator.
618 (keep_next_level): Change parameter type to bool.
619 (begin_scope): Change prototype.
620 (pushlevel): Remove declaration.
621 * decl.c (push_binding_level): Fold in begin_scope. Remove.
622 (struct cp_binding_level): Remove tag_tranparent field. Make keep
623 of bitsize one.
624 (keep_next_level_flag): Make a bool.
625 (cxx_scope_descriptor): Update scope names table
626 (make_cxx_scope): Fold in begin_scope. Remove..
627 (namespace_scope_ht_size): New function.
628 (begin_scope): Change prototype. Return a scope. Tidy.
629 (kept_level_p): Update.
630 (pushlevel): Remove.
631 (maybe_push_cleanup_level): Simplify.
632 (poplevel): Update for sk_cleanup and keep change.
633 (print_binding_level): Likewise.
634 (initial_push_namespace_scope): Fold in begin_scope. Remove.
635 (push_namespace): Update.
636 (pushtag): Likewise.
637 (lookup_tag): Likewise.
638 (lookup_name_current_level): Likewise.
639 (lookup_type_current_level): Likewise.
640 (cxx_init_decl_processing): Likewise.
641 (start_function): Likewise.
642 (begin_function_body): Likewise.
643 (start_method): Likewise.
644 * pt.c (push_inline_template_parms_recursive): Likewise.
645 (begin_template_parm_list): Likewise.
646 (begin_specialization): Likewise.
647 * semantics.c (do_pushlevel): Likewise.
648 (begin_compound_stmt): Likewise.
649 (begin_stmt_expr): Likewise.
650
651 2003-09-21 Richard Henderson <rth@redhat.com>
652
653 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
654 method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
655
656 2003-09-21 Richard Henderson <rth@redhat.com>
657
658 * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
659 method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
660 DECL_SOURCE_LOCATION rename and change to const.
661
662 2003-09-20 Richard Henderson <rth@redhat.com>
663
664 * decl.c, decl2.c, pt.c: Use %J in diagnostics.
665
666 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
667
668 PR c++/157
669 * parser.c (cp_parser_direct_declarator): Clear
670 parser->num_template_parameter_lists when parsing function
671 parameters.
672 (cp_parser_constructor_declarator_p): Likewise.
673
674 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
675
676 PR c++/495
677 * pt.c (tsubst_friend_class): Only use innermost template
678 arguments for the injected friend class template.
679
680 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
681
682 PR c++/12332
683 * pt.c (instantiate_class_template): Increment
684 processing_template_decl around the tsubst of a template member
685 function.
686
687 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
688
689 * decl.c (cxx_scope_descriptor): Fix thinko.
690 (struct cp_binding_level): Adjust type of binding_depth field.
691
692 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
693
694 PR c++/12320
695 * call.c (type_passed_as): Check for incomplete type.
696 (convert_for_arg_passing): Likewise.
697
698 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
699
700 PR c++/9848
701 * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
702 here.
703 * semantics.c (expand_body): Set it here on the remaining clones.
704
705 2003-09-18 Roger Sayle <roger@eyesopen.com>
706
707 * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
708 * class.c (instantiate_type): Remove FFS_EXPR case.
709
710 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
711
712 * ChangeLog: Fix recent commit.
713
714 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
715
716 * ChangeLog: Add PR number to patch for PR c++/12316.
717
718 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
719
720 * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
721 "C" types.
722 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
723
724 2003-09-17 Richard Henderson <rth@redhat.com>
725
726 * semantics.c (expand_body): Don't save/restore input_location.
727
728 2003-09-17 Mark Mitchell <mark@codesourcery.com>
729
730 PR c++/12266
731 * cp-tree.h (tsubst_flags_t): Add tf_conv.
732 * class.c (standard_conversion): Pass tf_conv to
733 instantiate_type.
734 (resolve_address_of_overloaded_function): Do not call mark_used
735 when just checking conversions.
736
737 PR debug/12066
738 * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
739 * cp-tree.h (cxx_builtin_type_decls): Declare.
740 * decl.c (builtin_type_decls): New variables.
741 (cxx_builtin_type_decls): New function.
742 (record_builtin_type): Add to builtin_type_decls.
743
744 2003-09-17 Richard Henderson <rth@redhat.com>
745
746 PR c++/12316
747 * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
748
749 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
750
751 PR c++/7939
752 * typeck.c (comptypes): Don't ICE when its first argument is
753 error_mark_node.
754 (compparms): Reverse the arguments of same_type_p.
755
756 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
757
758 PR c++/12184
759 * typeck.c (convert_arguments): Return error_mark_node for an
760 incomplete parameter. Make error message more informative.
761
762 2003-09-12 Mark Mitchell <mark@codesourcery.com>
763
764 PR c++/3907
765 * class.c (maybe_note_name_used_in_class): Refine test for whether
766 or not we are in a class scope.
767
768 * cp-tree.h (language_function): Remove x_expanding_p.
769 (expanding_p): Remove.
770 (doing_semantic_analysis_p): Remove.
771 (scope_kind): Add sk_function_parms, sk_class,
772 sk_namespace.
773 (innermost_scope_kind): New method.
774 * call.c (cxx_type_promotes_to): Use type_decays_to.
775 * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
776 (LANG_HOOKS_POPLEVEL): Likewise.
777 * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
778 template_spec_p, namespace_p, is_for_scope, is_try_scope, and
779 is_catch_scope. Add kind and explicit_spec_p.
780 (cxx_scope_descriptor): Use a lookup table.
781 (find_class_binding_level): Use "kind" field in binding_level, not
782 the various flags.
783 (pop_binding_level): Likewise.
784 (innermost_nonclass_level): Likewise.
785 (toplevel_bindings_p): Likewise.
786 (namespace_bindings_p): Likewise.
787 (template_parm_scope_p): Likewise.
788 (innermost_scope_kind): New method.
789 (current_tmpl_spec_kind): Use "kind" field in binding_level, not
790 the various flags.
791 (pushlevel): Remove check for doing_semantic_analysis_p.
792 (begin_scope): Simplify.
793 (add_decl_to_level): Use "kind" field in binding_level, not
794 the various flags.
795 (push_local_binding): Likewise.
796 (pop_label): Remove check for doing_semantic_analysis_p.
797 (poplevel): Use "kind" field in binding_level, not
798 the various flags.
799 (set_block): Remove check for doing_semantic_analysis_p.
800 (pushlevel_class): Use "kind" field in binding_level, not
801 the various flags.
802 (poplevel_class): Likewise.
803 (initial_push_namespace_scope): Likewise.
804 (maybe_push_to_top_level): Likewise.
805 (set_identifier_type_value_with_scope): Likewise.
806 (pop_everything): Likewise.
807 (maybe_process_template_type_declaration): Likewise.
808 (pushtag): Likewise.
809 (pushdecl): Likewise.
810 (pushdecl_with_scope): Likewise.
811 (check_previous_goto_1): Likewise.
812 (define_label): Likewise.
813 (finish_case_label): Likewise.
814 (lookup_tag): Likewise.
815 (unqualified_namespace_lookup): Likewise.
816 (lookup_name_real): Likewise.
817 (lookup_name_current_level): Likewise.
818 (lookup_type_current_level): Likewise.
819 (record_builtin_type): Likewise.
820 (cp_make_fname_decl): Likewise.
821 (maybe_inject_for_scope_var): Likewise.
822 (cp_finish_decl): Remove check for doing_semantic_analysis_p.
823 (start_function): Use begin_scope, not pushlevel.
824 (finish_function): Use "kind" field in binding_level, not
825 the various flags.
826 (start_method): Use begin_scope, not pushlevel.
827 (make_label_decl): Do not check expanding_p.
828 (save_function-data): Do not set expanding_p.
829 (cxx_push_function_context): Do not clear expanding_p.
830 * semantics.c (cxx_expand_function_start): Do not set expanding_p.
831
832 2003-09-14 Mark Mitchell <mark@codesourcery.com>
833
834 * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
835 an bit-field whose width exceeds that of its type.
836
837 2003-09-14 Geoffrey Keating <geoffk@apple.com>
838
839 * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
840
841 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
842
843 * ChangeLog: Follow spelling conventions.
844 * parser.c: Likewise.
845
846 2003-09-13 Richard Henderson <rth@redhat.com>
847
848 * decl2.c (finish_file): Check cgraph_assemble_pending_functions
849 during relaxation loop.
850
851 2003-09-11 David Edelsohn <edelsohn@gnu.org>
852
853 * decl2.c (var_finalized_p): Swap arms of conditional.
854
855 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
856
857 PR c++/11788
858 * typeck.c (build_address): If it is a function, mark it used.
859 (build_unary_op): Do not lose object's side-effects when taking
860 address of static member function.
861 * class.c (resolve_address_of_overloaded_function): Use
862 tsubst_flags_t parameter. Only expect overload sets. Adjust.
863 (instantiate_type): Adjust flags passing. Do not lose object's
864 side-effects when taking address of static member function.
865
866 2003-09-11 Richard Henderson <rth@redhat.com>
867
868 * semantics.c (expand_or_defer_fn): Update for new
869 cgraph_finalize_function argument.
870
871 2003-09-10 Richard Henderson <rth@redhat.com>
872
873 * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
874
875 2003-09-10 Jan Hubicka <jh@suse.cz>
876
877 * decl2.c (var_finalized_p): New.
878 (maybe_emit_vtables, write_out_vars, finish_file): Use it.
879
880 2003-09-10 Richard Henderson <rth@redhat.com>
881
882 * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
883 mark_member_pointers.
884 (lower_function): Remove.
885 * cp-tree.h: Update to match.
886 * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
887 (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
888
889 2003-09-09 Richard Henderson <rth@redhat.com>
890
891 * semantics.c (expand_or_defer_fn): Update call to
892 cgraph_finalize_function.
893
894 * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
895 always.
896
897 * decl2.c (finish_file): Avoid out-of-bounds array reference
898 during memmove.
899
900 2003-09-09 Richard Henderson <rth@redhat.com>
901
902 * decl2.c (mark_member_pointers): Rename from
903 mark_member_pointers_and_eh_handlers and don't check eh handlers.
904
905 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
906
907 PR bootstrap/12168
908 * method.c (use_thunk): Clear DECL_RTL of copied nodes.
909
910 2003-09-08 Mark Mitchell <mark@codesourcery.com>
911
912 * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
913 c_register_builtin_type.
914
915 PR c++/11786
916 * decl2.c (add_function): Do not complain about seeing the same
917 non-function twice.
918 * semantics.c (perform_koenig_lookup): Improve documentation.
919
920 PR c++/5296
921 * pt.c (try_one_overload): Add addr_p parameter.
922 (resolve_overloaded_unification): Pass it.
923
924 2003-09-08 Richard Henderson <rth@redhat.com>
925
926 * optimize.c (maybe_clone_body): Inc/dec function_depth.
927
928 2003-09-08 Richard Henderson <rth@redhat.com>
929
930 * decl.c (finish_function): Clear current_function_decl.
931 * decl2.c (mark_used): Don't push/pop gc context.
932 * optimize.c (optimize_function): Likewise.
933 * tree.c (cp_cannot_inline_tree_fn): Likewise.
934 * pt.c (instantiate_decl): Inc/dec function_depth instead.
935 * semantics.c (expand_body): Update for tree_rest_of_compilation
936 nested argument.
937
938 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
939
940 PR c++/11762
941 * error.c (dump_decl): Handle namespace-alias-definition.
942 * decl.c (warn_extern_redeclared_static): There is no point in
943 checking changes in storage class specifier for a namespace
944 declaration.
945 (duplicate_decls): Tidy diagnostic message.
946 * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
947 (pp_cxx_right_brace): Likewise.
948 (pp_cxx_original_namespace_definition): New function.
949 (pp_cxx_namespace_alias_definition): Likewise.
950 (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
951
952 2003-09-07 Jan Hubicka <jh@suse.cz>
953
954 * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
955 Avoid re-emitting variables in unit-at-a-time mode.
956
957 2003-09-06 Mark Mitchell <mark@codesourcery.com>
958
959 PR c++/11867
960 * call.c (standard_conversion): Improve comments.
961 (perform_direct_initialization): Make sure we return an expression
962 of the correct type.
963 * typeck.c (build_static_cast): Check for ambiguity and
964 accessibility when performing conversions.
965
966 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
967
968 * cp-tree.h (add_binding): Remove declaration.
969 * name-lookup.h (supplement_binding): Declare.
970 * decl.c (add_binding): Move to name-lookup.c.
971 (push_local_binding): Adjust.
972 (push_class_binding): Likewise.
973 (set_identifier_type_value_with_scope): Likewise.
974 * name-lookup.c (supplement_binding): Rename from add_binding.
975 Return a bool. Improve documentation.
976 (set_namespace_binding): Adjust.
977 * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
978
979 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
980
981 PR c++/11794
982 * class.c (pushclass): Push dependent using decls for nested
983 classes of templates too.
984
985 2003-09-06 Roger Sayle <roger@eyesopen.com>
986
987 PR c++/11409
988 * class.c (resolve_address_of_overloaded_function): When building
989 list of matching non-template function decls, ignore anticipated
990 declarations of undeclared or shadowed GCC builtins.
991
992 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
993
994 PR c++/11595
995 * decl.c (define_label): Remove unreachable timevar pop.
996 Always return the decl, even if the definition is invalid.
997
998 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
999
1000 PR c++/12167
1001 * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1002 unparsed functions queue.
1003
1004 2003-09-05 Mark Mitchell <mark@codesourcery.com>
1005
1006 PR c++/12163
1007 * call.c (perform_direct_initialization): Correct logic for
1008 direct-initialization of a class type.
1009
1010 PR c++/12146
1011 * pt.c (lookup_template_function): Robustify.
1012
1013 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
1014
1015 PR c++/11922
1016 * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1017 (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1018 is_type_p to lookup_qualified_name.
1019
1020 * semantics.c (finish_call_expr): Refactor some code.
1021
1022 PR c++/12037
1023 * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1024 (build_min_non_dep): Declare.
1025 * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1026 (build_min_non_dep): New.
1027 * cvt.c (convert_to_void): Don't explicitly copy
1028 TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1029 * call.c (build_new_method_call): Use build_min_non_dep.
1030 * decl2.c (grok_array_decl): Likewise.
1031 (build_offset_ref_call_from_tree): Likewise.
1032 * typeck.c (finish_class_member_access_expr,
1033 build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1034 build_x_conditional_expr, build_x_compound_expr): Likewise.
1035 (build_static_cast, build_reinterpret_cast,
1036 build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1037 * typeck2.c (build_x_arrow): Use build_min_non_dep.
1038 (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1039 template.
1040 * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1041 (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1042 * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1043
1044 2003-09-04 Richard Henderson <rth@redhat.com>
1045
1046 * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1047 change in cgraph_mark_needed_node arguments.
1048
1049 2003-09-02 Geoffrey Keating <geoffk@apple.com>
1050
1051 PR 12161
1052 * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1053 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1054
1055 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
1056
1057 * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1058 (expr_sizeof): Replace with ...
1059 (cxx_sizeof_or_alignof_expr): ... here.
1060 (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1061 * parser.c (cp_parser_unary_expression): Commonize alignof and
1062 sizeof handling.
1063 * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1064 substitution.
1065 * semantics.c (finish_sizeof, finish_alignof): Remove.
1066 * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1067 becomes bool. Set TREE_READONLY.
1068 (expr_sizeof): Replace with ...
1069 (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1070
1071 2003-09-04 Mark Mitchell <mark@codesourcery.com>
1072
1073 Remove cast-as-lvalue extension.
1074 * call.c (build_conditional_expr): Correct formatting.
1075 (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1076 (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1077 * cp-tree.h (non_cast_lvalue_p): Remove.
1078 (real_non_cast_lvalue_p): Remove.
1079 (non_cast_lvalue_or_else): Remove.
1080 * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1081 (real_lvalue_p): Adjust call to lvalue_p_1.
1082 (non_cast_lvalue_p): Remove.
1083 (non_cast_lvalue_or_else): Remove.
1084 (lvalue_p): Adjust call to lvalue_p_1.
1085 (lvalue_or_else): Simplify.
1086 * typeck.c (build_unary_op): Use lvalue_or_else, not
1087 non_cast_lvalue_or_else.
1088 (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1089
1090 2003-09-03 DJ Delorie <dj@redhat.com>
1091
1092 * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1093
1094 2003-09-03 Mark Mitchell <mark@codesourcery.com>
1095
1096 PR c++/12053
1097 * class.c (include_empty_classes): Correct logic for ABI version 1.
1098
1099 2003-09-03 Richard Henderson <rth@redhat.com>
1100
1101 * optimize.c (optimize_function): Push/pop ggc context around
1102 the call to optimize_inline_calls.
1103
1104 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
1105
1106 PR c++/11553
1107 * parser.c (cp_parser_decl_specifier_seq): Add check for a
1108 duplicate friend decl-specifier.
1109
1110 2003-09-02 Mark Mitchell <mark@codesourcery.com>
1111
1112 PR c++/11847
1113 * pt.c (convert_nontype_argument): Correct representation of
1114 REFERENCE_TYPE expressions.
1115
1116 PR c++/11808
1117 * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1118 (finish_call_expr): Change prototype.
1119 * parser.c (cp_parser_postfix_expression): Adjust call to
1120 finish_call_expr.
1121 * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1122 * semantics.c (finish_call_expr): Add koenig_p parameter.
1123
1124 2003-09-01 Mark Mitchell <mark@codesourcery.com>
1125
1126 PR c++/12114
1127 * cp-tree.h (initialize_reference): Change prototype.
1128 * call.c (initialize_reference): Add cleanup parameter.
1129 * decl.c (grok_reference_init): Likewise.
1130 (check_initializer): Likewise.
1131 (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1132 (duplicate_decls): When replacing an anticipated builtin, do not
1133 honor TREE_NOTHROW.
1134 * typeck.c (convert_for_initialization): Correct call to
1135 initialize_reference.
1136
1137 PR c++/11972
1138 * pt.c (dependent_type_p_r): Pass only the innermost template
1139 arguments to any_dependent_template_arguments_p.
1140
1141 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
1142
1143 * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1144 * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1145 * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1146 * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1147 (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1148
1149 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1150
1151 PR c++/12093
1152 * pt.c (build_non_dependent_expr): Do not build a
1153 NON_DEPENDENT_EXPR for a STRING_CST.
1154
1155 PR c++/11928
1156 * search.c (add_conversions): Avoid adding two conversion
1157 operators for the same type.
1158
1159 2003-08-29 Mark Mitchell <mark@codesourcery.com>
1160
1161 PR c++/6196
1162 * pt.c (tsubst_copy_and_build): Correct handling of
1163 address-of-label extension.
1164 * semantics.c (finish_goto_stmt): The address of a label must go
1165 through the lvalue-to-rvalue conversion.
1166
1167 2003-08-29 Richard Henderson <rth@redhat.com>
1168 Jason Merrill <jason@redhat.com>
1169
1170 * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1171 (LANG_HOOKS_RTL_EXPAND_STMT): New.
1172 * cp-tree.h (cxx_expand_function_start): Declare.
1173 * decl.c (start_function): Use allocate_struct_function.
1174 Move stmts_are_full_exprs_p assertion from expand_body.
1175 Do not free_after_parsing or free_after_compilation.
1176 (cxx_push_function_context): Move code to set struct function
1177 data from genrtl_start_function.
1178 * optimize.c (optimize_function): Don't inc/dec function_depth.
1179 * semantics.c (expand_body): Use tree_rest_of_compilation.
1180 (cxx_expand_function_start): Rename from genrtl_start_function,
1181 omit bits done by tree_rest_of_compilation.
1182 (genrtl_finish_function): Remove.
1183 (clear_decl_rtl): Move to ../tree-optimize.c.
1184
1185 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
1186
1187 PR c++/11811
1188 * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1189 function.
1190 * cxx-pretty-print.h: Declare.
1191 * error.c (dump_template_parameter): Use it.
1192 (dump_type): Likewise.
1193
1194 2003-08-28 Mark Mitchell <mark@codesourcery.com>
1195
1196 * init.c (decl_constant_value): Deal with COND_EXPR specially.
1197 * call.c (build_conditional_expr): Revert previous patch.
1198
1199 PR optimization/5079
1200 * call.c (build_conditional_expr): Use decl_constant_value to
1201 simplify the arguments.
1202
1203 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
1204
1205 * parser.c (struct cp_token): Use enum bitfields.
1206 (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1207 512B allocation unit.
1208 (cp_parser_token_tree_map_node): Use enum bitfields.
1209
1210 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
1211
1212 PR c++/11871
1213 * decl.c (push_class_level_binding): Correct old_decl value from
1214 my 2003-07-29 reorganization.
1215
1216 * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1217 (build_new_method_call): Add goto finish.
1218 * semantics.c (simplify_aggr_init_exprs_r): Don't set
1219 TREE_SIDE_EFFECTS on a call.
1220
1221 2003-08-25 Richard Henderson <rth@redhat.com>
1222
1223 * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1224
1225 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1226
1227 * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1228 (cxx_pretty_printer): Adjust base type.
1229 (pp_cxx_function_specifier): Declare.
1230 * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1231 (pp_cxx_left_paren): Likewise.
1232 (pp_cxx_right_paren): Likewise.
1233 (pp_cxx_dot): Likewise.
1234 (pp_cxx_arrow): Likewise.
1235 (pp_cxx_semicolon): Likewise.
1236 (pp_cxx_identifier): Likewise.
1237 (pp_cxx_cv_qualifier_seq): Likewise.
1238 (pp_cxx_storage_class_specifier): Likewise.
1239 (pp_cxx_expression_list): Likewise.
1240 (pp_cxx_space_for_pointer_operator): Likewise.
1241 (pp_cxx_init_declarator): Likewise.
1242 (pp_cxx_call_argument_list): Likewise.
1243 (pp_cxx_nonconsecutive_character): Tidy.
1244 (pp_cxx_conversion_function_id): New function.
1245 (pp_cxx_template_id): Likewise.
1246 (pp_cxx_template_keyword_if_needed): Likewise.
1247 (pp_cxx_nested_name_specifier): Likewise.
1248 (pp_cxx_unqualified_id): Tidy
1249 (pp_cxx_qualified_id): Handle more nodes.
1250 (pp_cxx_primary_expression): Tidy.
1251 (pp_cxx_postfix_expression): Likewise.
1252 (pp_cxx_new_expression): Tidy.
1253 (pp_cxx_delete_expression): Likewise.
1254 (pp_cxx_cast_expression): New function.
1255 (pp_cxx_pm_expression): Tidy.
1256 (pp_cxx_conditional_expression): Likewise.
1257 (pp_cxx_assignment_operator): New function.
1258 (pp_cxx_assignment_expression): Tidy.
1259 (pp_cxx_expression): New function.
1260 (pp_cxx_function_specifier): Likewise.
1261 (pp_cxx_decl_specifier_seq): Likewise.
1262 (pp_cxx_simple_type_specifier): Tidy.
1263 (pp_cxx_type_specifier_seq): Likewise.
1264 (pp_cxx_ptr_operator): New function.
1265 (pp_cxx_implicit_parameter_type): Likewise.
1266 (pp_cxx_parameter_declaration): Tidy.
1267 (pp_cxx_parameter_declaration_clause): New function.
1268 (pp_cxx_exception_specification): Likewise.
1269 (pp_cxx_direct_declarator): Tidy.
1270 (pp_cxx_declarator): Likewise.
1271 (pp_cxx_ctor_initializer): New function.
1272 (pp_cxx_function_definition): Likewise.
1273 (pp_cxx_abstract_declarator): Tidy.
1274 (pp_cxx_direct_abstract_declarator): Likewise.
1275 (pp_cxx_type_id): Likewise.
1276 (pp_cxx_exception_declaration): New function.
1277 (pp_cxx_statement): Likewise.
1278 (pp_cxx_simple_declaration): Likewise.
1279 (pp_cxx_template_parameter_list): Likewise.
1280 (pp_cxx_template_parameter): Likewise.
1281 (pp_cxx_template_declaration): Likewise.
1282 (pp_cxx_explicit_specialization): Likewise.
1283 (pp_cxx_explicit_instantiation): Likewise.
1284 (pp_cxx_declaration): Tidy.
1285 (pp_cxx_pretty_printer_init): Initialize more fields.
1286
1287 2003-08-25 Mark Mitchell <mark@codesourcery.com>
1288
1289 PR c++/8795
1290 * cp-tree.h (build_cplus_method_type): Remove.
1291 * call.c (standard_conversion): Use build_method_type_directly
1292 instead of build_cplus_method_type.
1293 * class.c (build_clone): Likewise.
1294 (adjust_clone_args): Likewise.
1295 * decl.c (build_ptrmem_type): Likewise.
1296 (grokdeclarator): Likewise.
1297 (check_function_type): Likewise.
1298 * decl2.c (grok_method_quals): Likewise.
1299 (maybe_retrofit_in_chrg): Likewise.
1300 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1301 (tsubst_function_type): Likewise.
1302 (tsubst): Likewise.
1303 * tree.c (build_cplus_method_type): Remove.
1304 * typeck.c (merge_types): Use build_method_type_directly.
1305
1306 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1307
1308 PR c++/3765
1309 * search.c (dfs_access_in_type): Fix typo in comment.
1310 (dfs_accessible_queue_p): Likewise.
1311 (dfs_accessible_p): Only terminate when a friend is found.
1312 (accessible_p): Return immediately if access_in_type allows
1313 access.
1314
1315 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1316
1317 PR c++/641, c++/11876
1318 * friend.c (add_friend): Add complain parameter.
1319 (make_friend_class): Likewise.
1320 (do_friend): Adjust add_friend call.
1321 * decl.c (grokdeclarator): Adjust make_friend_class call.
1322 * parser.c (cp_parser_member_declaration): Likewise.
1323 (cp_parser_template_declaration_after_export): Likewise.
1324 * pt.c (instantiate_class_template): Adjust make_friend_class
1325 and add_friend call.
1326 * cp-tree.h (make_friend_class): Adjust declaration.
1327 (add_friend): Likewise.
1328
1329 2003-08-21 Jason Merrill <jason@redhat.com>
1330
1331 PR c++/11283
1332 * call.c (build_conditional_expr): Ignore cv-qual differences for
1333 non-class types.
1334
1335 2003-08-21 Mark Mitchell <mark@codesourcery.com>
1336
1337 PR c++/11551
1338 * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1339 (cp_parser_primary_expression): Adjust call to
1340 cp_parser_id_expression.
1341 (cp_parser_unqualified_id): Complain about the use of
1342 typedef-names in a destructor declarator.
1343 (cp_parser_postfix_expression): Adjust call to
1344 cp_parser_id_expression.
1345 (cp_parser_type_parameter): Likewise.
1346 (cp_parser_template_argument): Likewise.
1347 (cp_parser_declarator_id): Likewise.
1348
1349 PR c++/11919
1350 * call.c (standard_conversion): Use same_type_p, not pointer
1351 equality, to compare types.
1352
1353 PR c++/10762
1354 * parser.c (cp_parser_using_declaration): Check for invalid uses
1355 of template-ids here...
1356 * decl2.c (do_class_using_decl): ... rather than here.
1357
1358 2003-08-20 Mark Mitchell <mark@codesourcery.com>
1359
1360 PR c++/11834
1361 * pt.c (more_specialized): Bump processing_template_decl.
1362
1363 2003-08-21 Jason Merrill <jason@redhat.com>
1364
1365 PR c++/11614
1366 * decl.c (grokdeclarator): Recognize a flexible array based on the
1367 type, not the form of the declarator.
1368
1369 2003-08-20 Jason Merrill <jason@redhat.com>
1370
1371 * semantics.c (simplify_aggr_init_expr): Split out from
1372 simplify_aggr_init_exprs_r. Convert slot address to match
1373 the return type.
1374 * cp-tree.h: Declare it.
1375 * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1376 DECL_NAME of a user variable.
1377
1378 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
1379
1380 PR c++/11945
1381 * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1382 COMPOUND_EXPR.
1383 * semantics.c (finish_expr_stmt): Always convert to void.
1384 * typeck.c (build_x_compound_exp): Always convert to void.
1385
1386 2003-08-19 Mark Mitchell <mark@codesourcery.com>
1387
1388 PR c++/11684
1389 * cp-tree.h (grok_op_properties): Change prototype.
1390 * decl.c (grok_op_properties): Add complain parameter.
1391 (grokfndecl): Pass it.
1392 * pt.c (tsubst_decl): Adjust accordingly.
1393
1394 PR c++/10926
1395 * decl.c (start_method): Return immediately if push_template_decl
1396 does not like the declaration.
1397 * pt.c (push_template_decl_real): Disallow member template
1398 destructors.
1399
1400 PR c++/11036
1401 * cp-tree.h (add_binding): Add prototype.
1402 * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1403 (maybe_warn_about_overly_private_class): Use
1404 CLASSTYPE_DESTRUCTORS.
1405 (pushclass): Adjust call to set_identifier_type_value.
1406 * decl.c (add_binding): Give it external linkage.
1407 (push_local_binding): Adjust call to add_binding.
1408 (push_class_binding): Likewise.
1409 (set_identifier_type_value_with_scope): Change prototype. Use
1410 add_binding for global bindings.
1411 (set_identifier_type_value): Adjust accordingly.
1412 (pushtag): Likewise.
1413 (pushdecl): Use set_identifier_type_value, not
1414 set_identifier_type_value_with_scope.
1415 (pushdecl_namespace_level): Adjust calls to
1416 SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1417 (pushdecl_class_level): Likewise.
1418 (lookup_tag): Use select_decl.
1419 (select_decl): Improve comment.
1420 (record_builtin_type): Do not call pushdecl.
1421 (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1422 (cp_finish_decl): Adjust call to set_identifier_type_value.
1423 (check_elaborated_type_specifier): Improve checks for invalid uses
1424 of typedefs.
1425 (xref_tag): Adjust call to check_elaborated_type_specifier.
1426 * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1427 * name-lookup.c (set_namespace_binding): Use add_binding.
1428 * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1429 rather than an IDENTIFIER_NODE, to represent built-in types, if
1430 requested by the caller.
1431 (cp_parser_postfix_expression): Adjust call.
1432 (cp_parser_type_specifier): Likewise.
1433 (cp_parser_elaborated_type_specifier): Adjust call to
1434 check_elaborated_type_specifier.
1435 * typeck2.c (build_functional_cast): Do not perform name lookups.
1436
1437 PR c++/10717
1438 * decl.c (expand_static_init): Remove unnecessary code.
1439
1440 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
1441
1442 PR c++/10538, PR c/5582
1443 * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1444
1445 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1446
1447 PR c++/11174
1448 * init.c (build_offset_ref): Perform access checking for
1449 pointer to member correctly.
1450
1451 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
1452
1453 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1454
1455 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
1456
1457 PR c++/11957
1458 * cp-tree.h (finish_stmt_expr): Add bool parameter.
1459 * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1460 adjust the stmt_expr here.
1461 (build_vec_init): Use finish_stmt_expr_expr, convert result to
1462 array type.
1463 * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1464 call.
1465 * pt.c (tsubst_copy): Likewise.
1466 * semantics.c (finish_stmt_expr): Add parameter.
1467
1468 * pt.c (instantiate_class_template): Push to class's scope before
1469 tsubsting base.
1470
1471 2003-08-17 Jan Hubicka <jh@suse.cz>
1472
1473 PR C++/11702
1474 * semantics.c (finish_id_expression): Mark all functions as used.
1475
1476 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
1477
1478 PR c++/11512
1479 * cvt.c (convert_to_void): Indicate which side of conditional has
1480 no effects, and rhs of comma operator. Test for no sideeffect
1481 expressions here and always build a convert expr.
1482 * init.c (expand_default_init): Convert the init to void.
1483 * typeck.c (build_x_compound_expr): Do not check for side effects
1484 here.
1485 (build_compound_expr): Do not convert lhs when building a
1486 template.
1487
1488 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1489
1490 * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1491 * decl2.c (build_offset_ref_call_from_tree): Use
1492 build_non_dependent_expr.
1493 * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1494 * pt.c (build_non_dependent_expr): Set operand.
1495
1496 2003-08-14 Jan Hubicka <jh@suse.cz>
1497
1498 * decl2.c (mark_member_pointers): Rename to...
1499 (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1500 (lower_function): Update call.
1501 * except.c (eh_type_info): Break out from ...
1502 (build_eh_type): ... here; tinfo is already used.
1503 (finish_eh_spec_block): Mark tinfos as used.
1504 * semantics.c (finish_handler_params): Mark tinfo as used.
1505 * cp-tree.h (eh_type_info): Declare.
1506
1507 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
1508
1509 * pt.c (instantiate_class_template): Set location before
1510 substuting bases.
1511
1512 * decl.c (make_typename_type): Use my_friendly_assert.
1513 * pt.c (tsubst_aggr_type): Rearrange context substitution.
1514
1515 2003-08-14 Jan Hubicka <jh@suse.cz>
1516
1517 * method.c (use_thunk): Expand body directly.
1518
1519 2003-08-12 Mark Mitchell <mark@codesourcery.com>
1520
1521 PR c++/11703
1522 * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1523 determine whether or not to promote types.
1524 (convert_for_arg_passing): Likewise.
1525 * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1526 templates.
1527 * pt.c (tsubst_decl): Do not expect it to be set.
1528
1529 PR c++/9512
1530 PR c++/10923
1531 * cp-tree.h (check_elaborated_type_specifier): Declare.
1532 (handle_class_head): Remove.
1533 (note_got_semicolon): Likewise.
1534 (note_list_got_semicolon): Likewise.
1535 (finish_class_definition): Likewise.
1536 * decl.c (check_elaborated_type_specifier): Make it public.
1537 Robustify.
1538 (handle_class_head): Remove.
1539 * parser.c (cp_parser_elaborated_type_specifier): Use
1540 check_elaborated_type_specifier.
1541 (cp_parser_class_specifier): Do not call finish_class_definition.
1542 (cp_parser_class_head): Or handle_class_head. Check for
1543 over-qualified names.
1544 * semantics.c (finish_class_definition): Remove.
1545
1546 * parser.c (cp_parser_check_for_definition_in_return_type): New
1547 function.
1548 (cp_parser_simple_declaration): Adjust call to
1549 cp_parser_init_declarator.
1550 (cp_parser_decl_specifier_seq): Change type of
1551 declares_class_or_enum parameter.
1552 (cp_parser_explicit_instantiation): Adjust accordingly.
1553 (cp_parser_type_specifier): Change type of
1554 declares_class_or_enum parameter.
1555 (cp_parser_init_declarator): Add declares_class_or_enum
1556 parameter.
1557 (cp_parser_parameter_declaration): Adjust call to
1558 cp_parser_decl_specifier_seq.
1559 (cp_parser_function_definition): Likewise.
1560 (cp_parser_member_declaration): Likewise.
1561 (cp_parser_single_declaration): Likewise.
1562
1563 * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1564 has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1565 (TYPE_OVERLOADS_CALL_EXPR): Remove.
1566 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1567 (TYPE_OVERLOADS_ARROW): Likewise.
1568 (CLASSTYPE_GOT_SEMICOLON): Likewise.
1569 * class.c (check_bases): Do not set them.
1570 (finish_struct_1): Likewise.
1571 * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1572 (build_ptrmemfunc_type): Likewise.
1573 (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1574 (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1575 * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1576 * lex.c (note_got_semicolon): Remove.
1577 (note_list_got_semicolon): Likewise.
1578 * parser.c (cp_parser_simple_declaration): Do not call
1579 note_list_got_semicolon.
1580 * pt.c (list_eq): Remove.
1581 (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1582 (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1583 (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1584 * ptree.c (cxx_print_type): Do not print them.
1585 * semantics.c (finish_member_class_template): Do not call
1586 note_list_got_semicolon.
1587
1588 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
1589
1590 * call.c (standard_conversion): Opaque pointers interconvert.
1591
1592 * testsuite/g++.dg/other/opaque-3.C: New.
1593
1594 2003-08-11 Mark Mitchell <mark@codesourcery.com>
1595
1596 * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1597 types correctly.
1598
1599 2003-08-10 Mark Mitchell <mark@codesourcery.com>
1600
1601 PR c++/11789
1602 * cp-tree.h (get_vbase): Remove.
1603 (get_vbase_types): Remove.
1604 * init.c (expand_member_init): Correct logic for looking up base
1605 classes.
1606
1607 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
1608
1609 * error.c (dump_expr): Tidy.
1610 * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1611 (pp_cxx_begin_template_argument_list): Likewise.
1612 (pp_cxx_end_template_argument_list): Likewise.
1613 (is_destructor_name): Likewise.
1614 (pp_cxx_unqualified_id): Likewise.
1615 (pp_cxx_qualified_id): Likewise.
1616 (pp_cxx_id_expression): Likewise.
1617 (pp_cxx_new_expression): Likewise.
1618 (pp_cxx_delete_expression): Likewise.
1619 (pp_cxx_pm_expression): Likewise.
1620 (pp_cxx_type_specifier): Rework.
1621 (pp_cxx_type_id): Likewise.
1622 (pp_cxx_primary_expression): Likewise.
1623 (pp_cxx_postfix_expression): Likewise.
1624 (pp_cxx_unary_expression): Likewise.
1625 (pp_cxx_multiplicative_expression): Likewise.
1626 (pp_cxx_conditional_expression): Likewise.
1627 (pp_cxx_assignment_expression): Likewise.
1628 (pp_cxx_pretty_printer_init): Tidy.
1629
1630 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
1631
1632 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1633 NODE is always a TREE_VEC of nonzero size.
1634 (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1635 * decl2.c (arg_assoc): Template args will be a vec.
1636 * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1637 dump_template_argument_list.
1638 (dump_template_parms): Args will be a vec.
1639 * parser.c (cp_parser_template_argument_list): Produce a
1640 vector, not a list.
1641 * pt.c (coerce_template_parms): Args are always vectors.
1642 (mangle_class_name_for_template): Likewise.
1643 (lookup_template_function): Likewise.
1644 (lookup_template_class): Likewise.
1645 (tsubst_template_args): Likewise.
1646 (tsubst_baselink): Use tsubst_template_args.
1647 (tsubst_qualified_id): Likewise.
1648 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1649 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1650 (any_dependent_template_args_p): Args are always vectors.
1651 * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1652
1653 PR c++/11670
1654 * call.c (convert_like_real): Add rvalue binding error message.
1655 * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1656 really a cast.
1657
1658 PR c++/10530
1659 * pt.c (dependent_type_p_r): A dependent template-id is a class
1660 type with dependent template arguments, or a bound template
1661 template parameter.
1662 (type_dependent_expression_p): A template function decl cannot
1663 have a dependent context.
1664
1665 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1666
1667 PR c++/5767
1668 * parser.c (cp_parser_class_name): Return immediately when scope
1669 is error_mark_node.
1670
1671 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
1672
1673 * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1674
1675 * cp/call.c (standard_conversion): Support opaque types.
1676 Include target.h.
1677 (strip_top_quals): Use cp_build_qualified_type instead of
1678 TYPE_MAIN_VARIANT.
1679
1680 * cp/typeck.c (convert_for_assignment): Support opaque types.
1681
1682 * testsuite/g++.dg/other/opaque-1.C: New.
1683
1684 * testsuite/g++.dg/other/opaque-2.C: New.
1685
1686 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
1687
1688 * decl.c (grokparms): Use cp_build_qualified_type instead
1689 TYPE_MAIN_VARIANT.
1690
1691 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
1692
1693 * cxx-pretty-print.h: New file.
1694 * cxx-pretty-print.c: Likewise.
1695 * error.c (scratch_pretty_printer): Change type.
1696 (init_error): Tidy.
1697 (dump_aggr_type): Likewise.
1698 (dump_global_iord): Likewise.
1699 (dump_expr): Likewise.
1700 (dump_char): Remove.
1701 * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1702 (cxx_initialize_diagnostics): New function.
1703 * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1704 (CXX_PRETTY_PRINT_H): New variable.
1705 (cp/cxx-pretty-print.o): New rule.
1706 (cp/cp-lang.o): Update dependence.
1707 (cp/error.o): Likewise.
1708
1709 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1710
1711 * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1712 (DECL_DECLARED_INLINE_P): Remove.
1713 * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1714 if decl is a FUNCTION_DECL. This never made sense, but now it is
1715 required to avoid a tree check failure.
1716 * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1717 * optimize.c (maybe_clone_body): Likewise.
1718
1719 2003-08-04 Roger Sayle <roger@eyesopen.com>
1720
1721 * decl.c (cxx_insert_default_attributes): Delete.
1722 * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1723 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1724
1725 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
1726
1727 PR c++/11704
1728 * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1729 unknown type.
1730
1731 PR c++/11766
1732 * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1733 member functions.
1734
1735 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1736
1737 PR c++/9447
1738 * cp-tree.def (USING_DECL): Document its type.
1739 * class.c (pushclass): If we're entering a template, push any
1740 dependent using decls it has.
1741 * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1742 a dependent scope.
1743 * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1744 (tsubst): Remove USING_DECL checks.
1745 (type_dependent_expression_p): Remove USING_DECL case.
1746 * semantics.c (finish_member_declaration): A USING_DECL's type
1747 indicates whether it is dependent.
1748
1749 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
1750
1751 * cp-tree.h (pushclass): Remove unneeded parameter.
1752 * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1753 (push_nested_class): Adjust pushclass call.
1754 * pt.c (instantiate_class_template): Likewise.
1755 * semantics.c (begin_class_definition): Likewise.
1756
1757 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
1758
1759 * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1760
1761 2003-08-01 Mark Mitchell <mark@codesourcery.com>
1762
1763 PR c++/11697
1764 * decl.c (decls_match): Don't ignore the types of template
1765 classes.
1766
1767 PR c++/11744
1768 * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1769
1770 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1771
1772 PR c++/8442, c++/8806
1773 * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1774 preferred.
1775 (check_elaborated_type_specifier): Add allow_template_p
1776 parameter. Check tag mismatch and class template.
1777 (xref_tag): Add template_header_p parameter. Add assertion
1778 that name is an IDENTIFIER_NODE. Remove implicit typename
1779 warning. Simplify lookup process if globalize is true.
1780 (cxx_init_decl_processing): Adjust call to xref_tag.
1781 (xref_tag_from_type): Likewise.
1782 * decl2.c (handle_class_head): Likewise.
1783 * parser.c (cp_parser_elaborated_type_specifier,
1784 cp_parser_class_head): Likewise.
1785 * rtti.c (init_rtti_processing, build_dynamic_cast1,
1786 tinfo_base_init, emit_support_tinfos): Likewise.
1787 * class.c (is_base_of_enclosing_class): Remove.
1788 * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1789 template template argument.
1790 * cp-tree.h (xref_tag): Adjust declaration.
1791 (is_base_of_enclosing_class): Remove.
1792 * NEWS: Document template template argument change.
1793
1794 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
1795
1796 * parser.c (cp_parser_init_declarator,
1797 cp_paser_member_declaration): Reformat.
1798 * pt.c (lookup_template_class, type_unification_real, unify,
1799 type_dependent_expression_p): Reformat.
1800
1801 PR c++/11295
1802 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1803 tf_stmt_expr_body.
1804 (finish_stmt_expr_expr): Declare.
1805 * parser.c (cp_parser_primary_expression): Tell
1806 cp_parser_compount_statement that it is a statement expression.
1807 (cp_parser_statement, cp_parser_labeled_statement,
1808 cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1809 in_statement_expr_p parameter.
1810 (cp_parser_expression_statement): Likewise. Call
1811 finish_stmt_expr_expr for final expression of a statement
1812 expression.
1813 (cp_parser_for_init_statement,
1814 cp_parser_implicitly_scoped_statement,
1815 cp_parser_already_scoped_statement, cp_parser_function_definition,
1816 cp_parser_try_block, cp_parser_handled): Adjust.
1817 * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1818 (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1819 (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1820 * semantics.c (finish_expr_stmt): Do not deal with statement
1821 expressions.
1822 (begin_stmt_expr): Clear last_expr_type.
1823 (finish_stmt_expr_expr): New.
1824 (finish_stmt_expr): Process the value expression.
1825
1826 * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1827 compound expr inside the target's initializer.
1828
1829 PR c++/11525
1830 * parser.c (cp_parser_primary_expression): Do not set
1831 non-constant-p merely because it is a dependent scope.
1832
1833 PR c++/9447
1834 * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1835 * semantics.c (finish_expr_stmt): Do not convert to void in a
1836 template.
1837
1838 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
1839
1840 * pt.c (coerce_template_parms): Refactor.
1841 (fn_type_unification): Increment processing_template_decl when
1842 tsubsting an incomplete set of explicit args.
1843
1844 PR c++/11347
1845 * pt.c (instantiate_class_template): Increment
1846 processing_template_decl around the tsubst of a template member
1847 class.
1848 (tsubst_qualified_id): Assert we do not have a dependent scope.
1849
1850 * pt.c (coerce_template_template_parms, lookup_template_class,
1851 can_complete_type_without_circularity, instantiate_class_template,
1852 tsubst_decl, unify): Reformat.
1853
1854 2003-07-31 Jan Hubicka <jh@suse.cz>
1855
1856 * decl2.c (maybe_make_one_only): Use mark_referenced.
1857 * method.c (use_thunk): Likewsie.
1858
1859 2003-07-30 Jan Hubicka <jh@suse.cz>
1860
1861 * class.c (build_vtable_entry_ref): Kill.
1862 (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1863 (build_vfn_ref): Do not call build_vtable_entry_ref.
1864 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1865 * cp-tree.h (prepare_assemble_variable): Kill.
1866 * cp-decl.c (prepare_assemble_variable): Kill.
1867
1868 2003-07-29 Geoffrey Keating <geoffk@apple.com>
1869
1870 * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1871 of setting valid_pch by hand.
1872
1873 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1874
1875 * decl.c (finish_enum): Initialize underlying_type.
1876
1877 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
1878
1879 PR c++/9447
1880 * decl.c (add_binding): Add bval local variable.
1881 (push_class_level_binding): Likewise. Allow a USING_DECL to be
1882 pushed.
1883 * decl2.c (do_class_using_decl): The type of a using decl is
1884 unknown.
1885 * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
1886 function call lookup code.
1887 * pt.c (tsubst): A USING_DECL will have unknown type.
1888 (tsubst_copy_and_build): Allow a using decl.
1889 (type_dependent_expression_p): A USING_DECL will make it
1890 dependent.
1891 * semantics.c (finish_member_declaration): Push a dependent using
1892 declaration.
1893
1894 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1895
1896 PR c++/11530
1897 * parser.c (cp_parser_postfix_expression): Do not call mark_used.
1898 * semantics.c (finish_id_expression): Call mark_used for all
1899 declarations.
1900
1901 2003-07-28 Mark Mitchell <mark@codesourcery.com>
1902
1903 PR c++/11667
1904 * call.c (standard_conversion): Allow all integral->enumeral
1905 conversions, after marking them as bad.
1906 * decl.c (finish_enum): Make sure that all enumerators are
1907 properly converted to the underlying type.
1908 (build_enumerator): Set DECL_CONTEXT for namespace-scope
1909 enumeration types.
1910 * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
1911 (tsubst_enum): Tidy.
1912
1913 * Make-lang.in (typeck.o): Depend on convert.h.
1914 (class.o): Likewise.
1915 (rtti.o): Likewise.
1916 * call.c: Include convert.h.
1917 (convert_arg_to_ellipsis): Use convert_to_real.
1918 * class.c: Include convert.h.
1919 (build_base_path): Use convert_to_integer.
1920 * rtti.c: Include convert.h.
1921 (build_headof): Use convert_to_integer.
1922 * typeck.c: Include convert.h.
1923 (decay_conversion): Use convert_to_integer.
1924 (build_unary_op): Use build_nop.
1925 (get_delta_difference): Use convert_to_integer.
1926 (build_ptrmemfunc): Avoid unnecessary conversions.
1927
1928 2003-07-28 Jan Hubicka <jh@suse.cz>
1929
1930 * decl2.c (mark_member_pointers): Verify that member pointer points to
1931 the function.
1932
1933 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
1934
1935 * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
1936 (finish_compound_stmt): Remove no scope arg.
1937 * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
1938 end_compound_stmt calls.
1939 (expand_static_init, begin_destructor_body, begin_function_body,
1940 finish_function_body): Likewise.
1941 * decl2.c (start_objects, finish_objects,
1942 start_static_storage_duration_function,
1943 finish_static_storage_duration_function): Likewise.
1944 * init.c (begin_init_stmts, finish_init_stmts,
1945 construct_virtual_base, build_vec_init): Likewise.
1946 * method.c (do_build_assign_ref, synthesize_method): Likewise.
1947 * parser.c (cp_parser_compound_statement,
1948 cp_parser_implicitly_scoped_statement,
1949 cp_parser_already_scoped_statement): Likewise.
1950 * pt.c (tsubst_expr): Likewise.
1951 * semantics.c (begin_compound_stmt): No scope arg is a bool.
1952 (finish_compound_stmt): Remove no scope arg.
1953
1954 * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
1955 always dyadic.
1956
1957 2003-07-27 Mark Mitchell <mark@codesourcery.com>
1958
1959 * call.c (standard_conversion): Tweak handling of
1960 pointer-to-member types.
1961 * pt.c (tsubst): Correctly qualify pointers-to-data member types.
1962 * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
1963 pointer-to-data member types.
1964
1965 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
1966
1967 * parser.c (cp_parser_type_parameter): Reformat.
1968 (cp_parser_parameter_declaration): Deprecate default args where
1969 not allowed.
1970
1971 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
1972
1973 * cfns.h: Rebuilt.
1974
1975 * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
1976 (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
1977 * init.c (begin_init_stmts): Make static. Return is_global
1978 value. Always call begin_stmt_expr.
1979 (finish_init_stmts): Make static. Add is_global parm. Always
1980 building a stmt tree.
1981 (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
1982 (build_vec_init): Likewise. Always building a stmt tree.
1983 (expand_default_init): Always building a stmt tree.
1984 (get_temp_regvar): Likewise.
1985 * semantics.c (begin_global_stmt_expr,
1986 finish_global_stmt_expr): Remove.
1987
1988 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1989
1990 * cp-tree.h (build_compound_expr): Take LHS & RHS args.
1991 (build_x_compound_expr_from_list): Declare.
1992 * typeck.c (build_x_compound_expr_from_list): New.
1993 (build_x_compound_expr): Adjust.
1994 (build_compound_expr): Remove unreachable code. Take two
1995 parameters, adjust.
1996 * decl.c (grok_reference_init): Use
1997 build_x_compound_expr_from_list.
1998 (expand_static_init): Adjust build_compound_expr call.
1999 (cxx_maybe_build_cleanup): Likewise.
2000 * init.c (perform_member_init): Use
2001 build_x_compound_expr_from_list.
2002 (build_new_1): Likewise.
2003 (build_vec_delete): Adjust build_compound_expr calls.
2004 (build_vbase_delete): Likewise.
2005 * typeck2.c (store_init_value): Use
2006 build_x_compound_expr_from_list.
2007 (build_functional_cast): Likewise.
2008
2009 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2010
2011 * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2012 * decl.c (make_typename_type): Pass it.
2013 * pt.c (lookup_template_class): Use it.
2014 (resolve_typename_type): Pass it.
2015 * semantics.c (finish_template_type): Pass it.
2016
2017 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2018
2019 PR c++/11617
2020 * cp-tree.h (qualified_name_lookup_error): Declare.
2021 * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2022 errors.
2023 (tsubst_expr) <DECL_STMT case>: Likewise.
2024 (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2025 * semantics.c (qualified_name_lookup_error): New, broken out of ...
2026 (finish_id_expression): ... here. Use it.
2027
2028 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
2029
2030 * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2031
2032 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2033
2034 PR c++/11596
2035 * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2036 (tsubst_template_arg): New.
2037 (tsubst_template_arg_vector): Rename to ...
2038 (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2039 tsubst_template_arg.
2040 (coerce_template_parms): Use tsubst_template_arg for default
2041 value.
2042 (tsubst_template_parms): Likewise.
2043 (tsubst_aggr_type): Adjust.
2044 (tsubst_decl): Likewise.
2045 (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2046 (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2047
2048 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2049
2050 * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2051 * error.c: Use the new pretty-printer framework.
2052
2053 2003-07-24 Per Bothner <pbothner@apple.com>
2054
2055 * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2056 which causes errors messages to incorrectly mention included files.
2057
2058 2003-07-24 Mark Mitchell <mark@codesourcery.com>
2059
2060 * cp-tree.h (convert_to_base_statically): Declare.
2061 * call.c (build_special_member_call): Convert INSTANCE to the base
2062 type.
2063 * class.c (convert_to_base_statically): New method.
2064 * init.c (construct_virtual_base): Use it.
2065 * method.c (do_build_assign_ref): Fix typo in comment.
2066
2067 2003-07-24 Jason Merrill <jason@redhat.com>
2068
2069 * decl.c: Just set truthvalue_* to boolean_*.
2070
2071 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
2072
2073 * decl.c (reshape_init): Remove unreachable code.
2074
2075 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2076
2077 PR c++/11513
2078 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2079
2080 2003-07-23 Mark Mitchell <mark@codesourcery.com>
2081
2082 PR c++/11645
2083 * cp-tree.h (accessible_base_p): Declare.
2084 * call.c (build_over_call): Use it.
2085 * search.c (accessible_base_p): New function, split out from ...
2086 (lookup_base): ... here.
2087
2088 PR c++/11517
2089 * call.c (build_conditional_expr): Use perform_implicit_conversion
2090 and error_operand_p. Robustify.
2091 * typeck.c (build_unary_op): Use perform_implicit_conversion.
2092
2093 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
2094
2095 PR c++/10953
2096 * parser.c (cp_parser_nested_name_specifier): Reset scope on
2097 failure.
2098 (cp_parser_elaborated_type_specifier): Likewise.
2099
2100 2003-07-22 Mark Mitchell <mark@codesourcery.com>
2101
2102 Eliminate use of POINTER_TYPE for pointers-to-members.
2103 * call.c (standard_conversion): Rework pointer-to-member handling.
2104 Add comments.
2105 (add_builtin_candidate): Likewise.
2106 (resolve_scoped_fn_name): Remove.
2107 (build_conditional_expr): Rework pointer-to-member handling.
2108 (compare_ics): Likewise.
2109 * class.c (check_field_decls): Use TYPE_PTR_P.
2110 * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2111 handling.
2112 * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2113 (TYPE_PTRMEM_P): Add comment.
2114 (TYPE_PTR_P): Simplify.
2115 (TYPE_PTROB_P): Correct definition.
2116 (TYPE_PTR_TO_MEMBER_P): New macro.
2117 (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2118 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2119 (resolved_scoped_fn_name): Remove declaration.
2120 (build_offset_ref): Change prototype.
2121 (resolve_offset_ref): Remove.
2122 (comp_target_types): Remove.
2123 * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2124 handling.
2125 (convert_to_reference): Use can_convert.
2126 (ocp_convert): Improve error handling. Rework pointer-to-member
2127 handling.
2128 (perform_qualification_conversions): Rework pointer-to-member
2129 handling.
2130 * decl.c (build_ptrmem_type): Handle functions too.
2131 (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2132 (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2133 (grokparms): Remove OFFSET_TYPE error message.
2134 * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2135 * error.c (dump_type_prefix): Likewise.
2136 * expr.c (cplus_expand_constant): Use build_nop.
2137 * init.c (build_offset_ref): Add address_p parameter. Fold in
2138 necessary bits from resolve_offset_ref.
2139 (resolve_offset_ref): Remove.
2140 * parser.c (cp_parser_postfix_expression): Remove special case
2141 code for OFFSET_TYPE.
2142 * pt.c (convert_nontype_argument): Rework pointer-to-member
2143 handling.
2144 (convert_template_argument): Likewise.
2145 (unify): Likewise.
2146 (invalid_nontype_parm_type_p): Likewise.
2147 (dependent_type_p_r): Likewise.
2148 * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2149 (target_incomplete_p_): Rework pointer-to-member
2150 handling.
2151 (get_pseudo_ti_init): Likewise.
2152 (get_pseudo_ti_desc): Likewise.
2153 * semantics.c (finish_qualified_id_expr): Adjust call to
2154 build_offset_ref. Remove use of resolve_offset_ref.
2155 * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2156 * typeck.c (target_type): Use TYPE_PTRMEM_P.
2157 (type_unknown_p): Remove obsolete code about the time before
2158 non-dependent expressions were handled correctly.
2159 (qualify_type_recursive): Remove.
2160 (composite_pointer_type_r): New function.
2161 (composite_pointer_type): Use it.
2162 (merge_types): Remove dead comments.
2163 (comp_cv_target_types): Remove.
2164 (comp_target_types): Likewise.
2165 (comp_target_parms): Likewise.
2166 (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2167 (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2168 (build_binary_op): Do not use of comp_target_types.
2169 (pointer_diff): Remove OFFSET_TYPE case.
2170 (build_unary_op): Adjust pointer-to-member handling.
2171 (unary_complex_lvalue): Likewise.
2172 (check_for_casting_away_constness): Add description parameter.
2173 (build_static_cast): Pass it.
2174 (build_reinterpret_cast): Use check_for_casting_away_constness.
2175 (build_const_cast): Adjust pointer-to-member handling.
2176 (build_c_cast): Likewise.
2177 (convert_for_assignment): Remove OFFSET_TYPE error message.
2178 (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2179 (comp_ptr_ttypes_reinterpret): Remove.
2180 (casts_away_constness_r): Adjust pointer-to-member handling.
2181 (casts_away_constness): Liekwise.
2182 (strip_all_pointer_quals): Remove.
2183 * typeck2.c (digest_init): Adjust pointer-to-member handling.
2184 (build_m_component_ref): Likewise.
2185
2186 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
2187
2188 * lex.c (unqualified_fn_lookup_error): Mention that the error
2189 message needs to be kept in synch with the manual.
2190
2191 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2192
2193 PR c++/11614
2194 * decl.c (grokdeclarator): An array member is only a flexible
2195 array member if the field itself is the array.
2196
2197 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2198
2199 PR c++/10793
2200 * decl.c (xref_basetypes): Handle error_mark_node.
2201
2202 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
2203
2204 * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2205 * tree.c (lvalue_p_1): Set it.
2206 * class.c (check_field): Don't allow non-packed non-POD fields to
2207 be packed.
2208 * call.c (reference_binding): Need a temporary for all bitfield
2209 and packed fields.
2210 (convert_like_real): Check it is ok to make a temporary here.
2211
2212 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
2213
2214 * cp-tree.h (hack_identifier): Remove.
2215 * method.c (hack_identifier): Remove.
2216 * semantics.c (finish_id_expression): Expand hack_identifier
2217 here. Simplify.
2218
2219 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2220
2221 * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2222 semantics.c typeck.c: Remove unnecessary casts.
2223
2224 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2225
2226 * cp-tree.h (hack_identifier): Remove.
2227 * method.c (hack_identifier): Remove.
2228 * semantics.c (finish_id_expression): Expand hack_identifier
2229 here. Simplify.
2230
2231 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
2232
2233 * cp-tree.h (finish_non_static_data_member): Add object param.
2234 * method.c (hack_identifier): Adjust.
2235 * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2236 again for a FIELD_DECL.
2237 * semantics.c (finish_non_static_data_member): Add object
2238 parameter. Always save the DECL in the COMPONENT_REF.
2239 * call.c (resolve_scoped_fn_name): Adjust.
2240
2241 2003-07-17 Zack Weinberg <zack@codesourcery.com>
2242
2243 * pt.c (get_bindings): Make definition consistent with
2244 forward declaration.
2245
2246 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2247
2248 PR c++/7809
2249 * friend.c (add_friend): Check access for member functions
2250 and templates.
2251
2252 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
2253
2254 PR c++/10668
2255 * typeck.c (build_class_member_access_expr): Improve diagnostic.
2256
2257 2003-07-16 Mark Mitchell <mark@codesourcery.com>
2258
2259 PR c++/11547
2260 * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2261 macro.
2262 (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2263 * decl.c (duplicate_decls): Merge
2264 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2265 * parser.c (cp_parser_postfix_expression): Adjust call to
2266 cp_parser_initializer_list and
2267 cp_parser_parenthesized_expression_list.
2268 (cp_parser_parenthesized_expression_list): Add non_constant_p.
2269 (cp_parser_new_placement): Adjust call to
2270 cp_parser_parenthesized_expression_list.
2271 (cp_parser_direct_new_declarator): Likewise.
2272 (cp_parser_conditional_expression): Remove.
2273 (cp_parser_constant_expression): Parse an assignment-expression,
2274 not a conditional-expression.
2275 (cp_parser_simple_declaration): Resolve expression/declaration
2276 ambiguity more quickly.
2277 (cp_parser_mem_initializer): Adjust call to
2278 cp_parser_parenthesized_expression_list.
2279 (cp_parser_init_declarator): Keep track of whether or not the
2280 initializer is a constant-expression.
2281 (cp_parser_initializer): Add non_constant_p parameter.
2282 (cp_parser_initializer_clause): Likewise.
2283 (cp_parser_initializer_list): Likewise.
2284 (cp_parser_attribute_list): Adjust call to
2285 cp_parser_parenthesized_expression_list.
2286 (cp_parser_functional_cast): Likewise.
2287 * pt.c (tsubst_decl): Copy
2288 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2289 (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2290 * semantics.c (finish_id_expression): Use
2291 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2292
2293 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
2294
2295 * lang-options.h: Remove.
2296
2297 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
2298
2299 PR c/10962
2300 * class.c (field_decl_cmp): Remove.
2301 (resort_field_decl_cmp): Remove.
2302 (resort_sorted_fields): Remove.
2303 (add_fields_to_vec): Rename to ...
2304 (add_fields_to_record_type): this.
2305 (finish_struct_1): Change to be using
2306 sorted_fields_type's fields.
2307 * cp-tree.h (lang_decl): In lang_decl_u3
2308 change sorted_fields to be a pointer to
2309 sorted_fields_type.
2310 (resort_sorted_fields): Remove prototype.
2311 * search.c (lookup_field_1): Change to be using
2312 sorted_fields_type's fields.
2313
2314 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2315
2316 PR c++/5421
2317 * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2318 is a member of other class.
2319 * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2320 is a specialization of function template.
2321
2322 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2323
2324 PR c++/10903
2325 * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2326 Improve.
2327
2328 2003-07-15 Mark Mitchell <mark@codesourcery.com>
2329
2330 * cp-tree.def (LOOKUP_EXPR): Remove.
2331 * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2332 (LOOKUP_EXPR_GLOBAL): Remove.
2333 (get_bindings): Remove.
2334 (is_aggr_type_2): Remove.
2335 * call.c (resolved_scoped_fn_name): Remove support for
2336 LOOKUP_EXPR.
2337 * decl.c (grokfndecl): Likewise.
2338 (grokdeclarator): Likewise.
2339 * error.c (dump_decl): Likewise.
2340 (dump_expr): Likewise.
2341 * friend.c (do_friend): Likewise.
2342 * init.c (build_offset_ref): Likewise.
2343 * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
2344 LOOKUP_EXPRs
2345 * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2346 * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2347 test.
2348 * pt.c (get_bindings): Give it internal linkage.
2349 (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2350 (lookup_template_function): Likewise.
2351 (for_each_tempalte_parm_r): Likewise.
2352 (tsubst_decl): Likewise.
2353 (tsubst_qualified_id): Handle template template parameters.
2354 (tsubst_copy): Remove support for LOOKUP_EXPR.
2355 (tsubst_copy_and_build): Likewise.
2356 (most_general_template): Likewise.
2357 (value_dependent_expression_p): Likewise.
2358 (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2359 always dependent.
2360 * semantics.c (perform_koenig_lookup): Do not create
2361 IDENTIFIER_NODEs.
2362 (finish_fname): Likewise.
2363 (finish_id_expression): Likewise.
2364 * tree.c (is_aggr_type_2): Remove.
2365
2366 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
2367
2368 PR c++/11531
2369 * typeck.c (check_return_expr): Fix thinko in diagnostic.
2370
2371 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2372
2373 PR c++/10108
2374 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2375 error_mark_node.
2376
2377 2003-07-14 Mark Mitchell <mark@codesourcery.com>
2378
2379 PR c++/11509
2380 * pt.c (dependent_scope_ref_p): New function.
2381 (value_dependent_expression_p): Use it.
2382 (type_dependent_expression_p): Likewise.
2383
2384 * pt.c (tsubst_friend_function): Use reregister_specialization.
2385
2386 PR c++/7019
2387 * cp-tree.h (lookup_qualified_name): Adjust prototype.
2388 * decl.c (lookup_qualified_name): Add complain parameter. Adjust
2389 call to is_aggr_type.
2390 * parser.c (cp_parser_lookup_name): Adjust call to
2391 lookup_qualified_name.
2392 * pt.c (tsubst_qualified_id): Likewise.
2393 (tsubst_copy_and_build): Likewise.
2394 * semantics.c (finish_qualified_id_expr): Deal with erroneous
2395 expressions.
2396
2397 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2398
2399 PR c++/11510
2400 * call.c (op_error): Properly format REALPART_EXPR and
2401 IMAGPART_EXPR.
2402 * error.c (dump_expr): Likewise.
2403
2404 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2405
2406 * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2407
2408 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
2409
2410 PR c++/5293
2411 * call.c (initialize_reference): Improve diagnostic.
2412
2413 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2414
2415 PR c++/11154
2416 * pt.c (more_specialized_class): Add full_args parameter.
2417 (most_specialized_class): Adjust calls to more_specialized_class.
2418 * cp-tree.h (more_specialized_class): Adjust declaration.
2419
2420 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
2421
2422 * lex.c (enum tree_node_kind): Delete.
2423
2424 2003-07-13 Mark Mitchell <mark@codesourcery.com>
2425
2426 PR c++/11503
2427 * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2428 (SET_DECL_SELF_REFERENCE_P): Likewise.
2429 * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2430 * pt.c (tsubst_decl): Copy it.
2431 * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2432
2433 * pt.c (reregister_specialization): Fix thinko in previous change.
2434
2435 * cp-tree.h (cp_id_kind): New type.
2436 (unqualified_name_lookup_error): Change prototype.
2437 (unqualified_fn_lookup_error): New function.
2438 (do_identifier): Remove.
2439 (do_scoped_id): Likewise.
2440 (tsubst_copy_and_build): Change prototype.
2441 (reregister_specialization): New function.
2442 (perform_koenig_lookup): Likewise.
2443 (finish_id_expression): Likewise.
2444 * call.c (build_method_call): Adjust call to
2445 unqualified_name_lookup_error.
2446 * decl.c (duplicate_decls): Use reregister_specialization.
2447 * lex.c (is_global): Remove.
2448 (unqualified_name_lookup_error): Return a value.
2449 (do_identifier): Remove.
2450 (do_scoped_id): Likewise.
2451 (identifier_typedecl_value): Remove.
2452 (unqualified_fn_lookup_error): New function.
2453 * parser.c (cp_parser_id_kind): Remove.
2454 (cp_parser_non_constant_id_expression): Remove.
2455 (cp_parser_primary_expression): Use finish_id_expression.
2456 (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2457 cp_parser_id_kind.
2458 (cp_parser_postfix_expression): Use perform_koenig_lookup.
2459 (cp_parser_template_argument): Use cp_id_kind.
2460 (cp_parser_fold_non_dependent_expr): Adjust call to
2461 tsubst_copy_and_build.
2462 * pt.c (unregister_specialization): Rename to ...
2463 (reregister_specialization): This.
2464 (tsubst_friend_function): Use it.
2465 (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2466 (tsubst_qualified_id): Likewise.
2467 (tsubst_expr): Likewise.
2468 (tsubst_copy_and_build): Add function_p parameter. Use
2469 finish_id_expression. Introduce RECUR macro.
2470 (tsubst_non_call_postfix_expression): New function.
2471 (regenerate_decl_from_template): Use reregister_specialization.
2472 * semantics.c (perform_koenig_lookup): New function.
2473 (finish_id_expression): Likewise.
2474
2475 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2476
2477 * pt.c (push_access_scope_real): Remove.
2478 (push_access_scope): Move code from push_access_scope_real.
2479 (pop_access_scope): Don't check for TEMPLATE_DECL.
2480 (instantiate_template): Defer access checking during template
2481 substitution.
2482 (regenerate_decl_from_template): Tidy.
2483
2484 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
2485
2486 PR c++/11437
2487 * operators.def: Add definitions for __imag__, __real__.
2488
2489 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
2490
2491 PR c++/11050
2492 * parser.c (cp_parser_expression_list): Rename to ...
2493 (cp_parser_parenthesized_expression_list): ... here. Add attribute
2494 parameter, parse the surounding parentheses.
2495 (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2496 parameters. Return int.
2497 (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2498 (cp_parser_postfix_expression): Adjust function call parsing.
2499 (cp_parser_new_placement): Adjust.
2500 (cp_parser_new_initializer): Likewise.
2501 (cp_parser_cast_expression): Likewise.
2502 (cp_parser_selection_statement): Likewise.
2503 (cp_parser_mem_initializer): Likewise.
2504 (cp_parser_asm_definition): Likewise.
2505 (cp_parser_init_declarator): Likewise.
2506 (cp_parser_declarator): Make
2507 cdtor_or_conv_p an int ptr.
2508 (cp_parser_direct_declarator): Likewise. Check for a parameter
2509 list on cdtors & conv functions.
2510 (cp_parser_initializer): Adjust.
2511 (cp_parser_member_declaration): Adjust.
2512 (cp_parser_attribute_list): Move code into
2513 cp_parser_parens_expression_list.
2514 (cp_parser_functional_cast): Adjust.
2515 * pt.c (type_dependent_expression_p): Erroneous expressions are
2516 non-dependent.
2517
2518 2003-07-11 Geoffrey Keating <geoffk@apple.com>
2519
2520 * decl.c (cp_finish_decl): Handle 'used' attribute.
2521
2522 * cp-lang.c (c_reset_state): New dummy routine.
2523 * cp-tree.h (finish_file): Move prototype to c-common.h.
2524 * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2525
2526 2003-07-11 Mark Mitchell <mark@codesourcery.com>
2527
2528 PR c++/8327
2529 * pt.c (tsubst_qualified_id): Implement suggested resolution for
2530 Core Issue 2.
2531 (type_dependent_expression_p): Likewise.
2532
2533 2003-07-10 Mark Mitchell <mark@codesourcery.com>
2534
2535 * typeck.c (build_binary_op): Do not warn about signed
2536 vs. unsigned comparisons in the bodies of templates.
2537
2538 PR c++/9411
2539 * parser.c (cp_parser_postfix_expression): Check dependency of
2540 functions.
2541
2542 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2543
2544 PR c++/10032
2545 * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2546 still errors.
2547
2548 PR c++/10527
2549 * error.c (decl_to_string): Do not print default argument
2550 expressions.
2551
2552 * cp-tree.h (break_out_calls): Remove declaration.
2553 * tree.c (break_out_calls): Remove.
2554 * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2555
2556 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
2557
2558 PR c++ 9483
2559 * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2560 * decl2.c (constructor_name_p): Avoid repeated constructor_name
2561 calls.
2562 * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2563
2564 2003-07-09 Mark Mitchell <mark@codesourcery.com>
2565
2566 * typeck.c (build_x_unary_op): Take note of the fact that
2567 PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2568 trees.
2569
2570 * parser.c (cp_parser_primary_expression): Preserve the form of
2571 qualified expressions in templates, even if they are not
2572 dependent.
2573 * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2574 (tsubst_qualified_id): Likewise.
2575 * search.c (accessible_p): Treat everything in the body of a
2576 template as accessible.
2577
2578 2003-07-08 Mark Mitchell <mark@codesourcery.com>
2579
2580 * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2581 * cp-tree.h (build_call_from_tree): Remove.
2582 (build_member_call): Likewise.
2583 (dependent_template_arg_p): Remove.
2584 (any_dependent_template_arguments_p): New function.
2585 (dependent_template_id_p): Likewise.
2586 (any_type_dependent_arguments_p): Likewise.
2587 (build_non_dependent_expr): Likewise.
2588 (build_non_dependent_args): Likewise.
2589 (build_x_compound_expr): Adjust prototype.
2590 * call.c (build_new_method_call): Handle non-dependent expressions
2591 correctly.
2592 * decl2.c (grok_array_decl): Likewise.
2593 (build_offset_ref_call_from_tree): Likewise.
2594 (build_call_from_tree): Remove.
2595 * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2596 (dump_expr): Likewise.
2597 * init.c (build_member_call): Remove.
2598 * mangle.c (write_expression): Update handling for template-ids.
2599 * parser.c (cp_parser_primary_expression): Use
2600 any_dependent_template_arguments_p. Update constant-expression
2601 handling.
2602 (cp_parser_postfix_expression): Use
2603 any_type_dependent_arguments_p. Simplify call processing.
2604 (cp_parser_unary_expression): Simplify.
2605 (cp_parser_expression): Adjust for changes to
2606 build_x_compound_expr.
2607 (cp_parser_template_argument): Implement standard-conforming
2608 parsing of non-type template arguments.
2609 (cp_parser_direct_declarator): Use
2610 cp_parser_fold_non_dependent_expr.
2611 (cp_parser_fold_non_dependent_expr): New function.
2612 (cp_parser_next_token_ends_template_argument_p): Likewise.
2613 * pt.c (convert_template_argument): Do not call
2614 maybe_fold_nontype_arg.
2615 (tsubst_baselink): Likewise.
2616 (tsubst_copy_and_build): Share common code. Make sizeof/alignof
2617 processing work correctly for non-dependent expressions. Adjust
2618 handling of COMPOUND_EXPR. Simplify call processing.
2619 (value_dependent_expression_p): Deal with functional casts and
2620 sizeof/alignof correctly.
2621 (type_dependent_expression_p): Handle overloaded functions.
2622 (any_type_dependent_arguments_p): New function.
2623 (any_dependent_template_arguments_p): Likewise.
2624 (dependent_template_p): Treat SCOPE_REFs as dependent.
2625 (dependent_template_id_p): Simplify.
2626 (build_non_dependent_expr): New function.
2627 (build_non_dependent_args): Likewise.
2628 * semantics.c (finish_stmt_expr): Don't make dependent
2629 statement-expresions have void type.
2630 (finish_call_expr): Handle non-dependent expressions
2631 correctly.
2632 * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2633 * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2634 type size_t, even in templates.
2635 (expr_sizeof): Likewise.
2636 (finish_class_member_access_expr): Handle non-dependent expressions
2637 correctly.
2638 (build_x_indirect_ref): Likewise.
2639 (build_x_binary_op): Likewise.
2640 (build_x_unary_op): Likewise.
2641 (build_x_conditional_expr): Likewise.
2642 (build_x_compound_expr): Likewise.
2643 * typeck2.c (build_x_arrow): Likewise.
2644
2645 2003-07-09 Jan Hubicka <jh@suse.cz>
2646
2647 * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2648 * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2649 (start_function): Use DECL_ESTIMATED_INSNS.
2650 * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2651
2652 * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2653 unit-at-a-time
2654
2655 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2656
2657 PR c++/11030
2658 * pt.c (instantiate_class_template): Don't call xref_tag to
2659 inject name when the friend class is a specialization.
2660
2661 2003-07-07 Mark Mitchell <mark@codesourcery.com>
2662
2663 * cp-tree.h (build_scoped_method_call): Remove.
2664 (lookup_qualified_name): Remove parameter.
2665 (tsubst_copy_and_build): Declare.
2666 (finish_qualified_object_call_expr): Remove.
2667 (check_accessibility_of_qualified_id): New function.
2668 (finish_qualified_id_expr): Likewise.
2669 (non_reference): Likewise.
2670 (build_expr_from-tree): Remove.
2671 * call.c (non_reference): Remove.
2672 (build_scoped_method_call): Likewise.
2673 (build_method_call): Use error_operand_p. Assert that we are not
2674 processing a template.
2675 (standard_conversion): Use non_reference.
2676 * class.c (build_vtbl_entry_ref): Likewise.
2677 (build_vtbl_ref_1): Likewise.
2678 * cvt.c (build_expr_type_conversion): Use non_reference.
2679 * decl.c (lookup_qualified_name): Remove flags parameter.
2680 (grok_op_properties): Use non_reference.
2681 * decl2.c (grok_array_decl): Likewise.
2682 (build_expr_from_tree): Remove.
2683 (build_offset_ref_call_from_tree): Update comment.
2684 * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2685 * except.c (prepare_eh_types): Use non_reference.
2686 (can_convert_eh): Likewise.
2687 * init.c (build_dtor_call): Avoid using build_method_call.
2688 * mangle.c (write_template_param): Remove misleading comment.
2689 * method.c (locate_copy): Use non_reference.
2690 * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2691 (cp_parser_primary_expression): Do not create SCOPE_REFs is
2692 non-dependent contexts.
2693 (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2694 (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2695 build_expr_from_tree.
2696 (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2697 Use check_accessibility_of_qualified_id.
2698 * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2699 build_expr_from_tree.
2700 (tsubst_baselink): New function.
2701 (tsubst_qualified_id): Likewise.
2702 (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
2703 (tsubst_expr): Adjust call to lookup_qualified_name.
2704 (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
2705 handling of CALL_EXPRs.
2706 (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2707 * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2708 * search.c (check_final_overrider): Likewise.
2709 * semantics.c (check_accessibility_of_qualified_id): New function.
2710 (finish_qualified_object_call_expr): Remove.
2711 * typeck.c (target_type): Use non_reference.
2712 (cxx_sizeof_or_alignof_type): Likewise.
2713 (dubious_conversion_warnings): Likewise.
2714 (convert_for_initialization): Likewise.
2715 (non_reference): New function.
2716
2717 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2718
2719 * decl.c (print_binding_level, print_other_binding_stack,
2720 print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2721 stdio calls.
2722 * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2723
2724 2003-07-07 Andreas Jaeger <aj@suse.de>
2725
2726 * friend.c: Convert to ISO C90 prototypes.
2727
2728 * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2729 language.
2730 * cfns.h: Regenerate.
2731
2732 * typeck.c: Convert remaining prototypes to ISO C90.
2733 * search.c: Likewise.
2734
2735 * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2736 * semantics.c (expand_or_defer_fn): Likewise
2737 * mangle.c (discriminator_for_string_literal): Likewise.
2738 * g++spec.c (lang_specific_driver): Likewise.
2739
2740 * search.c (lookup_base_r): Remove unused variable.
2741
2742 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
2743
2744 * semantics.c: (genrtl_try_block) Adjust emit_line_note
2745 calls.
2746
2747 2003-07-07 Andreas Jaeger <aj@suse.de>
2748
2749 * search.c (lookup_base_r): Remove unused variable.
2750
2751 2003-07-06 Michael Chastain <mec@shout.net>
2752
2753 PR debug/10055
2754 * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2755 assigning to input_filename directly.
2756
2757 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
2758
2759 * call.c: Fix comment formatting.
2760 * class.c: Likewise.
2761 * cp-tree.h: Likewise.
2762 * decl.c: Likewise.
2763 * decl2.c: Likewise.
2764 * error.c: Likewise.
2765 * method.c: Likewise.
2766 * name-lookup.c: Likewise.
2767 * parser.c: Likewise.
2768 * pt.c: Likewise.
2769 * rtti.c: Likewise.
2770 * search.c: Likewise.
2771 * typeck.c: Likewise.
2772
2773 2003-07-06 Mark Mitchell <mark@codesourcery.com>
2774
2775 PR c++/11345
2776 * search.c (lookup_base_r): Remove is_non_public and
2777 within_current_scope parameters. Remove other dead code.
2778 (lookup_base): Adjust call to lookup_base_r.
2779 (adjust_result_of_qualified_name_lookup): Improve comment.
2780 * semantics.c (finish_call_expr): Use maybe_dummy_object.
2781
2782 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
2783
2784 * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2785 LANG_HOOKS_MISSING_ARGUMENT): Override.
2786
2787 2003-07-05 Mark Mitchell <mark@codesourcery.com>
2788
2789 PR c++/11431
2790 * typeck.c (build_static_cast): Check for reference conversions
2791 earlier.
2792
2793 2003-07-04 Mark Mitchell <mark@codesourcery.com>
2794
2795 * cp-tree.h (perform_integral_promotions): Declare.
2796 * call.c (build_addr_func): Use decay_conversion.
2797 (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
2798 (convert_for_arg_passing): Use perform_integral_promotions.
2799 * cvt.c (build_expr_type_conversion): Use decay_conversion.
2800 (type_promotes_to): Do not return a cv-qualified type.
2801 * decl.c (grok_reference_init): Fix formatting.
2802 (get_atexit_node): Use decay_conversion.
2803 (build_enumerator): Use perform_integral_promotions.
2804 * init.c (build_vec_init): Use decay_conversion.
2805 * semantics.c (finish_expr_stmt): Likewise.
2806 (finish_switch_cond): Use perform_integral_promotions.
2807 * typeck.c (default_conversion): Likewise.
2808 (perform_integral_promotions): New function.
2809 (build_indirect_ref): Use decay_conversion.
2810 (build_array_ref): Use perform_integral_promotions.
2811 (convert_arguments): Use decay_conversion.
2812 (build_unary_op): Use perform_integral_promotions.
2813 (build_c_cast): Use decay_conversion.
2814 (build_modify_expr): Likewise.
2815 (convert_for_initialization): Likewise.
2816 * typeck2.c (build_x_arrow): Likewise.
2817
2818 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
2819
2820 * call.c: Fix comment typos.
2821 * class.c: Likewise.
2822 * cp-tree.h: Likewise.
2823 * cvt.c: Likewise.
2824 * decl2.c: Likewise.
2825 * decl.c: Likewise.
2826 * init.c: Likewise.
2827 * mangle.c: Likewise.
2828 * parser.c: Likewise.
2829 * pt.c: Likewise.
2830 * search.c: Likewise.
2831 * semantics.c: Likewise.
2832 * tree.c: Likewise.
2833 * typeck.c: Likewise.
2834
2835 2003-07-04 Zack Weinberg <zack@codesourcery.com>
2836
2837 * parser.c (cp_lexer_read_token): No need to handle string
2838 constant concatenation.
2839
2840 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2841
2842 * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2843 (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2844 ATTRIBUTE_GCC_CXXDIAG.
2845
2846 2003-07-03 Mark Mitchell <mark@codesourcery.com>
2847
2848 * call.c (build_addr_func): Handle bound pointers-to-members.
2849 (build_method_call): Do not call resolve_offset_ref.
2850 (implicit_conversion): Likewise.
2851 (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2852 resolve_offset_ref.
2853 (resolve_args): Do not call resolve_offset_ref.
2854 (build_conditional_expr): Likewise.
2855 (build_new_method_call): Likewise.
2856 * cp-tree.def (OFFSET_REF): Update documentation.
2857 * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2858 pointers to members to pointers.
2859 (ocp_convert): Do not call resolve_offset_ref.
2860 (convert_to_void): Likewise.
2861 (build_expr_type_conversion): Likewise.
2862 * decl2.c (delete_sanity): Likewise.
2863 * init.c (resolve_offset_ref): Simplify greatly.
2864 (build_vec_delete): Do not call resolve_offset_ref.
2865 * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2866 if appropriate.
2867 (cp_parser_unary_expression): Use
2868 cp_parser_simple_cast_expression.
2869 (cp_parser_delete_expression): Likewise.
2870 (cp_parser_cast_expression): Likewise.
2871 (cp_parser_pm_expression): Use cp_parser_binary_op.
2872 (cp_parser_simple_cast_expression): New function.
2873 * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2874 * semantics.c (finish_increment_expr): Likewise.
2875 (finish_typeof): Likewise.
2876 * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2877 * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2878 (decay_conversion): Do not call resolve_offset_ref.
2879 (finish_class_member_access_expr): Likewise.
2880 (convert_arguments): Likewise.
2881 (build_x_binary_op): Handle DOTSTAR_EXPR.
2882 (condition_conversion): Do not call resolve_offset_ref.
2883 (unary_complex_lvalue): Likewise.
2884 (build_static_cast): Likewise.
2885 (build_reinterpret_cast): Likewise.
2886 (build_const_cast): Likewise.
2887 (build_c_cast): Likewise.
2888 (build_modify_expr): Likewise.
2889 (convert_for_assignment): Likewise.
2890 (convert_for_initialization): Likewise.
2891 * typeck2.c (build_x_arrow): Likewise.
2892 (build_m_component_ref): Simplify.
2893
2894 * call.c (build_scoped_method_call): Use convert_to_void.
2895 (build_method_call): Likewise.
2896 * class.c (check_field_decls): Remove dead code.
2897 * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
2898 * decl2.c (grok_array_decl): Remove dead code.
2899 (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2900 as pointer-to-member representation.
2901 * init.c (build_offset_ref): Tidy.
2902 (build_vec_delete_1): Use convert_to_void.
2903 * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
2904 as pointer-to-member representation.
2905
2906 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
2907
2908 PR c++/9162
2909 * decl.c (grokdeclarator): Return friend decls, not
2910 void_type_node.
2911 * decl2.c (grokfield): Alter friend decl check.
2912 * parser.c (struct cp_parser): Document default_arg chain on
2913 unparsed_functions_queue.
2914 (cp_parser_save_default_args): New.
2915 (cp_parser_init_declarator, cp_parser_function_definition,
2916 cp_parser_member_declaration): Call it.
2917 (cp_parser_class_specifier): Remove unused variable. Alter
2918 processing of unparsed_functions_queue.
2919
2920 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2921
2922 * class.c (add_method, check_field_decl): Fix format specifier.
2923 * decl.c (duplicate_decls, pushdecl, check_goto,
2924 fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
2925 start_enum): Likewise.
2926 * decl2.c (ambiguous_decl): Likewise.
2927 * pt.c (redeclare_class_template): Likewise.
2928
2929 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
2930
2931 PR c++/10219
2932 * pt.c (type_unification_real): Don't unify exprs of error type.
2933 * tree.c (error_type): Don't die on error_type.
2934
2935 PR c++/9779
2936 * decl2.c (arg_assoc_class): Don't die on NULL type.
2937 * typeck.c (type_unknown_p): Don't die on untyped expressions.
2938
2939 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2940
2941 PR c++/6949
2942 * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
2943 classes.
2944
2945 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2946
2947 * error.c (locate_error): %P takes an `int', not a `tree'.
2948
2949 2003-07-02 Jan Hubicka <jh@suse.cz>
2950
2951 * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
2952 (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
2953 clear DECL_DEFER_OUTPUT once function is processed; avoid flags
2954 massaging.
2955
2956 * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
2957 (expand_or_defer_fn): Declare.
2958 (lower_function): Declare.
2959 * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
2960 * decl2.c: Include cgraph.h and varpool.h
2961 (maybe_emit_vtables): Make explicit instantations as needed.
2962 (mark_member_pointers, lower_function): New functions.
2963 (finish_file): Do unit-at-a-time.
2964 * method.c (synthesize_method): Use expand_or_defer_fn.
2965 * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
2966 * parser.c (cp_parser_function_definition_after_decl): Use
2967 expand_or_defer_fn.
2968 * pt.c (instantiate_decl): Likewise.
2969 * semantics.c: Include cgraph.h
2970 (expand_or_defer_fn): Break out from ...
2971 (expand_body): ... here; deal with unit-at-a-time.
2972 * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
2973 LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
2974
2975 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2976
2977 * call.c (resolve_scoped_fn_name): Return error_mark_node for
2978 erroneous cases.
2979
2980 2003-07-01 Mark Mitchell <mark@codesourcery.com>
2981
2982 PR c++/11149
2983 * call.c (resolve_scoped_fn_name): Check that the qualifying scope
2984 is a class type.
2985
2986 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
2987
2988 PR c++/8046
2989 * error.c (dump_decl): Handle BIT_NOT_EXPR as
2990 pseudo destructor calls.
2991
2992 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
2993
2994 * cp-tree.h (define_label): Replace filename and lineno
2995 arguments with a location_t.
2996 * decl.c (pop_label): Adjust define_label call.
2997 (define_label): Replace filename and lineno arguments with a
2998 location_t.
2999 * semantics.c (finish_label): Adjust define_label call.
3000
3001 2003-07-01 Mark Mitchell <mark@codesourcery.com>
3002
3003 PR c++/9559
3004 * decl2.c (grokfield): Do not build NOP_EXPRs around the
3005 error_mark_node.
3006
3007 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
3008
3009 * Make-lang.in: Update.
3010 * cp-lang.c (c_language): Define.
3011 (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3012 * cp-tree.h (cxx_init_options): Remove.
3013 * lex.c: Don't include diagnostic.h.
3014 (cxx_init_options): Remove.
3015
3016 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3017
3018 PR c++/4933
3019 * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3020 tree generated within a template. Use dump_expr to dump an
3021 expression sizeof.
3022
3023 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3024
3025 * mangle.c (write_expression): Exit gracefully when trying to
3026 mangle a CALL_EXPR.
3027
3028 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3029
3030 PR c++/10750
3031 * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3032 (value- or type-) dependent expression as DECL_INITIAL is a
3033 valid constant-expression (at parser time).
3034
3035 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
3036
3037 PR c++/11106
3038 * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3039 USING_DECL, instead of print_tree_identifier.
3040
3041 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3042
3043 * cp-tree.h (language_to_string): Adjust declaration.
3044 * dump.c (cp_dump_tree): Adjust usage.
3045 * error.c (dump_char): Use output_formatted_scalar. Tidy.
3046 (parm_to_string): Lose unused parameter. Tidy.
3047 (expr_to_string): Likewise.
3048 (code_to_string): Likewise.
3049 (language_to_string): Likewise.
3050 (op_to_string): Likewise.
3051 (assop_to_string): Likewise.
3052 (digit_buffer): Remove.
3053 (dump_type): Format builtin vector type as __vector__.
3054
3055 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3056
3057 * error.c (print_integer): Remove.
3058 (dump_type_suffix): Adjust.
3059 (dump_expr): Likewise.
3060
3061 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3062
3063 * error.c (print_instantiation_partial_context): Take a
3064 location_t.
3065 (print_instantiation_full_context): Adjust.
3066 (print_instantiation_context): Adjust.
3067
3068 * cp-tree.h (cp_line_of, cp_file_of): Remove.
3069 * error.c (cp_line_of, cp_file_of): Merge into ...
3070 (location_of): ... here. Make static, return a location_t.
3071 (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3072
3073 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
3074
3075 PR c++/10784
3076 * call.c (joust): Move warn_conversion check outwards.
3077
3078 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3079
3080 * decl.c (build_typename_type)
3081 * mangle.c (write_template_template_arg)
3082 * parser.c (cp_parser_scope_through_which_access_occurs)
3083 * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3084 * repo.c (get_base_filename)
3085 * semantics.c (maybe_convert_cond):
3086 Mark the definition static, matching the forward declaration.
3087
3088 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3089
3090 PR c++/10468
3091 * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3092
3093 2003-06-27 Mark Mitchell <mark@codesourcery.com>
3094
3095 PR c++/10796
3096 * decl.c (finish_enum): Implement DR377.
3097
3098 * decl.c (cp_finish_decl): Don't make variables with reference
3099 type readonly while they are being initialized.
3100
3101 2003-06-26 Mark Mitchell <mark@codesourcery.com>
3102
3103 PR c++/11332
3104 * typeck.c (build_static_cast): Avoid returning expressions with
3105 reference type.
3106
3107 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
3108
3109 * call.c (build_op_delete_call): Use strip_array_call. Correct
3110 error message to say 'delete' or 'delete[]'.
3111
3112 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
3113
3114 PR c++/8266
3115 * pt.c (check_explicit_specialization): When looking up a
3116 template function from an identifier outside class-scope, bind
3117 it to CP_DECL_CONTEXT.
3118
3119 2003-06-25 Mark Mitchell <mark@codesourcery.com>
3120
3121 PR c++/10990
3122 * search.c (lookup_base_r): Rely on accessible_p, rather than
3123 trying to emulate that logic here.
3124
3125 PR c++/10931
3126 * call.c (convert_like): Pass issue_conversion_warnings.
3127 (convert_like_with_context): Likewise.
3128 (convert_like_real): Add issue_conversion_warnings parameter.
3129 (perform_direct_initialization_if_possible): New function.
3130 * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3131 * typeck.c (check_for_casting_away_constness): New function.
3132 (build_static_cast): Rewrite.
3133
3134 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
3135
3136 * call.c (enforce_access): Assert we get a binfo.
3137 (build_op_delete_call): Pass a binfo to
3138 perform_or_defer_access_check.
3139 * class.c (alter_access): Likewise.
3140 * decl.c (make_typename_type): Likewise.
3141 (make_unbound_class_template): Likewise.
3142 * lex.c (do_identifier): Likewise.
3143 * method.c (hack_identifier): Likewise.
3144 * parser.c (cp_parser_lookup_name): Likewise.
3145 * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3146 test.
3147 * semantics.c (finish_non_static_data_member): Likewise.
3148 (perform_or_defer_access_check): Expect a binfo.
3149 * typeck.c (comptypes): Expect types.
3150
3151 * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3152 * friend.c (make_friend_class): Likewise.
3153 * pt.c (check_default_tmpl_args): Likewise.
3154 (lookup_template_class): Likewise.
3155
3156 2003-06-24 Jan Hubicka <jh@suse.cz>
3157
3158 * method.c (thunk_labelno): Move outside ifdef block to make garbage
3159 collector happy.
3160
3161 2003-06-24 Jan Hubicka <jh@suse.cz>
3162
3163 * class.c (build_vtable): Make vtables.
3164 * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3165 * decl2.c (output_vtable_inherit): Rename to ...
3166 (prepare_assemble_variable): ... this one; change interface.
3167 (maybe_emit_vtables): Do not call output_vtable_inherit.
3168 * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3169 * cp-tree.h (prepare_assemble_variable): New.
3170
3171 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
3172
3173 * method.c: add prototype for make_alias_for_thunk.
3174 (thunk_labelno, make_alias_for_thunk): only define
3175 if ASM_OUTPUT_DEF is defined.
3176
3177 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3178
3179 * method.c (thunk_labelno): New variable.
3180 (make_alias_for_thunk): New function.
3181 (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
3182 into the same section as the function it is calling.
3183 Include gt-cp-method.h.
3184 * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3185 (cp/method.o): Depend on gt-cp-method.h.
3186 * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3187
3188 2003-06-23 Jan Hubicka <jh@suse.cz>
3189
3190 * decl.c (register_dtor_fn): Mark cleanup as used.
3191 * decl2.c (mark_vtable_entries): Skip nops.
3192 * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3193 (build_dynamic_cast_1): Likewise.
3194 (tinfo_base_init): Likewise.
3195 (emit_tinfo_decl): Likewise.
3196
3197 2003-06-23 Jakub Jelinek <jakub@redhat.com>
3198
3199 * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3200 to it.
3201
3202 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3203
3204 PR c++/10784
3205 * call.c (joust): Warn about choosing conversion sequence only if
3206 -Wconversion.
3207
3208 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3209
3210 PR c++/10864
3211 * call.c (op_error): Tidy.
3212 * error.c (dump_expr): Properly format 'T()' when T is an
3213 aggregate type.
3214
3215 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3216
3217 PR c++/10915
3218 * decl.c (grok_op_properties): Warn possible confusing conversion
3219 only if -Wconversion.
3220
3221 2003-06-20 Mark Mitchell <mark@codesourcery.com>
3222
3223 PR c++/10749
3224 * parser.c (cp_parser_class_head): See through dependent names
3225 when parsing a class-head.
3226
3227 PR c++/10845
3228 * pt.c (try_class_unification): Correct handling of member class
3229 templates.
3230
3231 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3232
3233 * semantics.c (genrtl_finish_function): Adjust
3234 expand_function_end call.
3235
3236 2003-06-19 Mark Mitchell <mark@codesourcery.com>
3237
3238 PR c++/10939
3239 * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3240 functions.
3241 (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3242
3243 PR c++/9649
3244 * cp-tree.h (pushdecl_class_level): Change prototype.
3245 (push_class_level_binding): Likewise.
3246 * decl.c (add_binding): Reject duplicate static data members.
3247 (pushdecl_class_level): Return a value indicating whether or not
3248 the binding was valid.
3249 (push_class_level_binding): Likewise.
3250 * semantics.c (finish_member_declaration): Don't keep invalid
3251 declarations.
3252
3253 PR c++/11041
3254 * call.c (initialize_reference): Do not use cp_finish_decl to emit
3255 temporary variables.
3256 * cp-tree.h (static_aggregates): Declare.
3257 (pushdecl_top_level_and_finish): Likewise.
3258 * decl.c (pushdecl_top_level_1): New function.
3259 (pushdecl_top_level): Use it.
3260 (pushdecl_top_level_and_finish): New function.
3261 (initialize_local_var): Remove redundant code.
3262 (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
3263 building_stmt_tree.
3264 * decl.h (static_aggregates): Remove.
3265 * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3266 * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3267 (tinfo_base_init): Likewise.
3268
3269 2003-06-19 Matt Austern <austern@apple.com>
3270
3271 PR c++/11228
3272 * init.c (build_zero_init): Assert that number of array elements
3273 is an integer constant.
3274 (build_default_init) Don't use build_zero_init for arrays with
3275 variable number of elements.
3276
3277 2003-06-19 Andreas Jaeger <aj@suse.de>
3278
3279 * cp-tree.h: Remove duplicated declarations.
3280
3281 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
3282
3283 * pt.c: Convert to ISO C.
3284 * semantics.c: Convert to ISO C.
3285
3286 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3287
3288 * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3289 at_least_as_qualified_p, more_qualified_p): Return bool.
3290 * typeck.c: ANSIFY function definitions.
3291 (comp_array_types): Take redeclaration bool parameter.
3292 (comptypes): Rearrange STRICT handling.
3293 (at_least_as_qualified_p, more_qualified_p,
3294 comp_cv_qualification): Cache cv quals.
3295 (compparms): Rearrange loop.
3296
3297 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
3298
3299 * cp-tree.h (COMPARE_RELAXED): Rename to ...
3300 (COMPARE_DERIVED): ... here. Adjust comment.
3301 (resolve_typename_type_in_current_instantiation): Remove.
3302 (cp_tree_equal, comptypes): Return a bool.
3303 * cvt.c (convert_to_reference): Adjust comptypes call.
3304 * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3305 (resolve_typename_type_in_current_instantiation): Remove.
3306 * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3307 IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3308 calls. Refactor code.
3309 * typeck.c (comp_array_types): Return bool. Lose callback.
3310 parameter. Adjust cp_tree_equal calls.
3311 (comptypes): Return bool. Adjust strict handling. Remove relaxed
3312 enumeration and java type handling. Deal with typename types here.
3313 Adjust recursive and cp_tree_equals calls. Adjust base and derived
3314 checking.
3315 (comp_target_types): Remove unreachable code. Adjust
3316 same_or_base_type_p calls.
3317 (ptr_reasonably_similar): Adjust base and derived check.
3318
3319 * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3320 unused calculation.
3321 (check_return_expr): Adjust error messages.
3322 * cp-tree.def (SCOPE_REF): Correct comment.
3323
3324 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3325
3326 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3327 string again.
3328
3329 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3330
3331 * optimize.c (dump_function): Form complete flag name by
3332 prefixing 'fdump-' to string returned by dump_flag_name().
3333
3334 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3335
3336 * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3337 string.
3338
3339 2003-06-17 Jason Merrill <jason@redhat.com>
3340
3341 PR c++/10929
3342 * decl.c (grokfndecl): Don't mark a function inline for
3343 -finline-functions if it isn't defined.
3344
3345 2003-06-17 Mark Mitchell <mark@codesourcery.com>
3346
3347 PR c++/10712
3348 * class.c (handle_using_decl): Robustify.
3349
3350 PR c++/11105
3351 * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3352 * mangle.c (struct globals): Remove internal_mangling_p.
3353 (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3354 (write_template_parm): Don't write out the level number.
3355 (conv_type_names): New variable.
3356 (hash_type): New function.
3357 (compare_type): Likewise.
3358 (mangle_conv_op_name_for_type): Don't try to mangle conversion
3359 operator names.
3360 * search.c (lookup_conversion_operator): New function.
3361 (lookup_fnfields_1): Use it.
3362
3363 2003-06-17 Andreas Jaeger <aj@suse.de>
3364
3365 * except.c: Remove duplicate declaration of push_eh_cleanup.
3366
3367 * call.c: Remove extra declaration of inhibit_warnings.
3368
3369 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3370
3371 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
3372 * mangle.c: Convert to ISO C.
3373
3374 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3375
3376 * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3377 macro.
3378
3379 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
3380
3381 * tree.c: Convert to ISO C.
3382
3383 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
3384
3385 * cp-tree.h: Follow spelling conventions.
3386 * mangle.c: Likewise.
3387 * method.c: Likewise.
3388 * parser.c: Likewise.
3389
3390 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3391
3392 * decl.c (start_function): Adjust init_function_start call.
3393 * method.c (use_thunk): Likewise.
3394 * semantics.c (genrtl_start_function): Likewise.
3395
3396 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3397
3398 * Make-lang.in: Remove c-options.o.
3399
3400 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
3401
3402 * lex.c: Convert to ISO C.
3403
3404 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
3405 * init.c: removes use of PARAMS macro. Use ISO style function
3406 declarations. (Not copyright-significant change.)
3407
3408 * rtti.c: Remove PARAMS.
3409
3410 * typeck2.c: Convert to ISO C.
3411
3412 2003-06-12 Mark Mitchell <mark@codesourcery.com>
3413
3414 PR c++/10635
3415 * typeck.c (build_c_cast): Check that the destination type is
3416 complete.
3417
3418 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3419
3420 PR c++/10432
3421 * cp-tree.h (finish_declarator): Remove.
3422 * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3423 erroneous declarations.
3424 * semantics.c (finish_declarator): Remove.
3425
3426 2003-06-11 Roger Sayle <roger@eyesopen.com>
3427
3428 * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3429 global static constructor/destructor if it will be empty, i.e.
3430 either doesn't call any ctors/dtors or only calls pure or const
3431 ctors/dtors.
3432
3433 2003-06-11 Mark Mitchell <mark@codesourcery.com>
3434
3435 * mangle.c (tm_p.h): Include it.
3436 * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3437
3438 PR c++/11131
3439 * tree.c (cp_cannot_inline_fn): Check for "inline" before
3440 instantiation.
3441
3442 2003-06-10 Jason Merrill <jason@redhat.com>
3443
3444 PR c++/10968
3445 * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3446
3447 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
3448
3449 * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3450 (start_cleanup_cnt): New.
3451
3452 2003-06-10 Mark Mitchell <mark@codesourcery.com>
3453
3454 PR c++/11131
3455 * cp-tree.h (template_for_substitution): Declare.
3456 * decl2.c (mark_used): Use it when figuring out whether or not a
3457 function is inline.
3458 * pt.c (template_for_substitution): Give it external linkage.
3459 * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3460 possible.
3461
3462 2003-06-09 Zack Weinberg <zack@codesourcery.com>
3463
3464 PR 8861
3465 * mangle.c (write_real_cst): New function. Implement
3466 ABI-compliant mangling of floating-point literals when
3467 -fabi-version>=2; provide backward compatibility with 3.3 when
3468 -fabi-version=1 (with warning). Clarify commentary.
3469 (write_template_arg_literal): Use write_real_cst.
3470
3471 2003-06-07 Andreas Jaeger <aj@suse.de>
3472
3473 * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3474
3475 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3476
3477 * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3478 (LANG_HOOKS_HANDLE_OPTION): Override.
3479 * cp-tree.h (cxx_init_options): Update.
3480 * lex.c (cxx_init_options): Update.
3481
3482 2003-06-05 Jan Hubicka <jh@suse.cz>
3483
3484 * Make-lang.in: Add support for stageprofile and stagefeedback
3485
3486 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
3487
3488 * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3489
3490 2003-06-04 Andreas Jaeger <aj@suse.de>
3491
3492 * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3493
3494 2003-06-03 Jason Merrill <jason@redhat.com>
3495
3496 * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3497
3498 * cp/decl.c (reshape_init): Handle vectors.
3499
3500 * testsuite/g++.dg/init/array10.C: New.
3501
3502 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3503
3504 PR c++/10940
3505 * pt.c (check_explicit_specialization): Check for 'static'
3506 earlier.
3507
3508 2003-05-31 Diego Novillo <dnovillo@redhat.com>
3509
3510 * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3511 the operand of a CONSTRUCTOR node.
3512
3513 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
3514
3515 * decl.c (cp_binding_level::this_entity): Rename from this_class.
3516 (cxx_scope_descriptor): New function.
3517 (cxx_scope_debug): Likewise.
3518 (push_binding_level): Use it.
3519 (pop_binding_level): Likewise.
3520 (suspend_binding_level): Likewise.
3521 (resume_binding_level): Likewise.
3522 (pushlevel_class): Adjust use of this_class.
3523 (pushtag): Likewise.
3524 (lookup_name_real): Likewise.
3525 (global_scope_name): New variable.
3526 (initialize_predefined_identifiers): Initialize it.
3527 (push_namespace): Use it.
3528 (make_cxx_scope): New function.
3529 (pushlevel): Use it.
3530 (pushlevel_class): Likewise.
3531 (push_binding_level): Simplify. Loose the last two arguments.
3532 (make_binding_level): Remove.
3533 (initial_push__namespace_scope): New function.
3534 (push_namespace): Use it. Simplify.
3535 (cxx_init_decl_processing): Likewise.
3536 (declare_namespace_level): Remove.
3537
3538 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3539
3540 PR c++/10956
3541 * pt.c (instantiate_decl): Don't use full template arguments if
3542 we are dealing with specializations.
3543
3544 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
3545
3546 * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3547 (binding_depth): Unconditionally define.
3548 (is_class_level): Likewise.
3549 (indent): Likewise. Take an indenting parameter.
3550 (push_binding_level): Remove conditional definittion.
3551 (pop_binding_level): Likewise.
3552 (suspend_binding_level): Likewise.
3553 (resume_binding_level): Likewise.
3554 (pushlevel): Likewise.
3555 (pushlevel_class): Likewise.
3556 (poplevel_class): Likewise.
3557 (pop_everything): Likewise.
3558
3559 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
3560
3561 * name-lookup.h (global_scope_p): New macro.
3562 * decl.c (pop_binding_level): Use it. Don't refer directly to
3563 global_binding_level.
3564 (suspend_binding_level): Likewise.
3565 (global_bindings_p): Likewise.
3566 (print_other_binding_stack): Likewise.
3567 (print_binding_stack): Likewise.
3568 (maybe_push_to_top_level): Likewise.
3569 (pushdecl_namespace_level): Likewise.
3570 (cxx_init_decl_processing): Likewise.
3571 (start_decl): Likewise.
3572 (cp_finish_decl): Likewise.
3573 (start_function): Likewise.
3574 (global_binding_level): Remove.
3575
3576 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3577
3578 * parser.c (cp_parser_explicit_instantiation): Restore old
3579 access before template instantiation.
3580
3581 2003-05-23 Geoffrey Keating <geoffk@apple.com>
3582
3583 * lang-specs.h: Use -o to specify preprocessor's output file.
3584 Make -no-integrated-cpp work when building PCH files.
3585
3586 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3587
3588 PR c++/10682
3589 * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3590 check for implicitly created typedef to an enum.
3591
3592 2003-05-21 Jason Merrill <jason@redhat.com>
3593
3594 * init.c (build_vec_delete): Copy the address into a temporary
3595 variable before calling build_vec_delete_1.
3596 * decl2.c (delete_sanity): Don't call stabilize_reference.
3597
3598 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
3599
3600 * pt.c (register_specialization): Update the decl's location,
3601 if necessary.
3602 (check_explicit_specialization): Likewise.
3603
3604 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3605
3606 * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3607
3608 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
3609
3610 PR c++/9738
3611 * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3612 if the old decl had instantiated DECL_RTL.
3613 (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3614
3615 2003-05-19 Matt Austern <austern@apple.com>
3616
3617 * lang-options.h: Document -Wno-invalid-offsetof
3618 * typeck.c (build_class_member_access_expr): Don't complain about
3619 (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3620
3621 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3622
3623 * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3624 (binding_entry_make): Make entry->chain NULL after getting an entry.
3625 fix the spelling of chain in a comment.
3626 (binding_table_free): speed up by having temporary variable.
3627 (binding_table_new): set table->chain to be NULL after allocating
3628 a table.
3629 (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3630 binding->previous to NULL after getting an binding for speed.
3631
3632 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
3633
3634 * cp-tree.h (struct lang_type_class): Replace data member tags
3635 with hash-table nested_udts.
3636 (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3637 * class.c (unreverse_member_declarations): Don't touch
3638 CLASSTYPE_TAGS.
3639 (pushclass): Use cxx_remember_type_decls.
3640 * decl.c (struct cp_binding_level): Replace data member tags with
3641 hash-table type_decls.
3642 (pop_binding_level): Handle level->type_decls.
3643 (kept_level_p): Adjust.
3644 (poplevel): Remove unused local variable.
3645 (bt_print_entry): New function.
3646 (print_binding_level): Use it.
3647 (push_namespace): Build current_binding_level->type_decls.
3648 (maybe_process_template_type_declaration): Adjust.
3649 (pushtag): Likewise.
3650 (clear_anon_tags): Use binding_table_remove_anonymous_types.
3651 (gettags): Remove.
3652 (cxx_remember_type_decls): Rename from storetags. Adjust.
3653 (lookup_tag): Use binding_table_find_anon_type. Tidy.
3654 (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3655 (cxx_init_decl_processing): Build global_binding_level->type_decls.
3656 (store_parm_decls): Remove pointless code.
3657 * name-lookup.c (free_binding_entry): New variable.
3658 (ENTRY_INDEX): New macro.
3659 (struct binding_table_s): New datatype.
3660 (binding_entry_make): New function.
3661 (binding_entry_free): Likewise.
3662 (binding_table_construct): Likewise.
3663 (binding_table_free): Likewise.
3664 (binding_table_new): Likewise.
3665 (binding_table_expand): Likewise.
3666 (binding_table_insert): Likewise.
3667 (binding_table_find): Likewise.
3668 (binding_table_find_anon_type): Likewise.
3669 (binding_table_reverse_maybe_remap): Likewise.
3670 (binding_table_remove_anonymous_types): Likewise.
3671 (binding_table_foreach): Likewise.
3672 * name-lookup.h (binding_table): New type.
3673 (binding_entry): Likewise.
3674 (bt_foreach_proc): Likewise.
3675 (struct binding_entry_s): New datatype.
3676 (SCOPE_DEFAULT_HT_SIZE): New macro.
3677 (CLASS_SCOPE_HT_SIZE): Likewise.
3678 (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3679 (NAMESPACE_STD_HT_SIZE): Likewise.
3680 (GLOBAL_SCOPE_HT_SIZE): Likewise.
3681 (binding_table_new): Declare.
3682 (binding_table_free): Likewise.
3683 (binding_table_insert): Likewise.
3684 (binding_table_find_anon_type): Likewise.
3685 (binding_table_reverse_maybe_remap): Likewise.
3686 (binding_table_remove_anonymous_types): Likewise.
3687 (binding_table_foreach): Likewise.
3688 (binding_table_find): Likewise.
3689 (cxx_remember_type_decls): Likewise.
3690 * pt.c (bt_instantiate_type_proc): New function.
3691 (do_type_instantiation): Use it.
3692 * search.c (lookup_field_r): Use binding_table_find.
3693
3694 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3695
3696 * semantics.c (perform_deferred_access_checks): Don't discard
3697 checked access.
3698
3699 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3700
3701 * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3702 libiberty VA_ macros, always use stdarg.
3703 * rtti.c (create_pseudo_type_info): Likewise.
3704 * tree.c (build_min_nt, build_min): Likewise.
3705
3706 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3707
3708 * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3709 concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3710 collapse multiple function calls into one.
3711 * tree.c (debug_binfo): Likewise.
3712
3713 2003-05-15 Jason Merrill <jason@redhat.com>
3714
3715 PR c++/5388
3716 * call.c (conditional_conversion): Don't consider implicit
3717 conversions if T2 is a base of T1.
3718 * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3719 (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3720
3721 * parser.c (cp_parser_primary_expression): Convert a static data
3722 member from reference.
3723
3724 2003-05-15 Mark Mitchell <mark@codesourcery.com>
3725
3726 * call.c (build_op_delete_call): Avoid creating unnecessary types.
3727 * class.c (instantiate_type): Remove tests for tf_no_attributes.
3728 * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3729 (COMPARE_NO_ATTRIBUTES): Remove.
3730 * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3731
3732 PR c++/8385
3733 * semantics.c (finish_typeof): Refine type-dependency check.
3734
3735 2003-05-13 Jason Merrill <jason@redhat.com>
3736
3737 * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3738 rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3739
3740 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3741
3742 * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3743
3744 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3745
3746 PR c++/10230, c++/10481
3747 * semantics.c (finish_non_static_data_member): Handle when the
3748 non-static member is not from a base of the current class type.
3749
3750 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3751
3752 PR c++/10552
3753 * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3754 template and has dependent context.
3755
3756 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3757
3758 * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3759
3760 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3761
3762 PR c++/9252
3763 * cp-tree.h (saved_scope): Remove check_access field.
3764 (tsubst_flags_t): Remove tf_parsing.
3765 * decl.c (maybe_push_to_top_level): Don't initialize
3766 scope_chain->check_access.
3767 (make_typename_type, make_unbound_class_template): Don't use
3768 tf_parsing.
3769 (register_dtor_fn): Use push/pop_deferring_access_checks
3770 instead of scope_chain->check_access.
3771 * method.c (use_thunk): Likewise.
3772 * parser.c (cp_parser_explicit_instantiation
3773 (cp_parser_constructor_declarator_p): Don't call
3774 push/pop_deferring_access_checks here.
3775 (cp_parser_template_argument, cp_parser_class_name): Don't use
3776 tf_parsing.
3777 (yyparse): Check flag_access_control.
3778 * pt.c (instantiate_class_template): Call
3779 push/pop_deferring_access_checks.
3780 * semantics.c (push_deferring_access_checks): Propagate
3781 dk_no_check.
3782 (perform_or_defer_access_check): Make sure basetype_path is
3783 a type before comparison.
3784 * call.c (build_op_delete_call, build_over_call): Use
3785 perform_or_defer_access_check.
3786 * class.c (alter_access): Likewise.
3787 * init.c (build_offset_ref): Likewise.
3788 * lex.c (do_identifier): Likewise.
3789 * method.c (hack_identifier): Likewise.
3790 * search.c (lookup_member): Likewise.
3791 * semantics.c (finish_non_static_data_member): Likewise.
3792 (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3793 instead of flag_access_control.
3794
3795 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3796
3797 PR c++/9554
3798 * parser.c (cp_parser_class_name): Remove check_access parameter.
3799 All caller adjusted. Update declaration.
3800 (cp_parser_lookup_name): Likewise.
3801 * semantics.c (push_deferring_access_checks): Change parameter type
3802 to enum deferring_kind. All caller adjusted.
3803 (resume_deferring_access_checks): Adjust to use new enum.
3804 (stop_deferring_access_checks): Likewise.
3805 (perform_or_defer_access_check): Likewise.
3806 * cp-tree.h (deferring_kind): New enum.
3807 (deferred_access): Adjust field type.
3808 (push_deferring_access_checks): Update declaration.
3809
3810 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3811
3812 PR c++/10555, c++/10576
3813 * pt.c (lookup_template_class): Handle class template with
3814 multiple levels of parameters when one of the levels contain
3815 errors.
3816
3817 2003-05-08 Jason Merrill <jason@redhat.com>
3818
3819 * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3820 expression. Undo some of the recent reorg.
3821
3822 2003-05-07 Richard Henderson <rth@redhat.com>
3823
3824 PR c++/10570
3825 * cfns.gperf: Comment out POSIX thread cancellation points,
3826 plus abort and raise.
3827 * cfns.h: Regenerate.
3828
3829 2003-05-07 Jason Merrill <jason@redhat.com>
3830
3831 * call.c (build_conditional_expr): Don't assume that the folded
3832 expression has result_type.
3833
3834 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3835
3836 * typeck.c (build_unary_op): Deal with const qualifier in
3837 invalid pointer-to-member earlier.
3838
3839 2003-05-05 Jason Merrill <jason@redhat.com>
3840
3841 PR c++/9537
3842 * call.c (conditional_conversion): Build an RVALUE_CONV if
3843 we're just changing the cv-quals.
3844 (build_conditional_expr): Don't call convert to change
3845 cv-quals.
3846
3847 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3848
3849 PR c++/10496
3850 * typeck.c (build_unary_op): Don't output const qualifier when
3851 output invalid pointer-to-member diagnostics.
3852
3853 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3854
3855 * decl.c: Fix typos.
3856
3857 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3858
3859 PR c++/4494
3860 * decl.c (start_function): Use same_type_p to check return type
3861 of main.
3862
3863 2003-05-03 Zack Weinberg <zack@codesourcery.com>
3864
3865 PR c/10604
3866 * cp/typeck.c (build_x_compound_expr): No need to check
3867 extra_warnings as well as warn_unused_value.
3868
3869 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3870
3871 PR c++/9364, c++/10553, c++/10586
3872 * decl.c (make_typename_type): Don't crash on illegal code.
3873
3874 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
3875
3876 * class.c (finish_struct): Use location_t and input_location
3877 directly.
3878 * decl.c (make_label_decl): Likewise.
3879 (use_label): Likewise.
3880 * decl2.c (warn_if_unknown_interface): Likewise.
3881 (start_static_initialization_or_destruction): Likewise.
3882 (generate_ctor_or_dtor_function): Likewise.
3883 (finish_file): Likewise.
3884 * error.c (print_instantiation_full_context): Likewise.
3885 * init.c (create_temporary_var): Likewise.
3886 * method.c (synthesize_method): Likewise.
3887 * parser.c (cp_token): Likewise.
3888 (cp_lexer_set_source_position_from_token): Likewise.
3889 (cp_lexer_get_preprocessor_token): Likewise.
3890 (cp_parser_statement): Likewise.
3891 * pt.c (tsubst_friend_function): Likewise.
3892 (instantiate_class_template): Likewise.
3893 (tsubst_decl): Likewise.
3894 (tsubst): Likewise.
3895 (instantiate_decl): Likewise.
3896 * semantics.c (begin_class_definition): Likewise.
3897 (expand_body): Likewise.
3898
3899 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3900
3901 * class.c (finish_struct): Rename lineno to input_line.
3902 * decl.c (push_binding_level, pop_binding_level,
3903 suspend_binding_level, resume_binding_level, make_label_decl,
3904 use_label, start_function): Likewise.
3905 * decl2.c (warn_if_unknown_interface,
3906 start_static_initialization_or_destruction,
3907 generate_ctor_or_dtor_function, finish_file): Likewise.
3908 * error.c (cp_line_of, print_instantiation_full_context,
3909 print_instantiation_context): Likewise.
3910 * except.c (check_handlers_1, check_handlers): Likewise.
3911 * init.c (create_temporary_var): Likewise.
3912 * method.c (use_thunk, synthesize_method): Likewise.
3913 * parser.c (cp_lexer_set_source_position_from_token,
3914 cp_lexer_get_preprocessor_token): Likewise.
3915 * pt.c (push_tinst_level, pop_tinst_level,
3916 tsubst_friend_function, instantiate_class_template, tsubst_decl,
3917 tsubst, tsubst_expr, instantiate_decl): Likewise.
3918 * semantics.c (genrtl_try_block, finish_label_stmt,
3919 begin_class_definition, expand_body,
3920 genrtl_finish_function): Likewise.
3921 * tree.c (build_min_nt, build_min): Likewise.
3922
3923 2003-05-01 Mark Mitchell <mark@codesourcery.com>
3924
3925 * decl2.c (comdat_linkage): Don't externalize explicit
3926 instantiations.
3927
3928 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3929
3930 PR c++/10554
3931 * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
3932 is not NULL.
3933
3934 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
3935
3936 * cp-tree.h (struct lang_id2): Remove. Move fields from here...
3937 (struct lang_identifier): ... to here.
3938 (LANG_ID_FIELD): Remove.
3939 (SET_LANG_ID): Remove.
3940 (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
3941 (SET_IDENTIFIER_LABEL_VALUE): Likewise.
3942 (IDENTIFIER_IMPLICIT_DECL): Likewise.
3943 (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
3944 (IDENTIFIER_ERROR_LOCUS): Likewise.
3945 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
3946
3947 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3948
3949 PR c++/8772
3950 * pt.c (convert_template_argument): Correct diagnostic.
3951
3952 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3953
3954 PR c++/9432, c++/9528
3955 * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
3956
3957 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
3958
3959 * decl.c (check_previous_goto_1): Adjust prototype.
3960 (check_previous_goto): Adjust use.
3961 (check_switch_goto): Likewise.
3962 (use_label): Adjust.
3963 (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
3964 (struct named_label_use_list): Use location_t datatype.
3965
3966 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3967
3968 PR c++/10551
3969 * pt.c (mark_decl_instantiated): Defer all explicit instantiations
3970 that have not yet been written out.
3971
3972 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3973
3974 PR c++/10549
3975 * class.c (layout_class_type): Mark overlong bitfields as having
3976 the maximum size permitted by their type, after layout.
3977
3978 PR c++/10527
3979 * error.c (dump_expr): Correctly handling of NEW_EXPR.4
3980
3981 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3982
3983 * call.c (build_operator_new_call): Fix typo.
3984 * lang-options.h: Likewise.
3985
3986 2003-04-29 Mark Mitchell <mark@codesourcery.com>
3987
3988 PR c++/10515
3989 * cp-tree.h (lookup_field_1): Declare it.
3990 * search.c (lookup_field_1): Make it public.
3991 * decl.c (reshape_init): Handle designated initializers.
3992
3993 * decl.c (maybe_commonize_var): Further tweak support for systems
3994 without weak symbols.
3995
3996 2003-04-27 Mark Mitchell <mark@codesourcery.com>
3997
3998 * decl.c (maybe_commonize_var): Fix thinko in last patch.
3999
4000 2003-04-27 Mark Mitchell <mark@codesourcery.com>
4001
4002 PR c++/10506
4003 * method.c (use_thunk): Decrement immediate_size_expand.
4004
4005 PR c++/10503
4006 * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4007 (DECL_MAYBE_TEMPLATE): Remove.
4008 * class.c (fixed_type_or_null): Avoid infinite recursion.
4009
4010 * decl.c (maybe_commonize_var): Make the code match the comments.
4011 * pt.c (instantiate_decl): Move call to import_export_decl.
4012
4013 2003-04-26 Mark Mitchell <mark@codesourcery.com>
4014
4015 * decl2.c (finish_file): Fix merge botch.
4016
4017 2003-04-25 Mark Mitchell <mark@codesourcery.com>
4018
4019 * decl2.c (finish_file): Don't call import_export_decl for
4020 functions that are not defined.
4021 (handle_class_head): Robustify.
4022 * pt.c (instantiate_decl): Do not call cp_finish_decl for
4023 variables that are not defined.
4024
4025 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
4026
4027 * call.c (print_z_candidates): Fix off by one error.
4028
4029 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
4030
4031 PR c++/10337
4032 * call.c (joust): Don't warn about conversion ops that are exact
4033 or cv-conversions. Rearrange to avoid multiple type comparisons.
4034
4035 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4036
4037 PR c++/10471
4038 * call.c (build_cxx_call): Robustify.
4039
4040 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
4041
4042 * Make-lang.in (lex.o): Remove mbchar.h.
4043 * lex.c (MULTIBYTE_CHARS): Lose.
4044 * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4045 in c-lex.c.
4046
4047 2003-04-23 Mark Mitchell <mark@codesourcery.com>
4048
4049 PR c++/9847
4050 * cp-tree.h (duplicate_tag_error): Remove.
4051 * class.c (duplicate_tag_error): Remove.
4052 * semantics.c (begin_class_definition): Return immediately for a
4053 duplicate class definition.
4054
4055 PR c++/10451
4056 * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4057
4058 2003-04-22 Mark Mitchell <mark@codesourcery.com>
4059
4060 PR c++/10446
4061 * search.c (lookup_fnfields_1): Handle empty slots in the method
4062 vector.
4063
4064 PR c++/10428
4065 * decl.c (check_elaborated_type_specifier): New function, split
4066 out from ...
4067 (xref_tag): ... here. Use the new function in more places.
4068
4069 * rtti.c (throw_bad_typeid): Use build_cxx_call.
4070
4071 2003-04-21 Mark Mitchell <mark@codesourcery.com>
4072
4073 * call.c (build_over_call): Use build_cxx_call.
4074 (build_cxx_call): New method, split out of build_over_call.
4075 * cp-tree.h (language_function): Add can_throw.
4076 (build_cxx_call): Declare it.
4077 * decl.c (finish_function): If a function does not contain any
4078 calls to functions that can throw an exception, indicate that
4079 fact.
4080 * decl2.c (mark_used): Do not defer the instantiation of
4081 functions, if the current function does not throw.
4082 * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4083 * pt.c (instantiate_decl): Make sure import_export_decl is called
4084 before emitting things.
4085 * rtti.c (throw_bad_cast): Use build_cxx_call.
4086 (build_dynamic_cast_1): Likewise.
4087 * typeck.c (build_function_call): Likewise.
4088
4089 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
4090
4091 PR c++/9881
4092 * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4093 expressions. Reverts my 2002-08-08 patch.
4094
4095 * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4096 cheaper early exit.
4097
4098 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4099
4100 * cp/decl2.c (start_static_storage_duration_function): Take count
4101 arg, don't check if it wraps round.
4102 (generate_ctor_or_dtor_function): Add locus arg, use it.
4103 (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4104 locus.
4105 (finish_file): Set line numbers to past EOF for synthesized
4106 functions.
4107
4108 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
4109
4110 PR c++/10405
4111 * search.c (lookup_field_1): Final scan goes backwards for
4112 types, forwards for non-types.
4113
4114 2003-04-17 Roger Sayle <roger@eyesopen.com>
4115
4116 PR c/10375
4117 * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4118 "nothrow" function attributes.
4119
4120 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4121
4122 PR c++/10347
4123 * pt.c (type_dependent_expression_p): Handle array new.
4124
4125 2003-04-15 Mark Mitchell <mark@codesourcery.com>
4126
4127 PR c++/10381
4128 * parser.c (cp_parser_primary_expression): Reorganize logic for
4129 dealing with name lookup failures.
4130
4131 2003-04-15 Jason Merrill <jason@redhat.com>
4132
4133 * decl2.c (mark_used): Don't instantiate anything if
4134 skip_evaluation.
4135
4136 2003-04-14 Ziemowit Laski <zlaski@apple.com>
4137
4138 * tree.c (build_cplus_array_type_1): Do not call
4139 uses_template_parms() on a NULL index_type.
4140
4141 2003-04-13 Roger Sayle <roger@eyesopen.com>
4142
4143 * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4144
4145 2003-04-12 Mark Mitchell <mark@codesourcery.com>
4146
4147 PR c++/10300
4148 * init.c (build_new_1): Reorganize.
4149
4150 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4151
4152 * class.c (initialize_array)
4153 * decl.c (reshape_init)
4154 * decl2.c (build_expr_from_tree)
4155 * init.c (build_zero_init)
4156 * pt.c (tsubst_copy, tsubst_copy_and_build)
4157 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4158 (ptm_initializer, class_initializer, get_pseudo_ti_init)
4159 * semantics.c (finish_compound_literal)
4160 * typeck.c (build_ptrmemfunc1)
4161 * typeck2.c (store_init_value, process_init_constructor)
4162 (build_functional_cast): Use build_constructor.
4163
4164 2003-04-12 Zack Weinberg <zack@codesourcery.com>
4165
4166 * call.c (print_z_candidates): Use gcc_gettext_width, not
4167 strlen, to determine how much padding to use.
4168
4169 2003-04-10 Zack Weinberg <zack@codesourcery.com>
4170
4171 * decl.c: Update all calls to shadow_warning.
4172
4173 2003-04-10 Mark Mitchell <mark@codesourcery.com>
4174
4175 * class.c (layout_class_type): Correct handling for overlong
4176 bit-fields whose width is the same as an integer type.
4177
4178 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4179
4180 * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4181 * cp-lang.c (cp_tree_size): New function.
4182 (LANG_HOOKS_TREE_SIZE): Override.
4183
4184 * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4185 tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4186 (union lang_tree_node): Remove common and srcloc members.
4187 (build_srcloc_here): Don't prototype.
4188 * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4189 * pt.c (pending_templates): Correct comment.
4190 * tree.c (build_srcloc, build_srcloc_here): Kill.
4191
4192 2003-04-06 Zack Weinberg <zack@codesourcery.com>
4193
4194 * call.c: Include intl.h.
4195 (print_z_candidate): Always use inform; get rid of errfn
4196 argument. Reorganize so that all the strings get picked up
4197 by xgettext. Note obligation of caller to pass first argument
4198 through gettext.
4199 (print_z_candidates): Update to match. Indent second and
4200 successive candidates by strlen() of translated message.
4201 (joust): Restructure ambiguous-conversion pedwarn so that
4202 translators see a complete sentence. Update calls to
4203 print_z_candidate.
4204
4205 * Make-lang.in (cp/call.o): Update dependencies.
4206
4207 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4208
4209 * decl.c (set_current_binding_level): Delete, revert last change.
4210 (current_binding_level): Modify to allow it as as lvalue.
4211
4212 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4213
4214 * name-lookup.c (find_binding): Pass appropriate pointer type to
4215 POP_TIMEVAR_AND_RETURN.
4216
4217 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4218
4219 * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4220 * cp-tree.h: Don't insist on having GNUC.
4221
4222 2003-04-03 Jason Merrill <jason@redhat.com>
4223
4224 * cvt.c (ocp_convert): Only abort if we try to convert an object
4225 of TREE_ADDRESSABLE type.
4226
4227 * class.c (build_vtable): Set DECL_ALIGN here.
4228 (get_vtable_decl): Not here.
4229 (layout_vtable_decl): Or here.
4230 (create_vtable_ptr): Or here.
4231 (layout_class_type): Or here.
4232 (check_bitfield_decl): Don't mess with field alignment.
4233
4234 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4235
4236 * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4237 DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4238 * rtti.c (dfs_class_hint_mark): Likewise.
4239
4240 * decl.c (push_local_name, push_class_level_binding,
4241 maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4242 functions returning void.
4243 * decl2.c (add_using_namespace): Likewise.
4244
4245 * decl.c (print_binding_level, print_other_binding_stack,
4246 print_binding_stack): Cast argument of %p specifier to void*.
4247 * ptree.c (cxx_print_decl): Likewise.
4248
4249 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4250 VAR_FUNCTION_OR_PARM_DECL_CHECK,
4251 VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4252 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4253 LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4254
4255 * decl.c (set_current_binding_level): New macro. Use throughout
4256 when setting the current binding level.
4257
4258 * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4259 in enum.
4260 * method.c (mangling_flags): Likewise.
4261
4262 * cp-tree.h (lang_type_header): Add __extension__ and use
4263 CHAR_BITFIELD for members.
4264
4265 2003-04-02 Geoffrey Keating <geoffk@apple.com>
4266
4267 PR other/9274
4268 * mangle.c: Include gt-cp-mangle.h.
4269 (subst_identifiers): Mark with GTY.
4270 * config-lang.in (gtfiles): Add cp/mangle.c.
4271 * Make-lang.in: (gt-cp-mangle.h): New rule.
4272 (cp/mangle.o): Depends on gt-cp-mangle.h.
4273
4274 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
4275
4276 * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4277 after \$(srcdir)/cp/name-lookup.h.
4278 * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4279 of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
4280 * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4281 (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4282
4283 2003-03-31 Jason Merrill <jason@redhat.com>
4284
4285 PR java/10145
4286 * class.c (check_field_decl): Don't set DECL_ALIGN.
4287
4288 2003-03-30 Mark Mitchell <mark@codesourcery.com>
4289
4290 PR c++/7647
4291 * decl.c (grokdeclarator): Tidy, slightly.
4292 * search.c (lookup_field_1): Add want_type parameter.
4293 (lookup_field_r): Adjust call to lookup_field_1.
4294
4295 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4296
4297 * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4298
4299 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4300
4301 * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
4302 prototype.
4303 (cxx_scope_find_binding_for_name): Likewise.
4304 * decl.c (find_binding: Move to name-lookup.c.
4305 (binding_for_name): Likewise.
4306 (cxx_scope_find_binding_for_name): Likewise.
4307 (BINDING_LEVEL): Remove.
4308 (push_binding): Tidy.
4309 (push_class_binding): Likewise.
4310 (pop_binding): Likewise.
4311 (poplevel): Likewise.
4312 (poplevel_class): Likewise.
4313 (set_identifier_type_value_with_scope): Likewise.
4314 (push_overloaded_decl): Likewise.
4315 (lookup_tag): Likewise.
4316 (unqualified_namespace_lookup): Likewise.
4317 (lookup_name_current_level): Likewise.
4318 (maybe_inject_for_scope_var): Likewise.
4319 (namespace_binding): Move to name-lookup.c.
4320 (set_namespace_binding): Likewise.
4321 * decl2.c (lookup_using_namespace): Tidy.
4322 (qualified_lookup_using_namespace): Likewise.
4323 (do_toplevel_using_decl): Likewise.
4324 * name-lookup.c: Include "timevar.h"
4325 * name-lookup.h (cxx_scope): Declare.
4326 (struct cxx_binding): Lose member "has_level". Adjust "scope"
4327 member declaration.
4328 (BINDING_SCOPE): Adjust definition.
4329 (BINDING_HAS_LEVEL_P): Remove.
4330
4331 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
4332
4333 * name-lookup.c: New file.
4334 * name-lookup.h: Likewise..
4335 * decl.c (push_binding): Adjust use cxx_binding_make.
4336 (free_bindings): Move to name-lookup.c
4337 (pop_binding): Use cxx_binding_free.
4338 (binding_for_name): Tidy.
4339 * cp-tree.h: Include "name-lookup.h"
4340 (cxx_binding_make): Move to name-lookup.h
4341 (cxx_binding_clear): Likewise.
4342 (struct cxx_binding): Likewise.
4343 (LOCAL_BINDING_P): Likewise.
4344 (INHERITED_VALUE_BINDING_P): Likewise.
4345 (BINDING_SCOPE): Likewise.
4346 (BINDING_HAS_LEVEL_P): Likewise.
4347 (BINDING_VALUE): Likewise.
4348 (BINDING_TYPE): Likewise.
4349 * config-lang.in (gtfiles): Add cp/name-lookup.h
4350 * Make-lang.in (cp/name-lookup.o): New rule.
4351 (CXX_OBJS): Add cp/name-lookup.o
4352 (CXX_TREE_H): Add cp/name-lookup.h
4353
4354 2003-03-28 Jason Merrill <jason@redhat.com>
4355
4356 PR c++/10245
4357 * cvt.c (force_rvalue): New fn.
4358 * call.c (build_conditional_expr): Use it.
4359 * cp-tree.h: Declare it.
4360
4361 2003-03-28 Mike Stump <mrs@apple.com>
4362
4363 * error.c (dump_expr): Add 0x to printed hex numbers to make
4364 output match source code better.
4365
4366 2003-03-28 Mark Mitchell <mark@codesourcery.com>
4367
4368 PR c++/10218
4369 * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4370 definitions.
4371
4372 * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4373 non-existant ssdf_decls array.
4374 (finish_file): Call generator_ctor_or_dtor_function when there are
4375 static constructors or destructors and no other static
4376 initializations.
4377
4378 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
4379
4380 PR c++/10047
4381 * decl2.c (finish_file): Don't warn about explicitly instantiated
4382 inline decls.
4383
4384 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4385
4386 PR c++/10224
4387 * pt.c (lookup_template_class): Only check instantiated args if
4388 they do not contain template parameters.
4389
4390 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
4391
4392 PR c++/10158
4393 * parser.c (cp_parser_function_definition): Set
4394 DECL_INITIALIZED_IN_CLASS for members.
4395 * pt.c (instantiate_decl): Only reduce the template args for
4396 friends that are not defined in class.
4397
4398 2003-03-25 Jason Merrill <jason@redhat.com>
4399
4400 * call.c (print_z_candidate): Change name of first arg to msgid.
4401 (joust): Add comment for translators.
4402
4403 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4404
4405 PR c++/9898, PR c++/383, DR 322
4406 * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4407 through reference types on both PARM and ARG.
4408
4409 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4410
4411 PR c++/10119
4412 * error.c (dump_expr) <BASELINK>: Use dump_expr.
4413 * pt.c (maybe_fold_nontype_args): New function.
4414 (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4415 <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4416 (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4417 maybe_fold_nontype_args.
4418
4419 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
4420
4421 PR c++/10026
4422 * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4423
4424 2003-03-23 Mark Mitchell <mark@codesourcery.com>
4425
4426 PR c++/7086
4427 * typeck.c (cxx_mark_addressable): Adjust call to
4428 gen_mem_addressof or put_var_into_stack.
4429
4430 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
4431
4432 PR c++/9978, c++/9708
4433 * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4434 * call.c (add_template_candidate_real): Adjust
4435 instantiate_template call.
4436 * class.c (resolve_address_of_overloaded_function): Likewise.
4437 * decl.c (build_enumerator): Set TREE_CONSTANT.
4438 * pt.c (check_instantiated_args): New.
4439 (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4440 TREE_READONLY.
4441 (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4442 (reduce_template_parm_level): Likewise.
4443 (process_template_parm): Likewise.
4444 (check_explicit_specialization): Adjust instantiate_template call.
4445 (convert_template_argument): Don't check non-type argument here.
4446 (lookup_template_class): Check them here.
4447 (tsubst_friend_function): Adjust instantiate_template call.
4448 (instantiate_template): Add tsubst_flags parameter, use it. Check
4449 instantiated args.
4450
4451 2003-03-21 Zack Weinberg <zack@codesourcery.com>
4452
4453 * decl.c: Update calls to shadow_warning.
4454
4455 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
4456
4457 PR c++/9898
4458 * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4459 (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4460
4461 2003-03-20 Mark Mitchell <mark@codesourcery.com>
4462
4463 * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4464 friends.
4465 * cp/pt.c (instantiate_class_template): Fix formatting.
4466
4467 2003-03-14 Matt Austern <austern@apple.com>
4468
4469 * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4470 (unemitted_tinfo_decl_p): Remove.
4471 (emit_tinfo_decl): Change declaration to remove unused parameter.
4472 * decl2.c (finish_file): Change tinfo emission to loop through
4473 unemitted_tinfo_decls array instead of looping through all decls.
4474 * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4475 unused second parameter.
4476 (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4477 (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4478 (emit_tinfo_decl): remove unused second parameter, add assertion
4479 that decl hasn't already been emitted.
4480
4481 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
4482
4483 * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4484 type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4485 return statements.
4486
4487 2003-03-19 Jason Merrill <jason@redhat.com>
4488
4489 PR c++/8316, c++/9315, c++/10136
4490 * call.c (print_z_candidate): Split out from...
4491 (print_z_candidiates): ...here.
4492 (joust): Use it.
4493
4494 2003-03-17 Roger Sayle <roger@eyesopen.com>
4495
4496 PR c++/10031
4497 * decl.c (duplicate_decls): Use the new type when prototyping
4498 anticipated decls, even when the types match. This defines the
4499 exception list for the built-in function.
4500
4501 2003-03-17 Jason Merrill <jason@redhat.com>
4502
4503 PR c++/10091
4504 * typeck.c (build_class_member_access_expr): Compare
4505 TYPE_MAIN_VARIANTs.
4506
4507 2003-03-17 Mark Mitchell <mark@codesourcery.com>
4508
4509 PR c++/9639
4510 * parser.c (cp_parser_declarator_id): Clear parser->scope.
4511
4512 2003-03-16 Jason Merrill <jason@redhat.com>
4513
4514 PR c++/9993
4515 * decl.c (finish_function): Only allow the NRVO to use variables
4516 declared at function scope.
4517
4518 2003-03-17 Andreas Jaeger <aj@suse.de>
4519
4520 * Make-lang.in (cp/TAGS): Remove.
4521
4522 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
4523
4524 PR c++/9629
4525 * cp-tree.h (struct language_function): Add in_base_initializer.
4526 (in_base_initializer): define it.
4527 (expand_member_init): Remove INIT param.
4528 * init.c (expand_member_init): Remove INIT param, return the member.
4529 (emit_mem_initializers): Set in_base_initializer.
4530 * class.c (build_base_path): Check in_base_initializer.
4531 * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4532 * pt.c (tsubst_initializer_list): Likewise.
4533
4534 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
4535
4536 * decl.c (binding_for_name): Fix initialization thinko.
4537
4538 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
4539
4540 Compile-time improvement: 2/n.
4541 * cp-tree.h (struct cxx_binding): New datatype;
4542 (struct lang_identifier): Use it.
4543 (LOCAL_BINDING_P): Adjust definition.
4544 (INHERITED_VALUE_BINDING_P): Likewise.
4545 (BINDING_SCOPE): Likewise.
4546 (BINDING_HAS_LEVEL_P): Likewise.
4547 (BINDING_VALUE): Likewise.
4548 (BINDING_TYPE): Likewise.
4549 (IDENTIFIER_VALUE): Likewise.
4550 (struct tree_binding): Remove.
4551 (TS_CP_BINDING): Likewise.
4552 ((union lang_tree_node): Remove field "binding".
4553 (cxx_binding_clear): New macro.
4554 (binding_for_name): Adjust return type.
4555 (qualified_lookup_using_namespace): Adjust prototype.
4556 (lookup_using_namespace): Adjust prototype.
4557 (cxx_scope_find_binding_for_name): Declare.
4558 * cp-tree.def: Remove CPLUS_BINDING definition.
4559 * decl.c (push_binding): Adjust local variable type.
4560 (add_binding): Likewise.
4561 (push_class_binding): Likewise.
4562 (pop_binding): Likewise.
4563 (poplevel): Likewise.
4564 (poplevel_class): Likewise.
4565 (free_bindings): Adjust type.
4566 (find_binding): Adjust return type, add a third parameter. Remove
4567 non-useful assertion now that we use static typing.
4568 (cxx_scope_find_binding_for_name): New function.
4569 (binding_for_name): Use it. Adjust local variable type. Simplify.
4570 (namespace_binding): Simplify.
4571 (set_namespace_binding): Likewise.
4572 (set_identifier_type_value_with_scope): Adjust local variable type.
4573 (lookup_tag): Don't type-abuse of local variable 'old'.
4574 (lookup_namespace_name): Likewise. Allocate binding on stack.
4575 (select_decl): Adjust prototype.
4576 (unqualified_namespace_lookup): Allocate binding on stack.
4577 Don't type-abuse of local variable 'val'.
4578 (lookup_name_real): Likewise.
4579 (maybe_inject_for_scope_var): Adjust local variable type.
4580 (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4581 (namespace_binding): Adjust logic, simplify.
4582 (BINDING_LEVEL): Adjust definition.
4583 (push_class_level_binding): Adjust local variable type.
4584 (struct cxx_saved_binding): Adjust field 'binding' type.
4585 * decl2.c (ambiguous_decl): Adjust prototype.
4586 (lookup_using_namespace): Adjust local variable type.
4587 (qualified_lookup_using_namespace): Catch type error and correct
4588 ensueing logic error.
4589 (do_nonmember_using_decl): Adjust local variable type. Allocate
4590 temporary cxx_binding on stack.
4591 (do_toplevel_using_decl): Adjust local variable type.
4592 * ptree.c (cxx_print_cxx_binding): New function.
4593 (cxx_print_identifier): Use it.
4594 (cxx_print_xnode): Delete CPLUS_BINDING case label.
4595
4596 2003-03-15 Roger Sayle <roger@eyesopen.com>
4597
4598 * tree.c (count_functions): Fix whitespace.
4599
4600 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
4601
4602 * Make-lang.in: Update.
4603
4604 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4605
4606 PR c++/6440
4607 * pt.c (maybe_process_partial_specialization): Handle
4608 member class template when enclosing class template is
4609 explicit specialized.
4610 (most_general_template): Stop looking when DECL is already
4611 specialized.
4612
4613 2003-03-13 Jason Merrill <jason@redhat.com>
4614
4615 PR c++/9420
4616 * search.c (lookup_conversions): Call complete_type here.
4617 * call.c (implicit_conversion): Not here.
4618
4619 2003-03-13 Mark Mitchell <mark@codesourcery.com>
4620
4621 * decl2.c (do_nonmember_using_decl): Correct handling of
4622 simultaneous type/non-type bindings.
4623
4624 * call.c (initialize_reference): Remove bogus assertion.
4625 * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4626
4627 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
4628
4629 PR c++/7050
4630 * expr.c (cxx_expand_expr): Return const0_rtx for throw
4631 expressions.
4632
4633 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4634
4635 PR c++/9474
4636 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4637 to merge old and new declarations.
4638
4639 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4640
4641 * g++.1: Remove.
4642 * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4643 (cp/g++.1): Build it from scratch in the build tree.
4644 (c++.install-man): Depend on it. Install it from the build tree.
4645 (c++.mostlyclean): Clean it.
4646
4647 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4648
4649 PR c++/9474
4650 * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4651 to merge old and new declarations.
4652
4653 PR c++/9924
4654 * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4655
4656 2003-03-11 Jason Merrill <jason@redhat.com>
4657
4658 PR c++/9820
4659 * search.c (lookup_member): Fix handling of functions in a class
4660 being defined.
4661
4662 2003-03-11 Mark Mitchell <mark@codesourcery.com>
4663
4664 PR c++/8700
4665 * call.c (convert_class_to_reference): Adjust usage of
4666 splice_viable.
4667 (any_viable): Remove.
4668 (splice_viable): Combine with any_viable.
4669 (print_z_candidates): Avoid printing duplicates.
4670 (build_user_type_conversion_1): Adjust usage of splice_viable.
4671 (build_new_function_call): Likewise.
4672 (build_operator_new_call): Likewise.
4673 (build_object_call): Likewise.
4674 (build_conditional_expr): Likewise.
4675 (build_new_op): Likewise.
4676 (build_new_method_call): Likewise.
4677 (joust): Remove spurious comment.
4678 * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4679 * decl2.c (arg_assoc_class): Simplify.
4680 * friend.c (add_friend): Likewise.
4681
4682 2003-03-11 Jason Merrill <jason@redhat.com>
4683
4684 PR c++/8660
4685 * decl2.c (check_classfn): A member template only matches a
4686 member template.
4687
4688 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
4689
4690 * Make-lang.in (CXX_C_OBJS): Update.
4691 * lang-specs.h: Don't define __GNUG__ here.
4692
4693 2003-03-10 Mark Mitchell <mark@codesourcery.com>
4694
4695 * call.c (perform_overload_resolution): New function.
4696 (build_new_function_call): Use it.
4697 (build_operator_new_call): Likewise.
4698 (add_candidates): Add explicit_targs and template_only parameters.
4699 (build_new_op): Adjust accordingly.
4700 * cp-tree.h (build_operator_new_call): New function.
4701 (build_function_call_real): Remove.
4702 (build_function_call_maybe): Likewise.
4703 * init.c (build_new_1): Use build_operator_new_call.
4704 * typeck.c (build_function_call_real): Rename to ...
4705 (build_function_call): ... this.
4706
4707 2003-03-10 Devang Patel <dpatel@apple.com>
4708
4709 PR c++/9394
4710 * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4711
4712 2003-03-10 Jason Merrill <jason@redhat.com>
4713
4714 PR c++/9798
4715 * decl.c (push_using_directive): Push before recursing.
4716
4717 PR c++/9868, c++/9524
4718 * call.c (resolve_scoped_fn_name): Handle the case of a function
4719 pointer member.
4720
4721 * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4722 argument in the pointer-to-member case.
4723
4724 2003-03-09 Mark Mitchell <mark@codesourcery.com>
4725
4726 PR c++/9373
4727 * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4728 pointers to member functions.
4729
4730 PR c++/8534
4731 * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4732 in pointer-to-member-function types.
4733
4734 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
4735
4736 * expr.c (cplus_expand_constant): Use C90 prototype style.
4737 (cxx_expand_expr): Likewise.
4738
4739 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4740
4741 PR c++/9970
4742 * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4743 functions.
4744
4745 2003-03-08 Geoffrey Keating <geoffk@apple.com>
4746
4747 * lang-specs.h (c++-header): Change .pch to .gch.
4748
4749 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
4750
4751 * cp-tree.h (cxx_init): Update prototype.
4752 * lex.c (cxx_init): Similarly.
4753
4754 2003-03-08 Mark Mitchell <mark@codesourcery.com>
4755
4756 PR c++/9823
4757 * cp-tree.h (begin_mem_initializers): Remove.
4758 * parser.c (cp_parser_mem_initializer_list): Inline it here.
4759 Do not call finish_mem_initializers if not in a constructor.
4760 (cp_parser_class_head): Fix typo in error message.
4761 * semantics.c (begin_mem_initializers): Remove.
4762 * testsuite/g++.dg/parser/constructor1.C: New test.
4763
4764 PR c++/9809
4765 * call.c (add_function_candidate): Skip builtin fuctions that have
4766 not yet been declared.
4767
4768 PR c++/9982
4769 * init.c (build_new_1): Correct logic for determining whether or
4770 not to use an array cookie.
4771
4772 PR c++/9524
4773 * parser.c (cp_parser_postfix_expression): Call
4774 finish_non_static_data_member, even when processing_template_decl.
4775
4776 PR c++/9912
4777 * cp-tree.h (is_ancestor): New function.
4778 (handle_class_head): Change prototype.
4779 * decl2.c (is_namespace_ancestor): Rename to ...
4780 (namespace_anecestor): ... this.
4781 (set_decl_namespace): Adjust accordingly.
4782 (handle_class_head): Remove unnecessary parameters.
4783 * parser.c (cp_parser_class_head): Check that
4784 nested-name-specifiers are used appropriately.
4785
4786 2003-03-07 Mark Mitchell <mark@codesourcery.com>
4787
4788 * call.c (reference_binding): Remove REF_IS_VAR parameter.
4789 (implicit_conversion): Adjust call to reference_binding.
4790 (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4791 (initialize_reference): Adjust handling for references bound to
4792 rvalues.
4793 * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4794 prototype.
4795 (real_non_cast_lvalue_p): New method.
4796 * cvt.c (build_up_reference): Adjust use of
4797 make_temporary_var_for_ref_to_temp.
4798 * tree.c (real_non_cast_lvalue_p): New method.
4799
4800 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4801
4802 * except.c (init_exception_processing): Use C90 prototype style.
4803 (cp_protect_cleanup_actions): Likewise.
4804 (prepare_eh_type): Likewise.
4805 (build_eh_type_type): Likewise.
4806 (build_exc_ptr): Likewise.
4807 (do_begin_catch): Likewise.
4808 (dtor_nothrow): Likewise.
4809 (do_end_catch): Likewise.
4810 (push_eh_cleanup): Likewise.
4811 (decl_is_java_type): Likewise.
4812 (choose_personality_routine): Likewise.
4813 (initialize_handler_parm): Likewise.
4814 (expand_start_catch_block): Likewise.
4815 (expand_end_catch_block): Likewise.
4816 (begin_eh_spec_block): Likewise.
4817 (finish_eh_spec_block): Likewise.
4818 (do_allocate_exception): Likewise.
4819 (do_free_exception): Likewise.
4820 (wrap_cleanups_r): Likewise.
4821 (stabilize_throw_expr): Likewise.
4822 (build_throw): Likewise.
4823 (complete_ptr_ref_or_void_ptr_p): Likewise.
4824 (is_admissible_throw_operand): Likewise.
4825 (nothrow_libfn_p): Likewise.
4826 (can_convert_eh): Likewise.
4827 (check_handlers_1): Likewise.
4828 (check_handlers): Likewise.
4829
4830 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4831
4832 * call.c (merge_conversion_sequences): New function.
4833 (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4834 (convert_class_to_reference): Correct handling of second
4835 standard conversion sequence in a user-defined conversion
4836 sequence.
4837 (build_user_type_conversion_1): Use merge_conversion_sequences.
4838 * cp-tree.def: Add comments for CONV nodes.
4839 * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4840
4841 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
4842
4843 * error.c (init_error): Use C90 prototype style.
4844 (dump_scope): Likewise.
4845 (dump_qualifiers): Likewise.
4846 (dump_template_argument): Likewise.
4847 (dump_template_argument_list): Likewise.
4848 (dump_template_parameter): Likewise.
4849 (dump_template_bindings): Likewise.
4850 (dump_type): Likewise.
4851 (dump_typename): Likewise.
4852 (class_key_or_enum): Likewise.
4853 (dump_aggr_type): Likewise.
4854 (dump_type_prefix): Likewise.
4855 (dump_type_suffix): Likewise.
4856 (dump_global_iord): Likewise.
4857 (dump_simple_decl): Likewise.
4858 (dump_decl): Likewise.
4859 (dump_template_decl): Likewise.
4860 (dump_function_decl): Likewise.
4861 (dump_parameters): Likewise.
4862 (dump_exception_spec): Likewise.
4863 (dump_function_name): Likewise.
4864 (dump_template_parms): Likewise.
4865 (dump_char): Likewise.
4866 (dump_expr_list): Likewise.
4867 (dump_expr): Likewise.
4868 (dump_binary_op): Likewise.
4869 (dump_unary_op): Likewise.
4870 (type_as_string): Likewise.
4871 (expr_as_string): Likewise.
4872 (decl_as_string): Likewise.
4873 (context_as_string): Likewise.
4874 (lang_decl_name): Likewise.
4875 (cp_file_of): Likewise.
4876 (cp_line_of): Likewise.
4877 (decl_to_string): Likewise.
4878 (expr_to_string): Likewise.
4879 (fndecl_to_string): Likewise.
4880 (code_to_string): Likewise.
4881 (language_to_string): Likewise.
4882 (parm_to_string): Likewise.
4883 (op_to_string): Likewise.
4884 (type_to_string): Likewise.
4885 (assop_to_string): Likewise.
4886 (args_to_string): Likewise.
4887 (cv_to_string): Likewise.
4888 (cxx_print_error_function): Likewise.
4889 (cp_diagnostic_starter): Likewise.
4890 (cp_diagnostic_finalizer): Likewise.
4891 (cp_print_error_function): Likewise.
4892 (function_category): Likewise.
4893 (print_instantiation_full_context): Likewise.
4894 (print_instantiation_partial_context): Likewise.
4895 (maybe_print_instantiation_context): Likewise.
4896 (print_instantiation_context): Likewise.
4897 (cp_printer): Likewise.
4898 (print_integer): Likewise.
4899 (print_non_consecutive_character): Likewise.
4900 (locate_error): Likewise.
4901
4902 2003-03-06 Mark Mitchell <mark@codesourcery.com>
4903
4904 PR c++/9965
4905 * call.c (reference_binding): Add ref_is_var parameter.
4906 (implicit_conversion): Adjust call to reference_binding.
4907 (initialize_reference): Likewise.
4908
4909 PR c++/9400
4910 * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
4911 PARM_DECLs.
4912
4913 PR c++/9791
4914 * class.c (get_basefndecls): Use lookup_fnfields_1.
4915
4916 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4917
4918 PR c++/9188
4919 * parser.c (cp_parser_type_parameter): Remove redundant `expect'
4920 in error message.
4921 (cp_parser_single_declaration): Likewise.
4922
4923 2003-03-05 Jason Merrill <jason@redhat.com>
4924
4925 PR c++/9440
4926 * call.c (build_conditional_expr): Use convert rather than an
4927 explicit NOP_EXPR.
4928
4929 2003-03-02 Matt Austern <austern@apple.com>
4930
4931 * decl.c (cp_binding_level): Add static_decls varray member.
4932 (add_decl_to_level): Add static/inline namespace scope
4933 declarations to static_decls array.
4934 (wrapup_global_for_namespace): Pass static_decls only, instead of
4935 all decls, to wrapup_global_declarations/check_global_declarations.
4936 (push_namespace): Initialize static_decls for ordinary namespaces.
4937 (cxx_init_decl_processing): Initialize static_decls for global
4938 namespace.
4939
4940 2003-03-05 Mark Mitchell <mark@codesourcery.com>
4941
4942 * class.c (end_of_class): Correct thinko.
4943
4944 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
4945
4946 * config-lang.in: Replace ${libstdcxx_version} by its value.
4947
4948 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4949
4950 * cp-tree.h (cxx_saved_binding): Declare.
4951 (struct saved_scope): Adjust type of field 'old_binding'.
4952 * decl.c (cxx_saved_binding_make): New macro.
4953 (struct cxx_saved_binding): Define.
4954 (store_bindings): Adjust prototype. Use cxx_saved_binding to save
4955 C++ bindings.
4956 (maybe_push_to_top_level): Adjust local variable type.
4957 (pop_from_top_level): Likewise.
4958
4959 2003-03-04 Tom Tromey <tromey@redhat.com>
4960
4961 * Make-lang.in (c++.tags): New target.
4962
4963 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
4964
4965 * Make-lang.in: Update.
4966
4967 2003-03-03 Jason Merrill <jason@redhat.com>
4968
4969 * decl.c (finish_enum): Do set the type in a template. Simplify.
4970 * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
4971
4972 2003-03-03 Mark Mitchell <mark@codesourcery.com>
4973
4974 PR c++/9878
4975 * call.c (convert_class_to_reference): Correct conversion
4976 sequences.
4977 (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
4978 (implicit_conversion): Adjust call to reference_binding.
4979 (add_candidate): Change type of candidates parameter.
4980 (add_function_candidate): Likewise.
4981 (add_conv_candidate): Likewise.
4982 (build_builtin_candidate): Likewise.
4983 (add_builtin_candidate): Likewise.
4984 (add_builtin_candidates): Likewise.
4985 (add_template_candidate_real): Likewise.
4986 (add_template_candidate): Likewise.
4987 (add_template_conv_candidate): Likewise.
4988 (build_user_type_conversion_1): Adjust accordingly.
4989 (build_object_call): Likewise.
4990 (build_conditional_expr): Likewise.
4991 (add_candidates): Likewise.
4992 (build_new_op): Likewise.
4993 (convert_like_real): Use USER_CONV_CAND. Use build_nop.
4994 (build_new_method_call): Adjust calls to add_function_candidate.
4995 (make_temporary_var_for_ref_to_temp): New function.
4996 (initialize_reference): Add decl parameter.
4997 * class.c (build_rtti_vtbl_entries): Use build_address and
4998 build_nop.
4999 * cp-tree.h (initialize_reference): Change prototype.
5000 (make_temporary_var_for_ref_to_temp): New function.
5001 (build_type_conversion): Change prototype.
5002 (build_address): New function.
5003 (build_nop): Likewise.
5004 * cvt.c (cp_convert_to_pointer): Adjust call to
5005 build_type_conversion. Avoid indicating redundant NOP_EXPRs.
5006 Use build_nop.
5007 (convert_to_pointer_force): Use build_nop.
5008 (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5009 (convert_to_reference): Adjust call to build_type_conversion.
5010 (ocp_convert): Likewise.
5011 (build_type_conversion): Remove for_sure parameter.
5012 * decl.c (grok_reference_init): Use initialize_reference.
5013 * typeck.c (build_address): New function.
5014 (build_nop): Likewise.
5015 (build_unary_op): Use them.
5016 (build_ptrmemfunc): Tidy slightly.
5017 (convert_for_initialization): Adjust call to
5018 initialize_reference.
5019 * typeck2.c (store_init_value): Remove #if 0'd code.
5020
5021 2003-03-03 Jason Merrill <jason@redhat.com>
5022
5023 * decl.c (start_function): Clear DECL_NUM_STMTS.
5024
5025 * class.c (get_vtable_decl): Use vtbl_type_node.
5026 (build_primary_vtable): Check for it.
5027
5028 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
5029
5030 * decl.c (check_initializer): Check for vector_opaque_p.
5031
5032 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
5033
5034 * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5035 invoke an external cpp during compilation.
5036
5037 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
5038
5039 * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5040 that of warning().
5041 (start_decl): Likewise.
5042 (start_function): Likewise.
5043
5044 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
5045
5046 * Make-lang.in (CXX_C_OBJS): Update.
5047
5048 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5049
5050 PR c++/9892
5051 * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5052 instantiating it.
5053
5054 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
5055
5056 * parser.c (cp_parser_init_declarator): Revert opaque
5057 vector_opaque_p change.
5058 Do not include target.h.
5059
5060 2003-02-28 Mark Mitchell <mark@codesourcery.com>
5061
5062 PR c++/9879
5063 * cp-tree.h (build_zero_init): Add parameter.
5064 * decl.c (cp_finish_decl): Adjust call.
5065 * init.c (build_zero_init): Add nelts parameter. Adjust recursive
5066 calls.
5067 (build_default_init): Add nelts parameter. Adjust calls to
5068 build_zero_init.
5069 (build_new_1): Adjust call to build_default_init.
5070 * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5071
5072 2003-02-26 Devang Patel <dpatel@apple.com>
5073
5074 * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5075 required. Postpone enum setting for template decls.
5076 (build_enumerator): Delay copying value node until finish_enum
5077 (). Remove #if 0'ed code.
5078 * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5079 (tsubst_copy): Add check for enum type.
5080
5081 2003-02-25 Mark Mitchell <mark@codesourcery.com>
5082
5083 PR c++/9683
5084 * decl2.c (prune_vars_needing_no_initialization): Do not throw
5085 away initializations for DECL_EXTERNAL VAR_DECLs.
5086 (finish_file): Adjust accordingly.
5087 * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5088
5089 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5090
5091 * decl.c (add_binding): Time TV_NAME_LOOKUP.
5092 (push_class_binding): Likewise.
5093 (set_namespace_binding): Likewise.
5094
5095 2003-02-24 Mark Mitchell <mark@codesourcery.com>
5096
5097 PR c++/9836
5098 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5099 specializations back to the main template.
5100 * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5101 * pt.c (resolve_typename_type): Likewise.
5102
5103 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
5104
5105 PR c++/9778
5106 * pt.c (tsubst_copy_and_build): For a templated function inside a
5107 scope, process template arguments.
5108
5109 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5110
5111 PR c++/9602
5112 * typeck2.c (abstract_virtuals_error): Don't check when
5113 TYPE is still template parameter dependent.
5114
5115 2003-02-23 Mark Mitchell <mark@codesourcery.com>
5116
5117 PR c++/5333
5118 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5119 * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5120 * pt.c (instantiate_class_template): Don't try to instantiate
5121 dependent types.
5122 (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5123
5124 2003-02-21 Mark Mitchell <mark@codesourcery.com>
5125
5126 PR c++/9749
5127 * decl.c (grokdeclarator): Do not allow parameters with variably
5128 modified types.
5129
5130 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
5131
5132 * search.c (grow_bfs_bases): Remove. Fold into ...
5133 (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5134 in previous patch.
5135
5136 2003-02-20 Mark Mitchell <mark@codesourcery.com>
5137
5138 PR c++/9729
5139 * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5140 when the G++ 3.2 ABI prevents correct compilation.
5141
5142 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
5143
5144 Change base class access representation. Share virtual base
5145 binfos.
5146 * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5147 call.
5148 * cp/class.c (build_base_path): Likewise.
5149 (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5150 (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5151 (make_new_vtable): Adjust.
5152 (force_canonical_binfo_r): Delete.
5153 (force_canonical_binfo): Delete.
5154 (mark_primary_virtual_base): Delete.
5155 (dfs_unshared_virtual_bases): Delete.
5156 (mark_primary_bases): Adjust.
5157 (maybe_warn_about_overly_private_class): Adjust.
5158 (dfs_base_derived_from): Delete.
5159 (base_derived_from): Follow the inheritance chain.
5160 (struct find_final_overrider_data): Add vpath member.
5161 (dfs_find_final_overrider): Adjust.
5162 (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5163 (find_final_overrider): Adjust.
5164 (update_vtable_entry_for_fn): Adjust.
5165 (modify_all_vtables): Adjust.
5166 (walk_subobject_offsets): Adjust.
5167 (layout_nonempty_base_or_field): Adjust.
5168 (layout_empty_base): Remove last parameter. Adjust.
5169 (build_base_field): Adjust.
5170 (build_base_fields): Adjust.
5171 (propagate_binfo_offsets): Remove last parameter. Adjust.
5172 (dfs_set_offset_for_unshared_vbases): Delete.
5173 (layout_virtual_bases): Adjust.
5174 (finish_struct_1): Adjust.
5175 (init_class_processing): Don't init access nodes.
5176 (dfs_get_primary_binfo): Delete.
5177 (get_primary_binfo): Adjust.
5178 (dump_class_hierarchy_r): Remove most derived arg, add IGO
5179 parameter. Adjust.
5180 (dump_class_hierarchy): Adjust.
5181 (finish_vtbls): Adjust.
5182 (get_original_base): Delete.
5183 (build_vtt_inits): Adjust.
5184 (dfs_build_secondary_vptr_vtt_inits): Adjust.
5185 (dfs_ctor_vtable_bases_queue_p): Adjust.
5186 (build_ctor_vtbl_group): Adjust.
5187 (dfs_accumulate_vtbl_inits): Adjust.
5188 (build_vtbl_initializer): Adjust.
5189 (build_vbase_offset_vtbl_entries): Adjust.
5190 (add_vcall_offset_vtbl_entries_1): Adjust.
5191 * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5192 (access_*_node): Remove.
5193 (CANONICAL_BINFO): Delete.
5194 (BINFO_UNSHARED_MARKED): Remove.
5195 (BINFO_MARKED): Set LANG_FLAG_0 directly.
5196 (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5197 (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5198 (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5199 Delete.
5200 (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5201 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5202 (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5203 Delete.
5204 (BINFO_DEPENDENT_BASE_P): New.
5205 (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5206 index.
5207 (markedp, unmarkedp): Adjust.
5208 (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5209 dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5210 find_vbase_instance, binfo_for_vbase): Delete.
5211 (copied_binfo, original_binfo): Declare.
5212 (finish_base_specifier): Add virtual_p arg.
5213 (unshare_base_binfos): Delete.
5214 (copy_base_binfos): Declare.
5215 (reverse_path): Delete.
5216 * cp/decl.c (xref_basetypes): Access and virtuality passed
5217 differently. Don't copy direct base binfos here. Call
5218 copy_base_binfos.
5219 * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5220 (initialize_vtbl_ptrs): Adjust.
5221 (expand_member_init): Adjust.
5222 * cp/parser.c (cp_parser_base_specifier): Adjust.
5223 * cp/pt.c (instantiate_class_template): Adjust.
5224 (get_template_base_recursive): Adjust.
5225 * cp/rtti.c (get_pseudo_ti_init): Adjust.
5226 (get_pseudo_ti_desc): Adjust.
5227 * cp/tree.c (unshare_base_binfos): Rename to ...
5228 (copy_base_binfos): ... here, reimplement.
5229 (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5230 (reverse_path): Remove.
5231 * cp/typeck.c (get_delta_difference): Adjust error messages.
5232 * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5233 * cp/search.c (lookup_base_r): Adjust.
5234 (dynamic_cast_base_recurse): Adjust.
5235 (canonical_binfo): Remove.
5236 (dfs_canonical_queue): Remove.
5237 (dfs_assert_unmarked_p): Remove.
5238 (assert_canonical_unmarked): Remove.
5239 (shared_marked_p, shared_unmarked_p): Remove.
5240 (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5241 (dfs_access_in_type): Adjust.
5242 (access_in_type): Adjust.
5243 (dfs_accessible_queue_p): Adjust.
5244 (dfs_accessible_p): Adjust.
5245 (is_subobject_of_p_1, is_subobject_of_p): Remove.
5246 (struct lookup_field_info): Remove from_dep_base_p field.
5247 (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5248 (lookup_field_r): Remove dependent base code.
5249 (lookup_member): Likewise.
5250 (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5251 (dfs_unmarked_real_bases_queue_p): Remove.
5252 (dfs_marked_real_bases_queue_p): Remove.
5253 (dfs_skip_vbases): Remove.
5254 (dfs_get_pure_virtuals): Adjust.
5255 (markedp, unmarkedp): Adjust.
5256 (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5257 (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5258 (dfs_unmark): Adjust.
5259 (dfs_get_vbase_types):Remove.
5260 (dfs_build_inheritance_graph_order): Remove.
5261 (get_vbase_types): Remove
5262 (dfs_find_vbase_instance): Remove.
5263 (find_vbase_instance): Remove.
5264 (dfs_debug_unmarkedp): Adjust.
5265 (dependent_base_p): Remove.
5266 (dfs_push_type_decls): Adjust.
5267 (dfs_push_decls): Adjust.
5268 (dfs_no_overlap_yet): Adjust.
5269 (copied_binfo): New function.
5270 (original_binfo): New function.
5271 (binfo_for_vbase): Remove.
5272
5273 2003-02-18 Zack Weinberg <zack@codesourcery.com>
5274
5275 * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5276 (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5277 vectors, for speed.
5278
5279 2003-02-18 Mark Mitchell <mark@codesourcery.com>
5280
5281 PR c++/9704
5282 * class.c (layout_class_type): In the 3.2 ABI, take into account
5283 trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5284
5285 2003-02-18 Matt Austern <austern@apple.com>
5286
5287 * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5288 nothing for C++.
5289 * cp/decl.c (wrapup_globals_for_namespace): Remove special
5290 handling of global namespace.
5291
5292 2003-02-18 Geoffrey Keating <geoffk@apple.com>
5293
5294 * cp-tree.h (rid_to_yy): Delete.
5295 (C_RID_YYCODE): Delete.
5296 (finish_file): Delete redundant declaration.
5297
5298 2003-02-18 Jason Merrill <jason@redhat.com>
5299
5300 PR c++/9623
5301 * decl.c (reshape_init): Don't mess with initializer labels.
5302
5303 PR c++/9485
5304 * parser.c (cp_parser_postfix_expression): Set idk properly for
5305 object->scope::member.
5306
5307 2003-02-18 Ben Elliston <bje@redhat.com>
5308
5309 PR other/7350
5310 * decl.c (duplicate_decls): Fix typo in comment.
5311
5312 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
5313
5314 PR debug/9717
5315 * class.c (build_base_field): Mark fields for base classes with
5316 DECL_IGNORED_P.
5317
5318 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5319
5320 PR c++/9457
5321 * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5322 CONSTRUCTOR_ELTS only once.
5323
5324 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5325
5326 PR c++/9459
5327 * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5328 (dump_type_suffix): Likewise.
5329
5330 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
5331
5332 * search.c: ANSIfy function declarations and definitions.
5333 * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5334 * call.c (build_method_call, resolve_scoped_fn_name,
5335 build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5336 calls.
5337 * class.c (handle_using_decl): Likewise.
5338 * decl.c (make_typename_type, make_unmound_class_template,
5339 start_decl, compute_array_index_type): Likewise.
5340 * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5341 * init.c (expand_member_init, build_member_call): Likewise.
5342 * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5343 resolve_typename_type): Likewise.
5344 * typeck.c (lookup_destructor, finish_class_member_access_exprm
5345 build_prememfunc_access_expr): Likewise.
5346
5347 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5348
5349 * decl2.c: Include "timevar.h".
5350 (namespace_ancestor): Time name lookup.
5351 (add_using_namespace): Likewise.
5352 (lookup_using_namespace): Likewise.
5353 (qualified_lookup_using_namespace): Likewise.
5354 (decl_namespace): Likewise.
5355 (lookup_arg_dependent): Likewise.
5356 * lex.c (do_identifier): Likewise.
5357 (do_scoped_id): Likewise.
5358 * pt.c (lookup_template_class): Likewise.
5359
5360 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
5361
5362 * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5363
5364 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
5365
5366 * decl.c: Include "timevar.h".
5367 (poplevel): Time name lookup.
5368 (find_binding): Likewise.
5369 (push_namespace): Likewise.
5370 (pop_nested_namespace): Likewise.
5371 (store_bindings): Likewise.
5372 (maybe_push_to_top_level): Likewise.
5373 (pop_from_top_level): Likewise.
5374 (push_local_name): Likewise.
5375 (pushtag): Likewise.
5376 (pushdecl): Likewise.
5377 (pushdecl_with_scope): Likewise.
5378 (pushdecl_namespace_level): Likewise.
5379 (pushdecl_top_level): Likewise.
5380 (pushdecl_class_level): Likewise.
5381 (push_class_level_binding): Likewise.
5382 (push_using_decl): Likewise.
5383 (push_using_directive): Likewise.
5384 (push_overloaded_decl): Likewise.
5385 (lookup_label): Likewise.
5386 (define_label): Likewise.
5387 (lookup_tag): Likewise.
5388 (lookup_tag_reverse): Likewise.
5389 (lookup_namespace_name): Likewise.
5390 (select_decl): Likewise.
5391 (unqualified_namespace_lookup): Likewise.
5392 (lookup_name_real): Likewise.
5393 (lookup_name_current_level): Likewise.
5394 (lookup_type_current_level): Likewise.
5395 (maybe_inject_for_scope_var): Likewise.
5396 (xref_tag): Likewise.
5397
5398 * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5399
5400 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
5401
5402 * decl.c (build_enumerator): Remove unneeded test.
5403
5404 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
5405
5406 * cp-tree.h (struct lang_type_header): Make all fields unsigned
5407 char.
5408
5409 2003-02-03 Mark Mitchell <mark@codesourcery.com>
5410
5411 PR c++/7129
5412 * call.c (z_candidate): Add args.
5413 (convert_class_to_reference): Set it.
5414 (implicit_conversion): Tidy.
5415 (add_candidate): Add args parameter.
5416 (add_function_candidate): Adjust call to add_candidate.
5417 (add_conv_candidate): Likewise.
5418 (build_builtin_candidate): Likewise.
5419 (build_user_type_conversion_1): Eliminate wasteful tree_cons
5420 usage.
5421 (build_new_function_call): Likewise.
5422 (build_object_call): Likewise.
5423 (add_candidates): New function.
5424 (build_new_op): Use it.
5425 (covert_like_real): Adjust call to build_over_call.
5426 (build_over_call): Remove args parameter.
5427 * operators.def: Add <?= and >?=.
5428
5429 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
5430
5431 * typeck.c (build_indirect_ref): Don't check flag_volatile.
5432
5433 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5434
5435 PR c++/8849
5436 * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5437
5438 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
5439
5440 * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5441 BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5442 (BINFO_LANG_ELTS): New #define.
5443 * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5444
5445 2003-01-30 Geoffrey Keating <geoffk@apple.com>
5446
5447 * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5448
5449 2003-01-30 Mark Mitchell <mark@codesourcery.com>
5450
5451 * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5452 for class types.
5453 * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5454 rather than TYPE_LANG_FLAG_0.
5455 (TYPE_BUILT_IN): Remove.
5456 (TYPE_DEPENDENT_P): New macro.
5457 (TYPE_DEPENDENT_P_VALID): Likewise.
5458 (lang_type_class): Add fields_readonly.
5459 * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5460 * pt.c (dependent_type_p_r): New function, split out from ...
5461 (dependent_type_p): ... here. Memoize results.
5462 * search.c (dependent_base_p): Use dependent_type_p, not
5463 uses_template_parms.
5464 * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5465 for class types.
5466
5467 2003-01-29 Mark Mitchell <mark@codesourcery.com>
5468
5469 * call.c (build_field_call): Use build_new_op, not build_opfncall.
5470 (prep_operand): New function.
5471 (build_new_op): Use it. Remove dead code.
5472 * class.c (pushclass): Change "modify" parameter type from int to
5473 bool.
5474 (currently_open_class): Use same_type_p, not pointer equality.
5475 (push_nested_class): Adjust calls to pushclass, remove modify
5476 parameter.
5477 * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5478 (pushclass): Change prototype.
5479 (push_nested_class): Likewise.
5480 (grokoptypename): Remove.
5481 (build_opfncall): Remove.
5482 (value_dependent_expression_p): Declare.
5483 (resolve_typename_type): Likewise.
5484 (resolve_typename_type_in_current_instantiation): Likewise.
5485 (enter_scope_of): Remove.
5486 (tsubst): Remove.
5487 (tsubst_expr): Likewise.
5488 (tsubst_copy): Likewise.
5489 (tsubst_copy_and_build): Likewise.
5490 * decl.c (warn_about_implicit_typename_lookup): Remove.
5491 (finish_case_label): Return error_mark_node for erroneous labels.
5492 (start_decl): Adjust calls to push_nested_class.
5493 (grokfndecl): Call push_scope/pop_scope around call to
5494 duplicate_decls.
5495 (grokdeclarator): Do not call tsubst.
5496 (start_function): Adjust calls to push_nested_class.
5497 * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5498 (check_classfn): Use push_scope/pop_scope around type comparisions.
5499 (grokoptypename): Remove.
5500 (push_sscope): Adjust call to push_nested_class.
5501 * error.c (dump_type): Show cv-qualification of typename types.
5502 * init.c (build_member_call): Use build_new_op, not
5503 build_opfncall.
5504 * method.c (build_opfncall): Remove.
5505 * parser.c (cp_parser): Add allow_non_constant_expression_p and
5506 non_constant_expression_p.
5507 (cp_parser_constant_expression): Adjust prototype.
5508 (cp_parser_resolve_typename_type): Remove.
5509 (cp_parser_non_constant_expression): New function.
5510 (cp_parser_non_constant_id_expression): Likewise.
5511 (cp_parser_new): Set allow_non_constant_expression_p and
5512 non_constant_expression_p.
5513 (cp_parser_primary_expression): Reject `this' and `va_arg' in
5514 constant-expressions. Note that dependent names aren't really
5515 constant.
5516 (cp_parser_postfix_expression): Reject conversions to non-integral
5517 types in constant-expressions. Neither are increments or
5518 decrements.
5519 (cp_parser_unary_expression): Reject increments and decrements in
5520 constant-expressions.
5521 (cp_parser_direct_new_declarator): Adjust call to
5522 cp_parser_constant_expression.
5523 (cp_parser_cast_expression): Reject conversions to non-integral
5524 types in constant-expressions.
5525 (cp_parser_assignment_expression): Rejects assignments in
5526 constant-expressions.
5527 (cp_parser_expression): Reject commas in constant-expressions.
5528 (cp_parser_labeled_statement): Adjust call to
5529 cp_parser_constant_expression.
5530 (cp_parser_direct_declarator): Simplify array bounds, even in
5531 templates, when they are non-dependent. Use
5532 resolve_typename_type, not cp_parser_resolve_typename_type.
5533 (cp_parser_class_head): Use resolve_typename_type, not
5534 cp_parser_resolve_typename_type.
5535 (cp_parser_member_declaration): Adjust call to
5536 cp_parser_constant_expression.
5537 (cp_parser_constant_initializer): Likewise.
5538 (cp_parser_constructor_declarator): Use resolve_typename_type, not
5539 cp_parser_resolve_typename_type.
5540 (cp_parser_late_parsing_default_args): Adjust call to
5541 push_nested_class.
5542 * pt.c (tsubst): Give it internal linkage.
5543 (tsubst_expr): Likewise.
5544 (tsubst_copy): Likewise.
5545 (tsubst_copy_and_build): Likewise.
5546 (push_access_scope_real): Likewise.
5547 (tsubst_friend_class): Likewise.
5548 (instantiate_class_template): Adjust call to pushclass.
5549 (value_dependent_expression_p): Give it external linkage.
5550 Robustify.
5551 (resolve_typename_type): New function.
5552 * semantics.c (finish_call_expr): Use build_new_op, not
5553 build_opfncall.
5554 (begin_constructor_declarator): Remove.
5555 (begin_class_definition): Adjust call to pushclass.
5556 (enter_scope_of): Remove.
5557 * typeck.c (comptypes): Resolve typename types as appropriate.
5558 (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5559 (build_x_compound_expr): Likewise.
5560 (build_modify_expr): Likewise.
5561 (build_x_modify_expr): Likewise.
5562 * typeck2.c (build_x_arrow): Likewise.
5563
5564 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
5565
5566 * pt.c (last_pending_template) Declare GTY().
5567
5568 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5569
5570 PR c++/8591
5571 * parser.c (cp_parser_elaborated_type_specifier): Convert
5572 TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5573 (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5574
5575 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
5576
5577 PR c++/9437
5578 * pt.c (unify): Don't unify '*T' with 'U C::*'.
5579
5580 PR c++/3902
5581 * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5582 inside a declarator.
5583
5584 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
5585
5586 * class.c (update_vtable_entry_for_fn): Add index parameter.
5587 Generate vcall thunk for covariant overriding from a virtual
5588 primary base.
5589 (dfs_modify_vtables): Adjust.
5590
5591 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
5592
5593 PR c++/9403
5594 * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5595 template keyword.
5596 (cp_parser_base_specifier): Look for and consume a
5597 TEMPLATE keyword. Replace switch with array index.
5598
5599 PR c++/795
5600 * semantics.c (finish_non_static_data_member): Remember the
5601 field's type even in a template.
5602
5603 PR c++/9415
5604 * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5605 already scoped.
5606
5607 PR c++/8545
5608 * parser.c (cp_parser_cast_expression): Be more tentative.
5609
5610 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5611
5612 * cp-tree.h (flagged_type_tree_s): Remove.
5613 (check_for_new_type): Likewise.
5614 * typeck2.c (check_for_new_type): Likewise.
5615
5616 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
5617
5618 * dump.c: ANSIfy function declarations and definitions.
5619
5620 * cp-tree.h, decl.h: Get rid of PARAMS. Again.
5621
5622 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5623
5624 PR c++/9354
5625 * init.c (build_new): Set the type of the new-expression, even
5626 when processing_templte_decl.
5627
5628 PR c++/9216
5629 * parser.c (cp_parser_primary_expression): Improve error message
5630 for templates used in an expression context.
5631
5632 PR c++/8696
5633 * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5634 parse when encountering "typedef".
5635
5636 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
5637
5638 * class.c, parser.c: ANSIfy function definitions and declarations.
5639
5640 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5641
5642 PR c++/9328
5643 * error.c (dump_decl): For an OVERLOAD, just print the name of the
5644 function; it doesn't make sense to try to print its type.
5645 * semantics.c (finish_typeof): Issue errors about invalid uses.
5646
5647 PR c++/9298
5648 * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5649 function.
5650 (cp_parser_expression_statement): Use it.
5651 (cp_parser_explicit_instantiation): Likewise.
5652 * pt.c (do_decl_instantiation): Improve error handling logic.
5653
5654 2003-01-22 Mark Mitchell <mark@codesourcery.com>
5655
5656 PR c++/9384
5657 * parser.c (cp_parser_using_declaration): Issue error messages
5658 about name resolution failures here.
5659
5660 PR c++/9388
5661 * class.c (currently_open_derived_class): Use dependent_type_p.
5662 * cp-tree.h (dependent_type_p): New function.
5663 (dependent_template_arg_p): Likewise.
5664 (dependent_template_p): Likewise.
5665 (type_dependent_expression_p): Likewise.
5666 * parser.c (cp_parser_dependent_type_p): Remove.
5667 (cp_parser_value_dependent_type_p): Likewise.
5668 (cp_parser_type_dependent_expression_p): Likewise.
5669 (cp_parser_dependent_template_arg_p): Likewise.
5670 (cp_parser_dependent_template_id_p): Likewise.
5671 (cp_parser_dependent_template_p): Likewise.
5672 (cp_parser_diagnose_invalid_type_name): Replace
5673 cp_parser_dependent_type_p with dependent_type_p, etc.
5674 (cp_parser_primary_expresion): Likewise.
5675 (cp_parser_nested_name_specifier_opt): Likewise.
5676 (cp_parser_postfix_expression): Likewise.
5677 (cp_parser_unary_expression): Likewise.
5678 (cp_parser_template_name): Likewise.
5679 (cp_parser_class_name): Likewise.
5680 (cp_parser_lookup_name): Likewise.
5681 * pt.c (dependent_type_p): New function.
5682 (value_dependent_expression_p): Likewise.
5683 (type_dependent_expression_p): Likewise.
5684 (dependent_template_arg_p): Likewise.
5685 (dependent_template_id_p): Likewise.
5686 (dependent_template_p): Likewise.
5687
5688 PR c++/9285
5689 PR c++/9294
5690 * parser.c (cp_parser_simple_declaration): Return quickly when
5691 encountering errors.
5692
5693 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5694
5695 Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5696
5697 2003-01-17 Jason Merrill <jason@redhat.com>
5698
5699 PR c++/9167, c++/9358
5700 * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5701
5702 2003-01-17 Jason Merrill <jason@redhat.com>
5703
5704 PR c++/9342
5705 * call.c (build_conditional_expr): Always do lvalue-rvalue
5706 conversion.
5707
5708 2003-01-17 Mark Mitchell <mark@codesourcery.com>
5709
5710 PR c++/9294
5711 * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5712 * cp-tree.h (BASELINK_BINFO): Adjust.
5713 (BASELINK_FUNCTIONS): Likewise.
5714 (BASELINK_ACCESS_BINFO): Likewise.
5715 (tree_baselink): New structure.
5716 (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5717 (lang_tree_node): Add baselink.
5718 * decl.c (cp_tree_node_structure): Add BASELINK case.
5719 * search.c (build_baselink): Adjust.
5720 * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
5721 test from TREE_LIST case.
5722
5723 PR c++/9272
5724 * parser.c (cp_parser_constructor_declarator_p): Do not assume
5725 that a constructor cannot be declared outside of its own class.
5726
5727 * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5728 be resolved, neither can the qualified name.
5729
5730 * rtti.c (get_pseudo_ti_desc): Fix thinko.
5731
5732 2003-01-16 Jason Merrill <jason@redhat.com>
5733
5734 PR c++/8564
5735 * init.c (build_vec_init): Re-add maxindex parm.
5736 (perform_member_init, build_aggr_init): Pass it.
5737 (build_new_1): Pass it. Use an incomplete array type for full_type.
5738 * typeck.c (build_modify_expr): Pass it.
5739 * cp-tree.h: Adjust.
5740
5741 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
5742
5743 * cp-tree.h (tsubst_copy_and_build): New declaration.
5744 * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5745 (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
5746 (tsubst_copy_and_build): New function.
5747
5748 2003-01-16 Mark Mitchell <mark@codesourcery.com>
5749
5750 * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5751 (PARTIAL_INSTANTIATION_P): Remove.
5752 (IMPLICIT_TYPENAME_P): Likewise.
5753 (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5754 (build_typename_type): Remove declaration.
5755 (parmlist_is_exprlist): Likewise.
5756 * decl.c (build_typename_type): Make it static, remove third
5757 parameter.
5758 (push_class_binding): Don't do implicit typename stuff.
5759 (make_typename_type): Likewise.
5760 (lookup_name_real): Likewise.
5761 (grokdeclarator): Don't try to convert declarations into
5762 initializations. Don't do implicit typename stuff.
5763 (parmlist_is_exprlist): Remove.
5764 (xref_basetypes): Simplify.
5765 * decl2.c (grokfield): Don't try to convert declarations into
5766 initializations.
5767 (build_anon_union_vars): Do this while processing templates, too.
5768 (finish_anon_union): Likewise.
5769 * error.c (dump_type): Remove implicit typename handling.
5770 * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5771 (cp_parser_primary_expression): Correct handling of names not
5772 found by unqualified name lookup in templates.
5773 (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5774 of types when possible.
5775 (cp_parser_simple_declaration): Complain intelligently about some
5776 invalid declarations.
5777 (cp_parser_member_declaration): Likewise.
5778 (cp_parser_constructor_declarator_p): Don't check when we're in a
5779 function scope.
5780 * pt.c (instantiate_class_template): Remove
5781 PARTIAL_INSTANTIATION_P gunk.
5782 * search.c (lookup_field_r): Don't build implicit typenames.
5783 (marked_pushdecls_p): Don't enter dependent base types.
5784 (unmarked_pushdecls_p): Likewise.
5785 * semantics.c (begin_class_definition): Remove implicit typename
5786 stuff.
5787
5788 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
5789
5790 PR c++/9212
5791 * parser.c (cp_parser_direct_declarator): If accepting either
5792 abstract or named, the name must be an unqualified-id.
5793
5794 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5795
5796 * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5797
5798 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5799
5800 * decl2.c (check_classfn): Fix uninitialized warning.
5801 (build_anon_union_vars): Likewise.
5802 * pt.c (tsubst_copy): Likewise.
5803
5804 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
5805
5806 Further conform g++'s __vmi_class_type_info to the C++ ABI
5807 specification.
5808 * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5809 the specification.
5810 (class_hint_flags): Likewise.
5811
5812 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5813
5814 * config-lang.in: Add semantics.c to gtfiles.
5815 * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5816 (saved_scope): Likewise.
5817 (type_lookups): Remove.
5818 (deferred_access): New structure.
5819 (type_access_control): Remove.
5820 (save_type_access_control): Likewise.
5821 (reset_type_access_control): Likewise.
5822 (decl_type_access_control): Likewise.
5823 (push_deferring_access_checks): Declare.
5824 (resume_deferring_access_checks): Likewise.
5825 (stop_deferring_access_checks): Likewise.
5826 (pop_deferring_access_checks): Likewise.
5827 (get_deferred_access_checks): Likewise.
5828 (pop_to_parent_deferring_access_checks): Likewise.
5829 (perform_deferred_access_checks): Likewise.
5830 (perform_or_defer_access_check): Likewise.
5831 * decl.c (make_typename_type): Use perform_or_defer_access_check.
5832 (make_unbound_class_template): Likewise.
5833 (grokdeclarator): Don't call decl_type_access_control.
5834 * parser.c (cp_parser_context): Remove deferred_access_checks
5835 and deferring_access_checks_p fields.
5836 (cp_parser_context_new): Adjust.
5837 (cp_parser): Remove access_checks_lists.
5838 (cp_parser_defer_access_check): Remove.
5839 (cp_parser_start_deferring_access_checks): Remove.
5840 (cp_parser_stop_deferring_access_checks): Remove.
5841 (cp_parser_perform_deferred_access_checks): Remove.
5842 (cp_parser_nested_name_specifier_opt): Use new deferred access
5843 functions.
5844 (cp_parser_simple_declaration): Likewise.
5845 (cp_parser_template_id): Likewise.
5846 (cp_parser_function_definition): Likewise.
5847 (cp_parser_class_specifier): Likewise.
5848 (cp_parser_lookup_name): Likewise.
5849 (cp_parser_single_declaration): Likewise.
5850 (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5851 (cp_parser_parse_tentatively): Likewise.
5852 (cp_parser_parse_definitely): Likewise.
5853 (yyparse): Likewise.
5854 (cp_parser_init_declarator): Remove access_checks parameter.
5855 Use new deferred access functions.
5856 (cp_parser_function_definition_from_specifiers_and_declarator):
5857 Likewise.
5858 (cp_parser_class_head): Remove deferring_access_checks_p and
5859 saved_access_checks parameters. Use new deferred access functions.
5860 (cp_parser_member_specification_opt): Don't call
5861 reset_type_access_control.
5862 * search.c (type_access_control): Remove.
5863 * semantics.c: Include "gt-cp-semantics.h".
5864 (deferred_type_access_control): Remove.
5865 (deferred_access_stack): New variable.
5866 (deferred_access_free_list): Likewise.
5867 (push_deferring_access_checks): New function.
5868 (resume_deferring_access_checks): Likewise.
5869 (stop_deferring_access_checks): Likewise.
5870 (pop_deferring_access_checks): Likewise.
5871 (get_deferred_access_checks): Likewise.
5872 (pop_to_parent_deferring_access_checks): Likewise.
5873 (perform_deferred_access_checks): New function, adapted from
5874 cp_parser_perform_deferred_access_checks.
5875 (perform_or_defer_access_check): New function, adapted from
5876 cp_parser_defer_access_check.
5877 (current_type_lookups): Remove.
5878 (deferred_type_access_control): Likewise.
5879 (decl_type_access_control): Likewise.
5880 (save_type_access_control): Likewise.
5881 (reset_type_access_control): Likewise.
5882 (begin_function_definition): Adjust.
5883 (begin_class_definiton): Likewise.
5884
5885 2003-01-13 Jason Merrill <jason@redhat.com>
5886
5887 PR c++/8748
5888 * class.c (build_base_path): Take the address before calling save_expr.
5889
5890 * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
5891 all the ambiguous conversions are bad.
5892
5893 * class.c (maybe_warn_about_overly_private_class): Don't stop
5894 searching when we find a nonprivate method.
5895
5896 * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
5897
5898 2003-01-12 Mark Mitchell <mark@codesourcery.com>
5899
5900 * cp-tree.h (get_arglist_len_in_bytes): Remove.
5901
5902 PR c++/9264
5903 * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
5904 typeame types more robustly.
5905
5906 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
5907
5908 * parser.c: Fix comment typos.
5909
5910 2003-01-10 Mark Mitchell <mark@codesourcery.com>
5911
5912 PR c++/9099
5913 * parser.c (cp_parser_scope_through_which_access_occurs): Handle
5914 an object_type which is not a class type.
5915
5916 2003-01-10 Geoffrey Keating <geoffk@apple.com>
5917
5918 * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
5919 (cp_parser_late_parsing_default_args): Likewise.
5920
5921 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
5922
5923 * cfns.gperf: ANSIfy function declarations.
5924 * cfns.h: Regenerate.
5925 * cp-tree.h: ANSIfy function declarations.
5926
5927 2003-01-10 Mark Mitchell <mark@codesourcery.com>
5928
5929 * cp-tree.h (reparse_absdcl_as_expr): Remove.
5930 (reparse_absdcl_as_casts): Likewise.
5931 (reparse_decl_as_expr): Likewise.
5932 (finish_decl_parsing): Likewise.
5933 * decl2.c (reparse_absdcl_as_expr): Remove.
5934 (reparse_absdcl_as_casts): Likewise.
5935 (repase_decl_as_expr): Likewise.
5936 (finish_decl_parsing): Likewise.
5937
5938 PR c++/9128
5939 PR c++/9153
5940 PR c++/9171
5941 * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
5942 function.
5943 (cp_parser_nested_name_specifier_opt): Correct the
5944 check_dependency_p false.
5945 (cp_parser_postfix_expression): Fix formatting.
5946 (cp_parser_decl_specifier_seq): Avoid looking for constructor
5947 declarators when possible.
5948 (cp_parser_template_id): Avoid performing name-lookup when
5949 possible.
5950 (cp_parser_class_head): Do not count specializations when counting
5951 levels of templates.
5952 (cp_parser_constructor_declarator_p): Return immediately if
5953 there's no chance that the tokens form a constructor declarator.
5954 * rtti.c (throw_bad_typeid): Add comment. Do not return an
5955 expression with reference type.
5956 (get_tinfo_decl_dynamic): Do not return an expression with
5957 reference type.
5958 (build_typeid): Add comment. Do not return an expression with
5959 reference type.
5960 * typeck.c (build_class_member_access_expr): Improve handling of
5961 conditionals and comma-expressions as objects.
5962
5963 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
5964
5965 * cfns.gperf: ANSIfy function declarations.
5966 * cfns.h: Regenerate.
5967 * cp-tree.h: ANSIfy function declarations.
5968 * parser.c: ANSIfy function declarations & definitions.
5969
5970 * decl.c (bad_specifiers): Fix parameter order error I introduced.
5971
5972 2003-01-09 Geoffrey Keating <geoffk@apple.com>
5973
5974 Merge from pch-branch:
5975
5976 2003-01-09 Geoffrey Keating <geoffk@apple.com>
5977
5978 Merge to tag pch-merge-20030102:
5979
5980 * semantics.c (finish_translation_unit): Don't call finish_file.
5981 * parser.c: Don't include ggc.h.
5982 (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
5983 read first token here. Don't allow PCH files after the first
5984 token is read.
5985 (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
5986 (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
5987 (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
5988 (cp_parser_late_parsing_for_member): Don't duplicate call to
5989 cp_lexer_set_source_position_from_token.
5990 (cp_parser_late_parsing_default_args): Likewise.
5991 (yyparse): Call finish_file after clearing the_parser.
5992
5993 2002-12-11 Geoffrey Keating <geoffk@apple.com>
5994
5995 * Make-lang.in: Remove $(GGC_H) from all dependencies.
5996 (CXX_TREE_H): Add $(GGC_H).
5997 * class.c: Don't include ggc.h.
5998 (field_decl_cmp): Make parameters be 'const void *' to match qsort.
5999 (method_name_cmp): Likewise.
6000 (resort_data): New variable.
6001 (resort_field_decl_cmp): New.
6002 (resort_method_name_cmp): New.
6003 (resort_sorted_fields): New.
6004 (resort_type_method_vec): New.
6005 (finish_struct_methods): Delete cast.
6006 (finish_struct_1): Delete cast.
6007 * cp-tree.h: Include ggc.h.
6008 (struct lang_type_class): Add reorder attribute to field `methods'.
6009 (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6010 (resort_sorted_fields): New prototype.
6011 (resort_type_method_vec): New prototype.
6012 * call.c: Don't include ggc.h.
6013 * decl.c: Likewise.
6014 * decl2.c: Likewise.
6015 * init.c: Likewise.
6016 * lex.c: Likewise.
6017 * method.c: Likewise.
6018 * optimize.c: Likewise.
6019 * parse.y: Likewise.
6020 * pt.c: Likewise.
6021 * repo.c: Likewise.
6022 * search.c: Likewise.
6023 * semantics.c: Likewise.
6024 * spew.c: Likewise.
6025 * tree.c: Likewise.
6026
6027 * lang-specs.h: Remove comment.
6028
6029 2002-12-03 Geoffrey Keating <geoffk@apple.com>
6030
6031 * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6032 (operator_name_info): Mark to be saved for PCH, specify size.
6033 (assignment_operator_name_info): Likewise.
6034
6035 2002-11-19 Geoffrey Keating <geoffk@apple.com>
6036
6037 * decl.c (anon_cnt): Mark to be saved for PCH.
6038
6039 2002-10-25 Geoffrey Keating <geoffk@apple.com>
6040
6041 * lex.c (init_reswords): Delete now-untrue comment.
6042 Allocate ridpointers using GGC.
6043
6044 2002-10-04 Geoffrey Keating <geoffk@apple.com>
6045
6046 * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6047
6048 * g++spec.c (lang_specific_driver): Don't include standard
6049 libraries in `added'.
6050
6051 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
6052
6053 * decl2.c (finish_file): Call c_common_write_pch.
6054 * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6055
6056 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
6057
6058 * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6059 files when using g++.
6060 * lang-specs.h: Handle compiling C++ header files.
6061
6062 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6063
6064 * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6065
6066 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6067
6068 * pt.c (push_access_scope_real): Call push_to_top_level for
6069 function in namespace scope.
6070 (pop_access_scope): Call pop_from_top_level for function in
6071 namespace scope.
6072
6073 2003-01-09 Jakub Jelinek <jakub@redhat.com>
6074
6075 * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6076
6077 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6078
6079 * Make-lang.in (c++.install-common, c++.install-man,
6080 c++.uninstall): Prepend $(DESTDIR) to destination paths in
6081 all (un)installation commands.
6082 (c++.install-common): Rewrite $(LN) commands to support
6083 DESTDIR with "ln" as well as with "ln -s".
6084
6085 2003-01-08 Jason Merrill <jason@redhat.com>
6086
6087 * parser.c (cp_parser_primary_expression): See through explicitly
6088 scoped ALIAS_DECLs, too.
6089
6090 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6091
6092 * decl.c: Remove some #if 0 code.
6093
6094 * decl.c: ANSIfy function declarations.
6095
6096 2003-01-07 Mark Mitchell <mark@codesourcery.com>
6097
6098 * parser.c (cp_parser_asm_definition): Correct handling of omitted
6099 operands.
6100
6101 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6102
6103 PR c++/9030
6104 * decl.c (make_typename_type): Check access only when tf_error.
6105 (make_unbound_class_template): Likewise.
6106 * pt.c (saved_access_scope): New variable.
6107 (push_access_scope_real): New function.
6108 (push_access_scope): Likewise.
6109 (pop_access_scope): Likewise.
6110 (tsubst_default_argument): Use them.
6111 (instantiate_template): Likewise.
6112 (regenerate_decl_from_template): Likewise.
6113 (instantiate_decl): Likewise.
6114 (get_mostly_instantiated_function_type): Likewise.
6115
6116 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
6117
6118 * tree.c: Delete bogus #if 0 code.
6119
6120 2003-01-07 Andreas Schwab <schwab@suse.de>
6121
6122 * class.c (layout_class_type): Don't use
6123 PCC_BITFIELD_TYPE_MATTERS if not defined.
6124
6125 2003-01-06 Mark Mitchell <mark@codesourcery.com>
6126
6127 PR c++/9165
6128 * decl2.c (build_cleanup): Mark the object as used.
6129
6130 * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6131 (hash_local_specialization): New function.
6132 (register_local_specialization): Revert 2003-01-05 change.
6133 (instantiate_decl): Use hash_local_specialization when creating
6134 the local_specializations table.
6135
6136 * decl2.c (mark_used): Do not synthesize thunks.
6137
6138 * class.c (layout_class_type): Correct handling of unnamed
6139 bitfields wider than their types.
6140
6141 PR c++/9189
6142 * parser.c (cp_parser): Remove default_arg_types. Update
6143 documentation for unparsed_functions_queues.
6144 (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6145 parameter.
6146 (cp_parser_new): Don't set parser->default_arg_types.
6147 (cp_parser_function_definition): Adjust usage of
6148 unparsed_funtions_queues.
6149 (cp_parser_class_specifier): Don't mess with
6150 parser->default_arg_types. Handle default argument processing in
6151 a separate phase from function body processing.
6152 (cp_parser_template_declaration_after_export): Adjust usage of
6153 unparsed_functions_queues.
6154 (cp_parser_late_parsing_for_member): Do not handle default
6155 arguments.
6156
6157 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
6158
6159 PR c++/9109
6160 * parser.c (cp_parser_declarator_kind): New enum.
6161 (cp_parser_declarator): Adjust.
6162 (cp_parser_direct_declarator): Adjust. Allow for either named or
6163 abstract declarator. Prefer abstract, if possible. Allow
6164 parenthesized function name.
6165 (cp_parser_condition): Adjust cp_parser_declarator call.
6166 (cp_parser_explicit_instantiation): Likewise.
6167 (cp_parser_init_declarator): Likewise.
6168 (cp_parser_type_id): Likewise.
6169 (cp_parser_function_definition): Likewise.
6170 (cp_parser_member_declaration): Likewise.
6171 (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6172 the tentative parsing.
6173 (cp_parser_exception_declaration): Likewise.
6174
6175 2003-01-05 Mark Mitchell <mark@codesourcery.com>
6176
6177 * parser.c (cp_parser_template_parameter): Adjust call to
6178 cp_parser_parameter_declaration.
6179 (cp_parser_parameter_declaration_list): Likewise.
6180 (cp_parser_parameter_declaration): Replace
6181 greater_than_is_operator_p with template_parm_p parameter. Do not
6182 cache tokens for template default arguments.
6183
6184 * pt.c (retrieve_local_specialization): Use htab_find, not
6185 htab_find_with_hash.
6186 (register_local_specialization): Use htab_find_slot, not
6187 htab_find_slot_with_hash.
6188 (instantiate_decl): Pass a hash function to htab_create.
6189
6190 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6191
6192 * parser.c (cp_parser_binary_expression,
6193 cp_parser_multiplicative_expression,
6194 cp_parser_additive_expression, cp_parser_shift_expression,
6195 cp_parser_relational_expression, cp_parser_equality_expression,
6196 cp_parser_and_expression, cp_parser_exclusive_or_expression,
6197 cp_parser_inclusive_or_expression,
6198 cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6199 cp_parser_binary_expression): Const-ify.
6200
6201 2003-01-04 Mark Mitchell <mark@codesourcery.com>
6202
6203 * method.c (use_thunk): Disable access control while building the
6204 body of the thunk.
6205
6206 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
6207
6208 * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6209 front end.
6210
6211 2003-01-03 Matt Austern <austern@apple.com>
6212
6213 * cp-tree.h (struct lang_type_class): add field for key method
6214 (cp_global_trees): rename dynamic_classes to keyed_classes
6215 (key_method): add definition
6216 * class.c (finish_struct_1): compute class's key method, and add
6217 the class to keyed_classes list if there is no key method.
6218 * decl.c (finish_function): add class to keyed_classes list if we
6219 see a definition of the class's key method.
6220 * pt.c (instantiate_class_template): add template specialization
6221 of a dynamic class to keyed_classes list.
6222 * decl2.c (key_method): remove
6223 (finish_file): iterate only through keyed_classes list when
6224 deciding whether to emit vtables, remove class from its list after
6225 we do the emission.
6226
6227 2003-01-02 Jason Merrill <jason@redhat.com>
6228
6229 * call.c (build_conditional_expr): Stabilize lvalues properly.
6230 * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6231 * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6232 Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6233
6234 * call.c (convert_like_real): Call decl_constant_value for an
6235 IDENTITY_CONV even if there are no more conversions.
6236
6237 * cvt.c (build_up_reference): Don't push unnamed temps.
6238
6239 * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6240
6241 * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6242 for a backend struct.
6243
6244 * except.c (wrap_cleanups_r, build_throw): Make
6245 MUST_NOT_THROW_EXPRs void.
6246 * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6247
6248 * init.c (build_vec_delete_1): Pre-evaluate the base address.
6249
6250 * init.c (get_temp_regvar): Simplify logic.
6251
6252 * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6253 our replacement is a decl.
6254
6255 * decl.c (cp_make_fname_decl): Push the decls inside the
6256 outermost scope.
6257
6258 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
6259
6260 PR c++/45, c++/3784
6261 * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6262 the same too.
6263
6264 2003-01-03 Graham Stott <graham.stott@btinternet.com>
6265
6266 * parser.c (struct cp_parser): Add access_checks_lists field
6267 (cp_parser_simple_declaration): Use.
6268 (cp_parser_init_declarator): Likewise.
6269
6270 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6271
6272 * parser.c (cp_parser_declaration): Accept the __extension__
6273 keyword before the declaration.
6274
6275 PR c++/2843
6276 * parser.c (cp_parser_parameter_declaration): Allow attributes to
6277 appear after the declarator.
6278
6279 * call.c (build_new_method_call): Fix typo in message format
6280 string.
6281
6282 2003-01-02 Mark Mitchell <mark@codesourcery.com>
6283
6284 * parser.c (cp_lexer_next_token_is): Declare it inline.
6285 (cp_lexer_set_source_position_from_token): Likewise.
6286 (cp_lexer_debugging_p): Likewise.
6287 (cp_parser_parsing_tentatively): Likewise.
6288 (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6289 to the cp_lexer_peek_token.
6290
6291 * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6292 expression.
6293
6294 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6295
6296 * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6297 cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6298 cp/repo.c: Fix copyright years.
6299
6300 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
6301
6302 * lex.c: Remove superfluous include of cpplib.h.
6303 (CONSTRAINT): Define without conditions.
6304 (init_cp_pragma): Use c_register_pragma.
6305
6306 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6307
6308 * .cvsignore: Remove.
6309
6310 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
6311
6312 * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6313 except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6314 lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6315 pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6316 typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6317 copyright header.
6318 * lex.h: parse.y is dead, so don't mention it. Also replace the
6319 copyright header with the default GNU copyright header.
6320
6321 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6322
6323 * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6324 (lookup_name_namespace_only): Likewise.
6325 (begin_only_namespace_names): Likewise.
6326 (end_only_namespace_names): Likewise.
6327 * decl.c (only_namespace_names): Remove.
6328 (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6329 (lookup_name_real): Do not check only_namespace_names.
6330 (lookup_name_namespace_only): Remove.
6331 (begin_only_namespace_names): Likewise.
6332 (end_only_namespace_names): Likewise.
6333 * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6334 nested-name-specifiers more gracefully.
6335 (cp_parser_class_or_namespace_name): Avoid looking up namespace
6336 names when they cannot possibly appear.
6337 (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6338 (cp_parser_elaborated_type_specifier): Likewise.
6339 (cp_parser_namespace_name): Only look for namespace names.
6340 (cp_parser_lookup_name): Add is_namespace parameter.
6341 (cp_parser_lookup_name_simple): Adjust call to
6342 cp_parser_lookup_name.
6343
6344 * parser.c (cp_parser_dependent_type_p): Fix thinko.
6345
6346 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
6347
6348 * .cvsignore: Update.
6349
6350 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
6351
6352 * class.c (modify_vtable_entry): Remove unused variable.
6353 (get_vcall_index): Always expect a non-thunk.
6354 (update_vtable_entry_for_fn): Combine covariant adjustments, when
6355 overriding a thunk. Pass get_vcall_index a non-thunk.
6356
6357 * decl2.c (finish_file): Mark undefined inlines as extern.
6358
6359 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6360
6361 * cp-tree.def (RETURN_INIT): Remove.
6362 * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6363 (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6364 (note_level_for_for): Remove.
6365 (note_level_for_try): Likewise.
6366 (note_level_for_catch): Likewise.
6367 (finish_named_return_value): Likewise.
6368 (do_pushlevel): Change prototype.
6369 (pending_lang_change): Remove.
6370 * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6371 sk_for.
6372 (note_level_for_for): Remove.
6373 (note_level_for_try): Likewise.
6374 (note_level_for_catch): Likewise.
6375 (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6376 * parser.c (cp_parser_context_free_list): Make it "deletable".
6377 (cp_parser_template_argument): Remove misleading comment.
6378 * pt.c (tsubst_expr): Remove RETURN_INIT code.
6379 * semantics.c (genrtl_named_return_value): Remove.
6380 (do_pushlevel): Take a scope kind as an argument.
6381 (begin_if_stmt): Adjust.
6382 (begin_while_stmt): Likewise.
6383 (begin_for_stmt): Likewise.
6384 (finish_for_init_stmt): Likewise.
6385 (begin_switch_stmt): Likewise.
6386 (begin_handler): Likewise.
6387 (begin_compound_stmt): Likewise.
6388 (finish_named_return_value): Remove.
6389 (cp_expand_stmt): Remove RETURN_INIT case.
6390 * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6391
6392 2002-12-31 Mark Mitchell <mark@codesourcery.com>
6393
6394 PR c++/9112
6395 * parser.c (cp_parser_direct_declarator): Handle erroneous
6396 parenthesized declarators correctly.
6397
6398 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6399
6400 * cp-tree.h (pending_lang_change): Declare.
6401
6402 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6403
6404 * parser.c (cp_parser_context_free_list): New variable.
6405 (cp_parser_context_new): Use it.
6406 (cp_parser_error): Check return code from
6407 cp_parser_simulate_error.
6408 (cp_parser_simulate_error): Return a value.
6409 (cp_parser_id_expression): Optimize common case.
6410 (cp_parser_class_name): Likewise.
6411 (cp_parser_class_specifier): Adjust call to
6412 cp_parser_late_parsing_default_args.
6413 (cp_parser_lookup_name): Optimize common case.
6414 (cp_parser_late_parsing_for_member): Adjust call to
6415 cp_parser_late_parsing_default_args.
6416 (cp_parser_late_parsing_default_args): Add scope parameter.
6417 (cp_parser_require): Avoid creating the error message unless it's
6418 needed.
6419 (cp_parser_parse_definitely): Place free'd contexts on the free
6420 list.
6421
6422 * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6423
6424 2002-12-30 David Edelsohn <edelsohn@gnu.org>
6425
6426 * parser.c (cp_parser_parameter_declaration_clause): Treat system
6427 header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6428
6429 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6430
6431 * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6432 GCC, not GNU CC.
6433
6434 2002-12-30 Mark Mitchell <mark@codesourcery.com>
6435
6436 * parse.y: Remove.
6437 * spew.c: Likewise.
6438 * Make-lang.in (gt-cp-spew.h): Remove.
6439 * cp-tree.h (do_pending_lang_change): Remove.
6440 (do_identifier): Change prototype.
6441 (finish_id_expr): Remove.
6442 * decl.c (lookup_name_real): Remove yylex variable.
6443 * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6444 * lex.c (init_cpp_parse): Remove.
6445 (reduce_cmp): Likewise.
6446 (token_cmp): Likewise.
6447 (yychar): Likewise.
6448 (lastiddecl): Likewise.
6449 (token_count): Likewise.
6450 (reduce_count): Likewise.
6451 (yyhook): Likewise.
6452 (print_parse_statistics): Likewise.
6453 (do_pending_lang_change): Likewise.
6454 (do_identifier): Remove parsing parameter.
6455 * lex.h (lastiddecl): Remove.
6456 (looking_for_typename): Remove.
6457 (looking_for_template): Likewise.
6458 (pending_lang_change): Likewise.
6459 (yylex): Likewise.
6460 * semantics.c (finish_id_expr): Remove.
6461
6462 * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6463 thread" correctly.
6464
6465 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
6466
6467 * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
6468 end, not the C front end.
6469
6470 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
6471
6472 * cp-tree.h (THUNK_TARGET): New macro.
6473 (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6474 (finish_thunk): Remove offset parms.
6475 * class.c (find_final_overrider): Look through thunks.
6476 (get_vcall_index): Use THUNK_TARGET.
6477 (update_vtable_entry_for_fn): Look through thunks. Set covariant
6478 fixed offset here. Adjust finish_thunk call.
6479 (build_vtbl_initializer): Adjust finish_thunk calls.
6480 * mangle.c (mangle_call_offset): Remove superfluous if.
6481 (mangle_thunk): Adjust.
6482 * method.c (make_thunk): Adjust.
6483 (finish_thunk): Adjust.
6484 (thunk_adjust): Remove assert.
6485 (use_thunk): Use THUNK_TARGET
6486 * dump1.c (cp_dump_tree): Adjust thunk dumping.
6487
6488 PR c++/9054
6489 * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6490 * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6491
6492 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6493
6494 Remove traditional C constructs 4/n.
6495 * decl2.c (grok_method_quals, warn_if_unknown_interface,
6496 grok_x_components, cp_build_parm_decl, build_artificial_parm,
6497 maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6498 delete_sanity, check_member_template, check_java_method,
6499 check_classfn, finish_static_data_member_decl, grokfield,
6500 grokbitfield, grokoptypename, grok_function_init,
6501 cplus_decl_attributes, constructor_name, defer_fn,
6502 build_anon_union_vars, finish_anon_union, coerce_new_type,
6503 coerce_delete_type, comdat_linkage, maybe_make_one_only,
6504 key_method, import_export_vtable, import_export_class,
6505 output_vtable_inherit, import_export_decl, import_export_tinfo,
6506 build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6507 set_guard, start_objects, finish_objects,
6508 start_static_storage_duration_function,
6509 finish_static_storage_duration_function, get_priority_info,
6510 start_static_initialization_or_destruction,
6511 finish_static_initialization_or_destruction,
6512 do_static_initialization, do_static_destruction,
6513 prune_vars_needing_no_initialization, write_out_vars,
6514 reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6515 add_using_namespace, merge_functions, ambiguous_decl,
6516 lookup_using_namespace, lookup_using_namespace,
6517 qualified_lookup_using_namespace, set_decl_namespace,
6518 decl_namespace, current_decl_namespace, push_decl_namespace,
6519 pop_decl_namespace, push_scope, pop_scope, add_function,
6520 arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6521 lookup_arg_dependent, do_namespace_alias,
6522 validate_nonmember_using_decl, do_nonmember_using_decl,
6523 do_toplevel_using_decl, do_local_using_decl,
6524 do_class_using_decl, do_using_directive, check_default_args,
6525 mark_used, handle_class_head): Use C90 prototypings. Use booleans.
6526 * parser.c (cp_parser_class_head): Use booleanss.
6527 * decl.c (walk_globals, walk_vtables): Likewise.
6528 * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6529 walk_globals): Change return type from 'int' to 'bool'.
6530 * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6531 throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6532 build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6533 get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6534 qualifier_flags, tinfo_base_init, generic_initializer,
6535 ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6536 dfs_class_hint_unmark, class_hint_flags, class_initializer,
6537 typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6538 get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6539 unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6540 * repo.c (repo_compile_flags, repo_template_declared,
6541 repo_template_defined, repo_class_defined, repo_get_id,
6542 repo_template_used, repo_vtable_used, repo_inline_used,
6543 repo_tinfo_used, repo_template_instantiated, extract_string,
6544 open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6545 finish_repo): Likewise.
6546 * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6547 cxx_print_xnode): Likewise..
6548 * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6549 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6550 * cxxfilt.c (demangle_it, print_demangler_list, usage,
6551 standard_symbol_characters, hp_symbol_characters, main, fatal):
6552 Likewise.
6553 (strip_underscore): Change type from 'int' to 'bool'.
6554 (main): Use boolean constants.
6555
6556 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
6557
6558 Remove traditional C constructs 3/n.
6559 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6560 build_up_reference, warn_ref_binding, convert_to_reference,
6561 convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6562 convert_to_void, convert, convert_force, build_type_conversion,
6563 build_expr_type_conversion, type_promotes_to,
6564 perform_qualification_conversions): Use C90 prototyping style.
6565 * decl2.c (grok_array_decl): Use boolean constant.
6566 (delete_sanity): Likewise.
6567 * typeck.c (build_unary_op): Likewise.
6568 * semantics.c (finish_switch_cond): Likewise.
6569 * parser.c (cp_parser_direct_new_declarator): Likewise.
6570 * init.c (build_new): Likewise.
6571
6572 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6573
6574 * Make-lang.in (po-generated): Remove parse.c.
6575 (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
6576 ($(srcdir)/cp/parse.h): Remove target.
6577 ($(srcdir)/cp/parse.c): Likewise.
6578 (gt-cp-parse.h): Likewise.
6579 (gt-cp-parser.h): New target.
6580 (c++.distclean): Do not remove parse.output.
6581 (c++.maintainer-clean): Do not remove parse.c or parse.h.
6582 (cp/spew.o): Remove target.
6583 (cp/lex.o): Adjust dependencies.
6584 (cp/pt.o): Likewise.
6585 (cp/parse.o): Likewise.
6586 (cp/TAGS): Do not mention parse.c.
6587 (cp/parser.o): New target.
6588 * NEWS: Mention the new parser.
6589 * call.c (build_scoped_method_call): Simplify.
6590 (build_method_call): Likewise.
6591 (build_new_function_call): Adjust calls to add_function_candidate
6592 and add_template_candidate.
6593 (build_new_op): Improve handling of erroroneous operands.
6594 (convert_default_arg): Remove circular argument processing.
6595 (name_as_c_string): New function.
6596 (build_new_method_call): Use it.
6597 (perform_implicit_conversion): Use error_operand_p.
6598 * class.c (finish_struct_anon): Use constructor_name_p.
6599 (check_field_decls): Likewise.
6600 (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6601 (resolve_address_of_overloaded_function): Likewise.
6602 (instantiate_type): Tweak pointer-to-member handling.
6603 (get_primary_binfo): Remove incorrect assertion.
6604 * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6605 * cp-tree.h (DEFARG_TOKENS): New macro.
6606 (default_arg): New structure.
6607 (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6608 (lang_tree_node): Add default_arg.
6609 (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6610 (type_info_ref_type): New macro.
6611 (saved_scope): Make processing_explicit_instantiation a boolean.
6612 (check_access): New field.
6613 (unparsed_text): Remove.
6614 (language_function): Remove unparsed_inlines.
6615 (error_operand_p): New macro.
6616 (lang_decl): Adjust pending_inline_info.
6617 (DEFARG_POINTER): Remove.
6618 (tag_types): Add typenames.
6619 (lookup_ualified_name): Declare.
6620 (lookup_name_real): Likewise.
6621 (shadow_tag): Adjust prototype.
6622 (get_scope_of_declarator): Declare it.
6623 (process_next_inline): Remove it.
6624 (check_for_missing_semicolon): Likewise.
6625 (maybe_get_template_decl_from_type_decl): Declare it.
6626 (finish_label_stmt): Adjust prototype.
6627 (finish_non_static_data_meber): Declare it.
6628 (finish_pseudo_destructor_call_expr): Rename to ...
6629 (finish_pseudo_destructor_expr): ... this.
6630 (finish_compound_literal): Declare it.
6631 (begin_inline_definitions): Remove it.
6632 (init_spew): Remove.
6633 (peekyylex): Likewise.
6634 (arbitrate_lookup): Likewise.
6635 (frob_opname): Likewise.
6636 (maybe_snarf_defarg): Likewise.
6637 (add_defarg_fn): Likewise.
6638 (do_pending_defargs): Likewise.
6639 (done_pending_defargs): Likewise.
6640 (unprocessed_defarg_fn): Likewise.
6641 (replace_defarg): Likewise.
6642 (end_input): Likewise.
6643 (get_overloaded_fn): Likewise.
6644 * cvt.c (convert_to_reference): Improve error handling.
6645 * decl.c (lookup_name_real): Do not declare it static.
6646 (maybe_push_to_top_level): Set check_access.
6647 (identifier_type_value): Adjust call to lookup_name_real.
6648 (lookup_qualified_name): New method.
6649 (lookup_name_real): Remove special-case parsing code.
6650 (lookup_name-nonclass): Adjust call to lookup_name_real.
6651 (lookup_name_namespace_only): Likewise.
6652 (lookup_name): Likewise.
6653 (check_tag_decl): Return the type declared.
6654 (shadow_tag): Likewise.
6655 (register_dtor_fn): Tweak check_access.
6656 (grokfndecl): Use constructor_name_p.
6657 (get_scope_of_declarator): New function.
6658 (grokdeclarator): Obscure tweaks for slightly different declarator
6659 representations.
6660 (start_method): Return error_mark_node to indicate failure.
6661 (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6662 * decl2.c (constructor_name_full): Simplify.
6663 (constructor_name): Use it.
6664 (build_expr_from_tree): Adjust for changes to do new parser.
6665 (push_scope): Improve robustness.
6666 (validate_nonmember_using_decl): Process declarations, not names.
6667 (do_class_using_decl): Likewise.
6668 (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6669 here.
6670 * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6671 * expr.c (cxx_expand_expr): Handle BASELINKs.
6672 * init.c (member_init_ok_or_else): Issue more errors.
6673 (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6674 * lex.c: Do not include parse.h.
6675 (yypring): Do not declare.
6676 (yylval): Likewise.
6677 (make_reference_declarator): Remove error-generating code.
6678 (rid_to_yy): Remove.
6679 (cxx_init): Do not call init_spew.
6680 (yypring): Remove.
6681 (check_for_missing_semicolon): Remove.
6682 * lex.h (got_scope): Remove.
6683 (got_object): Remove.
6684 * method.c (hack_identifier): Use finish_non_static_data_member.
6685 (implicitly_declare_fn): Adjust use of constructor_name.
6686 * parser.c: New file.
6687 * pt.c (parse.h): Do not include it.
6688 (maybe_get_template_decl_from_template): Do not declare it.
6689 (finish_member_template_decl): Tweak.
6690 (begin_explicit_instantiation): Adjust for
6691 processing_explicit_instantiation being boolean.
6692 (end_explicit_instantiation): Likewise.
6693 (maybe_process_partial_specialization): Tighten specialization
6694 test.
6695 (retrieve_local_specialization): Adjust ue of hash table.
6696 (eq_local_specializations): New function.
6697 (register_local_specialization): Likewise.
6698 (push_template_decl_real): Remove unnecessary test.
6699 (maybe_get_template_decl_from_type_decl): Don't make it static.
6700 (for_each_template_parm_r): Handle TYPEOF_TYPE.
6701 (tsubst_copy): Use retrieive_local_specialization to handle
6702 PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
6703 Handle COMPONENT_REFs with pseudo-destructor-expressions.
6704 Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6705 (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6706 (unify): Tweak handling of CONST_DECLs.
6707 (regenerate_decl_from_template): Use push_nested_class.
6708 (template_for_substitution): New funciton.
6709 (instantiate_decl): Use it. Register parameters as local
6710 specializations.
6711 * rtti.c (init_rtti_processing): Set type_info_ref_type.
6712 (build_typeid): Use it.
6713 (get_typeid): Likeise.
6714 * search.c (accessible_p): Use check_access, not
6715 flag_access_control.
6716 (adjust_result_of_qualified_name_lookup): Pay attention to the
6717 context_class.
6718 * semantics.c (finish_asm_stmt): Adjust error handling.
6719 (finish_label_stmt): Return the statement.
6720 (finish_non_static_data_member): New function.
6721 (finish_class_expr): Handle BASELINKs.
6722 (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6723 (finish_object_call_expr): Simplify handling during templates.
6724 (finish_pseudo_destructor_call_expr): Rename to ...
6725 (finish_pseudo_dtor_expr): ... this.
6726 (finish_compound_literal): New function.
6727 (begin_inline_definitions): Remove.
6728 (finish_sizeof): Remove special template handling.
6729 * spew.c: Do not include parse.h.
6730 * tree.c (get_overloaded_fn): Remove.
6731 * typeck.c (build_class_member_access_expr): Handle
6732 PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
6733 (lookup_destructor): New function.
6734 (finish_class_member_access_expr): Use it.
6735 (convert_arguments): Simplify.
6736 (build_unary_op): Handle BASELINKs.
6737
6738 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
6739
6740 PR c++/4803
6741 * decl2.c (mark_used): Defer inline functions.
6742 (finish_file): Merge deferred_fns loops. Check all used
6743 inline functions have a definition.
6744 * method.c (make_thunk): Thunks are not inline.
6745
6746 PR c++/5116, c++/764
6747 * call.c (build_new_op): Make sure template class operands are
6748 instantiated.
6749
6750 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
6751
6752 PR C++/7964
6753 * cp-tree.h (resolve_scoped_fn_name): Prototype.
6754 * call.c (resolve_scoped_fn_name): New function. Deal with
6755 more template expansion. Broken out of ...
6756 * parse.y (parse_finish_call_expr): ... here. Call it.
6757 * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6758 resolve_scoped_fn_name and build_call_from_tree.
6759
6760 PR c++/9053
6761 * decl.c (duplicate_decls): Templates may be disambiguated by
6762 return type.
6763
6764 PR c++/8702
6765 * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6766 conversion operators on failure.
6767
6768 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6769
6770 Remove traditional C constructs 2/n.
6771 * call.c (tourney, build_field_call, equal_functions, joust,
6772 compare_ics, build_over_call, build_java_interface_fn_ref,
6773 convert_like_real, op_error, build_object_call, resolve_args,
6774 build_vfield_ref, check_dtor_name, build_scoped_method_call,
6775 build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6776 sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6777 standard_conversion, reference_related_p,
6778 reference_compatible_p, convert_class_to_reference,
6779 direct_reference_binding, reference_binding,
6780 ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6781 add_template_conv_candidate, any_viable, any_strictly_viable,
6782 build_this, splice_viable, print_z_candidates,
6783 build_user_type_conversion, build_new_function_call,
6784 conditional_conversion, build_conditional_expr, build_new_op,
6785 build_op_delete_call, enforce_access, call_builtin_trap,
6786 convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6787 convert_default_arg, type_passed_as, convert_for_arg_passing,
6788 in_charge_arg_for_name, is_properly_derived_from,
6789 maybe_handle_implicit_object, maybe_handle_ref_bind,
6790 source_type, add_warning, can_convert, can_convert_arg,
6791 perform_implicit_conversion, can_convert_arg_bad,
6792 initialize_reference, add_conv_candidate,
6793 add_template_candidate_real, add_template_candidate): Ansify.
6794
6795 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
6796
6797 PR c++/8572
6798 * cp-tree.h (grokoptypename): Add SCOPE parameter.
6799 * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6800 if in a template scope.
6801 * parse.y (unoperator): Return the scope.
6802 (operator_name): Adjust grokoptypename call.
6803
6804 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6805
6806 * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6807 * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
6808 * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6809
6810 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
6811
6812 * ChangeLog: Fix a typo.
6813 * class.c: Fix comment typos.
6814 * cp-tree.h: Likewise.
6815
6816 2002-12-18 Jason Merrill <jason@redhat.com>
6817
6818 Handle anonymous unions at the tree level.
6819 C++ ABI change: Mangle anonymous unions using the name of their
6820 first named field (by depth-first search). Should not cause
6821 binary compatibility problems, though, as the compiler previously
6822 didn't emit anything for affected unions.
6823 * cp-tree.def (ALIAS_DECL): New tree code.
6824 * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
6825 first field, not the largest.
6826 (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
6827 push the decl, and write it out at namespace scope.
6828 * decl.c (lookup_name_real): See through an ALIAS_DECL.
6829 (pushdecl): Add namespace bindings for ALIAS_DECLs.
6830 * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6831 of a decl which doesn't have one.
6832 * typeck.c (build_class_member_access_expr): Don't recurse if
6833 we already have the type we want.
6834
6835 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6836
6837 PR c++/8099
6838 * friend.c (make_friend_class): Allow partial specialization
6839 when declaration is not a template friend.
6840
6841 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6842
6843 PR c++/3663
6844 * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6845 TREE_PROTECTED to created decl nodes.
6846
6847 2002-12-18 Mark Mitchell <mark@codesourcery.com>
6848
6849 * class.c (build_base_field): Do not set DECL_PACKED on the
6850 FIELD_DECL.
6851
6852 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
6853
6854 * cp-tree.h (struct tree_srcloc): Use location_t.
6855 (SOURCE_LOCUS): New.
6856 (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6857
6858 2002-12-17 Jason Merrill <jason@redhat.com>
6859
6860 * decl.c (finish_function): Also complain about no return in
6861 templates.
6862 * semantics.c (finish_return_stmt): Also call check_return_expr in
6863 templates.
6864 * typeck.c (check_return_expr): In a template, just remember that we
6865 saw a return.
6866
6867 2002-12-16 Jason Merrill <jason@redhat.com>
6868
6869 * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6870 of the CALL_EXPR.
6871
6872 * semantics.c (do_pushlevel): Call pushlevel after adding the
6873 SCOPE_STMT.
6874 (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6875 * parse.y (function_body): Go back to using compstmt.
6876 * decl.c (pushdecl): Skip another level to get to the parms level.
6877
6878 * call.c (build_new_method_call): Use is_dummy_object to determine
6879 whether or not to evaluate the object parameter to a static member
6880 function.
6881
6882 2002-12-14 Jason Merrill <jason@redhat.com>
6883
6884 * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
6885 return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
6886 * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
6887 don't bother with an AGGR_INIT_EXPR.
6888 (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
6889 just generate a new decl normally. Take return slot parm.
6890 * cp-tree.h: Adjust prototype.
6891
6892 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
6893
6894 PR C++/8031
6895 * cvt.c (convert_to_pointer_force): Don't try comparing against
6896 erronous type.
6897
6898 2002-12-13 Geoffrey Keating <geoffk@apple.com>
6899
6900 * cp-tree.h: Have the multiple-include guards around
6901 the entire file.
6902
6903 2002-12-10 David Edelsohn <edelsohn@gnu.org>
6904
6905 * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
6906 for SPEW_DEBUG.
6907 (snarf_method): Same.
6908 (snarf_defarg): Same.
6909
6910 2002-12-10 Mark Mitchell <mark@codesourcery.com>
6911
6912 PR c++/8372
6913 * pt.c (tsubst_copy): Handle destructor names more correctly.
6914
6915 2002-12-10 Matt Austern <austern@apple.com>
6916
6917 * cp-tree.h: get rid of needs_virtual_reinit bit.
6918
6919 2002-12-09 Mark Mitchell <mark@codesourcery.com>
6920
6921 * NEWS: Document removal of in-class initialization extension for
6922 static data members of non-arithmetic, non-enumeration type.
6923 * decl.c (check_static_variable_definition): Do not allow that
6924 extension.
6925 * decl2.c (grokfield): Do not call digest_init when processing
6926 templates.
6927
6928 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6929
6930 * error.c (dump_expr): Fix format specifier warning.
6931
6932 2002-12-04 Geoffrey Keating <geoffk@apple.com>
6933
6934 * class.c (finish_struct_1): Correct comment.
6935 * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
6936
6937 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6938
6939 PR C++/8799
6940 * error.c (dump_expr): Don't ever try to dump a non-existent
6941 expression.
6942
6943 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
6944
6945 Implement covariant returns.
6946 * cp-tree.h (IS_AGGR_TYPE_2): Remove.
6947 (struct lang_decl_flags): Add this_thunk_p flag.
6948 Rename vcall_offset to virtual_offset.
6949 (struct lang_decl): Rename delta to fixed_offset.
6950 (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
6951 (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
6952 (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
6953 (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
6954 (make_thunk): Add this_adjusting arg.
6955 (finish_thunk): Declare.
6956 (mangle_thunk): Add this_adjusting arg.
6957 * class.c (get_vcall_index): Use base function for lookup.
6958 (update_vtable_entry_for_fn): Generate covariant thunk.
6959 (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
6960 (build_vtbl_initializer): Use base function for lookup.
6961 Finish covariant thunk here. Adjust thunk generation.
6962 * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
6963 Adjust thunk dumping.
6964 * mangle.c (mangle_call_offset): New function.
6965 (mangle_thunk): Adjust for covariant thunks.
6966 * method.c (make_thunk): Adjust. Do not set name here.
6967 (finish_thunk): New function. Set name here.
6968 (use_thunk): Generate covariant thunks too.
6969 (thunk_adjust): New function.
6970 * search.c (covariant_return_p): Remove. Fold into ...
6971 (check_final_overrider): ... here. Simplify.
6972 * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
6973
6974 2002-12-03 Jason Merrill <jason@redhat.com>
6975
6976 PR c++/8674
6977 * call.c (build_over_call): Check specifically for TARGET_EXPR
6978 when eliding.
6979
6980 PR c++/8461, c++/8625
6981 * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
6982 (cp_convert_parm_for_inlining): Remove.
6983 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6984 Remove.
6985 * cp-tree.h (ADDR_IS_INVISIREF): Remove.
6986 * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
6987
6988 * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
6989 an ambiguous conversion.
6990
6991 2002-12-03 Mark Mitchell <mark@codesourcery.com>
6992
6993 PR c++/8688
6994 * decl.c (reshape_init): Handle erroneous initializers.
6995
6996 2002-12-02 Mark Mitchell <mark@codesourcery.com>
6997
6998 PR c++/8720
6999 * spew.c (remove_last_token): Make sure that last_chunk is set
7000 correctly.
7001
7002 PR c++/8615
7003 * error.c (dump_expr): Handle character constants with
7004 TREE_OVERFLOW set.
7005
7006 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7007
7008 DR 180
7009 * decl.c (grokdeclarator): Require class-key for all friend class.
7010 Output the correct type and context in the error message.
7011
7012 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7013
7014 PR c++/5919
7015 * pt.c (unify): Use variably_modified_type_p to test validity of
7016 template argument types.
7017
7018 PR c++/8727
7019 * cp-tree.h (lang_type_class): Add typeinfo_var.
7020 (CLASSTYPE_TYPEINFO_VAR): New macro.
7021 * rtti.c (get_tinfo_decl): Use it.
7022
7023 PR c++/8663
7024 * init.c (expand_member_init): Always get the main variant of a
7025 base class.
7026
7027 2002-12-01 Mark Mitchell <mark@codesourcery.com>
7028
7029 PR c++/8332
7030 PR c++/8493
7031 * decl.c (cxx_init_decl_processing): Use size_type_node, not
7032 c_size_type_node.
7033 * decl2.c (coerce_new_type): Likewise.
7034 * except.c (do_allocate_exception): Likewise.
7035
7036 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7037
7038 * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7039 dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7040 lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7041 repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7042 typeck2.c: Include coretypes.h and tm.h.
7043 * Make-lang.in: Update dependencies.
7044
7045 2002-11-30 Mark Mitchell <mark@codesourcery.com>
7046
7047 PR c++/8227
7048 * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7049 (check_initializer): Validate the type of the initialized
7050 variable, even if the initializer is absent.
7051 * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7052
7053 PR c++/8214
7054 * typeck.c (convert_for_assignment): Do not use
7055 decl_constant_value on the operand.
7056
7057 PR c++/8511
7058 * pt.c (instantiate_decl): Handle template friends defined outside
7059 of the class correctly.
7060
7061 2002-11-29 Joe Buck <jbuck@synopsys.com>
7062
7063 * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7064 anonymous structs.
7065
7066 2002-11-29 Mark Mitchell <mark@codesourcery.com>
7067
7068 * class.c (walk_subobject_offsets): Recur on binfos as well as on
7069 types.
7070 (layout_nonempty_base_or_field): Pass it a binfo when processing a
7071 base class.
7072 (layout_empty_base): Likewise.
7073 (build_base_field): Likewise.
7074
7075 2002-11-27 Mark Mitchell <mark@codesourcery.com>
7076
7077 * class.c (build_base_field): Make sure we get the canonical base
7078 when descending through primary bases.
7079
7080 2002-11-26 Geoffrey Keating <geoffk@apple.com>
7081
7082 * decl.c (check_initializer): Don't error on initialisation of
7083 a scalar with a brace-enclosed expression.
7084
7085 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
7086
7087 * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7088 (template_parms_equal): Remove prototype.
7089 * typeck.c (buuld_indirect_ref): Reformat.
7090
7091 2002-11-25 Jason Merrill <jason@redhat.com>
7092
7093 * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7094 and a DO_STMT.
7095
7096 2002-11-25 Mark Mitchell <mark@codesourcery.com>
7097
7098 * tree.c (cp_build_qualified_type_real): Correct handling of
7099 array types.
7100 * class.c (walk_subobject_offsets): Fix thinko.
7101 (build_base_field): Record offsets of empty bases in primary
7102 virtual bases.
7103 (layout_class_type): Record offsets of empty bases in fields.
7104
7105 * search.c (is_subobject_of_p_1): Fix thinko.
7106 (lookup_field_queue_p): Likewise.
7107
7108 2002-11-24 Mark Mitchell <mark@codesourcery.com>
7109
7110 * class.c (layout_class_type): Reuse tail padding when laying out
7111 virtual bases.
7112
7113 2002-11-22 Mark Mitchell <mark@codesourcery.com>
7114
7115 * rtti.c (qualifier_flags): Fix thinko.
7116
7117 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7118
7119 Remove traditional C constructs 1/n.
7120 * cp-tree.h (init_method, set_mangled_name_for_decl,
7121 build_opfncall, hack_identifier, make_thunk, use_thunk,
7122 synthesize_method, implicitly_declare_fn,
7123 skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7124 maybe_clone_body): Remove use of PARAMS.
7125
7126 * method.c (do_build_assign_ref, do_build_copy_constructor,
7127 synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7128 Likewise.
7129 (synthesize_method): Use 'bool' type and constants instead of
7130 'int'.
7131 (locate_copy): Likewise.
7132 (implicitly_declare_fn): Likewise.
7133
7134 * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7135 Remove old-style declaration.
7136 (maybe_clone_body): Use 'bool' type and constants.
7137
7138 2002-11-21 Glen Nakamura <glen@imodulo.com>
7139
7140 PR c++/8342
7141 * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7142 SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7143 of the branches of a COND_EXPR.
7144
7145 2002-11-19 Mark Mitchell <mark@codesourcery.com>
7146
7147 * pt.c (for_each_template_parm): Free allocated memory.
7148 * search.c (is_subobject_of_p_1): New function.
7149 (is_subobject_of_p): Avoid walking virtual bases multiple times.
7150
7151 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7152
7153 * g++spec.c (lang_specific_spec_functions): New.
7154
7155 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
7156
7157 * ChangeLog: Follow spelling conventions.
7158 * class.c: Likewise.
7159 * decl2.c: Likewise.
7160
7161 2002-11-14 Zack Weinberg <zack@codesourcery.com>
7162
7163 * search.c (dfs_push_decls): Do not try to reorder elements
7164 3..n of method_vec if method_vec has only two elements.
7165 Reverse order of two tests to avoid accessing unallocated
7166 memory.
7167
7168 2002-11-14 Mark Mitchell <mark@codesourcery.com>
7169
7170 * class.c (dfs_find_final_overrider): Adjust so that the most
7171 derived object is a binfo, rather than a class type.
7172 (find_final_overrider): Likewise.
7173 (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7174 (add_vcall_offset): Likewise.
7175
7176 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7177
7178 PR c++/8389
7179 * pt.c (instantiate_template): Push class scope for member
7180 functions.
7181 (get_mostly_instantiated_function_type): Likewise. Don't call
7182 tsubst on context. Remove CONTEXTP and TPARMSP parameters.
7183 * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7184 * mangle.c (write_encoding, write_unqualified_name): Adjust.
7185
7186 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7187
7188 * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7189 vcall offfsets. Split out ...
7190 (add_vcall_offset): ... new function.
7191
7192 PR c++/8338
7193 * pt.c (for_each_template_parm): Add htab parameter.
7194 (process_partial_specialization): Adjust call.
7195 (push_template_decl_real): Likewise.
7196 (pair_fn_data): Add visited.
7197 (for_each_template_parm_r): Avoid walking duplicates more than
7198 once.
7199 (uses_template_parms): Adjust call to for_each_template_parm.
7200
7201 2002-11-07 Mark Mitchell <mark@codesourcery.com>
7202
7203 * class.c (add_implicitly_declared_members): Put implicitly
7204 declared functions at the end of TYPE_METHODs when -fabi-version
7205 is at least 2.
7206
7207 2002-11-05 Geoffrey Keating <geoffk@apple.com>
7208
7209 * decl2.c (finish_file): Correct spelling.
7210
7211 2002-11-03 Mark Mitchell <mark@codesourcery.com>
7212
7213 * call.c (build_special_member_call): Do not try to lookup VTTs by
7214 name.
7215 * class.c (vtbl_init_data): Add generate_vcall_entries.
7216 (get_vtable_decl): Do not look up virtual tables by name.
7217 (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7218 (set_primary_base): Do not set CLASSTYPE_RTTI.
7219 (determine_primary_base): Likewise.
7220 (get_matching_virtual): Remove.
7221 (get_vcall_index): New function.
7222 (update_vtable_entry_for_fn): Do not try to use virtual thunks
7223 when they are not required. Assign vcall indices at this point.
7224 (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7225 Do update dynamic_classes.
7226 (build_vtt): Do not add VTTs to the symbol table.
7227 (build_ctor_vtbl_group): Likewise.
7228 (build_vtbl_initializer): Simplify handling of vcall indices.
7229 (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7230 for the most derived class.
7231 (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7232 the vtable.
7233 * cp-tree.h (dynamic_classes): New macro.
7234 (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
7235 (CLASSTYPE_RTTI): Remove.
7236 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7237 (CLASSTYPE_VCALL_INDICES): New macro.
7238 (CLASSTYPE_VTABLES): Likewise.
7239 (BV_USE_VCALL_INDEX_P): Remove.
7240 (build_vtable_path): Remove.
7241 * decl2.c (finish_vtable_vardecl): Remove.
7242 (key_method): Remove #if 0'd code.
7243 (finish_vtable_vardecl): Rename to ...
7244 (maybe_emit_vtables): ... this.
7245 (finish_file): Use it.
7246 * search.c (look_for_overrides_here): Update comment.
7247
7248 2002-11-01 Zack Weinberg <zack@codesourcery.com>
7249
7250 PR c/7353 redux
7251 * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7252
7253 2002-10-30 Jason Merrill <jason@redhat.com>
7254
7255 PR c++/8186
7256 * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7257 * call.c (convert_for_arg_passing): Set it.
7258 * except.c (stabilize_throw_expr): Recurse for such an arg.
7259
7260 2002-10-31 Mark Mitchell <mark@codesourcery.com>
7261
7262 * cp-tree.h (lang_decl_flags): Remove init_priority.
7263 (lang_decl): Add delta.
7264 (GLOBAL_INIT_PRIORITY): Remove.
7265 (THUNK_DELTA): Revise definition.
7266 * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7267 * dump.c (cp_dump_tree): Don't dump it.
7268
7269 2002-10-30 Mark Mitchell <mark@codesourcery.com>
7270
7271 PR c++/8160
7272 * typeck2.c (process_init_constructor): Call complete_array_type.
7273
7274 PR c++/8149
7275 * decl.c (make_typename_type): Issue errors about invalid results.
7276
7277 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7278
7279 Core issue 287, PR c++/7639
7280 * cp-tree.h (lang_type_class): Add decl_list field.
7281 (CLASSTYPE_DECL_LIST): New macro.
7282 (maybe_add_class_template_decl_list): Add declaration.
7283 * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7284 (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7285 (maybe_add_class_template_decl_list): New function.
7286 (add_implicitly_declared_members): Use it.
7287 * decl.c (maybe_process_template_type_declaration): Likewise.
7288 (pushtag): Likewise.
7289 * friend.c (add_friend): Likewise.
7290 (make_friend_class): Likewise.
7291 * semantics.c (finish_member_declaration): Likewise.
7292 (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7293 * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7294 to process members and friends in the order of declaration.
7295
7296 2002-10-29 Mark Mitchell <mark@codesourcery.com>
7297
7298 PR c++/8287
7299 * decl.c (finish_destructor_body): Create the label to jump to
7300 when returning from a destructor here.
7301 (finish_function_body): Rather than here.
7302
7303 2002-10-25 Zack Weinberg <zack@codesourcery.com>
7304
7305 PR c++/7266
7306 * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7307 SCOPE_REF is not null before dereferencing it.
7308
7309 2002-10-25 Mark Mitchell <mark@codesourcery.com>
7310
7311 * call.c (build_over_call): Use DECL_CONTEXT, not
7312 DECL_VIRTUAL_CONTEXT.
7313 * class.c (modify_vtable_entry): Don't mess with
7314 DECL_VIRTUAL_CONTEXT.
7315 (set_vindex): Remove.
7316 (set_primary_base): Remove vfuns_p parameter.
7317 (determine_primary_base): Likewise.
7318 (modify_all_vtables): Likewise.
7319 (layout_class_type): Likewise. Adjust calls to other functions
7320 accordingly.
7321 (finish_struct_1): Adjust calls to modified functions. Set
7322 DECL_VINDEX here.
7323 * cp-tree.h (lang_type_class): Remove vsize.
7324 (CLASSTYPE_VSIZE): Remove.
7325 (lang_decl): Remove thunks.
7326 (DECL_THUNKS): Adjust.
7327 (DECL_VIRTUAL_CONTEXT): Remove.
7328 (duplicate_decls): Don't copy it.
7329 * pt.c (build_template_decl): Don't set it.
7330 (tsubst_decl): Likewise.
7331 * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7332
7333 * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7334 (build_vtable_entry): Remove.
7335 * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7336 (lang_decl): Add thunks.
7337 (DECL_THUNKS): New macro.
7338 * decl.c (duplicate_decls): Copy it.
7339 * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7340 * semantics.c (emit_associated_thunks): Simplify.
7341
7342 2002-10-24 David Edelsohn <edelsohn@gnu.org>
7343
7344 PR c++/7228
7345 * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7346 lang_type structure exists before accessing field.
7347 (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7348 (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7349 (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7350 * class.c (check_field_decls): Use new macros.
7351 * typeck2.c (process_init_constructor): Remove redundant check for
7352 existence of lang_type structure.
7353
7354 2002-10-24 Mark Mitchell <mark@codesourcery.com>
7355
7356 * class.c (end_of_base): New method.
7357 (end_of_class): Use it. Check indirect virtual bases.
7358
7359 * class.c (check_field_decls): Fix typo.
7360
7361 2002-10-23 Mark Mitchell <mark@codesourcery.com>
7362
7363 PR c++/8067
7364 * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7365 related variables.
7366
7367 PR c++/7679
7368 * spew.c (next_token): Do not return an endless stream of
7369 END_OF_SAVED_INPUT tokens.
7370 (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7371 the cached token stream.
7372 (snarf_defarg): Likewise.
7373
7374 2002-10-23 Zack Weinberg <zack@codesourcery.com>
7375
7376 * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7377 variably_modified_type_p.
7378 * cp-tree.h: Remove prototype of variably_modified_type_p.
7379 * tree.c (variably_modified_type_p): Remove; now implemented
7380 in language-independent code.
7381
7382 2002-10-22 Mark Mitchell <mark@codesourcery.com>
7383
7384 PR c++/6579
7385 * spew.c (snarf_parenthesized_expression): New function.
7386 (snarf_block): Use it.
7387
7388 2002-10-22 Richard Henderson <rth@redhat.com>
7389
7390 * method.c (use_thunk): Always compute vcall_value; assert that
7391 it is not zero. Use can_output_mi_thunk; use output_mi_thunk
7392 for vcall thunks as well.
7393
7394 2002-10-21 Mark Mitchell <mark@codesourcery.com>
7395
7396 * class.c (empty_base_at_nonzero_offset_p): New function.
7397 (layout_nonempty_base_or_field): Do not check for conflicts when
7398 laying out a virtual base using the GCC 3.2 ABI.
7399 (build_base_field): Correct checking for presence of empty classes
7400 at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7401
7402 * class.c (include_empty_classes): Use normalize_rli.
7403 (layout_class_type): Likewise.
7404
7405 * decl.c (reshape_init): Tweak handling of character arrays.
7406
7407 PR c++/8218
7408 * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7409 (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7410 * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7411 (check_field_decls): Likewise.
7412 (layout_class_type): Likewise.
7413 (finish_struct_1): Initialize it.
7414 (walk_subobject_offsets): Use it to prune searches.
7415
7416 2002-10-20 Mark Mitchell <mark@codesourcery.com>
7417
7418 * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7419 * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7420 TARGET_ASM_OUTPUT_MI_THUNK in comments.
7421
7422 2002-10-18 Zack Weinberg <zack@codesourcery.com>
7423
7424 * decl.c (start_decl): Point users of the old initialized-
7425 typedef extension at __typeof__.
7426
7427 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7428
7429 * Make-lang.in (method.o): Depend on TARGET_H.
7430 * method.c (target.h): Include it.
7431 (use_thunk): Use target hooks. Use vcall thunks, if available.
7432
7433 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7434
7435 * class.c (base_derived_from): Make sure return value is a bool.
7436
7437 2002-10-18 Mark Mitchell <mark@codesourcery.com>
7438
7439 * class.c (find_final_overrider_data_s): Remove overriding_fn and
7440 overriding_base.
7441 (dfs_base_derived_from): New function.
7442 (base_derived_from): Likewise.
7443 (dfs_find_final_overrider): Use base_derived_from.
7444 (find_final_overrider): Adjust.
7445
7446 2002-10-18 Jason Merrill <jason@redhat.com>
7447
7448 PR c++/8080
7449 * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7450 with condition decls in a template.
7451
7452 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
7453
7454 * class.c (add_method): Compare template parms too.
7455
7456 2002-10-17 Mark Mitchell <mark@codesourcery.com>
7457
7458 PR c++/7584
7459 * class.c (handle_using_decl): Allow the declaration used to be
7460 from an ambiguous base.
7461
7462 * pt.c (convert_template_argument): Revert this change:
7463 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7464 * pt.c (convert_template_argument): Do not fold non-type
7465 template rguments when inside a template.
7466
7467 * init.c (expand_default_init): Handle brace-enclosed initializers
7468 correctly.
7469
7470 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7471
7472 * mangle.c (write_expression): Correct handling of enumeration
7473 constants.
7474 (write_template_arg): Likewise.
7475 * pt.c (convert_template_argument): Do not fold non-type template
7476 arguments when inside a template.
7477
7478 PR c++/7478
7479 * cvt.c (convert_to_reference): Allow references as the incoming
7480 type.
7481
7482 2002-10-16 Mark Mitchell <mark@codesourcery.com>
7483
7484 PR c++/7524
7485 * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7486 build_qualified_type.
7487
7488 2002-10-15 Richard Henderson <rth@redhat.com>
7489
7490 * error.c (dump_expr): Use real_to_decimal directly, and with
7491 the new arguments.
7492
7493 2002-10-15 Mark Mitchell <mark@codesourcery.com>
7494
7495 * decl.c (reshape_init): Fix typo.
7496
7497 * cp-tree.h (operator_name_info_t): Add arity.
7498 * lex.c (init_operators): Initialize it.
7499 * mangle.c (write_conversion_operator_name): New function.
7500 (write_unqualified_name): Use it.
7501 (write_template_args): Accept template arguments as a TREE_LIST.
7502 (write_expression): Adjust handling of qualified names to match
7503 specification.
7504
7505 2002-10-15 Jason Merrill <jason@redhat.com>
7506
7507 * call.c (call_builtin_trap): New fn.
7508 (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
7509 (build_call): Don't set current_function_returns_abnormally outside
7510 a function.
7511
7512 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7513
7514 * class.c (check_field_decls): Remove empty_p parameter. Instead,
7515 clear CLASSTYPE_EMPTY_P.
7516 (build_base_field): Likewise.
7517 (build_base_fields): Likewise.
7518 (check_bases_and_members): Likewise.
7519 (create_vtbl_ptr): Likewise.
7520 (layout_class_type): Likewise. Ensure that empty classes have
7521 size zero when used as base classes in the 3.2 ABI.
7522 (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7523 CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
7524 parameter.
7525 (is_empty_class): Correct definition when using post-3.2 ABI.
7526 * cp-tree.h (lang_type_class): Add empty_p.
7527 (CLASSTYPE_EMPTY_P): New macro.
7528
7529 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
7530
7531 * init.c (build_delete): Do not apply save_expr for arrays.
7532 (build_vec_delete): Likewise.
7533
7534 2002-10-14 Mark Mitchell <mark@codesourcery.com>
7535
7536 * decl.c (layout_var_decl): Call layout_decl even for variables
7537 whose type is an array with unspecified bounds.
7538
7539 PR c++/7176
7540 * lex.c (do_identifier): Add another option for the parsing
7541 parameter.
7542 * parse.y (do_id): Use it.
7543
7544 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
7545
7546 PRs C++/6803, C++/7721 and C++/7803
7547 * decl.c (grokdeclarator): Gracefully handle template-name as
7548 decl-specifier.
7549
7550 2002-10-11 Jason Molenda <jmolenda@apple.com>
7551
7552 * init.c (build_field_list): Provide uses_unions_p with a default
7553 value.
7554
7555 2002-10-11 Mark Mitchell <mark@codesourcery.com>
7556
7557 PR c++/5661
7558 * cp-tree.h (variably_modified_type_p): New function.
7559 (grokdeclarator) Tighten check for variably modified types as
7560 fields.
7561 * pt.c (convert_template_argument): Do not allow variably modified
7562 types as template arguments.
7563 * tree.c (variably_modified_type_p): New function.
7564
7565 * NEWS: Document removal of "new X = ..." extension.
7566 * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7567 brace-enclosed initializers.
7568 * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7569 (initialize_local_var): Remove declaration.
7570 (expand_static_init): Likewise.
7571 * decl.c (next_initializable_field): New function.
7572 (reshape_init): Likewise.
7573 (check_initializer): Use them. Build dynamic initializer for
7574 aggregates here too.
7575 (initialize_local_var): Simplify, and incorporate cleanup
7576 insertion code as well.
7577 (destroy_local_var): Remove.
7578 (cp_finish_decl): Tidy.
7579 (expand_static_init): Fold checks for whether or not a variable
7580 needs initialization into this function. Simplify.
7581 * decl2.c (do_static_initialization): Simplify.
7582 * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7583 be done for us automatically.
7584 (expand_default_init): Handle brace-enclosed initializers
7585 correctly.
7586 (expand_aggr_init_1): Remove RTL-generation code.
7587 (build_vec_init): Remove "new X = ..." support.
7588 * parse.y (new_initializer): Likewise.
7589 * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7590 brace-enclosed initializer.
7591 (create_pseudo_type_info): Likewise.
7592 * typeck2.c (store_init_value): Don't try to handle digest_init
7593 being called more than once.
7594 (digest_init): Tidy handling of brace-enclosed initializers.
7595
7596 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7597
7598 * decl.c (typename_hash): Use htab_hash_pointer.
7599
7600 2002-10-10 Jim Wilson <wilson@redhat.com>
7601
7602 * decl.c (duplicate_decls): Don't call decl_attributes.
7603
7604 2002-10-09 Zack Weinberg <zack@codesourcery.com>
7605
7606 PR c/7353
7607 * decl.c (start_decl): Unconditionally issue error for
7608 'typedef foo = bar'.
7609 (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7610 (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7611
7612 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7613
7614 * decl2.c (prune_vtable_vardecl): Delete unused function.
7615
7616 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7617
7618 PR c++/7754
7619 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7620 procesing template functions.
7621 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7622 type. Call layout_decl.
7623 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7624
7625 2002-10-07 Richard Henderson <rth@redhat.com>
7626
7627 * decl2.c, pt.c: Revert c++/7754 fix.
7628
7629 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7630
7631 PR c++/7804
7632 * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7633
7634 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7635
7636 PR c++/7931
7637 * pt.c (for_each_template_parm_r): Handle BASELINKs.
7638
7639 PR c++/7754
7640 * decl2.c (finish_anon_union): Do not expand anonymous unions when
7641 procesing template functions.
7642 * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7643 type. Call layout_decl.
7644 (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7645
7646 2002-10-03 Mark Mitchell <mark@codesourcery.com>
7647
7648 PR c++/8006
7649 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7650 template parameters.
7651 (globals): Add entity and need_abi_warning.
7652 (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7653 CLASSTYPE_TEMPLATE_INFO.
7654 (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7655 TYPE_TI_TEMPLATE.
7656 (write_prefix): Handle typename types correctly.
7657 (write_template_prefix): Handle template template parameters
7658 correctly.
7659 (start_mangling): Add entity parameter.
7660 (finish_mangling): Warn about names whose mangling will change.
7661 (mangle_decl_string): Adjust.
7662 (mangle_type_string): Likewise.
7663 (mangle_special_for_type): Likewise.
7664 (mangle_ctor_vtbl_for_type): Likewise.
7665 (mangle_thunk): Likewise.
7666 (mangle_guard_variable): Likewise.
7667 (mangle_ref_init_variable): Likewise.
7668
7669 2002-10-02 Mark Mitchell <mark@codesourcery.com>
7670
7671 PR c++/7188.
7672 * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7673 * cp-tree.h (emit_base_init): Rename to ....
7674 (emit_mem_initializers): ... this.
7675 (expand_member_init): Change prototype.
7676 * init.c (perform_member_init): Compute explicit, rather than
7677 requiring it as a parameter.
7678 (sort_member_init): Rename to ...
7679 (sort_mem_initializers): ... this. Process bases and data members
7680 together.
7681 (sort_base_init): Remove.
7682 (emit_base_init): Rename to ...
7683 (emit_mem_initializers): ... this.
7684 (expand_aggr_vbase_init_1): Remove.
7685 (construct_virtual_bases): Rename to ...
7686 (construct_virtual_base): ... this.
7687 (expand_member_init): Rework handling of base initializers.
7688 * method.c (do_build_copy_constructor): Use
7689 finish_mem_initializers.
7690 * parse.y (member_init): Adjust calls to expand_member_init.
7691 * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7692 (tsubst_initializer_list): Use expand_member_init.
7693 * semantics.c (finish_mem_intiailizers): Simplify.
7694
7695 2002-10-02 Matt Austern <austern@apple.com>
7696 * decl.c (walk_vtables_r): Fixed typo that caused result to
7697 never get a nonzero value.
7698
7699 2002-10-02 Roger Sayle <roger@eyesopen.com>
7700
7701 PR optimization/6627
7702 * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7703 from here, and move it to tree.h.
7704 * decl.c (cxx_init_decl_processing): If storing the vbit
7705 in function pointers, ensure that force_align_functions_log
7706 is atleast one.
7707
7708 2002-10-02 Matt Austern <austern@apple.com>
7709
7710 * class.c (check_field_decls): Changed warning about const member
7711 variables so that it doesn't get issued for a class aggregate.
7712
7713 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7714
7715 * decl.c (cp_finish_decl): Make sure array types are laid out,
7716 even if the array bounds are unknown.
7717
7718 2002-10-01 Steve Ellcey <sje@cup.hp.com>
7719
7720 * class.c (build_vtbl_initializer): Change build_c_cast
7721 to build1.
7722
7723 2002-10-01 Mark Mitchell <mark@codesourcery.com>
7724
7725 * decl.c (cp_finish_decl): Make sure array types are laid out,
7726 even if the array bounds are unknown.
7727
7728 * decl.c (cp_finish_decl): Correct check for dynamic
7729 initialization of thread-local storage.
7730
7731 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
7732
7733 * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7734 overloaded.
7735
7736 2002-09-30 Steve Ellcey <sje@cup.hp.com>
7737
7738 * class.c (build_vtbl_initializer): Add cast.
7739 (add_vcall_offset_vtbl_entries_1):
7740 Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7741
7742 2002-09-30 Mark Mitchell <mark@codesourcery.com>
7743
7744 * class.c (walk_subobject_offsets): Correct the calculation of
7745 offsets for virtual bases. Correct the counting of array
7746 elements.
7747 (layout_nonempty_base_or_field): Simplify. Correct the
7748 calculation of offsets to be propagated through the binfo
7749 hierarchy.
7750 (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7751 Add the FIELD_DECL to TYPE_FIELDS.
7752 (build_base_fields): Adjust accordingly.
7753 (layout_virtual_bases): Use build_base_field.
7754 (end_of_class): Return a tree, not an integer.
7755 (warn_about_ambiguous_direct_bases): Rename to ...
7756 (warn_about_ambiguous_bases): ... this.
7757 (include_empty_classes): New function.
7758 (layout_class_type): Create an alternative version of the type to
7759 be used when as a base class type. Do not call
7760 finish_record_layout until we are done laying out the class.
7761 * cp-tree.h (lang_type_class): Remove size, size_unit. Add
7762 as_base.
7763 (CLASSTYPE_SIZE): Reimplement.
7764 (CLASSTYPE_SIZE_UNIT): Likewise.
7765 (CLASSTYPE_ALIGN): Likweise.
7766 (CLASSTYPE_USER_ALIGN): Likewise.
7767 (CLASSTYPE_AS_BASE): New macro.
7768 (DECL_INITIALIZED_P): Likewise.
7769 (extract_init): Remove prototype.
7770 (build_forced_zero_init): Rename to ...
7771 (build_zero_init): ... this.
7772 (force_store_init_value): Remove.
7773 * decl.c (obscure_complex_init): Remove.
7774 (duplicate_decls): Copy DECL_INITIALIZED_P.
7775 (check_initializer): Do not leave junk in DECL_INITIAL.
7776 (cp_finish_decl): Handle zero-initialization of entities with
7777 static storage duration.
7778 * expr.c (extract_init): Remove.
7779 * init.c (build_forced_zero_init): Remove.
7780 (build_zero_init): New function.
7781 (build_default_init): Use it.
7782 (build_field_list): Skip FIELD_DECLs for base subobjects.
7783 (push_base_cleanups): Likewise.
7784 * method.c (do_build_assign_ref): Likewise.
7785 (synthesize_exception_spec): Likewise.
7786 * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7787 (regenerate_decl_from_template): To not set DECL_INITIAL for a
7788 static data member whose initialization took place in its class.
7789 (instantiate_decl): Do not pass an initializer to cp_finish_decl
7790 in that situation.
7791 * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7792 (dfs_unuse_fields): Likewise.
7793 * tree.c (pod_type_p): Handle error_mark_node.
7794 (zero_init_p): Likewise.
7795 * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7796 subobjects.
7797 * typeck2.c (store_init_value): Remove #if 0'd code.
7798 (force_store_init_value): Remove.
7799 (process_init_constructor): Use build_zero_init.
7800
7801 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
7802
7803 PR c++/7788
7804 * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7805
7806 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
7807
7808 * cp-tree.h: Fix comment typos.
7809 * decl.c: Likewise.
7810 * pt.c: Likewise.
7811
7812 2002-09-25 Mark Mitchell <mark@codesourcery.com>
7813
7814 * cp/class.c (contains_empty_class_p): New method.
7815 (walk_subobject_offsets): Correct computation of field offset.
7816 (layout_empty_base): Correct placement of emtpy base classes.
7817 (layout_class_type): Warn about ABI changes.
7818
7819 2002-09-23 Mark Mitchell <mark@codesourcery.com>
7820
7821 * cp/class.c (layout_virtual_bases): Do not round the size of the
7822 type to a multiple of the alignment before laying out virtual bases.
7823 (layout_class_type): Correct handling of bit-fields that are wider
7824 than their type inside unions. Round the size of the type to a
7825 even number of bytes when computing the size without virtual
7826 bases.
7827 * cp/cp-tree.h (abi_version_at_least): New macro.
7828
7829 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
7830
7831 * ChangeLog: Follow spelling conventions.
7832 * ChangeLog.2: Likewise.
7833 * call.c: Likewise.
7834 * class.c: Likewise.
7835 * cp-tree.h: Likewise.
7836 * cvt.c: Likewise.
7837 * decl.c: Likewise.
7838 * decl2.c: Likewise.
7839 * except.c: Likewise.
7840 * friend.c: Likewise.
7841 * g++spec.c: Likewise.
7842 * init.c: Likewise.
7843 * lex.c: Likewise.
7844 * mangle.c: Likewise.
7845 * method.c: Likewise.
7846 * operators.def: Likewise.
7847 * optimize.c: Likewise.
7848 * pt.c: Likewise.
7849 * rtti.c: Likewise.
7850 * search.c: Likewise.
7851 * semantics.c: Likewise.
7852 * spew.c: Likewise.
7853 * tree.c: Likewise.
7854 * typeck.c: Likewise.
7855
7856 2002-09-18 Devang Patel <dpatel@apple.com>
7857
7858 * cp/cp-tree.h: New prototype for walk_vtabls().
7859 * cp/decl.c (walk_vtables_r): New function.
7860 (struct cp_binding_level): Add new members, namespaces,
7861 names_size and vtables.
7862 (add_decl_to_level): Add decl in namespaces or vtables
7863 chain, if conditions match.
7864 (walk_vtables): New function.
7865 (walk_namespaces_r): Travers separate namespace chain
7866 for namespace decls.
7867 (wrapup_globals_for_namespace): Use names_size instead
7868 of list_length().
7869 * cp/decl2.c (finish_file): Use walk_vtables() instead of
7870 walk_globals() to walk vtable decls.
7871
7872 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
7873
7874 * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7875 ICE with invalid pointers & references.
7876
7877 2002-09-17 Zack Weinberg <zack@codesourcery.com>
7878
7879 * Make-lang.in: Remove all references to the demangler.
7880 * cxxfilt.c: Moved to binutils.
7881
7882 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7883
7884 PR c++/7718
7885 * pt.c (tsubst_decl): Remove assert.
7886
7887 Remove DR 295 implementation.
7888 * pt.c (check_cv_quals_for_unify): Disable function & method cases.
7889 * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
7890 about ignoring volatile qualifiers.
7891
7892 * search.c (lookup_member): Correct documentation.
7893
7894 2002-09-16 Geoffrey Keating <geoffk@apple.com>
7895
7896 * cp-tree.h (union lang_tree_node): Add chain_next option.
7897
7898 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
7899
7900 * parse.y (parse_finish_call_expr): Check lookup_member result.
7901
7902 PR c++/7015
7903 * semantic.c (finish_asm_stmt): Fix operand/output_operands
7904 thinko.
7905 * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
7906
7907 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
7908
7909 PR c++/7919
7910 * call.c (build_over_call): Convert this pointer for fns found by
7911 using decls.
7912
7913 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
7914
7915 * ChangeLog: Follow spelling conventions.
7916 * ChangeLog.1: Likewise.
7917
7918 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
7919
7920 PR c++/7768
7921 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
7922
7923 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
7924
7925 * error.c: Fix comment formatting.
7926 * except.c: Likewise.
7927 * expr.c: Likewise.
7928 * friend.c: Likewise.
7929 * g++spec.c: Likewise.
7930 * init.c: Likewise.
7931 * lex.c: Likewise.
7932 * mangle.c: Likewise.
7933 * method.c: Likewise.
7934 * optimize.c: Likewise.
7935 * pt.c: Likewise.
7936 * rtti.c: Likewise.
7937 * search.c: Likewise.
7938 * semantics.c: Likewise.
7939 * spew.c: Likewise.
7940 * tree.c: Likewise.
7941 * typeck.c: Likewise.
7942 * typeck2.c: Likewise.
7943
7944 2002-09-13 Matt Austern <austern@apple.com>
7945
7946 PR C++/7828
7947 * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
7948 * cp/call.c: Change call-by-const-reference mechanism to use
7949 non_cast_lvalue_p when deciding whether the create a temporary.
7950 We need a temporary when passing, e.g. (long) x by const ref.
7951
7952 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
7953
7954 * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
7955
7956 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
7957
7958 * decl.c: Fix comment formatting.
7959 * decl2.c: Likewise.
7960
7961 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
7962
7963 * call.c: Fix comment formatting.
7964 * class.c: Likewise.
7965 * cp-lang.c: Likewise.
7966 * cp-tree.h: Likewise.
7967 * cvt.c: Likewise.
7968
7969 2002-09-11 Zack Weinberg <zack@codesourcery.com>
7970
7971 * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
7972 and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
7973 * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
7974 minor adjustments (use version_string, eliminate yet another
7975 duplicate of xmalloc)
7976
7977 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7978
7979 * cp-tree.h (require_complete_eh_spec_types): Add prototype.
7980
7981 2002-09-05 Jason Merrill <jason@redhat.com>
7982
7983 * typeck2.c (add_exception_specifier): Only pedwarn for an
7984 incomplete type.
7985 (require_complete_eh_spec_types): New fn.
7986 (cxx_incomplete_type_diagnostic): Also support pedwarning.
7987 * typeck.c (complete_type_or_diagnostic): Likewise.
7988 * call.c (build_call): Call require_complete_eh_spec_types.
7989 * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
7990 on an incomplete type.
7991
7992 2002-09-04 Jakub Jelinek <jakub@redhat.com>
7993
7994 * decl.c (start_cleanup_fn): Clear interface_only before
7995 start_function, restore it afterwards.
7996
7997 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
7998
7999 * cp-tree.h (finish_builtin_type): Remove.
8000 * decl2.c (finish_builtin_type): Move to common code.
8001 * decl.c (build_ptrmemfunc_type): Adjust.
8002 * rtti.c (create_pseudo_type_info): Adjust.
8003 (create_tinfo_types): Adjust.
8004
8005 2002-08-31 Jason Merrill <jason@redhat.com>
8006
8007 * cp-lang.c (cp_expr_size): Allow initialization from a
8008 CONSTRUCTOR.
8009
8010 2002-08-30 Richard Henderson <rth@redhat.com>
8011
8012 PR opt/7515
8013 * tree.c: Include target.h.
8014 (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8015 don't bind locally.
8016 * Makefile.in (tree.o): Update.
8017
8018 2002-08-27 Mark Mitchell <mark@codesourcery.com>
8019
8020 * class.c (layout_virtual_bases): Warn about bugs in G++ that
8021 result in incorrect object layouts.
8022 (layout_class_type): Likewise.
8023
8024 2002-08-24 Matt Austern <austern@apple.com>
8025
8026 * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8027 are allowable.
8028 (real_lvalue_p): Update caller.
8029 (lvalue_p): Ditto.
8030 (non_cast_lvalue_or_else): New.
8031 * tree.h: Declare it.
8032 * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8033
8034 2002-08-22 Mark Mitchell <mark@codesourcery.com>
8035
8036 * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8037 and COND_EXPR specially; fix error message output.
8038
8039 2002-08-22 Jason Merrill <jason@redhat.com>
8040
8041 * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8042 * semantics.c (nullify_returns_r): Likewise.
8043
8044 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
8045
8046 Fix PR/7621
8047 * typeck.c (finish_class_member_access_expr): Diagnose cases where
8048 name lookup finds nothing.
8049
8050 2002-08-15 Jason Merrill <jason@redhat.com>
8051
8052 * semantics.c (finish_then_clause): Remove redundant assignment.
8053 (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8054 extra binding level outside the if/switch statement.
8055 (finish_while_cond, finish_for_cond): Rewrite complex condition
8056 into the loop body.
8057
8058 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
8059
8060 * parse.y (sizeof, alignof, typeof): New non-terminals to
8061 increment skip_evaluation. Replace terminals with them and
8062 decrement skip_evaluation at the end of rules using them.
8063 * decl2.c (mark_used): Don't assemble_external if
8064 skipping evaluation.
8065
8066 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
8067
8068 Fix PR/7504
8069 * parse.y (parse_finish_call_expr): Handle incomplete
8070 type used to name a scope.
8071
8072 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
8073
8074 PR c++/7598
8075 * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8076 regression caused by my 2002-08-08 patch.
8077
8078 2002-08-13 Mark Mitchell <mark@codesourcery.com>
8079
8080 * decl.c (pushdecl_class_level): Honor requests to bind names to
8081 OVERLOADs.
8082
8083 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8084
8085 * decl2.c (build_call_from_tree): Fix uninitialized variable.
8086 * parse.y (parse_finish_call_expr): Likewise.
8087 * repo.c (old_args, old_dir, old_main): Const-ify.
8088
8089 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
8090
8091 * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8092 DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8093 * optimize.c (maybe_clone_body): Likewise.
8094 * pt.c (tsubst_enum): Likewise.
8095 (lookup_template_class): Likewise.
8096 * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8097
8098 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
8099
8100 * lang-specs.h: Remove -ansi.
8101
8102 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
8103
8104 * tree.c (maybe_dummy_object): Replace // with /* */
8105
8106 2002-08-09 Mark Mitchell <mark@codesourcery.com>
8107
8108 * call.c (standard_conversion): Use build_ptrmem_type.
8109 * cp-tree.h (build_ptrmem_type): New function.
8110 (adjust_result_of_qualified_name_lookup): Likewise.
8111 * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8112 static data members.
8113 (build_ptrmem_type): New function.
8114 (grokdeclarator): Do not use build_offset_type when encountering a
8115 qualified name.
8116 * parse.y (parse_finish_call_expr): Use
8117 adjust_result_of_qualified_name_lookup.
8118 * search.c (adjust_result_of_qualified_name_lookup): New function.
8119 * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8120 accessing OFFSET_TYPEs directly.
8121
8122 2002-08-08 Mike Stump <mrs@apple.com>
8123
8124 * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8125 (type_decays_to): Likewise.
8126 * class.c (find_final_overrider): Likewise.
8127 (maybe_note_name_used_in_class): Likewise.
8128 * decl.c (current_tmpl_spec_kind): Likewise.
8129 (add_binding): Likewise.
8130 (push_class_binding): Likewise.
8131 (duplicate_decls): Likewise.
8132 (layout_var_decl): Likewise.
8133 (grokfndecl): Likewise.
8134 (grokdeclarator): Likewise.
8135 (check_default_argument): Likewise.
8136 * decl2.c (handle_class_head): Likewise.
8137 * error.c (dump_template_decl): Likewise.
8138 * init.c (build_offset_ref): Likewise.
8139 * pt.c (check_specialization_scope): Likewise.
8140 (determine_specialization): Likewise.
8141 (check_explicit_specialization): Likewise.
8142 (maybe_check_template_type): Likewise.
8143 (process_partial_specialization): Likewise.
8144 (check_default_tmpl_args): Likewise.
8145 (push_template_decl_real): Likewise.
8146 (convert_template_argument): Likewise.
8147 (try_class_unification): Likewise.
8148 (get_bindings_real): Likewise.
8149 (do_decl_instantiation): Likewise.
8150 * semantics.c (begin_function_definition): Likewise.
8151 (finish_member_declaration): Likewise.
8152 (check_multiple_declarators): Likewise.
8153 * typeck.c (comp_array_types): Likewise.
8154 (comptypes): Likewise.
8155 (expr_sizeof): Likewise.
8156 (build_binary_op): Likewise.
8157 (dubious_conversion_warnings): Likewise.
8158 (check_return_expr): Likewise.
8159
8160 2002-08-08 Mark Mitchell <mark@codesourcery.com>
8161
8162 * typeck.c (build_class_member_access_expr): Do not return
8163 error_mark_node when no error has occurred.
8164
8165 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8166
8167 * typeck.c (build_component_addr): Remove.
8168 (build_unary_op): Just check it's not a bitfield, and then build
8169 an ADDR_EXPR.
8170
8171 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8172
8173 * class.c (convert_to_base): Correct check for error_mark_node.
8174 (create_vtable_ptr): Remove unused VFUNS_P parm.
8175
8176 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8177
8178 * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8179
8180 2002-08-07 Mark Mitchell <mark@codesourcery.com>
8181
8182 Rework build_component_ref.
8183 * call.c (build_vfield_ref): Do not go through build_component_ref.
8184 (build_field_call): Use build_class_member_access_expr.
8185 (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8186 (build_object_call): Likewise.
8187 * class.c (convert_to_base): New function.
8188 (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8189 (instantiate_type): Handle BASELINKs.
8190 * cp-tree.def (BASELINK): New tree code.
8191 * cp-tree.h (BASELINK_P): Reimplement.
8192 (SET_BASELINK_P): Remove.
8193 (BASELINK_BINFO): Reimplement.
8194 (BASELINK_FUNCTIONS): Likewise.
8195 (BASELINK_ACCESS_BINFO): Likewise.
8196 (BASELINK_OPTYPE): Likewise.
8197 (convert_to_base): New function.
8198 (name_p): Likewise.
8199 (build_object_ref): Remove.
8200 (build_component_ref_1): Likewise.
8201 (build_component_ref): Likewise.
8202 (build_x_component_ref): Likewise.
8203 (build_class_member_access_expr): New function.
8204 (finish_class_member_access_expr): Likewise.
8205 (build_ptrmemfunc_access_expr): Likewise.
8206 * decl.c (grokdeclarator): Handle BASELINKs.
8207 * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8208 finish_class_member_access_expr.
8209 (arg_assoc): Handle BASELINKs.
8210 (do_class_using_decl): Likewise.
8211 * error.c (dump_decl): Likewise.
8212 (dump_expr): Use build_ptrmemfunc_access_expr.
8213 * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8214 destructors.
8215 (build_throw): Use BASELINK_FUNCTIONS.
8216 * init.c (perform_member_init): Use
8217 build_class_member_access_expr.
8218 (build_offset_ref): Handle BASELINKs. Use
8219 build_class_member_access_expr.
8220 * method.c (hack_identifier): Likewise.
8221 * parse.y (do_id): Use BASELINK, not TREE_LIST.
8222 (primary): Remove uses of build_object_ref.
8223 * pt.c (lookup_template_function): Handle BASELINKs.
8224 (resolve_overloaded_unification): Likewise.
8225 * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8226 (lookup_field): Use BASELINK, not TREE_LIST.
8227 (lookup_fnfiels): Likewise.
8228 (setup_class_bindings): Likewise.
8229 * semantics.c (finish_object_call_expr): Do not use
8230 build_method_call when we already know what function is being
8231 called.
8232 * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8233 * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8234 TREE_CHAIN.
8235 (name_p): New function.
8236 * typeck.c (build_object_ref): Remove.
8237 (build_component_ref_1): Likewise.
8238 (build_x_component_ref): Likewise.
8239 (build_class_member_access_expr): New function.
8240 (finish_class_member_access_expr): Likewise.
8241 (build_ptrmemfunc_access_expr): Likewise.
8242 (get_member_function_from_ptrfunc): Use
8243 build_ptrmemfunc_access_expr.
8244 (build_binary_op): Likewise.
8245 (build_unary_op): Likewise.
8246 (build_ptrmemfunc): Likewise.
8247 (pfn_from_ptrmemfunc): Likewise.
8248 * typeck2.c (build_m_component_ref): Adjust comment.
8249
8250 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
8251
8252 * Make-lang.in (CXX_C_OBJS): Update.
8253 * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8254 * cp-tree.h (cxx_decode_option): Remove.
8255 * decl2.c (compare_options, lang_f_options, unsupported_options,
8256 cxx_decode_option): Remove.
8257
8258 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
8259
8260 * typeck.c (build_x_unary_op): Handle pointer-to-member.
8261
8262 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8263
8264 * class.c: Don't include obstack.h.
8265 (popclass):
8266 * decl2.c: Delete bogus comment.
8267 * error.c: Don't include obstack.h.
8268 * except.c: Likewise.
8269 (dump_type): Correct comment.
8270 * method.c: Don't include obstack.h.
8271 * tree.c: Likewise.
8272
8273 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
8274
8275 Fix PR/2213
8276 * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8277 expressions to pointer-to-data-member of pointer-to-member-functions.
8278
8279 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8280
8281 * cvt.c (ocp_convert): Delete obsolete code.
8282 * parse.y (permanent_obstack): Delete declaration.
8283 * pt.c (permanent_obstack): Delete declaration.
8284 * repo.c (permanent_obstack): Delete declaration.
8285 (open_repo_file): Use xmalloc instead of permanent_obstack.
8286 (init_repo): Use xstrdup instead of permanent_obstack.
8287
8288 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
8289
8290 * cp-tree.h (VF_DERIVED_VALUE): Remove.
8291 * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8292
8293 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
8294
8295 PR 7470.
8296 C++ ABI change - vfunc ordering.
8297 * class.c (add_virtual_function): Remove.
8298 (dfs_modify_all_vtables): Take list of all declared
8299 virtuals. Assign all that are not in primary base.
8300 (check_for_override): Adjust comments.
8301 (create_vtable_ptr): Take single list of virtuals. Build chain
8302 of declared virtuals here.
8303 (layout_class_type): Take single list of virtuals. Adjust.
8304 (finish_struct_1): Keep virtuals on single list. Adjust.
8305
8306 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8307
8308 * init.c (build_member_call): Use build_new_method_call, not
8309 build_method_call.
8310
8311 2002-08-02 Krister Walfridsson <cato@df.lth.se>
8312
8313 * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8314
8315 2002-08-02 Mark Mitchell <mark@codesourcery.com>
8316
8317 * call.c (build_method_call): Issue a more helpful error message
8318 about ambiguous method names.
8319
8320 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
8321
8322 * tree.c (build_shared_int_cst): Make cache file scope, and
8323 GTY it.
8324
8325 2002-08-02 Jason Merrill <jason@redhat.com>
8326
8327 * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8328 (cp_expr_size): New fn.
8329 * call.c (build_over_call): Lose empty class hackery.
8330 (convert_arg_to_ellipsis): Promote non-POD warning to error.
8331 * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8332
8333 * semantics.c (expand_body): Do tree optimization in the function
8334 context, too.
8335
8336 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
8337
8338 * cp-tree.h: Move all warning and flag declarations to c-common.h.
8339 * decl.c: Move all warning and flag variables to c-common.c.
8340 * decl2.c: Move all warning and flag variables to c-common.c.
8341 * lex.c (flag_digraphs): Remove.
8342 (warn_traditional): Now in c-common.c.
8343
8344 2002-07-31 Mark Mitchell <mark@codesourcery.com>
8345
8346 * call.c (build_field_call): Do not look up the field by name.
8347 (build_method_call): Simplify.
8348 (struct z_candidate): Add access_path and conversion_path. Remove
8349 basetype_path.
8350 (convert_class_to_reference): Adjust use of
8351 add_function_candidate.
8352 (add_candidate): Add conversion_path argument.
8353 (add_function_candidate): Use it.
8354 (add_conv_dndidate): Likewise.
8355 (build_builtin_candidate): Likewise.
8356 (add_template_candidate_real): Add conversion_path argument.
8357 (add_template_conv_candidate): Likewise.
8358 (add_template_candidate): Likewise.
8359 (build_user_type_conversion_1): Use it.
8360 (build_new_function_call): Remove name lookup code. Adjust use of
8361 add_template_candidate and add_function_candidate.
8362 (build_new_op): Likewise.
8363 (convert_like_real): Use build_special_member_call.
8364 (build_over_call): Use cand->conversion_path.
8365 (build_special_member_call): New method.
8366 (build_new_method_call): Remove name lookup code.
8367 * cp-tree.def (OFFSET_REF): Update documentation.
8368 (TEMPLATE_ID_EXPR): Likewise.
8369 * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8370 (BASELINK_OPTYPE): Likewise.
8371 (build_new_method_call): Adjust prototype.
8372 (build_special_member_call): New method.
8373 (build_baselink): New method.
8374 (build_offset_ref_call_from_tree): Likewise.
8375 (build_call_from_tree): Likewise.
8376 (finish_qualified_call_expr): Remove.
8377 (finish_call_expr): Adjust prototype.
8378 (build_x_function_call): Remove.
8379 * cvt.c (ocp_convert): Use build_special_member_call.
8380 * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8381 (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8382 CALL_EXPR.
8383 (build_offset_ref_call_from_tree): New function.
8384 (build_call_from_tree): Likewise.
8385 * init.c (expand_cleanup): Use build_special_member_call.
8386 (expand_default_init): Likewise.
8387 (build_member_call): Use finish_call_expr.
8388 (build_new_1): Use build_special_member_call.
8389 (push_base_cleanups): Likewise.
8390 * method.c (do_build_assign_ref): Likewise.
8391 * parse.y (template_id): Do not pass a COMPONENT_REF to
8392 lookup_template_function.
8393 (primary): Use parse_finish_call_epxr, not finish_call_expr.
8394 (parse_finish_call_expr): New function.
8395 * pt.c (lookup_template_function): Add assertions.
8396 * search.c (lookup_base): Allow T to be a binfo.
8397 (build_baselink): New function.
8398 (lookup_member): Use it.
8399 * semantics.c (finish_call_expr): Do not do name lookup.
8400 (finish_object_call_expr): Remove #if 0'd code.
8401 (finish_qualified_call_expr): Remove.
8402 * typeck.c (build_x_function_call): Remove.
8403 (build_static_case): Use build_special_member_call.
8404 * typeck2.c (build_functional_cast): Likewise.
8405
8406 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
8407
8408 * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8409
8410 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
8411
8412 * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8413
8414 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
8415
8416 * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8417 documentation.
8418
8419 2002-07-29 Alan Modra <amodra@bigpond.net.au>
8420
8421 * cp-tree.h: Comment typo fix.
8422
8423 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
8424
8425 * spew.c (space_for_token): Allocate zeroed memory for a new token
8426 chunk.
8427
8428 2002-07-27 Roger Sayle <roger@eyesopen.com>
8429
8430 * decl.c (builtin_function_1): No need to explicitly mark
8431 BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8432
8433 2002-07-27 Roger Sayle <roger@eyesopen.com>
8434
8435 * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8436
8437 2002-07-26 Jason Merrill <jason@redhat.com>
8438
8439 * call.c (build_over_call): Likewise.
8440 (cp_convert_parm_for_inlining): New fn.
8441 (convert_for_arg_passing): New fn.
8442 (convert_default_arg, build_over_call): Use it.
8443 (type_passed_as): New fn.
8444 * pt.c (tsubst_decl): Use it.
8445 * decl2.c (cp_build_parm_decl): New fn.
8446 (build_artificial_parm): Use it.
8447 (start_static_storage_duration_function): Likewise.
8448 * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8449 (grokparms): Don't mess with DECL_ARG_TYPE.
8450 * typeck.c (convert_arguments): Use convert_for_arg_passing.
8451 * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8452 Define.
8453 * cp-tree.h: Declare new fns.
8454
8455 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
8456
8457 * cp-tree.h (flag_operator_names): Remove.
8458 * decl2.c (flag_operator_names): Remove.
8459 (lang_f_options): Remove operator-names.
8460 * lex.c (D_OPNAME): Remove.
8461 (reswords): Remove operator names.
8462 (rid_to_yy): Remove operator names.
8463 (init_reswords): No need to handle D_OPNAME.
8464 * spew.c (read_process_identifier): There are no operator
8465 names.
8466
8467 2002-07-26 Jason Merrill <jason@redhat.com>
8468
8469 * dump.c (cp_dump_tree): Call c_dump_tree.
8470 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8471
8472 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8473
8474 * error.c (print_whitespace): Remove.
8475 * g++spec.c (LIBUNWIND): Move.
8476 * mangle.c (mangled_position, write_signed_number): Remove.
8477
8478 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
8479
8480 * decl2.c (cxx_decode_option): Similarly.
8481
8482 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
8483
8484 * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8485 (cxx_sizeof_or_alignof_type): Take a third argument.
8486 (cxx_sizeof): Adjust definition.
8487 (cxx_alignof): Likewise.
8488 * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8489 * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8490 complaining.
8491 (c_sizeof_nowarn): Remove definition.
8492 (build_unary_op): Use cxx_sizeof_nowarn.
8493
8494 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
8495
8496 * tree.c (cp_build_qualified_type_real): When copying
8497 pointer-to-method types, unshare the record that holds
8498 the cached pointer-to-member-function type.
8499
8500 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8501
8502 * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8503
8504 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
8505
8506 Fix PR/7363:
8507 * typeck.c (cxx_sizeof_or_alignof_type): New function.
8508 (c_sizeof): Remove definition.
8509 (expr_sizeof): Use cxx_sizeof.
8510 * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8511 * decl.c (finish_destructor_body): Use cxx_sizeof.
8512 * semantics.c (finish_alignof): Likewise.
8513 (finish_alignof): Use cxx_alignof.
8514 * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8515 (cxx_sizeof_or_alignof_type): Declare.
8516 (my_friendly_assert): Move to ../c-common.h.
8517
8518 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
8519
8520 * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8521
8522 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8523
8524 PR c++/7347, c++/7348
8525 * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8526 * decl.c (make_typename_type): Use it.
8527 (make_unbound_class_template): Likewise.
8528 (lookup_name_real): Don't call type_access_control if scope is
8529 template parameter dependent.
8530 * parse.y (template_arg): Call make_unbound_class_template with
8531 tf_parsing set.
8532 (nest_name_specifier): Call make_typename_type with tf_parsing set.
8533 (typename_sub0): Likewise.
8534 (typename_sub1): Likewise.
8535 (instantiate_decl): Push class scope.
8536 * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8537 for both static variable and member function template.
8538 (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8539 and arguments.
8540 * search.c (type_access_control): Do type access for TEMPLATE_DECL
8541 too.
8542
8543 2002-07-20 Roger Sayle <roger@eyesopen.com>
8544
8545 * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8546 test by using positive_option. Make whitespace consistent.
8547
8548 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
8549
8550 * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8551 members with 'locus'. Adjust use throughout.
8552 (struct feed): Likewise.
8553 (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8554 Adjust use.
8555 (snarf_defarg): Use error(), not error_with_file_and_line().
8556
8557 2002-07-19 Chris Demetriou <cgd@broadcom.com>
8558
8559 * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8560 cpp_options is included.
8561
8562 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8563
8564 PR c++/2862, c++/2863
8565 * pt.c (determine_specialization): Compare the length of
8566 TYPE_ARG_TYPES. Tidy.
8567
8568 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8569
8570 PR c++/3797
8571 * decl.c (duplicate_decls): Don't propagate inlining parameters from
8572 olddecl to newdecl when newdecl is a specialization of the
8573 instantiation olddecl.
8574
8575 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8576
8577 PR c++/4802, c++/5387
8578 * decl.c (make_typename_type): Use enforce_access.
8579
8580 2002-07-17 Scott Snyder <snyder@fnal.gov>
8581
8582 PR c++/7320
8583 * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8584
8585 2002-07-12 Mark Mitchell <mark@codesourcery.com>
8586
8587 * class.c (add_method): Correct handling of conversion operators.
8588
8589 2002-07-11 Mark Mitchell <mark@codesourcery.com>
8590
8591 PR c++/7224
8592 * class.c (add_method): Simplify.
8593
8594 2002-07-11 Jason Merrill <jason@redhat.com>
8595
8596 PR c++/7279
8597 * tree.c (cp_copy_res_decl_for_inlining): Also copy
8598 TREE_ADDRESSABLE.
8599
8600 2002-07-10 Graham Stott <graham.stott@btinternet.com>
8601
8602 * pt.c (template_parm_this_level_p, push_template_decl_real):
8603 Pass depth as int pointer.
8604
8605 2002-07-11 Tim Josling <tej@melbpc.org.au>
8606
8607 Remove front end hard coding from gengtype.c.
8608
8609 * config-lang.in (gtfiles): Add files needed for this front end.
8610
8611 2002-07-10 Mark Mitchell <mark@codesourcery.com>
8612
8613 * cp-tree.h (unqualified_name_lookup_error): Declare it.
8614 (begin_function_definition): Adjust prototype.
8615 * lex.c (unqualified_name_lookup_error): New function, split out
8616 from ...
8617 (do_identifier): ... here.
8618 * parse.y (parse_begin_function_definition): New function.
8619 (fn.def1): Use it.
8620 * semantics.c (begin_function_definition): Accept decl-specifiers
8621 and attributes as separate parameters.
8622
8623 2002-07-10 Jason Merrill <jason@redhat.com>
8624
8625 PR c++/6255
8626 * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8627 modifying the old one.
8628
8629 2002-07-09 Mark Mitchell <mark@codesourcery.com>
8630
8631 * cp-tree.h (constructor_name_p): Declare it.
8632 (check_template_template_default_arg): Likewise.
8633 * class.c (handle_using_decl): Use constructor_name_p.
8634 * decl.c (grokdeclarator): Likewise.
8635 * decl2.c (constructor_name_p): Define it.
8636 * init.c (build_member_call): Use constructor_name_p.
8637 * parse.y (template_parm): Use check_template_template_default_arg.
8638 * pt.c (check_explicit_specialization): Use constructor_name_p.
8639 * semantics.c (check_template_template_default_arg): New function.
8640
8641 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8642
8643 * pt.c (can_complete_type_without_circularity): Add static to
8644 function definition.
8645
8646 2002-07-08 Mark Mitchell <mark@codesourcery.com>
8647
8648 * cp-tree.h (have_extern_spec): Declare it
8649 * decl.c (have_extern_spec): Define it.
8650 (start_decl): Eliminate use of used_extern_spec.
8651 (start_function): Likewise.
8652 * parse.y (have_extern_spec): Remove declaration.
8653 (used_extern_spec): Likewise.
8654 (frob_specs): Eliminate use of used_extern_spec.
8655 (.hush_warning): Likewise.
8656
8657 2002-07-07 Mark Mitchell <mark@codesourcery.com>
8658
8659 * Make-lang.in (cp/parse.o): Depend on decl.h.
8660 * cp-tree.h (do_decl_instantiation): Change prototype.
8661 * parse.y: Include decl.h.
8662 (parse_decl_instantiation): New function.
8663 (explicit_instantiation): Use it.
8664 * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8665 and DECLSPECS.
8666
8667 2002-07-07 Roger Sayle <roger@eyesopen.com>
8668
8669 * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8670 constructor and destructor tests when passed a TEMPLATE_DECL.
8671
8672 2002-07-05 Jason Merrill <jason@redhat.com>
8673
8674 * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8675 pointers.
8676
8677 PR optimization/7145
8678 * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8679
8680 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
8681
8682 Repair damage on weak-impared targets caused by my previous patch.
8683 * cp-tree.h (import_export_tinfo): Add parameter.
8684 * decl2.c (import_export_tinfo): Add parameter, post adjust
8685 DECL_COMDAT.
8686 * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8687 import_export_tinfo.
8688
8689 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8690
8691 PR c++/6944
8692 * init.c (build_aggr_init): Remove qualifiers of init before calling
8693 build_vec_init.
8694 (build_vec_init): Flatten multi-dimensional array during cleanup.
8695 (build_vec_delete_1): Abort if the type of each element is array.
8696
8697 2002-07-03 Graham Stott <graham.stott@btinternet.com>
8698
8699 * pt.c (instantiate_class_template): Fix typo.
8700
8701 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8702
8703 * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8704 by CVS conflict in my last patch.
8705
8706 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8707
8708 PR c++/6716
8709 * pt.c (can_complete_type_without_circularity): New function.
8710 (instantiate_class_template): Use it.
8711 * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8712 message due to incomplete fields.
8713
8714 2002-07-01 Mark Mitchell <mark@codesourcery.com>
8715
8716 PR c++/7112
8717 * mangle.c (write_expression): Add mangling for sizeof when
8718 applied to a type.
8719 * operators.def: Remove stale comment.
8720
8721 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
8722
8723 * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8724 (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8725 (tinfo_decl_type): Replace with ...
8726 (type_info_ptr_type): ... this.
8727 (import_export_tinfo): Declare.
8728 (tinfo_decl_p): Rename to ...
8729 (unemitted_tinfo_decl_p): ... this.
8730 * decl2.c (import_export_decl): Break out tinfo handling into ...
8731 (import_export_tinfo): ... here. New function.
8732 (finish_file): Adjust.
8733 * rtti.c (TINFO_REAL_NAME): New macro.
8734 (init_rtti_processing): Create the tinfo types.
8735 (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8736 (get_tinfo_decl): Adjust.
8737 (get_tinfo_ptr): New function.
8738 (get_type_id): Use it.
8739 (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8740 (ptr_initializer): Use get_tinfo_ptr.
8741 (ptm_initializer): Likewise.
8742 (synthesize_tinfo_var): Break into ...
8743 (get_pseudo_ti_init): ... this. Just create the initializer.
8744 (get_pseudo_ti_desc): .. and this.
8745 (create_real_tinfo_var): Remove.
8746 (create_pseudo_type_info): Don't create the vtable decl here.
8747 (get_vmi_pseudo_type_info): Remove.
8748 (create_tinfo_types): Adjust.
8749 (tinfo_decl_p): Rename to ...
8750 (unemitted_tinfo_decl_p): ... here. Adjust.
8751 (emit_tinfo_decl): Adjust. Create the initializer.
8752
8753 2002-06-27 Mark Mitchell <mark@codesourcery.com>
8754
8755 PR c++/6695
8756 * pt.c (tsubst_friend_class): Substitute into the context of the
8757 friend before using it.
8758
8759 2002-06-26 Mark Mitchell <mark@codesourcery.com>
8760
8761 * cp-tree.h (xref_tag): Change prototype.
8762 (handle_class_head): Likewise.
8763 (build_x_component_ref): Likewise.
8764 * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8765 (xref_tag): Take attributes as a separate parameter.
8766 (xref_tag_from_type): Adjust call to xref_tag.
8767 * decl2.c (build_expr_from_tree): Adjust call to
8768 build_x_component_ref.
8769 (handle_class_head): Take attributes as a separate parameter.
8770 * parse.y (parse_xref_tag): New function.
8771 (parse_handle_class_head): Likewise.
8772 (primary): Use parse_xref_tag.
8773 (class_head_decl): Use parse_handle_class_head.
8774 (class_head_defn): Likewise.
8775 * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8776 (build_dynamic_cast_1): Likewise.
8777 (create_pseudo_type_info): Likewise.
8778 (emit_support_tinfos): Likewise.
8779 * typeck.c (build_object_ref): Adjust call to
8780 build_x_component_ref.
8781 (build_x_component_ref): Remove protect parameter.
8782
8783 2002-06-25 Mark Mitchell <mark@codesourcery.com>
8784
8785 * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8786 * class.c (handle_using_decl): Likewise.
8787 (instantiate_type): Likewise.
8788 * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8789 (xref_basetypes): Change prototype.
8790 (begin_mem_initializers): New function.
8791 (get_overloaded_fn): Likewise.
8792 * decl.c (xref_basetypes): Simplify.
8793 * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8794 * init.c (build_offset_ref): Likewise.
8795 * parse.y (base_init): Use begin_mem_initializers().
8796 (structsp): Adjust call to xref_basetypes.
8797 * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8798 (instantiate_class_template): Adjust call to xref_basetypes.
8799 * semantics.c (begin_mem_initializers): New function.
8800 * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8801 (really_overloaded_fn): Likewise.
8802 (get_overloaded_fn): New function.'
8803 (get_first_fn): USe BASELINK_FUNCTIONS.
8804
8805 2002-06-24 Mark Mitchell <mark@codesourcery.com>
8806
8807 * cp-tree.h (SCALAR_TYPE_P): New macro.
8808 (check_for_out_of_scope_variable): New function.
8809 (at_class_scope_p): Likewise.
8810 (finish_fname): Likewise.
8811 * class.c (finish_struct): Use at_function_scope_p.
8812 * decl.c (check_for_out_of_scope_variable): New function, split
8813 out from do_identifier.
8814 (finish_enum): Use at_function_scope_p.
8815 * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8816 * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
8817 (primary): Use at_function_scope_p.
8818 * search.c (at_class_scope_p): New function.
8819 * semantics.c (finish_fname): Likewise.
8820 (check_multiple_declarators): Use at_function_scope_p.
8821
8822 2002-06-23 Mark Mitchell <mark@codesourcery.com>
8823
8824 * parse.y (parse_scoped_id): New function.
8825 (primary): Use it.
8826 * cp-tree.h (do_scoped_id): Adjust declaration.
8827 * lex.c (do_scoped_id): Remove call to yylex.
8828 * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8829 * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8830 expanding it inline.
8831
8832 2002-06-23 Matt Thomas <matt@3am-software.com>
8833
8834 * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8835 "#if VMS_TARGET".
8836
8837 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8838
8839 * mangle.c (integer_type_codes): Const-ify.
8840
8841 2002-06-20 Richard Henderson <rth@redhat.com>
8842
8843 PR c++/6747
8844 * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8845 Call put_var_into_stack.
8846
8847 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8848
8849 * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8850 array size calculation.
8851
8852 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8853
8854 PR c++/6892
8855 * pt.c (tsubst_expr): Handle FILE_STMT.
8856
8857 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8858
8859 PR c++/6723
8860 * pt.c (lookup_template_class): Don't build complete argument of
8861 BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8862 argument.
8863
8864 2002-06-19 Akim Demaille <akim@epita.fr>
8865
8866 * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8867 decl.h's TYPENAME.
8868 * spew.c, lex.c: Adjust.
8869 * parse.y (explicit_instantiation): Add empty action to override
8870 the default $$ = $1 where it introduces a type clash.
8871
8872 2002-06-14 Jason Merrill <jason@redhat.com>
8873
8874 * semantics.c (begin_for_stmt): Push the 'for' scope before
8875 adding the FOR_STMT.
8876
8877 C++ ABI changes.
8878 * class.c (build_base_field): Set DECL_PACKED.
8879 (layout_class_type): Don't use tail padding of PODs.
8880 * mangle.c (write_unqualified_name): Fix template conversion op
8881 mangling.
8882
8883 2002-06-16 Richard Henderson <rth@redhat.com>
8884
8885 PR opt/6793
8886 * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
8887 after template instantiation.
8888
8889 2002-06-16 Richard Henderson <rth@redhat.com>
8890
8891 * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
8892
8893 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
8894
8895 * cp-tree.h (compiler_error): Remove declaration.
8896 * lex.c (compiler_error): Remove definition.
8897
8898 2002-06-14 Steve Ellcey <sje@cup.hp.com>
8899
8900 * g++spec.c (LIBUNWIND): New.
8901 (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
8902
8903 2002-06-13 Jessica Han <jessica@cup.hp.com>
8904
8905 * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
8906 (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
8907 (build_vbase_offset_vtbl_entries): Likewise.
8908 * rtti.c (build_headof): Likewise.
8909 (get_tinfo_decl_dynamic): Likewise.
8910 (create_pseudo_type_info): Likewise.
8911
8912 2002-06-12 Stan Shebs <shebs@apple.com>
8913
8914 * mpw-config.in: Remove file, no longer used.
8915 * mpw-make.sed: Ditto.
8916
8917 2002-06-07 Zack Weinberg <zack@codesourcery.com>
8918
8919 * decl2.c: Update call to cpp_handle_option.
8920
8921 2002-06-07 H.J. Lu (hjl@gnu.org)
8922
8923 * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
8924
8925 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
8926
8927 * error.c (cp_error_at): Fix typo.
8928
8929 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
8930
8931 * error.c (cp_diagnostic_starter): Adjust call.
8932 (maybe_print_instantiation_context): Change prototype to take a
8933 'diagnostic_info *'.
8934 (print_instantiation_full_context): Likewise.
8935 (print_instantiation_partial_context): Likewise.
8936 (cp_diagnostic_starter): Likewise.
8937 (cp_diagnostic_finalizer): Likewise.
8938 (cp_print_error_function): Likewise.
8939 (cp_printer): Take a secondary parameter as a 'text_info *'.
8940 Remove output_state savings. Adjust calls.
8941
8942 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
8943
8944 * pt.c (inline_parm_levels): Mark for GC.
8945
8946 * mangle.c (start_mangling): Allocate G.substitutions here...
8947 (init_mangle): ... rather than here.
8948 (finish_mangling): Clear the varray pointer when done with it.
8949 * spew.c (yylexstring): Don't use VARRAY_FREE.
8950 * search.c (bfs_walk): Don't use VARRAY_FREE.
8951 * decl2.c (pending_statics): Use gengtype to mark.
8952 (deferred_fns): Likewise.
8953 (ssdf_decls): Likewise.
8954 (init_decl2): Delete.
8955 * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
8956 (cxx_init_decl_processing): Don't call init_decl2.
8957 (cxx_pop_function_context): Don't use VARRAY_FREE.
8958 * cp-tree.h (struct saved_scope): No need for special marking
8959 of varrays.
8960 (struct language_function): Likewise.
8961 (local_classes): Use gengtype to mark.
8962 (init_decl2): Delete prototype.
8963 * class.c (init_class_processing): Don't use
8964 ggc_add_tree_varray_root.
8965 (build_vtbl_initializer): Don't use VARRAY_FREE.
8966
8967 * decl.c (typename_compare): Don't use same_type_p.
8968
8969 * decl.c: Include hashtab.h instead of hash.h.
8970 (typename_hash): Update to use htab_h.
8971 (typename_compare): Likewise.
8972 (typename_htab): Use gengtype to mark.
8973 (build_typename_type): Update to use htab_h.
8974 * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
8975
8976 * Make-lang.in (gt-cp-tree.h): New rule.
8977 (cp/tree.o): Depend on gt-cp-tree.h.
8978 * config-lang.in (gtfiles): Add cp/tree.c.
8979 * tree.c: Include gt-cp-tree.h.
8980 (list_hash_table): Use gengtype to mark.
8981 (init_tree): Use gengtype to mark trees.
8982
8983 * Make-lang.in (cp/decl.o): Add debug.h dependency.
8984 * call.c (struct z_candidate): Use gengtype.
8985 (USER_CONV_CAND): Use WRAPPER_ZC.
8986 (convert_class_to_reference): Use build_zc_wrapper.
8987 (build_type_conversion_1): Likewise.
8988 (build_over_call): Use WRAPPER_ZC.
8989 (add_warning): Use build_zc_wrapper.
8990 * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
8991 * cp-tree.h (struct lang_identifier): Use gengtype.
8992 (struct template_parm_index_s): Likewise.
8993 (struct ptrmem_cst): Likewise.
8994 (struct tree_binding): Likewise.
8995 (struct tree_overload): Likewise.
8996 (struct tree_srcloc): Likewise.
8997 (struct tree_wrapper): Likewise. Also modify to have a pointer
8998 to struct z_candidate rather than void.
8999 (enum cp_tree_node_structure_enum): New.
9000 (union lang_tree_node): New.
9001 (cxx_mark_tree): Delete prototype.
9002 (cp_tree_node_structure): New prototype.
9003 (build_ptr_wrapper): Delete prototype.
9004 (build_int_wrapper): Delete prototype.
9005 (build_zc_wrapper): New prototype.
9006 * decl.c: Include debug.h
9007 (cxx_mark_tree): Delete.
9008 (cp_tree_node_structure): New.
9009 * tree.c (build_ptr_wrapper): Delete.
9010 (build_int_wrapper): Delete.
9011 (build_zc_wrapper): New.
9012
9013 * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9014 Correct typo. Patch from k_fukui@highway.ne.jp.
9015
9016 * semantics.c (current_stmt_tree): Update for change to
9017 struct language_function.
9018 (finish_mem_initializers): Likewise.
9019 * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9020 * cp-tree.h (struct language_function): Rename from
9021 cp_language_function. Change all uses.
9022 (cp_function_chain): Don't need to cast.
9023
9024 * class.c (duplicate_tag_error): Reset discriminator.
9025 (check_bases_and_members): Update for data structure changes.
9026 * cp-tree.h (struct lang_id2): Use gengtype.
9027 (flagged_type_tree): Likewise.
9028 (SET_LANG_ID): Use GGC on struct lang_id2.
9029 (struct cp_language_function): Use gengtype. Remove field
9030 'x_vcalls_possible_p'.
9031 (current_vcalls_possible_p): Delete.
9032 (struct lang_type_header): New.
9033 (struct lang_type_class): Rename from struct lang_type. Include
9034 struct lang_type_header.
9035 (struct lang_type_ptrmem): New.
9036 (struct lang_type): New.
9037 (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
9038 (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
9039 (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9040 (struct lang_decl_flags): Use gengtype. Add discriminators.
9041 (struct lang_decl): Use gengtype. Add and use discriminators.
9042 Update the macros that reference moved fields.
9043 (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
9044 (SET_DECL_THUNK_P): Set discriminator too.
9045 (clear_inline_text_obstack): Delete prototype.
9046 (finish_inline_definitions): Delete prototype.
9047 (mark_pending_inlines): Delete prototype.
9048 (lang_check_failed): New prototype.
9049 * decl.c (struct named_label_use_list): Use gengtype.
9050 (struct named_label_list): Likewise.
9051 (mark_binding_level): Delete.
9052 (mark_named_label_lists): Delete.
9053 (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9054 (cxx_init_decl_processing): Use generated marker routine.
9055 (begin_destructor_body): Delete dead set to
9056 current_vcalls_possible_p.
9057 (mark_lang_function): Delete.
9058 (mark_cp_function_context): Delete.
9059 (lang_mark_tree): Use generated marker routines.
9060 * decl2.c (start_objects): Set discriminator when setting
9061 GLOBAL_INIT_PRIORITY.
9062 * lex.c (retrofit_lang_decl): Set discriminators.
9063 (copy_lang_type): Update for changes to lang_type structure.
9064 (cp_make_lang_type): Set discriminator.
9065 * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
9066 * search.c: Include ggc.h.
9067 * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9068 (finish_inline_definitions): Delete.
9069 * spew.c (struct token): Use gengtype.
9070 (struct token_chunk): New.
9071 (struct unparsed_text): Use gengtype. Store tokens in chunks.
9072 (struct feed): Use gengtype.
9073 (feed_obstack): Delete.
9074 (feed): Mark as GC root.
9075 (pending_inlines): Mark as GC root.
9076 (pending_inlines_tail): Likewise.
9077 (processing_these_inlines): Likewise.
9078 (token_obstack): Make static.
9079 (first_token): Likewise.
9080 (init_spew): Don't initialize deleted things; use gengtype for roots.
9081 (clear_inline_text_obstack): Delete.
9082 (feed_input): Use GC for struct feed. Update for changes to
9083 struct unparsed_text.
9084 (mark_pending_inlines): Delete.
9085 (next_token): Rename from add_token. Change all callers. Update
9086 for changes to struct unparsed_text.
9087 (space_for_token): New.
9088 (remove_last_token): New.
9089 (alloc_unparsed_text): New.
9090 (snarf_block): Take an unparsed_text. Update for changes to struct
9091 unparsed_text.
9092 (snarf_method): Update for changes to struct unparsed_text.
9093 (snarf_defarg): Update for changes to struct unparsed_text.
9094 * tree.c (lang_check_failed): New.
9095
9096 * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9097 gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9098 (cp/spew.o): Add dependency on gt-<filename>.h.
9099 (cp/decl2.o): Add dependency on gt-<filename>.h.
9100 (cp/call.o): Add dependency on gt-<filename>.h.
9101 (cp/pt.o): Add dependency on gt-<filename>.h.
9102 (cp/repo.o): Add dependency on gt-<filename>.h.
9103 (cp/parse.o): Add dependency on gt-<filename>.h.
9104 * call.c: Use gengtype for roots.
9105 * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9106 decl2.c parse.y pt.c repo.c spew.c.
9107 * cp-tree.h: Use gengtype for roots.
9108 (struct saved_scope): Use GGC, gengtype.
9109 (cp_parse_init): Delete prototype.
9110 (init_pt): Delete prototype.
9111 * decl.c: Use gengtype for roots.
9112 (mark_saved_scope): Delete.
9113 (cxx_init_decl_processing): Don't call deleted initilisation
9114 routines.
9115 (signed_size_zero_node): Delete, unused.
9116 * decl.h: Use gengtype for roots.
9117 * decl2.c: Use gengtype for roots.
9118 * lex.h: Use gengtype for roots.
9119 * parse.y: Use gengtype for roots.
9120 (cp_parse_init): Delete.
9121 * pt.c: Use gengtype for roots.
9122 (init_pt): Delete.
9123 * repo.c: Use gengtype for roots.
9124 * spew.c: Use gengtype for roots.
9125
9126 * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
9127 (cp/decl.o): Add dependency on gtype-cp.h.
9128 * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9129 Include gtype-cp.h. Allow for filename changes.
9130
9131 * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9132 (cp/decl.o): Add cp/gt-decl.h dependency.
9133 * config-lang.in (gtfiles): New.
9134 * tree.h: Rename struct binding_level to struct cp_binding_level.
9135 * decl.c: Rename struct binding_level to struct cp_binding_level.
9136 Include cp/gt-decl.h.
9137 (struct cp_binding_level): Use gengtype.
9138 (make_binding_level): Use GGC on struct cp_binding_level.
9139 (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9140 (cxx_init_decl_processing): Mark free_binding_level as
9141 deletable.
9142
9143 * decl.c (mark_cp_function_context): Update calling sequence.
9144
9145 * decl.c (start_function): Don't free 'struct
9146 cp_language_function'.
9147 (pop_cp_function_context): Likewise.
9148 (save_function_data): Allocate it using GC.
9149 * semantics.c (genrtl_start_function): Don't free 'struct
9150 cp_language_function'.
9151
9152 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
9153
9154 * lang-specs.h: Use cpp_debug_options.
9155
9156 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9157
9158 * mangle.c, tree.c: Include real.h.
9159 * Make-lang.in: Update dependency lists.
9160
9161 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
9162
9163 * lex.c: Don't include c-lex.h.
9164 * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9165
9166 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
9167
9168 * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9169
9170 2002-05-22 Richard Henderson <rth@redhat.com>
9171
9172 * decl.c (obscure_complex_init): Check for VAR_DECL
9173 before using DECL_THREAD_LOCAL.
9174
9175 2002-05-22 Richard Henderson <rth@redhat.com>
9176
9177 * decl.c (check_tag_decl): Handle RID_THREAD.
9178 (obscure_complex_init): Reject run-time init of tls.
9179 (grokvardecl, grokdeclarator): Handle RID_THREAD.
9180 * lex.c (reswords): Add __thread.
9181 (rid_to_yy): Map RID_THREAD to SCSPEC.
9182
9183 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
9184
9185 * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9186 * cp-tree.h (cxx_post_options): Kill.
9187 * cp-lex.c (cxx_post_options): Kill.
9188
9189 2002-05-21 Richard Henderson <rth@redhat.com>
9190
9191 * lex.c (rid_to_yy): Add RID_THREAD.
9192
9193 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
9194
9195 * init.c (build_vec_init): Test for trivial copy-assignment when
9196 copy-assigning arrays.
9197
9198 2002-05-20 Andreas Jaeger <aj@suse.de>
9199
9200 * init.c (build_default_init): Remove unused variable.
9201
9202 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
9203
9204 * call.c (any_strictly_viable): New.
9205 (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9206
9207 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9208
9209 * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9210
9211 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9212
9213 PR c++/186, DR 259
9214 * pt.c (do_decl_instantiation): Don't complain explicit
9215 instantiation after explicit specialization.
9216 (do_type_instantiation): Likewise.
9217
9218 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
9219
9220 * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9221 renamed from...
9222 (complete_type_or_else): ... this. Redefined as macro.
9223 (cxx_incomplete_type_diagnostic): Declare.
9224 (cxx_incomplete_type_error): Define as macro.
9225 * init.c (build_delete): Warn about incomplete types other than
9226 void, and use the built-in operator delete for them.
9227 * typeck.c (complete_type_or_diagnostic): Renamed from
9228 complete_type_or_else. Added warn_only argument, passed to...
9229 * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
9230 warnings or errors depending on new warn_only argument. Renamed
9231 from...
9232 (cxx_incomplete_type_error): ... this. New implementation in
9233 terms of cxx_incomplete_type_diagnostic.
9234
9235 2002-05-18 Jason Merrill <jason@redhat.com>
9236
9237 PR c++/6611
9238 * decl2.c (import_export_decl): If we clear
9239 DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9240
9241 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
9242
9243 PR c++/6620
9244 * pt.c (verify_class_unification): Don't check if PARM is template
9245 parameter dependent. Simplify.
9246 (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9247 parameter dependent expression.
9248
9249 2002-05-14 Jason Merrill <jason@redhat.com>
9250
9251 * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9252 Do set DECL_COMDAT.
9253 (synthesize_tinfo_var): Take the public decl.
9254 (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
9255 (emit_tinfo_decl): Adjust. Call import_export_decl.
9256 * decl2.c (import_export_decl): Simplify tinfo decl handling.
9257
9258 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
9259
9260 * cp-tree.h (struct lang_type): Added non_zero_init.
9261 (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9262 (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9263 * class.c (check_field_decls): Test non_zero_init.
9264 * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9265 zero-to-NULL conversions.
9266 * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9267 type that needs zero-initialization without zeros.
9268 (check_initializer_decl): Compute zero-initializer for types
9269 that require a non-trivial one.
9270 * init.c (build_forced_zero_init): New function.
9271 (build_default_init): Use it.
9272 * tree.c (zero_init_p): New function.
9273 * typeck2.c (force_store_init_value): New function.
9274 (process_init_constructor): Create non-trivial zero-initializers
9275 for array members and class fields.
9276
9277 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
9278
9279 * lang-specs.h: Remove redundant -lang-c++.
9280
9281 2002-05-13 Jason Merrill <jason@redhat.com>
9282
9283 * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9284 (fixed_type_or_null): See through reference vars.
9285 (build_base_path): Vtable contents are constant.
9286 * typeck.c (get_member_function_from_ptrfunc): Likewise.
9287
9288 2002-05-12 Jason Merrill <jason@redhat.com>
9289
9290 * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9291 structs are safe.
9292
9293 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
9294
9295 * cp-tree.h (flag_ansi): Remove.
9296 * decl2.c (flag_ansi): Remove.
9297 (cxx_decode_option): Set flag_iso and flag_undef.
9298
9299 2002-05-09 Jason Merrill <jason@redhat.com>
9300
9301 * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9302 Use subtraction rather than a bitmask to get the index.
9303 * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9304
9305 * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9306
9307 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
9308
9309 * Make-lang.in (decl2.o): Update.
9310 * cp-tree.h (warn_multichar): Remove.
9311 * decl2.c: Include c-common.h.
9312 (warn_multichar): Remove.
9313
9314 2002-05-03 Jason Merrill <jason@redhat.com>
9315
9316 * tree.c (build_cplus_array_type): Only const and volatile get
9317 special handling.
9318
9319 * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9320
9321 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9322
9323 ABI change, returning simple classes from functions.
9324 * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9325 TYPE_HAS_TRIVIAL_INIT_REF is false or
9326 TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9327
9328 2002-04-30 Jason Merrill <jason@redhat.com>
9329
9330 PR debug/6436
9331 * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9332 anonymous class with a typedef if there are attributes.
9333
9334 2002-04-29 Paul Eggert <eggert@twinsun.com>
9335
9336 * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9337
9338 2002-04-29 Jakub Jelinek <jakub@redhat.com>
9339
9340 PR c++/6477
9341 * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9342 non-NULL first.
9343
9344 2002-04-29 Mark Mitchell <mark@codesourcery.com>
9345
9346 PR c++/6492
9347 * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9348 enter that scope before name lookup.
9349
9350 PR c++/6486
9351 * method.c (do_build_copy_constructor): Avoid building
9352 cv-qualified reference types.
9353
9354 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
9355
9356 PR c++/5719
9357 * decl.c (grok_op_properties): Assignment ops don't have to return
9358 by value. operator% should.
9359
9360 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
9361
9362 PR c/6343
9363 * decl.c (duplicate_decls): Call merge_weak.
9364
9365 2002-04-26 Richard Henderson <rth@redhat.com>
9366
9367 * parse.y (malloced_yyss, malloced_yyvs): New.
9368 (yyoverflow): Re-add. Set them.
9369 (free_parser_stacks): New.
9370
9371 2002-04-26 Mark Mitchell <mark@codesourcery.com>
9372
9373 PR c++/6497
9374 * method.c (do_build_assign_ref): Pass a derivation to
9375 build_method_call when calling base class assignment operators.
9376
9377 2002-04-26 Richard Henderson <rth@redhat.com>
9378
9379 * parse.y (yyoverflow): Revert.
9380
9381 2002-04-26 Richard Henderson <rth@redhat.com>
9382
9383 PR c/3581
9384 * parse.y (string): Remove. Update all uses to use STRING
9385 instead, and not call combine_strings.
9386 * rtti.c (tinfo_name): Use fix_string_type.
9387 * semantics.c (finish_asm_stmt): Don't call combine_strings.
9388 * spew.c (yylexstring): New.
9389 (read_token): Use it.
9390
9391 2002-04-25 Richard Henderson <rth@redhat.com>
9392
9393 PR c/2161
9394 * parse.y (yyoverflow): New.
9395
9396 2002-04-25 Jason Merrill <jason@redhat.com>
9397
9398 PR c++/5607
9399 * search.c (check_final_overrider): No longer static.
9400 * class.c (update_vtable_entry_for_fn): Call it.
9401 * cp-tree.h: Adjust.
9402
9403 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9404
9405 * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9406 * cp-tree.h (cxx_set_yydebug): Die.
9407 * lex.c (YYDEBUG): Get from c-lex.h.
9408 (cxx_set_yydebug): Remove.
9409 * parse.y: Include c-lex.h.
9410 (YYDEBUG): Get from c-lex.h.
9411
9412 2002-04-24 Mark Mitchell <mark@codesourcery.com>
9413
9414 PR c++/6438.
9415 * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9416 void.
9417
9418 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
9419
9420 * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9421 LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9422 Redefine.
9423 * cp-tree.h (cp_attribute_table): Rename.
9424 * decl.c (lang_attribute_table): Remove declaration.
9425 (cxx_init_decl_processing): Don't set it.
9426 * tree.c (cp_attribute_table): Rename.
9427
9428 2002-04-24 Jason Merrill <jason@redhat.com>
9429
9430 PR c++/6331
9431 * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9432 * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9433 The pedwarn for array assignment is now unconditional.
9434 * tree.c (build_cplus_array_type_1): Still process simple array types
9435 normally in templates.
9436
9437 PR c++/6395
9438 * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9439 stuff for comdats.
9440
9441 2002-04-23 Jakub Jelinek <jakub@redhat.com>
9442
9443 * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9444 node with attributes.
9445
9446 2002-2-23 David O'Brien <obrien@FreeBSD.org>
9447
9448 * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9449 Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9450
9451 2002-04-23 Mark Mitchell <mark@codesourcery.com>
9452
9453 PR c++/6256:
9454 * pt.c (tsubst_friend_class): Handle templates with explicit
9455 nested names.
9456
9457 PR c++/6331:
9458 * typeck.c (merge_types): Remember the cv-qualification of pointer
9459 types when merging them.
9460
9461 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
9462
9463 * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9464 LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9465 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9466 cxx_mark_function_context): New.
9467 * decl.c (push_cp_function_context, pop_cp_function_context,
9468 mark_cp_function_context): Rename for consistency.
9469 (cxx_init_decl_processing): Don't set old hooks.
9470
9471 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
9472
9473 * call.c (convert_type_from_ellipsis): Rename, update.
9474 * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9475 * cp-tree.h (convert_type_from_ellipsis): Rename.
9476 * decl.c (cxx_init_decl_processing): Don't set hook.
9477
9478 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9479
9480 * call.c (build_new_method_call): Update.
9481 * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9482 * cp-tree.h (cxx_incomplete_type_error): New.
9483 * decl.c (grokdeclarator, grokparms): Update.
9484 * decl2.c (check_classfn): Update.
9485 * pt.c (tsubst): Update.
9486 * typeck.c (complete_type_or_else, expr_sizeof,
9487 decay_conversion): Update.
9488 * typeck2.c (incomplete_type_error): Rename.
9489 (add_exception_specifier): Update.
9490
9491 2002-04-18 Jason Merrill <jason@redhat.com>
9492
9493 PR c++/5658
9494 * search.c (setup_class_bindings): A class template qualifies as a
9495 type binding.
9496
9497 2002-04-17 Jakub Jelinek <jakub@redhat.com>
9498
9499 PR c++/6316
9500 * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9501 before expanding.
9502
9503 2002-04-16 Mark Mitchell <mark@codesourcery.com>
9504
9505 * init.c (begin_init_stmts): Remove commented out code.
9506 (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9507 * semantics.c (begin_gobal_stmt_expr): Adjust call to
9508 expand_start_stmt_expr.
9509
9510 2002-04-15 Mark Mitchell <mark@codesourcery.com>
9511
9512 * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9513 dso_handle itself, to __cxa_atexit.
9514
9515 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9516
9517 * error.c (cxx_print_error_function): Adjust call to macros.
9518
9519 2002-04-14 Jakub Jelinek <jakub@redhat.com>
9520
9521 * class.c (layout_virtual_bases): Do all dsize computation on trees.
9522
9523 2002-04-14 Jason Merrill <jason@redhat.com>
9524
9525 * typeck.c (get_member_function_from_ptrfunc): Don't do
9526 gratuitious division and multiplication on
9527 ptrmemfunc_vbit_in_delta targets.
9528
9529 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9530
9531 PR c++/5373.
9532 * semantics.c (finish_expr_stmt): Remember the type of the
9533 expression before any conversions are performed.
9534
9535 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9536
9537 PR c++/5189.
9538 * call.c (add_template_candidate_real): Do not treat member
9539 templates as copy constructors.
9540
9541 2002-04-12 Mark Mitchell <mark@codesourcery.com>
9542
9543 * decl.c (duplicate_decls): Do not copy the RTL for a variable
9544 declaration if the old variable had an incomplete type and the new
9545 variable does not.
9546 (complete_vars): Do not call layout_decl for completed variables.
9547
9548 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
9549
9550 * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9551 with an explicit one.
9552 (follow_tag_typedef): New.
9553 (lookup_tag): Use it to extract the tag of an explicit typedef.
9554 (xref_tag): Likewise.
9555
9556 2002-04-11 Andrew Haley <aph@redhat.com>
9557
9558 * typeck.c (type_after_usual_arithmetic_conversions):
9559 If two types have the same variant, return immediately.
9560 When two floating-point operands are the same precision:
9561 convert to float if one of the operands is float;
9562 if neither operand is one of the standard types, return the type
9563 of the first operand.
9564
9565 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
9566
9567 PR c++/5507
9568 * decl.c (make_typename_type): Remove implicit typenameness.
9569
9570 2002-04-09 Jason Merrill <jason@redhat.com>
9571
9572 PR optimization/6189
9573 * semantics.c (genrtl_start_function): Don't free
9574 DECL_SAVED_FUNCTION_DATA for inline functions.
9575
9576 * init.c (build_member_call): For now, don't convert to
9577 intermediate base if it would cause an error.
9578
9579 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
9580
9581 * parse.y (namespace_qualifier, maybe_identifier,
9582 begin_explicit_instantiation, end_explicit_instantiation,
9583 apparent_template_type, .finish_template_type,
9584 do_id, maybe_init, defarg_again, component_decl_1):
9585 Add ending ';', in accordance with POSIX.
9586
9587 2002-04-06 Mark Mitchell <mark@codesourcery.com>
9588
9589 PR c++/5571
9590 * class.c (layout_class_type): Remember incomplete static
9591 variables.
9592 (finish_struct_1): Call complete_vars, not
9593 hack_incomplete_structures.
9594 * cp-tree.h (hack_incomplete_structures): Rename to ...
9595 (complete_vars): ... this.
9596 (struct saved_scope): Remove incomplete.
9597 (namespace_scope_incomplete): Remove.
9598 * decl.c (struct binding_level): Remove incomplete.
9599 (incomplete_vars): New variable.
9600 (mark_binding_level): Don't mark incomplete.
9601 (print_binding_level): Don't print it.
9602 (mark_saved_scope): Don't mark incomplete.
9603 (pushdecl): Use maybe_register_incopmlete_var.
9604 (cxx_init_decl_processing): Register incomplete_vars for GC.
9605 (start_decl_1): Clarify error message.
9606 (hack_incomplete_vars): Remove.
9607 (maybe_register_incomplete_var): New function.
9608 (complete_vars): Likewise.
9609
9610 2002-04-06 Jason Merrill <jason@redhat.com>
9611
9612 PR c++/4934
9613 * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9614 set before checking it.
9615
9616 PR c++/525
9617 * init.c (build_member_call): Use build_scoped_ref.
9618 (resolve_offset_ref): Likewise.
9619 * call.c (build_scoped_method_call): Likewise.
9620 * tree.c (maybe_dummy_object): Kludge around current_class_type being
9621 wrong.
9622 * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9623 * cp-tree.h: Adjust.
9624
9625 * init.c (push_base_cleanups): Just use build_scoped_method_call.
9626
9627 PR c++/6179
9628 * method.c (implicitly_declare_fn): Pass unqualified type to
9629 synthesize_exception_spec.
9630
9631 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9632
9633 * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9634 * cvt.c: Update comment.
9635 * init.c (expand_cleanup_for_base): Update.
9636 * semantics.c (finish_parenthesized_expr): Update.
9637 * typeck.c (cp_truthvalue_conversion): Update.
9638
9639 2002-04-04 Jason Merrill <jason@redhat.com>
9640
9641 * semantics.c (finish_eh_cleanup): New fn.
9642 * cp-tree.h: Add prototype.
9643 * init.c (perform_member_init, expand_cleanup_for_base): Use
9644 finish_eh_cleanup.
9645 * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9646 * cp-tree.h: Remove references.
9647 * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9648 * dump.c (cp_dump_tree): Likewise.
9649 * pt.c (tsubst_expr): Likewise.
9650 * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9651 (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9652 * tree.c (cp_statement_code_p): Likewise.
9653
9654 * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9655
9656 PR c++/5636
9657 * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9658 cleanup for nrv.
9659
9660 PR c++/5104
9661 * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9662 specifiers.
9663 [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9664
9665 2002-04-03 Richard Henderson <rth@redhat.com>
9666
9667 * cp-lang.c (cxx_warn_unused_global_decl): New.
9668 (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9669
9670 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
9671
9672 * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9673 * tree.c (init_tree): Don't set hook.
9674
9675 2002-04-03 Roger Sayle <roger@eyesopen.com>
9676
9677 PR c++/5998:
9678 * decl.c (duplicate_decls): Don't mess with assembler names when
9679 redeclaring builtin functions as static.
9680
9681 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9682
9683 * call.c (build_addr_func): Update.
9684 * class.c (resolve_address_of_overloaded_function): Update.
9685 * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9686 * cp-tree.h (cxx_mark_addressable): New.
9687 * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9688 * decl2.c (build_cleanup): Update.
9689 * except.c (build_throw): Update.
9690 * init.c (resolve_offset_ref): Update.
9691 * pt.c (convert_nontype_argument): Update.
9692 * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9693 * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9694 unary_complex_lvalue): Update.
9695 (mark_addressable): Rename.
9696
9697 2002-04-01 Roger Sayle <roger@eyesopen.com>
9698
9699 PR c++/5998:
9700 * decl.c (duplicate_decls): Overwrite the RTL when (and only
9701 when) overwriting a built-in function. Don't use COPY_DECL_RTL,
9702 but follow the SET_DECL_RTL idiom used elsewhere in the function.
9703
9704 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9705
9706 * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9707 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9708 * decl.c (grokdeclarator): Update.
9709 * mangle.c (write_integer_cst): Update.
9710 * typeck.c (build_binary_op): Update.
9711
9712 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9713
9714 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9715 * lex.c (cxx_init): Don't set hook.
9716
9717 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9718
9719 * Make-lang.in (error.o): Update.
9720 * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9721 * cp-tree.h (struct diagnostic_context): Predeclare.
9722 (cxx_print_error_function): New.
9723 * error.c: Include langhooks-def.h.
9724 (lang_print_error_function): Rename. Update.
9725 (init_error): Don't set hook.
9726
9727 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9728
9729 * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9730 Redefine.
9731 * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9732 * decl.c (finish_enum): Similarly.
9733 * error.c (dump_type): Similarly.
9734 * lex.c (cxx_init): Similarly.
9735 * mangle.c (write_builtin_type): Similarly.
9736 * typeck.c (comptypes): Similarly.
9737
9738 2002-03-28 Roger Sayle <roger@eyesopen.com>
9739
9740 PR c++/5998:
9741 * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9742 in the g++ front-end.
9743 (duplicate_decl): Allow redefinition of anticipated built-ins.
9744 Fix inlining problem by over-writing the old DECL_RTL.
9745 (lookup_namespace_name): Fail to find an identifier in the
9746 specified namespace if its still anticipated.
9747 (builtin_function_1): New function split out from builtin_function
9748 to create a builtin in the current namespace with given context.
9749 (builtin_function): Call builtin_function_1 to define the
9750 appropriate builtins in both the std and global namespaces.
9751 (select_decl): Don't test for anticipated decls here.
9752 (unqualified_namespace_lookup): Instead ignore them whilst
9753 searching through scopes and namespaces.
9754 * decl2.c (do_nonmember_using_decl): If a using declaration
9755 specifies an anticipated built-in function, mark it as no longer
9756 anticipated in that scope.
9757 (ambiguous_decl): Avoid resolving to an anticipated decl.
9758 * lex.c (do_scoped_id): Fail to find an identifier in the global
9759 namespace if its still anticipated.
9760
9761 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9762
9763 * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9764 * cp-tree.h (cp_make_lang_type): Rename.
9765 * lex.c (cp_make_lang_type): Rename.
9766 (make_aggr_type): Update.
9767 * tree.c (init_tree): Don't set make_lang_type_fn.
9768
9769 2002-03-29 Jakub Jelinek <jakub@redhat.com>
9770
9771 PR c++/6073
9772 * class.c (finish_struct_1): Update static field's DECL_MODE even
9773 if its type is a variant of t.
9774
9775 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9776
9777 * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9778 * cp-tree.h (cxx_insert_default_attributes): New.
9779 * decl.c (insert_default_attributes): Rename.
9780
9781 2002-03-27 Mark Mitchell <mark@codesourcery.com>
9782
9783 PR c++/4884
9784 * call.c (build_op_delete_call): Allow for the fact the placement
9785 may be a COMPOUND_EXPR.
9786
9787 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9788
9789 * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9790 * cp-tree.h (init_cplus_expand): Remove.
9791 (cxx_expand_expr): New.
9792 * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9793 fix prototype.
9794 (init_cplus_expand): Remove.
9795 * lex.c (cxx_init): Don't call init_cplus_expand.
9796
9797 2002-03-26 Mark Mitchell <mark@codesourcery.com>
9798
9799 PR c++/4884.
9800 * init.c (build_new_1): Allow for the fact the result of
9801 build_function_call may be a COMPOUND_EXPR.
9802
9803 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
9804
9805 PR c++/5682
9806 * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9807 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9808 (dfs_skip_nonprimary_vbases_markedp): Remove.
9809 * search.c (get_shared_vbase_if_not_primary): Remove.
9810 (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9811 (dfs_skip_nonprimary_vbases_markedp): Remove.
9812 (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9813 (dfs_marked_real_bases_queue_p): Likewise.
9814
9815 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9816
9817 * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9818 * cp-tree.h (cxx_mark_tree): New.
9819 * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9820
9821 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9822
9823 * cp-tree.h (cxx_maybe_build_cleanup): New.
9824 * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9825 (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9826 * tree.c (build_target_expr): Update.
9827 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9828
9829 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
9830
9831 * decl2.c (cxx_decode_option): Handle -E.
9832 * lang-specs.h (default_compilers): Preprocess with cc1plus.
9833 * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9834
9835 2002-03-23 Jakub Jelinek <jakub@redhat.com>
9836
9837 PR c++/6037
9838 * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9839
9840 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9841
9842 * error.c (dump_type): Be careful about implicit typenames.
9843
9844 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
9845
9846 PR C++/3656
9847 * semantics.c (finish_base_specifier): Handle erronous base
9848 classes.
9849
9850 2002-03-22 Zack Weinberg <zack@codesourcery.com>
9851
9852 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9853 REAL_IS_NOT_DOUBLE.
9854
9855 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
9856
9857 * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9858 an index into the vtable_entry array regardless of
9859 TARGET_PTRMEMFUNC_VBIT_LOCATION.
9860
9861 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
9862
9863 * tree.c (cp_cannot_inline_tree_fn): Same.
9864
9865 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9866
9867 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9868 insert_block, getdecls, global_bindings_p): New.
9869
9870 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
9871
9872 PR c++/4361
9873 * mangle.c (struct globals) Add internal_mangling_p member.
9874 (write_template_param): Do internal mangling, if needed.
9875 (mangle_conv_op_name_for_type): Request internal mangling.
9876
9877 2002-03-20 Jason Merrill <jason@redhat.com>
9878
9879 PR c++/2136
9880 * init.c (build_delete): Check access for a member op delete here.
9881 * decl2.c (delete_sanity): Not here.
9882
9883 2002-03-19 Jason Merrill <jason@redhat.com>
9884
9885 PR c++/5118
9886 * class.c (get_vfield_name): Use the constructor_name.
9887
9888 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9889
9890 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9891 * cp-tree.h (lang_printable_name): Rename.
9892 * error.c (lang_decl_name): Use new hook.
9893 * lex.c (cxx_init): Remove old hook.
9894 * pt.c (tsubst_decl): Use new hook.
9895 * tree.c (lang_printable_name): Rename.
9896
9897 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
9898
9899 PR c++/3882
9900 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
9901 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
9902 only after recording the declaration.
9903
9904 2002-03-18 Jason Merrill <jason@redhat.com>
9905
9906 PR c++/2039
9907 * init.c (resolve_offset_ref): Hand off to build_component_ref.
9908
9909 PR c++/4222, c++/5995
9910 * call.c (build_over_call): Fix empty class logic.
9911
9912 PR c++/3870
9913 * cp-tree.h (struct saved_scope): Add last_parms field.
9914 * decl.c (maybe_push_to_top_level): Save last_function_parms.
9915 (pop_from_top_level): Restore it.
9916
9917 PR c++/4377
9918 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
9919 NON_LVALUE_EXPRs.
9920
9921 PR c++/4003
9922 * pt.c (tsubst_friend_function): Use decl_namespace_context.
9923
9924 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
9925 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
9926 type with a nontrivial destructor.
9927
9928 2002-03-17 Jason Merrill <jason@redhat.com>
9929
9930 PR c++/4460
9931 * class.c (build_base_path): Virtual base layout is fixed in
9932 in-charge [cd]tors.
9933
9934 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9935
9936 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9937 * parse.y (yyparse): Remove macro.
9938
9939 2002-03-17 Jason Merrill <jason@redhat.com>
9940
9941 PR c++/5757
9942 * init.c (build_new_1): Pass the right pointer to op delete.
9943
9944 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
9945
9946 PR c++/4361
9947 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
9948 conversion operators go.
9949 (struct lang_decl_flags): Add template_conv_p and unused
9950 bitfields.
9951 (DECL_TEMPLATE_CONV_FN_P): New macro.
9952 * call.c (build_user_type_conversion_1): Don't check second type
9953 conversion of overload set first.
9954 * class.c (add_method): Make sure templated conversion operators
9955 all end up on slot 2.
9956 * lex.c (do_identifier): A conversion operator token might be
9957 satisfied by a templated conversion operator.
9958 * pt.c (check_explicit_specialization): Use
9959 CLASSTYPE_FIRST_CONVERSION_SLOT.
9960 (template_parm_this_level_p): New function.
9961 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
9962 * search.c (lookup_fnfields_1): Template conversions will be on
9963 the first slot.
9964 * typeck.c (build_component_ref): Preserve the type of an
9965 conversion operator name on the overload type.
9966 (build_x_function_call): Retrieve the conversion operator name.
9967
9968 2002-03-15 Richard Henderson <rth@redhat.com>
9969
9970 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
9971
9972 2002-03-15 Mark Mitchell <mark@codesourcery.com>
9973
9974 * cp-tree.h (CLEANUP_DECL): Remove.
9975 (CLEANUP_EXPR): Likewise.
9976 * decl.c (destroy_local_var): Simplify.
9977 (maybe_build_cleanup): Tidy.
9978 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
9979 * semantics.c (cp_expand_stmt): Likewise.
9980 * cp/tree.c (cp_statement_code_p): Likewise.
9981
9982 2002-03-15 Jason Merrill <jason@redhat.com>
9983
9984 PR c++/5857
9985 * decl.c (duplicate_decls): Use merge_types instead of common_type.
9986 * typeck.c (common_type): Just hand off to
9987 type_after_usual_arithmetic_conversions and
9988 composite_pointer_type.
9989 (merge_types): New fn.
9990 (commonparms): Use it instead of common_type.
9991 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
9992 (composite_pointer_type): Also handle attributes.
9993 * cp-tree.h: Declare merge_types.
9994
9995 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
9996 variables.
9997 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
9998
9999 2002-03-14 Richard Henderson <rth@redhat.com>
10000
10001 * decl.c: Include c-pragma.h.
10002 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10003 * Make-lang.in: Update dependencies.
10004
10005 2002-03-14 Jakub Jelinek <jakub@redhat.com>
10006
10007 PR c++/5908
10008 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10009 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10010
10011 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10012
10013 * mangle.c (write_builtin_type): Handle 128-bit integers even if
10014 they are not a standard integer type.
10015
10016 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
10017
10018 * cp-tree.h (init_init_processing): Remove declaration.
10019 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10020 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10021
10022 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10023
10024 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10025 Define.
10026 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10027 tree_code_length.
10028 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10029 cplus_tree_code_name): Delete.
10030 (cxx_init): Don't call add_c_tree_codes, instead set
10031 lang_unsafe_for_reeval. Don't try to copy into the various
10032 tree_code arrays.
10033
10034 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
10035
10036 PR c++/5659
10037 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10038 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10039 definitions.
10040
10041 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10042
10043 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
10044 DR209 is now not a defect.
10045 * cp-tree.h (skip_type_access_control): Remove.
10046 * decl.c (grokdeclarator): Do type access control for friend
10047 declarations.
10048 * semantics.c (decl_type_access_control): Don't reset
10049 current_type_lookups.
10050 (save_type_access_control): Always save the lookups.
10051 (skip_type_access_control): Remove.
10052 (finish_class_definition): Don't change type_lookups.
10053
10054 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
10055
10056 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
10057 It is incorrect.
10058 * typeck.c (build_static_cast): Compare non-qualified types
10059 with pointer to member conversions.
10060
10061 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
10062 Daniel Berlin <dan@dberlin.org>
10063
10064 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10065 (cxx_get_alias_set): Use it.
10066
10067 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10068
10069 * cp-tree.h (stabilize_expr): Prototype.
10070
10071 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
10072
10073 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10074 conditional return void.
10075
10076 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
10077
10078 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10079 * cp-tree.h (cxx_unsave): New.
10080 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10081 (init_tree): Update.
10082
10083 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10084
10085 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10086 explicit sizeof/sizeof.
10087 * decl2.c (cxx_decode_option): Likewise.
10088 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10089
10090 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
10091
10092 PR c++/775
10093 * decl.c (lookup_tag): Only reject enum/class mismatch, not
10094 class/union mismatch.
10095 * parse.y (check_class_key): New function.
10096 (structsp): Call it.
10097
10098 2002-03-01 Michael Matz <matz@suse.de>
10099
10100 * typeck.c (cp_pointer_int_sum): Complete inner type which is
10101 used later by size_in_bytes().
10102
10103 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
10104
10105 * cp-tree.h: Require __GNUC__ to be #defined.
10106 (build_init): Add missing prototype.
10107
10108 2002-03-01 Jason Merrill <jason@redhat.com>
10109
10110 * except.c: Don't include decl.h or obstack.h. Do include
10111 tree-inline.h.
10112 (build_throw): Destroy temporaries from the thrown
10113 expression before calling __cxa_throw. Construct a thrown
10114 temporary directly into the exception object.
10115 (stabilize_throw_expr): New function.
10116 (wrap_cleanups_r): New function.
10117 * tree.c (stabilize_expr): New function.
10118 * init.c (build_init): New function.
10119 * Make-lang.in (cp/except.o): Adjust .h deps.
10120
10121 2002-02-28 Jason Merrill <jason@redhat.com>
10122
10123 * search.c (lookup_base_r): Don't clear is_non_public just because
10124 we found a friendly scope.
10125
10126 * decl.c (finish_function): Only warn about missing return
10127 statement with -Wreturn-type.
10128
10129 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
10130
10131 * class.c (build_clone): Update.
10132 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10133 * cp-tree.h (cxx_dup_lang_specific_decl): New.
10134 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10135 (copy_decl): Update.
10136 * method.c (make_thunk): Update.
10137
10138 2002-02-27 Zack Weinberg <zack@codesourcery.com>
10139
10140 * decl2.c: Delete traditional-mode-related code copied from
10141 the C front end but not used, or used only to permit the
10142 compiler to link.
10143
10144 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
10145
10146 PR c++/4093
10147 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10148 to void.
10149
10150 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10151
10152 PR other/5746
10153 * semantics.c (finish_switch_cond): Don't call get_unwidened
10154 if error_mark_node.
10155
10156 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
10157
10158 PR c++/2645, DR 295
10159 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10160 tf_keep_type_decl.
10161 (make_typename_type): Use tsubst_flags_t.
10162 * decl.c (make_typename_type): Adjust. Return non-artificial
10163 TYPE_DECLs, if required.
10164 (grokdeclarator): Simplify CVR qualification handling. Allow bad
10165 qualifiers on typedef types.
10166 * decl2.c (handle_class_head): Adjust make_typename_type call.
10167 * parse.y (nested_name_specifier): Likewise.
10168 (typename_sub0): Likewise.
10169 (typename_sub1): Likewise.
10170 * pt.c (convert_template_argument): Adjust make_typename_type
10171 return value.
10172 (tsubst): Adjust cp_build_qualified_type_real calls.
10173 (check_cv_quals_for_unify): Cope with allowing bad qualifications
10174 on template type parms.
10175 (instantiate_decl): Recheck substitutions to give warnings on bad
10176 qualifications.
10177 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10178
10179 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
10180
10181 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10182
10183 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10184 unless DECL_ALWAYS_INLINE.
10185
10186 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10187
10188 * typeck.c (cp_pointer_int_sum): Renamed from
10189 pointer_int_sum, call pointer_int_sum.
10190
10191 2002-02-20 Jakub Jelinek <jakub@redhat.com>
10192
10193 * decl.c (duplicate_decls): Return 0 if issued error about
10194 redeclaration.
10195
10196 2002-02-19 Jason Merrill <jason@redhat.com>
10197
10198 ABI change: Mangle `void (A::*)() const' as
10199 M1AKFvvE, not MK1AFvvE.
10200 * mangle.c (write_function_type): Write cv-quals for member
10201 function type here.
10202 (write_pointer_to_member_type): Not here.
10203
10204 2002-02-18 Jason Merrill <jason@redhat.com>
10205
10206 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10207 (do_decl_instantiation): Likewise.
10208
10209 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
10210
10211 PR c++/5685
10212 * decl.c (duplicate_decls): Make warning unconditional
10213 if duplicate default argument declarations are present.
10214
10215 2002-02-17 Jakub Jelinek <jakub@redhat.com>
10216
10217 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10218 shortening.
10219
10220 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
10221
10222 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10223 remove incorrect comment. Move #if 0'd code to common path. Use
10224 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10225
10226 2002-02-13 Jason Merrill <jason@redhat.com>
10227
10228 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10229 (finish_function): Don't warn if current_function_returns_null.
10230
10231 * typeck2.c (digest_init): Do handle values of vector type.
10232
10233 * typeck2.c (digest_init, process_init_constructor): Treat vectors
10234 like arrays.
10235
10236 2002-02-11 Jason Merrill <jason@redhat.com>
10237
10238 * parse.y (reserved_declspecs): Don't handle attributes.
10239 (reserved_typespecquals): Handle them here.
10240 * Make-lang.in (parse.c): Adjust expected conflicts.
10241
10242 2002-02-08 Jakub Jelinek <jakub@redhat.com>
10243
10244 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10245 instead of compstmt.
10246 (compstmt_or_stmtexpr): Renamed from compstmt.
10247 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10248
10249 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10250
10251 Rename instantiate_type_flags to tsubst_flags_t & expand use.
10252 * cp-tree.h (instantiate_type_flags): Rename to ...
10253 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10254 add tf_warning flag.
10255 (instantiate_type): Adjust prototype.
10256 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10257 do_type_instantiation, cp_build_qualified_type_real): Likewise.
10258 cp_build_qualified_type: Adjust.
10259 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10260 tf_*.
10261 * call.c (standard_conversion): Rename itf_* to tf_*.
10262 (reference_binding): Likewise.
10263 (convert_like_real): Likewise.
10264 * cvt.c (cp_convert_to_pointer): Likewise.
10265 (convert_to_reference): Likewise.
10266 * decl.c (lookup_namespace_name): Use tf_* flags.
10267 (make_typename_type): Likewise.
10268 (grokdeclarator): Likewise.
10269 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10270 (coerce_template_template_parms, convert_template_argument,
10271 coerce_template_parms, maybe_get_template_decl_from_type_decl,
10272 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10273 instantiate_class_template, tsubst_template_arg_vector,
10274 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10275 tsubst_decl, tsubst_arg_types, tsubst_function_type,
10276 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10277 instantiate_template, fn_type_unification,
10278 resolve_overloaded_unification, verify_class_unification,
10279 unify, get_bindings_real, do_type_instantiation,
10280 regenerate_decl_from_template, instantiate_decl,
10281 tsubst_initializer_list, tsubst_enum,
10282 get_mostly_instantiated_function_type,
10283 invalid_nontype_parm_type_p): Likewise.
10284 * tree.c (cp_build_qualified_type_real): Likewise.
10285 * typeck.c (build_binary_op): Rename itf_* to tf_*.
10286 (build_ptrmemfunc): Likewise.
10287 (convert_for_assignment): Likewise.
10288
10289 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
10290
10291 PR c++/109
10292 * decl.c (grokdeclarator): Allow friend declarations from
10293 dependent types.
10294 * decl2.c (handle_class_head): Don't push into template parm contexts.
10295 * pt.c (push_template_decl_real): Template parm contexts are never
10296 being defined.
10297
10298 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
10299
10300 * class.c: Include target.h.
10301 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10302 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10303 bit-field layout.
10304 * Make-lang.in: Adjust deps.
10305
10306 2002-02-05 Jason Merrill <jason@redhat.com>
10307
10308 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10309
10310 2002-02-04 Jakub Jelinek <jakub@redhat.com>
10311
10312 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10313 (finish_switch_cond): Set SWITCH_TYPE.
10314
10315 2002-02-04 Richard Henderson <rth@redhat.com>
10316
10317 * method.c (use_thunk): Always initialize the block tree. Reindent.
10318 * semantics.c (expand_body): Emit thunks after function, not before.
10319
10320 2002-02-04 Jason Merrill <jason@redhat.com>
10321
10322 * decl.c (start_function): Call cplus_decl_attributes immediately
10323 after grokdeclarator.
10324
10325 * decl.c (start_function): Combine DECL_RESULT handling code.
10326
10327 2002-02-03 Jason Merrill <jason@redhat.com>
10328
10329 * xref.c: Remove.
10330 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10331 (cp/xref.o): Remove dependencies.
10332 * class.c (finish_struct_1, check_methods): Don't call xref fns.
10333 (finish_struct_1): Likewise.
10334 * friend.c (make_friend_class): Likewise.
10335 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10336 * spew.c (read_process_identifier): Likewise.
10337
10338 2002-02-01 Jason Merrill <jason@redhat.com>
10339
10340 PR c++/4872
10341 * decl.c (finish_function): Warn about a non-void function with
10342 no return statement and no abnormal exit.
10343 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10344 (current_function_returns_abnormally): New macro.
10345 * call.c (build_call): Set it.
10346
10347 * typeck.c (build_component_ref): Always complain about offsetof
10348 constructs on non-PODs. Only make it an error for members of
10349 virtual bases.
10350
10351 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10352 (dump_function_decl): Always dump parms.
10353
10354 * decl2.c (finish_static_data_member_decl): Complain about a local
10355 class with a static data member.
10356
10357 PR c++/4286
10358 * search.c (lookup_field_1): Don't xref a static data member
10359 just because we looked it up.
10360
10361 2002-01-31 Jason Merrill <jason@redhat.com>
10362
10363 * Make-lang.in (parse.c): Handle .output file.
10364
10365 PR c++/3395
10366 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10367 not TREE_TYPE.
10368 * semantics.c (finish_class_definition): Adjust.
10369
10370 Allow attributes in parms and casts.
10371 * parse.y (named_parm): Don't strip attrs.
10372 (declmods): Remove 'attributes' production.
10373 (nonempty_cv_qualifiers): Accept attributes.
10374 (ATTRIBUTE): Give precedence.
10375 * decl.c (groktypename): Handle attributes.
10376 (grokparms): Likewise.
10377
10378 2002-01-29 Jakub Jelinek <jakub@redhat.com>
10379
10380 * decl2.c (cxx_decode_option): Pass 0 as last argument to
10381 cpp_handle_option.
10382 * lang-specs.h: Use cpp_unique_options instead of cpp_options
10383 when used together with cc1_options.
10384
10385 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
10386
10387 PR c++/5132
10388 * typeck2.c (digest_init): Make sure non-array core type is
10389 instantiated.
10390 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10391 constructor, rather than build a new one.
10392 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10393 PURPOSE of constructor elts.
10394
10395 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10396
10397 * Make-lang.in (parse.c): Adjust expected number of
10398 shift-reduce conflicts.
10399 (decl.o): Depend on diagnostic.h.
10400 * decl.c: Include diagnostic.h.
10401 (grokdeclarator): Check for null pointer.
10402 (finish_function): Don't abort when
10403 current_binding_level->parm_flag != 1, if errors have
10404 occurred; throw away the statement tree and extra binding
10405 levels, and continue.
10406 * lex.c (note_list_got_semicolon): Check for null pointer.
10407 * method.c (hack_identifier): Just return error_mark_node if
10408 value is error_mark_node.
10409 * parse.y (primary: TYPEID(type_id)): No need to use
10410 TYPE_MAIN_VARIANT here.
10411 (handler_seq): Accept an empty list of catch clauses and
10412 generate a fake handler block to avoid later crashes.
10413 (ansi_raise_identifier): Accept the error token too.
10414 * semantics.c (begin_class_definition,
10415 finish_class_definition): Check for error_mark_node.
10416
10417 2002-01-23 Zack Weinberg <zack@codesourcery.com>
10418
10419 * typeck2.c (friendly_abort): Delete definition.
10420 * cp-tree.h (friendly_abort): Don't prototype.
10421 (my_friendly_assert): Use fancy_abort.
10422
10423 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10424
10425 * cp-tree.h (my_friendly_abort): Remove.
10426
10427 2002-01-23 Jakub Jelinek <jakub@redhat.com>
10428
10429 * spew.c (pending_inlines, pending_inlines_tail,
10430 processing_these_inlines): Make static.
10431 (mark_pending_inlines): Remove static.
10432 (begin_parsing_inclass_inline): If in function, save pi
10433 for GC to cp_function_chain->unparsed_inlines instead.
10434 (process_next_inline): Likewise.
10435 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10436 (mark_pending_inlines): Add prototype.
10437 * decl.c (spew_debug): Remove unused extern.
10438 (mark_lang_function): Call mark_pending_inlines.
10439
10440 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
10441
10442 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10443 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10444 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10445 Change my_fancy_abort() to abort().
10446
10447 2002-01-23 Jason Merrill <jason@redhat.com>
10448
10449 PR c++/5453
10450 * class.c (fixed_type_or_null): Fix thinko.
10451
10452 PR c++/3331
10453 * init.c (resolve_offset_ref): Use build_indirect_ref.
10454
10455 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10456
10457 2002-01-22 Jason Merrill <jason@redhat.com>
10458
10459 * parse.y (function_body): Suppress the block for the outermost
10460 curly braces.
10461 * decl.c (pushdecl): Don't try to skip it.
10462 (begin_function_body): Keep the block we create, not the next one.
10463 * init.c (emit_base_init): Don't mess with keep_next_level.
10464
10465 * class.c (build_base_path): Tweak formatting.
10466
10467 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
10468
10469 Fix regression introduced with patch for c++/775
10470 * parse.y (class_head_defn): Check for template specializations
10471 with a different class-key.
10472
10473 2002-01-17 Jason Merrill <jason@redhat.com>
10474
10475 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10476 (begin_function_body): Call them and keep_next_level.
10477 * init.c (emit_base_init): Call keep_next_level.
10478 * semantics.c (setup_vtbl_ptr): Lose.
10479 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10480 (vtbls_set_up_p): Lose.
10481 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10482 * method.c (do_build_copy_constructor): Likewise.
10483 (synthesize_method): Call finish_mem_initializers.
10484 * parse.y (nodecls): Likewise.
10485
10486 * error.c (dump_type_suffix): Print the exception specs before
10487 recursing.
10488 (dump_function_decl): Here, too.
10489
10490 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10491
10492 2002-01-10 Ira Ruben <ira@apple.com>
10493
10494 PR c++/907
10495 * decl.c (start_method): Handle attrlist.
10496
10497 2002-01-10 Jakub Jelinek <jakub@redhat.com>
10498
10499 * decl2.c (max_tinst_depth): Increase default limit to 500.
10500
10501 2002-01-10 Graham Stott <grahams@redhat.com>
10502
10503 * spew.c (YYCHAR): Uppercase macro parameter and add
10504 parenthesis.
10505 (YYCODE): Likewise.
10506 (NAME): Uppercase macro parameter.
10507
10508 2002-01-09 Graham Stott <grahams@redhat.com>
10509
10510 * decl.h (grokdeclarator): Wrap long line.
10511
10512 * semantics.c (FINISH_COND): Uppercase macro paramaters and
10513 add parenthesis.
10514
10515 2002-01-08 Graham Stott <grahams@redhat.com>
10516
10517 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10518 (PALLOC): Uppercase macro parameter and whitespace.
10519 (SALLOC): Uppercase macro parameter.
10520 (SFREE): Uppercase macros parameter, add parenthese and
10521 whitespace.
10522 (STREQL): Uppercase macro parameter and whitespace.
10523 (STRNEQ): Likewise.
10524 (STRLSS): Likewise.
10525 (STRLEQ): Likewise.
10526 (STRGTR): Likewise.
10527 (STRGEQ): Likewise.
10528
10529 * call.c (convert_like): Add parenthesis and wrap.
10530 (convert_like_with_context): Likewise.
10531 (ICS_RANK): Whitespace.
10532 (NEED_TEMPORARY_P): Remove parenthesis.
10533
10534 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10535 whitespace.
10536 (VTT_MARKED_BINFO_P): Likewise.
10537
10538 * decl.c (BINDING_LEVEL): Add parenthesis.
10539 (DEF_OPERATOR): Likewise.
10540
10541 * mangle.c (MANGLE_TRACE): Add parenthesis.
10542 (MANGLE_TRACE_TREE): Likewise.
10543 (write_signed_number): Likewise.
10544 (write_unsigned_number): Likewise.
10545
10546 * pt.c (ccat): Uppercase macro parameter.
10547 (cat): Likewise
10548
10549 * search.c (SET_BINFO_ACCESS): Add parenthesis.
10550
10551 2002-01-07 Jason Merrill <jason@redhat.com>
10552
10553 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10554 to pedwarn.
10555
10556 PR c++/3536
10557 * method.c (make_thunk): If !flag_weak, give the thunk the
10558 function's linkage.
10559 (use_thunk): Here, too.
10560
10561 2002-01-07 Graham Stott <grahams@redhat.com>
10562
10563 * error.c: Update copyright date.
10564 (print_scope_operator): Add parenthesis.
10565 (print_left_paren): Likewise.
10566 (print_right_paren): Likewise.
10567 (print_left_bracket): Likewise.
10568 (print_right_bracket): Likewise.
10569 (print_template_argument_list_start): Likewise.
10570 (print_template_argument_list_end): Likewise.
10571 (print_non_consecutive_character): Likewise.
10572 (print_tree_identifier): Likewise.
10573 (print_identifier): Likewise.
10574 (NEXT_CODE): Uppercase macro parameter.
10575 (ident_fndecl): Delete unused.
10576 (GLOBAL_THING): Likewise.
10577
10578 2002-01-06 Graham Stott <grahams@redhat.com>
10579
10580 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10581 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10582 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10583 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10584 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10585 (C_IS_RESERVED_WORD): Uppercase macro parameter.
10586 (C_RID_YYCODE) Likewise.
10587 (ptrmem_cst): Use rtx.
10588 (LOCAL_BINDING_P): Add whitespace.
10589 (INHERITED_VALUE_BINDING_P): Likewise.
10590 (BINDING_SCOPE): Wrap long line.
10591 (BINDING_HAS_LEVEL_P): Remove parenthesis.
10592 (BINDING_VALUE): Wrap long line.
10593 (BINDING_TYPE): Whitespace.
10594 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10595 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10596 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10597 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10598 (same_type_p): Uppercase macro parameters.
10599 (same_type_ignoring_top_level_qualifiers_p): Likewise.
10600 (OVL_FUNCTION): Wrap long line.
10601 (OVL_CHAIN): Whitespace.
10602 (OVL_CURRENT): Add parenthesis and whitespace.
10603 (OVL_NEXT): Whitespace.
10604 (OVL_USED): Likewise.
10605 (IDENTIFIER_TYPE_VALUE): Likewise.
10606 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10607 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10608 (LANG_ID_FIELD): Whitespace.
10609 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10610 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10611 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10612 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10613 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10614 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10615 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10616 (IDENTIFIER_VIRTUAL_P): Likewise.
10617 (IDENTIFIER_OPNAME_P): Likewise.
10618 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10619 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10620 (C_SET_EXP_ORIGINAL_CODE): Likewise.
10621 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10622 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10623 (IS_AGGR_TYPE): Uppercase macro parameter.
10624 (CLASS_TYPE_P): Likewise.
10625 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10626 (IS_AGGR_TYPE_2): Whitespace.
10627 (TAGGED_TYPE_P): Uppercase macro parameter.
10628 (TYPE_BUILT_IN): Whitespace.
10629 (TYPE_FOR_JAVA): Likewise.
10630 (FUNCTION_ARG_CHAIN): Remove parenthesis.
10631 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10632 (FUNCTION_FIRST_USER_PARAM): Likewise.
10633 (PROMOTES_TO_AGGR_TYPE): Whitespace.
10634 (DERIVED_FROM_P): Add parenthesis and wrap.
10635 (UNIQUELY_DERIVED_FROM_P): Likewise.
10636 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10637 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10638 (CLASSTYPE_USE_TEMPLATE): Whitespace.
10639 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10640 (TYPE_GETS_DELETE): Add parenthesis.
10641 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10642 (TYPE_HAS_ASSIGN_REF): Likewise,
10643 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10644 (TYPE_HAS_INIT_REF): Likewise.
10645 (TYPE_HAS_CONST_INIT_REF): Likewise.
10646 (TYPE_BEING_DEFINED): Likewise.
10647 (TYPE_LANG_SPECIFIC): Likewise.
10648 (CLASSTYPE_RTTI): Likewise.
10649 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10650 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10651 (TYPE_OVERLOADS_ARROW): Likewise.
10652 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10653 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10654 (CLASSTYPE_METHOD_VEC): Likewise.
10655 (CLASSTYPE_MARKED_N): Likewise.
10656 (CLASSTYPE_MARKED): Likewise.
10657 (CLASSTYPE_MARKED2): Likewise.
10658 (CLASSTYPE_MARKED3): Likewise.
10659 (CLASSTYPE_MARKED4): Likewise.
10660 (CLASSTYPE_MARKED5): Likewise.
10661 (CLASSTYPE_MARKED6): Likewise.
10662 (SET_CLASSTYPE_MARKED): Whitespace.
10663 (CLEAR_CLASSTYPE_MARKED): Likewise.
10664 (SET_CLASSTYPE_MARKED2): Likewise.
10665 (CLEAR_CLASSTYPE_MARKED2): Likewise.
10666 (SET_CLASSTYPE_MARKED3): Likewise.
10667 (CLEAR_CLASSTYPE_MARKED3): Likewise.
10668 (SET_CLASSTYPE_MARKED4): Likewise.
10669 (CLEAR_CLASSTYPE_MARKED4): Likewise.
10670 (SET_CLASSTYPE_MARKED5): Likewise.
10671 (CLEAR_CLASSTYPE_MARKED5): Likewise.
10672 (SET_CLASSTYPE_MARKED6): Likewise.
10673 (CLEAR_CLASSTYPE_MARKED6): Likewise.
10674 (CLASSTYPE_TAGS): Likewise.
10675 (CLASSTYPE_VSIZE): Likewise.
10676 (CLASSTYPE_VBASECLASSES): Likewise.
10677 (CANONICAL_BINFO): Add parenthesis.
10678 (CLASSTYPE_SIZE(NODE): Likewise.
10679 (CLASSTYPE_SIZE_UNIT): Likewise.
10680 (CLASSTYPE_ALIGN(NODE): Likewise.
10681 (CLASSTYPE_USER_ALIGN): Likewise.
10682 (TYPE_JAVA_INTERFACE): Likewise.
10683 (CLASSTYPE_PURE_VIRTUALS): Likewise.
10684 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10685 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10686 (CLASSTYPE_HAS_MUTABLE): Likewise.
10687 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10688 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10689 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10690 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10691 (CLASSTYPE_INTERFACE_ONLY): Likewise.
10692 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10693 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10694 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10695 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10696 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10697 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10698 (BINFO_UNSHARED_MARKED): Whitespace.
10699 (BINFO_MARKED): Whitespace and wrap.
10700 (SET_BINFO_MARKED): Likewise.
10701 (CLEAR_BINFO_MARKED): Likewise.
10702 (BINFO_VTABLE_PATH_MARKED): Likewise.
10703 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10704 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10705 (BINFO_SUBVTT_INDEX): Remove parenthesis.
10706 (BINFO_VPTR_INDEX): Likewise.
10707 (BINFO_PRIMARY_BASE_OF): Likewise,
10708 (CLASSTYPE_VFIELDS): Whitespace.
10709 (VF_DERIVED_VALUE): Wrap long line.
10710 (NAMESPACE_LEVEL): Whitespace.
10711 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10712 (DEFARG_POINTER): Whitespace.
10713 (DECL_NEEDED_P): Remove parenthesis.
10714 (DECL_LANGUAGE): Whitespace.
10715 (SET_DECL_LANGUAGE): Add parenthesis.
10716 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10717 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10718 (DECL_IN_AGGR_P): Whitespace.
10719 (DECL_FRIEND_P): Likewise.
10720 (DECL_BEFRIENDING_CLASSES): Likewise.
10721 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10722 (DECL_NONCONVERTING_P): Whitespace.
10723 (DECL_PURE_VIRTUAL_P): Likewise.
10724 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10725 (DECL_PENDING_INLINE_INFO): Whitespace.
10726 (DECL_SORTED_FIELDS): Likewise.
10727 (DECL_DEFERRED_FN): Likewise.
10728 (DECL_TEMPLATE_INFO): Likewise.
10729 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10730 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10731 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10732 (TMPL_ARGS_LEVEL): Likewise.
10733 (SET_TMPL_ARGS_LEVEL): Likewise.
10734 (INNERMOST_TEMPLATE_PARMS): Whitespace.
10735 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10736 (INTEGRAL_CODE_P(CODE): Add parenthesis.
10737 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10738 (TYPE_HAS_CONSTRUCTOR): Whitespace.
10739 (TREE_HAS_CONSTRUCTOR): Likewise.
10740 (TYPE_HAS_DESTRUCTOR): Likewise.
10741 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10742 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10743 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10744 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10745 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10746 (TYPE_PTRMEMFUNC_P): Likewise.
10747 (TYPE_PTRMEMFUNC_FLAG): Likewise.
10748 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10749 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10750 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10751 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10752 (DECL_ACCESS): Whitespace.
10753 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10754 (DECL_GLOBAL_DTOR_P): Likewise.
10755 (GLOBAL_INIT_PRIORITY): Likewise.
10756 (DECL_TEMPLATE_PARMS): Likewise.
10757 (DECL_TEMPLATE_RESULT): Likewise.
10758 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10759 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10760 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10761 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10762 (PRIMARY_TEMPLATE_P): Add parenthesis.
10763 (DECL_USE_TEMPLATE): Whitespace.
10764 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10765 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10766 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10767 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10768 (CALL_DECLARATOR_PARMS): Remove parenthesis.
10769 (CALL_DECLARATOR_QUALS): Likewise.
10770 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10771 (TEMP_NAME_P): Wrap.
10772 (VFIELD_NAME_P): Likewise.
10773 (B_SET): Uppercase macro parameters and add parenthesis.
10774 (B_CLR): Likewise.
10775 (B_TST): Likewise.
10776 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10777 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10778 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10779 (same_or_base_type_p): Likewise.
10780 (cp_deprecated): Likewise.
10781
10782 2002-01-05 Richard Henderson <rth@redhat.com>
10783
10784 * semantics.c (expand_body): Revert last change.
10785
10786 2002-01-04 Jason Merrill <jason@redhat.com>
10787
10788 PR c++/4122
10789 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10790 lost primary.
10791
10792 * class.c (build_vtbl_initializer): Check for a lost primary
10793 before calculating the vtable entry to throw away.
10794
10795 2002-01-02 Jason Merrill <jason@redhat.com>
10796
10797 * semantics.c (expand_body): Call outlining_inline_function when
10798 emitting an inline function out of line.
10799
10800 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10801
10802 PR c++/5116, c++/764 reversion
10803 * call.c (build_new_op): Revert the instantiations. They are
10804 incorrect.
10805
10806 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10807
10808 PR c++/5089
10809 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10810
10811 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10812
10813 PR c++/3716
10814 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10815 (tsubst, case POINTER_TYPE): Handle pmfs here.
10816 (tsubst, case OFFSET_TYPE): Check it is not an offset to
10817 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10818
10819 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10820
10821 PR c++/35
10822 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10823 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10824 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10825 PARM_DECL.
10826 (tsubst_template_parms): Break up loop statements.
10827 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10828 parm PARM_DECLs don't get promoted.
10829
10830 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10831
10832 PR c++/5123
10833 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10834 (build_x_function_call): Cope with a COMPONENT_REF containing a
10835 TEMPLATE_ID_EXPR.
10836
10837 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10838
10839 PR c++/5213
10840 * pt.c (convert_template_argument): Be more careful determining
10841 when RECORD_TYPE templates are or are not templates.
10842
10843 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10844
10845 PR c++/775
10846 * cp-tree.h (handle_class_head): Adjust prototype.
10847 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10848 parameters. Use for all class heads.
10849 * parse.y (named_class_head_sans_basetype, named_class_head,
10850 named_complex_class_head_sans_basetype,
10851 named_class_head_sans_basetype_defn,
10852 unnamed_class_head): Remove.
10853 (class_head, class_head_apparent_template): Recognize class heads
10854 (class_head_decl, class_head_defn): New reductions. Process class
10855 heads.
10856 (structsp): Adjust class definition and class declaration
10857 reductions.
10858 (maybe_base_class_list): Give diagnostic on empty list.
10859
10860 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10861
10862 PR c++/4379
10863 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10864 single non-static member.
10865 (unary_complex_lvalue): If it cannot be a pointer to member, don't
10866 make it so. Check it is not pointer to reference.
10867
10868 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10869
10870 PR c++/5132
10871 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10872 are processing a template decl.
10873
10874 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
10875
10876 PR c++/5116, c++/764
10877 * call.c (build_new_op): Make sure template class operands are
10878 instantiated. Simplify arglist construction.
10879
10880 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10881
10882 * call.c (build_user_type_conversion_1): Use my_friendly_assert
10883 rather than if ... abort.
10884 * cvt.c (convert_to_reference): Likewise.
10885 * semantics.c (setup_vtbl_ptr): Likewise.
10886 * pt.c (lookup_template_class): Comment typo.
10887
10888 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10889
10890 PR c++/5125
10891 * pt.c (push_template_decl_real): Make sure DECL has
10892 DECL_LANG_SPECIFIC.
10893
10894 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
10895
10896 PR c++/335
10897 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
10898 for non-reference fields.
10899 * typeck.c (require_complete_type): Use resolve_offset_ref).
10900
10901 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
10902
10903 PR c++/196
10904 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
10905
10906 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
10907
10908 PR c++/160
10909 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
10910 up. Don't stabilize_references when initializing a reference.
10911
10912 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10913
10914 * decl2.c (lang_f_options): Const-ify.
10915
10916 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
10917
10918 * config-lang.in (diff_excludes): Remove.
10919
10920 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
10921
10922 PR c++/90
10923 * typeck.c (build_function_call_real): Use original function
10924 expression for errors.
10925
10926 2001-12-18 Jason Merrill <jason@redhat.com>
10927
10928 PR c++/3242
10929 * class.c (add_method): Do compare 'this' quals when trying to match a
10930 used function. Don't defer to another used function.
10931
10932 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
10933
10934 * pt.c (instantiate_clone): Remove, fold into ...
10935 (instantiate_template): ... here. Simplify by removing mutual
10936 recursion.
10937 * typeck2.c (build_m_component_ref): Don't cv qualify the function
10938 pointed to by a pointer to function.
10939 * class.c (delete_duplicate_fields_1): Typo.
10940
10941 2001-12-18 Jason Merrill <jason@redhat.com>
10942
10943 C++ ABI change: destroy value arguments in caller.
10944 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
10945 create an extra binding level for the parameters.
10946 * decl.c (store_parm_decls): Don't do parameter cleanups.
10947
10948 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
10949
10950 * call.c (build_new_method_call): Use '%#V'.
10951 * error.c (cv_to_string): Use V parameter to determine padding.
10952
10953 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
10954
10955 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
10956 spellings in messages.
10957
10958 2001-12-17 Zack Weinberg <zack@codesourcery.com>
10959
10960 * cp-tree.h: Delete #defines for cp_error, cp_warning,
10961 cp_pedwarn, and cp_compiler_error.
10962 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
10963 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
10964 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
10965 typeck2.c: Change calls to the above macros to use their
10966 language-independent equivalents: error, warning, pedwarn, and
10967 internal_error respectively.
10968
10969 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
10970
10971 * decl2.c (finish_file): Remove back_end_hook.
10972
10973 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
10974
10975 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
10976 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
10977 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
10978
10979 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
10980
10981 * lang-options.h: Use American spelling in messages.
10982
10983 2001-12-13 Jason Merrill <jason@redhat.com>
10984
10985 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
10986
10987 Use cleanups to run base and member destructors.
10988 * init.c (push_base_cleanups): New function, split out from...
10989 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
10990 * decl.c (finish_destructor_body): Move vbase destruction code to
10991 push_base_cleanups.
10992 (begin_function_body, finish_function_body): New fns.
10993 (finish_function): Move [cd]tor handling and call_poplevel to
10994 finish_function_body.
10995 (pushdecl): Skip the new level.
10996 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
10997 (setup_vtbl_ptr): Call push_base_cleanups.
10998 * method.c (synthesize_method): Call {begin,end}_function_body.
10999 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11000 * cp-tree.h: Declare new fns.
11001 * parse.y (function_body, .begin_function_body): New nonterminals.
11002 (fndef, pending_inline, function_try_block): Use function_body.
11003 (ctor_initializer_opt, function_try_block): No longer has a value.
11004 (base_init): Remove .set_base_init token.
11005 (.set_base_init, compstmt_or_error): Remove.
11006 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11007
11008 * optimize.c (maybe_clone_body): Fix parameter updating.
11009
11010 2001-12-12 Jason Merrill <jason@redhat.com>
11011
11012 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11013 * semantics.c (genrtl_start_function): Don't pass
11014 parms_have_cleanups or push an extra binding level.
11015 (genrtl_finish_function): Lose cleanup_label cruft.
11016
11017 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11018 (ctor_label): Remove.
11019 * semantics.c (finish_return_stmt): Lose ctor_label support.
11020 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11021 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11022 dtor_label.
11023
11024 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11025 check for [cd]tors.
11026 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11027
11028 * decl.c (finish_function): Check VMS_TARGET, not VMS.
11029
11030 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11031 (end_cleanup_fn): And poplevel.
11032
11033 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11034 if we're in a template.
11035
11036 2001-12-12 Jakub Jelinek <jakub@redhat.com>
11037
11038 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11039 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11040 THIS_NAME_P): Delete.
11041 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11042 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11043 with internal naming scheme.
11044 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11045
11046 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
11047
11048 * decl.c (grokdeclarator): Deprecated implicit typename use.
11049
11050 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
11051
11052 PR g++/51
11053 * parse.y (frob_specs): Indicate it is a language linkage which
11054 contained the extern.
11055 * decl.c (grokdeclarator): Allow extern language linkage with
11056 other specifiers.
11057
11058 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
11059
11060 PR g++/72
11061 * decl.c (add_binding): Don't reject duplicate typedefs involving
11062 template parameters.
11063
11064 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
11065
11066 * parse.y, semantics.c: Similarly.
11067
11068 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
11069
11070 PR g++/87
11071 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11072 (copy_args_p): Rename to ...
11073 (copy_fn_p): ... here.
11074 (grok_special_member_properties): New function.
11075 (grok_op_properties): Lose VIRTUALP parameter.
11076 (copy_assignment_arg_p): Remove.
11077 * call.c (build_over_call): Use copy_fn_p.
11078 * decl.c (grokfndecl): Reformat. Adjust call to
11079 grok_op_properties.
11080 (copy_args_p): Rename to ...
11081 (copy_fn_p): ... here. Reject template functions. Check for pass
11082 by value.
11083 (grok_special_member_properties): Remember special functions.
11084 (grok_ctor_properties): Don't remember them here, just check.
11085 (grok_op_properties): Likewise.
11086 (start_method): Call grok_special_member_properties.
11087 * decl2.c (grokfield): Likewise.
11088 (copy_assignment_arg_p): Remove.
11089 (grok_function_init): Don't remember abstract assignment here.
11090 * pt.c (instantiate_class_template): Call
11091 grok_special_member_properties.
11092 (tsubst_decl): Adjust grok_op_properties call.
11093
11094 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
11095
11096 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11097 RID_TYPES_COMPATIBLE_P.
11098
11099 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
11100
11101 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11102 call to build_aggr_init.
11103 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11104
11105 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
11106
11107 * parse.y: Replace uses of the string non-terminal with STRING.
11108 Don't perform string concatentaion here.
11109 (string): Remove non-terminal.
11110 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11111
11112 2001-12-05 Jason Merrill <jason@redhat.com>
11113
11114 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11115 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11116 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11117 * pt.c (push_tinst_level): No longer static.
11118 * cp-tree.h: Declare them.
11119
11120 * init.c (resolve_offset_ref): Don't check access for the base
11121 conversion to access a FIELD_DECL.
11122
11123 * cp-tree.h (TYPE_REFFN_P): New macro.
11124 * decl.c (bad_specifiers): Check it, too.
11125
11126 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11127 on the __*_type_info type if we haven't seen a definition.
11128
11129 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
11130
11131 * decl.c: Include c-common.h.
11132 (shadow_warning): Move to c-common.c.
11133
11134 2001-12-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11135
11136 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11137
11138 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11139
11140 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11141
11142 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
11143
11144 PR g++/164
11145 * init.c (sort_base_init): Allow binfos to be directly specified.
11146 * method.c (do_build_copy_constructor): Explicitly convert to the
11147 base instance.
11148 (do_build_assign_ref): Likewise.
11149
11150 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
11151
11152 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11153 declaration and initialization.
11154
11155 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
11156
11157 * typeck2.c: Remove leading capital from diagnostic messages, as
11158 per GNU coding standards.
11159
11160 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
11161
11162 PR c++/3394
11163 * decl.c (xref_basetypes): Handle attributes between
11164 'class' and name.
11165
11166 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
11167
11168 PR g++/3381
11169 * parse.y (named_complex_class_head_sans_basetype): Add new
11170 reduction.
11171 * Make-lang.in (parse.c): Adjust expected conflict count.
11172
11173 2001-12-03 Jason Merrill <jason@redhat.com>
11174
11175 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11176 immediate binfos for our virtual bases.
11177
11178 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
11179
11180 * call.c (build_java_interface_fn_ref): Similarly.
11181 * except.c (is_admissible_throw_operand): Similarly.
11182 * init.c (build_java_class_ref): Similarly.
11183 * xref.c (open_xref_file): Similarly.
11184
11185 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
11186
11187 * class.c (finish_struct): Remove trailing periods from messages.
11188 * decl.c (check_tag_decl): Similarly.
11189 * lex.c (cxx_set_yydebug): Similarly.
11190 * typeck2.c (friendly_abort): Similarly.
11191
11192 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11193
11194 PR c++/3048
11195 * cp-tree.h (ovl_member): Remove.
11196 * decl2.c (merge_functions): Handle extern "C" functions
11197 specially.
11198 * tree.c (ovl_member): Remove.
11199
11200 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11201
11202 PR c++/4842
11203 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11204 FUNCTION_DECL, as input.
11205 (mark_overriders): Remove.
11206 (warn_hidden): Rework for the new ABI.
11207
11208 2001-11-29 Mark Mitchell <mark@codesourcery.com>
11209
11210 PR c++/3471
11211 * call.c (convert_like_real): Do not build additional temporaries
11212 for rvalues of class type.
11213
11214 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
11215
11216 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11217 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11218 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11219 (DERIVED_FROM_P): Likewise.
11220 (enum base_access): Renumber, add ba_quiet bit mask.
11221 (get_binfo): Remove.
11222 (get_base_distance): Remove.
11223 (binfo_value): Remove.
11224 (ACCESSIBLY_DERIVED_FROM_P): Remove.
11225 * call.c (standard_conversion): Use lookup_base.
11226 * class.c (strictly_overrides): Likewise.
11227 (layout_virtual_bases): Likewise.
11228 (warn_about_ambiguous_direct_bases): Likewise.
11229 (is_base_of_enclosing_class): Likewise.
11230 (add_vcall_offset_vtbl_entries_1): Likewise.
11231 * cvt.c (build_up_reference): Adjust comment.
11232 * init.c (build_member_call): Reformat.
11233 * search.c (get_binfo): Remove.
11234 (get_base_distance_recursive): Remove.
11235 (get_base_distance): Remove.
11236 (lookup_base_r): Tweak.
11237 (lookup_base): Add ba_quiet control. Complete the types here.
11238 (covariant_return_p): Use lookup_base.
11239 * tree.c (binfo_value): Remove.
11240 (maybe_dummy_object): Use lookup_base.
11241 * typeck.c (build_static_cast): Use lookup_base.
11242 (get_delta_difference): Likewise.
11243 * typeck2.c (binfo_or_else): Use lookup_base.
11244 (build_scoped_ref): Add back error_mark_check.
11245 (build_m_component_ref): Use lookup_base.
11246
11247 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
11248
11249 * Make-lang.in (c++.generated-manpages): New dummy target.
11250
11251 2001-11-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11252
11253 * Make-lang.in (cp-lang.o): Depends on c-common.h.
11254 * cp-lang.c (c-common.h): Include.
11255 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11256 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11257 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11258
11259 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
11260
11261 * decl2.c (c_language): Move to c-common.c.
11262 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11263 functions.
11264 (cxx_init): Update.
11265
11266 2001-11-26 Jason Merrill <jason@redhat.com>
11267
11268 * call.c (joust): Remove COND_EXPR hack.
11269
11270 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
11271
11272 * search.c (lookup_base_r): Declare bk in variable declaration
11273 space.
11274
11275 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
11276
11277 PR g++/3145
11278 * class.c (build_vbase_pointer): Remove.
11279 (build_vbase_path): Remove.
11280 (build_base_path): New function.
11281 * cp-tree.h (base_access, base_kind): New enumerations.
11282 (build_base_path): Declare.
11283 (convert_pointer_to_real): Remove.
11284 (convert_pointer_to): Remove.
11285 (lookup_base): Declare.
11286 (convert_pointer_to_vbase): Remove.
11287 * call.c (build_scoped_method_call): Use lookup_base &
11288 build_base_path instead of convert_pointer_to_real,
11289 get_base_distance & get_binfo.
11290 (build_over_call): Likewise.
11291 * cvt.c (cp_convert_to_pointer): Likewise.
11292 (convert_to_pointer_force): Likewise.
11293 (build_up_reference): Likewise.
11294 (convert_pointer_to_real): Remove.
11295 (convert_pointer_to): Remove.
11296 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11297 instead of convert_pointer_to_vbase & build_vbase_path.
11298 (emit_base_init): Use build_base_path instead of
11299 convert_pointer_to_real.
11300 (expand_virtual_init): Lose unrequired conversions.
11301 (resolve_offset_ref): Use lookup_base and build_base_path
11302 instead of convert_pointer_to.
11303 * rtti.c (build_dynamic_cast_1): Use lookup_base &
11304 build_base_path instead of get_base_distance & build_vbase_path.
11305 * search.c (get_vbase_1): Remove.
11306 (get_vbase): Remove.
11307 (convert_pointer_to_vbase): Remove.
11308 (lookup_base_r): New function.
11309 (lookup_base): New function.
11310 * typeck.c (require_complete_type): Use lookup_base &
11311 build_base_path instead of convert_pointer_to.
11312 (build_component_ref): Likewise.
11313 (build_x_function_call): Likewise.
11314 (get_member_function_from_ptrfunc): Likewise.
11315 (build_component_addr): Likewise.
11316 * typeck2.c (build_scoped_ref): Likewise.
11317
11318 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11319
11320 * cp-tree.h (CP_TYPE_QUALS): Removed.
11321 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11322 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11323 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11324 * dump.c (cp_dump_tree): Use void* dump_info argument to match
11325 lang-hooks prototype.
11326 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11327 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11328 CP_TYPE_QUALS changed to cp_type_quals.
11329 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11330 (CXX_C_OBJS): Remove c-dump.o.
11331
11332 2001-11-21 Mark Mitchell <mark@codesourcery.com>
11333
11334 PR c++/3637
11335 * pt.c (lookup_template_class): Ensure that all specializations
11336 are registered on the list corresponding to the most general
11337 template.
11338
11339 2001-11-20 Mark Mitchell <mark@codesourcery.com>
11340
11341 * call.c (non_reference): Add documentation.
11342 (convert_class_to_reference): Do not strip reference types
11343 from conversion operators.
11344 (maybe_handle_ref_bind): Simplify.
11345 (compare_ics): Correct handling of references.
11346
11347 2001-11-19 John Wilkinson <johnw@research.att.com>
11348
11349 * dump.c (dump_op): New function.
11350 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
11351 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11352 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11353
11354 2001-11-19 Mark Mitchell <mark@codesourcery.com>
11355
11356 PR4629
11357 * semantics.c (finish_sizeof): Make sure that expression created
11358 while processing a template do not have a type.
11359 (finish_alignof): Likewise.
11360 * typeck.c (c_sizeof): Likewise.
11361 (expr_sizeof): Likewise.
11362
11363 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
11364
11365 * lex.c (cxx_finish): Call c_common_finish.
11366 (finish_parse): Remove.
11367
11368 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11369
11370 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11371 when displaying error message about missing array bounds.
11372
11373 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11374
11375 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11376 CONST_CAST_EXPR.
11377 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11378
11379 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
11380
11381 * cp-tree.h (print_class_statistics): Restore.
11382
11383 2001-11-15 Jason Merrill <jason@redhat.com>
11384
11385 * method.c (use_thunk): Don't emit debugging information for thunks.
11386
11387 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11388 * decl.c (make_typename_type): Handle getting a class template.
11389 * search.c (lookup_field_r): A class template is good enough for
11390 want_type.
11391
11392 * call.c (convert_like_real): Only use cp_convert for the bad part.
11393 (standard_conversion): Also allow bad int->enum.
11394 * typeck.c (ptr_reasonably_similar): Also allow functions to
11395 interconvert. Pointers to same-size integers are reasonably
11396 similar.
11397
11398 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11399 give it void type.
11400
11401 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
11402
11403 PR g++/3154
11404 * init.c (sort_base_init): Remove unreachable code.
11405 (expand_member_init): Adjust comment to reflect reality. Simplify
11406 and remove unreachable code.
11407
11408 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
11409
11410 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11411 (cxx_init): Update prototype.
11412 * decl.c (init_decl_processing): Rename. Move null node init
11413 to its creation time.
11414 * lex.c (cxx_init_options): Update.
11415 (cxx_init): Combine with old init_parse; also call
11416 cxx_init_decl_processing.
11417
11418 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
11419
11420 * decl.c (check_initializer): Try to complete the type of an
11421 array element before checking whether it's complete. Don't
11422 complain about arrays with complete element types but an
11423 unknown size.
11424 (cp_finish_decl): Build the hierarchical constructor before
11425 calling maybe_deduce_size_from_array_init.
11426
11427 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
11428
11429 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11430
11431 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
11432
11433 PR g++/4206
11434 * parse.y (already_scoped_stmt): Remove.
11435 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11436
11437 2001-11-12 H.J. Lu <hjl@gnu.org>
11438
11439 * cvt.c (ocp_convert): Don't warn the address of a weak
11440 function is always `true'.
11441
11442 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11443
11444 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11445 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11446 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11447 * cp-tree.h (print_class_statistics): Remove.
11448 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11449 cxx_print_identifier, cxx_set_yydebug): New.
11450 * lex.c (set_yydebug): Rename c_set_yydebug.
11451 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11452 lang_print_xnode): Rename.
11453 * tree.c (print_lang_statistics): Rename.
11454
11455 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11456
11457 * class.c (dump_array): Fix format specifier warning.
11458
11459 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
11460
11461 * cp-lang.c (LANG_HOOKS_NAME): Override.
11462 (struct lang_hooks): Constify.
11463 * lex.c (cxx_init_options): Update.
11464 (lang_identify): Remove.
11465 * parse.y (language_string): Remove.
11466
11467 2001-11-08 Andreas Franck <afranck@gmx.de>
11468
11469 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11470 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11471 suggested by autoconf.
11472 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11473 (c++.install-common): Use the transformed target alias names.
11474
11475 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
11476
11477 * Make-lang.in: Update.
11478 * cp-lang.c: Include langhooks-def.h.
11479
11480 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11481
11482 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11483
11484 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11485
11486 * lex.c (copy_lang_type): Add static prototype.
11487
11488 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11489
11490 * pt.c (unify): Handle SCOPE_REF.
11491
11492 2001-11-01 Jakub Jelinek <jakub@redhat.com>
11493
11494 * tree.c (cp_copy_res_decl_for_inlining): Adjust
11495 DECL_ABSTRACT_ORIGIN for the return variable.
11496
11497 2001-10-31 Zack Weinberg <zack@codesourcery.com>
11498
11499 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11500
11501 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
11502
11503 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11504 semantics.c, spew.c: Fix spelling errors.
11505
11506 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11507
11508 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11509
11510 2001-10-25 Zack Weinberg <zack@codesourcery.com>
11511
11512 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11513 pop_everything.
11514
11515 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11516
11517 * cp-lang.c (cxx_get_alias_set): New function.
11518 Point LANG_HOOKS_GET_ALIAS_SET to it.
11519
11520 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11521
11522 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11523 * cp-tree.h (make_unbound_class_template): Prototype new function.
11524 * decl.c (make_unbound_class_template): New function.
11525 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11526 * error.c (dump_type): Likewise.
11527 * mangle.c (write_type): Likewise.
11528 * parse.y (template_parm): Likewise.
11529 (template_argument): Use make_unbound_class_template.
11530 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11531 (tsubst): Likewise.
11532 (tsubst_copy): Likewise.
11533 (unify): Likewise.
11534 * tree.c (walk_tree): Likewise.
11535 * typeck.c (comptypes): Likewise.
11536
11537 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11538
11539 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11540 extra calls into fewer ones.
11541
11542 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
11543
11544 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11545 Warn when merging inline with attribute noinline.
11546 (start_decl, start_function): Warn if inline and attribute
11547 noinline appear in the same declaration.
11548
11549 2001-10-16 H.J. Lu <hjl@gnu.org>
11550
11551 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11552 for tree checking disabled.
11553
11554 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
11555
11556 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11557 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11558
11559 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11560
11561 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11562 (unify): Only handle MINUS_EXPR specially if the above flag is set
11563 and the subtracted constant is 1. Clear the flag on recursive calls.
11564 Set it when unifying the maximum value in an INTEGER_TYPE's range.
11565
11566 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
11567
11568 * decl.c (bad_specifiers): Don't allow exception specifications
11569 on any typedefs.
11570
11571 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
11572
11573 * cp/lex.c (init_cp_pragma): Similarly.
11574
11575 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11576
11577 * pt.c (lookup_template_class): Build complete template arguments
11578 for BOUND_TEMPLATE_TEMPLATE_PARM.
11579
11580 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11581
11582 * cp-tree.h (TYPE_BINFO): Update comment.
11583 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11584 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11585 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11586 (copy_type): Prototype new function.
11587 * lex.c (copy_lang_decl): Gather tree node statistics.
11588 (copy_lang_type): New function.
11589 (copy_type): Likewise.
11590 (cp_make_lang_type): Create lang_type for
11591 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
11592 and BOUND_TEMPLATE_TEMPLATE_PARM.
11593 * pt.c (tsubst): Use copy_type instead of copy_node.
11594 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11595
11596 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11597
11598 * pt.c (determine_specialization): Ignore functions without
11599 DECL_TEMPLATE_INFO.
11600
11601 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
11602
11603 PR g++/4476
11604 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11605
11606 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
11607
11608 * typeck2.c (store_init_value): Don't re-digest a bracketed
11609 initializer.
11610
11611 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11612 ANON_AGGR_TYPE_P.
11613
11614 2001-10-11 Richard Henderson <rth@redhat.com>
11615
11616 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11617 of an asm statement.
11618 (build_vtbl_ref_1): Split out from build_vtbl_ref.
11619 (build_vfn_ref): Use it to handle vtable descriptors before
11620 calling build_vtable_entry_ref.
11621 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11622
11623 2001-10-10 Richard Henderson <rth@redhat.com>
11624
11625 * parse.y (asm_operand): Allow named operands.
11626 * semantics.c (finish_asm_stmt): Tweek for changed location
11627 of the operand constraint.
11628
11629 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
11630
11631 * call.c (standard_conversion): Add bad conversion between
11632 integers and pointers.
11633 (convert_like_real): Don't use convert_for_initialization for bad
11634 conversions; complain here and use cp_convert.
11635 (build_over_call): Don't handle bad conversions specially.
11636 (perform_implicit_conversion): Allow bad conversions.
11637 (can_convert_arg_bad): New fn.
11638 * cp-tree.h: Declare it.
11639 * typeck.c (convert_for_assignment): Use it.
11640 (ptr_reasonably_similar): Any target type is similar to void.
11641
11642 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
11643
11644 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11645 (cp/cp-lang.o): New rule.
11646 * cp-tree.h: Declare hooks.
11647 * tree.c: Make hooks non-static.
11648 (init_tree): Don't initialize hooks here.
11649 * lex.c: Likewise. Move definition of lang_hooks to...
11650 * cp-lang.c: ... new file.
11651
11652 2001-10-08 Richard Henderson <rth@redhat.com>
11653
11654 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11655 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11656
11657 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11658
11659 * class.c (build_vtable_entry_ref): Const-ify.
11660 * decl.c (predefined_identifier,
11661 initialize_predefined_identifiers): Likewise.
11662 * init.c (build_new_1): Likewise.
11663 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11664 Likewise.
11665
11666 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
11667
11668 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11669 (INSNS_PER_STMT): Likewise.
11670 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11671 (copy_body, initialize_inlined_parameters): Likewise.
11672 (declare_return_variable, inlinable_function_p): Likewise.
11673 (expand_call_inline, expand_calls_inline): Likewise.
11674 (optimize_inline_calls, clone_body): Likewise.
11675 * tree.c (walk_tree): Moved to ../tree-inline.c.
11676 (walk_tree_without_duplicates): Likewise.
11677 (copy_tree_r, remap_save_expr): Likewise.
11678
11679 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
11680
11681 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11682 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11683 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11684 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11685 (flag_inline_trees): Moved declaration to ../tree-inline.h.
11686 (walk_tree): Moved declaration to ../tree-inline.h.
11687 (walk_tree_without_duplicates, copy_tree_r): Likewise.
11688 (remap_save_expr): Likewise.
11689 * decl.c: Include tree-inline.h.
11690 (lang_mark_tree): Don't mark inlined_fns.
11691 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11692 * optimize.c: Include tree-inline.h.
11693 (optimize_inline_calls): Move declaration to ../tree.h, as
11694 non-static.
11695 (remap_decl): Use language-independent constructs and hooks.
11696 (remap_block, copy_body_r, declare_return_variable): Likewise.
11697 (inlinable_function_p): Likewise. Don't test for
11698 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11699 no longer language-specific.
11700 (optimize_inline_calls): Likewise. Make it non-static. Moved
11701 call of dump_function to...
11702 (optimize_function): Here...
11703 (clone_body): New function, extracted from...
11704 (maybe_clone_body): ... here. Build decl_map locally and pass
11705 it on to clone_body.
11706 * pt.c, semantics.c: Include tree-inline.h.
11707 * tree.c: Likewise.
11708 (cp_walk_subtrees): New language-specific hook for tree inlining.
11709 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11710 cp_is_overload_p, cp_auto_var_in_fn_p,
11711 cp_copy_res_decl_for_inlining): Likewise.
11712 (walk_tree): Move language-specific constructs into...
11713 (cp_walk_subtrees): this new function.
11714 (copy_tree_r): Use language-independent constructs and hooks.
11715 (init_tree): Initialize tree inlining hooks.
11716 (remap_save_expr): Adjust prototype so that the declaration
11717 does not require the definition of splay_tree.
11718
11719 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
11720
11721 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11722 to build the declaration instead of the declaration itself.
11723
11724 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
11725
11726 * decl2.c (cxx_decode_option): Add 'else'.
11727
11728 * spew.c (end_input): No longer static.
11729 * cp-tree.h: Declare it.
11730 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11731
11732 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11733
11734 * call.c (build_over_call), typeck.c (build_function_call_real):
11735 Pass type attributes to check_function_format rather than name or
11736 assembler name. Don't require there to be a name or assembler
11737 name to check formats.
11738
11739 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
11740
11741 * decl.c (init_decl_processing): Don't call
11742 init_function_format_info. Initialize lang_attribute_table
11743 earlier.
11744 (builtin_function): Call decl_attributes.
11745 (insert_default_attributes): New.
11746
11747 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
11748
11749 * decl.c (grokdeclarator): Copy array typedef handling from C
11750 frontend.
11751
11752 * decl.c (grokdeclarator): Copy too-large array handling from C
11753 frontend.
11754
11755 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
11756
11757 * config-lang.in (target_libs): Added target-gperf, so that we
11758 don't try to build it if C++ is disabled.
11759
11760 2001-09-23 Zack Weinberg <zack@codesourcery.com>
11761
11762 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11763 (cp/errfn.o): Delete rule.
11764 (cp/error.o): Depend on flags.h.
11765 * errfn.c: Delete file.
11766 * cp-tree.h: Declare warn_deprecated. Remove definitions of
11767 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11768 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11769 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11770 internal_error respectively. Make cp_deprecated into a macro.
11771 Don't define cp_printer typedef or declare cp_printers.
11772 * error.c: Include flags.h.
11773 Delete: struct tree_formatting_info, print_function_argument_list,
11774 print_declaration, print_expression, print_function_declaration,
11775 print_function_parameter, print_type_id, print_cv_qualifier_seq,
11776 print_type_specifier_seq, print_simple_type_specifier,
11777 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11778 print_parameter_declaration_clause, print_exception_specification,
11779 print_nested_name_specifier, and definition of cp_printers.
11780 (locate_error): New function.
11781 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11782 rewritten in terms of locate_error and diagnostic.c.
11783 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11784 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
11785 (init_error): Adjust to match.
11786
11787 2001-09-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11788
11789 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11790
11791 2001-09-21 Richard Henderson <rth@redhat.com>
11792
11793 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11794 (build_vtbl_initializer): Likewise.
11795 (build_vfn_ref): New.
11796 * cp-tree.h: Declare it.
11797 * call.c (build_over_call): Use it.
11798 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11799 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11800
11801 2001-09-21 J"orn Rennecke <amylaar@redhat.com>
11802
11803 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11804
11805 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
11806
11807 Table-driven attributes.
11808 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11809 * decl2.c (cplus_decl_attributes): Only take one attributes
11810 parameter.
11811 * cp-tree.c (cplus_decl_attributes): Update prototype.
11812 * class.c (finish_struct), decl.c (start_decl, start_function),
11813 decl2.c (grokfield), friend.c (do_friend), parse.y
11814 (parse_bitfield): Update calls to cplus_decl_attributes.
11815 * decl.c (grokdeclarator): Take a pointer to a single ordinary
11816 attribute list.
11817 * decl.h (grokdeclarator): Update prototype.
11818 * decl2.c (grokfield): Take a single ordinary attribute list.
11819 * friend.c (do_friend): Likewise.
11820 * decl.c (shadow_tag, groktypename, start_decl,
11821 start_handler_parms, grokdeclarator, grokparms, start_function,
11822 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11823 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11824 (process_template_parm, do_decl_instantiation): Pass single
11825 ordinary attribute lists around.
11826 * decl.c (grokdeclarator): Correct handling of nested attributes.
11827 Revert the patch
11828 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
11829 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11830 not the left.
11831 .
11832 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11833 (cp_attribute_table): Declare.
11834 * decl.c (valid_lang_attribute): Don't define.
11835 (lang_attribute_table): Define.
11836 (init_decl_processing): Initialize lang_attribute_table instead of
11837 valid_lang_attribute.
11838 * tree.c (cp_valid_lang_attribute): Remove.
11839 (handle_java_interface_attribute, handle_com_interface_attribute,
11840 handle_init_priority_attribute): New functions.
11841 (cp_attribute_table): New array.
11842 * decl2.c (import_export_class): Don't use
11843 targetm.valid_type_attribute.
11844
11845 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11846
11847 * Make-lang.in (cp/error.o): Depend on real.h
11848 * error.c: #include "real.h"
11849
11850 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11851
11852 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11853 xmalloc/strcpy/strcat.
11854
11855 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11856
11857 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11858 Const-ification.
11859 * pt.c (tsubst_decl): Likewise.
11860
11861 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11862
11863 * decl2.c (lang_f_options): Const-ification.
11864 * lex.c (cplus_tree_code_name): Likewise.
11865 * spew.c (yyerror): Likewise.
11866
11867 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11868
11869 PR c++/3986
11870 * class.c (force_canonical_binfo_r): Check & move an indirect
11871 primary base first.
11872 (force_canonical_binfo): Check that it's not already
11873 canonical.
11874 (mark_primary_virtual_base): Remove BINFO parameter.
11875 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11876
11877 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
11878
11879 Remove TYPE_NONCOPIED_PARTS.
11880 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11881 CLASSTYPE_PURE_VIRTUALS.
11882 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11883 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
11884 (layout_class_type): Don't call fixup_inline_methods here ...
11885 (finish_struct_1): ... call it here.
11886
11887 2001-09-04 Mark Mitchell <mark@codesourcery.com>
11888
11889 * decl.c (duplicate_decls): Remove code deadling with
11890 DECL_SAVED_INSNS.
11891 * decl2.c (finish_file): Likewise.
11892 * pt.c (instantiate_decl): Likewise.
11893 * semantics.c (expand_body): Don't defer local functions if
11894 they wouldn't be deferred for some other reason. Don't
11895 generate RTL for functions that will not be emitted.
11896 (genrtl_start_function): Remove code deadling with
11897 DECL_SAVED_INSNS.
11898 (genrtl_finish_function): Likewise.
11899
11900 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
11901
11902 PR c++/4203
11903 * call.c (build_over_call): Do not optimize any empty base
11904 construction.
11905
11906 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11907
11908 * error.c (dump_template_decl): Output template parameters
11909 together with their specifiers.
11910 Output `class' prefix for template template parameter.
11911 (dump_decl): Fix formatting.
11912
11913 2001-08-30 Kurt Garloff <garloff@suse.de>
11914
11915 * optimize.c (inlinable_function_p): Allow only smaller single
11916 functions. Halve inline limit after reaching recursive limit.
11917
11918 2001-08-30 Joern Rennecke <amylaar@redhat.com>
11919 Jason Merrill <jason_merrill@redhat.com>
11920
11921 * class.c (build_vtable_entry_ref): Subtract in char*, not
11922 ptrdiff_t.
11923
11924 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
11925
11926 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
11927 (build_cplus_array_type): Use cp_build_qualified_type, not
11928 TYPE_MAIN_VARIANT, to get an unqualified version.
11929
11930 * decl2.c (grok_alignof): Lose.
11931 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
11932 * typeck.c (c_alignof): Lose.
11933 * semantics.c (finish_sizeof, finish_alignof): New.
11934 * parse.y: Use them.
11935 * cp-tree.h: Declare them.
11936
11937 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
11938
11939 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
11940 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
11941 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
11942
11943 2001-08-19 Jakub Jelinek <jakub@redhat.com>
11944
11945 * typeck2.c (add_exception_specifier): Only require complete type if
11946 not in processing template declaration.
11947
11948 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11949
11950 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
11951 GNU_xref_start_scope and GNU_xref_end_scope.
11952
11953 * tree.c (TYPE_HASH): Moved to ../tree.h.
11954
11955 2001-08-16 Mark Mitchell <mark@codesourcery.com>
11956
11957 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
11958 on COMPOUND_EXPRs.
11959
11960 2001-08-14 Richard Henderson <rth@redhat.com>
11961
11962 * class.c, cp-tree.h (build_vfn_ref): Remove.
11963 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
11964
11965 2001-08-13 Mark Mitchell <mark@codesourcery.com>
11966
11967 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
11968 empty class assignment as having side-effects to avoid
11969 spurious warnings.
11970
11971 2001-08-13 Zack Weinberg <zackw@panix.com>
11972
11973 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
11974 * except.c: Include libfuncs.h.
11975
11976 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
11977
11978 * decl.c (grokdeclarator): Clarify diagnostic message.
11979
11980 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11981
11982 * decl2.c (do_nonmember_using_decl): Replace using directive
11983 with using declaration in the error message.
11984
11985 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
11986
11987 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
11988 criterion to avoid rebuilding expression tree instead of
11989 processing_template_decl.
11990
11991 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
11992
11993 Support named return value optimization for inlines, too.
11994 * decl.c (finish_function): Nullify returns here.
11995 * semantics.c (genrtl_start_function): Not here.
11996 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
11997 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
11998 Also nullify the CLEANUP_STMT for the nrv.
11999 * cp-tree.h: Declare it.
12000 * optimize.c (declare_return_variable): Replace the nrv with the
12001 return variable.
12002 * typeck.c (check_return_expr): Be more flexible on alignment check.
12003 Ignore cv-quals when checking for a matching type.
12004
12005 2001-08-09 Richard Henderson <rth@redhat.com>
12006
12007 * decl2.c (finish_objects): Use target hooks instead of
12008 assemble_constructor and assemble_destructor.
12009
12010 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
12011
12012 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12013
12014 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
12015
12016 PR c++/3820
12017 Stop using TYPE_NONCOPIED_PARTS.
12018 * call.c (build_over_call): Be careful when copy constructing
12019 or assigning to an empty class.
12020 * class.c (check_bases_and_members): It has a
12021 COMPLEX_ASSIGN_REF if it has a vptr.
12022 (layout_class_type): Don't add empty class padding to
12023 TYPE_NONCOPIED_PARTS.
12024 (finish_struct_1): Don't add the VFIELD either.
12025 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12026 initialization.
12027
12028 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
12029
12030 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12031
12032 2001-08-06 Richard Henderson <rth@redhat.com>
12033
12034 * decl2.c (finish_objects): Pass a symbol_ref and priority to
12035 assemble_{constructor,destructor}. Remove priority handling.
12036
12037 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12038
12039 Don't allow template-id in using-declaration.
12040 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12041 (do_class_using_decl): Likewise.
12042
12043 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12044
12045 * cp/spew.c (read_token): No need to pop buffers.
12046
12047 2001-08-02 Stan Shebs <shebs@apple.com>
12048
12049 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12050 (fnaddr_from_vtable_entry): Remove decl.
12051 * method.c (use_thunk): Update comment.
12052
12053 2001-08-01 Andrew Cagney <ac131313@redhat.com>
12054
12055 * repo.c (get_base_filename): Change return value to const char
12056 pointer.
12057
12058 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
12059
12060 Kill -fhonor-std.
12061 * NEWS: Document.
12062 * cp-tree.h (flag_honor_std): Remove.
12063 (CPTI_FAKE_STD): Remove.
12064 (std_node): Remove comment about it being NULL.
12065 (fake_std_node): Remove.
12066 * decl.c (in_fake_std): Remove.
12067 (walk_namespaces_r): Remove fake_std_node check.
12068 (push_namespace): Remove in_fake_std code.
12069 (pop_namespace): Likewise.
12070 (lookup_name_real): Remove fake_std_node check.
12071 (init_decl_processing): Always create std_node. Always add
12072 std:: things there.
12073 (builtin_function): Always put non '_' fns in std.
12074 * decl2.c (flag_honor_std): Remove.
12075 (lang_f_options): Remove honor-std.
12076 (unsupported_options): Add honor-std.
12077 (set_decl_namespace): Remove fake_std_node check.
12078 (validate_nonmember_using_decl): Likewise.
12079 (do_using_directive): Likewise.
12080 (handle_class_head): Likewise.
12081 * dump.c (cp_dump_tree): Likewise.
12082 * except.c (init_exception_processing): Adjust.
12083 * init.c (build_member_call): Remove fake_std_node check.
12084 (build_offset_ref): Likewise.
12085 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12086 * rtti.c (init_rtti_processing): Adjust.
12087
12088 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
12089
12090 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12091 operand while calling cp_tree_equal.
12092
12093 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12094
12095 The 3.0 ABI no longer has vbase pointer fields.
12096 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12097 FORMAT_VBASE_NAME): Remove.
12098 * method.c (do_build_copy_constructor): Adjust.
12099 (do_build_assign_ref): Adjust.
12100 * search.c (lookup_field_r): Adjust.
12101 * typeck.c (build_component_ref): Adjust.
12102
12103 The 3.0 ABI always has a vtable pointer at the start of every
12104 polymorphic class.
12105 * rtti.c (build_headof_sub): Remove.
12106 (build_headof): Adjust.
12107 (get_tinfo_decl_dynamic): No need to check flag_rtti
12108 here. Adjust.
12109 (create_real_tinfo_var): Explain why we need a hidden name.
12110
12111 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12112
12113 PR c++/3631
12114 * class.c (update_vtable_entry_for_fn): The fixed adjustment
12115 of a virtual thunk should be from declaring base.
12116
12117 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
12118
12119 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12120 the shared virtual base, so preserving inheritance graph order.
12121
12122 2001-07-30 Andreas Jaeger <aj@suse.de>
12123
12124 * decl2.c: Remove unused var global_temp_name_counter.
12125
12126 2001-07-28 Richard Henderson <rth@redhat.com>
12127
12128 * method.c (pending_inlines): Remove.
12129
12130 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12131
12132 * class.c (mark_primary_virtual_base): Don't adjust base
12133 offsets here.
12134 (dfs_unshared_virtual_bases): Adjust them here.
12135 (mark_primary_bases): Explain why we adjust at the end.
12136
12137 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
12138
12139 * class.c (finish_struct_1): When copying the primary base's
12140 VFIELD, make sure we find it is at offset zero.
12141
12142 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12143
12144 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12145 tsubst_expr for default template arguments.
12146
12147 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12148
12149 PR c++/3621
12150 * spew.c (yylex): Only copy the token's lineno, if it is
12151 nonzero.
12152
12153 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12154
12155 PR c++/3624
12156 * call.c (resolve_args): Simplify, call
12157 convert_from_reference.
12158 (build_new_op): Resolve and convert from reference ARG1
12159 earlier. Adjust ARG2 & ARG3 resolve and conversion.
12160
12161 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
12162
12163 * decl.c (last_function_parm_tags): Remove.
12164 (current_function_parm_tags): Remove.
12165 (init_decl_processing): Adjust.
12166 (start_function): Adjust.
12167 (store_parm_decls): Adjust.
12168
12169 PR c++/3152
12170 * decl.c (grokdeclarator): Detect when a function typedef is
12171 declaring a function, and create last_function_parms correctly.
12172
12173 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
12174
12175 * call.c (joust): Only prefer a non-builtin candidate to a builtin
12176 one if they have the same signature.
12177
12178 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
12179 it rather than toplevel_bindings_p. Give it a mangled name if static.
12180 (convert_to_reference): Adjust.
12181 * decl2.c (get_temp_name): Lose.
12182 * mangle.c (mangle_ref_init_variable): New fn.
12183 (mangle_guard_variable): Strip the ref-init header.
12184 * cp-tree.h: Adjust.
12185 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12186 initializer.
12187 (grok_reference_init): Always use DECL_INITIAL.
12188
12189 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12190
12191 PR c++/3416
12192 * call.c (build_conditional_expr): Recheck args after
12193 conversions.
12194 * cp-tree.h (build_conditional_expr): Move to correct file.
12195 * typeck.c (decay_conversion): Diagnose any unknown types
12196 reaching here.
12197 (build_binary_op): Don't do initial decay or default
12198 conversions on overloaded functions.
12199 (build_static_cast): Don't do a decay conversion here.
12200
12201 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12202
12203 PR c++/3543
12204 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12205 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12206
12207 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12208
12209 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12210 (create_vtbl_ptr): ... here.
12211
12212 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
12213
12214 * class.c (build_vbase_offset_vbtl_entries): Look for
12215 non-primary base of which we are a sub vtable.
12216
12217 2001-07-24 Phil Edwards <pme@sources.redhat.com>
12218
12219 * semantics.c (finish_this_expr): Remove unused code.
12220
12221 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
12222
12223 Simplify rtti, now we've only one ABI.
12224 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12225 CPTI_TINFO_VAR_ID.
12226 (tinfo_decl_id, tinfo_var_id): Remove.
12227 (get_typeid_1): Remove.
12228 * rtti.c
12229 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12230 (typeid_ok_p): New function.
12231 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12232 (get_tinfo_decl): Remove old abi documentation.
12233 (tinfo_from_decl): Remove.
12234 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12235 (get_typeid_1): Remove.
12236 (get_base_offset): Remove.
12237 (synthesize_tinfo_var): Absorb get_base_offset.
12238 (create_real_tinfo_var): Don't use tinfo_decl_id.
12239
12240 2001-07-23 Graham Stott <grahams@redhat.com>
12241
12242 * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12243 variable has_two_argument_delete_p.
12244
12245 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
12246
12247 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12248 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12249 (CPTI_INDEX_IDENTIFIER): Remove.
12250 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12251 (delta2_identifier): Remove.
12252 (index_identifier): Remove.
12253 (pfn_or_delta2_identifier): Remove.
12254 (flag_vtable_thunks): Remove.
12255 (VTABLE_DELTA2_NAME): Remove.
12256 (VTABLE_INDEX_NAME): Remove.
12257 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12258 (vfunc_ptr_type_node): Adjust.
12259 (VTABLE_NAME_PREFIX): Adjust.
12260 (build_vfn_ref): Lose first parameter.
12261 (fixup_all_virtual_upcast_offsets): Remove.
12262 * decl.c (initialize_predefined_identifiers): Remove
12263 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12264 (init_decl_processing): Remove no-vtable-thunk code.
12265 * decl2.c (flag_vtable_thunks): Remove.
12266 (mark_vtable_entries): Remove no-vtable-thunk code.
12267 * error.c (dump_decl): Remove no-vtable-thunk code.
12268 (dump_expr): Adjust ptr to member function code.
12269 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12270 code.
12271 * rtti.c (build_headof): Remove no-vtable-thunk code.
12272 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12273 * search.c (get_base_distance): Remove expand_upcast_fixups case.
12274 (virtual_context) Remove.
12275 (expand_upcast_fixups): Remove.
12276 (fixup_virtual_upcast_offsets): Remove.
12277 (fixup_all_virtual_upcast_offsets): Remove.
12278 * typeck.c (get_member_function_from_ptrfunc): Remove
12279 no-vtable-thunk code.
12280 * call.c (build_over_call): Adjust call to build_vfn_ref.
12281 * class.c (build_vfn_ref): Lose first parameter. Remove
12282 no-vtable-thunk code.
12283 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12284 (build_vtable_entry): Remove no-vtable-thunk code.
12285
12286 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
12287
12288 Remove old-abi remnants. Remove comments about old abi
12289 behavior. Remove references to 'new-abi' in comments.
12290 * cp-tree.h: Adjust comments.
12291 (vbase_offsets_in_vtable_p): Delete.
12292 (vcall_offsets_in_vtable_p): Delete.
12293 (vptrs_present_everywhere_p): Delete.
12294 (all_overridden_vfuns_in_vtables_p): Delete.
12295 (merge_primary_and_secondary_vtables_p): Delete.
12296 (TYPE_CONTAINS_VPTR_P): Adjust.
12297 (VTT_NAME_PREFIX): Remove.
12298 (CTOR_VTBL_NAME_PREFIX): Remove.
12299 (init_vbase_pointers): Remove.
12300 * class.c: Adjust coments.
12301 (build_vbase_pointer_fields): Delete.
12302 (build_vbase_pointer): Remove old-abi code.
12303 (build_secondary_vtable): Likewise.
12304 (modify_all_vtables): Likewise.
12305 (create_vtable_ptr): Likewise.
12306 (layout_class_type): Likewise.
12307 (finish_struct_1): Likewise.
12308 (finish_vtbls): Likewise.
12309 (dfs_finish_vtbls): Delete.
12310 (build_vbase_offset_vtbl_entries): Remove old-abi code.
12311 * cvt.c: Adjust comments.
12312 * decl.c: Adjust comments.
12313 * decl2.c: Adjust comments.
12314 * init.c: Adjust comments.
12315 (construct_virtual_bases): Remove old-abi code.
12316 * lang-specs.h: Remove -fno-new-abi.
12317 * mangle.c: Adjust comments.
12318 * rtti.c: Adjust comments.
12319 (get_base_offset): Remove old-abi-code.
12320 * search.c: Adjust comments.
12321 (dfs_init_vbase_pointers): Remove.
12322 (dfs_vtable_path_unmark): Remove.
12323 (init_vbase_pointers): Remove.
12324 * semantics.c: Adjust comments.
12325 (emit_associated_thunks): Remove old-abi code.
12326 * typeck.c: Adjust comments.
12327
12328 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
12329
12330 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12331 params.h.
12332
12333 2001-07-19 Mark Mitchell <mark@codesourcery.com>
12334
12335 * class.c (finish_struct_anon): Forbid nested classes.
12336
12337 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12338
12339 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12340 * optimize.c: Include debug.h.
12341 (maybe_clone_body): Use debug hook.
12342 * semantics.c: Include debug.h.
12343 (expand_body): Use debug hook.
12344
12345 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
12346
12347 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12348
12349 2001-07-18 Mark Mitchell <mark@codesourcery.com>
12350
12351 * class.c (type_requires_array_cookie): New function.
12352 (check_methods): Don't try to figure out whether the type needs a
12353 cookie here.
12354 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12355 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12356 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12357 * pt.c (instantiate_class_template): Don't set
12358 TYPE_VEC_DELETE_TAKES_SIZE.
12359 * NEWS: Document ABI changes from GCC 3.0.
12360
12361 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
12362 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12363
12364 * NEWS (Changes in GCC 3.0): Fix typo.
12365
12366 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
12367
12368 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12369 which attributes are to be attached, and a flags argument. Update
12370 call to decl_attributes.
12371 (grokfield): Update call to decl_attributes.
12372 * class.c (finish_struct): Update call to cplus_decl_attributes.
12373 * cp-tree.h (cplus_decl_attributes): Update prototype.
12374 * decl.c (start_decl, grokdeclarator, start_function): Update
12375 calls to decl_attributes and cplus_decl_attributes.
12376 * friend.c (do_friend): Update call to cplus_decl_attributes.
12377 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12378
12379 2001-07-12 Mark Mitchell <mark@codesourcery.com>
12380
12381 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12382 for `register' variables with an asm-specification.
12383
12384 2001-07-11 Mark Mitchell <mark@codesourcery.com>
12385
12386 * semantics.c (finish_asm_stmt): Mark the output operands
12387 to an asm addressable, if necessary.
12388
12389 2001-07-11 Ben Elliston <bje@redhat.com>
12390
12391 * Revert this change -- there is a subtle bug.
12392
12393 PR c++/80
12394 * decl.c (finish_enum): New "attributes" argument; pass it to
12395 cplus_decl_attributes. Use a narrower type if the enum is packed.
12396 * cp-tree.h (finish_enum): Adjust prototype.
12397 * parse.y (enum_head): New non-terminal.
12398 (structsp): Use it. Enums now may be preceded or followed by
12399 optional attributes -- pass their chained tree to finish_enum().
12400 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12401
12402 2001-07-10 Mark Mitchell <mark@codesourcery.com>
12403
12404 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12405 variables.
12406
12407 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
12408
12409 * semantics.c (cp_expand_stmt): Fix for null
12410 current_function_return_value.
12411
12412 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
12413
12414 * call.c (build_op_delete_call): Initialize fn.
12415 (convert_like_real): Delete conditional.
12416 (joust): Initialize *w and *l.
12417 * class.c: Add prototype for binfo_ctor_vtable.
12418 (get_primary_binfo): Initialize result.
12419 * init.c (build_java_class_ref): Initialize name.
12420
12421 2001-07-09 Erik Rozendaal <dlr@acm.org>
12422
12423 * typeck.c (unary_complex_lvalue): Do not duplicate the
12424 argument to modify, pre-, or post-increment when used as an
12425 lvalue and when the argument has side-effects.
12426
12427 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12428
12429 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12430 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
12431 cplus_decl_attributes even if attrs is NULL.
12432 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12433
12434 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
12435
12436 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12437 calls to decl_attributes.
12438
12439 2001-07-06 Ira Ruben <ira@apple.com>
12440
12441 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12442 be DECL_TEMPLATE_RESULT.
12443
12444 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12445
12446 * cp-tree.h (copy_template_template_parm): Rename to ...
12447 (bind_template_template_parm): ... here.
12448 * tree.c (copy_template_template_parm): Rename to ...
12449 (bind_template_template_parm): ... here. Remove the case when
12450 NEWARGS is NULL_TREE.
12451 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12452 BOUND_TEMPLATE_TEMPLATE_PARM.
12453 * pt.c (lookup_template_class): Adjust.
12454
12455 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
12456
12457 * cvt.c (convert_lvalue): New fn.
12458 * cp-tree.h: Declare it.
12459 * method.c (do_build_assign_ref): Use it.
12460 (do_build_copy_constructor): Convert parm to base types
12461 before calling base constructors.
12462
12463 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12464 DECL_USER_ALIGN. Check flag_elide_constructors instead of
12465 optimize.
12466 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12467
12468 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
12469
12470 * optimize.c (optimize_inline_calls): New function, broken out
12471 of ...
12472 (optimize_function): ... here. Call it. Don't inline if it is
12473 a thunk.
12474 (dump_function): Print name of dump flag causing this dump.
12475 * semantics.c (expand_body): Move thunk inline check to
12476 optimize_function.
12477
12478 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
12479
12480 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12481 (comptypes): Use target.comp_type_attributes.
12482
12483 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
12484
12485 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12486
12487 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
12488
12489 * error.c (lang_print_error_function): Add a `diagnostic_context *'
12490 parameter. Tweak.
12491
12492 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12493
12494 * decl2.c (import_export_class): Update.
12495
12496 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12497
12498 * error.c (init_error): Adjust settings.
12499
12500 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
12501
12502 * error.c (init_error): Adjust settings.
12503
12504 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
12505
12506 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12507 return pointers to data members by reference rather than by value.
12508
12509 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
12510
12511 Implement the Named Return Value optimization.
12512 * cp-tree.h (struct cp_language_function): Add x_return_value.
12513 (current_function_return_value): Now a macro.
12514 * decl.c: Don't define it.
12515 (define_label, finish_case_label): Don't clear it.
12516 (init_decl_processing): Don't register it with GC.
12517 * semantics.c (genrtl_finish_function): Don't check it for
12518 no_return_label. Copy the RTL from the return value to
12519 current_function_return_value and walk, calling...
12520 (nullify_returns_r): ...this new fn.
12521 * typeck.c (check_return_expr): Set current_function_return_value.
12522
12523 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
12524
12525 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12526 sharing a ctor vtable with. Merge code for cases 1 and 2.
12527 (binfo_ctor_vtable): New fn.
12528 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12529
12530 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
12531
12532 * class.c (dfs_find_final_overrider): Fix logic.
12533
12534 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12535 virtual thunk instead of non-virtual.
12536 (get_matching_virtual): Uncomment.
12537
12538 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12539 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
12540 PARM, not ARG.
12541
12542 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
12543
12544 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12545 we've not emerged from the hierarchy of RTTI_BINFO on reaching
12546 a non-virtual base.
12547
12548 2001-06-13 Mark Mitchell <mark@codesourcery.com>
12549
12550 * NEWS: Update release number.
12551
12552 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12553
12554 PR c++/3130, c++/3131, c++/3132
12555 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12556 * class.c (force_canonical_binfo_r): Move
12557 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12558 virtual bases unless they're primary and what they're primary
12559 too has been moved.
12560 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12561 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12562 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12563 derived binfo.
12564 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12565 (layout_nonempty_base_or_field): Add most derived type
12566 parameter. Adjust.
12567 (layout_empty_base): Likewise.
12568 (build_base_field): Likewise.
12569 (build_base_fields): Likewise.
12570 (propagate_binfo_offsets): Add most derived type
12571 parameter. Skip non canonical virtual bases too.
12572 (dfs_set_offset_for_unshared_vbases): Don't skip primary
12573 bases. Do skip canonical bases.
12574 (layout_virtual_bases): Adjust.
12575 (layout_class_type): Adjust.
12576 (dfs_get_primary_binfo): Build list of virtual primary base
12577 candidates.
12578 (get_primary_binfo): Check that the shared virtual primary
12579 base candidate was found first.
12580 (accumulate_vtbl_inits): Don't do anything for non-vptr
12581 containing binfos. For case 1 primary virtual bases, keep
12582 checking that we've not emerged from the hierarchy of RTTI_BINFO.
12583
12584 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
12585
12586 PR c++/3089
12587 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12588 hierarchy looking for primary bases for a ctor
12589 vtable. Recursively call oneself, if we meet our primary via
12590 this route and haven't met it yet via inheritance graph order.
12591
12592 2001-06-11 Mark Mitchell <mark@codesourcery.com>
12593
12594 * lang-options.h: Emit documentation for -fno-honor-std, not
12595 -fhonor-std.
12596
12597 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
12598
12599 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12600 Don't clobber delta.
12601 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12602
12603 2001-06-10 Mark Mitchell <mark@codesourcery.com>
12604 Gabriel Dos Reis <gdr@codesourcery.com>
12605
12606 * Make-lang.in (cp/call.o): Depend on diagnostic.h
12607 (cp/typeck.o): Depend on diagnostic.h
12608 (cp/typeck2.o): Depend on diagnostic.h
12609 (cp/repo.o): Depend on dignostic.h
12610 * typeck.c: #include diagnostic.h
12611 (convert_for_initialization): Remove extern declaration for
12612 warningcount and errorcount.
12613
12614 * call.c: #include diagnostic.h
12615 (convert_like_real): Remove extern declaration for warnincount and
12616 errorcount.
12617
12618 * repo.c: #include diagnostic.h
12619 * typeck2.c: #include diagnostic.h
12620
12621 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12622
12623 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12624 in previous change.
12625
12626 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12627
12628 PR c++/2929
12629 * friend.c (do_friend): Use push_decl_namespace for classes at
12630 namespace scope.
12631
12632 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
12633 Jason Merrill <jason_merrill@redhat.com>
12634
12635 PR c++/3061
12636 * class.c (build_secondary_vtable): Use assert, rather than an error
12637 message.
12638 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12639 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12640 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12641 Don't set BINFO_VTABLE for a primary virtual base.
12642
12643 2001-06-07 Mark Mitchell <mark@codesourcery.com>
12644
12645 * decl.c (duplicate_decls): Update source position information
12646 when a template function is defined.
12647
12648 2001-06-07 Phil Edwards <pme@sources.redhat.com>
12649
12650 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
12651
12652 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
12653
12654 PR c++/2914
12655 * decl.c (pushtag): Don't push into a complete type's scope.
12656
12657 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
12658
12659 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12660 (struct lang_decl_flags): Lose generate_with_vtable_p.
12661 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12662 * class.c (copy_virtuals): Adjust.
12663 * decl2.c (mark_vtable_entries): Adjust.
12664 * method.c (make_thunk, build_vtable_entry): Adjust.
12665 * class.c (update_vtable_entry_for_fn): Only look as far as the
12666 first defining class.
12667 (build_vtbl_initializer): Put nothing in the slot for a function only
12668 defined in a lost primary virtual base.
12669 (add_vcall_offset_vtbl_entries_1): Use the same code for
12670 the lost primary case and the normal case.
12671 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12672 (get_vfield_offset, get_derived_offset): Lose.
12673 (dfs_find_final_overrider): Use look_for_overrides_here.
12674 (get_matching_virtual): New fn.
12675 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12676 not BV_VCALL_INDEX.
12677 * search.c (look_for_overrides_here): Split out from...
12678 (look_for_overrides_r): Here.
12679
12680 * class.c (find_final_overrider): Return error_mark_node on error.
12681
12682 * decl2.c (key_method): #if 0 accidental change.
12683
12684 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
12685
12686 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12687 (build_over_call): Likewise.
12688 * decl.c (grokparms): Likewise.
12689 * pt.c (tsubst_decl): Likewise.
12690 * typeck.c (convert_arguments): Likewise.
12691
12692 2001-06-05 Mark Mitchell <mark@codesourcery.com>
12693
12694 * semantics.c (begin_class_definition): Robustify.
12695
12696 * pt.c (instantiate_decl): Tell the repository code about the
12697 clones, not the cloned functions.
12698 * repo.c (repo_template_used): Explicitly instantiate the cloned
12699 function, not the clones.
12700
12701 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12702
12703 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12704 ICS_BAD_FLAG on created conversion.
12705 (compare_ics): Break out rank.
12706
12707 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12708
12709 * decl.c (xref_tag): Remove extraneous %s on dependent name
12710 lookup warning.
12711
12712 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12713
12714 * class.c (layout_vtable_decl): Fix off by one error on
12715 build_index_type.
12716 (build_vtt): Likewise.
12717 (build_ctor_vtbl_group): Likewise.
12718
12719 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
12720
12721 * class.c (maybe_indent_hierarchy): New function.
12722 (dump_class_hierarchy_r): Add flags. Dump extra binfo
12723 information, if enabled. Use maybe_indent_hierarchy. Adjust
12724 output format.
12725 (dump_class_hierarchy): Adjust prototype. Adjust output format.
12726 (dump_array, dump_vtable, dump_vtt): New functions.
12727 (finish_struct_1): Adjust hierarchy dumping.
12728 (initialize_vtable): Call dump_vtable.
12729 (build_vtt): Call dump_vtt.
12730 (build_ctor_vtbl_group): Call dump_vtable.
12731 * decl2.c (flag_dump_class_layout): Remove.
12732 (cxx_decode_option): Remove dump translation unit
12733 and dump class hierarchy check. Call dump_switch_p.
12734 (finish_file): Adjust dumping.
12735 (dump.c): Only dump base classes if not TDF_SLIM.
12736 Only dump namespace members if not TDF_SLIM.
12737 * optimize.c (dump_function): New function.
12738 (optimize_function): Call dump_function.
12739 * semantics.c (expand_body): Use dump_enabled_p.
12740
12741 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
12742
12743 PR g++/2936
12744 Part missed from first commit
12745 * decl2.c (finish_anon_union): Copy context.
12746
12747 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
12748
12749 PR g++/2936
12750 * optimize.c (remap_decl): Remap anonymous aggregate members too.
12751
12752 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
12753
12754 PR g++/2823
12755 * semantics.c (expand_body): Don't optimize thunks.
12756
12757 2001-05-25 Sam TH <sam@uchicago.edu>
12758
12759 * cp-tree.h lex.h: Fix header include guards.
12760
12761 2001-05-25 Mark Mitchell <mark@codesourcery.com>
12762
12763 * decl.c (init_decl_processing): Tweak.
12764
12765 2001-05-24 Mark Mitchell <mark@codesourcery.com>
12766
12767 * decl.c (duplicate_decls): Tidy.
12768 (init_decl_processing): Always set flag_no_builtin.
12769
12770 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
12771
12772 PR c++/2184
12773 * decl2.c (do_local_using_decl): Push the decls, even in a
12774 template.
12775
12776 2001-05-22 Mark Mitchell <mark@codesourcery.com>
12777
12778 * optimize.c (initialize_inlined_parameters): Don't set
12779 TREE_READONLY for a VAR_DECL taking the place of an inlined
12780 PARM_DECL.
12781
12782 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
12783
12784 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12785 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12786 attribute.
12787
12788 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
12789
12790 * parse.y: Refer to compound literals as such, not as
12791 constructor-expressions.
12792
12793 2001-05-21 Mark Mitchell <mark@codesourcery.com>
12794
12795 * call.c (build_op_delete_call): Ignore exception-specifications
12796 when looking for matching delete operators.
12797 * init.c (build_new_1): Compute whether or not the allocation
12798 function used is a placement allocation function or not, and
12799 communicate this information to build_op_delete_call.
12800
12801 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
12802
12803 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
12804 (build_vtbl_ref): Adjust.
12805 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12806 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12807 Re-add vtable-gc.
12808 (unsupported_options): Correspondingly.
12809
12810 * decl2.c (maybe_make_one_only): Check flag_weak, not
12811 supports_one_only().
12812
12813 * cp-tree.def (START_CATCH_STMT): Lose.
12814 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
12815 * tree.c (cp_statement_code_p): Don't case it.
12816 * semantics.c (cp_expand_stmt): Likewise.
12817 * cp-tree.h (START_CATCH_TYPE): Lose.
12818 (HANDLER_TYPE): New.
12819 * except.c (expand_start_catch_block): Don't start any blocks.
12820 Return the type.
12821 (expand_end_catch_block): Don't end any blocks.
12822 * parse.y (handler): Don't pass anything from finish_handler_parms
12823 to finish_handler.
12824 * pt.c (tsubst_expr): Likewise.
12825 * semantics.c (begin_handler): Call note_level_for_catch here.
12826 (finish_handler_parms): Don't return anything.
12827 (genrtl_catch_block, begin_catch_block): Lose.
12828 (genrtl_handler): Call expand_start_catch here.
12829
12830 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
12831
12832 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12833 (get_vtable_decl, build_vtt): Not here.
12834
12835 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
12836
12837 PR c++/2781
12838 * optimize.c (update_cloned_parm): Copy addressability and other
12839 flags.
12840
12841 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
12842
12843 * pt.c (determine_specialization): Ignore artificial functions.
12844
12845 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
12846
12847 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12848 (C_RID_CODE): Remove.
12849 * lex.c (cxx_init_options): Call set_identifier_size. Update.
12850 (init_parse): Don't do it here.
12851
12852 2001-05-18 Diego Novillo <dnovillo@redhat.com>
12853
12854 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12855 function declaration to avoid stripping the symbol's attributes.
12856
12857 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
12858
12859 * decl.c (pushdecl): Adjust error string.
12860 (xref_tag): Adjust friend class injection warning. Remove the
12861 inherited name from the class shadowed scope.
12862
12863 2001-05-17 Mark Mitchell <mark@codesourcery.com>
12864
12865 * except.c (cp_protect_cleanup_actions): New function.
12866 (init_exception_processing): Don't set protect_cleanup_actions
12867 here. Do set lang_protect_cleanup_actions.
12868
12869 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12870
12871 * spew.c (read_token): Call yyerror on all unexpected tokens.
12872
12873 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
12874
12875 * init.c (member_init_ok_or_else): Take a tree rather than
12876 string for name.
12877 (expand_member_init): Adjust.
12878
12879 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
12880
12881 * decl.c (duplicate_decls): Suppress warning about duplicate
12882 decls if the first decl is a friend.
12883
12884 2001-05-12 Zack Weinberg <zackw@stanford.edu>
12885
12886 * except.c (choose_personality_routine): Export. Add
12887 explanatory comment. Take an enum languages, not a boolean.
12888 (initialize_handler_parm): Adjust to match.
12889 * cp-tree.h: Prototype choose_personality_routine.
12890 * lex.c (handle_pragma_java_exceptions): New function.
12891 (init_cp_pragma): Register #pragma GCC java_exceptions.
12892
12893 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
12894
12895 * method.c (build_mangled_C99_name): Remove unused prototype.
12896
12897 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
12898
12899 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
12900 * typeck.c (get_member_function_from_ptrfunc,
12901 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
12902 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
12903
12904 Reverted Geoff Keating's 2001-05-03's patch.
12905
12906 2001-05-11 Ira Ruben <ira@apple.com>
12907
12908 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
12909
12910 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
12911
12912 * cp-tree.h (finish_label_expr, lookup_label): Delete.
12913 * parse.y: Update for '&&'; don't issue warning here.
12914 * semantics.c (finish_label_expr): Delete.
12915
12916 2001-05-07 Mark Mitchell <mark@codesourcery.com>
12917
12918 * splay-tree.h (splay_tree_max): New function.
12919 (splay_tree_min): Likewise.
12920
12921 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
12922
12923 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
12924 (pfn_vflag_identifier): Define.
12925 Update comment about layout of pointer functions.
12926 (build_ptrmemfunc1): Update prototype.
12927 (expand_ptrmemfunc_cst): Update prototype.
12928 * decl.c (initialize_predefined_identifiers): Initialize
12929 pfn_vflag_identifier.
12930 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
12931 an extra field to the type.
12932 * expr.c (cplus_expand_constant): Pass 'flag' between
12933 expand_ptrmemfunc_cst and build_ptrmemfunc1.
12934 * typeck.c (get_member_function_from_ptrfunc): When
12935 FUNCTION_BOUNDARY < 16, look at additional field to determine
12936 if a pointer-to-member is a real pointer or a vtable offset.
12937 (build_ptrmemfunc1): Add new parameter to contain extra field.
12938 (build_ptrmemfunc): Pass the extra field around.
12939 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
12940 (pfn_from_ptrmemfunc): Ignore the extra field.
12941
12942 2001-05-03 Mark Mitchell <mark@codesourcery.com>
12943
12944 * cp-tree.h (flag_inline_trees): Update documentation.
12945 * decl.c (init_decl_processing): Adjust handling of
12946 flag_inline_functions and flag_inline_trees to support -O3.
12947 (grokfndecl): Set DECL_INLINE on all functions if that's what
12948 the user requested.
12949 (save_function_data): Clear DECL_INLINE in
12950 current_function_cannot_inline is non-NULL.
12951 * decl2.c (flag_inline_trees): Update documentation.
12952
12953 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
12954
12955 * dump.c (cp_dump_tree, USING_STMT case): New case.
12956 * tree.c (cp_statement_code_p): Add USING_STMT.
12957 * decl2.c (do_using_directive): Add the using directive statement.
12958
12959 * tree.c (walk_tree): Reformat an if block.
12960
12961 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12962
12963 * decl.c (compute_array_index_type): Don't try to do anything with
12964 the indices when processing a template.
12965
12966 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12967
12968 * call.c: NULL_PTR -> NULL.
12969 * class.c: Likewise.
12970 * cvt.c: Likewise.
12971 * decl.c: Likewise.
12972 * decl2.c: Likewise.
12973 * except.c: Likewise.
12974 * init.c: Likewise.
12975 * rtti.c: Likewise.
12976 * search.c: Likewise.
12977 * tree.c: Likewise.
12978 * typeck.c: Likewise.
12979 * typeck2.c: Likewise.
12980
12981 2001-05-02 Mark Mitchell <mark@codesourcery.com>
12982
12983 * decl2.c (do_using_directive): Revert previous patch.
12984
12985 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12986
12987 * cp-tree.def (USING_STMT): New statement node.
12988 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
12989 * decl2.c (do_using_directive): Add USING_STMT to statement
12990 tree. Don't emit errors when processing template decl.
12991 * pt.c (tsubst_expr, USING_STMT case): New case.
12992 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
12993
12994 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
12995
12996 * call.c (build_new_op): Convert args from reference here.
12997 (build_conditional_expr): Don't convert here.
12998
12999 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
13000
13001 * spew.c (last_token_id): New static variable.
13002 (read_token): Set it here.
13003 (yyerror): Use it here.
13004
13005 2001-04-30 Richard Henderson <rth@redhat.com>
13006
13007 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13008 * decl.c: Likewise.
13009
13010 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13011
13012 * gxxint.texi: Remove.
13013 * Make-lang.in: Remove all traces of gxxint.texi.
13014
13015 2001-04-30 Mark P Mitchell <mark@codesourcery.com>
13016
13017 * decl2.c (start_static_initialization_or_destruction): Correct
13018 logic to handle the -fno-use-cxa-atexit case.
13019
13020 2001-04-30 Mark Mitchell <mark@codesourcery.com>
13021
13022 * optimize.c (update_cloned_parm): New function.
13023 (maybe_clone_body): Use it. Update the `this' parameter too.
13024
13025 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
13026
13027 * decl2.c (unsupported_options): Add new-abi.
13028 * lang-options.h: Remove no longer supported options.
13029
13030 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13031
13032 * except.c (can_convert_eh): Don't check template parms,
13033 typename types etc.
13034
13035 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13036
13037 * optimize.c (maybe_clone_body): Copy parameter names and locations.
13038
13039 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
13040
13041 * cp-tree.h (adjust_clone_args): Prototype new function.
13042 * class.c (adjust_clone_args): New function.
13043 * decl.c (start_function): Call it for in charge ctors.
13044
13045 2001-04-26 Mark Mitchell <mark@codesourcery.com>
13046
13047 * method.c (use_thunk): Make sure that thunks really are emitted
13048 when requested.
13049
13050 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
13051
13052 * mangle.c (write_chars): New macro.
13053 (hwint_to_ascii): New function
13054 (write_number): Use it.
13055 (write_integer_cst): Deal with really big numbers.
13056
13057 2001-04-25 Mark Mitchell <mark@codesourcery.com>
13058
13059 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13060 the clone.
13061
13062 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
13063
13064 * decl.c (grokdeclarator): Set context of namespace scope
13065 TYPE_DECLS.
13066
13067 2001-04-24 Zack Weinberg <zackw@stanford.edu>
13068
13069 * cp/optimize.c: Include hashtab.h.
13070 (struct inline_data): Add tree_pruner.
13071 (expand_call_inline, expand_calls_inline): Use it when calling
13072 walk_tree.
13073 (optimize_function): Initialize and free tree_pruner.
13074
13075 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13076
13077 Lazy __FUNCTION__ generation.
13078 * cp-tree.def (FUNCTION_NAME): Remove.
13079 * cp-tree.h (function_name_declared_p): Remove.
13080 (cp_fname_init): Prototype.
13081 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13082 don't call declare_function_name. Call start_fname_decls.
13083 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13084 clobber the line number.
13085 (cp_fname_init): New function.
13086 (start_function): Call start_fname_decls.
13087 (finish_function): Call finish_fname_decls.
13088 * lex.c (reswords): Add slots for __FUNCTION__ et al.
13089 (rid_to_yy): Add mappings for __FUNCTION__ et al.
13090 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13091 * parse.y (VAR_FUNC_NAME): New token.
13092 (primary): Add VAR_FUNC_NAME.
13093 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13094 generation.
13095 (tsubst, FUNCTION_NAME case): Remove.
13096 (tsubst_copy, FUNCTION_NAME case): Remove.
13097 (tsubst_expr, DECL_STMT case): Be careful with a
13098 DECL_PRETTY_FUNCTION_P.
13099 (instantiate_decl): Remove function_name_declared_p.
13100 * semantics.c (begin_compound_statement): Don't call
13101 declare_function_name here.
13102 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13103 (finish_translation_unit): Call finish_fname_decls.
13104 (expand_body): Remove function_name_declared_p.
13105 * typeck2.c (digest_init): Allow any ERROR_MARK.
13106
13107 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
13108
13109 * pt.c (tsubst_decl): Use VOID_TYPE_P.
13110 * semantics.c: Fix some typos.
13111
13112 2001-04-23 Phil Edwards <pme@sources.redhat.com>
13113
13114 * cp/decl2.c (flag_honor_std): Always initialize to 1.
13115
13116 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13117
13118 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13119
13120 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
13121
13122 * except.c (build_throw): Wrap the initialization of the exception
13123 object in a MUST_NOT_THROW_EXPR.
13124 (do_free_exception): #if 0.
13125
13126 2001-04-20 Mark Mitchell <mark@codesourcery.com>
13127
13128 * cp-tree.h (finish_enum): Change prototype.
13129 * decl.c (finish_enum): Reorganize.
13130 * parse.y (structsp): Adjust calls to finish_enum.
13131
13132 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13133
13134 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13135 't' case.
13136
13137 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
13138
13139 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13140 (layout_empty_base): Return at end flag.
13141 (build_base_field): Likewise.
13142 (build_base_fields): Likewise.
13143 (layout_virtual_bases): Don't add 1 to eoc value.
13144 (end_of_class): Use full size for empty bases.
13145 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13146 empty bases. Don't add 1 to eoc value. Only add trailing padding
13147 if we're an empty class with no empty bases.
13148 (dump_class_hierarchy): Dump size and alignment.
13149
13150 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13151
13152 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13153 ICS_BAD_FLAG.
13154
13155 2001-04-20 Jakub Jelinek <jakub@redhat.com>
13156
13157 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13158 is found, look first if name does not match the structure name.
13159
13160 2001-04-19 Mark Mitchell <mark@codesourcery.com>
13161
13162 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13163 set.
13164 (SET_DECL_LANGUAGE): New macro.
13165 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13166 (pushdecl): Likewise.
13167 (build_library_fn_1): Likewise.
13168 (build_cp_library_fn): Likewise.
13169 (grokfndecl): Likewise.
13170 (grokvardecl): Mark `extern "C"' variables as having C linkage.
13171 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13172 * lex.c (retrofit_lang_decl): Likewise.
13173 * mangle.c (mangle_decl_string): Don't mangle the names of
13174 variables declared with C language linkage.
13175 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13176
13177 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
13178
13179 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13180 flag_access_control from uninitialized storage.
13181
13182 2001-04-15 Mark Mitchell <mark@codesourcery.com>
13183
13184 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13185 * mangle.c (write_pointer_to_member_type): Fix mangling of
13186 pointers to cv-qualified member function types.
13187
13188 * init.c (build_delete): Create a SAVE_EXPR for the address if
13189 we're going to use it more than once.
13190
13191 2001-04-13 Mark Mitchell <mark@codesourcery.com>
13192
13193 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13194 (expand_ptremfunc_cst): Change prototype.
13195 (delta2_from_ptrmemfunc): Remove.
13196 * expr.c (cplus_expand_constant): Adjust call to
13197 expand_ptrmemfunc_cst.
13198 * typeck.c (build_ptrmemfunc1): Simplify.
13199 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13200 results in a constant.
13201 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13202 (delta2_from_ptrmemfunc): Remove.
13203 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13204
13205 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
13206
13207 * cp-tree.h (decl_namespace_list): New macro.
13208 (struct saved_scope): Add decl_ns_list.
13209 * decl.c (mark_saved_scope): Mark it.
13210 * decl2.c: Lose static decl_namespace_list.
13211 (init_decl2): Don't save it.
13212
13213 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13214
13215 * cp-tree.h (warn_return_type, yylex): Delete redundant
13216 declarations.
13217
13218 * decl.c (current_class_depth, global_namespace): Likewise.
13219
13220 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13221
13222 * repo.c (flag_use_repository): Likewise.
13223
13224 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13225
13226 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13227 set_block, pushdecl, getdecls, gettags, init_decl_processing,
13228 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13229 lvalue_or_else, print_lang_statistics, comp_target_types,
13230 unsigned_type, signed_type, signed_or_unsigned_type,
13231 build_function_call, mark_addressable, incomplete_type_error):
13232 Delete redundant declarations.
13233
13234 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
13235
13236 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13237 (TYPE_ANONYMOUS_P): New macro.
13238 (TAGGED_TYPE_P): New macro.
13239 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13240 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13241 * tree.c (no_linkage_helper): Likewise.
13242 * semantics.c (begin_class_definition): Likewise.
13243 * pt.c (convert_template_argument): Likewise.
13244 * lex.c (check_for_missing_semicolon): Likewise.
13245
13246 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13247
13248 * class.c (dfs_unshared_virtual_bases): New function.
13249 (mark_primary_bases): Call it.
13250 (check_bases): Ignore virtual bases when determining
13251 nearly-emptiness.
13252
13253 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
13254
13255 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13256
13257 2001-04-11 Mark Mitchell <mark@codesourcery.com>
13258
13259 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13260 cloned function to the clone.
13261
13262 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13263
13264 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13265
13266 * semantics.c: Include expr.h.
13267
13268 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
13269
13270 * method.c (implicitly_declare_fn): Commonize code for copy ctor
13271 and assignment op. Set TREE_USED for parameter.
13272
13273 2001-04-10 Mark Mitchell <mark@codesourcery.com>
13274
13275 * class.c (find_final_overrider_data): Add `candidates'.
13276 (dfs_find_final_overrider): Don't issue error messages
13277 prematurely.
13278 (find_final_overrider): Issue error messages here.
13279 (build_base_field): Don't warn about amgibuous direct bases here.
13280 (warn_about_ambiguous_direct_bases): New function.
13281 (layout_class_type): Use it.
13282
13283 2001-04-10 Richard Henderson <rth@redhat.com>
13284
13285 * typeck.c (build_array_ref): Push the array reference inside
13286 COMPOUND_EXPR and COND_EXPR.
13287
13288 2001-04-05 Mark Mitchell <mark@codesourcery.com>
13289
13290 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13291 * decl.c (duplicate_decls): Adjust accordingly.
13292 (maybe_commonize_var): Likewise.
13293 (grokfndecl): Likewise.
13294 (start_function): Likewise.
13295 (start_method): Likewise.
13296 * decl2.c (key_method): Likewise.
13297 (import_export_decl): Likewise.
13298 * method.c (implicitly_declare_fn): Likewise.
13299 * optimize.c (maybe_clone_body): Likewise.
13300
13301 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
13302
13303 * lang-specs.h: Add __DEPRECATED.
13304
13305 2001-04-05 J"orn Rennecke <amylaar@redhat.com>
13306
13307 * search.c (get_dynamic_cast_base_type): When building a new
13308 constant, set its type to ssizetype.
13309
13310 2001-04-04 Jakub Jelinek <jakub@redhat.com>
13311
13312 * optimize.c (expand_call_inline): Only add newly inlined statements
13313 into inlined_stmts.
13314
13315 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13316
13317 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13318 (OPERATOR_FORMAT): Likewise.
13319 (OPERATOR_TYPENAME_FORMAT): Likewise.
13320 * operators.def: Remove old name-mangling information.
13321 * decl.c (grok_op_properties): Adjust accordingly.
13322 * lex.c (init_operators): Likewise.
13323 * rtti.c (get_tinfo_decl): Issue error messages about types that
13324 have variable size.
13325
13326 2001-04-03 Mark Mitchell <mark@codesourcery.com>
13327
13328 * decl2.c (import_export_decl): Don't call import_export_class
13329 when processing an inline member function.
13330 * semantics.c (expand_body): Call import_export_decl before
13331 emitting inline functions.
13332
13333 2001-03-28 Richard Henderson <rth@redhat.com>
13334
13335 IA-64 ABI Exception Handling:
13336 * cp-tree.def (EH_SPEC_BLOCK): New.
13337 (MUST_NOT_THROW_EXPR): New.
13338 * cp-tree.h: Update changed function declarations.
13339 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13340 (CPTI_CALL_UNEXPECTED): New.
13341 (struct cp_language_function): Rename x_eh_spec_try_block
13342 to x_eh_spec_block.
13343 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13344 * decl.c (current_binding_level): If no current function
13345 bindings, revert to scope_chain.
13346 (initialize_predefined_identifiers): Remove __cp_push_exception.
13347 (store_parm_decls): Use begin_eh_spec_block.
13348 (finish_function): Use finish_eh_spec_block.
13349 (mark_lang_function): Update for name changes.
13350 * decl2.c (finish_file): No mark_all_runtime_matches.
13351 * dump.c (cp_dump_tree): Handle new tree codes.
13352 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13353 * except.c (catch_language_init, catch_language): Remove.
13354 (init_exception_processing): Don't set language code.
13355 Initialize call_unexpected_node, protect_cleanup_actions,
13356 eh_personality_libfunc, lang_eh_runtime_type.
13357 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13358 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13359 (prepare_eh_type): Split out type canonicalizations ...
13360 (build_eh_type_type): ... from here.
13361 (build_eh_type_type_ref): Remove.
13362 (mark_all_runtime_matches): Remove.
13363 (build_exc_ptr): New.
13364 (do_begin_catch, do_end_catch): New.
13365 (do_pop_exception): Remove.
13366 (build_terminate_handler): Remove.
13367 (choose_personality_routine): Split out language choice from ...
13368 (initialize_handler_parm): ... here.
13369 Use MUST_NOT_THROW_EXPR.
13370 (expand_start_catch_block): Use do_begin_catch. Simplify Java
13371 exception object handling.
13372 (expand_start_eh_spec, expand_end_eh_spec): Remove.
13373 (expand_exception_blocks, alloc_eh_object): Remove.
13374 (begin_eh_spec_block, finish_eh_spec_block): New.
13375 (do_allocate_exception, do_free_exception): New.
13376 (expand_throw): Merge into ...
13377 (build_throw): ... here. Update for abi.
13378 * expr.c (cplus_expand_expr): No expand_internal_throw.
13379 Handle MUST_NOT_THROW_EXPR.
13380 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13381 * semantics.c (*) Update for except.h name changes.
13382 (genrtl_try_block): No protect_with_terminate.
13383 (genrtl_eh_spec_block): New.
13384 (genrtl_handler): Don't emit the goto here.
13385 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13386 (genrtl_finish_function): Don't expand_exception_blocks.
13387 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13388
13389 2001-03-28 Richard Henderson <rth@redhat.com>
13390
13391 * decl.c (struct named_label_list): Rename eh_region to
13392 in_try_scope, add in_catch_scope.
13393 (struct binding_level): Rename eh_region to is_try_scope,
13394 add is_catch_scope.
13395 (note_level_for_try): Rename from note_level_for_eh.
13396 (note_level_for_catch): New.
13397 (poplevel): Copy both is_try_scope and is_catch_scope to
13398 the named_label_list struct.
13399 (check_previous_goto_1): Don't check for catch block via
13400 DECL_ARTIFICIAL; use in_try_scope instead.
13401 (check_goto): Likewise.
13402 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13403 * except.c (expand_start_catch_block): Call note_level_for_catch.
13404 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13405
13406 2001-03-27 Richard Henderson <rth@redhat.com>
13407
13408 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13409 exceptions_via_longjmp.
13410
13411 2001-03-27 Phil Edwards <pme@sources.redhat.com>
13412
13413 * pt.c (check_default_tmpl_args): Make error messages clearer.
13414
13415 2001-03-26 Phil Edwards <pme@sources.redhat.com>
13416
13417 * error.c: Also undefine 'A' macro used for cp_printers definition.
13418
13419 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13420
13421 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13422
13423 2001-03-26 Mike Yang <yang@research.att.com>
13424 Mark Mitchell <mark@codesourcery.com>
13425
13426 * dump.c (dump_access): New function.
13427 (cp_dump_tree): Use it. Dump basetype information for class
13428 types.
13429
13430 2001-03-26 Mark Mitchell <mark@codesourcery.com>
13431
13432 * Makefile.in (optimize.o): Depend on params.h.
13433 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13434 (init_decl_processing): Set flag_no_inline when doing
13435 inlining-on-trees.
13436 * optimize.c: Include params.h.
13437 (struct inline_data): Improve documentation of FNS. Add
13438 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13439 (INSNS_PER_STMT): New macro.
13440 (remap_block): Use CLONING_P.
13441 (inlinable_function_p): Don't inline big functions.
13442 (expand_call_inline): Keep track of how much inlining we've done.
13443 (optimize_function): Set FIRST_INLINED_FN.
13444 (maybe_clone_body): Set CLONING_P.
13445 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13446 tree nodes.
13447 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13448 rest_of_compilation. Clear DECL_RTL for local variables
13449 afterwards.
13450 (clear_decl_rtl): New function.
13451
13452 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
13453
13454 Implement DR 209
13455 * cp-tree.h (skip_type_access_control,
13456 reset_type_access_control): Prototype.
13457 * decl.c (grokdeclarator): Access of friends is not checked.
13458 * parse.y (component_decl_list): Reset type access control.
13459 * semantics.c (decl_type_access_control): Clear
13460 current_type_lookups.
13461 (save_type_access_control): Don't save if not deferring.
13462 (skip_type_access_control, reset_type_access_control): New
13463 functions.
13464 (begin_class_definition): Do type access control for basetypes.
13465 Start deferred access control.
13466 (finish_class_definition): Resume immediate access control if
13467 this is a local class.
13468
13469 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13470
13471 * class.c (add_method): Use memcpy/memmove, not bcopy.
13472
13473 * decl.c (duplicate_decls): Likewise.
13474
13475 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13476
13477 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13478 not `_'.
13479
13480 2001-03-23 Jakub Jelinek <jakub@redhat.com>
13481
13482 * decl.c (local_names): Define.
13483 (push_local_name): New.
13484 (grok_reference_init): Return init if initializing static reference
13485 variable with non-constant instead of emitting it.
13486 Move expand_static_init call to cp_finish_decl.
13487 (layout_var_decl): Call push_local_name.
13488 (maybe_commonize_var): Allow inlining functions even if they have
13489 static local variables, use comdat_linkage for them if flag_weak.
13490 (check_initializer): Call obscure_complex_init if
13491 grok_reference_init returned nonzero.
13492 (save_function_data): Clear x_local_names.
13493 (pop_cp_function_context): Free x_local_names.
13494 (mark_inlined_fns): Remove.
13495 (mark_lang_function): Mark x_local_names.
13496 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13497 Mark inlined_fns as tree, remove call to mark_inlined_fns.
13498 * class.c (alter_access): Ensure DECL_ACCESS is never set if
13499 DECL_DISCRIMINATOR_P.
13500 * cp-tree.h (cp_language_function): Add x_local_names.
13501 (lang_decl_flags): Add discriminator into u2.
13502 (lang_decl_inlined_fns): Remove.
13503 (lang_decl): inlined_fns is now a TREE_VEC.
13504 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13505 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13506 TREE_VEC, not a custom structure.
13507 (optimize_function): Likewise.
13508 * mangle.c (discriminator_for_local_entity): Discriminate among
13509 VAR_DECL local entities.
13510 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13511 is not valid.
13512
13513 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
13514
13515 Add support for Java interface method calls.
13516 * cp-tree.h (struct lang_type): Add java_interface flag.
13517 (TYPE_JAVA_INTERFACE): New macro.
13518 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13519 by setting TYPE_JAVA_INTERFACE.
13520 * call.c (java_iface_lookup_fn): New static.
13521 (build_over_call): If calling a method declared in a
13522 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13523 expression which resolves the function address.
13524 (build_java_interface_fn_ref): New function.
13525
13526 2001-03-22 Richard Henderson <rth@redhat.com>
13527
13528 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13529 * except.c: Don't include it.
13530
13531 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
13532 based on an idea from Joe Buck <jbuck@synopsys.com>
13533
13534 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13535 New nonterminals.
13536 (data_def, component_decl): Add reductions to bad_decl.
13537
13538 2001-03-22 Jakub Jelinek <jakub@redhat.com>
13539
13540 * method.c (do_build_assign_ref): Don't use build_modify_expr for
13541 anonymous aggregates, since they don't have assignment operator
13542 method.
13543 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13544 assignment operators for anonymous structure fields.
13545
13546 2001-03-21 Jason Merrill <jason@redhat.com>
13547
13548 * pt.c (instantiate_decl): Abort if we see a member constant
13549 instantiation that doesn't already have its initializer.
13550 Downgrade explicit instantiation without definition to pedwarn.
13551
13552 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13553 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13554 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13555
13556 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13557 (pending_vtables): Remove.
13558 * decl2.c (pending_vtables): Remove.
13559 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13560 CLASSTYPE_VTABLE_NEEDS_WRITING.
13561 (import_export_class): Likewise.
13562 (init_decl2): Don't mark pending_vtables.
13563 * lex.c (handle_pragma_vtable): Just sorry.
13564 * pt.c (instantiate_class_template): Don't mess with
13565 CLASSTYPE_VTABLE_NEEDS_WRITING.
13566 (mark_class_instantiated): Likewise.
13567 * ptree.c (print_lang_type): Don't print it.
13568 * semantics.c (begin_class_definition): Don't set it.
13569
13570 * pt.c (template_tail): Replace with last_pending_template.
13571 (maybe_templates, maybe_template_tail): Remove.
13572 (add_pending_template): Adjust.
13573 (instantiate_pending_templates): Adjust.
13574
13575 * cp-tree.h (struct saved_scope): Remove lang_stack field.
13576 (current_lang_stack): Remove.
13577 * decl.c (maybe_push_to_top_level): Don't initialize it.
13578 (duplicate_decls): Use current_lang_depth.
13579 (xref_basetypes): Likewise.
13580 * class.c (current_lang_depth): New fn.
13581 (push_lang_context): Use more varray functionality.
13582 (pop_lang_context): Likewise.
13583
13584 * error.c (GLOBAL_THING): Always use '__'.
13585
13586 2001-03-21 Mark Mitchell <mark@codesourcery.com>
13587
13588 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13589
13590 * mangle.c (mangle_decl_string): Mangle the names of overloaded
13591 operators, even when they have `extern "C"' linkage.
13592
13593 2001-03-19 Mark Mitchell <mark@codesourcery.com>
13594
13595 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13596 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13597 where it's not necessary.
13598 (add_method): Remove optimization involving comparison of
13599 DECL_ASSEMBLER_NAME.
13600 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13601 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13602 where it's not necessary.
13603 (check_methods): Likewise.
13604 (build_clone): Likewise.
13605 (built_vtt): Likewise.
13606 * cp-tree.h (DECL_NEEDED_P): Likewise.
13607 * decl.c (pushtag): Likewise.
13608 (duplicate_decls): Likewise.
13609 (pushdecl): Likewise.
13610 (builtin_function): Likewise.
13611 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13612 (build_cp_library_fn): Likewise.
13613 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13614 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13615 where it's not necessary.
13616 (make_rtl_for_nonlocal_decl): Likewise.
13617 (cp_finish_decl): Likewise.
13618 (grokfndecl): Likewise.
13619 (grokvardecl): Likewise.
13620 (grokdeclarator): Likewise.
13621 (start_function): Likewise.
13622 (cp_missing_return_ok_p): Likewise.
13623 * decl2.c (grokclassfn): Likewise.
13624 (check_classfn): Likewise.
13625 (finish_static_data_member_decl): Likewise.
13626 (grokfield): Likewise.
13627 * error.c (GLOBAL_IORD_P): Remove.
13628 (dump_global_iord): Improve output.
13629 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13630 * except.c (nothrow_libfn_p): Summarily reject any function not in
13631 namespace-scope.
13632 * init.c (build_java_class_ref): Don't explicitly set
13633 DECL_ASSEMBLER_NAME after calling mangle_decl.
13634 * mangle.c (mangle_decl_string): Handle extern "C" functions.
13635 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13636 * method.c (set_mangled_name_for_decl): Don't explicitly set
13637 DECL_ASSEMBLER_NAME after calling mangle_decl.
13638 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13639 IDENTIFIER_GLOBAL_VALUE for the thunk.
13640 * pt.c (set_mangled_name_for_template_decl): Remove.
13641 (check_explicit_specialization): Don't use it.
13642 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13643 (tsubst_friend_function): Likewise.
13644 (tsubst_decl): Likewise.
13645 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13646 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13647 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
13648 where it's not necessary.
13649 (tinfo_base_init): Likewise.
13650 (create_real_tinfo_var): Likewise.
13651 * search.c (looup_field_1): Likewise.
13652 * semantics.c (finish_named_return_value): Likewise.
13653 * tree.c (init_tree): Set lang_set_decl_assembler_name.
13654
13655 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
13656
13657 Correct semantics restrictions checking in throw-expression.
13658 * except.c (is_admissible_throw_operand): New function.
13659 (build_throw): Use it.
13660
13661 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13662
13663 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13664 and its ilk.
13665
13666 2001-03-14 Mark Mitchell <mark@codesourcery.com>
13667
13668 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13669 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13670 * decl.c (duplicate_decls): Likewise.
13671 (builtin_function): Likewise.
13672 (build_library_fn): Likewise.
13673 (build_cp_library_fn): Likewise.
13674 (check_initializer): Likewise.
13675 (cp_finish_decl): Likewise.
13676 * decl2.c (grokfield): Likewise.
13677 (grok_function_init): Remove #if 0'd code.
13678 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13679 * friend.c (do_friend): Likewise.
13680 * init.c (get_temp_regvar): Likewise.
13681 * method.c (make_thunk): Likewise.
13682 * pt.c (tsubst_friend_function): Likewise.
13683 (tsubst_decl): Likewise.
13684 (regenerate_decl_from_template): Likewise.
13685 * semantics.c (genrtl_named_return_value): Likewise.
13686 (expand_body): Likewise.
13687 (genrtl_finish_function): Likewise.
13688 * tree.c (cp_tree_equal): Likewise.
13689
13690 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
13691
13692 * call.c (convert_like_real): Add extra semantics to INNER
13693 parameter. Don't convert to temporary if a user conversion
13694 gives us an lvalue that we're about to bind to a reference.
13695 Set INNER to indicate pending reference binding on recursive
13696 calls.
13697
13698 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13699
13700 * cp/lex.c: Delete duplicate pending_lang_change.
13701
13702 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
13703
13704 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13705 Similarly.
13706 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13707 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13708
13709 2001-03-09 Zack Weinberg <zackw@stanford.edu>
13710
13711 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13712
13713 2001-03-08 Stan Shebs <shebs@apple.com>
13714
13715 * cp-tree.h (set_identifier_local_value): Remove unused decl.
13716
13717 2001-03-06 Zack Weinberg <zackw@stanford.edu>
13718
13719 * spew.c: Remove references to CPP_OSTRING.
13720
13721 2001-03-06 Andrew Haley <aph@redhat.com>
13722
13723 * typeck.c (convert_arguments): Check that we have an fndecl.
13724
13725 2001-03-05 Andrew Haley <aph@redhat.com>
13726
13727 * typeck.c (convert_arguments): Don't do ellipsis conversion for
13728 __built_in_constant_p.
13729
13730 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13731
13732 * typeck.c (build_static_cast): Allow enum to enum conversions
13733 as per DR 128.
13734
13735 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13736
13737 * class.c (check_field_decls): Pointers to member do not a
13738 non-pod struct make, as per DR 148.
13739
13740 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
13741
13742 * call.c (joust): cp_pedwarn when using gnu extension concerning
13743 worst conversion sequences.
13744
13745 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13746
13747 * decl.c: Replace all uses of 'boolean' with 'bool'.
13748
13749 2001-03-01 Zack Weinberg <zackw@stanford.edu>
13750
13751 * lang-specs.h: Add zero initializer for cpp_spec field to
13752 all array elements that need one. Don't put an #ifdef inside
13753 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13754 use it.
13755
13756 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13757
13758 Implement using decls inside template functions.
13759 * decl2.c (validate_nonmember_using_decl): Don't special case
13760 fake_std_node in the global namespace. Don't reject early when
13761 processing a template.
13762 (do_local_using_decl): Add to statement tree. Don't do further
13763 processing when building a template.
13764 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13765
13766 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
13767
13768 * decl2.c (do_nonmember_using_decl): Don't complain if we find
13769 same function. Do complain about ambiguating extern "C"
13770 declarations.
13771
13772 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
13773
13774 Remove floating point and complex type template constant parms.
13775 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13776 COMPLEX_TYPE extensions.
13777 (invalid_nontype_parm_type_p): Likewise.
13778
13779 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
13780
13781 * except.c (call_eh_info): Revert "match_function"'s type.
13782
13783 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
13784
13785 Fix ctor vtable vcall offsets.
13786 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13787 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13788 (get_matching_base): Remove.
13789 (get_original_base): New function.
13790 (build_vtbl_initializer): Initialize vid.rtti_binfo.
13791 Use a virtual thunk for a ctor vtable with an index
13792 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13793 primary base within a constructor vtable. Only set
13794 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13795 when primary base has been lost.
13796 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13797
13798 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
13799
13800 * call.c (joust): Ensure more_specialized()'s argument length
13801 parameter has correct value for constructors.
13802
13803 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
13804
13805 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13806
13807 * decl.c (mark_inlined_fns): Prototype.
13808
13809 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13810
13811 * spew.c (yylex): Correct handling of friends.
13812
13813 2001-02-22 Mark Mitchell <mark@codesourcery.com>
13814
13815 * mangle.c (write_encoding): Pass write_function_type the
13816 FUNCTION_DECL for the function being encoded.
13817 (write_function_type): Pass it along to write_bare_function_type.
13818 (write_bare_function_type): Pass it along to write_method_parms.
13819 (write_method_parms): Don't mangle the compiler-generated
13820 parameters to a constructor or destructor.
13821
13822 2001-02-22 Andreas Jaeger <aj@suse.de>
13823
13824 * optimize.c: Include toplev.h for
13825 note_deferral_of_defined_inline_function prototype.
13826
13827 2001-02-22 Jakub Jelinek <jakub@redhat.com>
13828
13829 * cp-tree.h (struct lang_decl_inlined_fns): New.
13830 (struct lang_decls): Add inlined_fns.
13831 (DECL_INLINED_FNS): New macro.
13832 * optimize.c (struct inline_data): Add inlined_fns.
13833 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13834 (inlinable_function_p): Likewise, fix typo in comment,
13835 function is not inlinable if it already inlined function currently
13836 being optimized.
13837 (expand_call_inline): Add fn to inlined_fns if necessary.
13838 (optimize_function): Initialize inlined_fns.
13839 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13840 * decl.c (mark_inlined_fns): New function.
13841 (lang_mark_tree): Call it.
13842
13843 2001-02-21 Jason Merrill <jason@redhat.com>
13844
13845 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13846 (DECL_UNINLINABLE): Move to middle-end.
13847
13848 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13849 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13850 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13851 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13852 parms and outer BLOCK. note_deferral_of_defined_inline_function.
13853
13854 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13855 second parm of op=.
13856
13857 2001-02-19 Mark Mitchell <mark@codesourcery.com>
13858
13859 * decl2.c (set_decl_namespace): Allow explicit instantiations in
13860 any namespace.
13861
13862 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
13863
13864 * optimize.c (expand_call_inline): Don't walk subtrees of type
13865 nodes.
13866
13867 2001-02-18 Mark Mitchell <mark@codesourcery.com>
13868
13869 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13870 for a destructor.
13871
13872 2001-02-18 Jason Merrill <jason@redhat.com>
13873
13874 Do put the VTT parameter in DECL_ARGUMENTS.
13875 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13876 (current_vtt_parm): New macro.
13877 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13878 (DECL_HAS_VTT_PARM_P): New macro.
13879 (DECL_VTT_PARM): Remove.
13880 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13881 * decl.c (duplicate_decls): Only copy the operator code if
13882 appropriate.
13883 (start_function): Set current_vtt_parm.
13884 (lang_mark_tree): Don't mark vtt_parm.
13885 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
13886 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
13887 * class.c (build_clone): Maybe remove the VTT parm.
13888 * optimize.c (maybe_clone_body): Set up the VTT parm.
13889 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
13890 * call.c (build_over_call): Just allow the VTT arg.
13891 * method.c (make_thunk): Don't set DECL_VTT_PARM.
13892 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
13893 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
13894 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
13895 * error.c (dump_function_decl): Likewise.
13896 * call.c (build_user_type_conversion_1, convert_like_real): Abort
13897 if we try to call a constructor with in-charge or VTT parms.
13898 * method.c (skip_artificial_parms_for): New fn.
13899 * call.c (add_function_candidate, build_over_call): Call it.
13900 * call.c (build_new_method_call): Use current_vtt_parm.
13901 * init.c (expand_virtual_init): Likewise.
13902 * class.c (same_signature_p): No longer static.
13903 * cp-tree.h: Declare it.
13904 * search.c (look_for_overrides_r): Use it.
13905
13906 2001-02-17 Mark Mitchell <mark@codesourcery.com>
13907
13908 * cp-tree.h (new_abi_rtti_p): Remove.
13909 (name_mangling_version): Likewise.
13910 (flag_do_squangling): Likewise.
13911 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
13912 * decl.c (grokfndecl): Likewise.
13913 * decl2.c (name_mangling_version): Remove.
13914 (flag_do_squangling): Likewise.
13915 (lang_f_options): Remove `squangle'.
13916 (unsupported_options): Add `squangle'.
13917 (cxx_decode_option): Issue a warning about uses of
13918 -fname-mangling-version.
13919 (finish_file): Remove old ABI support.
13920 * pt.c (check_explicit_specialization): Likewise.
13921 (tsubst_decl): Likewise.
13922 * rtti.c (init_rtti_processing): Likewise.
13923 (build_headof): Likewise.
13924 (get_tinfo_decl_dynamic): Likewise.
13925 (tinfo_from_decl): Likewise.
13926 (build_dynamic_cast_1): Likewise.
13927 (synthesize_tinfo_var): Likewise.
13928 * init.c (build_new): Allow enumeration types for the array-bounds
13929 in a direct-new-declarator.
13930
13931 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
13932
13933 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
13934 TREE_PROTECTED from the template being specialized.
13935
13936 2001-02-17 Jason Merrill <jason@redhat.com>
13937
13938 * decl2.c (build_artificial_parm): Set TREE_READONLY.
13939
13940 * decl.c (bad_specifiers): Allow throw specs on things with
13941 pointer-to-function or -member-function type.
13942 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
13943 a pmf.
13944
13945 2001-02-17 Mark Mitchell <mark@codesourcery.com>
13946
13947 * call.c (check_dtor_name): Handle template names correctly.
13948
13949 2001-02-16 Jason Merrill <jason@redhat.com>
13950
13951 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
13952 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
13953 * optimize.c (maybe_clone_body): Don't substitute it.
13954 * call.c (build_new_method_call): Check in_chrg instead.
13955 * init.c (expand_virtual_init): Likewise.
13956
13957 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
13958
13959 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
13960 class-type introduces at least a type-name.
13961
13962 2001-02-16 Jakub Jelinek <jakub@redhat.com>
13963
13964 * call.c (convert_like_real): Create a temporary for non-lvalue.
13965
13966 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
13967
13968 * cp-tree.h: Fix typos in comments.
13969
13970 2001-02-16 Jason Merrill <jason@redhat.com>
13971
13972 * optimize.c (remap_block): If we're compiling a clone, pass the
13973 new block to insert_block.
13974
13975 2001-02-16 Mark Mitchell <mark@codesourcery.com>
13976
13977 * semantics.c (finish_asm_stmt): Robustify.
13978
13979 2001-02-15 Mark Mitchell <mark@codesourcery.com>
13980
13981 * pt.c (push_template_decl_real): Don't remangle the name of a
13982 class template.
13983
13984 2001-02-15 Jim Meyering <meyering@lucent.com>
13985
13986 * Make-lang.in (c++.install-common): Depend on installdirs.
13987 (c++.install-info): Likewise.
13988 (c++.install-man): Likewise.
13989
13990 2001-02-15 Mark Mitchell <mark@codesourcery.com>
13991
13992 * typeck2.c (build_m_component_ref): Robustify.
13993
13994 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
13995
13996 * friend.c (do_friend): Don't take the nested [template] class
13997 into account when deciding whether to warn about the friend
13998 function not referring to a template function.
13999
14000 2001-02-14 Jakub Jelinek <jakub@redhat.com>
14001
14002 * typeck.c (build_unary_op): Clarify error message.
14003
14004 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
14005
14006 * parse.y (component_constructor_declarator): allow optional
14007 parentheses around constructor class name.
14008
14009 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14010
14011 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14012 section.
14013 * init.c (emit_base_init): Remove incorrect comment about
14014 virtual bases.
14015 * method.c (make_thunk): Fix comment alignment.
14016
14017 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14018
14019 Kill remnants of this is variable.
14020 * cp-tree.h (flag_this_is_variable): Remove.
14021 * decl2.c (flag_this_is_variable): Remove.
14022 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14023 (build_vbase_path): The path is non-static, even in a cdtor.
14024 (resolves_to_fixed_type_p): Add additional return value.
14025 * search.c (init_vbase_pointers): Adjust.
14026 * tree.c (lvalue_p_1): Adjust.
14027 * typeck.c (mark_addressable): Adjust.
14028
14029 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14030
14031 * pt.c (unify): Don't check cv quals of array types.
14032
14033 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
14034
14035 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14036 check whether we already have the type.
14037
14038 2001-02-13 Mark Mitchell <mark@codesourcery.com>
14039
14040 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14041 * call.c (build_op_delete_call): Simplify to remove duplicate
14042 code.
14043 * class.c (clone_function_decl): Don't build the deleting variant
14044 of a non-virtual destructor.
14045 * decl.c (finish_destructor_body): Don't call delete if this is a
14046 non-virtual destructor.
14047 * init.c (build_delete): Explicitly call `operator delete' when
14048 deleting an object with a non-virtual destructor.
14049
14050 2001-02-13 Jason Merrill <jason@redhat.com>
14051
14052 * lang-specs.h: Add more __EXCEPTIONS.
14053
14054 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14055
14056 * typeck2.c (process_init_constructor): Check
14057 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14058
14059 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14060
14061 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14062 Remove spurious information in comment. Allow further
14063 adjustments of REFERENCE_TYPE args.
14064
14065 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
14066
14067 * errfn.c (cp_deprecated): Tweak diagnostic text.
14068 * parse.y (new_initializer): Deprecate initializer lists
14069 extension.
14070
14071 2001-02-12 Mark Mitchell <mark@codesourcery.com>
14072
14073 Remove old ABI support.
14074
14075 2001-02-11 Mark Mitchell <mark@codesourcery.com>
14076
14077 * decl2.c (flag_vtable_thunks): Always set it to 1.
14078 (flag_new_abi): Likewise.
14079 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14080
14081 * Makefile.in (g++spec.o): Fix typo.
14082
14083 2001-02-09 Jason Merrill <jason@redhat.com>
14084
14085 * lang-specs.h: Restore definition of __EXCEPTIONS.
14086
14087 2001-02-08 Jason Merrill <jason@redhat.com>
14088
14089 * search.c (shared_member_p): New function.
14090 (lookup_field_r): Use it.
14091 * cp-tree.h (SHARED_MEMBER_P): Remove.
14092
14093 * method.c (process_overload_item): Handle template-dependent array
14094 bounds.
14095 * pt.c (type_unification_real): If we end up with undeduced nontype
14096 parms, try again.
14097
14098 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14099 types.
14100
14101 * typeck2.c (friendly_abort): Don't say anything if we have
14102 earlier errors or sorries.
14103
14104 * decl.c (check_tag_decl): Notice attempts to redefine bool and
14105 wchar_t. Ignore if in_system_header.
14106
14107 * decl.c (maybe_push_cleanup_level): New fn...
14108 (start_decl_1): ...split out from here.
14109 * cvt.c (build_up_reference): Use it.
14110 * cp-tree.h: Declare it.
14111
14112 2001-02-07 Mark Mitchell <mark@codesourcery.com>
14113
14114 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14115 spec.
14116
14117 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
14118
14119 * pt.c (lookup_template_class): Make sure it's a primary
14120 template or template_template_parm when called from the parser.
14121 (instantiate_template_class): Add assertion.
14122
14123 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
14124
14125 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14126 from error_mark_node.
14127
14128 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
14129
14130 Fix specification and implementation bugs in V3 ABI
14131 construction vtables.
14132 * cp-tree.h (flag_dump_class_layout): New flag.
14133 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14134 (BINFO_LOST_PRIMARY_P): New flag.
14135 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14136 (BINFO_PRIMARY_MARKED_P): Rename to ...
14137 (BINFO_PRIMARY_P): ... here.
14138 (binfo_via_virtual): New prototype.
14139 * decl2.c (flag_dump_class_layout): New flag.
14140 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14141 use `=' as a file name separator.
14142 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14143 bases.
14144 (build_vtbl_address): If this is a virtual primary base, then
14145 get the vtbl of what it is ultimately primary for.
14146 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14147 for BINFO_PRIMARY_P.
14148 (dfs_skip_nonprimary_vbases_markedp): Likewise.
14149 (get_shared_vbase_if_not_primary): Likewise.
14150 (dfs_get_pure_virtuals): Likewise.
14151 (expand_upcast_fixups): Likewise.
14152 (fixup_virtual_upcast_offsets): Likewise.
14153 (dfs_find_vbase_instance): Likewise.
14154 (find_vbase_instance): Likewise.
14155 (binfo_from_vbase): Adjust comment to reflect reality.
14156 (binfo_via_virtual): New function.
14157 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14158 for binfo walking during VTT construction.
14159 (dfs_mark_primary_bases): Remove.
14160 (force_canonical_binfo_r): New function.
14161 (force_canonical_binfo): New function.
14162 (mark_primary_virtual_base): New function.
14163 (mark_primary_bases): Walk in inheritance graph order, use
14164 mark_primary_virtual_base.
14165 (determine_primary_base): Use some more intermediate variables.
14166 (dfs_find_final_overrider): Don't check for overriding along a
14167 virtual path.
14168 (dfs_modify_vtables): Walk into primary virtual bases too.
14169 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14170 (build_base_fields): Likewise.
14171 (dfs_set_offset_for_unshared_vbases): Likewise.
14172 (layout_virtual_bases): Likewise.
14173 (end_of_class): Likewise.
14174 (finish_struct_1): Call dump_class_hierarchy, if requested.
14175 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14176 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14177 (dump_class_hierarchy): Add file parameter. Append to file, if
14178 required.
14179 (finish_vtbls): Adjust accumulate_vtbl_inits call.
14180 Use canonical base for virtual bases.
14181 (build_vtt): Add more comments. Adjust build_vtt_inits call.
14182 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14183 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14184 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14185 virtual VTTs.
14186 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14187 from DATA. We want virtual primary bases and all bases via virtual.
14188 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14189 virtual base when not a construction vtable.
14190 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14191 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14192 Use canonical bases when processing virtual bases.
14193 (accumulate_vtbl_inits): We're interested in any base via a
14194 virtual path.
14195 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14196 within a construction vtable, determine what is being overridden.
14197 (build_vtbl_initializer): Add more comments
14198 (add_vcall_offset_vtbl_entries_1): Adjust comment.
14199 (build_rtti_vtbl_entries): Check if the base has lost its
14200 primary.
14201
14202 2001-02-05 Mark Mitchell <mark@codesourcery.com>
14203
14204 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14205
14206 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14207
14208 * decl.c (pushdecl): Call abort instead of fatal.
14209 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14210 * init.c (build_new_1): Likewise.
14211 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14212 * decl.c (build_typename_type): hash_table_init now returns void.
14213 decl.c (init_decl_processing): Make an error non-fatal.
14214
14215 2001-02-04 Mark Mitchell <mark@codesourcery.com>
14216
14217 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14218 Document.
14219 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14220 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14221 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14222 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14223 * decl.c (maybe_commonize_var): Use the new name-mangling where
14224 appropriate.
14225 * decl2.c (comdat_linkage): Enhance comments. Make all
14226 compiler-generated things static, if COMDAT is not available.
14227 (get_tinfo_decl): Do not make typeinfo objects that belong in the
14228 library COMDAT.
14229 (tinfo_base_init): Use the correct mangled name for typeinfo
14230 strings, and push them into the global scope.
14231 (typeinfo_in_lib_p): New function.
14232 (synthesize_tinfo_var): Use it.
14233 (create_real_tinfo_var): Likewise.
14234
14235 2001-02-03 Jakub Jelinek <jakub@redhat.com>
14236
14237 * decl.c (push_class_binding): Use context_for_name_lookup instead
14238 of CP_DECL_CONTEXT.
14239 * search.c (context_for_name_lookup): Remove static. Check for NULL
14240 context in the loop.
14241 * cp-tree.h (context_for_name_lookup): Add prototype.
14242
14243 2001-02-02 Jakub Jelinek <jakub@redhat.com>
14244
14245 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14246 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14247 Remove.
14248 * call.c (convert_class_to_reference, build_user_type_conversion_1,
14249 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14250
14251 2001-02-02 Mark Mitchell <mark@codesourcery.com>
14252
14253 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14254 of macros used when compiling g++spec.c.
14255 * g++spec.c (lang_specific_driver): Link with the shared
14256 libgcc by default.
14257
14258 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
14259
14260 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14261 make_reference_declarator, make_call_declarator), method.c
14262 (implicitly_declare_fn), parse.y (namespace_using_decl,
14263 notype_unqualified_id, expr_or_declarator, new_type_id,
14264 after_type_declarator, direct_after_type_declarator,
14265 notype_declarator, complex_notype_declarator,
14266 complex_direct_notype_declarator, qualified_id,
14267 notype_qualified_id, overqualified_id, direct_new_declarator,
14268 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14269 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14270 instead of build_parse_node.
14271
14272 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14273
14274 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14275 (minus_one_node): Moved to top level gcc directory. Renamed
14276 to integer_minus_one_node.
14277
14278 * init.c (init_init_processing): Don't set minus_one_node.
14279 (build_vec_init): Use integer_minus_one_node.
14280
14281 * rtti.c (get_tinfo_decl_dynamic): Likewise.
14282
14283 2001-01-28 Jakub Jelinek <jakub@redhat.com>
14284
14285 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14286 identical and they would be replaced with constant, remove
14287 MODIFY_EXPR from the tree.
14288
14289 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14290
14291 * Make-lang.in: Remove all dependencies on defaults.h.
14292 * call.c: Don't include defaults.h.
14293 * decl.c: Likewise.
14294 * decl2.c: Likewise.
14295 * except.c: Likewise.
14296 * pt.c: Likewise.
14297 * rtti.c: Likewise.
14298 * tree.c: Likewise.
14299 * typeck.c: Likewise.
14300
14301 2001-01-25 Jakub Jelinek <jakub@redhat.com>
14302
14303 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14304 operators even in "C" linkage.
14305 * method.c (set_mangled_name_for_decl): Likewise.
14306 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14307 overloaded operators in "C" linkage.
14308
14309 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14310
14311 * pt.c (tsubst_decl): Remove IN_DECL parameter.
14312 (tsubst_arg_types): Check parameter is not void.
14313 (tsubst): Adjust tsubst_decl call.
14314
14315 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
14316
14317 * call.c (add_builtin_candidate): Quote std properly, from
14318 previous change.
14319
14320 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14321
14322 * pt.c (check_explicit_specialization): Clone constructors and
14323 destructors.
14324
14325 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14326
14327 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14328 indicates anything special about template depth. Make sure we
14329 only count the user visible template classes.
14330
14331 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
14332
14333 * call.c (build_conv): Typo in comment.
14334 (add_builtin_candidate): Add more explanation.
14335 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14336 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14337 when we have enumeral types.
14338 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14339 candidates for relops and eqops.
14340 (joust): Simplify control flow. Allow a non-template user
14341 function to hide a builtin.
14342
14343 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
14344
14345 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14346 (more_specialized): Add deduction parameter.
14347 * call.c (joust): Adjust more_specialized call.
14348 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14349 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14350 (get_bindings_order): Remove.
14351 (get_bindings_real): Add DEDUCE parameter.
14352 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14353 REFERENCE_TYPE jig for DEDUCE_ORDER.
14354 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14355 maybe_adjust_types_for_deduction.
14356 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14357 directly.
14358 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14359 (check_cv_quals_for_unify): Use new unify qualifier flags.
14360 (unify): Clear new unify qualifier flags.
14361 (get_bindings_real): Add DEDUCE parameter.
14362 (get_bindings): Adjust call to get_bindings_real.
14363 (get_bindings_overload): Likewise.
14364 (most_specialized_instantiation): Adjust call to
14365 more_specialized.
14366
14367 2001-01-19 Jason Merrill <jason@redhat.com>
14368
14369 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14370
14371 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14372 -fnew-abi.
14373
14374 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
14375
14376 * decl2.c (arg_assoc_class): Fix double iteration logic.
14377
14378 2001-01-19 Jason Merrill <jason@redhat.com>
14379
14380 * init.c (build_delete): Always call convert_force to strip cv-quals.
14381
14382 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14383 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14384 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14385
14386 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14387
14388 * search.c (get_vbase_1): Count only virtual bases.
14389
14390 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14391
14392 * class.c (duplicate_tag_error): Robustify flag clearing.
14393
14394 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14395
14396 * cp-tree.h (lookup_template_class): Add complain parm.
14397 * decl.c (lookup_namespace_name): Adjust call to
14398 lookup_template_class.
14399 (make_typename_type): Likewise.
14400 * semantics.c (finish_template_type): Likewise.
14401 * pt.c (lookup_template_class): Add complain parm. Adjust.
14402 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14403 (tsubst): Likewise.
14404
14405 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
14406
14407 * pt.c (copy_default_args_to_explicit_spec): Preserve
14408 object's CV quals. Reorganize.
14409
14410 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14411
14412 * typeck.c (build_modify_expr): Say `initialization' for
14413 INIT_EXPRs.
14414 * init.c (build_default_init): Convert to enumeral type, if
14415 needed.
14416
14417 2001-01-18 Jakub Jelinek <jakub@redhat.com>
14418
14419 * parse.y (nomods_initdcl0): Properly set things up for
14420 initdcl0_innards.
14421
14422 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14423
14424 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14425 (type_unification_real): Set it.
14426 (unify): Use it.
14427
14428 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14429
14430 * decl.c (finish_destructor_body): Convert to vbase pointer here.
14431
14432 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14433
14434 * semantics.c (begin_class_definition): Check we're not inside a
14435 template parm list.
14436
14437 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
14438
14439 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14440 BASELINK_P.
14441
14442 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14443
14444 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14445 * call.c (build_over_call): Add comment.
14446
14447 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14448
14449 * cvt.c (ocp_convert): Handle vector type conversion
14450 * typeck2.c (digest_init): Handle vector type initializations
14451
14452 2001-01-16 Phil Edwards <pme@sources.redhat.com>
14453
14454 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
14455 was given.
14456
14457 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14458
14459 * pt.c (check_nontype_parm): Rename to ...
14460 (invalid_nontype_parm_type_p): ... here.
14461 (process_template_parm): Adjust.
14462 (convert_template_argument): Adjust.
14463
14464 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
14465
14466 * pt.c (check_nontype_parm): New function.
14467 (process_template_parm): Use it.
14468 (convert_template_argument): Use it.
14469 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14470 member.
14471
14472 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
14473
14474 * tree.c: Add defaults.h
14475 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14476 * Make-lang.in (cp/tree.o): Add defaults.h.
14477
14478 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14479
14480 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14481
14482 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14483
14484 * g++.1: Change to be ".so man1/gcc.1".
14485
14486 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
14487
14488 * Make-lang.in (c++.info, c++.install-info): Build and install g++
14489 internals info.
14490 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14491 ($(srcdir)/cp/g++int.info): New target.
14492 * gxxint.texi: Add info directory entry. Use @@ in email address.
14493 * .cvsignore: Update.
14494
14495 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14496
14497 * typeck.c (build_c_cast): Do template processing earlier.
14498 Always pedwarn on array casts.
14499
14500 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
14501
14502 * friend.c (make_friend_class): Make sure a templated class is
14503 actually a template.
14504
14505 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14506
14507 * decl2.c (get_guard): Set linkage from guarded decl.
14508
14509 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14510
14511 * call.c (convert_default_arg): Check for unprocessed
14512 DEFAULT_ARG.
14513 * cp-tree.h (replace_defarg): Move to spew.c.
14514 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14515 spew.c, which is where they really are.
14516 (done_pending_defargs): Declare.
14517 (unprocessed_defarg_fn): Declare.
14518 * decl.c (replace_defarg): Move to spew.c
14519 * parse.y (structsp): Call done_pending_defargs.
14520 * spew.c (defarg_fns): Rearrange list structure.
14521 (defarg_fnsdone): New static variable.
14522 (defarg_depfns): New static variable.
14523 (init_spew): Adjust.
14524 (add_defarg_fn): Store the type in TREE_TYPE.
14525 (do_pending_defargs): Detect and deal with ordering constraints
14526 and circularity.
14527 (done_pending_defargs): New function.
14528 (unprocessed_defarg_fn): New function.
14529 (replace_defarg): Moved from decl.c. Robustify. Don't save
14530 if circularity detected.
14531
14532 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14533
14534 * pt.c (unify): Check array has a domain, before checking
14535 whether it is variable sized.
14536
14537 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14538
14539 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14540 parameters with pointers to arrays of unknown bound.
14541
14542 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
14543
14544 * parse.y (template_parm_header, template_spec_header): New
14545 reductions. Split out from ...
14546 (template_header): ... here. Use them.
14547 (template_template_parm): Use template_parm_header.
14548 * semantics.c (finish_template_template_parm): Add assert.
14549
14550 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14551
14552 * mangle.c (write_builtin_type): Fix thinko.
14553
14554 * pt.c (copy_default_args_to_explicit_spec_1): New function.
14555 (copy_default_args_to_explicit_spec): Likewise.
14556 (check_explicit_specialization): Use it.
14557
14558 * class.c (finish_struct_1): Remove last argument in call to
14559 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14560 * decl.c (builtin_function): Likewise.
14561 (build_cp_library_fn): Likewise.
14562 (check_initializer): Likewise.
14563 (make_rtl_for_nonlocal_decl): Likewise.
14564 (cp_finish_decl): Likewise.
14565 (start_function): Likewise.
14566 * decl2.c (finish_anon_union): Likewise.
14567 * friend.c (do_friend): Likewise.
14568 * init.c (build_java_class_ref): Likewise.
14569 * method.c (make_thunk): Likewise.
14570 * pt.c (tsubst_friend_function): Likewise.
14571 * semantics.c (expand_body): Likewise.
14572
14573 2001-01-10 Mark Mitchell <mark@codesourcery.com>
14574
14575 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14576 looking at DECL_CLONED_FUNCTION for non-functions.
14577
14578 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14579
14580 * error.c (dump_template_parameter): Use parm to determine how
14581 to print default value.
14582
14583 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14584
14585 * class.c (duplicate_tag_error): Clear more flags.
14586
14587 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
14588
14589 * call.c (build_new_method_call): Use binfo_for_vbase.
14590
14591 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
14592
14593 * cp-tree.h (flag_cond_mismatch): Don't declare.
14594 * decl2.c (flag_cond_mismatch): Don't define.
14595 (lang_f_options): Remove cond-mismatch.
14596 (unsupported_options): Add cond-mismatch.
14597
14598 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
14599
14600 * class.c (handle_using_decl): Reject using of constructor name
14601 of sourcing class. Allow injecting of a method with same name as
14602 nested class. Fixup error messages.
14603
14604 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
14605
14606 * decl2.c (lang_decode_option): Handle -Wformat=2.
14607
14608 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14609
14610 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14611 initialized_in_class.
14612 (DECL_DEFINED_IN_CLASS_P): Rename to ...
14613 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14614 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14615 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14616 * pt.c (check_default_tmpl_args): Adjust for
14617 DECL_INITIALIZED_IN_CLASS_P.
14618 (instantiate_class_template): Likewise.
14619 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14620
14621 * class.c (finish_struct): Constify saved_filename.
14622
14623 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14624
14625 * class.c (duplicate_tag_error): Adjust diagnostic.
14626 (finish_struct): Locally set location to start of struct.
14627 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14628
14629 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
14630
14631 * decl.c (struct binding_level): Adjust class_shadowed comments
14632 to reflect reality.
14633 (push_class_level_binding): Adjust comments to reflect reality.
14634 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14635 Don't set TREE_VALUE on the class_shadowed list.
14636
14637 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14638
14639 * decl2.c (acceptable_java_type): Allow references too.
14640 * init.c (build_java_class_ref): When using the new ABI, search
14641 `class$' and have it mangled with `mangle_decl.'
14642 * mangle.c (write_java_integer_type_codes): New function.
14643 (write_builtin_type): Detect and mangle Java integer and real
14644 types.
14645
14646 2001-01-07 Mark Mitchell <mark@codesourcery.com>
14647
14648 * decl2.c (grokfield): Don't accept `asm' specifiers for
14649 non-static data members.
14650
14651 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14652
14653 * expr.c (cplus_expand_expr): Don't reset `target'.
14654
14655 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
14656
14657 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14658
14659 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14660
14661 * parse.y (template_datadef): Check for error_mark_node.
14662
14663 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
14664
14665 * cp-tree.def (DEFAULT_ARG): Make `x' class.
14666
14667 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
14668
14669 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14670 (record_builtin_type): Make non-static.
14671 (flag_short_double): Don't declare.
14672 (init_decl_processing): Remove the creation of many tree nodes now
14673 in c_common_nodes_and_builtins.
14674 (build_void_list_node): New function.
14675 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14676 * cp-tree.h (flag_short_wchar): Don't declare.
14677
14678 2001-01-04 Mark Mitchell <mark@codesourcery.com>
14679
14680 * call.c (build_conv): Don't use build1 for USER_CONV.
14681 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14682
14683 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
14684
14685 * lex.c (lang_init): Call c_common_lang_init.
14686
14687 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14688
14689 * search.c (lookup_fnfields_here): Remove.
14690 (look_for_overrides_r): Use lookup_fnfields_1.
14691 Ignore functions from using declarations.
14692
14693 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
14694
14695 Implement exceptions specifiers for implicit member functions.
14696 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14697 * method.c (synthesize_exception_spec): New function.
14698 (locate_dtor, locate_ctor, locate_copy): New functions.
14699 (implicitly_declare_fn): Generate the exception spec too.
14700 * search.c (check_final_overrider): Check artificial functions
14701 too.
14702 * typeck2.c (merge_exception_specifiers): New function.
14703
14704 2001-01-03 Jason Merrill <jason@redhat.com>
14705
14706 * init.c (build_default_init): New fn.
14707 (perform_member_init): Split out from here.
14708 (build_new_1): Use it. Simplify initialization logic.
14709 (build_vec_init): Take an array, rather than a pointer and maxindex.
14710 Speed up simple initializations. Don't clean up if we're assigning.
14711 * cp-tree.h: Adjust.
14712 * decl2.c (do_static_initialization): Remove TREE_VEC case.
14713 * parse.y (new_initializer): Return void_zero_node for ().
14714 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14715 * typeck2.c (digest_init): Only complain about user-written
14716 CONSTRUCTORs.
14717
14718 2000-12-22 Mike Stump <mrs@wrs.com>
14719
14720 * decl2.c: (max_tinst_depth): Increase to 50.
14721
14722 2001-01-02 Mark Mitchell <mark@codesourcery.com>
14723
14724 * class.c (invalidate_class_lookup_cache): Zero the
14725 previous_class_values.
14726 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14727 TREE_INT_CST_HIGH.
14728 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14729 * decl.c (free_bindings): New variable.
14730 (push_binding): Don't create a new binding if we have one on the
14731 free list.
14732 (pop_binding): Put old bindings on the free list.
14733 (init_decl_processing): Use size_int, not build_int_2.
14734 Register free_bindings as a GC root.
14735 (cp_make_fname_decl): Use size_int, not build_int_2.
14736 (push_inline_template_parms_recursive): Likewise.
14737 (end_template_parm_list): Likewise.
14738 (for_each_template_parm): Do not use walk_tree_without_duplicates.
14739 (tsubst_template_parms): Use size_int, not build_int_2.
14740 (tsubst): Likewise.
14741 * rtti.c (get_vmi_pseudo_type_info): Likewise.
14742
14743 2001-01-02 Richard Henderson <rth@redhat.com>
14744
14745 * parse.y (asm): Set ASM_INPUT_P.
14746
14747 2001-01-02 Jason Merrill <jason@redhat.com>
14748
14749 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14750 for v3 ABI.
14751
14752 * typeck.c (cp_truthvalue_conversion): New fn.
14753 * cvt.c (ocp_convert): Use it.
14754
14755 * cp-tree.h: Lose c-common.c decls.
14756
14757 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14758 * cvt.c (convert_to_void): Use type_unknown_p.
14759
14760 * typeck.c (strip_all_pointer_quals): Also strip quals from
14761 pointer-to-member types.
14762
14763 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
14764 parse.y as C.
14765
14766 * call.c (build_new_method_call): Do evaluate the object parameter
14767 when accessing a static member.
14768 * typeck.c (build_component_ref): Likewise.
14769
14770 2001-01-02 Andreas Jaeger <aj@suse.de>
14771
14772 * decl.c (cp_missing_noreturn_ok_p): New.
14773 (init_decl_processing): Set lang_missing_noreturn_ok_p.
14774
14775 2000-12-29 Jakub Jelinek <jakub@redhat.com>
14776
14777 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14778
14779 2000-12-29 Mark Mitchell <mark@codesourcery.com>
14780
14781 * class.c (pushclass): Remove #if 0'd code.
14782 * cp-tree.h (overload_template_name): Remove.
14783 * decl.c (store_bindings): Simplify.
14784 (pop_from_top_level): Likewise.
14785 * pt.c (overload_template_name): Remove.
14786 (instantiate_decl): Don't call push_to_top_level if it's not
14787 needed.
14788
14789 2000-12-28 Mark Mitchell <mark@codesourcery.com>
14790
14791 * pt.c (register_local_specialization): Don't return a value.
14792 (lookup_template_class): Use move-to-front heuristic when looking
14793 up template instantiations.
14794 (instantiate_decl): Only push_to_top_level when we're actually
14795 going to instantiate the template.
14796
14797 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
14798
14799 * search.c (binfo_for_vtable): Return least derived class, not
14800 most. Handle secondary vtables.
14801
14802 2000-12-22 Jason Merrill <jason@redhat.com>
14803
14804 * pt.c (more_specialized): Don't optimize len==0.
14805 (fn_type_unification): If we're adding the return type, increase len.
14806
14807 * typeck.c (build_binary_op): Fix pmf comparison logic.
14808
14809 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14810 DECL_STATIC_FUNCTION_P.
14811
14812 * semantics.c (genrtl_finish_function): Don't try to jump to
14813 return_label unless it exists.
14814
14815 In partial ordering for a call, ignore parms for which we don't have
14816 a real argument.
14817 * call.c (joust): Pass len to more_specialized.
14818 (add_template_candidate_real): Strip 'this', pass len.
14819 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
14820 (get_bindings_order): New fn. Pass len down.
14821 (get_bindings_real): Strip 'this', pass len.
14822 (fn_type_unification): Likewise.
14823 (type_unification_real): Succeed after checking 'len' args.
14824 (most_specialized_instantiation): Lose explicit_args parm.
14825 * class.c (resolve_address_of_overloaded_function): Strip 'this',
14826 pass len.
14827
14828 2000-12-21 Jason Merrill <jason@redhat.com>
14829
14830 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14831 DECL_TEMPLATE_RESULT.
14832
14833 * search.c (lookup_field_r): Call lookup_fnfields_1, not
14834 lookup_fnfields_here.
14835
14836 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14837
14838 * call.c (build_object_call): Also allow conversions that return
14839 reference to pointer to function.
14840 (add_conv_candidate): Handle totype being ref to ptr to fn.
14841 (build_field_call): Also allow members of type reference to function.
14842 Lose support for calling pointer to METHOD_TYPE fields.
14843
14844 * error.c (dump_expr): Handle *_CAST_EXPR.
14845
14846 * typeck2.c (build_scoped_ref): Always convert to the naming class.
14847
14848 * tree.c (break_out_cleanups): Lose.
14849 * cp-tree.h: Remove prototype.
14850 * typeck.c (build_component_ref): Don't break_out_cleanups.
14851 (build_compound_expr): Likewise.
14852 * semantics.c (finish_expr_stmt): Likewise.
14853
14854 2000-12-20 Richard Henderson <rth@redhat.com>
14855
14856 * cp-tree.h: Update declarations.
14857 * decl.c (finish_case_label): Return the new stmt node.
14858 * semantics.c (finish_goto_stmt): Likewise.
14859 (finish_expr_stmt, finish_return_stmt): Likewise.
14860 (finish_break_stmt, finish_continue_stmt): Likewise.
14861 (finish_asm_stmt): Likewise.
14862 * parse.y (already_scoped_stmt): Set STMT_LINENO.
14863 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14864 (simple_if, simple_stmt): Return the new stmt node.
14865 (save_lineno): New.
14866
14867 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
14868
14869 * cp-tree.h: Don't declare warn_long_long.
14870
14871 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14872
14873 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14874 IS_AGGR_TYPE.
14875
14876 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14877
14878 * pt.c (unify): Handle when both ARG and PARM are
14879 BOUND_TEMPLATE_TEMPLATE_PARM.
14880
14881 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14882
14883 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
14884 DECL_TEMPLATE_PARM_P.
14885
14886 2000-12-15 Jason Merrill <jason@redhat.com>
14887
14888 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
14889
14890 * init.c (build_new_1): Don't strip quals from type.
14891
14892 * decl.c (pushdecl): Don't check for linkage on a non-decl.
14893
14894 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
14895
14896 * call.c (build_new_function_call): Lose space before paren in
14897 error message.
14898 (build_new_method_call): Likewise.
14899
14900 * typeck2.c (build_m_component_ref): Propagate quals from datum.
14901
14902 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14903
14904 * pt.c (check_explicit_specialization): Propagate default
14905 function arguments to explicit specializations.
14906
14907 2000-12-13 DJ Delorie <dj@redhat.com>
14908
14909 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
14910 and <? operators.
14911
14912 2000-12-08 Jason Merrill <jason@redhat.com>
14913
14914 * error.c (dump_function_name): Don't let the user see __comp_ctor.
14915
14916 Clean up copy-initialization in overloading code.
14917 * call.c (build_user_type_conversion_1): Die if we are asked to
14918 convert to the same or a base type.
14919 (implicit_conversion): Avoid doing so. Lose reference binding code.
14920 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
14921 direct-initialization. Also do direct-init part of copy-init.
14922 (build_user_type_conversion): Don't provide context to convert_like.
14923 * cvt.c (ocp_convert): build_user_type_conversion will now provide
14924 the constructor call for copy-init.
14925
14926 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
14927 instantiation of a member template.
14928 (do_decl_instantiation): Not here.
14929
14930 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
14931
14932 * class.c (check_field_decls): Don't special case anonymous
14933 fields in error messages.
14934 (note_name_declared_in_class): Use %D on diagnostic.
14935
14936 * tree.c (pod_type_p): Use strip_array_types.
14937 (cp_valid_lang_attribute): Likewise.
14938 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
14939 multiple evaluations.
14940 (cp_has_mutable_p): Use strip_array_types.
14941
14942 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
14943
14944 * cp-tree.h (sufficient_parms_p): Declare new function.
14945 * call.c (sufficient_parms_p): New function, broken out of ...
14946 (add_function_candidate): ... here. Use it.
14947 (add_conv_candidate): Use it.
14948 * decl.c (grok_ctor_properties): Use it.
14949
14950 2000-12-07 Jakub Jelinek <jakub@redhat.com>
14951
14952 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
14953
14954 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
14955
14956 * decl2.c (lang_decode_option): Handle -Wformat-security.
14957
14958 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
14959
14960 * pt.c (verify_class_unification): New function.
14961 (get_class_bindings): Use it.
14962 (try_class_unification): Tidy.
14963 (unify): Handle when argument of a template-id is not
14964 template parameter dependent.
14965 (template_args_equal): Handle when TREE_CODE's do not match.
14966
14967 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
14968
14969 * lang-specs.h (c++): When invoking the stand-alone preprocessor
14970 for -save-temps, pass all relevant -Defines to it, and then don't
14971 pass them to cc1plus.
14972
14973 2000-12-05 Will Cohen <wcohen@redhat.com>
14974
14975 * decl.c (finish_case_label): Cleared
14976 more_cleanups_ok in surrounding function scopes.
14977 (define_label): Likewise.
14978
14979 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
14980
14981 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
14982 (get_matching_virtual): Remove.
14983 (look_for_overrides): Declare new function.
14984 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
14985 DECL_VINDEX here.
14986 * class.c (check_for_override): Move base class iteration code
14987 to look_for_overrides.
14988 * search.c (next_baselink): Remove.
14989 (get_virtuals_named_this): Remove.
14990 (get_virtual_destructor): Remove.
14991 (tree_has_any_destructors_p): Remove.
14992 (struct gvnt_info): Remove.
14993 (check_final_overrider): Remove `virtual' from error messages.
14994 (get_matching_virtuals): Remove. Move functionality to ...
14995 (look_for_overrides): ... here, and ...
14996 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
14997 to be overriding.
14998
14999 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
15000
15001 * typeck.c (get_delta_difference): If via a virtual base,
15002 return zero.
15003 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15004 adjustment.
15005
15006 2000-12-04 Richard Henderson <rth@redhat.com>
15007
15008 * error.c (dump_tree): Use output_add_string not OB_PUTS.
15009
15010 2000-12-04 Jason Merrill <jason@redhat.com>
15011
15012 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15013 (write_builtin_type): Pass intSI_type_node and the like through
15014 type_for_mode.
15015 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15016 Pass intSI_type_node and the like through type_for_mode.
15017 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15018 * pt.c (tsubst, unify): Likewise.
15019 * tree.c (walk_tree): Likewise.
15020 * error.c (dump_type): Likewise.
15021 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15022
15023 * Make-lang.in: Tweak top comment for emacs.
15024 (cp/TAGS): Restore.
15025
15026 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15027
15028 * class.c (clone_function_decl): Robustify.
15029
15030 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
15031
15032 * decl.c (store_bindings): Only search in the non modified
15033 old_bindings for duplicates.
15034
15035 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
15036
15037 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15038 TYPE_POLYMORPHIC_P.
15039
15040 * typeck.c (build_static_cast): Remove unused variable.
15041
15042 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
15043
15044 * pt.c: Fix typo in comment.
15045
15046 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15047
15048 * decl2.c (warn_format): Remove definition.
15049 (lang_decode_option): Handle -Wformat-nonliteral,
15050 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
15051
15052 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
15053
15054 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15055 (init_decl_processing): Don't create string_type_node,
15056 const_string_type_node, wint_type_node, intmax_type_node,
15057 uintmax_type_node, default_function_type, ptrdiff_type_node and
15058 unsigned_ptrdiff_type_node. Adjust position of call to
15059 c_common_nodes_and_builtins.
15060 (identifier_global_value): New function.
15061
15062 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
15063
15064 * call.c (standard_conversion): Reject pointer to member
15065 conversions from ambiguous, inaccessible or virtual bases.
15066 * typeck.c (build_static_cast): Don't check pointers to members
15067 specially.
15068
15069 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15070
15071 * method.c (do_build_copy_constructor): Preserve cv
15072 qualifications when accessing source object members.
15073 (do_build_assign_ref): Likewise. Remove separate diagnostics for
15074 unnamed fields.
15075
15076 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15077
15078 * method.c (do_build_assign_ref): Construct appropriately
15079 CV-qualified base reference. Don't allow const casts in base
15080 conversion.
15081
15082 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
15083
15084 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15085 incomplete return type.
15086
15087 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15088
15089 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15090 * semantics.c (finish_base_specifier): Accept a _TYPE not a
15091 _DECL.
15092
15093 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15094
15095 * spew.c (yyerror): Cope if yylval.ttype is NULL.
15096
15097 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15098
15099 * decl.c (grokdeclarator): Diagnose undefined template contexts.
15100
15101 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
15102
15103 * decl.c (grokdeclarator): Do type access control on friend
15104 class.
15105
15106 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15107
15108 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15109 bison parser ickiness.
15110 * pt.c (tsubst_friend_function): Enter namespace scope when
15111 tsubsting the function name.
15112 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15113
15114 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
15115
15116 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15117 * cvt.c (cp_convert_to_pointer): Add force parameter.
15118 Allow conversions via virtual base if forced.
15119 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15120 (ocp_convert): Likewise.
15121 * search.c (binfo_from_vbase): Return the virtual base's binfo.
15122 * typeck.c (get_delta_difference): Adjust handling of virtual
15123 bases.
15124
15125 2000-11-26 Mark Mitchell <mark@codesourcery.com>
15126
15127 * tree.c (struct list_hash): Remove.
15128 (list_hash_table): Make it be an htab.
15129 (struct list_proxy): New type.
15130 (list_hash_eq): New function.
15131 (list_hash_pieces): Renamed from ...
15132 (list_hash): ... this.
15133 (list_hash_lookup): Remove.
15134 (list_hash_add): Remove.
15135 (hash_tree_cons): Use the generic hashtable.
15136 (mark_list_hash): Remove.
15137 (init_tree): Create the hashtable.
15138
15139 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
15140
15141 * method.c (build_mangled_C9x_name): Rename to
15142 build_mangled_C99_name. Change C9X references in comments to
15143 refer to C99.
15144
15145 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15146
15147 * parse.y (unary_expr): Move VA_ARG from here ...
15148 (primary): ... to here.
15149
15150 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
15151
15152 * semantics.c (finish_id_expr): If type is error_mark, return
15153 error_mark.
15154
15155 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
15156
15157 * pt.c (lookup_template_class): Simplify loop exit constructs.
15158 Cope when there is no partial instantiation of a template
15159 template member.
15160
15161 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
15162
15163 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15164
15165 2000-11-22 Mark Mitchell <mark@codesourcery.com>
15166
15167 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15168 prefix.
15169
15170 * pt.c (do_decl_instantiate): Explicitly clone constructors and
15171 destructors that haven't already been cloned.
15172
15173 2000-11-20 Richard Henderson <rth@redhat.com>
15174
15175 * parse.y (yyparse_1): Rename the parser entry point.
15176
15177 2000-11-20 Alex Samuel <samuel@codesourcery.com>
15178
15179 * mangle.c (write_name): Use <unscoped-name> for names directly in
15180 function scope.
15181 (write_unscoped_name): Accept names directly in function scope.
15182
15183 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
15184
15185 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15186 * parse.y (extdef): Add EXPORT reduction.
15187 * spew.c (yylex): Don't skip export here.
15188
15189 2000-11-19 Mark Mitchell <mark@codesourcery.com>
15190
15191 * decl.c (init_decl_processing): Correct name of pure virtual
15192 function under the new ABI.
15193 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15194 (throw_bad_typeid): Likewise for bad typeid function.
15195
15196 2000-11-18 Mark Mitchell <mark@codesourcery.com>
15197
15198 * decl.c (grokparms): Don't even function types of `void' type,
15199 either.
15200 * mangle.c (write_type): Don't crash when confronted with the
15201 error_mark_node.
15202
15203 * decl.c (grokparms): Don't create parameters of `void' type.
15204
15205 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
15206
15207 * lex.c (mark_impl_file_chain): Delete.
15208 (init_parse): Remove call to ggc_add_string_root. No need to
15209 ggc_strdup a string constant. Do not add impl_file_chain to GC
15210 roots.
15211 (handle_pragma_implementation): No need to ggc_strdup main_filename.
15212
15213 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15214
15215 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15216
15217 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15218
15219 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15220 * decl.c (grokdeclarator): Don't reject void parms here.
15221 (require_complete_types_for_parms): Simplify, use
15222 complete_type_or_else.
15223 (grokparms): Remove bitrot. Remove funcdef parm.
15224 Deal with ellipsis parm lists here.
15225 * semantics.c (finish_parmlist): Don't append void_list_node
15226 here. Set PARMLIST_ELLIPSIS_P.
15227
15228 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
15229
15230 * typeck2.c (incomplete_type_error): Reorganize to avoid
15231 excessive diagnostics.
15232
15233 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
15234
15235 * lex.c (struct impl_files, internal_filename): Constify a char *.
15236
15237 2000-11-16 Mark Mitchell <mark@codesourcery.com>
15238
15239 * mangle.c (write_special_name_constructor): Don't generate
15240 assembler junk when confronted with an old-style constructor.
15241 (write_special_name_destructor): Likewise.
15242 (mangle_decl_string): Do it here instead.
15243
15244 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
15245
15246 * call.c (op_error): Make error messages clearer.
15247
15248 2000-11-15 Mark Mitchell <mark@codesourcery.com>
15249
15250 * decl.c (wrapup_globals_for_namespace): Don't mark things
15251 TREE_ASM_WRITTEN when they're not.
15252
15253 2000-11-15 Jason Merrill <jason@redhat.com>
15254
15255 * typeck2.c (friendly_abort): Uncount the error before handing
15256 off to fancy_abort.
15257
15258 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
15259
15260 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15261
15262 2000-11-14 Mark Mitchell <mark@codesourcery.com>
15263
15264 * class.c (build_vtbl_initializer): Fix typo in comment.
15265 * typeck.c (expr_sizeof): Don't crash on errors.
15266
15267 2000-11-14 Jim Wilson <wilson@redhat.com>
15268
15269 * lang-specs.h: Add %2 after %(cc1_options).
15270
15271 2000-11-14 Richard Henderson <rth@redhat.com>
15272
15273 * typeck.c (c_sizeof): Be strict about casting result value
15274 back to c_size_type_node.
15275 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15276
15277 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
15278
15279 * typeck.c (build_unary_op): Use boolean_increment from
15280 c-common.c, moving the relevant code there.
15281
15282 2000-11-11 Jason Merrill <jason@redhat.com>
15283
15284 * typeck.c (mark_addressable): Don't call put_var_into_stack.
15285
15286 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15287 in inlines.
15288
15289 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15290
15291 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15292 * lex.c (copy_lang_decl): Likewise.
15293
15294 2000-11-09 Mark Mitchell <mark@codesourcery.com>
15295
15296 * dump.c (cp_dump_tree): Don't dump function bodies here.
15297
15298 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15299 (dump.o): Update dependency list.
15300 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15301 (flag_dump_translation_unit): Likewise.
15302 (CP_TYPE_QUALS): Adjust definition.
15303 (DECL_C_BIT_FIELD): Remove.
15304 (SET_DECL_C_BIT_FIELD): Likewise.
15305 (CLEAR_DECL_C_BIT_FIELD): Likewise.
15306 (add_maybe_template): Likewise.
15307 (strip_array_types): Likewise.
15308 (dump_node_to_file): Likewise.
15309 (cp_dump_tree): New function.
15310 * decl.c (init_decl_processing): Set lang_dump_tree.
15311 * decl2.c (flag_dump_translation_unit): Remove.
15312 * dump.c: Move most of it to ../c-dump.c.
15313 (cp_dump_tree): New function.
15314 * pt.c (add_maybe_template): Remove.
15315 * typeck.c (strip_array_types): Likewise.
15316
15317 2000-11-07 Eric Christopher <echristo@redhat.com>
15318
15319 * decl.c (init_decl_processing): Change definition of
15320 __wchar_t to wchar_t. Remove artificial declaration of
15321 wchar_t.
15322 * lex.c: Change instances of __wchar_t to wchar_t.
15323
15324 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
15325
15326 * lex.c (do_identifier): Don't lookup_name for operators.
15327 * parse.y (operator): Save looking_for_typename.
15328 (unoperator): Restore it.
15329 * spew.c (frob_opname): Use nth_token for lookahead.
15330
15331 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
15332
15333 * decl.c (grok_op_properties): Always use coerce_new_type and
15334 coerce_delete_type.
15335 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15336 exception specification. Tidy up.
15337 (coerce_delete_type): Preserve exception specification. Tidy up.
15338
15339 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
15340
15341 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15342 (push_binding_level), error.c (cp_tree_printer), pt.c
15343 (process_partial_specialization, tsubst_template_arg_vector),
15344 search.c (lookup_member): Use memset () instead of bzero ().
15345
15346 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
15347
15348 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15349
15350 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
15351
15352 * Make-lang.in (c++.distdir): Remove.
15353
15354 2000-11-04 Mark Mitchell <mark@codesourcery.com>
15355
15356 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15357 declarations from different namespaces to be combined.
15358
15359 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
15360
15361 * decl.c: Include tm_p.h.
15362
15363 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
15364
15365 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15366
15367 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
15368
15369 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15370 (build_overload_value), repo.c (open_repo_file), xref.c
15371 (open_xref_file): Use strchr () and strrchr () instead of index ()
15372 and rindex ().
15373
15374 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
15375
15376 * call.c (build_over_call): Call fold on the CALL_EXPR.
15377
15378 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
15379
15380 * error.c (dump_template_decl): Separate template hearders with
15381 space not comma.
15382
15383 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
15384
15385 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
15386 TS_* flags with corresponding TFF_*. Adjust prototypes of
15387 functions (which used to take a tree_string_flags) to take an int.
15388
15389 * cp-tree.h (enum tree_string_flags): Remove
15390 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15391 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15392 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15393 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15394 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15395 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15396 (type_as_string, decl_as_string, expr_as_string,
15397 context_as_string): Adjust prototype.
15398
15399 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15400 instead of TS_PLAIN.
15401
15402 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15403 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15404 plain `0'.
15405
15406 2000-10-30 Mark Mitchell <mark@codesourcery.com>
15407
15408 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15409 (linkage_kind): New enumeration.
15410 (decl_linkage): New function.
15411 * decl2.c (comdat_linkage): Extend comment.
15412 * error.c (dump_function_decl): Print the arguments used to
15413 instantiate a template, even when not printing the type of the
15414 function.
15415 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15416 not TREE_PUBLIC, to test for external linkage.
15417 * tree.c (decl_linkage): New function.
15418
15419 2000-10-28 Mark Mitchell <mark@codesourcery.com>
15420
15421 * pt.c (instantiate_decl): Always instantiate static data members
15422 initialized in-class.
15423
15424 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
15425
15426 * Make-lang.in: Move all build rules here from Makefile.in,
15427 adapt to new context. Wrap all rules that change the current
15428 directory in parentheses. Expunge all references to $(P).
15429 When one command depends on another and they're run all at
15430 once, use && to separate them, not ;. Add OUTPUT_OPTION to
15431 all object-file generation rules. Delete obsolete variables.
15432
15433 * Makefile.in: Delete.
15434 * config-lang.in: Delete outputs= line.
15435
15436 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
15437
15438 * error.c (dump_function_decl): Print no space between
15439 `ptr-operator' the `type-specifier' of the return type.
15440 (dump_type_prefix): Make sure we put space at the appropriate
15441 place.
15442
15443 2000-10-23 Jason Merrill <jason@redhat.com>
15444
15445 * call.c (equal_functions): Also call decls_match for extern "C" fns.
15446
15447 2000-10-22 Jason Merrill <jason@redhat.com>
15448
15449 * call.c (build_conditional_expr): Use ocp_convert to force
15450 rvalue conversion.
15451
15452 2000-10-22 Mark Mitchell <mark@codesourcery.com>
15453
15454 * call.c (standard_conversion): Use RVALUE_CONVs for all
15455 expressions that satisfy lvalue_p, not just those that satisfy
15456 real_lvalue_p.
15457
15458 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15459
15460 * typeck.c (c_sizeof): Return an expression of `size_t' type,
15461 not one with TYPE_IS_SIZETYPE set.
15462 (dubious_conversion_warnings): Remove special-case code.
15463
15464 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
15465
15466 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15467 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15468 (dump_type_prefix): Print vector-of-int as 'int vector'.
15469 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15470 * tree.c (walk_tree): Handle VECTOR_TYPE.
15471
15472 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15473
15474 2000-10-21 Jason Merrill <jason@redhat.com>
15475
15476 * parse.y (operator): Set got_object from got_scope.
15477 Set looking_for_typename.
15478 * decl.c (lookup_name_real): Clear val after setting from_obj.
15479 Reorganize diagnostic.
15480
15481 2000-10-20 Jason Merrill <jason@redhat.com>
15482
15483 * tree.c (walk_tree): Don't walk into default args.
15484
15485 * error.c (dump_expr): Use host_integerp.
15486
15487 2000-10-20 David Edelsohn <edelsohn@gnu.org>
15488
15489 * typeck2.c (abstract_virtuals_error): Use "because" instead of
15490 "since" in error message.
15491
15492 2000-10-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15493
15494 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15495
15496 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
15497
15498 * decl.c (revert_static_member_fn): Fixed typo.
15499
15500 2000-10-19 Mark Mitchell <mark@codesourcery.com>
15501
15502 * class.c (subobject_offset_fn): New type.
15503 (dfs_record_base_offsets): Remove.
15504 (record_base_offsets): Likewise.
15505 (dfs_search_base_offsets): Likewise.
15506 (record_subobject_offset): New function.
15507 (check_subobject_offset): Likewise.
15508 (walk_subobject_offsets): Likewise.
15509 (record_subobject_offsets): Likewise.
15510 (layout_conflict_p): Reimplement.
15511 (layout_nonempty_base_or_field): Correct handling of type
15512 conflicts during layout.
15513 (layout_empty_base): Likewise.
15514 (build_base_field): Adjust to handle new representation of empty
15515 base offset table.
15516 (build_base_fields): Likewise.
15517 (layout_virtual_bases): Likewise.
15518 (splay_tree_compare_integer_csts): New function.
15519 (layout_class_type): Use a splay_tree, rather than a varray, to
15520 represent the offsets of empty bases.
15521
15522 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15523 * decl.c (select_decl): Don't return declarations that are
15524 DECL_ANTICIPATED.
15525
15526 2000-10-18 Mark Mitchell <mark@codesourcery.com>
15527
15528 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15529 (fake_std_node): New macro.
15530 * decl.c (in_std): Rename to ...
15531 (in_fake_std): ... this.
15532 (flag_no_builtin): Remove.
15533 (flag_no_nonansi_builtin): Likewise.
15534 (walk_namespaces_r): Use fake_std_node.
15535 (push_namespace): Use std_identifier.
15536 (pop_namespace): Use in_fake_std.
15537 (lookup_name_real): Use fake_std_node.
15538 (init_decl_processing): When -fhonor-std, create the `std'
15539 namespace. Don't create a dummy fake_std_node in that case.
15540 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
15541 (builtin_function): Put builtins whose names don't begin
15542 with `_' in the std namespace.
15543 * decl2.c (flag_no_builtin): Remove.
15544 (flag_no_nonansi_builtin): Likewise.
15545 (set_decl_namespace): Use fake_std_node.
15546 (validate_nonmember_using_decl): Likewise.
15547 (do_using_directive): Likewise.
15548 (handle_class_head): Likewise.
15549 * dump.c (dequeue_and_dump): Likewise.
15550 * except.c (init_exception_processing): Use std_identifier.
15551 * init.c (build_member_call): Use fake_std_node.
15552 * rtti.c (init_rtti_processing): Use std_identifier.
15553
15554 2000-10-17 Mark Mitchell <mark@codesourcery.com>
15555
15556 * cp-tree.h (back_end_hook): Remove declaration.
15557 * decl2.c (back_end_hook): Remove definition.
15558
15559 * dump.c (dequeue_and_dump): Dump TREE_USED.
15560
15561 2000-10-17 Brad Lucier <lucier@math.purdue.edu>
15562
15563 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15564
15565 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15566
15567 * decl.c (WINT_TYPE): Define.
15568 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15569 c_size_type_node, signed_size_type_node and wint_type_node.
15570
15571 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
15572
15573 * decl2.c (warn_missing_format_attribute): New variable.
15574 (lang_decode_option): Decode -Wmissing-format-attribute.
15575
15576 2000-10-16 Mark Mitchell <mark@codesourcery.com>
15577
15578 * typeck.c (qualify_type): Remove.
15579 (composite_pointer_type): Fix handling of conversions to `cv void*'.
15580
15581 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15582
15583 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15584
15585 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15586
15587 * Makefile.in (parse.c, parse.h): Create atomically.
15588
15589 2000-10-12 Mark Mitchell <mark@codesourcery.com>
15590
15591 * class.c (current_obstack): Remove.
15592 * decl.c (ggc_p): Remove.
15593 (start_decl): Don't use decl_tree_cons.
15594 (grokdeclarator): Don't use build_decl_list.
15595 (start_function): Don't use decl_tree_cons.
15596 (finish_function): Don't mess with obstacks.
15597 * decl2.c (grok_x_components): Don't use build_decl_list.
15598 * lex.c (make_call_declarator): Don't call decl_tree_cons.
15599 (implicitly_declare_fn): Don't call build_decl_list.
15600 * parse.y (frob_specs): Don't call build_decl_list or
15601 decl_tree_cons.
15602 (expr_or_declarator_intern): Don't call decl_tree_cons.
15603 (primary): Don't call build_decl_list.
15604 (fcast_or_absdcl): Likewise.
15605 (typed_declspecs): Don't call decl_tree_cons.
15606 (reserved_declspecs): Don't call build_decl_list.
15607 (declmods): Likewise.
15608 (reserved_typespecquals): Likewise.
15609 (aggr): Likewise.
15610 (new_type_id): Likewise.
15611 (cv_qualifiers): Likewise.
15612 (after_type_declarator_intern): Likewise.
15613 (notype_declarator_intern): Likewise.
15614 (absdcl_intern): Likewise.
15615 (named_parm): Likewise.
15616 * pt.c (most_specialized_class): Likewise.
15617 * repo.c (temporary_obstack): Make it a structure, not a pointer.
15618 (init_repo): Initialize it.
15619 * search.c (current_obstack): Remove.
15620 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15621
15622 2000-10-09 Richard Henderson <rth@cygnus.com>
15623
15624 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15625 (c++ language support bits for libgcc): Remove.
15626 (c++.clean): Remove cplib2.txt cleanup.
15627 * config-lang.in (headers, lib2funcs): Remove.
15628
15629 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15630 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15631 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15632 * inc/new.h, inc/typeinfo: Remove files.
15633
15634 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
15635
15636 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15637 defined.
15638 (init_decl_processing): Initialize intmax_type_node and
15639 uintmax_type_node.
15640
15641 2000-10-06 Richard Henderson <rth@cygnus.com>
15642
15643 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15644 (original_result_rtx): Remove.
15645 * decl.c (save_function_data): Don't clear x_result_rtx.
15646 (mark_lang_function): Don't mark it either.
15647 * expr.c (fixup_result_decl): Remove.
15648 * semantics.c (genrtl_named_return_value): Frob the return decl
15649 before calling emit_local_var.
15650 (genrtl_finish_function): Don't call fixup_result_decl.
15651 Always emit the jump to return_label.
15652
15653 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
15654
15655 * pt.c (lookup_template_class): Set current access for enum.
15656 (tsubst_enum): Set file & line for enum decl.
15657
15658 * spew.c (yylex): Remove unused variable.
15659
15660 2000-10-05 Richard Henderson <rth@cygnus.com>
15661
15662 * semantics.c (genrtl_finish_function): Don't init or check
15663 can_reach_end; remove noreturn and return value checks.
15664
15665 2000-10-05 Tom Tromey <tromey@cygnus.com>
15666
15667 * init.c (build_java_class_ref): Use `build_static_name' with a
15668 suffix, not a prefix, to build the class object's name.
15669
15670 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15671
15672 * cp-tree.h (access_kind): Fix comment typo.
15673 * decl2.c (grokfield): Fix diagnostic typo.
15674 * semantics.c (finish_template_type): Fix comment typo.
15675 (finish_qualified_object_call_expr): Likewise.
15676
15677 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15678
15679 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15680 tsubsting fails.
15681
15682 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
15683
15684 * spew.c (frob_id): New static function.
15685 (frob_opname): Use it.
15686 (yylex): Use it.
15687
15688 2000-10-01 Mark Mitchell <mark@codesourcery.com>
15689
15690 * decl.c (lang_mark_false_label_stack): Remove.
15691 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15692
15693 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
15694
15695 * gxxint.texi: Use @email for formatting email addresses.
15696
15697 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
15698
15699 * error.c: Remove direct obstack manipulation. Replace with
15700 output_buffer-based formatting. Adjust calls to removed macros.
15701 (obstack_chunk_alloc, obstack_chunk_free): Remove.
15702 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15703 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15704
15705 2000-09-24 Mark Mitchell <mark@codesourcery.com>
15706
15707 * ir.texi: Move to ../c-tree.texi.
15708
15709 2000-09-20 Jason Merrill <jason@redhat.com>
15710
15711 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15712
15713 2000-09-21 Andreas Jaeger <aj@suse.de>
15714
15715 * errfn.c: Move declaration of cp_printer and cp_printers to ...
15716 * cp-tree.h: ... here.
15717
15718 * error.c: Remove declaration of cp_printer.
15719
15720 2000-09-20 Mark Mitchell <mark@codesourcery.com>
15721
15722 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15723
15724 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
15725
15726 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15727 users.
15728
15729 2000-09-18 Mark Mitchell <mark@codesourcery.com>
15730
15731 * decl.c (start_function): Robustify.
15732
15733 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15734
15735 * cp-tree.h (check_function_format): Accept a `status' parameter.
15736
15737 * call.c, typeck.c: Updates calls to `check_function_format'.
15738
15739 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
15740
15741 * decl2.c (handle_class_head): Always push some scope even
15742 in the error case.
15743
15744 2000-09-16 Mark Mitchell <mark@codesourcery.com>
15745
15746 * cp-tree.h (struct cp_language_function): Remove
15747 x_scope_stmt_stack and name_declared.
15748 (current_scope_stmt_stack): Remove.
15749 (function_name_declared_p): New macro.
15750 (struct lang_decl_flags): Use c_lang_decl as a base class.
15751 (context): Remove.
15752 (struct lang_decl): Replace saved_tree with context.
15753 (DECL_FRIEND_CONTEXT): Adjust accordingly.
15754 (SET_DECL_FRIEND_CONTEXT): Likewise.
15755 (DECL_VIRTUAL_CONTEXT): Likewise.
15756 (DECL_SAVED_TREE): Remove.
15757 (C_DECLARED_LABEL_FLAG): Likewise.
15758 (cplus_expand_expr_stmt): Don't declare.
15759 (add_decl_stmt): Likewise.
15760 (add_scope_stmt): Likewise.
15761 * decl.c (mark_stmt_tree): Remove.
15762 (case_compare): Likewise.
15763 (finish_case_label): Use c_add_case_label.
15764 (init_decl_processing): Set more language-specific hooks.
15765 (build_enumerator): Fix typo in comment.
15766 (cplus_expand_expr_stmt): Remove.
15767 (mark_lang_function): Use mark_c_language_function.
15768 (lang_mark_tree): Use c_mark_lang_decl.
15769 * decl2.c: Change order of inclusion.
15770 * except.c: Likewise.
15771 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
15772 back on c_expand_expr.
15773 * friend.c: Include expr.h.
15774 * init.c: Change order of inclusion.
15775 * Makefile.in: Update dependencies.
15776 * lex.h (free_lang_decl_chain): Remove.
15777 * optimize.c (maybe_clone_body): Use function_name_declared_p.
15778 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15779 it doesn't exist.
15780 (instantiate_decl): Use function_name_declared_p.
15781 * semantics.c (lang_expand_expr_stmt): Remove.
15782 (set_current_function_name_declared): Likewise.
15783 (current_function_name_declared): Likewise.
15784 (begin_compound_stmt): Use function_name_declared_p.
15785 (add_decl_stmt): Remove.
15786 (setup_vtbl_ptr): Use function_name_declared_p.
15787 (add_scope_stmt): Remove.
15788 (current_scope_stmt_stack): New function.
15789 (cp_expand_stmt): Don't handle SCOPE_STMTs.
15790 (expand_body): Use function_name_declared_p.
15791 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15792 * typeck.c: Change order of includes.
15793 (convert_sequence): Remove.
15794
15795 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
15796
15797 * lex.c (reswords): Add _Complex.
15798
15799 2000-09-14 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15800
15801 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15802
15803 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
15804
15805 * init.c (begin_init_stmts): Don't use // comments.
15806
15807 2000-09-12 Jason Merrill <jason@redhat.com>
15808
15809 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15810 all non-extern arrays.
15811
15812 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15813 typenames, too. Downgrade complaint to pedwarn.
15814 (xref_tag): Warn about surprising behavior of 'friend struct T'.
15815 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15816 'class This::Inherited'.
15817
15818 2000-09-12 Mark Mitchell <mark@codesourcery.com>
15819
15820 * decl.c (finish_case_label): Given the LABEL_DECL a
15821 DECL_CONTEXT.
15822
15823 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
15824
15825 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15826 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15827 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15828 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15829 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15830 New macros.
15831 (sorry_for_unsupported_tree, print_scope_operator,
15832 print_left_paren, print_right_paren, print_left_bracket,
15833 print_right_bracket, print_whitespace): Likewise.
15834 (aggr_variety): Rename to class_key_or_enum.
15835 (print_type): Rename to print_type_id.
15836 (print_type_specifier_seq, print_simple_type_specifier,
15837 print_elaborated_type_specifier,
15838 print_rest_of_abstract_declarator,
15839 print_parameter_declaration_clause, print_exception_specification,
15840 print_nested_name_specifier, print_template_id,
15841 typedef_original_name, print_template_argument_list_start,
15842 print_template_argument_list_end): New functions.
15843
15844 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
15845
15846 * ir.texi: Add more documentation.
15847
15848 2000-09-11 Mark Mitchell <mark@codesourcery.com>
15849
15850 * cp-tree.h (struct saved_scope): Remove x_function_parms.
15851 (current_function_parms): Don't define.
15852 (struct cp_language_function): Remove parms_stored.
15853 (current_function_just_assigned_this): Don't define.
15854 (current_function_parms_stored): Likewise.
15855 (static_ctors): Declare.
15856 (static_dtors): Likewise.
15857 (SF_EXPAND): Don't define.
15858 (expand_start_early_try_stmts): Remove declaration.
15859 (store_parm_decls): Likewise.
15860 * decl.c (static_ctors): Don't declare.
15861 (static_dtors): Likewise.
15862 (struct binding_level): Remove this_block.
15863 (poplevel): Remove dead code.
15864 (set_block): Likewise.
15865 (mark_binding_level): Don't mark this_block.
15866 (mark_saved_scope): Don't mark x_function_parms.
15867 (init_decl_processing): Don't add current_function_parms as a GC
15868 root.
15869 (check_function_type): Change prototype.
15870 (start_function): Remove RTL-generation code.
15871 (expand_start_early_try_stmts): Remove.
15872 (store_parm_decls): Give it internal linkage. Remove
15873 RTL-generation code.
15874 (finish_function): Remove RTL-generation code.
15875 * decl2.c (static_ctors): Fix formatting.
15876 (static_dtors): Likewise.
15877 * method.c (use_thunk): Don't call store_parm_decls.
15878 (synthesize_method): Likewise.
15879 * optimize.c (maybe_clone_body): Likewise.
15880 * parse.y (fn.def2): Likewise.
15881 (.set_base_init): Likewise.
15882 (nodecls): Likewise.
15883 * pt.c (instantiate_decl): Likewise.
15884 * rtti.c (synthesize_tinfo_fn): Likewise.
15885 * semantics.c (genrtl_try_block): Simplify.
15886 (expand_body): Use genrtl_start_function and
15887 genrtl_finish_function.
15888 (genrtl_start_function): New function.
15889 (genrtl_finish_function): Likewise.
15890
15891 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15892
15893 * error.c (cp_tree_printer, case 'P'): Append break.
15894
15895 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
15896
15897 * cp-tree.h (frob_opname): Declare.
15898 * parse.y (saved_scopes): New static variable.
15899 (cp_parse_init): Adjust.
15900 (do_id): If lastiddecl is NULL, do do_identifier.
15901 (operator): Save scope information.
15902 (unoperator): New reduction. Restore scope information.
15903 (operator_name): Append unoperator. Call frob_opname.
15904 * spew.c (frob_opname): Define.
15905
15906 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
15907
15908 * decl.c, rtti.c: Include defaults.h if not already included.
15909 Don't define the *_TYPE_SIZE macros.
15910
15911 2000-09-09 Mark Mitchell <mark@codesourcery.com>
15912
15913 * cp-tree.h (push_switch): Change prototype.
15914 (check_cp_case_value): Remove declaration.
15915 (decl_constant_value): Likewise.
15916 * decl.c (struct cp_switch): Add switch_stmt and cases.
15917 (case_compare): New function.
15918 (push_switch): Set switch_stmt. Initialize cases.
15919 (pop_switch): Clean up cases.
15920 (define_case_label): Rename to ...
15921 (finish_case_label): ... this. Do semantic analysis for case
15922 labels here.
15923 (start_function): Correct comment.
15924 * decl2.c (check_cp_case_value): Remove.
15925 * expr.c (do_case): Remove.
15926 * pt.c (tsubst_expr): Adjust call to finish_case_label.
15927 * semantics.c (genrtl_do_poplevel): Remove declaration.
15928 (RECHAIN_STMTS): Remove.
15929 (finish_break_stmt): Use build_break_stmt.
15930 (finish_continue_stmt): Use build_continue_stmt.
15931 (finish_switch_cond): Adjust condition here, rater than in
15932 c_expand_start_case.
15933 (finish_case_label): Remove.
15934 * typeck.c (c_expand_return): Remove.
15935 (c_expand_start_case): Likewise.
15936
15937 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
15938
15939 * ir.texi: Document type nodes.
15940
15941 2000-09-06 Mark Mitchell <mark@codesourcery.com>
15942
15943 * cp-tree.h (init_cp_semantics): Declare.
15944 (genrtl_try_block): Don't declare.
15945 (genrtl_handler): Likewise.
15946 (genrtl_catch_block): Likewise.
15947 (genrtl_ctor_stmt): Likewise.
15948 (genrtl_subobject): Likewise.
15949 (genrtl_do_poplevel): Likewise.
15950 (genrtl_named_return_value): Likewise.
15951 * lex.c (init_parse): Call init_cp_semantics.
15952 * semantics.c (genrtl_try_block): Give it internal linkage.
15953 (genrtl_handler): Likewise.
15954 (genrtl_catch_block): Likewise.
15955 (genrtl_ctor_stmt): Likewise.
15956 (genrtl_subobject): Likewise.
15957 (genrtl_do_poplevel): Likewise.
15958 (genrtl_named_return_value): Likewise.
15959 (lang_expand_stmt): Rename to ...
15960 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
15961 (init_cp_semantics): Define.
15962
15963 * decl.c (initialize_local_var): Remove RTL-generating code.
15964 * semantics.c (genrtl_try_block): Fix formatting.
15965
15966 Move statement-tree facilities from C++ to C front-end.
15967 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
15968 (void_zero_node): Remove.
15969 (stmt_tree): Likewise.
15970 (scope_chain): Adjust.
15971 (language_function): Rename to cp_language_function.
15972 (cp_function_chain): Adjust.
15973 (current_stmt_tree): Remove.
15974 (last_tree): Likewise.
15975 (last_expr_type): Likewise.
15976 (struct lang_decl): Adjust.
15977 (STMT_IS_FULL_EXPR_P): Remove.
15978 (add_tree): Remove.
15979 (begin_stmt_tree): Likewise.
15980 (finish_stmt_tree): Likewise.
15981 (walk_tree_fn): Likewise.
15982 (walk_stmt_tree): Likewise.
15983 * class.c (finish_struct): Replace use of add_tree with add_stmt.
15984 * decl.c (mark_stmt_tree): Adjust type.
15985 (init_decl_processing): Don't build void_zero_node.
15986 (initialize_local_var): Adjust usage of current_stmt_tree.
15987 (finish_enum): Use add_stmt, not add_tree.
15988 (save_function_data): Adjust use of language_function.
15989 (finish_constructor_body): Use add_stmt, not add_tree.
15990 (finish_destructor_body): Likewise.
15991 (push_cp_function_context): Adjust use of language_function.
15992 (pop_cp_function_context): Likewise.
15993 (mark_lang_function): Likewise.
15994 (mark_cp_function_context): Likewise.
15995 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
15996 (build_vec_init): Likewise.
15997 * semantics.c (SET_LAST_STMT): Remove.
15998 (RECHAIN_STMTS): Don't use it.
15999 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16000 (current_stmt_tree): Define.
16001 (add_tree): Remove.
16002 (finish_goto_stmt): Use add_stmt, not add_tree.
16003 (finish_expr_stmt): Likewise.
16004 (begin_if_stmt): Likewise.
16005 (finish_then_clause): Likewise.
16006 (begin_while_stmt): Likewise.
16007 (begin_do_stmt): Likewise.
16008 (finish_return_stmt): Likewise.
16009 (begin_for_stmt): Likewise.
16010 (finish_break_stmt): Likewise.
16011 (finish_continue_stmt): Likewise.
16012 (begin_switch_stmt): Likewise.
16013 (finish_case_label): Likewise.
16014 (begin_try_block): Likewise.
16015 (begin_function_try_block): Likewise.
16016 (begin_handler): Likewise.
16017 (begin_catch_block): Likewise.
16018 (begin_compound_stmt): Likewise.
16019 (begin_asm_stmt): Likewise.
16020 (finish_asm_stmt): Likewise.
16021 (finish_label_stmt): Likewise.
16022 (add_decl_stmt): Likewise.
16023 (finish_subobject): Likewise.
16024 (finish_decl_cleanup): Likewise.
16025 (finish_named_return_value): Likewise.
16026 (setup_vtbl_ptr): Likewise.
16027 (add_scope_stmt): Likewise.
16028 (finish_stmt_expr): Likewise.
16029 (prune_unused_decls): Remove.
16030 (begin_stmt_tree): Likewise.
16031 (finish_stmt_tree): Likewise.
16032 (prep_stmt): Adjust use of current_stmt_tree.
16033 (lang_expand_stmt): Likewise.
16034 * tree.c (statement_code_p): Remove.
16035 (cp_statement_code_p): New function.
16036 (walk_stmt_tree): Remove.
16037 (init_tree): Set lang_statement_code_p.
16038
16039 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
16040
16041 Integrated preprocessor.
16042
16043 * Make-lang.in, Makefile.in: Remove all references to input.c,
16044 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
16045 * gxx.gperf, hash.h, input.c: Delete.
16046 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16047 initialized properly.
16048
16049 * class.c (fixup_pending_inline): Take a tree, not a
16050 struct pending_inline *. All callers changed.
16051 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16052 RID_PROTECTED entries in ridpointers[] array here.
16053 * decl.c (duplicate_decls): Do not refer to struct
16054 pending_inline.
16055 (record_builtin_type, init_decl_processing): Use RID_MAX not
16056 CP_RID_MAX.
16057 (grokdeclarator): Use C_IS_RESERVED_WORD.
16058 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16059 cpplib.
16060 (grok_x_components): Do not inspect pending_inlines chain.
16061
16062 * cp-tree.h (struct lang_identifier): Add rid_code entry.
16063 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16064 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16065 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16066 TIME_IDENTIFIER_FILEINFO): Kill.
16067 Update prototypes.
16068 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
16069 single 32-bit word.
16070 * parse.y: Call do_pending_inlines unconditionally.
16071 reinit_parse_for_method is now snarf_method. fn.defpen is no
16072 longer necessary. Remove unnecessary <itype> annotation on
16073 SCOPE. Do not refer to end_of_file or struct pending_inline.
16074 * semantics.c (begin_inline_definitions): Call
16075 do_pending_inlines unconditionally.
16076
16077 * lex.c: Remove all code now shared with C front end.
16078 Initialize cpplib properly if USE_CPPLIB. Put reserved words
16079 into the get_identifier table. Rewrite pragma handling to
16080 work with the registry. Move code to save tokens for later
16081 processing to spew.c.
16082
16083 * spew.c: Rewrite everything in terms of token streams instead
16084 of text. Move routines here from lex.c / input.c as
16085 appropriate. GC-mark trees hanging off the pending inlines
16086 chain.
16087
16088 2000-09-06 Mark Mitchell <mark@codesourcery.com>
16089
16090 * NEWS: Mention that the named return value extension has been
16091 deprecated.
16092 * cp-tree.h (original_result_rtx): Define.
16093 (TREE_REFERENCE_EXPR): Remove.
16094 (DECL_VPARENT): Likewise.
16095 (pushdecl_nonclass_level): Likewise.
16096 (store_return_init): Likewise.
16097 (reinit_lang_specific): Likewise.
16098 (genrtl_named_return_value): Change prototype.
16099 * decl.c (original_result_rtx): Remove.
16100 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16101 Do not generate RTL for local variables here.
16102 (store_return_init): Remove.
16103 * semantics.c (genrtl_named_return_value): Simplify. Fold in
16104 store_return_init.
16105 (finish_named_return_value): Adjust accordingly. Warn that this
16106 extension is deprecated.
16107 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16108
16109 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16110
16111 * pt.c (type_unification_real): Replace switch with if.
16112 (unify): Tsubst non-type parms before comparing.
16113
16114 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16115
16116 * error.c (dump_typename): New function, broken out of ...
16117 (dump_type): ... here. Use it.
16118 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16119
16120 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16121
16122 * init.c (build_offset_ref): Deal with namespace scoped
16123 TEMPLATE_ID_EXPRs.
16124
16125 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
16126
16127 * class.c (resolve_address_of_overloaded_function): Add
16128 explanation message.
16129 * decl.c (define_case_label): Reformat explanation.
16130 * decl2.c (finish_static_data_member_decl): Likewise.
16131 (grokfield): Likewise.
16132 * friend.c (do_friend): Likewise.
16133
16134 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
16135
16136 * tree.c (walk_tree): Expose tail recursion.
16137 (walk_stmt_tree): New function.
16138 * cp-tree.h: Prototype walk_stmt_tree.
16139 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16140 the BLOCKs directly. If a BLOCK has no variables after
16141 pruning, discard it.
16142 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
16143 restore the line number.
16144
16145 2000-09-05 Mark Mitchell <mark@codesourcery.com>
16146
16147 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16148 (pt.o): Remove dependency on HTAB_H.
16149 * cp-tree.h: Include hashtab.h.
16150 (walk_tree): Change prototype.
16151 (walk_tree_without_duplicates): New function.
16152 * decl.c (check_default_argument): Use it.
16153 * optimize.c (remap_decl): Adjust calls to walk_tree.
16154 (copy_body): Likewise.
16155 (expand_calls_inline): Likewise.
16156 (calls_setjmp_p): Use walk_tree_without_duplicates.
16157 * pt.c: Don't include hashtab.h.
16158 (for_each_template_parm): Use walk_tree_without_duplicates.
16159 * semantics.c (finish-stmt_tree): Likewise.
16160 (expand_body): Likewise.
16161 * tree.c (walk_tree): Add additional parameter.
16162 (walk_tree_without_duplicates): New function.
16163 (count_trees): Use it.
16164 (verify_stmt_tree): Adjust call to walk_tree.
16165 (find_tree): Use walk_tree_without_duplicates.
16166 (no_linkage_check): Likewise.
16167 (break_out_target_exprs): Adjust call to walk_tree.
16168 (cp_unsave): Likewise.
16169
16170 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
16171
16172 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16173 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16174 * cp-tree.h (TYPE_BINFO): Adjust comment.
16175 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16176 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16177 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16178 (TYPE_TEMPLATE_INFO): Likewise.
16179 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16180 * class.c (push_nested_class): Likewise.
16181 * decl.c (lookup_name_real): Likewise.
16182 (grokdeclarator): Likewise.
16183 (grok_op_properties): Likewise.
16184 (xref_tag): Likewise.
16185 (xref_basetypes): Likewise.
16186 * decl2.c (constructor_name_full): Likewise.
16187 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16188 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16189 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16190 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16191 (dump_type_suffix): Likewise.
16192 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16193 instead.
16194 (get_aggr_from_typedef): Likewise.
16195 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16196 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16197 (write_template_parm): Likewise.
16198 (write_template_template_parm): Check tree code instead of
16199 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16200 * method.c (build_overload_nested_name): Add
16201 BOUND_TEMPLATE_TEMPLATE_PARM.
16202 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16203 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16204 * pt.c (convert_template_argument): Check tree code instead of
16205 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16206 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16207 (for_each_template_parm): Adjust comment.
16208 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
16209 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16210 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
16211 template_args_equal to compare template template parameter cases.
16212 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16213 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16214 instead.
16215 * tree.c (copy_template_template_parm): Decide whether to create
16216 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16217 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16218 (copy_tree_r): Likewise.
16219 * typeck.c (comptypes): Likewise. Check tree code instead of
16220 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16221
16222 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
16223
16224 * decl.c (finish_function): Move the code for handling functions
16225 marked with the constructor and destructor attributes inside the
16226 expand_p block.
16227
16228 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16229
16230 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16231
16232 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16233
16234 * pt.c (lookup_template_class): Remove abort.
16235 * tree.c (get_type_decl): Allow error_mark_node.
16236
16237 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
16238
16239 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16240 TEMPLATE_ID_EXPRs.
16241
16242 2000-09-03 Mark Mitchell <mark@codesourcery.com>
16243
16244 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16245 new ABI mangling.
16246
16247 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16248
16249 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16250 union tag mismatch error reporting.
16251
16252 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
16253
16254 * call.c (build_scoped_method_call): Check it is not a namespace.
16255
16256 2000-08-30 Jason Merrill <jason@redhat.com>
16257
16258 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16259
16260 * tree.c (bot_manip): Check TREE_CONSTANT rather than
16261 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
16262 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16263
16264 * decl.c (start_function): Always call make_function_rtl.
16265
16266 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16267
16268 * semantics.c (prune_unused_decls): New function.
16269 (finish_stmt_tree): Call it via walk_tree.
16270
16271 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
16272
16273 * class.c (build_secondary_vtable): Constify a char *.
16274 * decl.c (init_decl_processing): Initialize function_id_node,
16275 pretty_function_id_node, and func_id_node.
16276 * input.c (struct input_source): Constify 'str'.
16277 (feed_input): Constify first argument.
16278 * mangle.c (write_identifier): Constify argument.
16279 * pt.c (mangle_class_name_for_template): Constify argument.
16280
16281 2000-08-29 Mark Mitchell <mark@codesourcery.com>
16282
16283 * typeck.c (mark_addressable): Remove code that pokes around in
16284 RTL.
16285
16286 2000-08-28 Jason Merrill <jason@redhat.com>
16287
16288 * lex.c (file_name_nondirectory): Move to toplev.c.
16289
16290 * cp-tree.h (LOCAL_CLASS_P): New macro.
16291 * class.c (finish_struct_1): Use it.
16292
16293 2000-08-27 Alex Samuel <samuel@codesourcery.com>
16294
16295 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16296 (write_encoding): Pass another argument to write_name.
16297 (write_name): Add ignore_local_scope parameter. Fix handling of
16298 local names.
16299 (write_nested_name): Use write_unqualified_name.
16300 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
16301 (write_template_prefix): Use write_unqualified_name.
16302 (write_component): Remove.
16303 (write_local_name): Add parameter. Use direct local entity to
16304 discriminator calculation.
16305 (write_class_enum_type): Pass another argument to write_name.
16306 (write_template_template_arg): Likewise.
16307 (make_guard_variable): Likewise.
16308
16309 2000-08-27 Jason Merrill <jason@redhat.com>
16310
16311 * decl.c (pushdecl): Matching decls for local externs are found in
16312 the current level. Propagate linkage information from previous
16313 declarations.
16314
16315 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
16316
16317 * ir.texi (Expressions): Fix typo.
16318
16319 2000-08-25 Greg McGary <greg@mcgary.org>
16320
16321 * tree.c (init_tree): Use ARRAY_SIZE.
16322
16323 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16324
16325 * error.c (cp_tree_printer): Rework.
16326
16327 2000-08-25 Mark Mitchell <mark@codesourcery.com>
16328
16329 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16330 dyn-string.o.
16331 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16332 (cp-demangle.o): Remove target.
16333 (dyn-string.o): Likewise.
16334
16335 * decl.c (grokfndecl): Require that `main' return an `int'.
16336 * mangle.c (write_encoding): Don't mangle return types for
16337 conversion functions.
16338
16339 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
16340
16341 * error.c (tree_formatting_info): New data type.
16342 (tree_being_formatted): New macro.
16343 (tree_formatting_flags): Likewise.
16344 (put_whitespace): Likewise.
16345 (print_tree_identifier): Likewise.
16346 (print_identifier): Likewise.
16347 (cp_tree_printer, print_function_argument_list, print_declaration,
16348 print_expression, print_function_declaration,
16349 print_function_parameter, print_type, print_cv_qualifier): New
16350 functions.
16351 (init_error): Initialize lang_printer.
16352
16353 2000-08-24 Jason Merrill <jason@redhat.com>
16354
16355 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16356 adjustment necessary.
16357
16358 2000-08-24 Greg McGary <greg@mcgary.org>
16359
16360 * cp-tree.h (MAIN_NAME_P): Remove macro.
16361
16362 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
16363
16364 * error.c (print_instantiation_context): Don't forget to flush the
16365 buffer.
16366
16367 2000-08-23 Jason Merrill <jason@redhat.com>
16368
16369 * typeck.c (build_ptrmemfunc): Save the input pmf.
16370
16371 * method.c (process_modifiers): Use same_type_p.
16372
16373 2000-08-23 Mark Mitchell <mark@codesourcery.com>
16374
16375 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16376 * mangle.c (write_function_type): Change prototype.
16377 (write_encoding): Don't mangle return types for
16378 constructors or destructors.
16379 (write_type): Adjust call to write_function_type.
16380 * pt.c (instantiate_template): Instantiate alternate entry points
16381 when instantiating the main function.
16382
16383 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16384
16385 * error.c (cp_print_error_function): Don't use embedded '\n' in
16386 output_printf.
16387
16388 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
16389
16390 * decl.c (init_decl_processing): Remove bogus initialization.
16391 * error.c (lang_print_error_function): Restore here.
16392 (init_error): Initialize print_error_function.
16393
16394 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16395
16396 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16397
16398 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
16399
16400 * Makefile.in (error.o): Depends on diagnostic.h
16401
16402 * cp-tree.h (problematic_instantiation_changed,
16403 record_last_problematic_instantiation, current_instantiation,
16404 print_instantiation_context): Declare.
16405 (maybe_print_template_context): Remove.
16406
16407 * decl.c (init_decl_processing): Set print_error_function to NULL.
16408 (lang_print_error_function): Remove, since we're using a new
16409 machinery.
16410
16411 * error.c: #include diagnostic.h
16412 (function_category): New function.
16413 (cp_diagnostic_starter): Likewise.
16414 (cp_diagnostic_finalizer): Likewise.
16415 (cp_print_error_function): Likewise.
16416 (maybe_print_instantiation_context): Likewise.
16417 (print_instantiation_full_context): Likewise.
16418 (print_instantiation_partial_context): Likewise.
16419 (print_instantiation_context): Define.
16420 (init_error): Initialize diagnostic pager and finalizer.
16421
16422 * pt.c (problematic_instantiation_changed): Define.
16423 (record_last_problematic_instantiation): Likewise.
16424 (current_instantiation): Likewise.
16425 (maybe_print_template_context): Remove.
16426 (print_template_context): Likewise.
16427 (current_tinst_level): Make static to reflect Brendan Kehoe's
16428 change of 1995-04-13.
16429 (push_tinst_level): Call print_instantiation_context.
16430
16431 2000-08-21 Nix <nix@esperi.demon.co.uk>
16432
16433 * lang-specs.h: Do not process -o or run the assembler if
16434 -fsyntax-only.
16435
16436 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
16437
16438 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16439 variables.
16440 * decl2.c (lang_decode_option): Disable gettext attributes for
16441 -ansi.
16442
16443 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
16444
16445 * lex.c (lang_init_options): Default diagnostic message maximum
16446 length to 80, when line-wrapping.
16447
16448 2000-08-20 Mark Mitchell <mark@codesourcery.com>
16449
16450 * class.c (build_vtbl_initializer): Clear the entire
16451 vtbl_init_data. Start keeping track of the functions for which we
16452 have created vcall offsets here.
16453 (dfs_build_vcall_offset_vtbl_entries): Remove.
16454 (build_vcall_offset_vtbl_entries): Reimplement.
16455 (add_vcall_offset_vtbl_entries_r): New function.
16456 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
16457 computing when vcall offsets are necessary.
16458
16459 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16460
16461 * decl.c (member_function_or_else): Use cp_error ... %T.
16462 (grokdeclarator): Likewise.
16463 (start_method): Likewise.
16464 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16465
16466 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16467
16468 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16469 TYPE_DECLs.
16470
16471 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16472
16473 * cp-tree.h (PTRMEM_OK_P): New macro.
16474 (itf_ptrmem_ok): New enumeration value.
16475 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16476 argument. Diagnose implicit pointer to member.
16477 (instantiate_type): Don't diagnose implicit pointer to member
16478 here. Pass itf_ptrmem_ok if ok. Adjust calls to
16479 resolve_address_of_overloaded_function.
16480 * init.c (build_offset_ref): Set PTRMEM_OK_P.
16481 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16482 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16483 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16484 (build_unary_op): Deal with single non-static member in
16485 microsoft-land.
16486
16487 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16488
16489 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16490
16491 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
16492
16493 * cp-tree.h (enum_name_string): Remove prototype.
16494 (report_case_error): Remove prototype.
16495 * cp/typeck2.c (enum_name_string): Remove.
16496 (report_case_error): Remove.
16497 * error.c (dump_expr): Deal with enum values directly.
16498 Correctly negate integer constant.
16499
16500 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16501
16502 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16503 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16504 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16505 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16506 (__cxa_vec_new): Use __cxa_vec_new2.
16507 (__cxa_vec_delete): Use __cxa_vec_delete2.
16508
16509 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16510
16511 * vec.cc (__cxa_vec_new): Set "C" linkage.
16512 (__cxa_vec_ctor): Likewise.
16513 (__cxa_vec_cctor): Likewise.
16514 (__cxa_vec_dtor): Likewise.
16515 (__cxa_vec_delete): Likewise.
16516 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16517 (__cxa_vec_ctor): Likewise.
16518 (__cxa_vec_cctor): Likewise.
16519 (__cxa_vec_dtor): Likewise.
16520 (__cxa_vec_delete): Likewise.
16521
16522 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16523
16524 * class.c (instantiate_type): Reinstate local variable
16525 deleted in previous change.
16526
16527 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16528 itf_no_attributes.
16529
16530 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16531
16532 * cp-tree.h (instantiate_type_flags): New enumeration.
16533 (instantiate_type): Change parameter.
16534 * class.c (instantiate_type): Adjust prototype. Adjust.
16535 * call.c (standard_conversion): Adjust instantiate_type call.
16536 (reference_binding): Likewise.
16537 (build_op_delete_call): Likewise.
16538 (convert_like_real): Likewise.
16539 * cvt.c (cp_convert_to_pointer): Likewise.
16540 (convert_to_reference): Likewise.
16541 * pt.c (convert_nontype_argument): Likewise.
16542 * typeck.c (build_binary_op): Likewise.
16543 (build_ptrmemfunc): Likewise.
16544 (convert_for_assignment): Likewise.
16545
16546 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
16547
16548 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16549 (current_aggr): Define.
16550 * decl.c (grokdeclarator): Make sure a friend class is an
16551 elaborated type specifier.
16552 * parse.y (current_aggr): Remove static definition.
16553 (cp_parse_init): Adjust.
16554 (structsp): Clear and restore current_aggr.
16555 (component_decl_list): Clear current_aggr.
16556
16557 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16558 aggregate tag on the typename's context.
16559
16560 * pt.c (tsubst_friend_class): Return error_mark_node, if
16561 parms becomes NULL.
16562 (instantiate_class_template): Ignore error_mark_node friend types.
16563
16564 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
16565
16566 * cvt.c (warn_ref_binding): New static function, broken out of ...
16567 (convert_to_reference): ... here. Use it.
16568
16569 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16570
16571 * parse.y (template_arg): Add rule for template qualified with
16572 global scope.
16573
16574 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16575
16576 * decl2.c (add_function): Reorganize.
16577 (arg_assoc): Do not consider function template decls.
16578
16579 2000-08-11 Jason Merrill <jason@redhat.com>
16580
16581 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16582 looking inside.
16583
16584 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16585
16586 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16587 (lookup_nested_tag): Likewise.
16588
16589 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16590 can be produced.
16591
16592 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16593
16594 * parse.y (named_complex_class_head_sans_basetype): Remove
16595 always true if.
16596
16597 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16598
16599 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16600 explicit TEMPLATE_ID_EXPR args.
16601 (build_expr_from_tree, case CALL_EXPR): Likewise.
16602
16603 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
16604
16605 * decl.c (check_tag_decl): Diagnose typename's which don't
16606 declare anything.
16607
16608 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
16609
16610 * init.c (build_aggr_init): Reject bogus array initializers
16611 early.
16612
16613 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16614
16615 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16616 runtime.
16617 * cp/tinfo.cc (__dynamic_cast): Likewise.
16618 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16619
16620 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
16621
16622 * cvt.c (convert_to_pointer_force): Fix error message when
16623 attempting to cast from ambiguous base.
16624
16625 2000-08-08 Jason Merrill <jason@redhat.com>
16626
16627 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16628 (tsubst_template_arg_vector): Likewise.
16629
16630 * decl2.c (build_anon_union_vars): Choose the largest field; don't
16631 assume that one will be as large as the union.
16632
16633 2000-08-07 Kazu Hirata <kazu@hxi.com>
16634
16635 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16636 * decl.c (pop_labels): Likewise.
16637
16638 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
16639
16640 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16641 specifications.
16642 (__pointer_to_member_type_info): Likewise.
16643 (__base_class_info): Likewise.
16644 (__class_type_info): Likewise.
16645 (__si_class_type_info): Likewise.
16646 (__vmi_class_type_info): Likewise.
16647 * tinfo.cc (__si_class_type_info::__do_find_public_src):
16648 Changed member names to match specifications.
16649 (__vmi_class_type_info::__do_find_public_src): Likewise.
16650 (__si_class_type_info::__do_dyncast): Likewise.
16651 (__vmi_class_type_info::__do_dyncast): Likewise.
16652 (__si_class_type_info::__do_upcast): Likewise.
16653 (__vmi_class_type_info::__do_upcast): Likewise.
16654 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16655 (__pbase_type_info::__pointer_catch): Likewise.
16656 (__pointer_type_info::__pointer_catch): Likewise.
16657 (__pointer_to_member_type_info::__pointer_catch): Likewise.
16658
16659 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
16660
16661 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16662 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16663 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16664
16665 2000-08-04 Mark Mitchell <mark@codesourcery.com>
16666
16667 * cp-tree.h (add_method): Change prototype.
16668 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
16669 Don't double the size of the method vector in the error case.
16670 (handle_using_decl): Adjust call to add_method.
16671 (add_implicitly_declared_members): Likewise.
16672 (clone_function_decl): Likewise.
16673 * decl2.c (check_classfn): Likewise.
16674 * semantics.c (finish_member_declaration): Likewise.
16675
16676 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
16677
16678 * decl.c (flag_isoc94): New variable.
16679
16680 2000-08-02 Jason Merrill <jason@redhat.com>
16681
16682 * pt.c (do_type_instantiation): Add complain parm; don't complain
16683 if called recursively.
16684 * cp-tree.h, parse.y: Adjust.
16685
16686 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
16687
16688 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16689 -Wno-strict-prototypes.
16690
16691 * g++spec.c: Adjust type of second argument to
16692 lang_specific_driver, and update code as necessary.
16693
16694 * cp-tree.h: Don't prototype min_precision here.
16695 (my_friendly_assert): Cast expression to void.
16696 * semantics.c (do_poplevel): Initialize scope_stmts.
16697
16698 2000-08-02 Mark Mitchell <mark@codesourcery.com>
16699
16700 * cp-tree.h (DECL_NEEDED_P): Tweak.
16701
16702 2000-07-28 Jason Merrill <jason@redhat.com>
16703
16704 * lang-specs.h: Use %i in rule for .ii files.
16705
16706 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
16707
16708 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16709
16710 2000-07-30 Mark Mitchell <mark@codesourcery.com>
16711
16712 Allow indirect primary bases.
16713 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
16714 primary_base.
16715 (CLASSTYPE_VFIELD_PARENT): Remove.
16716 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16717 (BINFO_PRIMARY_BINFO): Remove.
16718 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16719 (BINFO_VBASE_PRIMARY_P): Likewise.
16720 (BINFO_PRIMARY_BASE_OF): New macro.
16721 (BINFO_INDIRECT_PRIMARY_P): Likewise.
16722 (get_primary_binfo): New function.
16723 * decl.c (lang_mark_tree): Make lang_type::primary_base.
16724 * class.c (vcall_offset_data_s): Rename to ...
16725 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
16726 and add ctor_vtbl_p.
16727 (get_derived_offset): Use get_primary_binfo.
16728 (dfs_mark_primary_bases): Adjust handling of virtual primary
16729 bases.
16730 (mark_primary_bases): Likewise.
16731 (set_primary_base): Take a binfo, not an integer, as a
16732 representation of the primary base.
16733 (indirect_primary_base_p): Remove.
16734 (determine_primary_base): Adjust for indirect primary bases.
16735 (dfs_find_final_overrider): Fix typo in coment.
16736 (update_vtable_entry_for_fn): Use get_primary_binfo.
16737 (layout_nonempty_base_or_field): Tweak.
16738 (build_base_fields): Adjust for new primary base semantics.
16739 (dfs_propagate_binfo_offsets): Remove.
16740 (propagate_binfo_offsets): Rewrite.
16741 (dfs_set_offset_for_shared_vbases): Remove.
16742 (layout_virtual_bases): Don't use it.
16743 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16744 ABI.
16745 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16746 CLASSTYPE_VFIELD_PARENT.
16747 (dfs_get_primary_binfo): New function.
16748 (get_primary_binfo): Likewise.
16749 (dump_class_hierarchy_r): Tweak printing of primary bases.
16750 (build_vtbl_initializer): Fix typo in comments. Use
16751 vtbl_init_data.
16752 (build_vcall_and_vbase_vtbl_entries): Likewise.
16753 (build_vbaes_offset_vtbl_entries): Likewise.
16754 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16755 BV_VCALL_INDEX to handle indirect primary bases.
16756 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16757 (build_rtti_vtbl_entries): Likewise.
16758 * search.c (get_shared_vbase_if_not_primary): Tweak.
16759 (find_vbase_instance): Likewise.
16760 (binfo_for_vtable): Simplify.
16761 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16762 (make_binfo): Make it have 11 entries.
16763
16764 2000-07-30 Alex Samuel <samuel@codesourcery.com>
16765
16766 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16767 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16768 ascertaining primaryness.
16769 (G): Remove template_args.
16770 (decl_is_template_id): New function.
16771 (write_encoding): Use decl_is_template_id.
16772 (write_name): Likewise. Handle type_decls. Get main variant of
16773 type decls.
16774 (write_nested_name): Likewise.
16775 (write_prefix): Likewise.
16776 (write_template_prefix): Likewise.
16777 (write_special_name_constructor): Remove defunct production from
16778 comment.
16779 (write_bare_function_type): Remove comment about absent parameter.
16780 (write_template_template_arg): Add missing grammar production to
16781 comment.
16782
16783 2000-07-27 Jason Merrill <jason@redhat.com>
16784
16785 * decl.c (duplicate_decls): If common_type produces a non-typedef
16786 type for a typedef, just use the old type.
16787
16788 2000-07-27 Mark Mitchell <mark@codesourcery.com>
16789
16790 * cp-tree.h (function_depth): Declare.
16791 (verify_stmt_tree): Likewise.
16792 (find_tree): Likewise.
16793 * decl.c (function_depth): Give it external linkage.
16794 * optimize.c (optimize_function): Increment and decrement it.
16795 * tree.c (verify_stmt_tree_r): New function.
16796 (verify_stmt_tree): Likewise.
16797 (find_tree_r): Likewise.
16798 (find_tree): Likewise.
16799
16800 2000-07-27 Jason Merrill <jason@redhat.com>
16801
16802 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16803 TYPE_PTRMEMFUNC_P.
16804 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16805
16806 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16807
16808 * decl.c (start_cleanup_fn): Mark the function as `inline'.
16809 * decl2.c (get_guard): Call cp_finish_decl, not
16810 rest_of_decl_compilation, for local guards.
16811 * lex.c (do_identifier): Remove unused variable.
16812
16813 2000-07-26 Marc Espie <espie@cvs.openbsd.org>
16814
16815 * parse.y: Add missing ';'.
16816
16817 2000-07-26 Mark Mitchell <mark@codesourcery.com>
16818
16819 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16820 of `extern "C++"'.
16821
16822 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16823
16824 Kill strict_prototype. Backwards compatibility only for
16825 non NO_IMPLICIT_EXTERN_C systems.
16826 * cp-tree.h (flag_strict_prototype): Remove.
16827 (strict_prototype): Remove.
16828 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16829 * decl.c (maybe_push_to_top_level): Adjust.
16830 (pop_from_top_level): Adjust.
16831 (decls_match): Only allow sloppy parm matching for ancient
16832 system headers.
16833 (init_decl_processing): Adjust.
16834 (grokdeclarator): Adjust.
16835 * decl2.c (flag_strict_prototype): Remove.
16836 (strict_prototype): Remove.
16837 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16838 (lang_f_options): Remove "strict-prototype".
16839 (unsupported-options): Add "strict-prototype".
16840 * lex.c (do_identifier): Adjust.
16841 (do_scoped_id): Adjust.
16842 * parse.y (empty_parms): Adjust.
16843 * class.c (push_lang_context): Adjust.
16844 (pop_lang_context): Adjust.
16845 * typeck.c (comp_target_parms): Adjust.
16846
16847 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
16848
16849 * decl.c (poplevel): Deal with anonymous variables at for scope.
16850 (maybe_inject_for_scope_var): Likewise.
16851
16852 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
16853
16854 * decl.c: Remove all signal handling code, now done in toplev.c.
16855
16856 2000-07-23 Mark Mitchell <mark@codesourcery.com>
16857
16858 * decl.c (make_rtl_for_nonlocal_decl): Rework.
16859
16860 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16861 correctly.
16862
16863 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
16864
16865 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16866 Define my_friendly_assert and my_friendly_abort as macros
16867 which may call friendly_abort. Prototype friendly abort, not
16868 my_friendly_abort or my_friendly_assert.
16869 * decl.c (signal_catch): Report the signal caught in the error
16870 message. Call fatal directly.
16871 * typeck2.c (ack, my_friendly_assert): Delete.
16872 (my_friendly_abort): Rename to friendly_abort. Expect file,
16873 line, and function parameters. Report the abort code, then
16874 call fancy_abort. Do not mask an abort if errors have
16875 already occurred.
16876
16877 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
16878
16879 * typeck.c (comp_target_parms): Remove obsolete parameter.
16880 (comp_target_types): Adjust.
16881
16882 2000-07-17 Jason Merrill <jason@redhat.com>
16883
16884 * typeck.c (mark_addressable): Never set TREE_USED.
16885 * call.c (build_call): Don't abort on calls to library functions
16886 that have been declared normally.
16887
16888 * typeck.c (build_binary_op): Fix grammar in warning.
16889
16890 * exception.cc (__eh_free): Fix prototype.
16891
16892 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
16893
16894 * decl.c (pushdecl): Handle seeing an OVERLOAD in
16895 IDENTIFIER_NAMESPACE_VALUE.
16896
16897 2000-07-16 Mark Mitchell <mark@codesourcery.com>
16898
16899 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
16900 * method.c (use_thunk): Correct handling of vcall offsets.
16901
16902 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
16903
16904 * .cvsignore: parse.h and parse.c have no cp- prefix.
16905
16906 2000-07-13 Mark Mitchell <mark@codesourcery.com>
16907
16908 * .cvsignore: New file.
16909
16910 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
16911
16912 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
16913
16914 2000-07-12 Mark Mitchell <mark@codesourcery.com>
16915
16916 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
16917 * parse.c: Remove.
16918 * parse.h: Likewise.
16919
16920 2000-07-11 Mark Mitchell <mark@codesourcery.com>
16921
16922 * class.c (layout_class_type): Add pointers to virtual bases after
16923 base classes under the old ABI.
16924
16925 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
16926
16927 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
16928 (finish_continue_stmt): Likewise.
16929 (begin_for_stmt): Remove call to note_level_for_for.
16930 (finish_goto_stmt): Change call from build_min_nt
16931 to build_stmt.
16932 (finish_expr_stmt): Likewise.
16933 (begin_if_stmt): Likewise.
16934 (begin_while_stmt): Likewise.
16935 (finish_while_stmt): Likewise.
16936 (finish_return_stmt): Likewise.
16937 (begin_for_stmt): Likewise.
16938 (finish_for_stmt): Likewise.
16939 (finish_break_stmt): Likewise.
16940 (begin_switch_stmt): Likewise.
16941 (finish_case_label): Likewise.
16942 (genrtl_try_block): Likewise.
16943 (begin_try_block): Likewise.
16944 (begin_handler): Likewise.
16945 (begin_compound_stmt): Likewise.
16946 (finish_asm_stmt): Likewise.
16947 (finish_label_stmt): Likewise.
16948 (add_decl_stmt): Likewise.
16949 (finish_subobject): Likewise.
16950 (finish_decl_cleanup): Likewise.
16951 (finish_named_return_value): Likewise.
16952 (setup_vtbl_ptr): Likewise.
16953 (add_scope_stmt): Likewise.
16954 * decl.c (finish_constructor_body): Likewise.
16955 (finish_destructor_body): Likewise.
16956 * optimize.c (copy_body_r): Likewise.
16957 (initialize_inlined_parameters): Likewise.
16958 (declare_return_variable): Likewise.
16959 (expand_call_inline): Likewise.
16960
16961 2000-07-10 Jakub Jelinek <jakub@redhat.com>
16962
16963 * semantics.c (expand_body): Sync interface information
16964 at the end of function body expansion.
16965
16966 2000-07-09 Jason Merrill <jason@redhat.com>
16967
16968 * init.c (build_new_1): Bail early if the call to new fails.
16969
16970 * decl.c (compute_array_index_type): Check specifically for
16971 an INTEGER_CST, not just TREE_CONSTANT.
16972
16973 * decl.c (duplicate_decls): Don't call duplicate_decls on
16974 the DECL_TEMPLATE_RESULT.
16975 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
16976 codes.
16977
16978 * error.c (dump_template_bindings): Don't crash if we had an
16979 invalid argument list.
16980
16981 * typeck.c (c_expand_start_case): Do narrowing here.
16982 * semantics.c (finish_switch_cond): Not here.
16983
16984 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
16985
16986 * parse.y (asm_clobbers): Do string concatenation.
16987
16988 2000-07-09 Mark Mitchell <mark@codesourcery.com>
16989
16990 * decl.c (pushtag): Don't put local classes in template functions
16991 on the local_classes list.
16992
16993 2000-07-04 Scott Snyder <snyder@fnal.gov>
16994
16995 * decl2.c (get_guard): Add missing return for old ABI local
16996 variable case.
16997
16998 2000-07-09 Mark Mitchell <mark@codesourcery.com>
16999
17000 * cp-tree.h (char_type_p): New function.
17001 * decl.c (init_decl_processing): Don't initialize
17002 signed_wchar_type_node or unsigned_wchar_type_node.
17003 (complete_array_type): Handle brace-enclosed string-constants.
17004 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17005 * tree.c (char_type_p): New function.
17006 * typeck2.c (digest_init): Use char_type_p.
17007
17008 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17009
17010 * pt.c (tsubst): Don't layout type, if it's error_mark.
17011
17012 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
17013
17014 * pt.c (instantiate_pending_templates): Reset template level.
17015
17016 2000-07-05 Jason Merrill <jason@redhat.com>
17017
17018 * call.c (joust): Don't complain about `operator char *()' beating
17019 `operator const char *() const'.
17020
17021 2000-07-04 scott snyder <snyder@fnal.gov>
17022 Jason Merrill <jason@redhat.com>
17023
17024 * repo.c (repo_get_id): Handle the case where a class with virtual
17025 bases has a null TYPE_BINFO_VTABLE.
17026
17027 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
17028 Jason Merrill <jason@redhat.com>
17029
17030 * parse.y (member_init): Just pass in the type.
17031 * init.c (expand_member_init): Handle getting a type.
17032
17033 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17034 Jason Merrill <jason@redhat.com>
17035
17036 * decl.c (finish_function): Warn if a function has no return
17037 statement.
17038 Suggested by Andrew Koenig.
17039 * typeck.c (check_return_expr): Do set current_function_returns_value
17040 if we got an error_mark_node.
17041
17042 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17043
17044 * decl2.c (push_decl_namespace): Push the original namespace.
17045
17046 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
17047
17048 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17049 * semantics.c (begin_class_definition): Clear it.
17050
17051 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
17052
17053 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17054 (genrtl_expr_stmt): Likewise.
17055 (genrtl_decl_stmt): Likewise.
17056 (genrtl_if_stmt): Likewise.
17057 (genrtl_while_stmt): Likewise.
17058 (genrtl_do_stmt): Likewise.
17059 (genrtl_return_stmt): Likewise.
17060 (genrtl_for_stmt): Likewise.
17061 (genrtl_break_stmt): Likewise.
17062 (genrtl_continue_stmt): Likewise.
17063 (genrtl_scope_stmt): Likewise.
17064 (genrtl_switch_stmt): Likewise.
17065 (genrtl_case_label): Likewise.
17066 (genrtl_begin_compound_stmt): Likewise.
17067 (genrtl_finish_compound_stmt): Likewise.
17068 (genrtl_compound_stmt): Likewise.
17069 (genrtl_asm_stmt): Likewise.
17070
17071 * init.c (begin_init_stmts): Remove call to
17072 genrtl_begin_compound_stmt.
17073 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17074
17075 * semantics.c (lang_expand_stmt): Changed call to
17076 genrtl_compound_stmt to ignore return value.
17077
17078 2000-07-02 Mark Mitchell <mark@codesourcery.com>
17079
17080 * mangle.c (canonicalize_for_substitution): Return the canonical
17081 variant of a type.
17082
17083 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17084 TYPE_DECL.
17085 * typeck.c (commonparms): Remove obstack manipulations.
17086
17087 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
17088
17089 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17090
17091 * Makefile.in (OBJS): Added ../c-semantics.o.
17092 (OBJDEPS): Likewise.
17093
17094 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17095 ../c-common.h.
17096 (struct stmt_tree): Added comment.
17097 (current_function_name_declared): Removed.
17098 (stmts_are_full_exprs_p): Likewise.
17099 (genrtl_do_pushlevel): Likewise.
17100 (genrtl_clear_out_block): Likewise.
17101 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17102 (DECL_ANON_UNION_ELEMS): Likewise.
17103 (emit_local_var): Likewise.
17104 (make_rtl_for_local_static): Likewise.
17105 (do_case): Likewise.
17106 (expand_stmt): Likewise.
17107 (genrtl_decl_cleanup): Likewise.
17108 (c_expand_asm_operands): Likewise.
17109 (c_expand_return): Likewise.
17110 (c_expand_start_case): Likewise.
17111
17112 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17113 (emit_local_var): Likewise.
17114 (initialize_local_var): Change reference to
17115 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17116 Change reference to stmts_are_full_exprs_p to
17117 current_stmt_tree->stmts_are_full_exprs_p.
17118 (push_cp_function_context): Likewise.
17119
17120 * expect.c (expand_throw): Change reference to
17121 stmts_are_full_exprs_p.
17122
17123 * init.c (build_aggr_init): Change reference to
17124 stmts_are_full_exprs_p.
17125 (build_vec_init): Likewise.
17126
17127 * optimize.c (maybe_clone_body): Change reference to
17128 current_function_name_declared to
17129 cp_function_chain->name_declared.
17130
17131 * pt.c (instantiate_decl): Change reference to
17132 current_function_name_declared to
17133 cp_function_chain->name_declared.
17134
17135 * semantics.c (expand_cond): Moved declaration to c-common.h.
17136 (genrtl_do_pushlevel): Moved to c-semantics.c.
17137 (genrtl_clear_out_block): Likewise.
17138 (genrtl_goto_stmt): Likewise.
17139 (genrtl_expr_stmt): Likewise.
17140 (genrtl_decl_stmt): Likewise.
17141 (gerntl_if_stmt): Likewise.
17142 (genrtl_while_stmt): Likewise.
17143 (genrtl_do_stmt): Likewise.
17144 (genrtl_return_stmt): Likewise.
17145 (genrtl_for_stmt): Likewise.
17146 (genrtl_break_stmt): Likewise.
17147 (genrtl_continue_stmt): Likewise.
17148 (genrtl_scope_stmt): Likewise.
17149 (genrtl_switch_stmt): Likewise.
17150 (genrtl_case_label): Likewise.
17151 (genrtl_begin_compound_stmt): Likewise.
17152 (genrtl_finish_compound_stmt): Likewise.
17153 (genrtl_compound_stmt): Likewise.
17154 (genrtl_asm_stmt): Likewise.
17155 (genrtl_decl_cleanup): Likewise.
17156 (expand_cond): Likewise.
17157 (expand_stmt): Renamed to ...
17158 (lang_expand_stmt): ... this.
17159 (lang_expand_expr_stmt): Initialize.
17160 (set_current_function_name_declared): Likewise.
17161 (stmts_are_full_exprs_p): Likewise.
17162 (current_function_name_declared): Likewise.
17163 (anon_aggr_type_p): Likewise.
17164 (do_poplevel): Change reference to
17165 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17166 Change reference to stmts_are_full_exprs_p to
17167 current_stmt_tree->stmts_are_full_exprs_p.
17168 (add_tree): Likewise.
17169 (finish_expr_stmt): Likewise.
17170 (prep_stmt): Likewise.
17171 (lang_expand_stmt): Likewise.
17172 (begin_compound_stmt): Change reference to
17173 current_function_name_declared to
17174 cp_function_chain->name_declared and call to
17175 current_function_name_declared().
17176 (setup_vtbl_ptr): Likewise.
17177 (genrtl_do_poplevel): Removed.
17178
17179 2000-06-30 Jason Merrill <jason@redhat.com>
17180
17181 * init.c (init_init_processing): Go back to aligning like
17182 double_type_node for old ABI.
17183 (get_cookie_size): Make cookie larger if we get a type that needs
17184 more alignment.
17185 (build_vec_delete): Call it.
17186
17187 * typeck.c (qualify_type_recursive): New fn.
17188 (composite_pointer_type): Use it.
17189 (build_binary_op): Use composite_pointer_type.
17190
17191 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
17192 Jason Merrill <jason@redhat.com>
17193
17194 * typeck.c (check_return_expr): Don't complain about returning
17195 NULL from operator new if -fcheck-new.
17196 * cp-tree.h: Declare flag_check_new here.
17197 * init.c: Not here.
17198
17199 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17200
17201 * mangle.c (find_substitution): Use same_type_p.
17202 (write_encoding): Don't check for substitutions.
17203
17204 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17205
17206 * parse.y (expr_no_comma_rangle): New non-terminal.
17207 (template_parm): Use it for default parameter case.
17208 (template_arg): Use it.
17209 (expr_no_commas): Remove commented out undefined extensions.
17210 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17211 * parse.h, parse.c: Rebuilt.
17212
17213 2000-06-30 Mark Mitchell <mark@codesourcery.com>
17214
17215 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17216 (finish_asm_stmt): Do it here, instead.
17217
17218 * cp-tree.h (ridpointers): Don't declare.
17219 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17220 (record_builtin_java_type): Likewise.
17221 (init_decl_processing): Likewise.
17222 * lex.c: Move inclusion of lex.h.
17223 (ridpointers): Don't define.
17224 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
17225 RID_MAX.
17226 * lex.h (enum rid): Rename to ...
17227 (enum cp_rid): ... this.
17228 (ridpointers): Don't declare.
17229 * parse.y: Move inclusion of lex.h.
17230 * parse.c: Regenerated.
17231 * spew.c: Move inclusion of lex.h.
17232
17233 * cp-tree.h (struct language_function): Remove temp_name_counter.
17234 (temp_name_counter): Remove.
17235 (get_temp_name): Change prototype.
17236 (get_guard): New function.
17237 (get_guard_cond): Likewise.
17238 (set_guard): Likewise.
17239 * cvt.c (build_up_reference): Adjust call to get_temp_name.
17240 * decl.c (expand_static_init): Use get_guard and friends to
17241 implement guard variables.
17242 * decl2.c (get_temp_name): Assume that the variables created are
17243 always static.
17244 (get_sentry): Rename to ...
17245 (get_guard): ... this. Implement new ABI guard variables.
17246 (get_guard_bits): New function.
17247 (get_guard_cond): Likewise.
17248 (set_guard): Likewise.
17249 (start_static_initialization_or_destruction): Use them.
17250 (do_static_initialization): Replace sentry with guard throughout.
17251 (do_static_destruction): Likewise.
17252 * init.c (create_temporary_var): Add comment.
17253
17254 2000-06-28 Alex Samuel <samuel@codesourcery.com>
17255
17256 * mangle.c (find_substitution): Use same_type_p.
17257 (write_encoding): Don't check for substitutions.
17258
17259 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
17260
17261 * parse.y (expr_no_comma_rangle): New non-terminal.
17262 (template_parm): Use it for default parameter case.
17263 (template_arg): Use it.
17264 (expr_no_commas): Remove commented out undefined extensions.
17265 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17266 * parse.h, parse.c: Rebuilt.
17267
17268 2000-06-29 Mark Mitchell <mark@codesourcery.com>
17269
17270 * cp-tree.h (flag_const_strings): Remove.
17271 (warn_parentheses): Likewise.
17272 (warn_format): Likewise.
17273 (common_type): Likewise.
17274 (default_conversion): Likewise.
17275 (build_binary_op): Likewise.
17276 (cp_build_binary_op): New macro.
17277 * call.c (build_new_op): Use cp_build_binary_op instead of
17278 build_binary_op.
17279 * class.c (build_vtable_entry_ref): Likewise.
17280 * decl.c (expand_static_init): Likewise.
17281 (compute_array_index_type): Likewise.
17282 (build_enumerator): Likewise.
17283 * decl2.c (delete_sanity): Likewise.
17284 (start_static_initialization_or_destruction): Likewise.
17285 * error.c (dump_type_suffix): Likewise.
17286 * init.c (resolve_offset_ref): Likewise.
17287 (build_new): Likewise.
17288 (build_new_1): Likewise.
17289 (build_vec_delete_1): Likewise.
17290 (build_vec_init): Likewise.
17291 (build_delete): Likewise.
17292 * rtti.c (synthesize_tinfo_fn): Likewise.
17293 (synthesize_tinfo_var): Likewise.
17294 * search.c (expand_upcast_fixups): Likewise.
17295 (fixup_all_virtual_upcast_offsets): Likewise.
17296 * typeck.c (build_array_ref): Likewise.
17297 (get_member_function_from_ptrfunc): Likewise.
17298 (build_binary_op): Add parameter.
17299 (pointer_int_sum): Use cp_build_binary_op.
17300 (pointer_diff): Likewise.
17301 (build_modify_expr): Likewise.
17302 (get_delta_difference): Likewise.
17303 (build_ptrmemfunc): Likewise.
17304
17305 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
17306
17307 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17308 * decl.c (create_implicit_typedef): Adjust.
17309 * decl2.c (build_artificial_parm): Adjust.
17310 * method.c (implicitly_declare_fn): Adjust.
17311 * pt.c (push_inline_template_parms_recursive): Adjust.
17312 (process_template_parm): Adjust.
17313 (overloaded_template_name): Adjust.
17314 * semantics.c (finish_template_template_parm): Adjust.
17315
17316 2000-06-28 Mark Mitchell <mark@codesourcery.com>
17317
17318 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17319 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17320 where to emit thunks.
17321 (build_vtt): Adjust call to build_vtt_inits.
17322 (build_vtt_inits): Add parameter to indicate whether or not
17323 sub-VTTs for virtual bases should be included. Adjust handling of
17324 construction vtables.
17325 (get_matching_base): New function.
17326 (dfs_build_vtt_inits): Rename to ...
17327 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17328 construction vtables.
17329 (dfs_fixup_binfo_vtbls): Likewise.
17330 (build_ctor_vtbl_groups): Build construction vtables for virtual
17331 bases, too.
17332 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17333 to build construction vtbls.
17334 (dfs_accumulate_vtbl_inits): Adjust handling of
17335 construction vtables.
17336
17337 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17338 types correctly.
17339
17340 2000-06-27 Mark Mitchell <mark@codesourcery.com>
17341
17342 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17343
17344 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17345
17346 * search.c (hides): Remove.
17347 (is_subobject_of_p): Add most_derived parameter. Use
17348 CANONICAL_BINFO.
17349 (lookup_field_queue_p): Adjust.
17350 (lookup_field_r): Adjust.
17351
17352 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
17353
17354 * decl2.c (handle_class_head): Bash typedefs to the type's main
17355 decl.
17356
17357 2000-06-25 Mark Mitchell <mark@codesourcery.com>
17358
17359 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17360 (begin_global_stmt_expr): ... this.
17361 (genrtl_finish_stmt_expr): Rename to ...
17362 (finish_global_stmt_expr): ... this.
17363 * init.c (begin_init_stmts): Adjust calls.
17364 (finish_init_stmts): Likewise.
17365 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17366 (begin_global_stmt_expr): ... this.
17367 (genrtl_finish_stmt_expr): Rename to ...
17368 (finish_global_stmt_expr): ... this.
17369
17370 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17371
17372 * search.c (lookup_member): Fix typo in comment.
17373
17374 2000-06-24 Jason Merrill <jason@redhat.com>
17375
17376 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17377 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17378
17379 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
17380
17381 * parse.y (complex_direct_notype_declarator): Support global_scope.
17382 * Makefile.in: Adjust conflict count.
17383
17384 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17385
17386 * parse.y (template_arg): Convert TEMPLATE_DECL
17387 that is a template template parameter to
17388 TEMPLATE_TEMPLATE_PARM here.
17389
17390 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17391 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17392 (copy_template_template_parm): Adjust prototype.
17393 * decl.c (grokdeclarator): Remove dead code.
17394 * pt.c (process_template_parm): Tidy.
17395 (lookup_template_class): Construct nodes in
17396 copy_template_template_parm.
17397 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17398 lookup_template_class. Use TYPE_TI_TEMPLATE.
17399 * tree.c (copy_template_template_parm): Add NEWARGS
17400 parameter.
17401 (mapcar): Adjust call to copy_template_template_parm.
17402 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17403 * method.c (build_template_template_parm_names): Change error
17404 code to avoid compilation warning.
17405
17406 * gxxint.texi: Document template template parameter
17407 name mangling.
17408
17409 2000-06-21 Alex Samuel <samuel@codesourcery.com>
17410
17411 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17412 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17413 (cp-demangle.o): New rule.
17414 (dyn-string.o): Likewise.
17415 * inc/cxxabi.h (__cxa_demangle): New declaration.
17416
17417 2000-06-22 Mark Mitchell <mark@codesourcery.com>
17418
17419 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17420 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17421 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
17422 a tree, not an int.
17423 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17424 (make_thunk): Change prototype.
17425 (emit_thunk): Rename to use_thunk.
17426 (mangle_thunk): Change prototype.
17427 * class.c (get_derived_offset): Simplify.
17428 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17429 BV_GENERATE_THUNK_WITH_VTABLE_P.
17430 (build_primary_vtable): Simplify.
17431 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17432 (dfs_find_base): Remove.
17433 (update_vtable_entry_for_fn): Correct bug in finding the base
17434 where a virtual function was first declared. Figure out whether
17435 or not to emit a vcall-thunk with the vtables in which it appears.
17436 Correct logic for deciding whether to use an ordinary thunk, or a
17437 vcall thunk.
17438 (finish_struct_1): Remove unnecssary code.
17439 (build_vtbl_initializer): Use ssize_int for the running counter of
17440 negative indices.
17441 (build_vtbl_initializer): Only use vcall thunks where necessary.
17442 Mark thunks as needing to be emitted with their vtables, or not.
17443 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17444 indices. Use size_binop.
17445 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17446 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
17447 size_binop.
17448 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17449 (build_vtable_entry): Mark thunks as needing to be emitted with
17450 their vtables, or not.
17451 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17452 * decl2.c (mark_vtable_entries): Use use_thunk instead of
17453 emit_thunk.
17454 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
17455 information.
17456 * error.c (dump_expr): Use BV_FN.
17457 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17458 not an int.
17459 * method.c (make_thunk): Likewise.
17460 (emit_thunk): Rename to use_thunk. Allow callers to decide
17461 whether or not to actually emit the thunk. Adjust for changes in
17462 representation of vcall offsets.
17463 * search.c (dfs_get_pure_virtuals): Use BV_FN.
17464 * semantics.c (emit_associated_thunks): New function.
17465 (expand_body): Use it.
17466 * ir.texi: Adjust decriptions of thunks.
17467
17468 2000-06-22 Jason Merrill <jason@redhat.com>
17469
17470 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17471 (tsubst_friend_function): Copy it here.
17472
17473 * decl.c (grok_op_properties): Fix typo.
17474
17475 * decl2.c (delete_sanity): Clarify warning, avoid failure on
17476 deleting void*.
17477
17478 * pt.c (check_explicit_specialization): Clarify error.
17479
17480 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17481 an old OVERLOAD when we're declaring a non-function.
17482 (pushdecl, destroy_local_var): Check for error_mark_node.
17483 (warn_extern_redeclared_static): Also bail early if
17484 we're a CONST_DECL.
17485 (push_overloaded_decl): Ignore an old error_mark_node.
17486
17487 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
17488
17489 * call.c (build_x_va_arg): Check if in a template decl.
17490 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17491
17492 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17493
17494 * class.c (push_lang_context): TYPE_NAME gets you to the Java
17495 types DECLs.
17496 * decl.c (check_goto): Computed gotos assumed OK.
17497
17498 2000-06-20 Jason Merrill <jason@redhat.com>
17499
17500 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17501 for which we don't need to look for instantiations.
17502
17503 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
17504
17505 * parse.y (program): Always call finish_translation_unit.
17506 * parse.c, parse.h: Rebuilt.
17507
17508 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
17509
17510 * method.c: Don't include hard-reg-set.h.
17511
17512 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17513
17514 * rtti.c (get_base_offset): Cope when vbase field is in a base.
17515
17516 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
17517
17518 * call.c (build_conditional_expr): Use VOID_TYPE_P.
17519 * cvt.c (cp_convert_to_pointer): Likewise.
17520 (convert_to_void): Likewise.
17521 * error.c (dump_expr): Likewise.
17522 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17523 * init.c (build_delete): Likewise.
17524 * method.c (emit_thunk): Likewise.
17525 * optmize.c (declare_return_variable): Likewise.
17526 * rtti.c (get_tinfo_decl_dynamic): Likewise.
17527 (get_typeid): Likewise.
17528 (build_dynamic_cast_1): Likewise.
17529 * typeck.c (composite_pointer_type): Likewise.
17530 (common_type): Likewise.
17531 (build_indirect_ref): Likewise.
17532 (build_binary_op): Likewise.
17533 (build_x_compound_expr): Likewise.
17534 (check_return_expr): Likewise.
17535 * typeck2.c (add_exception_specifier): Likewise.
17536
17537 * mangle.c (write_method_parms): Use direct comparison for end
17538 of parmlist.
17539
17540 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
17541
17542 * cp-tree.h (genrtl_try_block): Declare function.
17543 (genrtl_handler): Likewise.
17544 (genrtl_catch_block): Likewise.
17545 (genrtl_ctor_stmt): Likewise.
17546 (genrtl_subobject): Likewise.
17547 (genrtl_decl_cleanup): Likewise.
17548 (genrtl_do_poplevel): Likewise.
17549 (genrtl_do_pushlevel): Likewise.
17550 (genrtl_clear_out_block): Likewise.
17551 (genrtl_goto_stmt): Likewise.
17552 (genrtl_expr_stmt): Likewise.
17553 (genrtl_decl_stmt): Likewise.
17554 (genrtl_if_stmt): Likewise.
17555 (genrtl_while_stmt): Likewise.
17556 (genrtl_do_stmt): Likewise.
17557 (genrtl_return_stmt): Likewise.
17558 (genrtl_for_stmt): Likewise.
17559 (genrtl_break_stmt): Likewise.
17560 (genrtl_continue_stmt): Likewise.
17561 (genrtl_scope_stmt): Likewise.
17562 (genrtl_switch_stmt): Likewise.
17563 (genrtl_case_label): Likewise.
17564 (genrtl_begin_compound_stmt): Likewise.
17565 (genrtl_finish_compound_stmt): Likewise.
17566 (genrtl_compound_stmt): Likewise.
17567 (genrtl_asm_stmt): Likewise.
17568 (genrtl_named_return_value): Likewise.
17569 (genrtl_begin_stmt_expr): Likewise.
17570 (genrtl_finish_stmt_expr): Likewise.
17571 (finish_for_stmt): Removed first argument.
17572 (finish_switch_stmt): Likewise.
17573
17574 * semantics.c (genrtl_try_block): Define function.
17575 (genrtl_handler): Likewise.
17576 (genrtl_catch_block): Likewise.
17577 (genrtl_ctor_stmt): Likewise.
17578 (genrtl_subobject): Likewise.
17579 (genrtl_decl_cleanup): Likewise.
17580 (genrtl_do_poplevel): Likewise.
17581 (genrtl_do_pushlevel): Likewise.
17582 (genrtl_clear_out_block): Likewise.
17583 (genrtl_goto_stmt): Likewise.
17584 (genrtl_expr_stmt): Likewise.
17585 (genrtl_decl_stmt): Likewise.
17586 (genrtl_if_stmt): Likewise.
17587 (genrtl_while_stmt): Likewise.
17588 (genrtl_do_stmt): Likewise.
17589 (genrtl_return_stmt): Likewise.
17590 (genrtl_for_stmt): Likewise.
17591 (genrtl_break_stmt): Likewise.
17592 (genrtl_continue_stmt): Likewise.
17593 (genrtl_scope_stmt): Likewise.
17594 (genrtl_switch_stmt): Likewise.
17595 (genrtl_case_label): Likewise.
17596 (genrtl_begin_compound_stmt): Likewise.
17597 (genrtl_finish_compound_stmt): Likewise.
17598 (genrtl_compound_stmt): Likewise.
17599 (genrtl_asm_stmt): Likewise.
17600 (genrtl_named_return_value): Likewise.
17601 (genrtl_begin_stmt_expr): Likewise.
17602 (genrtl_finish_stmt_expr): Likewise.
17603 (finish_for_stmt): Removed first argument and generate rtl
17604 specific code.
17605 (finish_switch_stmt): Likewise.
17606 (do_poplevel): Removed generate rtl specific code.
17607 (do_pushlevel): Likewise.
17608 (add_tree): Likewise.
17609 (finish_goto_stmt): Likewise.
17610 (finish_expr_stmt): Likewise.
17611 (begin_if_stmt): Likewise.
17612 (finish_if_stmt_cond): Likewise.
17613 (finish_then_clause): Likewise.
17614 (begin_else_clause): Likewise.
17615 (finish_else_clause): Likewise.
17616 (finish_if_stmt): Likewise.
17617 (clear_out_block): Likewise.
17618 (begin_while_stmt): Likewise.
17619 (finish_while_stmt_cond): Likewise.
17620 (finish_while_stmt): Likewise.
17621 (begin_do_stmt): Likewise.
17622 (finish_do_body): Likewise.
17623 (finish_do_stmt): Likewise.
17624 (finish_return_stmt): Likewise.
17625 (begin_for_stmt): Likewise.
17626 (finish_for_init_stmt): Likewise.
17627 (finish_for_cond): Likewise.
17628 (finish_for_expr): Likewise.
17629 (finish_break_stmt): Likewise.
17630 (finish_continue_stmt): Likewise.
17631 (begin_switch_stmt): Likewise.
17632 (finish_switch_cond): Likewise.
17633 (finish_case_label): Likewise.
17634 (begin_try_block): Likewise.
17635 (begin_function_try_block): Likewise.
17636 (finish_try_block): Likewise.
17637 (finish_cleanup_try_block): Likewise.
17638 (finish_cleanup): Likewise.
17639 (finish_function_try_block): Likewise.
17640 (finish_handler_sequence): Likewise.
17641 (finish_function_handler_sequence): Likewise.
17642 (begin_handler): Likewise.
17643 (finish_handler_parms): Likewise.
17644 (begin_catch_block): Likewise.
17645 (finish_handler): Likewise.
17646 (begin_compound_stmt): Likewise.
17647 (finish_compound_stmt): Likewise.
17648 (finish_asm_stmt): Likewise.
17649 (finish_label_stmt): Likewise.
17650 (finish_label_decl): Likewise.
17651 (finish_subobject): Likewise.
17652 (finish_decl_cleanup): Likewise.
17653 (finish_named_return_value): Likewise.
17654 (begin_stmt_expr): Likewise.
17655 (finish_stmt_expr): Likewise.
17656
17657 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17658 to call genrtl_expr_stmt when appropriate.
17659
17660 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17661 begin_compound_expr to call genrtl_begin_stmt_expr and
17662 genrtl_begin_compound_expr when appropriate.
17663 (finish_init_stmts): Changed calls to finish_compound_expr and
17664 finish_stmt_expr to call genrtl_finish_compound_expr and
17665 genrtl_finish_stmt_expr when appropriate.
17666 (expand_default_init): Changed call to finish_expr_stmt to call
17667 genrtl_expr_stmt when appropriate.
17668 (build_vec_init): Likewise.
17669
17670 * parse.y (simple_stmt): Removed first argument from call to
17671 finish_for_stmt. Removed first argument from call to
17672 finish_switch_stmt.
17673
17674 * parse.c: Regenerated.
17675
17676 * pt.c (tsubst_expr): Removed first argument from call to
17677 finish_for_stmt. Removed first argument from call to
17678 finish_switch_stmt.
17679
17680 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
17681
17682 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17683 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17684
17685 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17686 (cplus_tree_code_length[]): Likewise.
17687 (cplus_tree_code_name[]): Likewise.
17688 (init_parse): Added call to add_c_tree_codes. Changed
17689 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17690
17691 2000-06-16 Mark Mitchell <mark@codesourcery.com>
17692
17693 * cp-tree.h (finish_mem_initializers): Declare.
17694 (count_trees): Likewise.
17695 * parse.y (base_init): Use finish_mem_initializers.
17696 * semantics.c (finish_mem_initializers): New function.
17697
17698 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
17699 the number of trees.
17700 (n_trees): Remove.
17701 (count_trees): Don't use it.
17702
17703 2000-06-15 Jason Merrill <jason@redhat.com>
17704
17705 * tree.c (count_trees): New debugging function.
17706
17707 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17708 * init.c (build_member_call): Pull out the name of a DECL.
17709
17710 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17711 * semantics.c (expand_body): Push to TV_INTEGRATION here.
17712 * optimize.c (optimize_function): Not here.
17713 * pt.c (instantiate_decl): Push to TV_PARSE.
17714
17715 2000-06-15 Mark Mitchell <mark@codesourcery.com>
17716
17717 * cp-tree.h (struct language_function): Remove x_base_init_list
17718 and x_member_init_list.
17719 (current_base_init_list): Remove.
17720 (current_member_init_list): Likewise.
17721 (setup_vtbl_ptr): Change prototype.
17722 (emit_base_init): Likewise.
17723 (expand_member_init): Likewise.
17724 (reinit_parse_for_function): Remove.
17725 * decl.c (save_function_data): Don't clear x_base_init_list and
17726 x_member_init_list.
17727 (mark_language_function): Don't mark them.
17728 * init.c (perform_member_init): Tweak comment.
17729 (sort_member_init): Take the list of initializers as an argument.
17730 (sort_base_init): Likewise.
17731 (emit_base_init): Likewise.
17732 (expand_member_init): Return the initializer. Don't use global
17733 variables.
17734 * lex.c (reinit_parse_for_function): Remove.
17735 * method.c (build_template_parm_names): Correct substitution.
17736 (do_build_copy_constructor): Don't use current_member_init_list
17737 and current_base_init_list.
17738 (synthesize_method): Likewise.
17739 * parse.y (base_init): Split mem-initializers into
17740 base-initializers and field-initializers.
17741 (member_init_list): Build up the list here.
17742 (member_init): Return the initializer.
17743 (fn.depfn): Don't use reinit_parse_for_function.
17744 * parse.c: Regenerated.
17745 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17746 ERROR_MARK.
17747 (tsubst_expr): Don't use current_member_init_list
17748 and current_base_init_list.
17749 (tsubst_expr_values): Rename to ...
17750 (tsubst_initializer_list): ... this. Use convert_from_reference.
17751 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17752 and current_base_init_list.
17753 (begin_function_definition): Don't call reinit_parse_for_function.
17754
17755 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17756
17757 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17758 correctly.
17759
17760 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17761
17762 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
17763
17764 * cp-tree.h (IF_COND): Move to c-common.h.
17765 (THEN_CLAUSE): Likewise.
17766 (ELSE_CLAUSE): Likewise.
17767 (WHILE_COND): Likewise.
17768 (WHILE_BODY): Likewise.
17769 (DO_COND): Likewise.
17770 (DO_BODY): Likewise.
17771 (RETURN_EXPR): Likewise.
17772 (EXPR_STMT_EXPR): Likewise.
17773 (FOR_INIT_STMT): Likewise.
17774 (FOR_COND): Likewise.
17775 (FOR_EXPR): Likewise.
17776 (FOR_BODY): Likewise.
17777 (SWITCH_COND): Likewise.
17778 (SWITCH_BODY): Likewise.
17779 (CASE_LOW): Likewise.
17780 (CASE_HIGH): Likewise.
17781 (GOTO_DESTINATION): Likewise.
17782 (COMPOUND_BODY): Likewise.
17783 (ASM_CV_QUAL): Likewise.
17784 (ASM_STRING): Likewise.
17785 (ASM_OUTPUTS): Likewise.
17786 (ASM_INPUTS): Likewise.
17787 (ASM_CLOBBERS): Likewise.
17788 (DECL_STMT_DECL): Likewise.
17789 (STMT_EXPR_STMT): Likewise.
17790 (LABEL_STMT_LABEL): Likewise.
17791 (SCOPE_BEGIN_P): Likewise.
17792 (SCOPE_END_P): Likewise.
17793 (SCOPE_STMT_BLOCK): Likewise.
17794 (SCOPE_NULLIFIED_P): Likewise.
17795 (SCOPE_NO_CLEANUPS_P): Likewise.
17796 (SCOPE_PARTIAL_P): Likewise.
17797 (ASM_VOLATILE_P): Likewise.
17798 (STMT_LINENO): Likewise.
17799 (STMT_LINENO_FOR_FN_P): Likewise.
17800
17801 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17802 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17803 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17804 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17805 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17806
17807 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17808
17809 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17810 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17811
17812 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17813 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17814 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17815
17816 2000-06-14 Mark Mitchell <mark@codesourcery.com>
17817
17818 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17819 * class.c (dfs_find_final_overrider): Set it appropriately.
17820 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17821 avoid unneeded secondary vptrs.
17822
17823 2000-06-13 Jakub Jelinek <jakub@redhat.com>
17824
17825 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17826 (check_bitfield_decl, check_field_decl): Likewise.
17827 (build_vtbl_or_vbase_field, build_base_field): Likewise.
17828 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17829 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17830 (xfer_tag, finish_enum): Likewise.
17831 * decl2.c (finish_builtin_type): Likewise.
17832 * init.c (init_init_processing): Likewise.
17833 * pt.c (instantiate_class_template): Likewise.
17834 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17835 * cp-tree.h (struct lang_type): Add user_align member.
17836 (CLASSTYPE_USER_ALIGN): Define.
17837
17838 2000-06-13 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
17839
17840 * Make-lang.in (c++.install-common): Install g++-cross in
17841 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17842 $(target_alias)-g++ and $(target_alias)-c++.
17843
17844 2000-06-12 Mark Mitchell <mark@codesourcery.com>
17845
17846 * class.c (vcall_offset_data_s): Add last_init and fns.
17847 (overrides): Rename to same_signature_p.
17848 (dfs_find_final_overrider): Adjust accordingly.
17849 (mark_overriders): Likewise.
17850 (warn_hidden): Likewise.
17851 (build_vtbl_initializer): Reorganize machinery for building things
17852 at negative offsets.
17853 (build_vcall_and_vbase_vtbl_entries): Likewise.
17854 (build_vbase_offset_vtbl_entries): Likewise.
17855 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17856 offset entries. Do not create two entries for functions with the
17857 same signature.
17858 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17859 (build_rtti_vtbl_entries): Reorganize machinery for building things
17860 at negative offsets.
17861
17862 * optimize.c (expand_call_inline): Don't recurse into the code
17863 used to initialize the parameters more than once.
17864
17865 2000-06-11 Mark Mitchell <mark@codesourcery.com>
17866
17867 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17868 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17869 (find_substitution): Only use the `Sa' substitution for
17870 std::allocator, not instantiations of it.
17871 (write_template_prefix): Move comment. Only use a TREE_LIST to
17872 represent substitutions for a member template.
17873 (write_array_type): Mangle array dimensions correctly.
17874 * optimize.c (maybe_clone_body): Copy more information from the
17875 cloned function.
17876 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17877 on the regenerated declaration.
17878
17879 2000-06-11 Chip Salzenberg <chip@valinux.com>
17880 Mark Mitchell <mark@codesourcery.com>
17881
17882 * class.c (build_vtable): Clarify comment.
17883 (build_ctor_vtbl_group): Pass the most derived type to
17884 build_vtable.
17885
17886 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17887
17888 * decl2.c (compare_options): Don't needlessly cast away const-ness.
17889
17890 2000-06-10 Mark Mitchell <mark@codesourcery.com>
17891
17892 * decl.c (add_binding): Handle duplicate declarations of external
17893 variables.
17894
17895 2000-06-09 Chip Salzenberg <chip@valinux.com>
17896 Mark Mitchell <mark@codesourcery.com>
17897
17898 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
17899 argument.
17900 (write_signed_number): New macro.
17901 (write_unsigned_number): Likewise.
17902 (write_source_name): Use them.
17903 (write_number): Handle signed and unsigned values.
17904 (write_integer_cst): Use tree_int_cst_sgn, and use
17905 write_unsigned_number or write_signed_number as appropriate.
17906 (write_discriminator): Use write_unsigned_number or
17907 write_signed_number as appropriate.
17908 (write_template_arg_literal): Likewise.
17909 (write_array_type): Use tree_low_cst.
17910 (write_template_parm): Use write_unsigned_number or
17911 write_signed_number as appropriate.
17912 (write_substitution): Adjust call to write_number.
17913 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
17914 (write_expression): Handle non-type template arguments of
17915 reference type correctly.
17916 (mangle_thunk): Use write_signed_number.
17917
17918 2000-06-09 Chip Salzenberg <chip@valinux.com>
17919
17920 * mangle.c (find_substition): Don't mangle objects with typename
17921 substitutions (e.g. "cin" as "Si").
17922
17923 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
17924
17925 * call.c (add_candidate): Use ggc_alloc_cleared.
17926 * decl.c (lookup_label): Likewise.
17927 * lex.c (retrofit_lang_decl): Likewise.
17928
17929 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
17930
17931 * semantics.c (expand_body): Push to TV_EXPAND.
17932 * optimize.c (optimize_function): Push to TV_INTEGRATION.
17933 * decl.c (start_function): Always call announce_function.
17934
17935 * tinfo2.cc: Just declare abort.
17936
17937 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
17938
17939 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
17940 whenever @ is a symbolic name.
17941
17942 2000-06-08 Jakub Jelinek <jakub@redhat.com>
17943
17944 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
17945
17946 2000-06-07 Mark Mitchell <mark@codesourcery.com>
17947
17948 * decl.c (pushdecl): Look up functions by DECL_NAME, not
17949 DECL_ASSEMBLER_NAME.
17950
17951 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17952
17953 * decl2.c (c_language): Define.
17954
17955 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
17956
17957 * lex.c (lang_init_options): Tweak.
17958
17959 * decl2.c: Remove #inclusion of diagnostic.h
17960 (lang_decode_option): Move diagnostic formatting options to
17961 toplevel.
17962
17963 * lang-options.h: Remove documentation for diagnostic options.
17964
17965 * Makefile.in (lex.o): Depends upon diagnostic.h
17966
17967 2000-06-06 Mark Mitchell <mark@codesourcery.com>
17968
17969 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
17970 the same DECL_RESULT, it's not a redefinition.
17971 * pt.c (tsubst_decl): Remove code to handle illegal
17972 specializations.
17973
17974 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
17975
17976 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
17977
17978 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
17979
17980 * search.c (maybe_suppress_debug_info): Don't check
17981 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
17982
17983 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
17984 here if extern_p.
17985
17986 Remember instantiation context in deferred instantiations.
17987 * cp-tree.h (struct tinst_level): Remove.
17988 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
17989 * pt.c (current_tinst_level): Now a tree.
17990 (print_template_context, push_tinst_level, pop_tinst_level,
17991 tinst_for_decl): Adjust.
17992 (reopen_tinst_level): New fn.
17993 (init_pt): Register current_tinst_level as a root.
17994 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
17995 of the pending templates list.
17996 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
17997 * lex.c (extract_interface_info): Adjust.
17998 * decl2.c (warn_if_unknown_interface): Adjust.
17999
18000 2000-06-05 Mark Mitchell <mark@codesourcery.com>
18001
18002 * class.c (indirect_primary_base_p): New function.
18003 (determine_primary_base): Use it.
18004
18005 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
18006
18007 Update new-abi dynamic cast algorithm.
18008 * tinfo.cc (__class_type_info::__dyncast_result): Add
18009 whole_details. Adjust constructor.
18010 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18011 Avoid unnecessary searching.
18012 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18013
18014 2000-06-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18015
18016 * decl.c (init_decl_processing): Don't call record_component_aliases.
18017 * tree.c (build_cplus_array_type_1): Likewise.
18018
18019 2000-06-04 Mark Mitchell <mark@codesourcery.com>
18020
18021 * ir.texi: Correct typo.
18022 * mangle.c (write_expression): Handle non-type template arguments
18023 with reference type.
18024 * method.c (build_overload_value): Likewise.
18025 * pt.c (convert_nontype_argument): Explicitly represent conversion
18026 to a reference with an ADDR_EXPR.
18027 (unify): Always unify arguments in left-to-right order.
18028
18029 2000-06-03 Alex Samuel <samuel@codesourcery.com>
18030 Mark Mitchell <mark@codesourcery.com>
18031
18032 * Make-lang.in (CXX_SRCS): Add mangle.c.
18033 * Makefile.in (CXX_OBJS): Add mangle.o.
18034 (mangle.o): New rule.
18035
18036 * class.c (local_classes): New variable.
18037 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18038 (get_vtt_name): Use mangle_vtt_name for new ABI.
18039 (init_class_processing): Initialize local_classes.
18040 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18041 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18042 (std_identifier): New macro.
18043 (DECL_VOLATILE_MEMFUNC_P): New macro.
18044 (DECL_NAMESPACE_STD_P): Likewise.
18045 (local_classes): Declare.
18046 (get_mostly_instantiated_function_type): Declare.
18047 (init_mangle): Declare.
18048 (mangle_decl): Likewise.
18049 (mangle_type_string): Likewise.
18050 (mangle_type): Likewise.
18051 (mangle_typeinfo_for_type): Likewise.
18052 (mangle_typeinfo_string_for_type): Likewise.
18053 (mangle_vtbl_for_type): Likewise.
18054 (mangle_vtt_for_type): Likewise.
18055 (mangle_ctor_vtbl_for_type): Likewise.
18056 (mangle_thunk): Likewise.
18057 (mangle_conv_op_name_for_type): Likewise.
18058 (mangle_guard_variable): Likewise.
18059 * decl.c (pushtag): Keep track of local classes.
18060 (initialize_predefined_identifiers): Initialize std_identifier.
18061 (init_decl_processing): Use std_identifier.
18062 (start_decl): Don't treat instantiations as specializations.
18063 (grokdeclarator): Likewise.
18064 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
18065 name for fully-instantiated templates.
18066 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18067 destructors with the new ABI.
18068 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18069 (grokfield): Use mangle_type for new ABI.
18070 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18071 (get_sentry): Use mangle_guard_variable for new ABI.
18072 (start_static_initialization_or_destruction): Likewise.
18073 * expr.c (extract_aggr_init): Remove.
18074 (extract_scalar_init): Likewise.
18075 (extract_init): Remove #if 0'd code.
18076 * mangle.c: New function.
18077 * method.c (build_mangled_name): Assert not flag_new_abi.
18078 (build_static_name): Likewise.
18079 (build_decl_overload_real): Likewise.
18080 (build_typename_overload): Likewise.
18081 (build_overload_with_type): Likewise.
18082 (build_overload_name): Likewise.
18083 (get_ctor_vtbl_name): Likewise.
18084 (start_squangling): Likewise.
18085 (get_id_2): Likewise.
18086 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18087 (init_method): Call init_mangle for new ABI.
18088 (make_thunk): Call mangle_thunk for new ABI.
18089 * operators.def: Correct new ABI manglings for the `%' operator.
18090 Add `::' operator.
18091 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18092 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18093 (lookup_template_class): Call mangle_decl for new ABI.
18094 (get_mostly_instantiated_function_type): New function.
18095 (set_mangled_name_for_template_decl): Use it.
18096 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18097 the new ABI. Use mangle_conv_op_name_for_type for instantiated
18098 conversion op names.
18099 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18100 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18101 (tinfo_base_init): Likewise. Mangle typeinfo string name with
18102 mangle_typeinfo_string_for_type.
18103
18104 2000-06-03 Mark Mitchell <mark@codesourcery.com>
18105
18106 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18107 (INNERMOST_TEMPLATE_ARGS): New macro.
18108 (innermost_args): Remove.
18109 (get_innermost_template_args): New function.
18110 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18111 * error.c (dump_function_decl): Be caution when using
18112 most_general_template.
18113 * method.c (build_template_parm_names): Use
18114 INNERMOST_TEMPLATE_ARGS.
18115 * pt.c (add_to_template_args): Tidy comment
18116 (get_innermost_template_args): New function.
18117 (check_explicit_specialization): Clear DECL_INITIAL for a new
18118 specialization.
18119 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18120 Tidy.
18121 (push_template_decl): Always register specializations of the most
18122 general template.
18123 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18124 (coerce_template_parms): Likewise.
18125 (lookup_template_class): Likewise.
18126 (innermost_args): Remove.
18127 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18128 (tsubst_decl): Handle tricky specializations. Use
18129 get_innermost_template_args.
18130 (instantiate_template): Simplify handling of partial
18131 instantiations.
18132 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18133 (most_general_template): Reimplement, in a more straightforward
18134 manner.
18135 (regenerate_decl_from_template): Tweak formatting. Use
18136 TMPL_ARGS_DEPTH for clarity.
18137 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18138
18139 * dump.c (dequeue_and_dump): Dump information about thunks.
18140
18141 2000-06-01 Richard Henderson <rth@cygnus.com>
18142
18143 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18144
18145 2000-06-01 Richard Henderson <rth@cygnus.com>
18146
18147 * decl2.c (unsupported_options): Fix typo, make const.
18148 (lang_decode_option): Fix bsearch argument order.
18149
18150 2000-06-01 Mark Mitchell <mark@codesourcery.com>
18151
18152 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18153 on FIELD_DECLs.
18154
18155 2000-05-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18156
18157 * cp-tree.h (c_get_alias_set): Deleted.
18158 * Makefile.in (decl.o): Include ../expr.h.
18159 * decl.c (expr.h): Include.
18160 (init_decl_processing): Call record_component_aliases for arrays.
18161 (grokdeclarator): Likewise.
18162 Set TREE_ADDRESSABLE for fields that aren't bitfields.
18163 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18164
18165 2000-05-31 Mark Mitchell <mark@codesourcery.com>
18166
18167 Remove guiding declaration support.
18168 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18169 (flag_guiding_decls): Remove.
18170 * call.c (build_user_type_conversion_1): Remove support for
18171 guiding decls.
18172 (build_new_function_call): Likewise.
18173 (build_new_op): Likewise.
18174 (build_new_method_call): Likewise.
18175 * decl.c (start_function): Likewise.
18176 * friend.c (is_friend): Likewise.
18177 (do_friend): Likewise.
18178 * decl2.c ((flag_dump_translation_unit): Make it const.
18179 (flag_guiding_decls): Remove.
18180 (unsupported_options): New variable
18181 (compare_options): New function.
18182 (lang_decode_option): Use them.
18183
18184 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18185
18186 * method.c (mangle_expression): Adjust test for legal expression
18187 operators.
18188
18189 * pt.c (instantiate_decl): Save and restore the local
18190 specializations list.
18191
18192 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
18193
18194 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18195
18196 2000-05-30 Mark Mitchell <mark@codesourcery.com>
18197
18198 * call.c (add_template_candidate_real): Handle member template
18199 constructors for classes with virtual bases.
18200 (build_user_type_conversion_1): Use in_charge_arg_for_name.
18201 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18202
18203 * ir.texi: Update thunk documentation.
18204
18205 * call.c (joust): Fix handling of overloaded builtin operators.
18206
18207 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
18208
18209 * cp-tree.h (DECL_ANTICIPATED): New macro.
18210 Document new use of DECL_LANG_FLAG_7.
18211 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18212 in the user namespace.
18213 * lex.c (do_identifier): If the identifier's declaration has
18214 DECL_ANTICIPATED on, it has not yet been declared. But do not
18215 replace it with an ordinary implicit declaration.
18216
18217 * tinfo2.cc: Include stdlib.h.
18218
18219 2000-05-29 Mark Mitchell <mark@codesourcery.com>
18220
18221 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18222 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18223 CLASSTYPE_ALIGN.
18224
18225 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
18226
18227 * decl2.c (lang_decode_option): Use skip_leading_substring instead
18228 of plain strncmp.
18229
18230 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
18231
18232 * operators.def (<?): Duplicated, should have been...
18233 (>?): this. Fixed.
18234
18235 2000-05-27 Alex Samuel <samuel@codesourcery.com>
18236 Mark Mitchell <mark@codesourcery.com>
18237
18238 * cp-tree.h (ansi_opname): Make it a macro.
18239 (ansi_assopname): Likewise.
18240 (struct lang_decl_flags): Add assignment_operator_p.
18241 (struct lang_decl): Add operator_code.
18242 (DECL_VTT_PARM): Adjust.
18243 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18244 overloaded operator.
18245 (SET_OVERLOADED_OPERATOR_CODE): New macro.
18246 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18247 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18248 (opname_tab): Remove.
18249 (assignop_tab): Likewise.
18250 (operator_name_info_t): New type.
18251 (operator_name_info): New variable.
18252 (assignment_operator_name_info): Likewise.
18253 (build_cp_library_fn): Remove declaration.
18254 (push_cp_library_fn): Likewise.
18255 (operator_name_string): Likewise.
18256 (build_decl_overload): Likewise.
18257 * call.c (print_z_candidates): Simplify.
18258 (build_object_call): Adjust usage of ansi_opname. Use
18259 DECL_OVERLOADED_OPERATOR_P.
18260 (op_error): Adjust operator name lookup.
18261 (build_conditional_expr): Adjust usage of ansi_opname.
18262 (build_new_op): Likewise.
18263 (build_op_delete_call): Likewise.
18264 (build_over_call): Likewise.
18265 (joust): Use DECL_OVERLOADED_OPERATOR_P.
18266 * decl.c (duplicate_decls): Copy operator_code.
18267 (init_decl_processing): Adjust parameters to push_cp_library_fn.
18268 (builtin_function): Adjust parameters to build_library_fn_1.
18269 (build_library_fn_1): Accept an overloaded operator code.
18270 (build_library_fn): Pass ERROR_MARK.
18271 (build_cp_library_fn): Accept an overloaded operator code.
18272 (push_cp_library_fn): Likewise.
18273 (grokfndecl): Tweak.
18274 (grokdeclarator): Simplify code to compute names of overloaded
18275 operators. Adjust use of ansi_opname.
18276 (ambi_op_p): Work on tree_codes, not identifiers.
18277 (unary_op_p): Likewise.
18278 (grok_op_properties): Likewise.
18279 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18280 (lang_mark_tree): Don't try to mark the operator_code.
18281 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18282 * error.c (dump_decl): Remove special handling for operator
18283 names.
18284 (dump_function_name): Likewise.
18285 (dump_expr): Adjust name lookup of operators.
18286 (op_to_string): Simplify.
18287 (assop_to_string): Likewise.
18288 * init.c (build_new_1): Adjust use of ansi_opname.
18289 * lex.c (opname_tab): Remove.
18290 (assignop_tab): Likewise.
18291 (ansi_opname): Likewise.
18292 (ansi_assopname): Likewise.
18293 (operator_name_string): Likewise.
18294 (reinit_lang_specific): Likewise.
18295 (operator_name_info): New variable.
18296 (assignment_operator_name_info): Likewise.
18297 (init_operators): New function.
18298 (init_parse): Use it.
18299 (do_identifier): Adjust use of ansi_opname.
18300 * method.c (mangle_expression): Don't use ansi_opname for
18301 mangling.
18302 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18303 (build_decl_overload): Remove.
18304 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18305 (do_build_assign_ref): Adjust use of ansi_opname.
18306 (synthesize_method): Likewise.
18307 (implicitly_declare_fn): Likewise.
18308 * operators.def: New file.
18309 * parse.y (operator): Adjust use of ansi_opname.
18310 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18311 (set_mangled_name_for_template_decl): Don't play games with
18312 current_namespace.
18313 (special_function_p): Adjust use of ansi_opname.
18314 * typeck.c (check_return_expr): Likewise.
18315 * Make-lang.in (cc1plus): Depend on operators.def.
18316 * Makefile.in (lex.o): Likewise.
18317 (decl.o): Likewise.
18318
18319 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
18320
18321 * Make-lang.in (cplib2.ready): Eradicate.
18322
18323 2000-05-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
18324
18325 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18326 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18327 (built_min, cp_tree_equal): Likewise.
18328
18329 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18330
18331 * class.c (layout_nonempty_base_or_field): Replace
18332 `record_layout_info' with `record_layout_info_s'.
18333
18334 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
18335
18336 Fix goto checking.
18337 * cp-tree.h (struct language_function): x_named_labels is now
18338 a struct named_label_list*.
18339 * decl.c (struct named_label_use_list): Renamed from...
18340 (struct named_label_list): ...this. New struct.
18341 (push_binding_level): Don't set eh_region.
18342 (note_level_for_eh): New fn.
18343 (pop_label): Take label and old value directly.
18344 (pop_labels): Adjust for new named_labels format.
18345 (lookup_label): Likewise.
18346 (poplevel): Note characteristics of a binding level containing a
18347 named label. Mess with named label lists earlier.
18348 (mark_named_label_lists): New fn.
18349 (mark_lang_function): Call it.
18350 (use_label): New fn, split out from...
18351 (make_label_decl): ...here. Don't call it.
18352 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18353 check_previous_gotos): New fns, split out from...
18354 (define_label): ...here.
18355 (check_switch_goto): New fn.
18356 (define_case_label): Call it.
18357 (check_goto): New fn.
18358 * semantics.c (finish_goto_stmt): Call it and use_label.
18359 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18360 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18361
18362 2000-05-26 Mark Mitchell <mark@codesourcery.com>
18363
18364 * class.c (build_vtable_entry_ref): Correct usage of
18365 get_vtbl_decl_for_binfo.
18366
18367 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18368 * method.c (implicitly_declare_fn): Not here.
18369
18370 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
18371
18372 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18373 (CPTI_PTMD_DESC_TYPE): ... here.
18374 (ptmd_desc_type_node): Rename to ...
18375 (ptm_desc_type_node): ... here.
18376 * decl.c: Likewise.
18377 * rtti.c (ptmd_initializer): Rename to ...
18378 (ptm_initializer): ... here.
18379 (sythesize_tinfo_var): Adjust. Deal with pointer to member
18380 function.
18381 (create_tinfo_types): Adjust.
18382
18383 2000-05-25 Mark Mitchell <mark@codesourcery.com>
18384
18385 Finish implementation of VTTs.
18386 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18387 CPTI_VTT_PARM_IDENTIFIER.
18388 (vtt_parm_identifier): New macro.
18389 (vtt_parm_type): Likewise.
18390 (BINFO_SUBVTT_INDEX): Likewise.
18391 (BINFO_VPTR_INDEX): Likewise.
18392 (struct lang_decl): Add vtt_parm.
18393 (DECL_VTT_PARM): New macro.
18394 (DECL_USE_VTT_PARM): Likewise.
18395 (DECL_NEEDS_VTT_PARM_P): Likewise.
18396 (get_vtt_name): Declare.
18397 (build_artificial_parm): Likewise.
18398 (fixup_all_virtual_upcast_offsets): Likewise.
18399 (expand_indirect_vtbls_init): Remove.
18400 * call.c (build_new_method_call): Pass the vtt to subobject
18401 constructors and destructors.
18402 * class.c (get_vtt_name): Give it external linkage.
18403 (build_clone): Handle the magic VTT parameters for clones.
18404 (clone_function_decl): Fix typo in comment.
18405 (build_vtt): Keep track of the indices in the VTTs where various
18406 entities are stored.
18407 (build_vtt_inits): Likewise.
18408 (dfs_build_vtt_inits): Likewise.
18409 (build_ctor_vtbl_group): Tweak type of construction vtables.
18410 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18411 primary bases, when building construction vtables.
18412 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18413 (initialize_predefined_identifiers): Add vtt_parm_identifier.
18414 (init_decl_processing): Initialize vtt_parm_type.
18415 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18416 (lang_mark_tree): Make vtt_parm.
18417 * decl2.c (build_artificial_parm): New function.
18418 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
18419 (grokclassfn): Use build_artificial_parm.
18420 * init.c (initialize_vtbl_ptrs): Call
18421 fixup_all_virtual_upcast_offsets directly.
18422 (perform_member_init): Use the complete subobject destructor for
18423 member cleanups.
18424 (build_vtbl_address): New function.
18425 (expand_virtual_init): Handle VTTs.
18426 * optimize (maybe_clone_body): Likewise.
18427 * search.c (fixup_all_virtual_upcast_offsets): Give it external
18428 linkage.
18429 (expand_indirect_vtbls_init): Remove.
18430 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18431 * tree.c (make_binfo): Make them bigger.
18432
18433 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18434
18435 * inc/cxxabi.h (__pbase_type_info): Define, based on
18436 __pointer_type_info.
18437 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18438 (__pointer_to_member_type_info): Likewise.
18439 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18440 (__pointer_to_member_type_info::__is_pointer_p): Remove.
18441 (__pointer_type_info::__do_catch): Rename to ...
18442 (__pbase_type_info::__do_catch): ... here. Adjust.
18443 (__pbase_type_info::__pointer_catch): Implement.
18444 (__pointer_type_info::__pointer_catch): Adjust.
18445 (__pointer_to_member_type_info::__pointer_catch): Adjust.
18446
18447 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
18448
18449 * tinfo.h (__user_type_info::contained_virtual_p): New
18450 predicate.
18451 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18452 shaped hierarchy.
18453 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18454 diamond shaped hierarchy. Add early out for mixed diamond and
18455 duplicate shaped hierarchy.
18456
18457 2000-05-24 Mark Mitchell <mark@codesourcery.com>
18458
18459 * cp-tree.h (build_delete): Change prototype.
18460 (build_vec_delete): Likewise.
18461 * call.c (build_scoped_method_call): Use special_function_kind
18462 values to indicate the kind of destruction to be done.
18463 (build_method_call): Likewise.
18464 * decl.c (finish_destructor_body): Likewise.
18465 (maybe_build_cleanup_1): Likewise. Rename to ...
18466 (maybe_build_cleanup): ... this.
18467 * decl2.c (delete_sanity): Use special_function_kind
18468 values to indicate the kind of destruction to be done.
18469 (build_cleanup): Likewise.
18470 * init.c (perform_member_init): Likewise.
18471 (build_vec_delete_1): Likewise.
18472 (build_dtor_call): Simplify.
18473 (build_delete): Use special_function_kind
18474 values to indicate the kind of destruction to be done.
18475 (build_vbase_delete): Likewise.
18476 (build_vec_delete): Likewise.
18477
18478 * init.c (sort_member_init): Fix typo in error message generation
18479 code.
18480
18481 2000-05-15 Donald Lindsay <dlindsay@cygnus.com>
18482
18483 * semantics.c (begin_class_definition): make the packed
18484 attribute be sensitive to the "-fpack-struct" command line flag
18485
18486 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
18487
18488 Update new-abi upcast algorithm.
18489 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18490 prototype and meaning of return value.
18491 (__si_class_type_info::__do_upcast): Likewise.
18492 (__vmi_class_type_info::__do_upcast): Likewise.
18493 * tinfo.cc (__class_type_info::__upcast_result): Replace
18494 whole2dst with part2dst. Adjust ctor.
18495 (__class_type_info::__do_upcast): Adjust call of worker function.
18496 (__class_type_info::__do_upcast): Adjust.
18497 (__si_class_type_info::__do_upcast): Adjust. Use parent's
18498 __do_upcast.
18499 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18500 virtual base in diamond hierarchy bug.
18501
18502 2000-05-23 Mark Mitchell <mark@codesourcery.com>
18503
18504 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18505 and bitfield to tinfo_fn_p.
18506 (DECL_TINFO_FN_P): Adjust.
18507 (SET_DECL_TINFO_FN_P): Likewise.
18508 (DECL_MUTABLE_P): Likewise.
18509 (DECL_C_BIT_FIELD): Likewise.
18510 (SET_DECL_C_BIT_FIELD): Likewise.
18511 (CLEAR_DECL_C_BIT_FIELD): Likewise.
18512 (DECL_UNINLINABLE): Likewise.
18513 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18514 (handle_using_decl): Remove assertion.
18515 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18516 to build FIELD_DECLs.
18517 (build_base_field): Likewise.
18518 (layout_class_type): Likewise.
18519 * decl.c (init_decl_processing): Likewise.
18520 (build_ptrmemfunc_type): Likewise.
18521 (grokdeclarator): Likewise.
18522 * decl2.c (grok_x_components): Likewise.
18523 * except.c (call_eh_info): Likewise.
18524 * init.c (init_init_processing): Likewise.
18525 * rtti.c (expand_class_desc): Likewise.
18526 (create_pseudo_type_info): Likewise.
18527 (get_vmi_pseudo_type_info): Likewise.
18528 (create_tinfo_types): Likewise.
18529 * ptree.c (print_lang_decl): Adjust.
18530 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18531 before checking DECL_MUTABLE_P.
18532
18533 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18534 parameters for template functions.
18535 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18536 destructors as well as constructors.
18537
18538 2000-05-22 Mark Mitchell <mark@codesourcery.com>
18539
18540 * class.c (build_ctor_vtbl_group): Set inits.
18541 * optimize.c (maybe_clone_body): Set DECL_INLINE and
18542 DECL_THIS_INLINE appropriately for clones.
18543
18544 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18545 (DECL_CONV_FN_P): Simplify.
18546 (DECL_OPERATOR): Remove.
18547 (language_to_string): Declare.
18548 * decl.c (duplicate_decls): Fix typo in comment.
18549 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18550 (grok_op_properties): Use DECL_CONV_FN_P instead of
18551 IDENTIFIER_TYPENAME_P.
18552 * dump.c (dequeue_and_dump): Dump the language linkage of
18553 declarations.
18554 * error.c (language_to_string): Give it external linkage.
18555 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18556 (implicitly_declare_fn): Set DECL_LANGUAGE.
18557 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18558 IDENTIFIER_TYPENAME_P.
18559 (tsubst_decl): Likewise.
18560 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18561 * semantics.c (finish_member_declaration): Don't mark members of
18562 classes declared in an extern "C" region as extern "C".
18563
18564 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
18565
18566 * decl2.c (qualified_lookup_using_namespace): Look through
18567 namespace aliases.
18568
18569 * decl.c (push_using_decl): Return the old decl on namespace level.
18570
18571 2000-05-21 Mark Mitchell <mark@codesourcery.com>
18572
18573 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18574 (VTT_NAME_PREFIX): New macro.
18575 (CTOR_VTBL_NAME_PREFIX): Likewise.
18576 (get_ctor_vtbl_name): New function.
18577 * class.c (get_vtable_name): Simplify.
18578 (get_vtt_name): New function.
18579 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18580 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18581 when a virtual base becomes primary.
18582 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
18583 VTTs.
18584 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18585 additional parameters.
18586 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18587 (initialize_array): New function.
18588 (build_vtt): Likewise.
18589 (build_vtt_inits): Likewise.
18590 (dfs_build_vtt_inits): Likewise.
18591 (dfs_fixup_binfo_vtbls): Likewise.
18592 (build_ctor_vtbl_group): Likewise.
18593 (initialize_vtable): Use initialize_array.
18594 (accumulate_vtbl_inits): Reimplement to handle construction
18595 vtables.
18596 (dfs_accumulate_vtbl_inits): Likewise.
18597 (bulid_vtbl_initializer): Adjust parameter name.
18598 * method.c (build_typename_overload): Remove #if 0'd code.
18599 (get_ctor_vtbl_name): New function.
18600 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18601 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18602
18603 * cp-tree.h (struct lang_type): Remove search_slot.
18604 (CLASSTYPE_SEARCH_SLOT): Remove.
18605 (emit_base_init): Change prototype.
18606 (initialize_vtbl_ptrs): Likewise.
18607 (expand_indirect_vtbls_init): Likewise.
18608 (clear_search_slots): Remove.
18609 * decl.c (lang_mark_tree): Don't mark search_slot.
18610 * init.c (initialize_vtbl_ptrs): Simplify.
18611 (emit_base_init): Likewise.
18612 * search.c (struct vbase_info): Document decl_ptr.
18613 (convert_pointer_to_single_level): Remove.
18614 (dfs_find_vbases): Remove.
18615 (dfs_init_base_pointers): Simplify.
18616 (dfs_clear_vbase_slots): Remove.
18617 (dfs_vtable_path_unmark): New function.
18618 (init_vbase_pointers): Simplify.
18619 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18620 (expand_indirect_vtbls_init): Simplify. Don't call
18621 mark_all_temps_used.
18622 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18623 initialize_vtbl_ptrs.
18624
18625 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
18626
18627 * except.c: Add static prototypes.
18628
18629 2000-05-20 H.J. Lu <hjl@gnu.org>
18630
18631 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18632
18633 2000-05-19 Mark Mitchell <mark@codesourcery.com>
18634
18635 Don't create a separate copy of virtual bases for the
18636 CLASSTYPE_VBASECLASSES list.
18637 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18638 (BINFO_FOR_VBASE): Remove.
18639 (CANONICAL_BINFO): Adjust.
18640 (binfo_for_vbase): New function.
18641 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18642 instead of BINFO_FOR_VBASE.
18643 (build_vbase_pointer): Likewise.
18644 (build_secondary_vtable): Likewise.
18645 (dfs_mark_primary_bases): Likewise.
18646 (mark_primary_bases): Likewise.
18647 (layout_nonempty_base_or_field): Likewise.
18648 (dfs_set_offset_for_shared_vbases): Likewise.
18649 (dfs_set_offset_for_unshared_vbases): Likewise.
18650 (layout_virtual_bases): Likewise. Adjust for changes to the
18651 CLASSTYPE_VBASECLASSES list.
18652 (dump_class_hierarchy_r): Use binfo_for_vbase
18653 instead of BINFO_FOR_VBASE.
18654 (dump_class_hierarchy): Likewise.
18655 (finish_vtbls): Likewise.
18656 (build_vtbl_initializer): Adjust for changes to the
18657 CLASSTYPE_VBASECLASSES list.
18658 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18659 * decl.c (finish_destructor_body): Adjust for changes to the
18660 CLASSTYPE_VBASECLASSES list.
18661 * init.c (sort_base_init): Use binfo_for_vbase.
18662 (construct_virtual_bases): Adjust for changes to the
18663 CLASSTYPE_VBASECLASSES list.
18664 (expand_member_init): Use binfo_for_vbase.
18665 (build_vbase_delete): Adjust for changes to the
18666 CLASSTYPE_VBASECLASSES list.
18667 * method.c (do_build_copy_constructor): Likewise.
18668 * rtti.c (get_base_offset): Use binfo_for_vbase.
18669 (expand_class_desc): Remove #if 0'd code.
18670 * search.c (struct vbase_info): Remove vbase_types.
18671 (get_base_distance): Use binfo_for_vbase.
18672 (lookup_field_queue_p): Use CANONICAL_BINFO.
18673 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18674 (get_pure_virtuals): Adjust for changes to the
18675 CLASSTYPE_VBASECLASSES list.
18676 (dfs_find_vbases): Use binfo_for_vbase.
18677 (dfs_init_vbase_pointers): Likewise.
18678 (init_vbase_pointers): Don't initialize vi.vbase_types.
18679 (virtual_context): Use binfo_for_vbase.
18680 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18681 CLASSTYPE_VBASECLASSES list.
18682 (expand_indirect_vtbls_init): Simplify.
18683 (dfs_get_vbase_types): Don't replicate virtual bases.
18684 (find_vbase_instance): Use binfo_for_vbase.
18685 (binfo_for_vbase): New function.
18686 * typeck.c (get_delta_difference): Use binfo_for_vbase.
18687
18688 2000-05-17 Mark Mitchell <mark@codesourcery.com>
18689
18690 * decl2.c (finish_anon_union): Generalize error messages to handle
18691 anonymous structures.
18692 * init.c (perform_member_init): Remove `name' parameter.
18693 (build_field_list): New function.
18694 (sort_member_init): Handle anonymous union initialization order
18695 correctly. Check for multiple initializations of the same union.
18696 (emit_base_init): Don't look up fields by name here.
18697 (expand_member_init): Record the result of name lookup for future
18698 reference.
18699 * typeck.c (build_component_ref): Fix formatting.
18700
18701 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
18702
18703 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18704 * typeck.c (build_x_compound_expr): Replace warn_unused with
18705 warn_unused_value.
18706
18707 * decl2.c (lang_decode_option): Update -Wall unused flags by
18708 calling set_Wunused.
18709
18710 2000-05-16 Mark Mitchell <mark@codesourcery.com>
18711
18712 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18713 * init.c (dfs_vtable_path_unmark): Remove.
18714 * search.c (marked_new_vtable_p): Likewise.
18715 (unmarked_new_vtable_p): Likewise.
18716 (dfs_search_slot_nonempty_p): Likewise.
18717 (dfs_mark): Likewise.
18718 (dfs_vtable_path_unmark): Likewise.
18719 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18720 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18721 (dfs_init_vbase_pointers): Remove special-case new ABI code.
18722 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18723 (init_vbase_pointers): Simplify.
18724 (expand_indirect_vtbls_init): Likewise.
18725
18726 * class.c (copy_virtuals): New function.
18727 (build_primary_table): Use it.
18728 (build_secondary_vtable): Likewise.
18729 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18730 indicate that no vcall offset is required.
18731 (add_virtual_function): Likewise.
18732 (modify_all_vtables): Likewise.
18733 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18734 (dfs_accumulate_vtbl_inits): Likewise.
18735 (build_vtbl_initializer): Make changes to handle construction
18736 vtables.
18737 (dfs_build_vcall_offset_vtbl_entries): Likewise.
18738 (build_rtti_vtbl_entries): Likewise.
18739 (build_vtable_entries): Handle a NULL vcall_index.
18740
18741 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
18742
18743 * decl2.c (lang_decode_option): Fix thinko.
18744
18745 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
18746
18747 * except.c (check_handlers): New fn.
18748 * cp-tree.h: Declare it.
18749 * semantics.c (finish_handler_sequence): Call it.
18750 (finish_function_handler_sequence): Likewise.
18751 (finish_handler_parms): Set TREE_TYPE on the handler.
18752 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18753 * search.c (get_base_distance_recursive): If protect>1, ignore
18754 special access.
18755 (get_base_distance): Don't reduce watch_access.
18756
18757 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
18758
18759 * lex.c: #include diagnostic.h.
18760 (lang_init_options): Set default prefixing rules.
18761
18762 * lang-options.h: Add -fdiagnostics-show-location=.
18763
18764 * decl2.c: #include diagnostic.h.
18765 (lang_decode_option): Handle -fdiagnostics-show-location=.
18766
18767 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
18768
18769 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18770 * vec.cc: Revert my 2000-05-07 change.
18771
18772 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
18773
18774 * class.c (check_field_decls): Complain about non-static data
18775 members with same name as class in class with constructor.
18776
18777 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
18778
18779 * decl.c (grokdeclarator): Allow non-static data members with
18780 same name as class.
18781
18782 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
18783
18784 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18785 and pending_inline.filename. Update prototypes.
18786 * decl.c (define_label): Constify filename parameter.
18787 * decl2.c (warn_if_unknown_interface): Constify local char *.
18788 * input.c Constify input_source.filename. Don't declare
18789 input_filename or lineno. Constify filename parameter to feed_input.
18790 * lex.c (init_parse): Constify parameter and return value.
18791 (cp_pragma_interface, cp_pragma_implementation): Constify
18792 filename argument.
18793 (reinit_parse_for_method, reinit_parse_for_block,
18794 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18795 Constify local char *.
18796 * pt.c: Don't declare lineno or input_filename.
18797 (print_template_context, tsubst_friend_function, tsubst_decl,
18798 tsubst, instantiate_decl): Constify local char *.
18799 * semantics.c (expand_body): Constify local char *.
18800 * tree.c (build_srcloc): Constify filename parameter.
18801 * typeck.c (c_expand_asm_operands): Constify filename
18802 parameter.
18803
18804 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
18805
18806 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18807 offsetof expansion.
18808
18809 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
18810
18811 * inc/cxxabi.h: Fix typos in comment.
18812 (__base_class_info::__offset): Use a static_cast.
18813
18814 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
18815
18816 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18817 of std::size_t and std::ptrdiff_t respectively.
18818 * tinfo.cc: Likewise.
18819 * vec.cc: Likewise.
18820
18821 2000-05-06 Richard Henderson <rth@cygnus.com>
18822
18823 * typeck.c (build_c_cast): Don't warn integer->pointer size
18824 mismatch for constants.
18825
18826 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
18827
18828 * rtti.c (ptmd_initializer): Set non-public, if class is
18829 incomplete.
18830
18831 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18832 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18833 __cxa_vec_delete): Likewise.
18834 * tinfo.cc (__dynamic_cast): Likewise.
18835 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18836 __cxa_vec_delete): Likewise.
18837
18838 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18839
18840 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18841 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18842 (lang_decl_flags): Add vcall_offset.
18843 (THUNK_VCALL_OFFSET): Use it.
18844 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18845 * method.c (make_thunk): Create the lang_decl here, not in
18846 emit_thunk.
18847 (emit_thunk): Make generic thunks into ordinary functions once
18848 they have been fed to expand_body.
18849 * semantics.c (expand_body): Set current_function_is_thunk here.
18850
18851 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18852
18853 * class.c (update_vtable_entry_for_fn): Prototype.
18854
18855 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18856 and `tmpl'.
18857
18858 * search.c (dfs_build_inheritance_graph_order): Prototype.
18859
18860 2000-05-04 Mark Mitchell <mark@codesourcery.com>
18861
18862 * cp-tree.h (special_function_kind): Add various kinds of
18863 destructors.
18864 (special_function_p): New function.
18865 * class.c (overrides): Don't let one kind of destructor override
18866 another.
18867 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18868 whether or not to instantiate a template.
18869 * tree.c (special_function_p): Define.
18870
18871 2000-05-03 Mark Mitchell <mark@codesourcery.com>
18872
18873 * cp-tree.def (THUNK_DECL): Remove.
18874 * cp-tree.h (DECL_THUNK_P): New macro.
18875 (DECL_NON_THUNK_FUNCTION_P): Likewise.
18876 (DECL_EXTERN_C_FUNCTION_P): Likewise.
18877 (SET_DECL_THUNK_P): Likewise.
18878 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18879 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18880 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18881 * decl.c (decls_match): Use DECL_EXTERN_C_P.
18882 (duplicate_decls): Likewise.
18883 (pushdecl): Likewise. Adjust thunk handling.
18884 (grokfndecl): Use DECL_EXTERN_C_P.
18885 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
18886 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
18887 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
18888 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
18889 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
18890 DECL_NO_STATIC_CHAIN.
18891 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
18892 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
18893 * search.c (covariant_return_p): Remove THUNK_DECL handling.
18894 * ir.texi: Update.
18895
18896 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18897
18898 * tree.c (walk_tree): Set lineno.
18899
18900 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18901
18902 * exception.cc: Update license notice.
18903 * new.cc: Likewise.
18904 * new1.cc: Likewise.
18905 * new2.cc: Likewise.
18906 * tinfo.cc: Likewise.
18907 * tinfo2.cc: Likewise.
18908 * vec.cc: Likewise.
18909 * inc/cxxabi.h: Likewise.
18910 * inc/exception: Likewise.
18911 * inc/new: Likewise.
18912 * inc/new.h: Likewise.
18913 * inc/typeinfo: Likewise.
18914
18915 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
18916
18917 * tree.c (build_target_expr_with_type): If we already have a
18918 TARGET_EXPR, just return it.
18919
18920 * optimize.c (initialize_inlined_parameters): Don't generate an
18921 EXPR_STMT if we can just use DECL_INITIAL.
18922 * decl.c (emit_local_var): Only make the initialization a
18923 full-expression if stmts_are_full_exprs_p.
18924
18925 2000-05-01 Mark Mitchell <mark@codesourcery.com>
18926
18927 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
18928 macro.
18929 * call.c (standard_conversion): Use it.
18930 (direct_reference_binding): Likewise.
18931 (build_over_call): Likewise.
18932 (is_properly_derived_from): Likewise.
18933 (compare_ics): Likewise.
18934 * class.c (resolves_to_fixed_type_p): Likewise.
18935 * optimize.c (declare_return_variable): Likewise.
18936 * pt.c (is_specialization_of): Likewise.
18937 (unify): Likewise.
18938 * typeck.c (comp_target_parms): Likeiwse.
18939 (build_static_cast): Likewise.
18940 (build_reinterpret_cast): Likewise.
18941 (build_const_cast): Likewise.
18942 (comp_ptr_ttypes_real): Likewise.
18943 (comp_ptr_ttypes_const): Likewise.
18944 * typeck2.c (process_init_constructor): Likewise.
18945
18946 2000-04-30 Scott Snyder <snyder@fnal.gov>
18947
18948 * decl.c (finish_destructor_body): Use the base destructor when
18949 destroying virtual bases.
18950
18951 2000-04-30 Mark Mitchell <mark@codesourcery.com>
18952
18953 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
18954 STMT_EXPRs.
18955 * optimize.c (struct inline_data): Add target_exprs field.
18956 (declare_return_variable): When a function returns an aggregate,
18957 use the variable declared in the TARGET_EXPR as the remapped
18958 DECL_RESULT.
18959 (expand_call_inline): Update the pending target_exprs stack.
18960 (optimize_function): Initialize the stack.
18961
18962 * decl2.c (finish_file): Fix typo in comment.
18963
18964 * method.c (emit_thunk): Don't try to return a `void' value.
18965
18966 * optimize.c (initialize_inlined_parameters): If the parameter is
18967 addressable, we need to make a new VAR_DECL, even if the
18968 initializer is constant.
18969
18970 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
18971
18972 * decl.c (grok_op_properties): Add an extra check of argtypes.
18973
18974 2000-04-27 Mark Mitchell <mark@codesourcery.com>
18975
18976 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
18977 variables.
18978 (initialize_inlined_parameters): Try to avoid creating new
18979 VAR_DECLs.
18980
18981 2000-04-27 Alex Samuel <samuel@codesourcery.com>
18982
18983 * lex.c (my_get_run_time): Remove.
18984 (init_filename_times): Use get_run_time instead of my_get_run_time.
18985 (check_newline): Likewise.
18986 (dump_time_statistics): Likewise.
18987 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
18988 of computing elapsed time explicitly.
18989
18990 2000-04-26 Mark Mitchell <mark@codesourcery.com>
18991
18992 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
18993 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
18994 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
18995 before calling decl_constant_value.
18996 * class.c (check_bitfield_decl): Likewise.
18997 * cvt.c (ocp_convert): Likewise.
18998 (convert): Likewise.
18999 * decl.c (compute_array_index_type): Likewise.
19000 (build_enumerator): Likewise.
19001 * decl2.c (check_cp_case_value): Likewise.
19002 * pt.c (convert_nontype_argument): Likewise.
19003 (tsubst): Likewise.
19004 * typeck.c (decay_conversion): Likewise.
19005 (build_compound_expr): Likewise.
19006 (build_reinterpret_cast): Likewise.
19007 (build_c_cast): Likewise.
19008 (convert_for_assignment): Likewise.
19009
19010 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
19011
19012 * decl.c (finish_function): Don't play games with DECL_INLINE.
19013
19014 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
19015
19016 * ir.texi: Correct typo.
19017
19018 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19019
19020 * decl.c (grokdeclarator): Reject VLAs as members.
19021
19022 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
19023
19024 * call.c (standard_conversion): Accept conversion between
19025 COMPLEX_TYPEs.
19026
19027 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19028
19029 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
19030
19031 * decl2.c (finish_file): Remove double setup for accounting
19032 compile time.
19033
19034 2000-04-24 Robert Lipe <robertlipe@usa.net>
19035
19036 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19037
19038 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
19039
19040 * new.cc (set_new_handler): Needs to be in std::.
19041
19042 2000-04-23 Mark Mitchell <mark@codesourcery.com>
19043
19044 * cp-tree.h (lang_decl): Remove pretty_function_p.
19045 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19046 language-specific node.
19047 * decl.c (cp_make_fname_decl): Use build_decl, not
19048 build_lang_decl, to build the variables.
19049 (grokvardecl): Don't call build_lang_decl for local variables in
19050 templates.
19051 (grokdeclarator): Don't call build_lang_decl for local type
19052 declarations in templates.
19053 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19054 zero'd memory, rather than calling memset.
19055 * pt.c: Include hashtab.h.
19056 (local_specializations): New variable.
19057 (retrieve_local_specialization): Use it.
19058 (register_local_specialization): Likewise.
19059 (tsubst_decl): Don't assume local variables have
19060 DECL_LANG_SPECIFIC.
19061 (instantiate_decl): Set up local_specializations.
19062 * Makefile.in (HTAB_H): New variable.
19063
19064 2000-04-23 Richard Henderson <rth@cygnus.com>
19065
19066 * typeck.c (c_expand_asm_operands): Restore the original
19067 contents of the output list.
19068
19069 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
19070
19071 * ir.texi: Document complex number representation.
19072
19073 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
19074
19075 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19076 (target_incomplete_p): New function.
19077 (tinfo_base_init): Create comdat NTBS name variable.
19078 (ptr_initializer): Add non_public parameter. Calculate it.
19079 (ptmd_initializer): Likewise.
19080 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19081 (create_real_tinfo_var): Add non_public parameter. Use it.
19082 Push proxy into global namespace.
19083 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19084 New enumeration.
19085 * inc/typeinfo (type_info::before, type_info::operator==):
19086 Compare __name addresses.
19087
19088 * tinfo2.cc: Remove new-abi builtins comment.
19089
19090 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
19091
19092 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19093
19094 * call.c (joust): Exit early if we get the same function, too.
19095
19096 * decl2.c (key_method): Return NULL_TREE for template classes.
19097 (import_export_class): Don't need to check for template classes.
19098
19099 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
19100
19101 * lex.c: Remove references to cccp.c.
19102
19103 2000-04-18 Mark Mitchell <mark@codesourcery.com>
19104
19105 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19106 volatile_memfunc. Add destructor_attr. Adjust dummy.
19107 (DECL_DESTRUCTOR_P): Use destructor_attr.
19108 (DECL_CONST_MEMFUNC_P): Reimplement.
19109 (DECL_VOLATILE_MEMFUNC_P): Remove.
19110 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19111 (overrides): Use DECL_DESTRUCTOR_P.
19112 (check_for_override): Likewise.
19113 * decl.c (start_function): Likewise.
19114 * decl2.c (grokfclassfn): Likewise.
19115 (check_classfn): Likewise.
19116 (grok_function_init): Likewise.
19117
19118 2000-04-17 Mark Mitchell <mark@codesourcery.com>
19119
19120 * decl2.c (grokfield): Issue error on illegal data member
19121 declaration.
19122
19123 2000-04-17 Mark P Mitchell <mark@codesourcery.com>
19124
19125 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19126
19127 2000-04-16 Mark Mitchell <mark@codesourcery.com>
19128
19129 * class.c (build_vtable_entry): Don't build thunks for type-info
19130 functions.
19131
19132 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
19133
19134 * decl.c (decls_match): Allow a redeclaration of a builtin to
19135 specify args while the builtin did not.
19136
19137 2000-04-15 Mark Mitchell <mark@codesourcery.com>
19138
19139 * cp-tree.def (THUNK_DECL): Add to documentation.
19140 * cp-tree.h (flag_huge_objects): Declare.
19141 * class.c (modify_vtable_entry): Tidy.
19142 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19143 Calculate delta appropriately for the new ABI.
19144 (dfs_modify_vtables): Use it.
19145 (modify_all_vtables): Fix thinko in code to add overriding copies
19146 of functions to primary vtables.
19147 (build_clone): Fix typo in comment.
19148 (clone_function_decl): Correct order of destructors in vtable.
19149 (build_vbase_offset_vtbl_entries): Adjust comment.
19150 (dfs_vcall_offset_queue_p): Remove.
19151 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19152 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19153 (build_vtable_entry): Correct check for pure virtual functions.
19154 Don't declare flag_huge_objects.
19155 * decl.c (flag_huge_objects): Remove declaration.
19156 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19157 Use int_size_in_bytes.
19158 (emit_thunk): Handle vcall offset thunks.
19159
19160 2000-04-15 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19161
19162 * decl2.c (parse_time, varconst_time): Delete declarations.
19163 (finish_file): Delete LINENO declaration.
19164 START_TIME and THIS_TIME now long.
19165
19166 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
19167
19168 * class.c (build_base_field): Reformat comment.
19169
19170 * inc/cxxabi.h (stddef.h): Comment inclusion.
19171 (__base_class_info::__offset): Comment shift.
19172
19173 2000-04-12 Mark Mitchell <mark@codesourcery.com>
19174
19175 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19176 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19177 (cp_push_exception_identifier): New macro.
19178 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19179 (DECL_BASE_DESTRUCTOR_P): Likewise.
19180 (DECL_DELETING_DESTRUCTOR_P): Likewise.
19181 (get_vtbl_decl_for_binfo): Fix formatting.
19182 (in_charge_arg_for_name): New macro.
19183 (maybe_build_cleanup_and_delete): Remove declaration.
19184 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19185 (in_charge_arg_for_name): New function.
19186 (build_new_method_call): Use it. Handle cloned destructors.
19187 (build_clone): Don't make the base constructor virtual.
19188 Automatically defer generated functions.
19189 (clone_function_decl): Handle destructors, too.
19190 (clone_constructors_and_destructors): Likewise.
19191 (create_vtable_ptr): Don't create a vtable entry for a cloned
19192 function.
19193 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19194 (initialize_predefined_identifiers): Update appropriately.
19195 (finish_destructor_body): Simplify.
19196 (maybe_build_cleanup_and_delete): Remove.
19197 * except.c (expand_throw): Handle new-ABI destructors.
19198 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19199 (build_dtor_call): New function.
19200 (build_delete): Use it. Simplify.
19201 * optimize.c (maybe_clone_body): Handle destructors.
19202 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19203
19204 * exception.cc (cleanup_fn): New typedef.
19205 (CALL_CLEANUP): New macro.
19206 (cp_eh_info): Use them.
19207 (__cp_push_exception): Likewise.
19208 (__cp_pop_exception): Likewise.
19209
19210 2000-04-11 Mark Mitchell <mark@codesourcery.com>
19211
19212 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19213 (complete_dtor_identifier): New macro.
19214 (CLASSTYPE_FIRST_CONVERSION): Remove.
19215 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19216 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19217 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19218 (CLASSTYPE_CONSTRUCTORS): Likewise.
19219 (CLASSTYPE_DESTRUCTORS): Likewise.
19220 (lang_decl): Add cloned_function.
19221 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19222 (DECL_BASE_CONSTRUCTOR_P): Likewise.
19223 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19224 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19225 (DECL_CLONED_FUNCTION_P): Likewise.
19226 (DECL_CLONED_FUNCTION): Likewise.
19227 (clone_function_decl): Declare.
19228 (maybe_clone_body): Likewise.
19229 * call.c (build_user_type_conversion_1): Call complete object
19230 constructors in the new ABI.
19231 (build_new_method_call): Don't add in-charge parameters under the
19232 new ABI.
19233 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19234 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19235 CLASSTYPE_DESTRUCTOR_SLOT.
19236 (build_clone): New function.
19237 (clone_function_decl): Likewise.
19238 (clone_constructors_and_destructors): Likewise.
19239 (check_bases_and_members): Use it.
19240 * decl.c (iniitialize_predefined_identifiers): Initialize
19241 complete_dtor_identifier.
19242 (finish_function): Don't add extra code to a clone.
19243 (lang_mark_tree): Mark cloned_function.
19244 * decl2.c (mark_used): Don't bother trying to instantiate things
19245 we synthesized.
19246 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19247 * method.c (set_mangled_name_for_decl): Don't treat clones as
19248 constructors.
19249 (synthesize_method): Sythesize cloned functions, not the clones.
19250 * optimize.c (inline_data): Update comment on ret_label.
19251 (remap_block): Don't assume DECL_INITIAL exists.
19252 (copy_body_r): Allow ret_label to be NULL.
19253 (maybe_clone_body): Define.
19254 * pt.c (tsubst_decl): Handle clones.
19255 (instantiate_clone): New function.
19256 (instantiate_template): Use it.
19257 (set_mangled_name_for_template_decl): Don't treat clones as
19258 constructors.
19259 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19260 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19261 * semantics.c (expand_body): Clone function bodies as necessary.
19262
19263 * optimize.c (remap_decl): Avoid sharing structure for arrays
19264 whose size is only known at run-time.
19265 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19266
19267 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19268 to has_in_charge_parm_p.
19269 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19270 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19271 (DECL_COPY_CONSTRUCTOR_P): New macro.
19272 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19273 (build_user_type_conversion_1): Likewise.
19274 (convert_like_real): Likewise.
19275 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
19276 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19277 (copy_args_p): Likewise.
19278 (grok_ctor_properties): Likewise.
19279 (start_function): Likewise.
19280 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
19281 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19282 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19283 * method.c (do_build_copy_constructor): Use
19284 DECL_HAS_IN_CHARGE_PARM_P.
19285 (synthesize_method): Likewise.
19286 * pt.c (instantiate_template): Remove goto.
19287 * tree.c (build_cplus_method_type): Remove mention of obstacks in
19288 comment.
19289
19290 * cp-tre.h (finish_function): Change prototype.
19291 * decl.c (end_cleanup_fn): Adjust caller.
19292 (finish_function): Take only one parameter.
19293 * decl2.c (finish_objects): Adjust caller.
19294 (finish_static_storage_duration_function): Likewise.
19295 * method.c (emit_thunk): Likewise.
19296 * parse.y: Likewise.
19297 * parse.c: Regenerated.
19298 * pt.c (instantiate_decl): Likewise.
19299 * rtti.c (synthesize_tinfo_fn): Likewise.
19300 * semantics.c (expand_body): Likewise.
19301
19302 * cp-tree.h (copy_decl): New function.
19303 * class.c (finish_struct_1): Use it.
19304 * lex.c (copy_decl): Define it.
19305 * pt.c (tsubst_decl): Likewise.
19306 * tree.c (copy_template_template_parm): Likewise.
19307
19308 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19309 has_nonpublic_assign_ref.
19310 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19311 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19312 * class.c (finish_struct_methods): Don't set
19313 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19314 (interface_only): Don't declare.
19315 (interface_unknown): Likewise.
19316
19317 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19318
19319 * tree.h (HAVE_TEMPLATES): Remove definition.
19320 * lang-options.h (-fthis-is-variable): Remove documentation.
19321
19322 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
19323
19324 * class.c (instantiate_type): Handle object-relative template-id.
19325
19326 * semantics.c (finish_expr_stmt): Call convert_to_void here.
19327 * decl.c (cplus_expand_expr_stmt): Not here.
19328
19329 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19330 Initialize exprtype earlier.
19331
19332 * parse.y (fn.def1): Check for defining types in return types.
19333
19334 * decl.c (check_tag_decl): Notice extra fundamental types.
19335 Diagnose empty decls in classes, too.
19336
19337 * decl.c (grokdeclarator): Don't override an anonymous name if no
19338 declarator was given.
19339
19340 * cvt.c (convert_to_void): Call resolve_offset_ref.
19341
19342 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19343
19344 * decl2.c (decl_namespace): Handle getting a type.
19345
19346 * typeck.c (build_c_cast): Re-enable warning for cast between
19347 pointer and integer of different size.
19348
19349 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
19350
19351 * inc/cxxabi.h (__pointer_type_info): Add restrict and
19352 incomplete flags.
19353 (__pointer_type_info::__pointer_catch): New virtual function.
19354 (__pointer_to_member_type_info): Derive from
19355 __pointer_type_info. Adjust.
19356 (__pointer_to_member_type_info::__do_catch): Remove.
19357 (__pointer_to_member_type_info::__is_pointer_p): Declare.
19358 (__pointer_to_member_type_info::__pointer_catch): Declare.
19359 * rtti.c (qualifier_flags): Add restrict flag.
19360 (ptmd_initializer): Reorder members.
19361 (create_tinfo_types): Expand comments. Reorder
19362 ptmd_desc_type_node members.
19363 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19364 Implement.
19365 (__pointer_type_info::__do_catch): Move specific code into
19366 __pointer_catch. Call it.
19367 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19368 specific catch checking. Fix void conversion check.
19369 (__pointer_to_member_type_info::__do_catch): Remove.
19370 (__pointer_to_member_type_info::__pointer_catch): Implement.
19371
19372 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
19373
19374 * lex.c (init_parse): Remove traces of classof and headof.
19375 * decl2.c (flag_operator_names): Default to 1.
19376 (lang_decode_option): Do not set it for -ansi.
19377
19378 2000-04-09 Mark Mitchell <mark@codesourcery.com>
19379
19380 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19381 (DECL_MAIN_VARIANT): Remove.
19382 * decl.c (duplicate_decls): Don't set it.
19383 (start_function): Likewise.
19384 (lang_mark_tree): Don't mark it.
19385 * decl2.c (defer_fn): Don't use it.
19386 * lex.c (retrofit_lang_decl): Don't set it.
19387 * pt.c (tsubst_decl): Likewise.
19388 * ptree.c (print_lang_decl): Don't print it.
19389 * typeck.c (mark_addressable): Don't use it.
19390
19391 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19392
19393 * vec.cc: Include <new> and <exception>.
19394 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19395 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19396 terminate.
19397 (__cxa_vec_delete): Catch dtor exceptions.
19398
19399 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
19400
19401 Prepend __ to implementation defined names.
19402 * inc/typeinfo (type_info): Rename _name to __name.
19403 (type_info::type_info): Rename parameter.
19404 (type_info::operator==, type_info::operator!=,
19405 type_info::before): Likewise.
19406 (type_info::is_pointer_p, type_info::is_function_p,
19407 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19408 parameters.
19409 * inc/cxxabi.h
19410 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19411 (__pointer_type_info::__pointer_type_info): Likewise.
19412 (__pointer_type_info::is_pointer_p,
19413 __pointer_type_info::do_catch): Prepend __. Rename parameters.
19414 (__array_type_info::__array_type_info): Rename parameters.
19415 (__function_type_info::__function_type_info): Likewise.
19416 (__function_type_info::is_function_p): Prepend __.
19417 (__enum_type_info::__enum_type_info): Rename parameters.
19418 (__pointer_to_member_type_info::__pointer_to_member_type_info):
19419 Likewise.
19420 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19421 parameters.
19422 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19423 (__class_type_info::__class_type_info): Rename parameters.
19424 (__class_type_info::sub_kind): Prepend __. Adjust member names.
19425 (__class_type_info::upcast_result,
19426 __class_type_info::dyncast_result): Prepend __. Move definition
19427 into tinfo.cc.
19428 (__class_type_info::do_upcast, __class_type_info::do_catch,
19429 __class_type_info::find_public_src,
19430 __class_type_info::do_dyncast,
19431 __class_type_info::do_find_public_src): Prepend __. Rename
19432 parameters.
19433 (__si_class_type_info::__si_class_type_info): Rename parameters.
19434 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19435 __si_class_type_info::do_find_public_src): Prepent __. Rename
19436 parameters.
19437 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19438 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19439 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19440 parameters.
19441 (__dynamic_cast): Rename parameters.
19442 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19443 type_info::do_catch, type_info::do_upcast): Prepend __.
19444 (contained_p, public_p, virtual_p, contained_public_p,
19445 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19446 (__class_type_info::do_catch,
19447 __class_type_info::do_upcast): Prepend __. Adjust.
19448 (__class_type_info::__upcast_result,
19449 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19450 Adjust.
19451 (__class_type_info::find_public_src): Prepend __. Adjust.
19452 (__class_type_info::do_find_public_src,
19453 __si_class_type_info::do_find_public_src,
19454 __vmi_class_type_info::do_find_public_src): Likewise.
19455 (__class_type_info::do_dyncast,
19456 __si_class_type_info::do_dyncast,
19457 __vmi_class_type_info::do_dyncast): Likewise.
19458 (__class_type_info::do_upcast,
19459 __si_class_type_info::do_upcast,
19460 __vmi_class_type_info::do_upcast): Likewise.
19461 (__dynamic_cast): Adjust.
19462 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19463 (__function_type_info::is_function_p): Likewise.
19464 (__pointer_type_info::do_catch): Likewise. Adjust.
19465 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19466 (__throw_type_match_rtti_2): Adjust.
19467 (__is_pointer): Adjust.
19468
19469 2000-04-08 Mark Mitchell <mark@codesourcery.com>
19470
19471 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19472 (complete_ctor_identifier): New macro.
19473 (special_function_kind): Add sfk_copy_constructor and
19474 sfk_assignment_operator.
19475 (LOOKUP_HAS_IN_CHARGE): Remove.
19476 (cons_up_default_function): Rename to ...
19477 (implicitly_declare_fn): ... this.
19478 * call.c (build_new_method_call): Add in-charge parameters for
19479 constructors here.
19480 * class.c (add_implicitly_declared_members): Change parameter name
19481 from cant_have_assignment to cant_have_const_assignment.
19482 Replace calls to cons_up_default_function to implicitly_declare_fn.
19483 * cvt.c (ocp_convert): Use complete_ctor_identifier.
19484 * decl.c (initialize_predefined_identifiers): Initialize it.
19485 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19486 complex expression.
19487 * init.c (expand_default_init): Don't calculate the in-charge
19488 parameter here.
19489 (build_new_1): Likewise.
19490 * lex.c (cons_up_default_function): Move to method.c.
19491 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19492 (implicitly_declare_fn): New function.
19493 * typeck.c (build_static_cast): Use complete_ctor_identifier.
19494 (build_modify_expr): Likewise.
19495 * typeck2.c (build_functional_cast): Likewise.
19496
19497 Under the new ABI, constructors don't return `this'.
19498 * cp-tree.h (warn_reorder): Declare.
19499 (special_function_kind): New enum.
19500 (global_base_init_list): Remove declaration.
19501 (emit_base_init): Don't return a value.
19502 (check_base_init): Don't declare.
19503 (is_aggr_typedef): Likewise.
19504 * decl.c (check_special_function_return_type): New function.
19505 (return_types): Remove.
19506 (grokdeclarator): Use check_special_function_return_type.
19507 (start_function): Don't initialize ctor_label under the new ABI.
19508 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19509 * init.c (begin_init_stmts): Move to top of file.
19510 (finish_init_stmts): Likewise.
19511 (warn_reorder): Don't declare.
19512 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
19513 value.
19514 (check_base_init): Remove.
19515 (is_aggr_typedef): Likewise.
19516 (build_new_1): Don't use the return value of a constructor.
19517 * semantics.c (setup_vtbl_ptr): Don't use the return value
19518 of emit_base_init.
19519 * typeck.c (check_return_expr): Don't magically convert return
19520 statements into `return this' in constructors under the new ABI.
19521
19522 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19523 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19524 (base_ctor_identifier): New macro.
19525 (base_dtor_identifier): Likewise.
19526 (deleting_dtor_identifier): Likewise.
19527 * decl.c: Don't include obstack.h.
19528 (obstack_chunk_alloc): Don't define.
19529 (obstack_chunk_free): Likewise.
19530 (struct predefined_identifier): New type.
19531 (initialize_predefined_identifiers): New function.
19532 (init_decl_processing): Use it.
19533 (debug_temp_inits): Remove.
19534 (start_method): Don't call preserve_data.
19535 (hack_incomplete_structures): Update comment.
19536 * init.c (init_init_processing): Don't initialize
19537 nelts_identifier.
19538 (build_offset_rf): Remove dead code.
19539 (build_delete): Use CLASSTYPE_N_BASECLASSES.
19540 * search.c (init_search_processing): Don't initialize
19541 vptr_identifier.
19542
19543 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19544
19545 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19546 some sign_compare warnings.
19547
19548 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19549
19550 Rename abi::__vmi_class_type_info members.
19551 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19552 base_list, detail_masks members to vmi_flags, vmi_base_count,
19553 vmi_bases and vmi_flags_masks respectively.
19554 (__vmi_class_type_info::vmi_flags_masks): Rename
19555 details_unknown_mask to flags_unknown_mask.
19556 * tinfo.cc (__class_type_info::do_upcast): Adjust.
19557 (__vmi_class_type_info::do_find_public_src): Adjust.
19558 (__vmi_class_type_info::do_dyncast): Adjust.
19559 (__vmi_class_type_info::do_upcast): Adjust.
19560
19561 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
19562
19563 * tinfo.cc (convert_to_base): New function.
19564 (get_vbase_offset): Remove. Move into convert_to_base.
19565 (__vmi_class_type_info::do_find_public_src): Adjust.
19566 (__vmi_class_type_info::do_dyncast): Adjust.
19567 (__vmi_class_type_info::do_upcast): Adjust.
19568
19569 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
19570
19571 * tinfo.cc (operator=): Use __builtin_strcmp.
19572 * tinfo2.cc (before): Likewise.
19573
19574 2000-04-06 Mark Mitchell <mark@codesourcery.com>
19575
19576 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19577 (DECL_SAVED_INLINE): Rename to ...
19578 (DECL_DEFERRED_FN): ... this.
19579 (in_function_p): Remove declaration.
19580 (mark_inline_for_output): Rename to ...
19581 (defer_fn): ... this.
19582 * decl.c (finish_function): Adjust call to mark_inline_for_output.
19583 (in_function_p): Remove definition.
19584 * decl2.c (saved_inlines): Rename to ...
19585 (deferred_fns): ... this.
19586 (saved_inlines_used): Rename to ...
19587 (deferred_fns_used): ... this.
19588 (mark_inline_for_output): Rename to ...
19589 (defer_fn): ... this.
19590 (finish_file): Adjust accordingly.
19591 (init_decl2): Likewise.
19592 * lex.c (cons_up_default_function): Likewise.
19593 * pt.c (mark_decl_instantiated): Likewise.
19594 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19595 circumstances.
19596 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19597 * semantics.c (expand_body): Defer more functions.
19598
19599 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19600
19601 * vec.cc: New file.
19602 * Make-lang.in (CXX_LIB2FUNCS): Add it.
19603 (vec.o): Build it.
19604 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19605 __cxa_vec_delete): Declare.
19606
19607 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
19608
19609 * rtti.c (dfs_class_hint_mark): New static function.
19610 (dfs_class_hint_unmark): New static function.
19611 (class_hint_flags): Use them.
19612
19613 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
19614
19615 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19616
19617 2000-04-05 Mark Mitchell <mark@codesourcery.com>
19618
19619 * cp-tree.h (instantiate_decl): Change prototype.
19620 * decl2.c (mark_used): Adjust call.
19621 * optimize.c (inlinable_function_p): Adjust handling of templates.
19622 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19623 (do_type_instantiation): Likewise.
19624 (instantiate_decl): Defer more templates.
19625 (instantiate_pending_templates): Adjust logic to handle inline
19626 friend functions.
19627
19628 * Makefile.in (GGC_H): New variable. Use it throughout in place
19629 of ggc.h.
19630
19631 * call.c: Don't include obstack.h. Include ggc.h.
19632 (obstack_chunk_alloc): Don't define.
19633 (obstack_chunk_free): Likewise.
19634 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19635 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19636 (pop_switch): Free it.
19637
19638 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19639
19640 * dump.c (dequeue_and_dump): Don't try to print the bit_position
19641 if we don't have a DECL_FIELD_OFFSET.
19642
19643 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
19644
19645 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19646 special_function_p.
19647
19648 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19649
19650 * cfns.gperf (hash, libc_name_p): Prototype.
19651
19652 * rtti.c (build_dynamic_cast_1): Constification.
19653
19654 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19655
19656 * semantics.c (deferred_type_access_control): Prototype.
19657
19658 2000-04-04 Mark Mitchell <mark@codesourcery.com>
19659
19660 Correct many new ABI issues regarding vbase and vcall offset
19661 layout.
19662 * cp-tree.h (BINFO_VTABLE): Document.
19663 (struct lang_type): Tweak formatting.
19664 (BINFO_PRIMARY_BINFO): Add to documentation.
19665 (CLASSTYPE_VSIZE): Fix typo in comment.
19666 (CLASSTYPE_VBASECLASSES): Update documentation.
19667 (BINFO_VBASE_MARKED): Remove.
19668 (SET_BINFO_VBASE_MARKED): Likewise.
19669 (CLEAR_BINFO_VBASE_MARKED): Likewise.
19670 (BINFO_FIELDS_MARKED): Remove.
19671 (SET_BINFO_FIELDS_MARKED): Likewise.
19672 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19673 (enum access_kind): New enumeration.
19674 (num_extra_vtbl_entries): Remove declaration.
19675 (size_extra_vtbl_entries): Likewise.
19676 (get_vtbl_decl_for_binfo): New function.
19677 (dfs_vbase_unmark): Remove declaration.
19678 (mark_primary_bases): Likewise.
19679 * class.c (SAME_FN): Remove.
19680 (struct vcall_offset_data_s): Move definition.
19681 (build_vbase_pointer): Use `build', not `build_binary_op', to
19682 access the vbase pointer under the new ABI.
19683 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19684 (build_primary_vtable): Likewise.
19685 (dfs_mark_primary_bases): Move here from search.c.
19686 (mark_primary_bases): Likewise.
19687 (determine_primary_bases): Under the new ABI, don't make a base
19688 class a primary base just because we don't yet have any virtual
19689 functions.
19690 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19691 (num_vfun_entries): Remove.
19692 (dfs_count_virtuals): Likewise.
19693 (num_extra_vtbl_entries): Likewise.
19694 (size_extra_vtbl_entries): Likewise.
19695 (layout_virtual_bases): Iterate in inheritance graph order under
19696 the new ABI.
19697 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19698 indicate that a vfield is present.
19699 (init_class_processing): Initialize access_public_node, etc., from
19700 ak_public, etc.
19701 (get_vtbl_decl_for_binfo): New function.
19702 (dump_class_hierarchy_r): Likewise.
19703 (dump_class_hierarchy): Use it.
19704 (finish_vtbls): Build the vtbls in inheritance graph order.
19705 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19706 (initialize_vtable): Use get_vtbl_decl_for_binfo.
19707 (accumulate_vtbl_inits): Add comments explaining why a pre-order
19708 walk is required.
19709 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19710 where the vptr points, even for primary vtables.
19711 (build_vtbl_initializer): Adjust handling of vbase and vcall
19712 offsets.
19713 (build_vcall_and_vbase_vtable_entries): New function.
19714 (dfs_build_vbase_offset_vtbl_entries): Remove.
19715 (build_vbase_offset_vtbl_entries): Reimplement.
19716 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19717 were already handled in a primary base class vtable.
19718 (build_vcall_offset_vtbl_entries): Adjust.
19719 (build_rtti_vtbl_entries): Adjust.
19720 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19721 * init.c (expand_virtual_init): Simplify.
19722 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19723 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19724 * search.c (BINFO_ACCESS): New macro.
19725 (SET_BINFO_ACCESS): Likewise.
19726 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19727 (access_in_type): Likewise.
19728 (dfs_accessible_p): Likewise.
19729 (protected_accessible_p): Likewise.
19730 (lookup_fnfields_1): Adjust documentation.
19731 (dfs_mark_primary_bases): Move to class.c
19732 (mark_primary_bases): Likewise.
19733 (dfs_vbase_unmark): Remove.
19734 (virtual_context): Use BINFO_FOR_VBASE.
19735 (dfs_get_vbase_types): Simplify.
19736 (dfs_build_inheritance_graph_order): New function.
19737 (get_vbase_types): Use it.
19738 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19739
19740 * tinfo.cc (get_vbase_offset): New function.
19741 (__vmi_class_type_info::do_find_public_src): Use it.
19742 (__vmi_class_type_info::do_dyncast): Likewise.
19743 (__vmi_class_type_info::do_upcast): Likewise.
19744
19745 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
19746
19747 * lang-specs.h: Pass -fno-show-column to the preprocessor.
19748
19749 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
19750
19751 * rtti.c (class_hint_flags): Rename flags.
19752 (class_initializer): Remove flags.
19753 (synthesize_tinfo_var): Combine offset and flags. Add flags
19754 for __vmi_class_type_info.
19755 (create_tinfo_types): Remove flags from __class_type_info and
19756 __si_class_type_info. Merge flags and offset from
19757 base_class_type_info.
19758 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19759 (__base_class_info::is_virtual_p): Adjust.
19760 (__base_class_info::is_public_p): Adjust.
19761 (__base_class_info::offset): New accessor.
19762 (__class_type_info::details): Remove member.
19763 (__class_type_info::__class_type_info): Lose details.
19764 (__class_type_info::detail_masks): Remove.
19765 (__si_class_type_info::__si_class_type_info): Lose details.
19766 (__vmi_class_type_info::details): New member.
19767 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19768 (__vmi_class_type_info::detail_masks): New member.
19769 * tinfo.cc (__class_type_info::do_upcast): Initialize result
19770 with unknown_details_mask.
19771 (__vmi_class_type_info::do_find_public_src): Adjust
19772 (__vmi_class_type_info::do_dyncast): Adjust.
19773 (__vmi_class_type_info::do_upcast): Set result details, if
19774 needed. Adjust.
19775 (__dynamic_cast): Temporarily #if out optimization.
19776
19777 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
19778
19779 * rtti.c (get_tinfo_decl): Mark used.
19780 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19781 mark as dealt with, if we output it.
19782
19783 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19784
19785 * class.c: Reorganize to put virtual function table initialization
19786 machinery at the end of the file.
19787
19788 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
19789
19790 * class.c (finish_struct): Use bitsize_zero_node.
19791 * pt.c (instantiate_class_template): Likewise.
19792
19793 2000-03-28 Mark Mitchell <mark@codesourcery.com>
19794
19795 Put RTTI entries at negative offsets in new ABI.
19796 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19797 vbase offset at index -3, not -1.
19798 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19799 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19800 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19801 (build_rtti_vtbl_entries): New function.
19802 (set_rtti_entry): Remove.
19803 (build_primary_vtable): Don't use it.
19804 (build_secondary_vtable): Likewise.
19805 (start_vtable): Remove.
19806 (first_vfun_index): New function.
19807 (set_vindex): Likewise.
19808 (add_virtual_function): Don't call start_vtable. Do call
19809 set_vindex.
19810 (set_primary_base): Rename parameter.
19811 (determine_primary_base): Likewise.
19812 (num_vfun_entries): Don't use skip_rtti_stuff.
19813 (num_extra_vtbl_entries): Include RTTI information.
19814 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19815 (skip_rtti_stuff): Remove.
19816 (dfs_modify_vtables): Don't use it.
19817 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
19818 (layout_nonempty_base_or_field): Update size handling.
19819 (create_vtable_ptr): Tweak.
19820 (layout_class_type): Adjust parameter names.
19821 (finish_struct_1): Simplify.
19822 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19823 (skip_rtti_stuff): Remove.
19824 (first_vfun_index): New function.
19825 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19826 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19827 (marked_vtable_pathp): Declare.
19828 (unmarked_vtable_pathp): Likewise.
19829 * error.c (dump_expr): Use first_vfun_index to calculate vtable
19830 offsets.
19831 * rtti.c (build_headof): Look for RTTI at negative offsets.
19832 (get_tinfo_decl_dynamic): Likewise.
19833 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19834 here.
19835 (create_pseudo_type_info): Do it here instead. Adjust so that
19836 vptr points at first virtual function.
19837 * search.c (marked_vtable_pathp): Make it global.
19838 (unmarked_vtable_pathp): Likewise.
19839 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19840 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19841 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19842 (get_pure_virtuals): Likewise.
19843 (expand_upcast_fixups): Likewise.
19844 * tree.c (debug_binfo): Likewise.
19845 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19846 negative offset.
19847
19848 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19849
19850 * class.c (check_field_decl): Fix typo.
19851 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19852 (check_methods): Likewise.
19853 (check_field_decls): Likewise.
19854 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19855 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19856 Use DECL_RESULT_FLD, not DECL_RESULT.
19857 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19858 * lex.c (identifier_type): Likewise.
19859 * pt.c (determine_specialization, lookup_template_class): Likewise.
19860 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19861 (resolve_overloaded_unification, more_specialized): Likewise.
19862 * semantics.c (finish_member_declaration): Likewise.
19863 * typeck.c (build_x_function_call): Likewise.
19864
19865 2000-03-26 Mark Mitchell <mark@codesourcery.com>
19866
19867 * class.c (layout_empty_base): Handle empty bases with non-byte
19868 alignment.
19869 (build_base_field): Likewise.
19870 (layout_virtual_bases): Likewise.
19871
19872 * class.c (finish_struct_1): Fix typo in this change:
19873
19874 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19875
19876 2000-03-25 Mark Mitchell <mark@codesourcery.com>
19877
19878 * decl.c (grokdeclarator): Count partial specializations when
19879 keeping track of how many template classes have been seen.
19880
19881 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19882
19883 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
19884
19885 * class.c (build_vbase_pointer_fields): layout_field now place_field.
19886 (get_vfield_offset): Use byte_position.
19887 (set_rtti_entry): Set OFFSET to ssizetype zero.
19888 (get_binfo_offset_as_int): Deleted.
19889 (dfs_record_base_offsets): Use tree_low_cst.
19890 (dfs_search_base_offsets): Likewise.
19891 (layout_nonempty_base_or_field): Reflect changes in RLI format
19892 and call byte_position.
19893 (layout_empty_base): Convert offset to ssizetype.
19894 (build_base_field): use rli_size_unit_so_far.
19895 (dfs_propagate_binfo_offsets): Do computation in proper type.
19896 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
19897 (layout_class_type): Reflect changes in RLI names and fields.
19898 (finish_struct_1): Set DECL_FIELD_OFFSET.
19899 * dump.c (dequeue_and_dump): Call bit_position.
19900 * expr.c (cplus_expand_constant): Use byte_position.
19901 * rtti.c (expand_class_desc): Use bitsize_one_node.
19902 * typeck.c (build_component_addr): Use byte_position and don't
19903 special case for zero offset.
19904
19905 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
19906
19907 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
19908
19909 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
19910 tinfo object.
19911 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
19912 vtable.
19913
19914 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
19915
19916 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
19917 DECL_P macros.
19918 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
19919 make_typename_type, check_initializer, cp_finish_decl,
19920 xref_tag): Likewise.
19921 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
19922 decl_namespace, arg_assoc_template_arg, arg_assoc,
19923 validate_nonmember_using_decl, do_class_using_decl): Likewise.
19924 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
19925 args_to_string): Likewise.
19926 * friend.c (is_friend): Likewise.
19927 * lex.c (note_got_semicolon, note_list_got_semicolon,
19928 is_global): Likewise.
19929 * method.c (build_overload_nested_name, build_overload_value,
19930 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
19931 * parse.y (typename_sub, typename_sub1): Likewise.
19932 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
19933 process_partial_specialization, convert_template_argument,
19934 template_args_equal, add_pending_template, lookup_template_class,
19935 for_each_template_parm_r, maybe_fold_nontype_arg,
19936 tsubst, instantiate_template, type_unification_real, unify,
19937 instantiate_pending_templates, set_mangled_name_for_template_decl):
19938 Likewise.
19939 * repo.c (repo_get_id, repo_template_used): Likewise.
19940 * search.c (lookup_field_1): Likewise.
19941 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
19942 * xref.c (classname): Likewise.
19943
19944 2000-03-22 Mark Mitchell <mark@codesourcery.com>
19945
19946 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
19947 (CANONICAL_BINFO): New macro.
19948 (BINFO_NEW_VTABLE_MARKED): Use it.
19949 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
19950 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
19951 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
19952 not TREE_TYPE.
19953 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19954 (build_secondary_vtable): Likewise.
19955 (dfs_finish_vtbls): Likewise.
19956 (dfs_accumulate_vtbl_inits): Likewise.
19957 (accumulate_vtbl_inits): New function.
19958 (finish_vtbls): Make sure that virtual bases come after
19959 non-virtual bases in the vtable group.
19960 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
19961 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19962 * search.c (struct vbase_info): Move definition.
19963 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19964 (unmarked_new_vtable_p): Likewise.
19965 (dfs_mark_vtable_path): Remove.
19966 (dfs_mark_new_vtable): Remove.
19967 (dfs_unmark_new_vtable): Likewise.
19968 (dfs_clear_search_slot): Likewise.
19969 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
19970 (dfs_clear_vbase_slots): Likewise.
19971 (init_vbase_pointers): LIkewise.
19972
19973 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
19974
19975 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
19976 SIZETYPE to a non-SIZETYPE.
19977
19978 2000-03-21 Mark Mitchell <mark@codesourcery.com>
19979
19980 * class.c (layout_virtual_bases): Adjust names in conditionally
19981 compiled code.
19982
19983 * class.c (record_base_offsets): New function.
19984 (layout_conflict_p): Likewise.
19985 (layout_nonempty_base_or_field): Use it.
19986 (layout_empty_base): New function.
19987 (build_base_field): Use it.
19988 (build_base_fields): Update comment.
19989 (layout_virtual_bases): Fold in a little code form
19990 layout_basetypes. Use layout_empty_base.
19991 (layout_basetypes): Remove.
19992 (end_of_class): New function.
19993 (layout_class_type): Use it. Adjust.
19994
19995 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
19996 (fntype_p): Remove.
19997 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
19998 comment.
19999 (dfs_skip_nonprimary_vbases_markedp): Likewise.
20000 * typeck.c (fntype_p): Remove.
20001
20002 * cp-tree.h (TI_SPEC_INFO): Remove.
20003 (CLASSTYPE_TI_SPEC_INFO): Likewise.
20004 * pt.c (process_partial_specialization): Likewise.
20005
20006 * class.c (build_base_field): Fix thinko in computation of binfo
20007 offsets.
20008
20009 * tree.c (mark_local_for_remap_p): Mark variables declared in
20010 TARGET_EXPRs as well.
20011
20012 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20013
20014 * typeck.c (require_complete_type, complete_type,
20015 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20016 build_array_ref, convert_arguments, pointer_diff,
20017 build_x_unary_op, build_unary_op, build_c_cast,
20018 build_modify_expr): Use COMPLETE_TYPE_P etc.
20019 * call.c (is_complete, convert_like_real,
20020 build_new_method_call): Likewise.
20021 * class.c (build_vbase_pointer_fields, check_bases,
20022 build_base_field, finish_struct_1, pushclass): Likewise.
20023 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20024 * decl.c (maybe_process_template_type_declaration, pushtag,
20025 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20026 layout_var_decl, check_initializer, cp_finish_decl,
20027 grokdeclarator, require_complete_types_for_parms,
20028 grok_op_properties, xref_tag, xref_basetypes,
20029 check_function_type): Likewise.
20030 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20031 * friend.c (do_friend): Likewise.
20032 * init.c (build_offset_ref): Likewise.
20033 * parse.y (structsp): Likewise.
20034 * pt.c (maybe_process_partial_specialization,
20035 tsubst_friend_function, instantiate_class_template, tsubst,
20036 do_type_instantiation, instantiate_pending_templates): Likewise.
20037 * repo.c (repo_get_id): Likewise.
20038 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20039 synthesize_tinfo_var, emit_support_tinfos): Likewise.
20040 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20041 * semantics.c (begin_class_definition): Likewise.
20042 * tree.c (build_cplus_method_type): Likewise.
20043 * typeck2.c (digest_init, build_functional_cast,
20044 add_exception_specifier): Likewise.
20045 * parse.h, parse.c: Regenerated.
20046
20047 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
20048
20049 * inc/cxxabi.h: New header file. Define new-abi entry points.
20050 (__pointer_type_info::target): Rename member to ...
20051 (__pointer_type_info::type): ... here.
20052 (__base_class_info::type): Rename member to ...
20053 (__base_class_info::base): ... here.
20054 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20055 * cp-tree.h (CPTI_ABI): New global tree enumeration.
20056 (abi_node): New global tree node.
20057 * decl.c (abi_node): Document.
20058 (init_decl_processing): Initialize abi_node.
20059 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20060 (get_vmi_pseudo_type_info): Likewise.
20061 (create_tinfo_types): Likewise.
20062 (emit_support_tinfos): Likewise.
20063 * tinfo.h (cxxabi.h): Include for new-abi.
20064 Move rtti class definitions to new header file.
20065 * tinfo.cc (abi): Use the namespace.
20066 (std): Move new abi rtti classes from here ...
20067 (__cxxabiv1): ... to here.
20068 * tinfo2.cc (cxxabi.h): Include for new-abi.
20069 Move rtti class definitions to new header file.
20070 (std): Move new abi rtti classes from here ...
20071 (__cxxabiv1): ... to here.
20072 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20073 namespace.
20074
20075 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20076 Jason Merrill <jason@casey.cygnus.com>
20077
20078 * method.c (build_overload_int): Use host_integerp.
20079
20080 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20081
20082 * init.c (build_offset_ref): Handle the case of a templated member
20083 function.
20084
20085 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20086
20087 * except.c (expand_exception_blocks): Clear catch_clauses_last.
20088
20089 2000-03-18 Mark Mitchell <mark@codesourcery.com>
20090
20091 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20092 * class.c (check_bitfield_decl): Turn illegal bitfields into
20093 non-bitfields.
20094 (dfs_propagate_binfo_offsets): Adjust for new size_binop
20095 semantics.
20096 (dfs_offset_for_unshared_vbases): Likewise.
20097 * cvt.c (cp_convert_to_pointer): Convert NULL to a
20098 pointer-to-member correctly under the new ABI.
20099 * expr.c (cplus_expand_constant): Don't use cp_convert when
20100 turning an offset into a pointer-to-member.
20101 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20102 when dereferencing them under the new ABI.
20103 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20104 of pointers-to-members under the new ABI.
20105
20106 * class.c (check_bitfield_decl): Remove restriction on really long
20107 bitfields.
20108 (layout_class_type): Implement new ABI handling of bitfields
20109 longer than their types.
20110
20111 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20112
20113 * parse.y (extdefs): Call ggc_collect.
20114 * parse.c: Regenerated.
20115
20116 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
20117
20118 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20119 (note_name_declared_in_class): Use OVL_CURRENT to get at a
20120 potential overload.
20121
20122 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20123
20124 * class.c (build_vbase_path): Use integer_zerop.
20125 (build_vtable_entry): Use tree_low_cst.
20126 (get_vfield_offset): Use bit_position.
20127 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20128 Use tree_low_cst.
20129 (check_bitfield_decl): Set DECL_SIZE using convert.
20130 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20131 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20132 Use tree_low_cst.
20133 (finish_struct_1): Use bit_position.
20134 (dump_class_hierarchy): Use tree_low_cst.
20135 * cp-tree.h (min_precision): Add declaration.
20136 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20137 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20138 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20139 * expr.c (cplus_expand_constant): Use bit_position.
20140 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20141 * rtti.c (get_base_offset): Use bit_position.
20142 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20143 host_integerp, and tree_low_cst.
20144 (pointer_int_sum): Use integer_zerop.
20145 (build_component_addr): Use bit_position.
20146
20147 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
20148
20149 * typeck.c (require_complete_type): Don't assume size_zero_node.
20150 (complete_type_or_else): Likewise.
20151
20152 2000-03-16 Steven Grady <grady@digitaldeck.com>
20153 Jason Merrill <jason@casey.cygnus.com>
20154
20155 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20156
20157 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
20158
20159 * decl2.c (grokfield): Bail out if type is error_mark_node.
20160
20161 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20162
20163 * tinfo2.cc (__ptr_to_member_data): Rename to ...
20164 (__pointer_to_member_data): ... here. Adjust.
20165 * rtti.c (create_tinfo_types): Adjust.
20166
20167 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20168
20169 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20170 * decl.c (ref_desc_type_node): Undocument.
20171 * rtti.c (ptr_ref_initializer): Rename to ...
20172 (ptr_initializer): ... here. Adjust comments.
20173 (ptmd_initializer): Fix comment thinko.
20174 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20175 (create_tinfo_types): Remove ref_desc_type_node init.
20176 * tinfo2.cc (__reference_type_info): Remove.
20177
20178 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
20179
20180 * decl.c (cp_finish_decl): Remove obsolete comment.
20181
20182 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20183
20184 2000-03-14 Mark Mitchell <mark@codesourcery.com>
20185
20186 * cp-tree.h: Tweak documentation.
20187 * class.c (build_vbase_pointer_fields): Layout the fields, too.
20188 (avoid_overlap): Remove.
20189 (get_binfo_offset_as_int): New function.
20190 (dfs_serach_base_offsets): Likewise.
20191 (layout_nonempty_base_or_field): Likewise.
20192 (build_base_field): Layout fields here. Avoid placing two objects
20193 of the same type at the same address, under the new ABI.
20194 (build_base_fields): Adjust accordingly.
20195 (create_vtable_ptr): Return the new field, but don't attach it to
20196 TYPE_FIELDS.
20197 (remove_base_field): Remove.
20198 (remove_base_fields): Remove.
20199 (layout_basetypes): Adjust accordingly.
20200 (layout_class_type): Call layout_field for each field, rather than
20201 just making a wholesale call to layout_type.
20202
20203 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
20204
20205 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20206
20207 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
20208
20209 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20210
20211 * except.c (dtor_nothrow): New fn.
20212 (do_pop_exception): Use it. Take type parm.
20213 (push_eh_cleanup): Take type parm.
20214 (expand_start_catch_block): Pass it.
20215 (build_eh_type_type_ref): Accept null type.
20216
20217 2000-03-12 Mark Mitchell <mark@codesourcery.com>
20218
20219 * cp-tree.h (revert_static_member_fn): Change prototype.
20220 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20221 (grok_op_properties): Likewise.
20222 (start_function): Likewise.
20223 (revert_static_member_fn): Simplify.
20224 * pt.c (check_explicit_specialization): Adjust call to
20225 revert_static_member_fn.
20226
20227 2000-03-11 Mark Mitchell <mark@codesourcery.com>
20228
20229 * cp-tree.h (scope_kind): New type.
20230 (tmpl_spec_kind): Likewise.
20231 (declare_pseudo_global_level): Remove.
20232 (pseudo_global_level_p): Rename to template_parm_scope_p.
20233 (pushlevel): Remove declaration.
20234 (begin_scope): New function.
20235 (finish_scope): Likewise.
20236 (current_tmpl_spec_kind): Likewise.
20237 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20238 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
20239 Add template_spec_p.
20240 (toplevel_bindings_p): Adjust.
20241 (declare_pseudo_global_level): Remove.
20242 (pseudo_global_level_p): Rename to template_parm_scope_p.
20243 (current_tmpl_spec_kind): New function.
20244 (begin_scope): Likewise.
20245 (finish_scope): Likewise.
20246 (maybe_push_to_top_level): Adjust.
20247 (maybe_process_template_type_declaration): Likewise.
20248 (pushtag): Likewise.
20249 (pushdecl_nonclass_level): Likewise.
20250 (lookup_tag): Likewise.
20251 (grokfndecl): Handle member template specializations. Share
20252 constructor and non-constructor code.
20253 * decl2.c (check_classfn): Handle member template specializations.
20254 * pt.c (begin_template_parm_list): Use begin_scope.
20255 (begin_specialization): Likewise.
20256 (end_specialization): Likewise.
20257 (check_explicit_specialization): Use current_tmpl_spec_kind.
20258 Handle member template specializations.
20259 (end_template_decl): Use finish_scope. Remove call to
20260 get_pending_sizes.
20261 (push_template_decl_real): Remove bogus error message.
20262 (tsubst_decl): Fix typo in code contained in comment.
20263 (instantiate_template): Handle member template specializations.
20264 (most_general_template): Likewise.
20265
20266 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
20267
20268 * lex.c (whitespace_cr): Compress consecutive calls to warning().
20269 (do_identifier): Ditto for error().
20270
20271 * pt.c (convert_nontype_argument): Ditto for cp_error().
20272 (convert_template_argument): Ditto for cp_pedwarn().
20273
20274 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
20275
20276 * exception.cc (__check_null_eh_spec): New fn.
20277 * except.c (expand_end_eh_spec): Call it if the spec is throw().
20278
20279 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20280
20281 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20282 * except.c (expand_end_eh_spec): Add the return type.
20283 * rtti.c (throw_bad_cast): Add the parmtypes.
20284 (throw_bad_typeid): Likewise.
20285
20286 * semantics.c (expand_stmt): Only leave out rtl for unused
20287 artificials, and set DECL_IGNORED_P on them as well.
20288 * decl.c (wrapup_globals_for_namespace): Likewise.
20289
20290 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
20291
20292 * decl.c (maybe_commonize_var): Skip all artificial decls.
20293 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20294
20295 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
20296
20297 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20298 * cp-tree.h: Declare flag_enforce_eh_specs.
20299 * decl.c (store_parm_decls, finish_function): Check it.
20300
20301 C library functions don't throw.
20302 * Makefile.in (cfns.h): New target.
20303 (except.o): Depend on it.
20304 * Make-lang.in (cc1plus): Depend on cfns.gperf.
20305 * cfns.gperf: New file.
20306 * cfns.h: Generated.
20307 * except.c: Include it.
20308 (nothrow_libfn_p): New fn.
20309 * decl.c (grokfndecl): Use it.
20310 * cp-tree.h: Declare it.
20311
20312 * decl.c (push_overloaded_decl_1, auto_function,
20313 define_function): Lose.
20314 (build_library_fn_1): New static fn.
20315 (builtin_function): Use it.
20316 (get_atexit_node): Use build_library_fn_ptr.
20317 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20318 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20319 push_void_library_fn, push_throw_library_fn): New fns.
20320 * cp-tree.h: Declare them.
20321 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20322 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20323 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20324 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20325 * rtti.c (build_runtime_decl): Lose.
20326 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20327 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20328 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20329
20330 * call.c (build_call): Remove result_type parm.
20331 Call mark_used on unused artificial fns.
20332 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20333
20334 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
20335
20336 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20337 appropriate.
20338 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20339 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20340 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20341 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20342 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20343 expand_generic_desc): Likewise.
20344
20345 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20346
20347 * exception.cc (__cp_pop_exception): Cleanup the original object.
20348
20349 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20350
20351 * decl.c (grok_op_properties): Merge conversion to void warning
20352 with other silly op warnings.
20353
20354 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
20355
20356 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20357 array CONSTRUCTOR elements. Don't use expr_tree_cons.
20358
20359 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20360
20361 * decl.c (cp_make_fname_decl): New function.
20362 (wrapup_globals_for_namespace): Don't emit unused static vars.
20363 (init_decl_processing): Remove comment about use of
20364 array_domain_type. Set make_fname_decl.
20365 (cp_finish_decl): Remove __FUNCTION__ nadgering.
20366 * semantics.c (begin_compound_stmt): Remove
20367 current_function_name_declared flagging.
20368 (expand_stmt): Don't emit unused local statics.
20369 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20370 specially.
20371
20372 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
20373
20374 * typeck.c (convert_for_assignment): Don't look at array
20375 initializer.
20376 * call.c (convert_like_real): Likewise.
20377
20378 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
20379
20380 Add initial support for '\uNNNN' specifier.
20381 * lex.c (read_ucs): New fn.
20382 (readescape, skip_white_space): Call it.
20383 (is_extended_char, is_extended_char_1): New fns.
20384 (utf8_extend_token): New fn, #if 0'd out.
20385 (real_yylex): Treat extended chars like letters.
20386
20387 * search.c (note_debug_info_needed): Walk the bases even if we
20388 weren't deferring the type itself.
20389
20390 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20391
20392 * decl2.c (finish_objects): Constify a char*.
20393
20394 * method.c (emit_thunk): Likewise.
20395
20396 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
20397
20398 * typeck.c (dubious_conversion_warnings): Look through
20399 REFERENCE_TYPE.
20400
20401 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20402
20403 * class.c (dfs_modify_vtables): I is now unsigned.
20404 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20405 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20406 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20407 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20408 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20409 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20410 Call integer_all_onesp.
20411 * typeck2.c (process_init_constructor): Use compare_tree_int.
20412
20413 * lang-specs.h (as): Don't call if -syntax-only.
20414
20415 2000-03-06 Mark Mitchell <mark@codesourcery.com>
20416
20417 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20418 RTL_EXPR_HAS_NO_SCOPE after all.
20419
20420 2000-03-05 Mark Mitchell <mark@codesourcery.com>
20421
20422 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20423 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
20424 RTL_EXPR_HAS_NO_SCOPE.
20425
20426 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20427 later.
20428
20429 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20430
20431 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
20432
20433 * call.c (convert_like): Macrofy.
20434 (convert_like_with_context): New macro.
20435 (convert_like_real): Renamed from convert_like. Add calling
20436 context parameters, for diagnostics. Add recursive flag. Call
20437 dubious_conversion_warnings for outer conversion.
20438 (build_user_type_conversion): Use convert_like_with_context.
20439 (build_over_call): Likewise. Don't warn about dubious
20440 conversions here. Adjust convert_default_arg calls.
20441 (convert_default_arg): Add context parameters for diagnostics.
20442 Pass through to convert_like_with_context.
20443 * cp-tree.h (convert_default_arg): Add context parameters.
20444 (dubious_conversion_warnings): Prototype new function.
20445 * typeck.c (convert_arguments): Adjust convert_default_arg call.
20446 (dubious_conversion_warnings): New function, broken
20447 out of convert_for_assignment.
20448 (convert_for_assignment): Adjust.
20449
20450 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
20451
20452 * decl2.c (key_method): Break out from...
20453 (import_export_vtable, import_export_class): ...here.
20454
20455 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20456 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20457
20458 * search.c (note_debug_info_needed, dfs_debug_mark,
20459 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
20460 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20461
20462 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
20463
20464 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20465 typos.
20466
20467 2000-03-02 Mark Mitchell <mark@codesourcery.com>
20468
20469 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20470 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20471 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20472 (lang_type): Split gets_new into has_new and has_array_new.
20473 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20474 (TYPE_GETS_NEW): Split into ...
20475 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20476 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20477 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20478 (build_op_new_call): Don't declare.
20479 (build_new_1): Likewise.
20480 * call.c (build_op_new_call): Remove.
20481 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20482 instead of TYPE_NEEDS_DESTRUCTOR.
20483 (finish_struct_bits): Likewise.
20484 (add_implicitly_declared_members): Likewise.
20485 (check_field_decl): Likewise.
20486 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20487 correctly under the new ABI.
20488 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20489 instead of TYPE_NEEDS_DESTRUCTOR.
20490 (initialize_local_var): Likewise.
20491 (destroy_local_var): Likewise.
20492 (cp_finish_decl): Likewise.
20493 (register_dtor_fn): Likewise.
20494 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20495 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
20496 TYPE_VEC_DELETE_TAKES_SIZE here.
20497 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20498 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20499 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20500 (finish_destructor_body): Likewise.
20501 (maybe_build_cleanup_1): Likewise.
20502 * decl2.c (do_static_destruction): Likewise.
20503 * init.c (build_new_1): Make it static.
20504 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20505 (expand_cleanup_for_base): Likewise.
20506 (get_cookie_size): New function.
20507 (build_new_1): Handle array-new cookies correctly under the new
20508 ABI.
20509 (build_vec_delete_1): Likewise.
20510 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20511 (build_delete): Likewise.
20512 (build_vec_delete): Handle array-new cookies correctly under the new
20513 ABI.
20514 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20515 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20516 TYPE_HAS_ARRAY_NEW_OPERATOR.
20517 * ptree.c (print_lang_type): Check them.
20518 * search.c (context_for_name_lookup): Fix typo in comment.
20519 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20520 * tree.c (break_out_cleanups): Likewise.
20521 (build_cplus_array_test_1): Likewise.
20522 (cp_build_qualified_type_real): Likewise.
20523 * typeck.c (complete_type): Likewise.
20524
20525 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20526 the command-line, not the end.
20527
20528 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
20529
20530 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20531
20532 2000-03-02 Tom Tromey <tromey@cygnus.com>
20533
20534 * cp-tree.h (build_java_class_ref): Declare.
20535 * init.c (build_java_class_ref): No longer static.
20536 * except.c (expand_throw): Generate a Java-style `throw' if the
20537 thrown object is a "Java" object.
20538 (initialize_handler_parm): Generate a Java-style lookup of
20539 exception info if the caught object is a "Java" object.
20540 (catch_language, catch_language_init): New globals.
20541 (decl_is_java_type): New function.
20542 (expand_start_catch_block): Don't call push_eh_info() or
20543 push_eh_cleanup() when handling a Java-style "catch". Pass Java
20544 class reference to build_catch_block.
20545
20546 2000-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20547
20548 * typeck.c (comptypes): Treat sizetype like its language equivalent.
20549
20550 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
20551
20552 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20553 to merge reference/pointer code and fix incorrect warnings.
20554
20555 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
20556
20557 * search.c (protected_accessible_p): Use context_for_name_lookup.
20558
20559 * init.c (construct_virtual_bases): Fix thinko.
20560 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20561
20562 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
20563
20564 * decl.c (current_function_decl): Move to toplev.c.
20565
20566 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
20567
20568 * pt.c (fn_type_unification): Unify return type, whenever
20569 provided.
20570 (get_bindings_real): Only pass return type when necessary.
20571 Remove explicit return type check.
20572 * class.c (resolve_address_of_overloaded_function): Pass desired
20573 return type to fn_type_unification.
20574
20575 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20576
20577 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20578 DECL_FIELD_SIZE.
20579 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20580 DECL_FIELD_SIZE.
20581 * rtti.c (expand_class_desc): Likewise.
20582 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20583 (THUNK_VCALL_OFFSET): Likewise.
20584 (THUNK_DELTA): Reflect changes in ../tree.h.
20585
20586 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
20587
20588 * search.c (protected_accessible_p): Also allow the access if
20589 the member is public in DERIVED. Lose TYPE parm.
20590 (friend_accessible_p): Lose TYPE parm.
20591 (accessible_p): Adjust.
20592
20593 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20594
20595 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20596 on things that are not sizes; ssize_binop deleted.
20597 Call size_diffop when appropriate.
20598 (dfs_build_vcall_offset_vtbl_entries): Likewise.
20599 (build_primary_vtable, build_secondary_vtable): Likewise.
20600 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20601 Variable I is HOST_WIDE_INT.
20602 (get_vfield_offset): Pass proper types to size_binop.
20603 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20604 (finish_struct_1): Likewise.
20605 (skip_rtti_stuff): Arg N is now pointer to signed.
20606 (layout_class_type): Use size_zero_node.
20607 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20608 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20609 * decl.c (complete_arry_type): Pass proper types to size_binop.
20610 (xref_basetypes): BINFO_OFFSET is sizetype.
20611 * error.c (dump_expr): Don't use size_binop non-sizes.
20612 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20613 * init.c (construct_virtual_bases): Fix type error.
20614 (build_vec_delete_1): Pass proper type to size_binop and don't
20615 fold result.
20616 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20617 * rtti.c (get_base_offset): Pass proper type to size_binop.
20618 * search.c (dfs_find_vbases): Fix type error.
20619 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20620 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20621 * tree.c (debug_binfo): Variable N is signed.
20622 Use HOST_WIDE_INT_PRINT_DEC.
20623 * typeck.c (comptypes): sizetype is same as equivalent integer type.
20624 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20625 size_one_node and size_zero_node.
20626 (c_alignof): Use size_one_node.
20627 (build_component_addr): Pass proper types to size_binop.
20628 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20629
20630 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
20631
20632 Implement class scope using-declarations for functions.
20633 * class.c (handle_using_decl): Call add_method for used functions.
20634 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20635 (add_method): Used functions are hidden by local functions.
20636 (check_bases_and_members): Handle using-decls before finalizing
20637 CLASSTYPE_METHOD_VEC.
20638 * call.c (add_function_candidate): Add ctype parm; if nonzero,
20639 override the type of 'this' accordingly.
20640 (add_template_candidate, add_template_candidate_real): Add ctype parm.
20641 (convert_class_to_reference, build_user_type_conversion_1,
20642 build_new_function_call, build_object_call, build_new_op,
20643 build_new_method_call): Pass ctype parm.
20644
20645 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20646 the baselink.
20647 * call.c (convert_class_to_reference, build_user_type_conversion_1,
20648 build_new_function_call, build_object_call, build_new_op,
20649 build_new_method_call, build_op_delete_call): Don't get basetype_path
20650 from a baselink.
20651 * typeck.c (build_component_ref): Likewise.
20652 * init.c (build_offset_ref): Likewise.
20653 (resolve_offset_ref): Don't call enforce_access.
20654 Call build_scoped_ref.
20655 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
20656 would cause an error or if -pedantic.
20657 * class.c (alter_access): Lose binfo parm.
20658
20659 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20660
20661 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20662 types.
20663
20664 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
20665
20666 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20667 pseudo_type_info creation into the std namespace
20668
20669 2000-02-26 Mark Mitchell <mark@codesourcery.com>
20670
20671 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20672 (import_export_class): Remove declaration.
20673 * decl2.c (import_export_class): Make it static.
20674 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20675 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20676 EXPR_WITH_FILE_LOCATION.
20677 * lex.c (check_newline): Tweak filename/lineno setting.
20678 * semantics.c (begin_while_stmt): Fix typo in comment.
20679
20680 2000-02-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20681
20682 * lang-options.h (-fmessage-length=): Add missing option.
20683
20684 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20685
20686 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
20687
20688 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20689
20690 2000-02-25 Jim Wilson <wilson@cygnus.com>
20691
20692 * optimize.c (expand_call_inline): Emit the return label before
20693 evaluating the return value.
20694
20695 2000-02-24 Mark Mitchell <mark@codesourcery.com>
20696
20697 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20698 than duplicating functionality here.
20699 * optimize.c: Include input.h.
20700 (expand_call_inline): Use push_srcloc and pop_srcloc.
20701 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20702 * parse.c: Regenerated.
20703 * Makefile.in (lex.o): Depend on input.h.
20704 (optimize.o): Likewise.
20705
20706 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
20707
20708 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20709 function type, rather than ICE.
20710
20711 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
20712
20713 * decl.c (grokdeclarator): Call decl_type_access_control.
20714 * parse.y (parse_end_decl): Don't call decl_type_access_control if
20715 decl is null.
20716
20717 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
20718
20719 * decl.c (decls_match): Remove obsolete static member nadgering.
20720
20721 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
20722
20723 * decl.c (grokdeclarator): Change ANSI to ISO.
20724 * lex.c (consume_string, readescape, do_identifier): Likewise.
20725 (parse_float, real_yylex): Likewise.
20726 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20727 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20728 new_type_id, maybe_label_decls, simple_stmt,
20729 for.init.statement): Likewise.
20730 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20731 * semantics.c (finish_named_return_value): Likewise.
20732 * parse.c: Regenerate.
20733
20734 2000-02-21 Mark Mitchell <mark@codesourcery.com>
20735
20736 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20737 (CPTI_CLASS_STAR_TYPE): Remove.
20738 (vtable_index_type): Likewise.
20739 (class_star_type_node): Remove.
20740 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20741 (build_binary_op_nodefault): Remove.
20742 * call.c (build_new_op): Use build_binary_op instead of
20743 build_binary_op_nodefault.
20744 * decl.c (init_decl_processing): Remove class_star_type_node
20745 initialization. Make delta_type_node ptrdiff_type_node under the
20746 new ABI. Initialize vtable_index_type.
20747 (build_ptrmemfunc_type): Build different structures for the new
20748 ABI.
20749 (build_enumerator): Use build_binary_op instead of
20750 build_binary_op_nodefault.
20751 * method.c (build_overload_value): Mangle pointers-to-members
20752 appropriately under the new ABI.
20753 * typeck.c (build_array_ref): Use build_binary_op instead of
20754 build_binary_op_nodefault.
20755 (get_member_function_from_ptrfunc): Adjust for the new ABI.
20756 (build_binary_op_nodefault): Rename to ...
20757 (build_binary_op): ... this. Remove old version. Adjust for
20758 pointer-to-member comparisons under the new ABI.
20759 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
20760 (build_ptrmemfunc): Adjust for the new ABI.
20761 (expand_ptrmemfunc_cst): Likewise.
20762 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20763 (pfn_from_ptrmemfunc): Adjust for the new ABI.
20764
20765 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
20766
20767 * call.c (build_object_call): Compress consecutive calls to
20768 cp_error.
20769 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20770 (build_op_delete_call): Adjust message formatting.
20771
20772 * class.c (check_bases): Compress consecutive calls to
20773 cp_pedwarn.
20774 (finish_struct_anon): Say 'ISO C++'.
20775
20776 * decl.c (start_decl): Same here.
20777 (grok_reference_init): Likewise.
20778 (grokfndecl): Correct message formatting.
20779 (grokfndecl): Improve diagnostic.
20780 (check_static_variable_definition): Likewise. Say 'ISO C++'
20781 (compute_array_index_type): Say 'ISO C++'
20782 (create_array_type_for_decl): Compress consecutive calls to
20783 cp_error.
20784 (grokdeclarator): Say 'ISO C++'
20785 (grok_op_properties): Likewise.
20786
20787 * decl2.c (delete_sanity): Clairify diagnostic.
20788 (check_member_template): Same here.
20789 (grok_function_init): Use consistent terminology.
20790
20791 * expr.c (do_case): Say 'ISO C++'
20792
20793 * friend.c (do_friend): Compress consecutive calls to warning.
20794
20795 2000-02-20 Mark Mitchell <mark@codesourcery.com>
20796
20797 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20798 * class.c (build_secondary_vtable): Reorganize. Don't create a
20799 new vtable under the new ABI.
20800 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20801 computing the size.
20802 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20803 the initializing elements.
20804 (initialize_vtable): New function.
20805 (dfs_finish_vtbls): Use it.
20806 (dfs_accumulate_vtbl_inits): New function.
20807 (finish_vtbls): Merge primary and secondary vtables under the new
20808 ABI.
20809 (finish_struct_1): Remove redundant call to layout_vtable_decl.
20810 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20811 aren't VAR_DECLs.
20812
20813 * class.c (build_vtable): New function, split out from ...
20814 (get_vtable_decl): ... here, and ...
20815 (build_secondary_vtable): ... here.
20816
20817 * pt.c (tsubst_decl): Fix formatting.
20818
20819 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
20820
20821 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20822 (avoid_overlap, build_base_field): Likewise.
20823 (build_base_field, build_base_fields, is_empty_class):
20824 Test DECL_SIZE with integer_zero.
20825 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20826 * cp-tree.h (struct lang_type): New field size_unit.
20827 (CLASSTYPE_SIZE_UNIT): New macro.
20828 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20829 (cp_finish_decl): Delete -Wlarger-than processing.
20830 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20831 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20832 * tree.c (make_binfo): binfo vector is one entry longer.
20833 (walk_tree): Walk DECL_SIZE_UNIT.
20834
20835 2000-02-19 Mark Mitchell <mark@codesourcery.com>
20836
20837 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20838 comment.
20839 (build_vtable_entry): Don't assume all vtable entries are
20840 functions.
20841 (build_vtbl_initializer): Adjust accordingly.
20842 (get_vtable_decl): Fix formatting.
20843
20844 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
20845
20846 * semantics.c (deferred_type_access_control): Walk the entire
20847 type_lookups list.
20848 (save_type_access_control): Rename from
20849 initial_deferred_type_access_control. Just remember the value.
20850 (decl_type_access_control): New fn.
20851 (begin_function_definition): Use deferred_type_access_control, after
20852 we've started the function. Set type_lookups to error_mark_node.
20853 * parse.y (frob_specs, fn.def1): Adjust.
20854 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20855 (parse_end_decl, parse_bitfield0, parse_method): New fns.
20856 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20857 (after_type_component_declarator0): Likewise.
20858 (after_type_component_declarator): Likewise.
20859 (notype_component_declarator): Likewise.
20860 * cp-tree.h: Adjust.
20861
20862 * decl.c (redeclaration_error_message): Allow redeclaration of
20863 namespace-scope decls.
20864
20865 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
20866
20867 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20868
20869 2000-02-17 Mark Mitchell <mark@codesourcery.com>
20870
20871 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20872 * decl2.c (grokclassfn): Likewise.
20873
20874 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20875
20876 * decl2.c (lang_decode_option): Don't set default message length
20877 here.
20878 * lex.c (lang_init_options): Set it here.
20879
20880 2000-02-16 Mark Mitchell <mark@codesourcery.com>
20881
20882 Make DECL_CONTEXT mean the class in which a member function was
20883 declared, even for a virtual function.
20884 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
20885 (DECL_FRIEND_CONTEXT): New macro.
20886 (DECL_REAL_CONTEXT): Remove.
20887 (SET_DECL_FRIEND_CONTEXT): Likewise.
20888 (DECL_VIRTUAL_CONTEXT): Adjust.
20889 (DECL_CLASS_SCOPE_P): Use TYPE_P.
20890 (add_friends): Remove.
20891 (hack_decl_function_context): Likewise.
20892 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
20893 CP_DECL_CONTEXT.
20894 (build_over_call): Fix indentation. Use DECL_CONTEXT
20895 instead of DECL_CLASS_CONTEXT.
20896 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
20897 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20898 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20899 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
20900 (build_base_field): Likewise.
20901 (finish_struct_1): Likewise.
20902 (build_self_reference): Likewise.
20903 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
20904 DECL_REAL_CONTEXT.
20905 (pushtag): Use decl_function_context, not
20906 hack_decl_function_context.
20907 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20908 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
20909 (pushdecl): Remove bogus code.
20910 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
20911 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20912 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20913 Use decl_function_context, nothack_decl_function_context.
20914 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
20915 (grokdeclarator): Likewise. Use decl_function_context, not
20916 hack_decl_function_context.
20917 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
20918 (start_function): Use DECL_FRIEND_CONTEXT, not
20919 DECL_CLASS_CONTEXT. Use decl_function_context, not
20920 hack_decl_function_context.
20921 (finish_function): Use decl_function_context, not
20922 hack_decl_function_context.
20923 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
20924 DECL_CLASS_CONTEXT.
20925 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
20926 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
20927 (grokfield): Likewise.
20928 (finish_builtin_type): Likewise.
20929 (finish_vtable_vardec): Use decl_function_context, not
20930 hack_decl_function_context.
20931 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20932 (start_static_initialization_or_destruction): Likewise.
20933 (finish_static_initialization_or_destruction): Likewise.
20934 (mark_used): Adjust logic for deciding when to synthesize methods.
20935 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
20936 DECL_REAL_CONTEXT.
20937 * error.c (dump_function_decl): Use DECL_CONTEXT, not
20938 DECL_CLASS_CONTEXT.
20939 * friend.c (is_friend): Likewise.
20940 (add_friends): Remove.
20941 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
20942 * lex.c (begin_definition_of_inclass_inline): Use
20943 decl_function_context, not hack_decl_function_context.
20944 (process_next_inline): Likewise.
20945 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
20946 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
20947 DECL_CLASSS_CONTEXT.
20948 (hack_identifier): Likewise.
20949 (synthesize_method): Use decl_function_context, not
20950 hack_decl_function_context.
20951 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
20952 DECL_REAL_CONTEXT.
20953 (is_member_template): Use decl_function_context, not
20954 hack_decl_function_context. Use DECL_CONTEXT, not
20955 DECL_CLASS_CONTEXT.
20956 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
20957 DECL_CLASS_CONTEXT.
20958 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
20959 DECL_REAL_CONTEXT.
20960 (push_template_decl_real): Likewise.
20961 (instantiate_class_template): Don't call add_friends.
20962 (tsubst_default_argument): Use DECL_CONTEXT, not
20963 DECL_REAL_CONTEXT.
20964 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
20965 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20966 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
20967 DECL_CLASS_CONTEXT.
20968 * repo.c (repo_inline_used): Likewise.
20969 * search.c (current_scope): Adjust for new _CONTEXT macros.
20970 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
20971 DECL_REAL_CONTEXT.
20972 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
20973 (lookup_fnfields_here):Likewise.
20974 (check_final_overrider): Likewise.
20975 (init_vbase_pointers): Likewise.
20976 (virtual_context): Likewise.
20977 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
20978 (expand_body): Use decl_function_context, not
20979 hack_decl_function_context.
20980 * tree.c (hack_decl_function_context): Remove.
20981 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
20982 DECL_CLASS_CONTEXT.
20983 * typeck2.c (error_not_base_type): Likewise.
20984
20985 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
20986
20987 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
20988
20989 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20990
20991 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
20992
20993 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
20994
20995 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
20996
20997 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
20998
20999 * decl2.c (lang_decode_option): Enable automatic line wrapping.
21000
21001 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
21002
21003 * parse.y (frob_specs): Split out...
21004 (parse_decl): From here.
21005 (fn.def2): Call initial_deferred_type_access_control.
21006 (after_type_component_declarator0): Call frob_specs.
21007 (notype_component_declarator0): Likewise.
21008 * search.c (friend_accessible_p): Nested classes are friends of their
21009 enclosing classes.
21010
21011 2000-02-10 Mark Mitchell <mark@codesourcery.com>
21012
21013 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21014 used to create an implicit temporary.
21015
21016 * class.c (dfs_modify_vtables): Tweak calculation of functions to
21017 override.
21018
21019 2000-02-08 Nathan Sidwell <nathan@acm.org>
21020
21021 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21022 strip array element qualifiers too.
21023
21024 2000-02-07 Mark Mitchell <mark@codesourcery.com>
21025
21026 * decl.c (store_parm_decls): Don't build cleanups for parameters
21027 while processing_template_decl.
21028
21029 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
21030
21031 * cp-tree.h (struct saved_scope): Add incomplete field.
21032 (namespace_scope_incomplete): New macro.
21033 * decl.c (pushdecl): Use it.
21034 (hack_incomplete_structures): Use it. See through artificial
21035 binding levels.
21036 (mark_saved_scope): Mark it.
21037
21038 Implement access control for nested types.
21039 * search.c (type_access_control): New fn.
21040 (accessible_p): Now we do perform access control for types.
21041 * semantics.c (deferred_type_access_control): New fn.
21042 (initial_deferred_type_access_control): New fn.
21043 (begin_function_definition): Call it. Add lookups parm.
21044 * decl.c (struct binding_level): Add this_class field.
21045 (pushlevel_class): Set it.
21046 (mark_binding_level): Mark it.
21047 (lookup_name_real): Use it. Call type_access_control.
21048 (mark_saved_scope): Mark lookups field.
21049 * cp-tree.h (flagged_type_tree): Add lookups field.
21050 (struct saved_scope): Add lookups field.
21051 (type_lookups): New macro.
21052 * parse.y (declmods): Now <ftype>.
21053 (parse_decl): Add lookups parm. Call
21054 initial_deferred_type_access_control.
21055 (lang_extdef): Clear type_lookups.
21056 (typed_declspecs, declmods, typespec): Set lookups field.
21057 (initdcl): Call deferred_type_access_control.
21058 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21059 component_decl_1, named_parm): Adjust.
21060 * friend.c (is_friend): Nested classes are friends of their
21061 enclosing classes.
21062
21063 * class.c (currently_open_derived_class): New fn.
21064 * method.c (hack_identifier): Use it.
21065
21066 * lex.c (do_identifier): Remove obsolete code.
21067
21068 * parse.y (typed_typespecs): Propagate new_type_flag properly.
21069
21070 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
21071
21072 * tinfo.h: Remove apostrophes from C++ comment (xgettext
21073 thinks this file is plain C).
21074
21075 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21076
21077 * Makefile.in (call.o): Depend on $(EXPR_H).
21078
21079 * call.c: Include "expr.h".
21080
21081 * class.c (dump_class_hierarchy): Add prototype.
21082
21083 * search.c (dfs_get_pure_virtuals): Likewise.
21084
21085 2000-02-1 Ulrich Drepper <drepper@redhat.com>
21086
21087 * parse.y (simple_stmt): Allow :: token in asm parameter list.
21088 * parse.c: Rebuilt.
21089
21090 2000-01-31 Jim Wilson <wilson@cygnus.com>
21091
21092 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21093 Store it in DECL_FCONTEXT.
21094 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21095
21096 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
21097
21098 * tinfo.h (old abi): #include "tconfig.h".
21099 * tinfo.cc (convert_to_base): Move into old abi section.
21100
21101 2000-01-31 Mark Mitchell <mark@codesourcery.com>
21102
21103 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21104 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21105 (BINFO_PRIMARY_BINFO): New macro.
21106 (BF_DELTA): Rename to ...
21107 (BV_DELTA): ... this.
21108 (BF_VCALL_INDEX): Rename to ...
21109 (BV_VCALL_INDEX): ... this.
21110 (BF_FN): Rename to ...
21111 (BV_FN): ... this.
21112 * class.c (build_vbase_path): Adjust for changes to reverse_path.
21113 (set_rtti_entry): Rename BF_ macros to BV_ variants.
21114 (modify_vtable_entry): Simplify.
21115 (add_virtual_function): Rename BF_ macros to BV_ variants.
21116 (build_vtable_initializer): Likewise.
21117 (get_class_offset_1): Remove.
21118 (dfs_get_class_offset): Likewise.
21119 (get_class_offset): Likewise.
21120 (dfs_find_final_overrider): New function.
21121 (find_final_overrider): Likewise.
21122 (modify_one_vtable): Remove.
21123 (dfs_find_base): New function.
21124 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
21125 find_final_overrider.
21126 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
21127 virtuals.
21128 (dfs_fixup_vtable_deltas): Remove.
21129 (override_one_vtable): Remove.
21130 (merge_overrides): Likewise.
21131 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21132 unreal chilren of virtual bases.
21133 (finish_struct_1): Don't use merge_overrides. Don't use
21134 dfs_fixup_vtable_deltas.
21135 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21136 BINFOs.
21137
21138 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21139 Jason Merrill <jason@yorick.cygnus.com>
21140
21141 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21142
21143 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
21144
21145 * exception.cc (__throw_bad_typeid): Add missing std::.
21146
21147 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21148
21149 * cp-tree.h (make_thunk): PROTO -> PARAMS.
21150
21151 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
21152
21153 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21154
21155 Runtime support for new-abi rtti.
21156 * inc/typeinfo (type_info::operator!=): Define in class.
21157 (type_info::before, type_info::name, type_info::operator==,
21158 type_info::operator!=): Define new ABI implementations.
21159 (type_info::is_pointer_p, type_info::is_function_p): Declare
21160 new virtual functions.
21161 (type_info::do_catch, type_info::do_upcast): Likewise.
21162
21163 * tinfo.h (__base_class_info): Define new class.
21164 (__class_type_info): Likewise.
21165 (__si_class_type_info): Likewise.
21166 (__vmi_class_type_info): Likewise.
21167 (__dynamic_cast): Prototype.
21168
21169 * tinfo.cc: Conditionalize old and new rtti mechanisms.
21170 (type_info::is_pointer_p): Define new function.
21171 (type_info::is_function_p): Likewise.
21172 (type_info::do_catch): Likewise.
21173 (type_info::do_upcast): Likewise.
21174 (vtable_prefix): New structure for vtable access.
21175 (adjust_pointer): Define new template function.
21176 (contained_p, public_p, virtual_p, contained_public_p,
21177 contained_nonpublic_p, contained_nonvirtual_p): Define new
21178 functions.
21179 (nonvirtual_base_type): New local variable.
21180 (__class_type_info::~__class_type_info): Define.
21181 (__si_class_type_info::~__si_class_type_info): Likewise.
21182 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21183 (__class_type_info::do_catch): Define new function.
21184 (__class_type_info::do_upcast): Likewise.
21185 (__class_type_info::find_public_src): Likewise.
21186 (__class_type_info::do_find_public_src): Likewise.
21187 (__si_class_type_info::do_find_public_src): Likewise.
21188 (__vmi_class_type_info::do_find_public_src): Likewise.
21189 (__class_type_info::do_dyncast): Likewise.
21190 (__si_class_type_info::do_dyncast): Likewise.
21191 (__vmi_class_type_info::do_dyncast): Likewise.
21192 (__class_type_info::do_upcast): Likewise.
21193 (__si_class_type_info::do_upcast): Likewise.
21194 (__vmi_class_type_info::do_upcast): Likewise.
21195 (__dynamic_cast): Likewise.
21196
21197 * tinfo2.cc (__fundamental_type_info): Define new class.
21198 (__pointer_type_info): Likewise.
21199 (__reference_type_info): Likewise.
21200 (__array_type_info): Likewise.
21201 (__function_type_info): Likewise.
21202 (__enum_type_info): Likewise.
21203 (__ptr_to_member_type_info): Likewise.
21204 (__fundamental_type_info::~__fundamental_type_info): Define.
21205 (__pointer_type_info::~__pointer_type_info): Likewise.
21206 (__reference_type_info::~__reference_type_info): Likewise.
21207 (__array_type_info::~__array_type_info): Likewise.
21208 (__function_type_info::~__function_type_info): Likewise.
21209 (__enum_type_info::~__enum_type_info): Likewise.
21210 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21211 (__pointer_type_info::do_catch): Define new function.
21212 (__ptr_to_member_type_info::do_catch): Define new function.
21213
21214 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21215 (__is_pointer): Likewise.
21216
21217 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21218
21219 2000-01-30 Mark Mitchell <mark@codesourcery.com>
21220
21221 * cp/class.c (build_vtable): Rename to build_primary_vtable.
21222 (prepare_fresh_vtable): Rename to build_secondary_vtable.
21223 (make_new_vtable): New function.
21224 (modify_vtable_entry): Handle generation of new vtables correctly.
21225 (modify_one_vtable): Remove unused parameter.
21226 (dfs_fixup_vtable_deltas): Likewise.
21227 (override_one_vtable): Use build_secondary_vtable.
21228 (finish_struct_1): Use build_primary_vtable and
21229 build_secondary_vtable.
21230
21231 2000-01-28 Ulrich Drepper <drepper@redhat.com>
21232
21233 * cp/decl.c: Adjust variable names, comments, help strings.
21234
21235 2000-01-29 Nathan Sidwell <nathan@acm.org>
21236
21237 * new2.cc (operator delete[]): Use operator delete, don't assume
21238 implementation.
21239
21240 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
21241
21242 * class.c (build_vtbl_initializer): Add argument to
21243 build_vtable_entry call.
21244
21245 2000-01-27 Mark Mitchell <mark@codesourcery.com>
21246
21247 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21248 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21249 (BF_DELTA): New macro.
21250 (BF_VCALL_INDEX): Likewise.
21251 (BF_FN): Likewise.
21252 (THUNK_VCALL_OFFSET): Likewise.
21253 (make_thunk): Change prototype.
21254 * class.c (build_vtable_entry): Integrate
21255 build_vtable_entry_for_fn. Handle vcall indices.
21256 (build_vtable_entry_for_fn): Remove.
21257 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
21258 BF_VCALL_INDEX, BF_FN.
21259 (modify_vtable_entry): Integrate common code from
21260 modify_one_vtable and dfs_fixup_vtable_deltas.
21261 (add_virtual_function): Set BF_VCALL_INDEX.
21262 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
21263 and BF_FN.
21264 (modify_one_vtable): Simplify.
21265 (dfs_fixup_vtable_deltas): Likewise.
21266 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21267 * method.c (make_thunk): Handle vcall indices.
21268
21269 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
21270
21271 Compiler side new abi rtti (not enabled).
21272 * cp-tree.h (new_abi_rtti_p): New macro.
21273 (emit_support_tinfos): Prototype new function.
21274 (tinfo_decl_p): Likewise.
21275 (emit_tinfo_decl): Likwise.
21276 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21277 macros.
21278 (doing_runtime): New local static.
21279 (init_rtti_processing): Add new-abi initializer.
21280 (get_tinfo_decl): Add new-abi logic.
21281 (tinfo_from_decl): Likewise.
21282 (build_dynamic_cast_1): Likewise.
21283 (qualifier_flags): New static function.
21284 (tinfo_base_init): Likewise.
21285 (generic_initializer): Likewise.
21286 (ptr_ref_initializer): Likewise.
21287 (ptmd_initializer): Likewise.
21288 (class_hint_flags): Likewise.
21289 (class_initializer): Likewise.
21290 (synthesize_tinfo_var): Likewise.
21291 (create_real_tinfo_var): Likewise.
21292 (create_pseudo_type_info): Likewise.
21293 (get_vmi_pseudo_type_info): Likewise.
21294 (create_tinfo_types): Likewise.
21295 (emit_support_tinfos): New global function.
21296 (tinfo_decl_p): New global predicate.
21297 (emit_tinfo_decl): New global function.
21298 * class.c (set_rtti_entry): Generalize for old and new rtti.
21299 (build_vtbl_initializer): Likewise.
21300 * decl2.c (finish_file): Likewise.
21301
21302 2000-01-27 Jim Wilson <wilson@cygnus.com>
21303
21304 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21305 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21306
21307 2000-01-27 Mike Stump <mrs@wrs.com>
21308
21309 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21310 for scopes.
21311
21312 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
21313
21314 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21315
21316 2000-01-26 J"orn Rennecke <amylaar@cygnus.co.uk>
21317
21318 * optimize.c (calls_setjmp_r): Supply new argument
21319 to special_function_p.
21320
21321 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21322
21323 * call.c: PROTO -> PARAMS.
21324 * class.c: Likewise.
21325 * cp-tree.h: Likewise.
21326 * cvt.c: Likewise.
21327 * decl.c: Likewise.
21328 * decl.h: Likewise.
21329 * decl2.c: Likewise.
21330 * dump.c: Likewise.
21331 * errfn.c: Likewise.
21332 * error.c: Likewise.
21333 * except.c: Likewise.
21334 * expr.c: Likewise.
21335 * init.c: Likewise.
21336 * input.c: Likewise.
21337 * lex.c: Likewise.
21338 * lex.h: Likewise.
21339 * method.c: Likewise.
21340 * optimize.c: Likewise.
21341 * parse.y: Likewise.
21342 * pt.c: Likewise.
21343 * repo.c: Likewise.
21344 * rtti.c: Likewise.
21345 * search.c: Likewise.
21346 * semantics.c: Likewise.
21347 * spew.c: Likewise.
21348 * tree.c: Likewise.
21349 * typeck.c: Likewise.
21350 * typeck2.c: Likewise.
21351 * xref.c: Likewise.
21352
21353 2000-01-25 Richard Henderson <rth@cygnus.com>
21354
21355 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21356
21357 2000-01-25 Mark Mitchell <mark@codesourcery.com>
21358
21359 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21360 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21361 (struct vcall_offset_data_s): New type.
21362 (dfs_vcall_offset_queue_p): New function.
21363 (dfs_build_vcall_offset_vtbl_entries): Likewise.
21364 (build_vcall_offset_vtbl_entries): Likewise.
21365 (layout_vtable_decl): Likewise.
21366 (num_vfun_entries): Likewise.
21367 (num_extra_vtbl_entries): Add the entries for vcall offsets.
21368 (build_vtbl_initializer): Likewise.
21369 (dfs_finish_vtabls): Use layout_vtable_decl.
21370 (modify_one_vtables): Always duplicate vtables under the new ABI.
21371 (finish_struct_1): Use layout_vtable_decl.
21372
21373 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21374
21375 * decl.c (member_function_or_else): Change third arg from a format
21376 specifier to an `enum overload_flags'. Callers changed.
21377
21378 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
21379
21380 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21381 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21382 build_const_cast, get_delta_difference, check_return_expr): Avoid
21383 ANSI string concatenation usage.
21384
21385 2000-01-24 Mark Mitchell <mark@codesourcery.com>
21386
21387 * class.c (layout_class_type): Put the fields required to make a
21388 class non-empty at the end, not the beginning, of the TYPE_FIELDs
21389 list.
21390
21391 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
21392
21393 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21394 template.
21395
21396 * decl2.c (mark_used): Do instantiate inlines that have been
21397 explicitly instantiated.
21398
21399 2000-01-24 Richard Henderson <rth@cygnus.com>
21400
21401 * call.c (build_over_call): Use expand_tree_builtin.
21402 * typeck.c (build_function_call_real): Likewise.
21403 (build_binary_op_nodefault): Handle unordered compares.
21404
21405 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21406
21407 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21408 cp_tree_index values.
21409 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21410 New global node #defines for them.
21411 * rtti.c (call_void_fn): Replace with ...
21412 (build_runtime_decl): ... new static function.
21413 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21414 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21415 (build_dynamic_cast_1): Always produce correctly typed result.
21416 Explicitly produce type_info addresses. Use dynamic_cast_node.
21417 * exception.cc (__throw_bad_cast): Return `void *'.
21418 (__throw_bad_typeid): Return `const type_info &'.
21419
21420 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21421
21422 * cp-tree.h (get_vtable_decl): Prototype new function.
21423 * class.c (get_vtable_decl): New function. Broken out from ...
21424 (build_vtable): ... here. Use it.
21425 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21426 by get_vtable_decl.
21427
21428 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
21429
21430 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21431 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21432 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21433 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21434 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21435 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21436 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21437 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21438 (CPTI_TINFO_VAR_ID): New enumeration.
21439 (__tp_desc_type_node, __access_mode_type_node,
21440 __bltn_desc_type_node, __user_desc_type_node,
21441 __class_desc_type_node, __ptr_desc_type_node,
21442 __attr_desc_type_node, __func_desc_type_node,
21443 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21444 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21445 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21446 enum_desc_type_node, class_desc_type_node,
21447 si_class_desc_type_node, vmi_class_desc_type_node,
21448 ptmd_desc_type_node, base_desc_type_node): New #defines.
21449 (tinfo_fn_id, tinfo_fn_type): Rename to ...
21450 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21451 (tinfo_var_id): New enumeration.
21452 (DECL_TINFO_FN_P): Augment comment.
21453 * decl.c (cp_global_trees): Adjust documentation.
21454 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21455 tinfo_decl_type and tinfo_var_id.
21456 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21457 (build_typeid): Remove unused variable.
21458 (get_tinfo_var): Use tinfo_var_id.
21459 (tinfo_name): New static function.
21460 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21461 (tinfo_from_decl): Likewise.
21462 (get_base_offset): New static function, broken out of
21463 expand_class_desc.
21464 (expand_si_desc): Use tinfo_name.
21465 (expand_class_desc): Likewise. Lose local static variable.
21466 Use base_desc_type_node. Use get_base_offset.
21467 (expand_ptr_desc): Use tinfo_name.
21468 (expand_attr_desc): Likewise.
21469 (expand_generic_desc): Likewise.
21470
21471 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21472 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21473
21474 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21475
21476 * cp-tree.h (__eprintf): Remove declaration.
21477 * tree.c (__eprintf): Remove definition.
21478
21479 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
21480 Mark Mitchell <mark@codesourcery.com>
21481
21482 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21483 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21484
21485 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
21486
21487 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21488
21489 2000-01-23 Mark Mitchell <mark@codesourcery.com>
21490
21491 * cp-tree.h (register_dtor_fn): New function.
21492 * decl.c (destroy_local_static): Rename to ...
21493 (register_dtor_fn): ... this. Give it external linkage.
21494 (expand_static_init): Use it.
21495 * decl2.c (do_static_initialization): Likewise, if using
21496 __cxa_atexit.
21497 (do_static_destruction): Check that __cxa_atexit is not in use.
21498 (finish_file): Don't call do_static_destruction if using
21499 __cxa_atexit.
21500
21501 * typeck.c (convert_arguments): Restore two-message error
21502 reporting.
21503
21504 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
21505
21506 Remap dynamic cast hint values to be consistent across ABIs.
21507 * search.c (dynamic_cast_base_recurse): Remap generated value.
21508 (get_dynamic_cast_base_type): Adjust documentation.
21509 * tinfo.h (__user_type_info::dyncast): Likewise.
21510 (__user_type_info::find_public_subobj): Remap BOFF meaning.
21511 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21512 (__class_type_info::do_dyncast): Likewise.
21513 (__class_type_info::do_find_public_subobj): Likewise.
21514 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21515
21516 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21517
21518 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21519
21520 * typeck2.c (incomplete_type_error): Restore previous
21521 cp_error and cp_error_at call sequence.
21522
21523 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
21524
21525 * class.c (dump_class_hierarchy): Make format agree with argument;
21526 cast pointer to unsigned long and print with %lx.
21527
21528 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
21529
21530 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21531
21532 * typeck.c (composite_pointer_type, common_type,
21533 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21534 build_function_call_real, convert_arguments,
21535 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21536 build_unary_op, mark_addressable, build_compound_expr,
21537 build_static_cast, build_reinterpret_cast, build_const_cast,
21538 build_c_cast, build_modify_expr, get_delta_difference,
21539 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21540 'ISO C++'. Fusion consecutive calls to diagnostic message routines
21541 into a single one.
21542 * typeck2.c (readonly_error, abstract_virtuals_error,
21543 process_init_constructor, check_for_new_type): Likewise.
21544
21545 2000-01-19 Mark Mitchell <mark@codesourcery.com>
21546
21547 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21548 VAR_DECLs.
21549
21550 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
21551
21552 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21553 (build_x_typeid): Likewise.
21554 (get_tinfo_fn): Likewise.
21555 (get_tinfo_fn_unused): Rename to ...
21556 (get_tinfo_decl): ... here.
21557 * rtti.c (build_headof): Replace logic error with assertion.
21558 (get_tinfo_fn_dynamic): Rename to ...
21559 (get_tinfo_decl_dynamic): ... here. Make static. Use
21560 complete_type_or_else.
21561 (build_x_typeid): Move into ...
21562 (build_typeid): ... here. Adjust call to
21563 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21564 throw_bad_typeid expression.
21565 (get_tinfo_fn_unused): Rename to ...
21566 (get_tinfo_decl): ... here. Adjust comment.
21567 (get_tinfo_fn): Delete.
21568 (tinfo_from_decl): New static function.
21569 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21570 (get_typeid): Use complete_type_or_else.
21571 (build_dynamic_cast_1): Adjust calls to
21572 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21573 * parse.y (primary): Adjust call to build_typeid.
21574 * except.c (build_eh_type_type_ref): Adjust call to
21575 get_tinfo_decl. Mark as used.
21576 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21577 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21578 * parse.c: Regenerated.
21579
21580 2000-01-17 Mark Mitchell <mark@codesourcery.com>
21581
21582 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
21583 calling convention.
21584 (resolves_to_fixed_type_p): Document calling convention.
21585 * rtti.c (build_x_typeid): Initialize NONNULL.
21586
21587 * cp-tree.h (build_shared_int_cst): New function.
21588 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21589 * class.c (modify_vtable_entry): Likewise.
21590 (add_virtual_function): Split out code to generated shared
21591 INTEGER_CSTs to build_share_int_cst.
21592 (modify_all_vtables): Handle all the overridden functions here.
21593 Add overridden functions from non-primary virtual bases to the
21594 primary vtable.
21595 (finish_struct_1): Adjust call to modify_all_vtables. Add
21596 overridden functions from non-primary bases to the vtable.
21597 * tree.c (build_shared_int_cst): New function.
21598
21599 * cp-tree.h (scratchalloc): Remove.
21600 (build_scratch_list): Likewise.
21601 * call.c (convert_class_to_reference): Replace build_scratch_list
21602 and build_expr_list with build_tree_list.
21603 (add_candidate): Replace scratchalloc with expralloc. Note memory
21604 leak.
21605 (build_user_type_conversion_1): Replace build_scratch_list
21606 and build_expr_list with build_tree_list.
21607 (build_new_op): Likewise.
21608 (build_op_delete_call): Likewise.
21609 (convert_like): Likewise.
21610 * cvt.c (ocp_convert): Likewise.
21611 * decl.c (start_decl): Likewise.
21612 (start_function): Likewise.
21613 (finish_destructor_body): Likewise.
21614 (maybe_build_cleanup_1): Likewise.
21615 * decl2.c (reparse_decl_as_expr): Likewise.
21616 * init.c (perform_member_init): Likewise.
21617 (expand_cleanup_for_base): Likewise.
21618 (build_builtin_delete_call): Likewise.
21619 (build_new_1): Likewise.
21620 (build_delete): Likewise.
21621 * method.c (do_build_assign_ref): Likewise.
21622 * parse.y (already_scoped_stmt): Likewise.
21623 (nontrivial_exprlist): Likewise.
21624 (net_initializer): Likewise.
21625 (initlist): Likewise.
21626 * parse.c: Regenerated.
21627 * rtti.c (build_x_typeid): Likewise.
21628 (build_dynamic_cast_1): Likewise.
21629 * typeck.c (build_x_compound_expr): Likewise.
21630 (build_static_cast): Likewise.
21631 (build_modify_expr): Likewise.
21632
21633 * cp-tree.h (DECL_VINDEX): Add documentation.
21634 * class.c (build_vtable_entry): Likewise.
21635 (start_vtable): Add comment.
21636 (add_virtual_function): Replace pending_hard_virtuals with
21637 overridden_virtuals and pending_virtuals with new_virtuals.
21638 Replace redundant assignments with assertions.
21639 (check_for_override): Add comment.
21640 (check_bases_and_members): Replace pending_hard_virtuals with
21641 overridden_virtuals and pending_virtuals with new_virtuals.
21642 (create_vtbl_ptr): Likewise.
21643 (layout_class_type): Likewise.
21644 (finish_struct_1): Likewise. Add comments.
21645
21646 2000-01-16 Mark Mitchell <mark@codesourcery.com>
21647
21648 * class.c (finish_struct_1): Replace redundant code with
21649 assertions.
21650
21651 * cp-tree.h (flag_new_abi): Move.
21652 (flag_use_cxa_atexit): Likewise.
21653 (flag_honor_std): Likewise.
21654 (flag_rtti): Likewise.
21655 (vbase_offsets_in_vtable_p): Define.
21656 (vptrs_present_everywhere_p): Likewise.
21657 (TYPE_CONTAINS_VPTR_P): Likewise.
21658 (dfs_walk_real): Declare.
21659 * class.c (build_vbase_pointer_fields): Check
21660 vbase_offsets_in_vtable_p.
21661 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21662 BINFO_VPTR_FIELD.
21663 (build_vbase_offset_vtbl_entries): Simplify.
21664 (build_vbase_offset_vtbl_entries): Adjust.
21665 (build_vbase_pointer): Add ability to look up vbase offsets in
21666 vtable.
21667 (start_vtable): New function.
21668 (add_virtual_function): Use it.
21669 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21670 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21671 (build_vtbl_initializer): Take the type of the complete object as
21672 input. Use it to correctly calculate vbase offsets.
21673 (dfs_finish_vtbls): Pass the complete type to
21674 build_vtbl_initializer.
21675 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21676 (create_vtable_ptr): Create a vtable even if there are no
21677 new virtual functions, under the new ABI.
21678 (finish_struct_1): Likewise.
21679 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21680 * decl.c (exapnd_static_init): Remove call to
21681 preserve_initializer.
21682 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21683 vtables.
21684 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21685 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21686 (construct_virtual_bases): Don't initialize virtual base pointers
21687 under the new ABI.
21688 (build_aggr_init): Clean up comment.
21689 (expand_aggr_init_1): Likewise.
21690 * rtti.c (expand_class_desc): Store the virtual function table
21691 index where the vbase offset lives in the offset field.
21692 * search.c (dfs_walk_real): Make it global.
21693 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21694 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21695
21696 * tinfo.h (USItype): Make it signed under the new ABI.
21697 * tinfo.cc (convert_to_base): New function. Encapsulate base
21698 conversion logic here.
21699 (__class_type_info::do_upcast): Use it.
21700 (__class_type_info::do_dyncast): Likewise.
21701 (__class_type_info::do_find_public_subobj): Likewise.
21702
21703 * init.c (construct_virtual_bases): Don't look up the addresses of
21704 virtual bases at run-time.
21705
21706 * class.c (build_vbase_pointer): Relocate.
21707 (build_vbase_pointer_fields): Likewise.
21708 (dfs_build_vbase_offset_vtbl_entries): Likewise.
21709 (build_vbase_offset_vtbl_entries): Likewise.
21710
21711 * decl.c (init_decl_processing): Complain if -fnew-abi
21712 -fno-vtable-thunks is used.
21713
21714 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21715 flag_new_abi.
21716
21717 2000-01-15 Mark Mitchell <mark@codesourcery.com>
21718
21719 * cp-tree.h (num_extra_vtbl_entries): New function.
21720 (size_extra_vtbl_entries): Likewise.
21721 (dfs_vtable_path_unmark): Likewise.
21722 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21723 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21724 * class.c (num_extra_vtbl_entries): New function.
21725 (size_extra_vtbl_entries): Likewise.
21726 (dfs_build_vbase_offset_vtbl_entries): New function.
21727 (build_vbase_offset_vtbl_entries): Likewise.
21728 (build_vtbl_initializer): Use it.
21729 (finish_struct_1): Adjust vtable sizes (using
21730 num_extra_vtbl_entries).
21731 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21732 THUNK_DECL is non-NULL before expanding it.
21733 * init.c (expand_virtual_init): Adjust the vtable pointer by
21734 size_extra_vtbl_entries before storing it.
21735 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21736 Handle TREE_LIST parameters here, not in the dfs_* functions.
21737 (dfs_unmarked_real_bases_queue_p): Adjust.
21738 (dfs_marked_real_bases_queue_p): Likewise.
21739 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21740 (dfs_vtable_path_marked_real_bases_queue_p): New function.
21741 (dfs_vtable_path_unmark): Likewise.
21742
21743 2000-01-14 Mark Mitchell <mark@codesourcery.com>
21744
21745 * optimize.c (copy_body_r): Clear the operand three of a
21746 TARGET_EXPR when copying it.
21747
21748 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
21749
21750 * method.c (build_decl_overload_real): Check whether we are in ::
21751 before returning __builtin_new/delete.
21752
21753 2000-01-13 Mark Mitchell <mark@codesourcery.com>
21754
21755 * pt.c (tsubst_friend_function): Improve comment.
21756 (instantiate_decl): Avoid crashing when a "nested" function is
21757 instantiated from the top level.
21758
21759 * dump.c (dqeueue_and_dump): Dump
21760 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21761
21762 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21763
21764 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21765
21766 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
21767
21768 * g++spec.c (lang_specific_driver): Add -fnew-abi if
21769 ENABLE_NEW_GXX_ABI defined.
21770 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21771 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21772 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21773
21774 2000-01-12 Mark Mitchell <mark@codesourcery.com>
21775
21776 * decl.c (start_cleanup_fn): Call pushdecl.
21777
21778 * call.c (convert_class_to_reference): Fix typos.
21779 (build_conditional_expr): Handle errors gracefully.
21780 * class.c (push_nested_class): Likewise.
21781 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21782 (DECL_THIS_EXTERN): Use it.
21783 (DECL_THIS_STATIC): Likewise.
21784 * cvt.c (convert_to_void): Handle errors gracefully.
21785 (build_expr_type_conversion): Likewise.
21786 * decl.c (maybe_push_decl): Likewise.
21787 (start_decl_1): Likewise.
21788 (require_complete_types_for_parms): Likewise.
21789 * parse.y (structsp): Likewise.
21790 (base_class): Likewise.
21791 * parse.c: Regenerated.
21792 * pt.c (finish_member_template_decl): Likewise.
21793 * typeck.c (decay_conversion): Likewise.
21794
21795 * cp-tree.h (dfs_skip_vbases): New function.
21796 (find_vbase_instance): Likewise.
21797 * class.c (determine_primary_base): Allow a nearly empty base to
21798 serve as a primary base class under the new ABI.
21799 (get_class_offset_1): Rename to ...
21800 (dfs_get_class_offset): ... this. Simplify. Don't issue error
21801 messages here.
21802 (get_class_offset): Use it. Issue error messages here.
21803 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21804 find the right copies of virtual bases.
21805 (fixup_vtable_deltas1): Rename to ...
21806 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
21807 bases as primary bases.
21808 (fixup_vtable_deltas): Remove.
21809 (override_one_vtable): Handle virtual bases as primary bases.
21810 (merge_overrides): Likewise.
21811 (finish_struct_1): Likewise.
21812 (dump_class_hierarchy): Dump primary-ness of bases as well.
21813 * search.c (mark_primary_bases): Use a pre-order traversal to
21814 handle primary virtual bases.
21815 (dfs_skip_vbases): New fiunction.
21816 (expand_upcast_fixups): Adjust to handle primary virtual bases.
21817 (fixup_virtual_upcast_offsets): Likewise.
21818 (fixup_all_virtual_upcast_offsets): Likewise.
21819 (dfs_find_vbase_instances): New function.
21820 (find_vbase_instance): Likewise.
21821
21822 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
21823
21824 * lex.c (DIR_SEPARATOR): Delete macro.
21825
21826 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
21827
21828 * decl2.c (lang_decode_option): Handle automatic line wrapping
21829 option.
21830
21831 2000-01-11 Mark Mitchell <mark@codesourcery.com>
21832
21833 * friend.c (do_friend): Don't resolve scopes when processing
21834 template declarations, even if the qualifying scope doesn't
21835 involve template parameters.
21836
21837 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
21838
21839 * class.c (dfs_modify_vtables_queue_p): Remove.
21840 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21841 and dfs_marked_real_bases_queue_p instead of
21842 dfs_modify_vtables_queue_p.
21843
21844 * class.c (build_vbase_path): Simplify.
21845 (dfs_propagate_binfo_offsets): New function.
21846 (propagate_binfo_offsets): Use it.
21847 (remove_base_field): Simplify.
21848 (dfs_set_offset_for_vbases): Remove.
21849 (dfs_set_offset_for_shared_vbases): New function.
21850 (dfs_set_offset_for_unshared_vbases): Likewise.
21851 (layout_virtual_bases): Use them.
21852 (layout_basetypes): Don't call propagate_binfo_offsets.
21853 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21854 for the vbases.
21855
21856 * class.c (build_base_field): New function, split out from ...
21857 (build_base_fields): ... here. Use it. Allocate primary bases
21858 first, under the new ABI.
21859 (get_vtable_entry): Remove.
21860 (remove_base_field): New function, split out from ...
21861 (remove_base_fields): ... here. Adjust since primary bases come
21862 first under the new ABI.
21863
21864 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21865 (initialize_vtbl_ptrs): New function.
21866 (expand_indirect_vtbls_init): Change prototype.
21867 (convert_pointer_to_vbase): Declare.
21868 * init.c (expand_direct_vtbls_init): Remove.
21869 (dfs_initialize_vtbl_ptrs): New function.
21870 (initialize_vtbl_ptrs): Likewise.
21871 (emit_base_init): Use initialize_vtbl_ptrs.
21872 * search.c (convert_pointer_to_vbase): Make it global.
21873 (expand_indirect_vtbls_init): Remove vtable initialization code.
21874 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21875
21876 * class.c (dfs_finish_vtbls): New function.
21877 (finish_vtbls): Use it.
21878 (dump_class_hierarchy): New function.
21879
21880 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21881 (BINFO_VBASE_PRIMARY_P): New macro.
21882 (BINFO_VIRTUALS): Add to documentation.
21883 (SET_BINFO_PRIMARY_MARKED_P): Remove.
21884 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21885 (dfs_mark_primary_bases_queue_p): Likewise.
21886 (dfs_unmarked_real_bases_queue_p): New function.
21887 (dfs_marked_real_bases_queue_p): Likewise.
21888 * search.c (dfs_mark_primary_bases): Adjust.
21889 (mark_primary_bases): Likewise.
21890 (get_shared_vbase_if_not_primary): New function.
21891 (dfs_unmarked_real_bases_queue_p): Likewise.
21892 (dfs_marked_real_bases_queue_p): Likewise.
21893 (dfs_get_pure_virtuals): Simplify.
21894 (get_pure_virtuals): Likewise.
21895
21896 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21897
21898 * lex.c: Include tm_p.h.
21899
21900 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
21901
21902 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
21903
21904 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
21905
21906 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
21907 * pt.c (instantiate_decl): Defer comdat templates that might not be
21908 needed.
21909
21910 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
21911 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
21912 (finish_file): Likewise.
21913
21914 * decl2.c (import_export_class): Undo 12/14 change.
21915
21916 * error.c (dump_decl): operator new, not operatornew.
21917
21918 * class.c (field_decl_cmp): A nontype is "greater" than a type.
21919 * search.c (lookup_field_1): Look for the last field with the
21920 desired name.
21921
21922 2000-01-05 Nathan Sidwell <nathan@acm.org>
21923
21924 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
21925 FUNCTION_DECL.
21926
21927 2000-01-05 Nathan Sidwell <nathan@acm.org>
21928
21929 * typeck.c (build_static_cast): Don't strip target qualifiers
21930 when casting from a class.
21931
21932 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21933
21934 * class.c (warn_hidden): Initialize variable `fndecl'.
21935
21936 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
21937
21938 * decl.c (flag_isoc9x): New variable to be able to use code in
21939 c-common.c. For now always zero.
21940
21941 2000-01-03 Mark Mitchell <mark@codesourcery.com>
21942
21943 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
21944 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
21945 or unshare_base_binfos for virtual bases here.
21946 * search.c (dfs_get_vbase_types): Do it here.
21947 (get_vbase_types): Adjust.
21948
21949 2000-01-02 Mark Mitchell <mark@codesourcery.com>
21950
21951 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
21952 (BINFO_PRIMARY_MARKED_P): Use flag 5.
21953 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
21954 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
21955 (unmark_primary_bases): Remove declaration.
21956 (unmarkedp): Declare.
21957 (dfs_vbase_unmark): Likewise.
21958 * class.c (determine_primary_base): Return immediately if there
21959 are no base classes. Call mark_primary_bases here.
21960 (modify_all_direct_vtables): Remove.
21961 (modify_all_indirect_vtables): Remove.
21962 (dfs_modify_vtables_queue_p): New function.
21963 (dfs_modify_vtables): New function.
21964 (modify_all_vtables): Use them.
21965 (build_base_fields): Build FIELD_DECLs for primary virtual base
21966 classes.
21967 (create_vtable_ptr): Don't call determine_primary_base here.
21968 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
21969 (dfs_set_offset_for_vbases): ... this.
21970 (layout_virtual_bases): Use it.
21971 (layout_class_type): Call determine_primary_base here.
21972 * search.c (unmarkedp): Make it global.
21973 (shared_marked_p): Simplify.
21974 (shared_unmarked_p): Likewise.
21975 (dfs_primary_bases_queue_p): Remove.
21976 (dfs_unmark_primary_bases): Likewise.
21977 (unmark_primary_bases): Likewise.
21978 (mark_primary_bases): Simplify.
21979 (get_pure_virtuals): Don't call mark_primary_bases here.
21980 (dfs_vbase_unmark): New function.
21981 (get_vbase_types): Simplify.
21982
21983 * class.c (struct base_info): Remove.
21984 (determine_primary_base): Take has_virtual_p rather than a
21985 base_info as input. Don't calculate max_has_virtual.
21986 (finish_struct_bits): Remove max_has_virtual argument.
21987 (create_vtable_ptr): Remove max_has_virtual_p argument.
21988 (layout_virtual_bases): Remove max argument.
21989 (layout_basetypes): Likewise.
21990 (layout_class_type): Remove max_has_virtual_p argument.
21991 (finish_struct_1): Remove max_has_virtual.
21992
21993 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
21994 (layout_basetypes): Remove.
21995 * class.c (propagate_binfo_offsets): Moved here from tree.c.
21996 Update to handle primary virtual bases.
21997 (remove_base_fields): New function, split out from
21998 layout_basetypes.
21999 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22000 (layout_virtual_bases): New function, split out from
22001 layout_basetypes. Update to handle primary virtual bases.
22002 (layout_basetypes): Moved here from tree.c. Use
22003 remove_base_fields and layout_virtual_bases.
22004 * search.c (dfs_mark_primary_bases_queue_p): New function.
22005 (mark_primary_bases): Use it.
22006 * tree.c (CEIL): Remove.
22007 (propagate_binfo_offsets): Remove.
22008 (layout_basetypes): Remove.
22009
22010 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22011
22012 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22013 (BINFO_PRIMARY_MARKED_P): New macro.
22014 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22015 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22016 (mark_primary_bases): New function.
22017 (unmark_primary_bases): Likewise.
22018 * search.c (get_abstract_virtuals_1): Remove.
22019 (dfs_mark_primary_bases): New function.
22020 (mark_primary_bases): Likewise.
22021 (dfs_unmark_primary_bases): Likewise.
22022 (unmark_primary_bases): Likewise.
22023 (dfs_get_pure_virtuals): Likewise.
22024
22025 2000-01-01 Mark Mitchell <mark@codesourcery.com>
22026
22027 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22028 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22029 (modify_one_vtable): Adjust.
22030 (fixup_vtable_deltas1): Likewise.
22031 (override_one_vtable): Likewise.
22032 * search.c (get_abstract_virtuals_1): Likewise.
22033 (get_pure_virtuals): Likewise.
22034 (expand_upcast_fixups): Likewise.
22035 * tree.c (debug_binfo): Likewise.
22036
22037 * class.c (build_vtable): Don't return a value. Don't rebuild
22038 vtables for bases that have already been handled.
22039 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22040 already been handled.
22041 (modify_one_vtable): Adjust accordingly.
22042 (fixup_vtable_deltas1): Likewise.
22043 (finish_struct_1): Likewise.
22044
22045 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
22046
22047 * call.c (build_new_method_call): Also check destructors.